Your IP : 18.116.81.33


Current Path : /home/church/public_html/paradigmmar.com/wp-content/plugins/jetpack/_inc/blocks/
Upload File :
Current File : /home/church/public_html/paradigmmar.com/wp-content/plugins/jetpack/_inc/blocks/editor.js

/*! For license information please see editor.js.LICENSE.txt */
(()=>{var e,t,r,n,a,o,s={60400:(e,t,r)=>{"use strict";r.d(t,{L:()=>l});var n=r(2615),a=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r};const o="text/event-stream",s=1e3,i="last-event-id";function l(e,t){var{signal:r,headers:l,onopen:u,onmessage:d,onclose:p,onerror:m,openWhenHidden:h,fetch:g}=t,f=a(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise(((t,a)=>{const b=Object.assign({},l);let v;function k(){v.abort(),document.hidden||j()}b.accept||(b.accept=o),h||document.addEventListener("visibilitychange",k);let y=s,E=0;function w(){document.removeEventListener("visibilitychange",k),window.clearTimeout(E),v.abort()}null==r||r.addEventListener("abort",(()=>{w(),t()}));const _=null!=g?g:window.fetch,C=null!=u?u:c;async function j(){var r;v=new AbortController;try{const r=await _(e,Object.assign(Object.assign({},f),{headers:b,signal:v.signal}));await C(r),await(0,n.Pw)(r.body,(0,n.UM)((0,n._U)((e=>{e?b[i]=e:delete b[i]}),(e=>{y=e}),d))),null==p||p(),w(),t()}catch(e){if(!v.signal.aborted)try{const t=null!==(r=null==m?void 0:m(e))&&void 0!==r?r:y;window.clearTimeout(E),E=window.setTimeout(j,t)}catch(e){w(),a(e)}}}j()}))}function c(e){const t=e.headers.get("content-type");if(!(null==t?void 0:t.startsWith(o)))throw new Error(`Expected content-type to be ${o}, Actual: ${t}`)}},2615:(e,t,r)=>{"use strict";async function n(e,t){const r=e.getReader();let n;for(;!(n=await r.read()).done;)t(n.value)}function a(e){let t,r,n,a=!1;return function(o){void 0===t?(t=o,r=0,n=-1):t=function(e,t){const r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}(t,o);const s=t.length;let i=0;for(;r<s;){a&&(10===t[r]&&(i=++r),a=!1);let o=-1;for(;r<s&&-1===o;++r)switch(t[r]){case 58:-1===n&&(n=r-i);break;case 13:a=!0;case 10:o=r}if(-1===o)break;e(t.subarray(i,o),n),i=r,n=-1}i===s?t=void 0:0!==i&&(t=t.subarray(i),r-=i)}}function o(e,t,r){let n=s();const a=new TextDecoder;return function(o,i){if(0===o.length)null==r||r(n),n=s();else if(i>0){const r=a.decode(o.subarray(0,i)),s=i+(32===o[i+1]?2:1),l=a.decode(o.subarray(s));switch(r){case"data":n.data=n.data?n.data+"\n"+l:l;break;case"event":n.event=l;break;case"id":e(n.id=l);break;case"retry":const r=parseInt(l,10);isNaN(r)||t(n.retry=r)}}}}function s(){return{data:"",event:"",id:"",retry:void 0}}r.d(t,{Pw:()=>n,UM:()=>a,_U:()=>o})},45416:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n,a=r(99196);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}const s=e=>a.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),n||(n=a.createElement("path",{d:"M14.344 19.344H9.656a.157.157 0 0 0-.156.156v.625c0 .346.28.625.625.625h3.75c.346 0 .625-.28.625-.625V19.5a.157.157 0 0 0-.156-.156ZM12 3.25a6.407 6.407 0 0 0-3.203 11.955v2.264c0 .345.28.625.625.625h5.156c.346 0 .625-.28.625-.625v-2.264A6.407 6.407 0 0 0 12 3.25Zm2.498 10.738-.701.407v2.293h-3.594v-2.293l-.701-.407a5 5 0 1 1 4.996 0Z"})))},84788:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(2378);let a,o,s,i;const l=/<(\/)?(\w+)\s*(\/)?>/g;function c(e,t,r,n,a){return{element:e,tokenStart:t,tokenLength:r,prevOffset:n,leadingTextStart:a,children:[]}}const u=e=>{const t="object"==typeof e,r=t&&Object.values(e);return t&&r.length&&r.every((e=>(0,n.isValidElement)(e)))};function d(e){const t=function(){const e=l.exec(a);if(null===e)return["no-more-tokens"];const t=e.index,[r,n,o,s]=e,i=r.length;if(s)return["self-closed",o,t,i];if(n)return["closer",o,t,i];return["opener",o,t,i]}(),[r,u,d,h]=t,g=i.length,f=d>o?o:null;if(!e[u])return p(),!1;switch(r){case"no-more-tokens":if(0!==g){const{leadingTextStart:e,tokenStart:t}=i.pop();s.push(a.substr(e,t))}return p(),!1;case"self-closed":return 0===g?(null!==f&&s.push(a.substr(f,d-f)),s.push(e[u]),o=d+h,!0):(m(c(e[u],d,h)),o=d+h,!0);case"opener":return i.push(c(e[u],d,h,d+h,f)),o=d+h,!0;case"closer":if(1===g)return function(e){const{element:t,leadingTextStart:r,prevOffset:o,tokenStart:l,children:c}=i.pop(),u=e?a.substr(o,e-o):a.substr(o);u&&c.push(u);null!==r&&s.push(a.substr(r,l-r));s.push((0,n.cloneElement)(t,null,...c))}(d),o=d+h,!0;const t=i.pop(),r=a.substr(t.prevOffset,d-t.prevOffset);t.children.push(r),t.prevOffset=d+h;const l=c(t.element,t.tokenStart,t.tokenLength,d+h);return l.children=t.children,m(l),o=d+h,!0;default:return p(),!1}}function p(){const e=a.length-o;0!==e&&s.push(a.substr(o,e))}function m(e){const{element:t,tokenStart:r,tokenLength:o,prevOffset:s,children:l}=e,c=i[i.length-1],u=a.substr(c.prevOffset,r-c.prevOffset);u&&c.children.push(u),c.children.push((0,n.cloneElement)(t,null,...l)),c.prevOffset=s||r+o}var h=(e,t)=>{if(a=e,o=0,s=[],i=[],l.lastIndex=0,!u(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are WPElements");do{}while(d(t));return(0,n.createElement)(n.Fragment,null,...s)};t.default=h},51806:(e,t,r)=>{"use strict";var n=r(25877);Object.defineProperty(t,"__esModule",{value:!0});var a={createInterpolateElement:!0,Platform:!0,renderToString:!0,RawHTML:!0};Object.defineProperty(t,"Platform",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"RawHTML",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"createInterpolateElement",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"renderToString",{enumerable:!0,get:function(){return u.default}});var o=n(r(84788)),s=r(2378);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var i=r(29115);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var l=r(82986);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var c=n(r(82912)),u=n(r(51962)),d=n(r(74745))},82912:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={OS:"web",select:e=>"web"in e?e.web:e.default,isWeb:!0};t.default=r},74745:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({children:e,...t}){let r="";return n.Children.toArray(e).forEach((e=>{"string"==typeof e&&""!==e.trim()&&(r+=e)})),(0,n.createElement)("div",{dangerouslySetInnerHTML:{__html:r},...t})};var n=r(2378)},29115:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createPortal",{enumerable:!0,get:function(){return n.createPortal}}),Object.defineProperty(t,"createRoot",{enumerable:!0,get:function(){return a.createRoot}}),Object.defineProperty(t,"findDOMNode",{enumerable:!0,get:function(){return n.findDOMNode}}),Object.defineProperty(t,"flushSync",{enumerable:!0,get:function(){return n.flushSync}}),Object.defineProperty(t,"hydrate",{enumerable:!0,get:function(){return n.hydrate}}),Object.defineProperty(t,"hydrateRoot",{enumerable:!0,get:function(){return a.hydrateRoot}}),Object.defineProperty(t,"render",{enumerable:!0,get:function(){return n.render}}),Object.defineProperty(t,"unmountComponentAtNode",{enumerable:!0,get:function(){return n.unmountComponentAtNode}});var n=r(91850),a=r(51516)},2378:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Children",{enumerable:!0,get:function(){return n.Children}}),Object.defineProperty(t,"Component",{enumerable:!0,get:function(){return n.Component}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return n.Fragment}}),Object.defineProperty(t,"StrictMode",{enumerable:!0,get:function(){return n.StrictMode}}),Object.defineProperty(t,"Suspense",{enumerable:!0,get:function(){return n.Suspense}}),Object.defineProperty(t,"cloneElement",{enumerable:!0,get:function(){return n.cloneElement}}),t.concatChildren=function(...e){return e.reduce(((e,t,r)=>(n.Children.forEach(t,((t,a)=>{t&&"string"!=typeof t&&(t=(0,n.cloneElement)(t,{key:[r,a].join()})),e.push(t)})),e)),[])},Object.defineProperty(t,"createContext",{enumerable:!0,get:function(){return n.createContext}}),Object.defineProperty(t,"createElement",{enumerable:!0,get:function(){return n.createElement}}),Object.defineProperty(t,"createRef",{enumerable:!0,get:function(){return n.createRef}}),Object.defineProperty(t,"forwardRef",{enumerable:!0,get:function(){return n.forwardRef}}),Object.defineProperty(t,"isValidElement",{enumerable:!0,get:function(){return n.isValidElement}}),Object.defineProperty(t,"lazy",{enumerable:!0,get:function(){return n.lazy}}),Object.defineProperty(t,"memo",{enumerable:!0,get:function(){return n.memo}}),Object.defineProperty(t,"startTransition",{enumerable:!0,get:function(){return n.startTransition}}),t.switchChildrenNodeName=function(e,t){return e&&n.Children.map(e,((e,r)=>{if("string"==typeof e?.valueOf())return(0,n.createElement)(t,{key:r},e);const{children:a,...o}=e.props;return(0,n.createElement)(t,{key:r,...o},a)}))},Object.defineProperty(t,"useCallback",{enumerable:!0,get:function(){return n.useCallback}}),Object.defineProperty(t,"useContext",{enumerable:!0,get:function(){return n.useContext}}),Object.defineProperty(t,"useDebugValue",{enumerable:!0,get:function(){return n.useDebugValue}}),Object.defineProperty(t,"useDeferredValue",{enumerable:!0,get:function(){return n.useDeferredValue}}),Object.defineProperty(t,"useEffect",{enumerable:!0,get:function(){return n.useEffect}}),Object.defineProperty(t,"useId",{enumerable:!0,get:function(){return n.useId}}),Object.defineProperty(t,"useImperativeHandle",{enumerable:!0,get:function(){return n.useImperativeHandle}}),Object.defineProperty(t,"useInsertionEffect",{enumerable:!0,get:function(){return n.useInsertionEffect}}),Object.defineProperty(t,"useLayoutEffect",{enumerable:!0,get:function(){return n.useLayoutEffect}}),Object.defineProperty(t,"useMemo",{enumerable:!0,get:function(){return n.useMemo}}),Object.defineProperty(t,"useReducer",{enumerable:!0,get:function(){return n.useReducer}}),Object.defineProperty(t,"useRef",{enumerable:!0,get:function(){return n.useRef}}),Object.defineProperty(t,"useState",{enumerable:!0,get:function(){return n.useState}}),Object.defineProperty(t,"useSyncExternalStore",{enumerable:!0,get:function(){return n.useSyncExternalStore}}),Object.defineProperty(t,"useTransition",{enumerable:!0,get:function(){return n.useTransition}});var n=r(99196)},51962:(e,t,r)=>{"use strict";var n=r(25877);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.hasPrefix=b,t.renderAttributes=L,t.renderComponent=P,t.renderElement=S,t.renderNativeComponent=x,t.renderStyle=N;var a=r(62313),o=r(28132),s=r(81975),i=r(2378),l=n(r(74745));const{Provider:c,Consumer:u}=(0,i.createContext)(void 0),d=(0,i.forwardRef)((()=>null)),p=new Set(["string","boolean","number"]),m=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),h=new Set(["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"]),g=new Set(["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"]),f=new Set(["animation","animationIterationCount","baselineShift","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","cx","cy","fillOpacity","flexGrow","flexShrink","floodOpacity","fontWeight","gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart","lineHeight","opacity","order","orphans","r","rx","ry","shapeImageThreshold","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","x","y","zIndex","zoom"]);function b(e,t){return t.some((t=>0===e.indexOf(t)))}function v(e){return"key"===e||"children"===e}function k(e,t){return"style"===e?N(t):t}const y=["accentHeight","alignmentBaseline","arabicForm","baselineShift","capHeight","clipPath","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","dominantBaseline","enableBackground","fillOpacity","fillRule","floodColor","floodOpacity","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","horizAdvX","horizOriginX","imageRendering","letterSpacing","lightingColor","markerEnd","markerMid","markerStart","overlinePosition","overlineThickness","paintOrder","panose1","pointerEvents","renderingIntent","shapeRendering","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","textAnchor","textDecoration","textRendering","underlinePosition","underlineThickness","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","vHanging","vIdeographic","vMathematical","vectorEffect","vertAdvY","vertOriginX","vertOriginY","wordSpacing","writingMode","xmlnsXlink","xHeight"].reduce(((e,t)=>(e[t.toLowerCase()]=t,e)),{}),E=["allowReorder","attributeName","attributeType","autoReverse","baseFrequency","baseProfile","calcMode","clipPathUnits","contentScriptType","contentStyleType","diffuseConstant","edgeMode","externalResourcesRequired","filterRes","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","suppressContentEditableWarning","suppressHydrationWarning","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector"].reduce(((e,t)=>(e[t.toLowerCase()]=t,e)),{}),w=["xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xml:space","xmlns:xlink"].reduce(((e,t)=>(e[t.replace(":","").toLowerCase()]=t,e)),{});function _(e){switch(e){case"htmlFor":return"for";case"className":return"class"}const t=e.toLowerCase();return E[t]?E[t]:y[t]?(0,o.paramCase)(y[t]):w[t]?w[t]:t}function C(e){return e.startsWith("--")?e:b(e,["ms","O","Moz","Webkit"])?"-"+(0,o.paramCase)(e):(0,o.paramCase)(e)}function j(e,t){return"number"!=typeof t||0===t||f.has(e)?t:t+"px"}function S(e,t,r={}){if(null==e||!1===e)return"";if(Array.isArray(e))return T(e,t,r);switch(typeof e){case"string":return(0,s.escapeHTML)(e);case"number":return e.toString()}const{type:n,props:a}=e;switch(n){case i.StrictMode:case i.Fragment:return T(a.children,t,r);case l.default:const{children:e,...n}=a;return x(Object.keys(n).length?"div":null,{...n,dangerouslySetInnerHTML:{__html:e}},t,r)}switch(typeof n){case"string":return x(n,a,t,r);case"function":return n.prototype&&"function"==typeof n.prototype.render?P(n,a,t,r):S(n(a,r),t,r)}switch(n&&n.$$typeof){case c.$$typeof:return T(a.children,a.value,r);case u.$$typeof:return S(a.children(t||n._currentValue),t,r);case d.$$typeof:return S(n.render(a),t,r)}return""}function x(e,t,r,n={}){let a="";if("textarea"===e&&t.hasOwnProperty("value")){a=T(t.value,r,n);const{value:e,...o}=t;t=o}else t.dangerouslySetInnerHTML&&"string"==typeof t.dangerouslySetInnerHTML.__html?a=t.dangerouslySetInnerHTML.__html:void 0!==t.children&&(a=T(t.children,r,n));if(!e)return a;const o=L(t);return m.has(e)?"<"+e+o+"/>":"<"+e+o+">"+a+"</"+e+">"}function P(e,t,r,n={}){const a=new e(t,n);"function"==typeof a.getChildContext&&Object.assign(n,a.getChildContext());return S(a.render(),r,n)}function T(e,t,r={}){let n="";e=Array.isArray(e)?e:[e];for(let a=0;a<e.length;a++){n+=S(e[a],t,r)}return n}function L(e){let t="";for(const r in e){const n=_(r);if(!(0,s.isValidAttributeName)(n))continue;let a=k(r,e[r]);if(!p.has(typeof a))continue;if(v(r))continue;const o=h.has(n);if(o&&!1===a)continue;const i=o||b(r,["data-","aria-"])||g.has(n);("boolean"!=typeof a||i)&&(t+=" "+n,o||("string"==typeof a&&(a=(0,s.escapeAttribute)(a)),t+='="'+a+'"'))}return t}function N(e){if(!(0,a.isPlainObject)(e))return e;let t;for(const r in e){const n=e[r];if(null==n)continue;t?t+=";":t="";t+=C(r)+":"+j(r,n)}return t}var A=S;t.default=A},82986:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyElement=void 0;t.isEmptyElement=e=>"number"!=typeof e&&("string"==typeof e?.valueOf()||Array.isArray(e)?!e.length:!e)},61074:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(69307);const a=function({icon:e,size:t=24,...r}){return(0,n.cloneElement)(e,{width:t,height:t,...r})}},90986:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(69307),a=r(70444);const o=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"}))},58829:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(69307),a=r(70444);const o=(0,n.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(a.Path,{d:"M8 12.5h8V11H8v1.5Z M19 6.5H5a2 2 0 0 0-2 2V15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a2 2 0 0 0-2-2ZM5 8h14a.5.5 0 0 1 .5.5V15a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V8.5A.5.5 0 0 1 5 8Z"}))},23435:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(69307),a=r(70444);const o=(0,n.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(a.Path,{d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21ZM15.5303 8.46967C15.8232 8.76256 15.8232 9.23744 15.5303 9.53033L13.0607 12L15.5303 14.4697C15.8232 14.7626 15.8232 15.2374 15.5303 15.5303C15.2374 15.8232 14.7626 15.8232 14.4697 15.5303L12 13.0607L9.53033 15.5303C9.23744 15.8232 8.76256 15.8232 8.46967 15.5303C8.17678 15.2374 8.17678 14.7626 8.46967 14.4697L10.9393 12L8.46967 9.53033C8.17678 9.23744 8.17678 8.76256 8.46967 8.46967C8.76256 8.17678 9.23744 8.17678 9.53033 8.46967L12 10.9393L14.4697 8.46967C14.7626 8.17678 15.2374 8.17678 15.5303 8.46967Z"}))},79201:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(69307),a=r(70444);const o=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}))},46936:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(69307),a=r(70444);const o=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}))},6163:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(69307),a=r(70444);const o=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}))},39517:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(69307),a=r(70444);const o=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}))},64967:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(69307),a=r(70444);const o=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zm-1.338 4.877c-.314.22-.412.452-.412.623 0 .171.098.403.412.623.312.218.783.377 1.338.377.825 0 1.605.233 2.198.648.59.414 1.052 1.057 1.052 1.852 0 .795-.461 1.438-1.052 1.852-.41.286-.907.486-1.448.582v.316a.75.75 0 01-1.5 0v-.316a3.64 3.64 0 01-1.448-.582c-.59-.414-1.052-1.057-1.052-1.852a.75.75 0 011.5 0c0 .171.098.403.412.623.312.218.783.377 1.338.377s1.026-.159 1.338-.377c.314-.22.412-.452.412-.623 0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377-.825 0-1.605-.233-2.198-.648-.59-.414-1.052-1.057-1.052-1.852 0-.795.461-1.438 1.052-1.852a3.64 3.64 0 011.448-.582V7.5a.75.75 0 011.5 0v.316c.54.096 1.039.296 1.448.582.59.414 1.052 1.057 1.052 1.852a.75.75 0 01-1.5 0c0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377s-1.026.159-1.338.377z"}))},15381:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(69307),a=r(70444);const o=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"}))},43618:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(69307),a=r(70444);const o=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"}))},75022:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(69307),a=r(70444);const o=(0,n.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(a.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"}))},90496:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(69307),a=r(70444);const o=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}))},75365:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(69307),a=r(70444);const o=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,n.createElement)(a.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"}))},1078:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(69307),a=r(70444);const o=(0,n.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(a.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"}))},20843:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(69307),a=r(70444);const o=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,n.createElement)(a.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"}))},77840:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(69307),a=r(70444);const o=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"}))},58532:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(69307),a=r(70444);const o=(0,n.createElement)(a.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z"}))},92710:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(69307),a=r(70444);const o=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M12.75 9.333c0 .521-.102.977-.327 1.354-.23.386-.555.628-.893.774-.545.234-1.183.227-1.544.222l-.12-.001v-1.5h.123c.414.001.715.002.948-.099a.395.395 0 00.199-.166c.05-.083.114-.253.114-.584V7.2H8.8V4h3.95v5.333zM7.95 9.333c0 .521-.102.977-.327 1.354-.23.386-.555.628-.893.774-.545.234-1.183.227-1.544.222l-.12-.001v-1.5h.123c.414.001.715.002.948-.099a.394.394 0 00.198-.166c.05-.083.115-.253.115-.584V7.2H4V4h3.95v5.333zM13 20H4v-1.5h9V20zM20 16H4v-1.5h16V16z"}))},3639:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(69307),a=r(70444);const o=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"}))},586:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(69307),a=r(70444);const o=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M6.08 10.103h2.914L9.657 12h1.417L8.23 4H6.846L4 12h1.417l.663-1.897Zm1.463-4.137.994 2.857h-2l1.006-2.857ZM11 16H4v-1.5h7V16Zm1 0h8v-1.5h-8V16Zm-4 4H4v-1.5h4V20Zm7-1.5V20H9v-1.5h6Z"}))},32677:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(69307),a=r(70444);const o=(0,n.createElement)(a.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"m4 5.5h2v6.5h1.5v-6.5h2v-1.5h-5.5zm16 10.5h-16v-1.5h16zm-7 4h-9v-1.5h9z"}))},48381:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(69307),a=r(70444);const o=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"m11.3 17.2-5-5c-.1-.1-.1-.3 0-.4l2.3-2.3-1.1-1-2.3 2.3c-.7.7-.7 1.8 0 2.5l5 5H7.5v1.5h5.3v-5.2h-1.5v2.6zm7.5-6.4-5-5h2.7V4.2h-5.2v5.2h1.5V6.8l5 5c.1.1.1.3 0 .4l-2.3 2.3 1.1 1.1 2.3-2.3c.6-.7.6-1.9-.1-2.5z"}))},47659:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(69307),a=r(70444);const o=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}))},30797:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(69307),a=r(70444);const o=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,n.createElement)(a.Path,{d:"M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z"}))},59823:(e,t,r)=>{"use strict";r.d(t,{AG:()=>s,Ti:()=>o,eV:()=>i});var n=r(38697),a=r(72867);function o(e,t){return 0===t?e.toLowerCase():(0,a.By)(e,t)}function s(e,t){return 0===t?e.toLowerCase():(0,a.Pv)(e)}function i(e,t){return void 0===t&&(t={}),(0,a.Ho)(e,(0,n.pi)({transform:o},t))}},81338:(e,t,r)=>{"use strict";r.d(t,{I:()=>i,w:()=>s});var n=r(38697),a=r(68308),o=r(83078);function s(e){return(0,o.l)(e.toLowerCase())}function i(e,t){return void 0===t&&(t={}),(0,a.B)(e,(0,n.pi)({delimiter:" ",transform:s},t))}},28132:(e,t,r)=>{"use strict";r.r(t),r.d(t,{camelCase:()=>n.eV,camelCaseTransform:()=>n.Ti,camelCaseTransformMerge:()=>n.AG,capitalCase:()=>a.I,capitalCaseTransform:()=>a.w,constantCase:()=>o.c,dotCase:()=>s.$,headerCase:()=>i.e,noCase:()=>l.B,paramCase:()=>c.o,pascalCase:()=>u.Ho,pascalCaseTransform:()=>u.By,pascalCaseTransformMerge:()=>u.Pv,pathCase:()=>d.Y,sentenceCase:()=>p.G,sentenceCaseTransform:()=>p.a,snakeCase:()=>m.f});var n=r(59823),a=r(81338),o=r(56233),s=r(77352),i=r(20025),l=r(68308),c=r(76854),u=r(72867),d=r(76559),p=r(44434),m=r(59491)},73320:(e,t)=>{var r;!function(){"use strict";var n=function(){function e(){}function t(e,t){for(var r=t.length,n=0;n<r;++n)a(e,t[n])}e.prototype=Object.create(null);var r={}.hasOwnProperty;var n=/\s+/;function a(e,a){if(a){var o=typeof a;"string"===o?function(e,t){for(var r=t.split(n),a=r.length,o=0;o<a;++o)e[r[o]]=!0}(e,a):Array.isArray(a)?t(e,a):"object"===o?function(e,t){if(t.toString===Object.prototype.toString||t.toString.toString().includes("[native code]"))for(var n in t)r.call(t,n)&&(e[n]=!!t[n]);else e[t.toString()]=!0}(e,a):"number"===o&&function(e,t){e[t]=!0}(e,a)}}return function(){for(var r=arguments.length,n=Array(r),a=0;a<r;a++)n[a]=arguments[a];var o=new e;t(o,n);var s=[];for(var i in o)o[i]&&s.push(i);return s.join(" ")}}();e.exports?(n.default=n,e.exports=n):void 0===(r=function(){return n}.apply(t,[]))||(e.exports=r)}()},65235:(e,t)=>{var r;!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)){if(r.length){var s=a.apply(null,r);s&&e.push(s)}}else if("object"===o){if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]")){e.push(r.toString());continue}for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(r=function(){return a}.apply(t,[]))||(e.exports=r)}()},56233:(e,t,r)=>{"use strict";r.d(t,{c:()=>s});var n=r(38697),a=r(68308),o=r(48936);function s(e,t){return void 0===t&&(t={}),(0,a.B)(e,(0,n.pi)({delimiter:"_",transform:o.L},t))}},94273:e=>{!function(){"use strict";var t=[],r=3988292384;function n(e){var t,n,a,o,s=-1;for(t=0,a=e.length;t<a;t+=1){for(o=255&(s^e[t]),n=0;n<8;n+=1)1==(1&o)?o=o>>>1^r:o>>>=1;s=s>>>8^o}return-1^s}function a(e,r){var n,o,s;if(void 0!==a.crc&&r&&e||(a.crc=-1,e)){for(n=a.crc,o=0,s=e.length;o<s;o+=1)n=n>>>8^t[255&(n^e[o])];return a.crc=n,-1^n}}!function(){var e,n,a;for(n=0;n<256;n+=1){for(e=n,a=0;a<8;a+=1)1&e?e=r^e>>>1:e>>>=1;t[n]=e>>>0}}(),e.exports=function(e,t){var r;e="string"==typeof e?(r=e,Array.prototype.map.call(r,(function(e){return e.charCodeAt(0)}))):e;return((t?n(e):a(e))>>>0).toString(16)},e.exports.direct=n,e.exports.table=a}()},77352:(e,t,r)=>{"use strict";r.d(t,{$:()=>o});var n=r(38697),a=r(68308);function o(e,t){return void 0===t&&(t={}),(0,a.B)(e,(0,n.pi)({delimiter:"."},t))}},92384:(e,t)=>{"use strict";var r=/^[-!#$%&'*+\/0-9=?A-Z^_a-z{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/;t.validate=function(e){if(!e)return!1;if(e.length>254)return!1;if(!r.test(e))return!1;var t=e.split("@");return!(t[0].length>64)&&!t[1].split(".").some((function(e){return e.length>63}))}},53184:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function a(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",a),r([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&g(e,"error",t,r)}(e,a,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function i(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,r,n){var a,o,s,c;if(i(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(a=l(e))>0&&s.length>a&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,c=u,console&&console.warn&&console.warn(c)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},a=u.bind(n);return a.listener=r,n.wrapFn=a,a}function p(e,t,r){var n=e._events;if(void 0===n)return[];var a=n[t];return void 0===a?[]:"function"==typeof a?r?[a.listener||a]:[a]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(a):h(a,a.length)}function m(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function h(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function g(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function a(o){n.once&&e.removeEventListener(t,a),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var a="error"===e,o=this._events;if(void 0!==o)a=a&&void 0===o.error;else if(!a)return!1;if(a){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var i=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw i.context=s,i}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else{var c=l.length,u=h(l,c);for(r=0;r<c;++r)n(u[r],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return i(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return i(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,a,o,s;if(i(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(a=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,a=o;break}if(a<0)return this;0===a?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,a),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var a,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(a=o[n])&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return p(this,e,!0)},o.prototype.rawListeners=function(e){return p(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},o.prototype.listenerCount=m,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},90861:function(e){e.exports=function(){"use strict";var e=/^(b|B)$/,t={iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},r={iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]},n={floor:Math.floor,ceil:Math.ceil};function a(a){var o,s,i,l,c,u,d,p,m,h,g,f,b,v,k,y,E,w,_,C,j,S=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},x=[],P=0;if(isNaN(a))throw new TypeError("Invalid number");if(i=!0===S.bits,k=!0===S.unix,f=!0===S.pad,s=S.base||10,b=void 0!==S.round?S.round:k?1:2,d=void 0!==S.locale?S.locale:"",p=S.localeOptions||{},y=void 0!==S.separator?S.separator:"",E=void 0!==S.spacer?S.spacer:k?"":" ",_=S.symbols||{},w=2===s?S.standard||"iec":"jedec",g=S.output||"string",c=!0===S.fullform,u=S.fullforms instanceof Array?S.fullforms:[],o=void 0!==S.exponent?S.exponent:-1,C=n[S.roundingMethod]||Math.round,m=(h=Number(a))<0,l=s>2?1e3:1024,j=!1===isNaN(S.precision)?parseInt(S.precision,10):0,m&&(h=-h),(-1===o||isNaN(o))&&(o=Math.floor(Math.log(h)/Math.log(l)))<0&&(o=0),o>8&&(j>0&&(j+=8-o),o=8),"exponent"===g)return o;if(0===h)x[0]=0,v=x[1]=k?"":t[w][i?"bits":"bytes"][o];else{P=h/(2===s?Math.pow(2,10*o):Math.pow(1e3,o)),i&&(P*=8)>=l&&o<8&&(P/=l,o++);var T=Math.pow(10,o>0?b:0);x[0]=C(P*T)/T,x[0]===l&&o<8&&void 0===S.exponent&&(x[0]=1,o++),v=x[1]=10===s&&1===o?i?"kbit":"kB":t[w][i?"bits":"bytes"][o],k&&(x[1]=x[1].charAt(0),e.test(x[1])&&(x[0]=Math.floor(x[0]),x[1]=""))}if(m&&(x[0]=-x[0]),j>0&&(x[0]=x[0].toPrecision(j)),x[1]=_[x[1]]||x[1],!0===d?x[0]=x[0].toLocaleString():d.length>0?x[0]=x[0].toLocaleString(d,p):y.length>0&&(x[0]=x[0].toString().replace(".",y)),f&&!1===Number.isInteger(x[0])&&b>0){var L=y||".",N=x[0].toString().split(L),A=N[1]||"",R=A.length,I=b-R;x[0]="".concat(N[0]).concat(L).concat(A.padEnd(R+I,"0"))}return c&&(x[1]=u[o]?u[o]:r[w][o]+(i?"bit":"byte")+(1===x[0]?"":"s")),"array"===g?x:"object"===g?{value:x[0],symbol:x[1],exponent:o,unit:v}:x.join(E)}return a.partial=function(e){return function(t){return a(t,e)}},a}()},20025:(e,t,r)=>{"use strict";r.d(t,{e:()=>o});var n=r(38697),a=r(81338);function o(e,t){return void 0===t&&(t={}),(0,a.I)(e,(0,n.pi)({delimiter:"-"},t))}},62313:(e,t)=>{"use strict";function r(e){return"[object Object]"===Object.prototype.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=function(e){var t,n;return!1!==r(e)&&(void 0===(t=e.constructor)||!1!==r(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}},84097:function(e,t){var r,n;n="undefined"!=typeof self?self:"undefined"!=typeof window||"undefined"!=typeof window?window:this,e.exports=function(n){"use strict";var a,o=(n=n||{}).Base64,s="2.6.4",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=function(e){for(var t={},r=0,n=e.length;r<n;r++)t[e.charAt(r)]=r;return t}(i),c=String.fromCharCode,u=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?c(192|t>>>6)+c(128|63&t):c(224|t>>>12&15)+c(128|t>>>6&63)+c(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return c(240|t>>>18&7)+c(128|t>>>12&63)+c(128|t>>>6&63)+c(128|63&t)},d=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,p=function(e){return e.replace(d,u)},m=function(e){var t=[0,2,1][e.length%3],r=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[i.charAt(r>>>18),i.charAt(r>>>12&63),t>=2?"=":i.charAt(r>>>6&63),t>=1?"=":i.charAt(63&r)].join("")},h=n.btoa&&"function"==typeof n.btoa?function(e){return n.btoa(e)}:function(e){if(e.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return e.replace(/[\s\S]{1,3}/g,m)},g=function(e){return h(p(String(e)))},f=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},b=function(e,t){return t?f(g(e)):g(e)},v=function(e){return b(e,!0)};n.Uint8Array&&(a=function(e,t){for(var r="",n=0,a=e.length;n<a;n+=3){var o=e[n],s=e[n+1],l=e[n+2],c=o<<16|s<<8|l;r+=i.charAt(c>>>18)+i.charAt(c>>>12&63)+(void 0!==s?i.charAt(c>>>6&63):"=")+(void 0!==l?i.charAt(63&c):"=")}return t?f(r):r});var k,y=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,E=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return c(55296+(t>>>10))+c(56320+(1023&t));case 3:return c((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return c((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},w=function(e){return e.replace(y,E)},_=function(e){var t=e.length,r=t%4,n=(t>0?l[e.charAt(0)]<<18:0)|(t>1?l[e.charAt(1)]<<12:0)|(t>2?l[e.charAt(2)]<<6:0)|(t>3?l[e.charAt(3)]:0),a=[c(n>>>16),c(n>>>8&255),c(255&n)];return a.length-=[0,0,2,1][r],a.join("")},C=n.atob&&"function"==typeof n.atob?function(e){return n.atob(e)}:function(e){return e.replace(/\S{1,4}/g,_)},j=function(e){return C(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},S=function(e){return w(C(e))},x=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},P=function(e){return S(x(e))};n.Uint8Array&&(k=function(e){return Uint8Array.from(j(x(e)),(function(e){return e.charCodeAt(0)}))});var T=function(){var e=n.Base64;return n.Base64=o,e};if(n.Base64={VERSION:s,atob:j,btoa:h,fromBase64:P,toBase64:b,utob:p,encode:b,encodeURI:v,btou:w,decode:P,noConflict:T,fromUint8Array:a,toUint8Array:k},"function"==typeof Object.defineProperty){var L=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};n.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",L((function(){return P(this)}))),Object.defineProperty(String.prototype,"toBase64",L((function(e){return b(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",L((function(){return b(this,!0)})))}}return n.Meteor&&(Base64=n.Base64),e.exports?e.exports.Base64=n.Base64:void 0===(r=function(){return n.Base64}.apply(t,[]))||(e.exports=r),{Base64:n.Base64}}(n)},62232:(e,t,r)=>{"use strict";function n(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){t&&Object.keys(t).forEach((function(r){e[r]=t[r]}))})),e}function a(e){return Object.prototype.toString.call(e)}function o(e){return"[object Function]"===a(e)}function s(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var i={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};var l={"http:":{validate:function(e,t,r){var n=e.slice(t);return r.re.http||(r.re.http=new RegExp("^\\/\\/"+r.re.src_auth+r.re.src_host_port_strict+r.re.src_path,"i")),r.re.http.test(n)?n.match(r.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,r){var n=e.slice(t);return r.re.no_http||(r.re.no_http=new RegExp("^"+r.re.src_auth+"(?:localhost|(?:(?:"+r.re.src_domain+")\\.)+"+r.re.src_domain_root+")"+r.re.src_port+r.re.src_host_terminator+r.re.src_path,"i")),r.re.no_http.test(n)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:n.match(r.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,r){var n=e.slice(t);return r.re.mailto||(r.re.mailto=new RegExp("^"+r.re.src_email_name+"@"+r.re.src_host_strict,"i")),r.re.mailto.test(n)?n.match(r.re.mailto)[0].length:0}}},c="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",u="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function d(e){var t=e.re=r(95843)(e.__opts__),n=e.__tlds__.slice();function i(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||n.push(c),n.push(t.src_xn),t.src_tlds=n.join("|"),t.email_fuzzy=RegExp(i(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(i(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(i(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(i(t.tpl_host_fuzzy_test),"i");var l=[];function u(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){var r=e.__schemas__[t];if(null!==r){var n={validate:null,link:null};if(e.__compiled__[t]=n,"[object Object]"===a(r))return!function(e){return"[object RegExp]"===a(e)}(r.validate)?o(r.validate)?n.validate=r.validate:u(t,r):n.validate=function(e){return function(t,r){var n=t.slice(r);return e.test(n)?n.match(e)[0].length:0}}(r.validate),void(o(r.normalize)?n.normalize=r.normalize:r.normalize?u(t,r):n.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===a(e)}(r)?u(t,r):l.push(t)}})),l.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};var d=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(s).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+d+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+d+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function p(e,t){var r=e.__index__,n=e.__last_index__,a=e.__text_cache__.slice(r,n);this.schema=e.__schema__.toLowerCase(),this.index=r+t,this.lastIndex=n+t,this.raw=a,this.text=a,this.url=a}function m(e,t){var r=new p(e,t);return e.__compiled__[r.schema].normalize(r,e),r}function h(e,t){if(!(this instanceof h))return new h(e,t);var r;t||(r=e,Object.keys(r||{}).reduce((function(e,t){return e||i.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=n({},i,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=n({},l,e),this.__compiled__={},this.__tlds__=u,this.__tlds_replaced__=!1,this.re={},d(this)}h.prototype.add=function(e,t){return this.__schemas__[e]=t,d(this),this},h.prototype.set=function(e){return this.__opts__=n(this.__opts__,e),this},h.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,r,n,a,o,s,i,l;if(this.re.schema_test.test(e))for((i=this.re.schema_search).lastIndex=0;null!==(t=i.exec(e));)if(a=this.testSchemaAt(e,t[2],i.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+a;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||l<this.__index__)&&null!==(r=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(o=r.index+r[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=r.index+r[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&null!==(n=e.match(this.re.email_fuzzy))&&(o=n.index+n[1].length,s=n.index+n[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&s>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=s)),this.__index__>=0},h.prototype.pretest=function(e){return this.re.pretest.test(e)},h.prototype.testSchemaAt=function(e,t,r){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,r,this):0},h.prototype.match=function(e){var t=0,r=[];this.__index__>=0&&this.__text_cache__===e&&(r.push(m(this,t)),t=this.__last_index__);for(var n=t?e.slice(t):e;this.test(n);)r.push(m(this,t)),n=n.slice(this.__last_index__),t+=this.__last_index__;return r.length?r:null},h.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,r){return e!==r[t-1]})).reverse(),d(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,d(this),this)},h.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},h.prototype.onCompile=function(){},e.exports=h},95843:(e,t,r)=>{"use strict";e.exports=function(e){var t={};t.src_Any=r(44957).source,t.src_Cc=r(19590).source,t.src_Z=r(59939).source,t.src_P=r(95162).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");var n="[><|]";return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+"|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+").|;(?!"+t.src_ZCc+").|\\!+(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},97740:(e,t,r)=>{"use strict";r.d(t,{U:()=>n});function n(e){return e.toLowerCase()}},82339:e=>{"use strict";function t(e,t,r,n){var a=Number(e[t].meta.id+1).toString(),o="";return"string"==typeof n.docId&&(o="-"+n.docId+"-"),o+a}function r(e,t){var r=Number(e[t].meta.id+1).toString();return e[t].meta.subId>0&&(r+=":"+e[t].meta.subId),"["+r+"]"}function n(e,t,r,n,a){var o=a.rules.footnote_anchor_name(e,t,r,n,a),s=a.rules.footnote_caption(e,t,r,n,a),i=o;return e[t].meta.subId>0&&(i+=":"+e[t].meta.subId),'<sup class="footnote-ref"><a href="#fn'+o+'" id="fnref'+i+'">'+s+"</a></sup>"}function a(e,t,r){return(r.xhtmlOut?'<hr class="footnotes-sep" />\n':'<hr class="footnotes-sep">\n')+'<section class="footnotes">\n<ol class="footnotes-list">\n'}function o(){return"</ol>\n</section>\n"}function s(e,t,r,n,a){var o=a.rules.footnote_anchor_name(e,t,r,n,a);return e[t].meta.subId>0&&(o+=":"+e[t].meta.subId),'<li id="fn'+o+'" class="footnote-item">'}function i(){return"</li>\n"}function l(e,t,r,n,a){var o=a.rules.footnote_anchor_name(e,t,r,n,a);return e[t].meta.subId>0&&(o+=":"+e[t].meta.subId),' <a href="#fnref'+o+'" class="footnote-backref">↩︎</a>'}e.exports=function(e){var c=e.helpers.parseLinkLabel,u=e.utils.isSpace;e.renderer.rules.footnote_ref=n,e.renderer.rules.footnote_block_open=a,e.renderer.rules.footnote_block_close=o,e.renderer.rules.footnote_open=s,e.renderer.rules.footnote_close=i,e.renderer.rules.footnote_anchor=l,e.renderer.rules.footnote_caption=r,e.renderer.rules.footnote_anchor_name=t,e.block.ruler.before("reference","footnote_def",(function(e,t,r,n){var a,o,s,i,l,c,d,p,m,h,g,f=e.bMarks[t]+e.tShift[t],b=e.eMarks[t];if(f+4>b)return!1;if(91!==e.src.charCodeAt(f))return!1;if(94!==e.src.charCodeAt(f+1))return!1;for(l=f+2;l<b;l++){if(32===e.src.charCodeAt(l))return!1;if(93===e.src.charCodeAt(l))break}if(l===f+2)return!1;if(l+1>=b||58!==e.src.charCodeAt(++l))return!1;if(n)return!0;for(l++,e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.refs||(e.env.footnotes.refs={}),c=e.src.slice(f+2,l-2),e.env.footnotes.refs[":"+c]=-1,(d=new e.Token("footnote_reference_open","",1)).meta={label:c},d.level=e.level++,e.tokens.push(d),a=e.bMarks[t],o=e.tShift[t],s=e.sCount[t],i=e.parentType,g=l,p=m=e.sCount[t]+l-(e.bMarks[t]+e.tShift[t]);l<b&&(h=e.src.charCodeAt(l),u(h));)9===h?m+=4-m%4:m++,l++;return e.tShift[t]=l-g,e.sCount[t]=m-p,e.bMarks[t]=g,e.blkIndent+=4,e.parentType="footnote",e.sCount[t]<e.blkIndent&&(e.sCount[t]+=e.blkIndent),e.md.block.tokenize(e,t,r,!0),e.parentType=i,e.blkIndent-=4,e.tShift[t]=o,e.sCount[t]=s,e.bMarks[t]=a,(d=new e.Token("footnote_reference_close","",-1)).level=--e.level,e.tokens.push(d),!0}),{alt:["paragraph","reference"]}),e.inline.ruler.after("image","footnote_inline",(function(e,t){var r,n,a,o,s=e.posMax,i=e.pos;return!(i+2>=s)&&(94===e.src.charCodeAt(i)&&(91===e.src.charCodeAt(i+1)&&(r=i+2,!((n=c(e,i+1))<0)&&(t||(e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.list||(e.env.footnotes.list=[]),a=e.env.footnotes.list.length,e.md.inline.parse(e.src.slice(r,n),e.md,e.env,o=[]),e.push("footnote_ref","",0).meta={id:a},e.env.footnotes.list[a]={content:e.src.slice(r,n),tokens:o}),e.pos=n+1,e.posMax=s,!0))))})),e.inline.ruler.after("footnote_inline","footnote_ref",(function(e,t){var r,n,a,o,s=e.posMax,i=e.pos;if(i+3>s)return!1;if(!e.env.footnotes||!e.env.footnotes.refs)return!1;if(91!==e.src.charCodeAt(i))return!1;if(94!==e.src.charCodeAt(i+1))return!1;for(n=i+2;n<s;n++){if(32===e.src.charCodeAt(n))return!1;if(10===e.src.charCodeAt(n))return!1;if(93===e.src.charCodeAt(n))break}return n!==i+2&&(!(n>=s)&&(n++,r=e.src.slice(i+2,n-1),void 0!==e.env.footnotes.refs[":"+r]&&(t||(e.env.footnotes.list||(e.env.footnotes.list=[]),e.env.footnotes.refs[":"+r]<0?(a=e.env.footnotes.list.length,e.env.footnotes.list[a]={label:r,count:0},e.env.footnotes.refs[":"+r]=a):a=e.env.footnotes.refs[":"+r],o=e.env.footnotes.list[a].count,e.env.footnotes.list[a].count++,e.push("footnote_ref","",0).meta={id:a,subId:o,label:r}),e.pos=n,e.posMax=s,!0)))})),e.core.ruler.after("inline","footnote_tail",(function(e){var t,r,n,a,o,s,i,l,c,u,d=!1,p={};if(e.env.footnotes&&(e.tokens=e.tokens.filter((function(e){return"footnote_reference_open"===e.type?(d=!0,c=[],u=e.meta.label,!1):"footnote_reference_close"===e.type?(d=!1,p[":"+u]=c,!1):(d&&c.push(e),!d)})),e.env.footnotes.list)){for(s=e.env.footnotes.list,i=new e.Token("footnote_block_open","",1),e.tokens.push(i),t=0,r=s.length;t<r;t++){for((i=new e.Token("footnote_open","",1)).meta={id:t,label:s[t].label},e.tokens.push(i),s[t].tokens?(l=[],(i=new e.Token("paragraph_open","p",1)).block=!0,l.push(i),(i=new e.Token("inline","",0)).children=s[t].tokens,i.content=s[t].content,l.push(i),(i=new e.Token("paragraph_close","p",-1)).block=!0,l.push(i)):s[t].label&&(l=p[":"+s[t].label]),l&&(e.tokens=e.tokens.concat(l)),o="paragraph_close"===e.tokens[e.tokens.length-1].type?e.tokens.pop():null,a=s[t].count>0?s[t].count:1,n=0;n<a;n++)(i=new e.Token("footnote_anchor","",0)).meta={id:t,subId:n,label:s[t].label},e.tokens.push(i);o&&e.tokens.push(o),i=new e.Token("footnote_close","",-1),e.tokens.push(i)}i=new e.Token("footnote_block_close","",-1),e.tokens.push(i)}}))}},10185:(e,t,r)=>{"use strict";e.exports=r(9702)},38337:(e,t,r)=>{"use strict";e.exports=r(84321)},43093:e=>{"use strict";e.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},36570:e=>{"use strict";var t="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",r="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",n=new RegExp("^(?:"+t+"|"+r+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),a=new RegExp("^(?:"+t+"|"+r+")");e.exports.n=n,e.exports.q=a},39615:(e,t,r)=>{"use strict";var n=Object.prototype.hasOwnProperty;function a(e,t){return n.call(e,t)}function o(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function s(e){if(e>65535){var t=55296+((e-=65536)>>10),r=56320+(1023&e);return String.fromCharCode(t,r)}return String.fromCharCode(e)}var i=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,l=new RegExp(i.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),c=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,u=r(38337);var d=/[&<>"]/,p=/[&<>"]/g,m={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function h(e){return m[e]}var g=/[.?*+^$[\]\\(){}|-]/g;var f=r(95162);t.lib={},t.lib.mdurl=r(49236),t.lib.ucmicro=r(84353),t.assign=function(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach((function(r){e[r]=t[r]}))}})),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=a,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(i,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(l,(function(e,t,r){return t||function(e,t){var r=0;return a(u,t)?u[t]:35===t.charCodeAt(0)&&c.test(t)&&o(r="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?s(r):e}(e,r)}))},t.isValidEntityCode=o,t.fromCodePoint=s,t.escapeHtml=function(e){return d.test(e)?e.replace(p,h):e},t.arrayReplaceAt=function(e,t,r){return[].concat(e.slice(0,t),r,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},t.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},t.isPunctChar=function(e){return f.test(e)},t.escapeRE=function(e){return e.replace(g,"\\$&")},t.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}},57007:(e,t,r)=>{"use strict";t.parseLinkLabel=r(82174),t.parseLinkDestination=r(36990),t.parseLinkTitle=r(15336)},36990:(e,t,r)=>{"use strict";var n=r(39615).unescapeAll;e.exports=function(e,t,r){var a,o,s=t,i={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(t)){for(t++;t<r;){if(10===(a=e.charCodeAt(t)))return i;if(60===a)return i;if(62===a)return i.pos=t+1,i.str=n(e.slice(s+1,t)),i.ok=!0,i;92===a&&t+1<r?t+=2:t++}return i}for(o=0;t<r&&32!==(a=e.charCodeAt(t))&&!(a<32||127===a);)if(92===a&&t+1<r){if(32===e.charCodeAt(t+1))break;t+=2}else{if(40===a&&++o>32)return i;if(41===a){if(0===o)break;o--}t++}return s===t||0!==o||(i.str=n(e.slice(s,t)),i.lines=0,i.pos=t,i.ok=!0),i}},82174:e=>{"use strict";e.exports=function(e,t,r){var n,a,o,s,i=-1,l=e.posMax,c=e.pos;for(e.pos=t+1,n=1;e.pos<l;){if(93===(o=e.src.charCodeAt(e.pos))&&0===--n){a=!0;break}if(s=e.pos,e.md.inline.skipToken(e),91===o)if(s===e.pos-1)n++;else if(r)return e.pos=c,-1}return a&&(i=e.pos),e.pos=c,i}},15336:(e,t,r)=>{"use strict";var n=r(39615).unescapeAll;e.exports=function(e,t,r){var a,o,s=0,i=t,l={ok:!1,pos:0,lines:0,str:""};if(t>=r)return l;if(34!==(o=e.charCodeAt(t))&&39!==o&&40!==o)return l;for(t++,40===o&&(o=41);t<r;){if((a=e.charCodeAt(t))===o)return l.pos=t+1,l.lines=s,l.str=n(e.slice(i+1,t)),l.ok=!0,l;if(40===a&&41===o)return l;10===a?s++:92===a&&t+1<r&&(t++,10===e.charCodeAt(t)&&s++),t++}return l}},9702:(e,t,r)=>{"use strict";var n=r(39615),a=r(57007),o=r(42403),s=r(17742),i=r(99575),l=r(37487),c=r(62232),u=r(49236),d=r(60300),p={default:r(66223),zero:r(11582),commonmark:r(9372)},m=/^(vbscript|javascript|file|data):/,h=/^data:image\/(gif|png|jpeg|webp);/;function g(e){var t=e.trim().toLowerCase();return!m.test(t)||!!h.test(t)}var f=["http:","https:","mailto:"];function b(e){var t=u.parse(e,!0);if(t.hostname&&(!t.protocol||f.indexOf(t.protocol)>=0))try{t.hostname=d.toASCII(t.hostname)}catch(e){}return u.encode(u.format(t))}function v(e){var t=u.parse(e,!0);if(t.hostname&&(!t.protocol||f.indexOf(t.protocol)>=0))try{t.hostname=d.toUnicode(t.hostname)}catch(e){}return u.decode(u.format(t),u.decode.defaultChars+"%")}function k(e,t){if(!(this instanceof k))return new k(e,t);t||n.isString(e)||(t=e||{},e="default"),this.inline=new l,this.block=new i,this.core=new s,this.renderer=new o,this.linkify=new c,this.validateLink=g,this.normalizeLink=b,this.normalizeLinkText=v,this.utils=n,this.helpers=n.assign({},a),this.options={},this.configure(e),t&&this.set(t)}k.prototype.set=function(e){return n.assign(this.options,e),this},k.prototype.configure=function(e){var t,r=this;if(n.isString(e)&&!(e=p[t=e]))throw new Error('Wrong `markdown-it` preset "'+t+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&r.set(e.options),e.components&&Object.keys(e.components).forEach((function(t){e.components[t].rules&&r[t].ruler.enableOnly(e.components[t].rules),e.components[t].rules2&&r[t].ruler2.enableOnly(e.components[t].rules2)})),this},k.prototype.enable=function(e,t){var r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){r=r.concat(this[t].ruler.enable(e,!0))}),this),r=r.concat(this.inline.ruler2.enable(e,!0));var n=e.filter((function(e){return r.indexOf(e)<0}));if(n.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},k.prototype.disable=function(e,t){var r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){r=r.concat(this[t].ruler.disable(e,!0))}),this),r=r.concat(this.inline.ruler2.disable(e,!0));var n=e.filter((function(e){return r.indexOf(e)<0}));if(n.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},k.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},k.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");var r=new this.core.State(e,this,t);return this.core.process(r),r.tokens},k.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},k.prototype.parseInline=function(e,t){var r=new this.core.State(e,this,t);return r.inlineMode=!0,this.core.process(r),r.tokens},k.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},e.exports=k},99575:(e,t,r)=>{"use strict";var n=r(81377),a=[["table",r(12592),["paragraph","reference"]],["code",r(99334)],["fence",r(79783),["paragraph","reference","blockquote","list"]],["blockquote",r(36901),["paragraph","reference","blockquote","list"]],["hr",r(68837),["paragraph","reference","blockquote","list"]],["list",r(46388),["paragraph","reference","blockquote"]],["reference",r(33765)],["html_block",r(33869),["paragraph","reference","blockquote"]],["heading",r(21127),["paragraph","reference","blockquote"]],["lheading",r(5393)],["paragraph",r(24934)]];function o(){this.ruler=new n;for(var e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1],{alt:(a[e][2]||[]).slice()})}o.prototype.tokenize=function(e,t,r){for(var n,a=this.ruler.getRules(""),o=a.length,s=t,i=!1,l=e.md.options.maxNesting;s<r&&(e.line=s=e.skipEmptyLines(s),!(s>=r))&&!(e.sCount[s]<e.blkIndent);){if(e.level>=l){e.line=r;break}for(n=0;n<o&&!a[n](e,s,r,!1);n++);e.tight=!i,e.isEmpty(e.line-1)&&(i=!0),(s=e.line)<r&&e.isEmpty(s)&&(i=!0,s++,e.line=s)}},o.prototype.parse=function(e,t,r,n){var a;e&&(a=new this.State(e,t,r,n),this.tokenize(a,a.line,a.lineMax))},o.prototype.State=r(75355),e.exports=o},17742:(e,t,r)=>{"use strict";var n=r(81377),a=[["normalize",r(13837)],["block",r(30884)],["inline",r(25334)],["linkify",r(64756)],["replacements",r(60555)],["smartquotes",r(28867)]];function o(){this.ruler=new n;for(var e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1])}o.prototype.process=function(e){var t,r,n;for(t=0,r=(n=this.ruler.getRules("")).length;t<r;t++)n[t](e)},o.prototype.State=r(30727),e.exports=o},37487:(e,t,r)=>{"use strict";var n=r(81377),a=[["text",r(10937)],["newline",r(62378)],["escape",r(8329)],["backticks",r(7912)],["strikethrough",r(54988).w],["emphasis",r(56141).w],["link",r(95028)],["image",r(92560)],["autolink",r(73273)],["html_inline",r(9955)],["entity",r(54408)]],o=[["balance_pairs",r(76399)],["strikethrough",r(54988).g],["emphasis",r(56141).g],["text_collapse",r(52406)]];function s(){var e;for(this.ruler=new n,e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1]);for(this.ruler2=new n,e=0;e<o.length;e++)this.ruler2.push(o[e][0],o[e][1])}s.prototype.skipToken=function(e){var t,r,n=e.pos,a=this.ruler.getRules(""),o=a.length,s=e.md.options.maxNesting,i=e.cache;if(void 0===i[n]){if(e.level<s)for(r=0;r<o&&(e.level++,t=a[r](e,!0),e.level--,!t);r++);else e.pos=e.posMax;t||e.pos++,i[n]=e.pos}else e.pos=i[n]},s.prototype.tokenize=function(e){for(var t,r,n=this.ruler.getRules(""),a=n.length,o=e.posMax,s=e.md.options.maxNesting;e.pos<o;){if(e.level<s)for(r=0;r<a&&!(t=n[r](e,!1));r++);if(t){if(e.pos>=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},s.prototype.parse=function(e,t,r,n){var a,o,s,i=new this.State(e,t,r,n);for(this.tokenize(i),s=(o=this.ruler2.getRules("")).length,a=0;a<s;a++)o[a](i)},s.prototype.State=r(25240),e.exports=s},9372:e=>{"use strict";e.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},66223:e=>{"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},11582:e=>{"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},42403:(e,t,r)=>{"use strict";var n=r(39615).assign,a=r(39615).unescapeAll,o=r(39615).escapeHtml,s={};function i(){this.rules=n({},s)}s.code_inline=function(e,t,r,n,a){var s=e[t];return"<code"+a.renderAttrs(s)+">"+o(e[t].content)+"</code>"},s.code_block=function(e,t,r,n,a){var s=e[t];return"<pre"+a.renderAttrs(s)+"><code>"+o(e[t].content)+"</code></pre>\n"},s.fence=function(e,t,r,n,s){var i,l,c,u,d,p=e[t],m=p.info?a(p.info).trim():"",h="",g="";return m&&(h=(c=m.split(/(\s+)/g))[0],g=c.slice(2).join("")),0===(i=r.highlight&&r.highlight(p.content,h,g)||o(p.content)).indexOf("<pre")?i+"\n":m?(l=p.attrIndex("class"),u=p.attrs?p.attrs.slice():[],l<0?u.push(["class",r.langPrefix+h]):(u[l]=u[l].slice(),u[l][1]+=" "+r.langPrefix+h),d={attrs:u},"<pre><code"+s.renderAttrs(d)+">"+i+"</code></pre>\n"):"<pre><code"+s.renderAttrs(p)+">"+i+"</code></pre>\n"},s.image=function(e,t,r,n,a){var o=e[t];return o.attrs[o.attrIndex("alt")][1]=a.renderInlineAsText(o.children,r,n),a.renderToken(e,t,r)},s.hardbreak=function(e,t,r){return r.xhtmlOut?"<br />\n":"<br>\n"},s.softbreak=function(e,t,r){return r.breaks?r.xhtmlOut?"<br />\n":"<br>\n":"\n"},s.text=function(e,t){return o(e[t].content)},s.html_block=function(e,t){return e[t].content},s.html_inline=function(e,t){return e[t].content},i.prototype.renderAttrs=function(e){var t,r,n;if(!e.attrs)return"";for(n="",t=0,r=e.attrs.length;t<r;t++)n+=" "+o(e.attrs[t][0])+'="'+o(e.attrs[t][1])+'"';return n},i.prototype.renderToken=function(e,t,r){var n,a="",o=!1,s=e[t];return s.hidden?"":(s.block&&-1!==s.nesting&&t&&e[t-1].hidden&&(a+="\n"),a+=(-1===s.nesting?"</":"<")+s.tag,a+=this.renderAttrs(s),0===s.nesting&&r.xhtmlOut&&(a+=" /"),s.block&&(o=!0,1===s.nesting&&t+1<e.length&&("inline"===(n=e[t+1]).type||n.hidden||-1===n.nesting&&n.tag===s.tag)&&(o=!1)),a+=o?">\n":">")},i.prototype.renderInline=function(e,t,r){for(var n,a="",o=this.rules,s=0,i=e.length;s<i;s++)void 0!==o[n=e[s].type]?a+=o[n](e,s,t,r,this):a+=this.renderToken(e,s,t);return a},i.prototype.renderInlineAsText=function(e,t,r){for(var n="",a=0,o=e.length;a<o;a++)"text"===e[a].type?n+=e[a].content:"image"===e[a].type?n+=this.renderInlineAsText(e[a].children,t,r):"softbreak"===e[a].type&&(n+="\n");return n},i.prototype.render=function(e,t,r){var n,a,o,s="",i=this.rules;for(n=0,a=e.length;n<a;n++)"inline"===(o=e[n].type)?s+=this.renderInline(e[n].children,t,r):void 0!==i[o]?s+=i[e[n].type](e,n,t,r,this):s+=this.renderToken(e,n,t,r);return s},e.exports=i},81377:e=>{"use strict";function t(){this.__rules__=[],this.__cache__=null}t.prototype.__find__=function(e){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},t.prototype.__compile__=function(){var e=this,t=[""];e.__rules__.forEach((function(e){e.enabled&&e.alt.forEach((function(e){t.indexOf(e)<0&&t.push(e)}))})),e.__cache__={},t.forEach((function(t){e.__cache__[t]=[],e.__rules__.forEach((function(r){r.enabled&&(t&&r.alt.indexOf(t)<0||e.__cache__[t].push(r.fn))}))}))},t.prototype.at=function(e,t,r){var n=this.__find__(e),a=r||{};if(-1===n)throw new Error("Parser rule not found: "+e);this.__rules__[n].fn=t,this.__rules__[n].alt=a.alt||[],this.__cache__=null},t.prototype.before=function(e,t,r,n){var a=this.__find__(e),o=n||{};if(-1===a)throw new Error("Parser rule not found: "+e);this.__rules__.splice(a,0,{name:t,enabled:!0,fn:r,alt:o.alt||[]}),this.__cache__=null},t.prototype.after=function(e,t,r,n){var a=this.__find__(e),o=n||{};if(-1===a)throw new Error("Parser rule not found: "+e);this.__rules__.splice(a+1,0,{name:t,enabled:!0,fn:r,alt:o.alt||[]}),this.__cache__=null},t.prototype.push=function(e,t,r){var n=r||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:n.alt||[]}),this.__cache__=null},t.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);var r=[];return e.forEach((function(e){var n=this.__find__(e);if(n<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!0,r.push(e)}),this),this.__cache__=null,r},t.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach((function(e){e.enabled=!1})),this.enable(e,t)},t.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);var r=[];return e.forEach((function(e){var n=this.__find__(e);if(n<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!1,r.push(e)}),this),this.__cache__=null,r},t.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},e.exports=t},36901:(e,t,r)=>{"use strict";var n=r(39615).isSpace;e.exports=function(e,t,r,a){var o,s,i,l,c,u,d,p,m,h,g,f,b,v,k,y,E,w,_,C,j=e.lineMax,S=e.bMarks[t]+e.tShift[t],x=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(S++))return!1;if(a)return!0;for(l=m=e.sCount[t]+1,32===e.src.charCodeAt(S)?(S++,l++,m++,o=!1,y=!0):9===e.src.charCodeAt(S)?(y=!0,(e.bsCount[t]+m)%4==3?(S++,l++,m++,o=!1):o=!0):y=!1,h=[e.bMarks[t]],e.bMarks[t]=S;S<x&&(s=e.src.charCodeAt(S),n(s));)9===s?m+=4-(m+e.bsCount[t]+(o?1:0))%4:m++,S++;for(g=[e.bsCount[t]],e.bsCount[t]=e.sCount[t]+1+(y?1:0),u=S>=x,v=[e.sCount[t]],e.sCount[t]=m-l,k=[e.tShift[t]],e.tShift[t]=S-e.bMarks[t],w=e.md.block.ruler.getRules("blockquote"),b=e.parentType,e.parentType="blockquote",p=t+1;p<r&&(C=e.sCount[p]<e.blkIndent,!((S=e.bMarks[p]+e.tShift[p])>=(x=e.eMarks[p])));p++)if(62!==e.src.charCodeAt(S++)||C){if(u)break;for(E=!1,i=0,c=w.length;i<c;i++)if(w[i](e,p,r,!0)){E=!0;break}if(E){e.lineMax=p,0!==e.blkIndent&&(h.push(e.bMarks[p]),g.push(e.bsCount[p]),k.push(e.tShift[p]),v.push(e.sCount[p]),e.sCount[p]-=e.blkIndent);break}h.push(e.bMarks[p]),g.push(e.bsCount[p]),k.push(e.tShift[p]),v.push(e.sCount[p]),e.sCount[p]=-1}else{for(l=m=e.sCount[p]+1,32===e.src.charCodeAt(S)?(S++,l++,m++,o=!1,y=!0):9===e.src.charCodeAt(S)?(y=!0,(e.bsCount[p]+m)%4==3?(S++,l++,m++,o=!1):o=!0):y=!1,h.push(e.bMarks[p]),e.bMarks[p]=S;S<x&&(s=e.src.charCodeAt(S),n(s));)9===s?m+=4-(m+e.bsCount[p]+(o?1:0))%4:m++,S++;u=S>=x,g.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+(y?1:0),v.push(e.sCount[p]),e.sCount[p]=m-l,k.push(e.tShift[p]),e.tShift[p]=S-e.bMarks[p]}for(f=e.blkIndent,e.blkIndent=0,(_=e.push("blockquote_open","blockquote",1)).markup=">",_.map=d=[t,0],e.md.block.tokenize(e,t,p),(_=e.push("blockquote_close","blockquote",-1)).markup=">",e.lineMax=j,e.parentType=b,d[1]=e.line,i=0;i<k.length;i++)e.bMarks[i+t]=h[i],e.tShift[i+t]=k[i],e.sCount[i+t]=v[i],e.bsCount[i+t]=g[i];return e.blkIndent=f,!0}},99334:e=>{"use strict";e.exports=function(e,t,r){var n,a,o;if(e.sCount[t]-e.blkIndent<4)return!1;for(a=n=t+1;n<r;)if(e.isEmpty(n))n++;else{if(!(e.sCount[n]-e.blkIndent>=4))break;a=++n}return e.line=a,(o=e.push("code_block","code",0)).content=e.getLines(t,a,4+e.blkIndent,!1)+"\n",o.map=[t,e.line],!0}},79783:e=>{"use strict";e.exports=function(e,t,r,n){var a,o,s,i,l,c,u,d=!1,p=e.bMarks[t]+e.tShift[t],m=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(p+3>m)return!1;if(126!==(a=e.src.charCodeAt(p))&&96!==a)return!1;if(l=p,(o=(p=e.skipChars(p,a))-l)<3)return!1;if(u=e.src.slice(l,p),s=e.src.slice(p,m),96===a&&s.indexOf(String.fromCharCode(a))>=0)return!1;if(n)return!0;for(i=t;!(++i>=r)&&!((p=l=e.bMarks[i]+e.tShift[i])<(m=e.eMarks[i])&&e.sCount[i]<e.blkIndent);)if(e.src.charCodeAt(p)===a&&!(e.sCount[i]-e.blkIndent>=4||(p=e.skipChars(p,a))-l<o||(p=e.skipSpaces(p))<m)){d=!0;break}return o=e.sCount[t],e.line=i+(d?1:0),(c=e.push("fence","code",0)).info=s,c.content=e.getLines(t+1,i,o,!0),c.markup=u,c.map=[t,e.line],!0}},21127:(e,t,r)=>{"use strict";var n=r(39615).isSpace;e.exports=function(e,t,r,a){var o,s,i,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(35!==(o=e.src.charCodeAt(c))||c>=u)return!1;for(s=1,o=e.src.charCodeAt(++c);35===o&&c<u&&s<=6;)s++,o=e.src.charCodeAt(++c);return!(s>6||c<u&&!n(o))&&(a||(u=e.skipSpacesBack(u,c),(i=e.skipCharsBack(u,35,c))>c&&n(e.src.charCodeAt(i-1))&&(u=i),e.line=t+1,(l=e.push("heading_open","h"+String(s),1)).markup="########".slice(0,s),l.map=[t,e.line],(l=e.push("inline","",0)).content=e.src.slice(c,u).trim(),l.map=[t,e.line],l.children=[],(l=e.push("heading_close","h"+String(s),-1)).markup="########".slice(0,s)),!0)}},68837:(e,t,r)=>{"use strict";var n=r(39615).isSpace;e.exports=function(e,t,r,a){var o,s,i,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(42!==(o=e.src.charCodeAt(c++))&&45!==o&&95!==o)return!1;for(s=1;c<u;){if((i=e.src.charCodeAt(c++))!==o&&!n(i))return!1;i===o&&s++}return!(s<3)&&(a||(e.line=t+1,(l=e.push("hr","hr",0)).map=[t,e.line],l.markup=Array(s+1).join(String.fromCharCode(o))),!0)}},33869:(e,t,r)=>{"use strict";var n=r(43093),a=r(36570).q,o=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+n.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(a.source+"\\s*$"),/^$/,!1]];e.exports=function(e,t,r,n){var a,s,i,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(c))return!1;for(l=e.src.slice(c,u),a=0;a<o.length&&!o[a][0].test(l);a++);if(a===o.length)return!1;if(n)return o[a][2];if(s=t+1,!o[a][1].test(l))for(;s<r&&!(e.sCount[s]<e.blkIndent);s++)if(c=e.bMarks[s]+e.tShift[s],u=e.eMarks[s],l=e.src.slice(c,u),o[a][1].test(l)){0!==l.length&&s++;break}return e.line=s,(i=e.push("html_block","",0)).map=[t,s],i.content=e.getLines(t,s,e.blkIndent,!0),!0}},5393:e=>{"use strict";e.exports=function(e,t,r){var n,a,o,s,i,l,c,u,d,p,m=t+1,h=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(p=e.parentType,e.parentType="paragraph";m<r&&!e.isEmpty(m);m++)if(!(e.sCount[m]-e.blkIndent>3)){if(e.sCount[m]>=e.blkIndent&&(l=e.bMarks[m]+e.tShift[m])<(c=e.eMarks[m])&&(45===(d=e.src.charCodeAt(l))||61===d)&&(l=e.skipChars(l,d),(l=e.skipSpaces(l))>=c)){u=61===d?1:2;break}if(!(e.sCount[m]<0)){for(a=!1,o=0,s=h.length;o<s;o++)if(h[o](e,m,r,!0)){a=!0;break}if(a)break}}return!!u&&(n=e.getLines(t,m,e.blkIndent,!1).trim(),e.line=m+1,(i=e.push("heading_open","h"+String(u),1)).markup=String.fromCharCode(d),i.map=[t,e.line],(i=e.push("inline","",0)).content=n,i.map=[t,e.line-1],i.children=[],(i=e.push("heading_close","h"+String(u),-1)).markup=String.fromCharCode(d),e.parentType=p,!0)}},46388:(e,t,r)=>{"use strict";var n=r(39615).isSpace;function a(e,t){var r,a,o,s;return a=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],42!==(r=e.src.charCodeAt(a++))&&45!==r&&43!==r||a<o&&(s=e.src.charCodeAt(a),!n(s))?-1:a}function o(e,t){var r,a=e.bMarks[t]+e.tShift[t],o=a,s=e.eMarks[t];if(o+1>=s)return-1;if((r=e.src.charCodeAt(o++))<48||r>57)return-1;for(;;){if(o>=s)return-1;if(!((r=e.src.charCodeAt(o++))>=48&&r<=57)){if(41===r||46===r)break;return-1}if(o-a>=10)return-1}return o<s&&(r=e.src.charCodeAt(o),!n(r))?-1:o}e.exports=function(e,t,r,n){var s,i,l,c,u,d,p,m,h,g,f,b,v,k,y,E,w,_,C,j,S,x,P,T,L,N,A,R,I=!1,M=!0;if(e.sCount[t]-e.blkIndent>=4)return!1;if(e.listIndent>=0&&e.sCount[t]-e.listIndent>=4&&e.sCount[t]<e.blkIndent)return!1;if(n&&"paragraph"===e.parentType&&e.sCount[t]>=e.blkIndent&&(I=!0),(P=o(e,t))>=0){if(p=!0,L=e.bMarks[t]+e.tShift[t],v=Number(e.src.slice(L,P-1)),I&&1!==v)return!1}else{if(!((P=a(e,t))>=0))return!1;p=!1}if(I&&e.skipSpaces(P)>=e.eMarks[t])return!1;if(b=e.src.charCodeAt(P-1),n)return!0;for(f=e.tokens.length,p?(R=e.push("ordered_list_open","ol",1),1!==v&&(R.attrs=[["start",v]])):R=e.push("bullet_list_open","ul",1),R.map=g=[t,0],R.markup=String.fromCharCode(b),y=t,T=!1,A=e.md.block.ruler.getRules("list"),_=e.parentType,e.parentType="list";y<r;){for(x=P,k=e.eMarks[y],d=E=e.sCount[y]+P-(e.bMarks[t]+e.tShift[t]);x<k;){if(9===(s=e.src.charCodeAt(x)))E+=4-(E+e.bsCount[y])%4;else{if(32!==s)break;E++}x++}if((u=(i=x)>=k?1:E-d)>4&&(u=1),c=d+u,(R=e.push("list_item_open","li",1)).markup=String.fromCharCode(b),R.map=m=[t,0],p&&(R.info=e.src.slice(L,P-1)),S=e.tight,j=e.tShift[t],C=e.sCount[t],w=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=c,e.tight=!0,e.tShift[t]=i-e.bMarks[t],e.sCount[t]=E,i>=k&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,r):e.md.block.tokenize(e,t,r,!0),e.tight&&!T||(M=!1),T=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=w,e.tShift[t]=j,e.sCount[t]=C,e.tight=S,(R=e.push("list_item_close","li",-1)).markup=String.fromCharCode(b),y=t=e.line,m[1]=y,i=e.bMarks[t],y>=r)break;if(e.sCount[y]<e.blkIndent)break;if(e.sCount[t]-e.blkIndent>=4)break;for(N=!1,l=0,h=A.length;l<h;l++)if(A[l](e,y,r,!0)){N=!0;break}if(N)break;if(p){if((P=o(e,y))<0)break;L=e.bMarks[y]+e.tShift[y]}else if((P=a(e,y))<0)break;if(b!==e.src.charCodeAt(P-1))break}return(R=p?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1)).markup=String.fromCharCode(b),g[1]=y,e.line=y,e.parentType=_,M&&function(e,t){var r,n,a=e.level+2;for(r=t+2,n=e.tokens.length-2;r<n;r++)e.tokens[r].level===a&&"paragraph_open"===e.tokens[r].type&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}(e,f),!0}},24934:e=>{"use strict";e.exports=function(e,t){var r,n,a,o,s,i,l=t+1,c=e.md.block.ruler.getRules("paragraph"),u=e.lineMax;for(i=e.parentType,e.parentType="paragraph";l<u&&!e.isEmpty(l);l++)if(!(e.sCount[l]-e.blkIndent>3||e.sCount[l]<0)){for(n=!1,a=0,o=c.length;a<o;a++)if(c[a](e,l,u,!0)){n=!0;break}if(n)break}return r=e.getLines(t,l,e.blkIndent,!1).trim(),e.line=l,(s=e.push("paragraph_open","p",1)).map=[t,e.line],(s=e.push("inline","",0)).content=r,s.map=[t,e.line],s.children=[],s=e.push("paragraph_close","p",-1),e.parentType=i,!0}},33765:(e,t,r)=>{"use strict";var n=r(39615).normalizeReference,a=r(39615).isSpace;e.exports=function(e,t,r,o){var s,i,l,c,u,d,p,m,h,g,f,b,v,k,y,E,w=0,_=e.bMarks[t]+e.tShift[t],C=e.eMarks[t],j=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(91!==e.src.charCodeAt(_))return!1;for(;++_<C;)if(93===e.src.charCodeAt(_)&&92!==e.src.charCodeAt(_-1)){if(_+1===C)return!1;if(58!==e.src.charCodeAt(_+1))return!1;break}for(c=e.lineMax,y=e.md.block.ruler.getRules("reference"),g=e.parentType,e.parentType="reference";j<c&&!e.isEmpty(j);j++)if(!(e.sCount[j]-e.blkIndent>3||e.sCount[j]<0)){for(k=!1,d=0,p=y.length;d<p;d++)if(y[d](e,j,c,!0)){k=!0;break}if(k)break}for(C=(v=e.getLines(t,j,e.blkIndent,!1).trim()).length,_=1;_<C;_++){if(91===(s=v.charCodeAt(_)))return!1;if(93===s){h=_;break}(10===s||92===s&&++_<C&&10===v.charCodeAt(_))&&w++}if(h<0||58!==v.charCodeAt(h+1))return!1;for(_=h+2;_<C;_++)if(10===(s=v.charCodeAt(_)))w++;else if(!a(s))break;if(!(f=e.md.helpers.parseLinkDestination(v,_,C)).ok)return!1;if(u=e.md.normalizeLink(f.str),!e.md.validateLink(u))return!1;for(i=_=f.pos,l=w+=f.lines,b=_;_<C;_++)if(10===(s=v.charCodeAt(_)))w++;else if(!a(s))break;for(f=e.md.helpers.parseLinkTitle(v,_,C),_<C&&b!==_&&f.ok?(E=f.str,_=f.pos,w+=f.lines):(E="",_=i,w=l);_<C&&(s=v.charCodeAt(_),a(s));)_++;if(_<C&&10!==v.charCodeAt(_)&&E)for(E="",_=i,w=l;_<C&&(s=v.charCodeAt(_),a(s));)_++;return!(_<C&&10!==v.charCodeAt(_))&&(!!(m=n(v.slice(1,h)))&&(o||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[m]&&(e.env.references[m]={title:E,href:u}),e.parentType=g,e.line=t+w+1),!0))}},75355:(e,t,r)=>{"use strict";var n=r(71872),a=r(39615).isSpace;function o(e,t,r,n){var o,s,i,l,c,u,d,p;for(this.src=e,this.md=t,this.env=r,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",p=!1,i=l=u=d=0,c=(s=this.src).length;l<c;l++){if(o=s.charCodeAt(l),!p){if(a(o)){u++,9===o?d+=4-d%4:d++;continue}p=!0}10!==o&&l!==c-1||(10!==o&&l++,this.bMarks.push(i),this.eMarks.push(l),this.tShift.push(u),this.sCount.push(d),this.bsCount.push(0),p=!1,u=0,d=0,i=l+1)}this.bMarks.push(s.length),this.eMarks.push(s.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}o.prototype.push=function(e,t,r){var a=new n(e,t,r);return a.block=!0,r<0&&this.level--,a.level=this.level,r>0&&this.level++,this.tokens.push(a),a},o.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},o.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},o.prototype.skipSpaces=function(e){for(var t,r=this.src.length;e<r&&(t=this.src.charCodeAt(e),a(t));e++);return e},o.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!a(this.src.charCodeAt(--e)))return e+1;return e},o.prototype.skipChars=function(e,t){for(var r=this.src.length;e<r&&this.src.charCodeAt(e)===t;e++);return e},o.prototype.skipCharsBack=function(e,t,r){if(e<=r)return e;for(;e>r;)if(t!==this.src.charCodeAt(--e))return e+1;return e},o.prototype.getLines=function(e,t,r,n){var o,s,i,l,c,u,d,p=e;if(e>=t)return"";for(u=new Array(t-e),o=0;p<t;p++,o++){for(s=0,d=l=this.bMarks[p],c=p+1<t||n?this.eMarks[p]+1:this.eMarks[p];l<c&&s<r;){if(i=this.src.charCodeAt(l),a(i))9===i?s+=4-(s+this.bsCount[p])%4:s++;else{if(!(l-d<this.tShift[p]))break;s++}l++}u[o]=s>r?new Array(s-r+1).join(" ")+this.src.slice(l,c):this.src.slice(l,c)}return u.join("")},o.prototype.Token=n,e.exports=o},12592:(e,t,r)=>{"use strict";var n=r(39615).isSpace;function a(e,t){var r=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];return e.src.substr(r,n-r)}function o(e){var t,r=[],n=0,a=e.length,o=!1,s=0,i="";for(t=e.charCodeAt(n);n<a;)124===t&&(o?(i+=e.substring(s,n-1),s=n):(r.push(i+e.substring(s,n)),i="",s=n+1)),o=92===t,n++,t=e.charCodeAt(n);return r.push(i+e.substring(s)),r}e.exports=function(e,t,r,s){var i,l,c,u,d,p,m,h,g,f,b,v,k,y,E,w,_,C;if(t+2>r)return!1;if(p=t+1,e.sCount[p]<e.blkIndent)return!1;if(e.sCount[p]-e.blkIndent>=4)return!1;if((c=e.bMarks[p]+e.tShift[p])>=e.eMarks[p])return!1;if(124!==(_=e.src.charCodeAt(c++))&&45!==_&&58!==_)return!1;if(c>=e.eMarks[p])return!1;if(124!==(C=e.src.charCodeAt(c++))&&45!==C&&58!==C&&!n(C))return!1;if(45===_&&n(C))return!1;for(;c<e.eMarks[p];){if(124!==(i=e.src.charCodeAt(c))&&45!==i&&58!==i&&!n(i))return!1;c++}for(m=(l=a(e,t+1)).split("|"),f=[],u=0;u<m.length;u++){if(!(b=m[u].trim())){if(0===u||u===m.length-1)continue;return!1}if(!/^:?-+:?$/.test(b))return!1;58===b.charCodeAt(b.length-1)?f.push(58===b.charCodeAt(0)?"center":"right"):58===b.charCodeAt(0)?f.push("left"):f.push("")}if(-1===(l=a(e,t).trim()).indexOf("|"))return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;if((m=o(l)).length&&""===m[0]&&m.shift(),m.length&&""===m[m.length-1]&&m.pop(),0===(h=m.length)||h!==f.length)return!1;if(s)return!0;for(y=e.parentType,e.parentType="table",w=e.md.block.ruler.getRules("blockquote"),(g=e.push("table_open","table",1)).map=v=[t,0],(g=e.push("thead_open","thead",1)).map=[t,t+1],(g=e.push("tr_open","tr",1)).map=[t,t+1],u=0;u<m.length;u++)g=e.push("th_open","th",1),f[u]&&(g.attrs=[["style","text-align:"+f[u]]]),(g=e.push("inline","",0)).content=m[u].trim(),g.children=[],g=e.push("th_close","th",-1);for(g=e.push("tr_close","tr",-1),g=e.push("thead_close","thead",-1),p=t+2;p<r&&!(e.sCount[p]<e.blkIndent);p++){for(E=!1,u=0,d=w.length;u<d;u++)if(w[u](e,p,r,!0)){E=!0;break}if(E)break;if(!(l=a(e,p).trim()))break;if(e.sCount[p]-e.blkIndent>=4)break;for((m=o(l)).length&&""===m[0]&&m.shift(),m.length&&""===m[m.length-1]&&m.pop(),p===t+2&&((g=e.push("tbody_open","tbody",1)).map=k=[t+2,0]),(g=e.push("tr_open","tr",1)).map=[p,p+1],u=0;u<h;u++)g=e.push("td_open","td",1),f[u]&&(g.attrs=[["style","text-align:"+f[u]]]),(g=e.push("inline","",0)).content=m[u]?m[u].trim():"",g.children=[],g=e.push("td_close","td",-1);g=e.push("tr_close","tr",-1)}return k&&(g=e.push("tbody_close","tbody",-1),k[1]=p),g=e.push("table_close","table",-1),v[1]=p,e.parentType=y,e.line=p,!0}},30884:e=>{"use strict";e.exports=function(e){var t;e.inlineMode?((t=new e.Token("inline","",0)).content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}},25334:e=>{"use strict";e.exports=function(e){var t,r,n,a=e.tokens;for(r=0,n=a.length;r<n;r++)"inline"===(t=a[r]).type&&e.md.inline.parse(t.content,e.md,e.env,t.children)}},64756:(e,t,r)=>{"use strict";var n=r(39615).arrayReplaceAt;function a(e){return/^<\/a\s*>/i.test(e)}e.exports=function(e){var t,r,o,s,i,l,c,u,d,p,m,h,g,f,b,v,k,y,E=e.tokens;if(e.md.options.linkify)for(r=0,o=E.length;r<o;r++)if("inline"===E[r].type&&e.md.linkify.pretest(E[r].content))for(g=0,t=(s=E[r].children).length-1;t>=0;t--)if("link_close"!==(l=s[t]).type){if("html_inline"===l.type&&(y=l.content,/^<a[>\s]/i.test(y)&&g>0&&g--,a(l.content)&&g++),!(g>0)&&"text"===l.type&&e.md.linkify.test(l.content)){for(d=l.content,k=e.md.linkify.match(d),c=[],h=l.level,m=0,u=0;u<k.length;u++)f=k[u].url,b=e.md.normalizeLink(f),e.md.validateLink(b)&&(v=k[u].text,v=k[u].schema?"mailto:"!==k[u].schema||/^mailto:/i.test(v)?e.md.normalizeLinkText(v):e.md.normalizeLinkText("mailto:"+v).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+v).replace(/^http:\/\//,""),(p=k[u].index)>m&&((i=new e.Token("text","",0)).content=d.slice(m,p),i.level=h,c.push(i)),(i=new e.Token("link_open","a",1)).attrs=[["href",b]],i.level=h++,i.markup="linkify",i.info="auto",c.push(i),(i=new e.Token("text","",0)).content=v,i.level=h,c.push(i),(i=new e.Token("link_close","a",-1)).level=--h,i.markup="linkify",i.info="auto",c.push(i),m=k[u].lastIndex);m<d.length&&((i=new e.Token("text","",0)).content=d.slice(m),i.level=h,c.push(i)),E[r].children=s=n(s,t,c)}}else for(t--;s[t].level!==l.level&&"link_open"!==s[t].type;)t--}},13837:e=>{"use strict";var t=/\r\n?|\n/g,r=/\0/g;e.exports=function(e){var n;n=(n=e.src.replace(t,"\n")).replace(r,"�"),e.src=n}},60555:e=>{"use strict";var t=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,r=/\((c|tm|r|p)\)/i,n=/\((c|tm|r|p)\)/gi,a={c:"©",r:"®",p:"§",tm:"™"};function o(e,t){return a[t.toLowerCase()]}function s(e){var t,r,a=0;for(t=e.length-1;t>=0;t--)"text"!==(r=e[t]).type||a||(r.content=r.content.replace(n,o)),"link_open"===r.type&&"auto"===r.info&&a--,"link_close"===r.type&&"auto"===r.info&&a++}function i(e){var r,n,a=0;for(r=e.length-1;r>=0;r--)"text"!==(n=e[r]).type||a||t.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===n.type&&"auto"===n.info&&a--,"link_close"===n.type&&"auto"===n.info&&a++}e.exports=function(e){var n;if(e.md.options.typographer)for(n=e.tokens.length-1;n>=0;n--)"inline"===e.tokens[n].type&&(r.test(e.tokens[n].content)&&s(e.tokens[n].children),t.test(e.tokens[n].content)&&i(e.tokens[n].children))}},28867:(e,t,r)=>{"use strict";var n=r(39615).isWhiteSpace,a=r(39615).isPunctChar,o=r(39615).isMdAsciiPunct,s=/['"]/,i=/['"]/g;function l(e,t,r){return e.substr(0,t)+r+e.substr(t+1)}function c(e,t){var r,s,c,u,d,p,m,h,g,f,b,v,k,y,E,w,_,C,j,S,x;for(j=[],r=0;r<e.length;r++){for(s=e[r],m=e[r].level,_=j.length-1;_>=0&&!(j[_].level<=m);_--);if(j.length=_+1,"text"===s.type){d=0,p=(c=s.content).length;e:for(;d<p&&(i.lastIndex=d,u=i.exec(c));){if(E=w=!0,d=u.index+1,C="'"===u[0],g=32,u.index-1>=0)g=c.charCodeAt(u.index-1);else for(_=r-1;_>=0&&("softbreak"!==e[_].type&&"hardbreak"!==e[_].type);_--)if(e[_].content){g=e[_].content.charCodeAt(e[_].content.length-1);break}if(f=32,d<p)f=c.charCodeAt(d);else for(_=r+1;_<e.length&&("softbreak"!==e[_].type&&"hardbreak"!==e[_].type);_++)if(e[_].content){f=e[_].content.charCodeAt(0);break}if(b=o(g)||a(String.fromCharCode(g)),v=o(f)||a(String.fromCharCode(f)),k=n(g),(y=n(f))?E=!1:v&&(k||b||(E=!1)),k?w=!1:b&&(y||v||(w=!1)),34===f&&'"'===u[0]&&g>=48&&g<=57&&(w=E=!1),E&&w&&(E=b,w=v),E||w){if(w)for(_=j.length-1;_>=0&&(h=j[_],!(j[_].level<m));_--)if(h.single===C&&j[_].level===m){h=j[_],C?(S=t.md.options.quotes[2],x=t.md.options.quotes[3]):(S=t.md.options.quotes[0],x=t.md.options.quotes[1]),s.content=l(s.content,u.index,x),e[h.token].content=l(e[h.token].content,h.pos,S),d+=x.length-1,h.token===r&&(d+=S.length-1),p=(c=s.content).length,j.length=_;continue e}E?j.push({token:r,pos:u.index,single:C,level:m}):w&&C&&(s.content=l(s.content,u.index,"’"))}else C&&(s.content=l(s.content,u.index,"’"))}}}}e.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&s.test(e.tokens[t].content)&&c(e.tokens[t].children,e)}},30727:(e,t,r)=>{"use strict";var n=r(71872);function a(e,t,r){this.src=e,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=t}a.prototype.Token=n,e.exports=a},73273:e=>{"use strict";var t=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,r=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/;e.exports=function(e,n){var a,o,s,i,l,c,u=e.pos;if(60!==e.src.charCodeAt(u))return!1;for(l=e.pos,c=e.posMax;;){if(++u>=c)return!1;if(60===(i=e.src.charCodeAt(u)))return!1;if(62===i)break}return a=e.src.slice(l+1,u),r.test(a)?(o=e.md.normalizeLink(a),!!e.md.validateLink(o)&&(n||((s=e.push("link_open","a",1)).attrs=[["href",o]],s.markup="autolink",s.info="auto",(s=e.push("text","",0)).content=e.md.normalizeLinkText(a),(s=e.push("link_close","a",-1)).markup="autolink",s.info="auto"),e.pos+=a.length+2,!0)):!!t.test(a)&&(o=e.md.normalizeLink("mailto:"+a),!!e.md.validateLink(o)&&(n||((s=e.push("link_open","a",1)).attrs=[["href",o]],s.markup="autolink",s.info="auto",(s=e.push("text","",0)).content=e.md.normalizeLinkText(a),(s=e.push("link_close","a",-1)).markup="autolink",s.info="auto"),e.pos+=a.length+2,!0))}},7912:e=>{"use strict";e.exports=function(e,t){var r,n,a,o,s,i,l,c,u=e.pos;if(96!==e.src.charCodeAt(u))return!1;for(r=u,u++,n=e.posMax;u<n&&96===e.src.charCodeAt(u);)u++;if(l=(a=e.src.slice(r,u)).length,e.backticksScanned&&(e.backticks[l]||0)<=r)return t||(e.pending+=a),e.pos+=l,!0;for(s=i=u;-1!==(s=e.src.indexOf("`",i));){for(i=s+1;i<n&&96===e.src.charCodeAt(i);)i++;if((c=i-s)===l)return t||((o=e.push("code_inline","code",0)).markup=a,o.content=e.src.slice(u,s).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),e.pos=i,!0;e.backticks[c]=s}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=l,!0}},76399:e=>{"use strict";function t(e,t){var r,n,a,o,s,i,l,c,u={},d=t.length;if(d){var p=0,m=-2,h=[];for(r=0;r<d;r++)if(a=t[r],h.push(0),t[p].marker===a.marker&&m===a.token-1||(p=r),m=a.token,a.length=a.length||0,a.close){for(u.hasOwnProperty(a.marker)||(u[a.marker]=[-1,-1,-1,-1,-1,-1]),s=u[a.marker][(a.open?3:0)+a.length%3],i=n=p-h[p]-1;n>s;n-=h[n]+1)if((o=t[n]).marker===a.marker&&o.open&&o.end<0&&(l=!1,(o.close||a.open)&&(o.length+a.length)%3==0&&(o.length%3==0&&a.length%3==0||(l=!0)),!l)){c=n>0&&!t[n-1].open?h[n-1]+1:0,h[r]=r-n+c,h[n]=c,a.open=!1,o.end=r,o.close=!1,i=-1,m=-2;break}-1!==i&&(u[a.marker][(a.open?3:0)+(a.length||0)%3]=i)}}}e.exports=function(e){var r,n=e.tokens_meta,a=e.tokens_meta.length;for(t(0,e.delimiters),r=0;r<a;r++)n[r]&&n[r].delimiters&&t(0,n[r].delimiters)}},56141:e=>{"use strict";function t(e,t){var r,n,a,o,s,i;for(r=t.length-1;r>=0;r--)95!==(n=t[r]).marker&&42!==n.marker||-1!==n.end&&(a=t[n.end],i=r>0&&t[r-1].end===n.end+1&&t[r-1].marker===n.marker&&t[r-1].token===n.token-1&&t[n.end+1].token===a.token+1,s=String.fromCharCode(n.marker),(o=e.tokens[n.token]).type=i?"strong_open":"em_open",o.tag=i?"strong":"em",o.nesting=1,o.markup=i?s+s:s,o.content="",(o=e.tokens[a.token]).type=i?"strong_close":"em_close",o.tag=i?"strong":"em",o.nesting=-1,o.markup=i?s+s:s,o.content="",i&&(e.tokens[t[r-1].token].content="",e.tokens[t[n.end+1].token].content="",r--))}e.exports.w=function(e,t){var r,n,a=e.pos,o=e.src.charCodeAt(a);if(t)return!1;if(95!==o&&42!==o)return!1;for(n=e.scanDelims(e.pos,42===o),r=0;r<n.length;r++)e.push("text","",0).content=String.fromCharCode(o),e.delimiters.push({marker:o,length:n.length,token:e.tokens.length-1,end:-1,open:n.can_open,close:n.can_close});return e.pos+=n.length,!0},e.exports.g=function(e){var r,n=e.tokens_meta,a=e.tokens_meta.length;for(t(e,e.delimiters),r=0;r<a;r++)n[r]&&n[r].delimiters&&t(e,n[r].delimiters)}},54408:(e,t,r)=>{"use strict";var n=r(38337),a=r(39615).has,o=r(39615).isValidEntityCode,s=r(39615).fromCodePoint,i=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,l=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var r,c,u=e.pos,d=e.posMax;if(38!==e.src.charCodeAt(u))return!1;if(u+1<d)if(35===e.src.charCodeAt(u+1)){if(c=e.src.slice(u).match(i))return t||(r="x"===c[1][0].toLowerCase()?parseInt(c[1].slice(1),16):parseInt(c[1],10),e.pending+=o(r)?s(r):s(65533)),e.pos+=c[0].length,!0}else if((c=e.src.slice(u).match(l))&&a(n,c[1]))return t||(e.pending+=n[c[1]]),e.pos+=c[0].length,!0;return t||(e.pending+="&"),e.pos++,!0}},8329:(e,t,r)=>{"use strict";for(var n=r(39615).isSpace,a=[],o=0;o<256;o++)a.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(e){a[e.charCodeAt(0)]=1})),e.exports=function(e,t){var r,o=e.pos,s=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(++o<s){if((r=e.src.charCodeAt(o))<256&&0!==a[r])return t||(e.pending+=e.src[o]),e.pos+=2,!0;if(10===r){for(t||e.push("hardbreak","br",0),o++;o<s&&(r=e.src.charCodeAt(o),n(r));)o++;return e.pos=o,!0}}return t||(e.pending+="\\"),e.pos++,!0}},9955:(e,t,r)=>{"use strict";var n=r(36570).n;e.exports=function(e,t){var r,a,o,s=e.pos;return!!e.md.options.html&&(o=e.posMax,!(60!==e.src.charCodeAt(s)||s+2>=o)&&(!(33!==(r=e.src.charCodeAt(s+1))&&63!==r&&47!==r&&!function(e){var t=32|e;return t>=97&&t<=122}(r))&&(!!(a=e.src.slice(s).match(n))&&(t||(e.push("html_inline","",0).content=e.src.slice(s,s+a[0].length)),e.pos+=a[0].length,!0))))}},92560:(e,t,r)=>{"use strict";var n=r(39615).normalizeReference,a=r(39615).isSpace;e.exports=function(e,t){var r,o,s,i,l,c,u,d,p,m,h,g,f,b="",v=e.pos,k=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(c=e.pos+2,(l=e.md.helpers.parseLinkLabel(e,e.pos+1,!1))<0)return!1;if((u=l+1)<k&&40===e.src.charCodeAt(u)){for(u++;u<k&&(o=e.src.charCodeAt(u),a(o)||10===o);u++);if(u>=k)return!1;for(f=u,(p=e.md.helpers.parseLinkDestination(e.src,u,e.posMax)).ok&&(b=e.md.normalizeLink(p.str),e.md.validateLink(b)?u=p.pos:b=""),f=u;u<k&&(o=e.src.charCodeAt(u),a(o)||10===o);u++);if(p=e.md.helpers.parseLinkTitle(e.src,u,e.posMax),u<k&&f!==u&&p.ok)for(m=p.str,u=p.pos;u<k&&(o=e.src.charCodeAt(u),a(o)||10===o);u++);else m="";if(u>=k||41!==e.src.charCodeAt(u))return e.pos=v,!1;u++}else{if(void 0===e.env.references)return!1;if(u<k&&91===e.src.charCodeAt(u)?(f=u+1,(u=e.md.helpers.parseLinkLabel(e,u))>=0?i=e.src.slice(f,u++):u=l+1):u=l+1,i||(i=e.src.slice(c,l)),!(d=e.env.references[n(i)]))return e.pos=v,!1;b=d.href,m=d.title}return t||(s=e.src.slice(c,l),e.md.inline.parse(s,e.md,e.env,g=[]),(h=e.push("image","img",0)).attrs=r=[["src",b],["alt",""]],h.children=g,h.content=s,m&&r.push(["title",m])),e.pos=u,e.posMax=k,!0}},95028:(e,t,r)=>{"use strict";var n=r(39615).normalizeReference,a=r(39615).isSpace;e.exports=function(e,t){var r,o,s,i,l,c,u,d,p="",m="",h=e.pos,g=e.posMax,f=e.pos,b=!0;if(91!==e.src.charCodeAt(e.pos))return!1;if(l=e.pos+1,(i=e.md.helpers.parseLinkLabel(e,e.pos,!0))<0)return!1;if((c=i+1)<g&&40===e.src.charCodeAt(c)){for(b=!1,c++;c<g&&(o=e.src.charCodeAt(c),a(o)||10===o);c++);if(c>=g)return!1;if(f=c,(u=e.md.helpers.parseLinkDestination(e.src,c,e.posMax)).ok){for(p=e.md.normalizeLink(u.str),e.md.validateLink(p)?c=u.pos:p="",f=c;c<g&&(o=e.src.charCodeAt(c),a(o)||10===o);c++);if(u=e.md.helpers.parseLinkTitle(e.src,c,e.posMax),c<g&&f!==c&&u.ok)for(m=u.str,c=u.pos;c<g&&(o=e.src.charCodeAt(c),a(o)||10===o);c++);}(c>=g||41!==e.src.charCodeAt(c))&&(b=!0),c++}if(b){if(void 0===e.env.references)return!1;if(c<g&&91===e.src.charCodeAt(c)?(f=c+1,(c=e.md.helpers.parseLinkLabel(e,c))>=0?s=e.src.slice(f,c++):c=i+1):c=i+1,s||(s=e.src.slice(l,i)),!(d=e.env.references[n(s)]))return e.pos=h,!1;p=d.href,m=d.title}return t||(e.pos=l,e.posMax=i,e.push("link_open","a",1).attrs=r=[["href",p]],m&&r.push(["title",m]),e.md.inline.tokenize(e),e.push("link_close","a",-1)),e.pos=c,e.posMax=g,!0}},62378:(e,t,r)=>{"use strict";var n=r(39615).isSpace;e.exports=function(e,t){var r,a,o,s=e.pos;if(10!==e.src.charCodeAt(s))return!1;if(r=e.pending.length-1,a=e.posMax,!t)if(r>=0&&32===e.pending.charCodeAt(r))if(r>=1&&32===e.pending.charCodeAt(r-1)){for(o=r-1;o>=1&&32===e.pending.charCodeAt(o-1);)o--;e.pending=e.pending.slice(0,o),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(s++;s<a&&n(e.src.charCodeAt(s));)s++;return e.pos=s,!0}},25240:(e,t,r)=>{"use strict";var n=r(71872),a=r(39615).isWhiteSpace,o=r(39615).isPunctChar,s=r(39615).isMdAsciiPunct;function i(e,t,r,n){this.src=e,this.env=r,this.md=t,this.tokens=n,this.tokens_meta=Array(n.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1}i.prototype.pushPending=function(){var e=new n("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},i.prototype.push=function(e,t,r){this.pending&&this.pushPending();var a=new n(e,t,r),o=null;return r<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),a.level=this.level,r>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(a),this.tokens_meta.push(o),a},i.prototype.scanDelims=function(e,t){var r,n,i,l,c,u,d,p,m,h=e,g=!0,f=!0,b=this.posMax,v=this.src.charCodeAt(e);for(r=e>0?this.src.charCodeAt(e-1):32;h<b&&this.src.charCodeAt(h)===v;)h++;return i=h-e,n=h<b?this.src.charCodeAt(h):32,d=s(r)||o(String.fromCharCode(r)),m=s(n)||o(String.fromCharCode(n)),u=a(r),(p=a(n))?g=!1:m&&(u||d||(g=!1)),u?f=!1:d&&(p||m||(f=!1)),t?(l=g,c=f):(l=g&&(!f||d),c=f&&(!g||m)),{can_open:l,can_close:c,length:i}},i.prototype.Token=n,e.exports=i},54988:e=>{"use strict";function t(e,t){var r,n,a,o,s,i=[],l=t.length;for(r=0;r<l;r++)126===(a=t[r]).marker&&-1!==a.end&&(o=t[a.end],(s=e.tokens[a.token]).type="s_open",s.tag="s",s.nesting=1,s.markup="~~",s.content="",(s=e.tokens[o.token]).type="s_close",s.tag="s",s.nesting=-1,s.markup="~~",s.content="","text"===e.tokens[o.token-1].type&&"~"===e.tokens[o.token-1].content&&i.push(o.token-1));for(;i.length;){for(n=(r=i.pop())+1;n<e.tokens.length&&"s_close"===e.tokens[n].type;)n++;r!==--n&&(s=e.tokens[n],e.tokens[n]=e.tokens[r],e.tokens[r]=s)}}e.exports.w=function(e,t){var r,n,a,o,s=e.pos,i=e.src.charCodeAt(s);if(t)return!1;if(126!==i)return!1;if(a=(n=e.scanDelims(e.pos,!0)).length,o=String.fromCharCode(i),a<2)return!1;for(a%2&&(e.push("text","",0).content=o,a--),r=0;r<a;r+=2)e.push("text","",0).content=o+o,e.delimiters.push({marker:i,length:0,token:e.tokens.length-1,end:-1,open:n.can_open,close:n.can_close});return e.pos+=n.length,!0},e.exports.g=function(e){var r,n=e.tokens_meta,a=e.tokens_meta.length;for(t(e,e.delimiters),r=0;r<a;r++)n[r]&&n[r].delimiters&&t(e,n[r].delimiters)}},10937:e=>{"use strict";function t(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}e.exports=function(e,r){for(var n=e.pos;n<e.posMax&&!t(e.src.charCodeAt(n));)n++;return n!==e.pos&&(r||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}},52406:e=>{"use strict";e.exports=function(e){var t,r,n=0,a=e.tokens,o=e.tokens.length;for(t=r=0;t<o;t++)a[t].nesting<0&&n--,a[t].level=n,a[t].nesting>0&&n++,"text"===a[t].type&&t+1<o&&"text"===a[t+1].type?a[t+1].content=a[t].content+a[t+1].content:(t!==r&&(a[r]=a[t]),r++);t!==r&&(a.length=r)}},71872:e=>{"use strict";function t(e,t,r){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=r,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}t.prototype.attrIndex=function(e){var t,r,n;if(!this.attrs)return-1;for(r=0,n=(t=this.attrs).length;r<n;r++)if(t[r][0]===e)return r;return-1},t.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},t.prototype.attrSet=function(e,t){var r=this.attrIndex(e),n=[e,t];r<0?this.attrPush(n):this.attrs[r]=n},t.prototype.attrGet=function(e){var t=this.attrIndex(e),r=null;return t>=0&&(r=this.attrs[t][1]),r},t.prototype.attrJoin=function(e,t){var r=this.attrIndex(e);r<0?this.attrPush([e,t]):this.attrs[r][1]=this.attrs[r][1]+" "+t},e.exports=t},64309:e=>{"use strict";var t={};function r(e,n){var a;return"string"!=typeof n&&(n=r.defaultChars),a=function(e){var r,n,a=t[e];if(a)return a;for(a=t[e]=[],r=0;r<128;r++)n=String.fromCharCode(r),a.push(n);for(r=0;r<e.length;r++)a[n=e.charCodeAt(r)]="%"+("0"+n.toString(16).toUpperCase()).slice(-2);return a}(n),e.replace(/(%[a-f0-9]{2})+/gi,(function(e){var t,r,n,o,s,i,l,c="";for(t=0,r=e.length;t<r;t+=3)(n=parseInt(e.slice(t+1,t+3),16))<128?c+=a[n]:192==(224&n)&&t+3<r&&128==(192&(o=parseInt(e.slice(t+4,t+6),16)))?(c+=(l=n<<6&1984|63&o)<128?"��":String.fromCharCode(l),t+=3):224==(240&n)&&t+6<r&&(o=parseInt(e.slice(t+4,t+6),16),s=parseInt(e.slice(t+7,t+9),16),128==(192&o)&&128==(192&s))?(c+=(l=n<<12&61440|o<<6&4032|63&s)<2048||l>=55296&&l<=57343?"���":String.fromCharCode(l),t+=6):240==(248&n)&&t+9<r&&(o=parseInt(e.slice(t+4,t+6),16),s=parseInt(e.slice(t+7,t+9),16),i=parseInt(e.slice(t+10,t+12),16),128==(192&o)&&128==(192&s)&&128==(192&i))?((l=n<<18&1835008|o<<12&258048|s<<6&4032|63&i)<65536||l>1114111?c+="����":(l-=65536,c+=String.fromCharCode(55296+(l>>10),56320+(1023&l))),t+=9):c+="�";return c}))}r.defaultChars=";/?:@&=+$,#",r.componentChars="",e.exports=r},16087:e=>{"use strict";var t={};function r(e,n,a){var o,s,i,l,c,u="";for("string"!=typeof n&&(a=n,n=r.defaultChars),void 0===a&&(a=!0),c=function(e){var r,n,a=t[e];if(a)return a;for(a=t[e]=[],r=0;r<128;r++)n=String.fromCharCode(r),/^[0-9a-z]$/i.test(n)?a.push(n):a.push("%"+("0"+r.toString(16).toUpperCase()).slice(-2));for(r=0;r<e.length;r++)a[e.charCodeAt(r)]=e[r];return a}(n),o=0,s=e.length;o<s;o++)if(i=e.charCodeAt(o),a&&37===i&&o+2<s&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3)))u+=e.slice(o,o+3),o+=2;else if(i<128)u+=c[i];else if(i>=55296&&i<=57343){if(i>=55296&&i<=56319&&o+1<s&&(l=e.charCodeAt(o+1))>=56320&&l<=57343){u+=encodeURIComponent(e[o]+e[o+1]),o++;continue}u+="%EF%BF%BD"}else u+=encodeURIComponent(e[o]);return u}r.defaultChars=";/?:@&=+$,-_.!~*'()#",r.componentChars="-_.!~*'()",e.exports=r},46175:e=>{"use strict";e.exports=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""}},49236:(e,t,r)=>{"use strict";e.exports.encode=r(16087),e.exports.decode=r(64309),e.exports.format=r(46175),e.exports.parse=r(57507)},57507:e=>{"use strict";function t(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var r=/^([a-z0-9.+-]+:)/i,n=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,o=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),s=["'"].concat(o),i=["%","/","?",";","#"].concat(s),l=["/","?","#"],c=/^[+a-z0-9A-Z_-]{0,63}$/,u=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,d={javascript:!0,"javascript:":!0},p={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};t.prototype.parse=function(e,t){var n,o,s,m,h,g=e;if(g=g.trim(),!t&&1===e.split("#").length){var f=a.exec(g);if(f)return this.pathname=f[1],f[2]&&(this.search=f[2]),this}var b=r.exec(g);if(b&&(s=(b=b[0]).toLowerCase(),this.protocol=b,g=g.substr(b.length)),(t||b||g.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(h="//"===g.substr(0,2))||b&&d[b]||(g=g.substr(2),this.slashes=!0)),!d[b]&&(h||b&&!p[b])){var v,k,y=-1;for(n=0;n<l.length;n++)-1!==(m=g.indexOf(l[n]))&&(-1===y||m<y)&&(y=m);for(-1!==(k=-1===y?g.lastIndexOf("@"):g.lastIndexOf("@",y))&&(v=g.slice(0,k),g=g.slice(k+1),this.auth=v),y=-1,n=0;n<i.length;n++)-1!==(m=g.indexOf(i[n]))&&(-1===y||m<y)&&(y=m);-1===y&&(y=g.length),":"===g[y-1]&&y--;var E=g.slice(0,y);g=g.slice(y),this.parseHost(E),this.hostname=this.hostname||"";var w="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!w){var _=this.hostname.split(/\./);for(n=0,o=_.length;n<o;n++){var C=_[n];if(C&&!C.match(c)){for(var j="",S=0,x=C.length;S<x;S++)C.charCodeAt(S)>127?j+="x":j+=C[S];if(!j.match(c)){var P=_.slice(0,n),T=_.slice(n+1),L=C.match(u);L&&(P.push(L[1]),T.unshift(L[2])),T.length&&(g=T.join(".")+g),this.hostname=P.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),w&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var N=g.indexOf("#");-1!==N&&(this.hash=g.substr(N),g=g.slice(0,N));var A=g.indexOf("?");return-1!==A&&(this.search=g.substr(A),g=g.slice(0,A)),g&&(this.pathname=g),p[s]&&this.hostname&&!this.pathname&&(this.pathname=""),this},t.prototype.parseHost=function(e){var t=n.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},e.exports=function(e,r){if(e&&e instanceof t)return e;var n=new t;return n.parse(e,r),n}},1488:()=>{},56878:()=>{},40888:()=>{},59961:()=>{},73443:()=>{},78296:()=>{},44046:()=>{},7679:()=>{},15184:()=>{},9170:()=>{},32295:()=>{},61154:()=>{},46154:()=>{},91680:()=>{},49304:()=>{},27212:()=>{},5609:()=>{},58449:()=>{},62103:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={button:"zI5tJ_qhWE6Oe6Lk75GY","is-icon-button":"tuBt2DLqimiImoqVzPqo",small:"Na39I683LAaSA99REg14",normal:"ipS7tKy9GntCS4R3vekF",icon:"paGLQwtPEaJmtArCcmyK",regular:"lZAo6_oGfclXOO9CC6Rd","full-width":"xJDOiJxTt0R_wSl8Ipz_",loading:"q_tVWqMjl39RcY6WtQA6","external-icon":"CDuBjJp_8jxzx5j6Nept"}},45460:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={"star-icon":"cuoSlhSNrqf1dozY22Xb",jetpack:"lAIiifeLMmZAPlQ9n9ZR","checkmark-icon":"JLquNpQVlysAamuh5lJO",socialIcon:"cbOwD8Y4tFjwimmtchQI",facebook:"aHOlEBGD5EA8NKRw3xTw",instagram:"cL3m0xBYTYhIKI7lCqDB",twitter:"af4Y_zItXvLAOEoSDPSv",linkedin:"f68aqF3XSD1OBvXR1get",tumblr:"xFI0dt3UiXRlRQdqPWkx",google:"q7JEoyymveP6kF747M43",mastodon:"DKOBOTVmTLbh26gUH_73"}},49710:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={sm:"(max-width: 599px)",md:"(min-width: 600px) and (max-width: 959px)",lg:"(min-width: 960px)"}},46409:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={placeholder:"NisihrgiIKl_knpYJtfg",pulse:"R2i0K45dEF157drbVRPI"}},48026:()=>{},93468:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={global:"_fUXxnSp5pagKBp9gSN7"}},91853:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={"connection-container":"KQcQQLxH5fI08DfOlKwL"}},75631:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={"connections-list":"Ua6eKcnk_tQQpFlgXMSn","components-notice":"SHqrIEguRfCILRHPyxE9","upgrade-link":"ABTyknbLXdzwcEZeSGzL","more-link":"ejyuBjiLmHz_UTFmBnjA"}},58487:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={container:"OWstrHF6QZdaosKs0b6j",hidden:"HJMFrbZ0khdkKKkocrIK"}},69339:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={"preview-wrapper":"cZuW54OEuUN9yvuE_rNU","preview-image":"vCs0BOExDMOystFhG2wa",container:"sKpch49QzrpontC0DvF7",subtitle:"vOO47kVjHn7i63fQ0bx0",preview:"ziE_jq4PmQmGBedGskf_",remove:"qqGj0rmSJvZs9dyr0u_I","remove-loading":"TJGgifcTHqUtknPqVQpH"}},45811:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={wrapper:"f92zWdEJJIwBvwH5rRzn",disabled:"rBTOWyeewE4VxAqYgjoI","preview-wrapper":"PykCvaqoL7AIDzVKJAtg",notice:"SSMDWFYkP44va5KqPpTP"}},82283:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={notice:"ptn8jt555LOvMXWaoLxs","notice--default":"IVzciZv5S5E8XgR5EsLp","notice--highlight":"OpbDsm3F65Z4K5Bz43cz","notice--warning":"dlrSwB0tyuf1TYcypDec","notice--error":"hkpqil8E11PObwu7TVU2",content:"AeqtA3GRe7sFjKaC9SqL",dismiss:"IArBTmNL2K4du5WPBUhg",actions:"T7E2eJJN4qjwPpv3mcjV"}},2097:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={prompt:"CW7R8fRQqVKfyXFYiNWR",buttons:"n34j0qWq2EZzYl1jAiej",button:"aIuCL8MdydCJGcrOqp4x",header:"qegtnlYWDc3UnIGPRlQb"}},78619:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={"settings-link":"ZuktxapayvvIV1xDFrTG"}},40088:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={templateControl:"tfWupx32Rn5hHqVjTzui",customText:"qu9UsV1EEFeFxhU3Wgt5",mediaPicker:"nZhgKYFn6MQoIDGcKrUG"}},15214:()=>{"use strict"},47320:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={templates:"m9360_cMWKFHTNk9xpNz",template:"j4EvSJfKIJLGEIAETiEY","template--active":"dQb3Zpl0puk4V6ezZslo"}},89696:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={checkbox:"NWFjHxAKqZPzk0O6w4IF"}},28161:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={"publicize-notice":"__nV49on4_ijaV8Brnsw","components-notice":"zZ3Pu7E87XyYIdPR2WTt","components-button":"fLC8AaLf3xcKaoJ4Opax"}},87728:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={wrapper:"sP1aklNMfj7lCDxuhWaq",progress:"a6tcXi51GAewl3qx0AVi",duration:"uFtCCGeycoI94JbCnJh8"}},5743:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={wrapper:"h2NGkiVs1r1nf85LtJpF","conversion-notice":"k3Apzwo3v9n0IaHbB8tf"}},73171:e=>{var t=1e3,r=60*t,n=60*r,a=24*n,o=7*a,s=365.25*a;function i(e,t,r,n){var a=t>=1.5*r;return Math.round(e/r)+" "+n+(a?"s":"")}e.exports=function(e,l){l=l||{};var c=typeof e;if("string"===c&&e.length>0)return function(e){if((e=String(e)).length>100)return;var i=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!i)return;var l=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*s;case"weeks":case"week":case"w":return l*o;case"days":case"day":case"d":return l*a;case"hours":case"hour":case"hrs":case"hr":case"h":return l*n;case"minutes":case"minute":case"mins":case"min":case"m":return l*r;case"seconds":case"second":case"secs":case"sec":case"s":return l*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}(e);if("number"===c&&isFinite(e))return l.long?function(e){var o=Math.abs(e);if(o>=a)return i(e,o,a,"day");if(o>=n)return i(e,o,n,"hour");if(o>=r)return i(e,o,r,"minute");if(o>=t)return i(e,o,t,"second");return e+" ms"}(e):function(e){var o=Math.abs(e);if(o>=a)return Math.round(e/a)+"d";if(o>=n)return Math.round(e/n)+"h";if(o>=r)return Math.round(e/r)+"m";if(o>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},68308:(e,t,r)=>{"use strict";r.d(t,{B:()=>s});var n=r(97740),a=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],o=/[^A-Z0-9]+/gi;function s(e,t){void 0===t&&(t={});for(var r=t.splitRegexp,s=void 0===r?a:r,l=t.stripRegexp,c=void 0===l?o:l,u=t.transform,d=void 0===u?n.U:u,p=t.delimiter,m=void 0===p?" ":p,h=i(i(e,s,"$1\0$2"),c,"\0"),g=0,f=h.length;"\0"===h.charAt(g);)g++;for(;"\0"===h.charAt(f-1);)f--;return h.slice(g,f).split("\0").map(d).join(m)}function i(e,t,r){return t instanceof RegExp?e.replace(t,r):t.reduce((function(e,t){return e.replace(t,r)}),e)}},76854:(e,t,r)=>{"use strict";r.d(t,{o:()=>o});var n=r(38697),a=r(77352);function o(e,t){return void 0===t&&(t={}),(0,a.$)(e,(0,n.pi)({delimiter:"-"},t))}},72867:(e,t,r)=>{"use strict";r.d(t,{By:()=>o,Ho:()=>i,Pv:()=>s});var n=r(38697),a=r(68308);function o(e,t){var r=e.charAt(0),n=e.substr(1).toLowerCase();return t>0&&r>="0"&&r<="9"?"_"+r+n:""+r.toUpperCase()+n}function s(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function i(e,t){return void 0===t&&(t={}),(0,a.B)(e,(0,n.pi)({delimiter:"",transform:o},t))}},76559:(e,t,r)=>{"use strict";r.d(t,{Y:()=>o});var n=r(38697),a=r(77352);function o(e,t){return void 0===t&&(t={}),(0,a.$)(e,(0,n.pi)({delimiter:"/"},t))}},69424:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(94273),a=r.n(n),o=r(53191),s=r.n(o),i=r(51128),l=r.n(i)()("photon"),c={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},u="__domain__.invalid",d="http://".concat(u),p="https://i0.wp.com";function m(e,t){var r;try{r=new URL(e,d)}catch(e){return null}var n,o,i,m,h,g="https:"===r.protocol,f=new URL(p);if(h=r.host,/^i[0-2]\.wp\.com$/.test(h))f.pathname=r.pathname,f.hostname=r.hostname;else{if(r.search)return null;var b=r.href.replace("".concat(r.protocol,"/"),"");"blob:"===r.protocol&&(b=r.pathname.replace("://","//")),r.hostname===u&&(b=r.pathname),f.pathname=b,f.hostname=(n=b,o=a()(n),i=s()(o),m="i"+Math.floor(3*i()),l('determined server "%s" to use with "%s"',m,n),m+".wp.com"),g&&f.searchParams.set("ssl",1)}if(t)for(var v in t)"host"!==v&&"hostname"!==v?"secure"!==v||t[v]?f.searchParams.set(c[v]||v,t[v]):f.protocol="http:":f.hostname=t[v];return l("generated Photon URL: %s",f.href),f.href}},469:(e,t,r)=>{"use strict";var n=r(90758);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,r,a,o,s){if(s!==n){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return r.PropTypes=r,r}},25162:(e,t,r)=>{e.exports=r(469)()},90758:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},28918:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>P});var n,a=r(99196),o=r.n(a),s=Object.defineProperty,i=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,u=(e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,d=(e,t)=>{for(var r in t||(t={}))l.call(t,r)&&u(e,r,t[r]);if(i)for(var r of i(t))c.call(t,r)&&u(e,r,t[r]);return e},p=(e,t)=>{var r={};for(var n in e)l.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&i)for(var n of i(e))t.indexOf(n)<0&&c.call(e,n)&&(r[n]=e[n]);return r};(e=>{const t=class{constructor(e,r,n,a){if(this.version=e,this.errorCorrectionLevel=r,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(a<-1||a>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let s=[];for(let e=0;e<this.size;e++)s.push(!1);for(let e=0;e<this.size;e++)this.modules.push(s.slice()),this.isFunction.push(s.slice());this.drawFunctionPatterns();const i=this.addEccAndInterleave(n);if(this.drawCodewords(i),-1==a){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const r=this.getPenaltyScore();r<e&&(a=t,e=r),this.applyMask(t)}}o(0<=a&&a<=7),this.mask=a,this.applyMask(a),this.drawFormatBits(a),this.isFunction=[]}static encodeText(r,n){const a=e.QrSegment.makeSegments(r);return t.encodeSegments(a,n)}static encodeBinary(r,n){const a=e.QrSegment.makeBytes(r);return t.encodeSegments([a],n)}static encodeSegments(e,r,a=1,s=40,l=-1,c=!0){if(!(t.MIN_VERSION<=a&&a<=s&&s<=t.MAX_VERSION)||l<-1||l>7)throw new RangeError("Invalid value");let u,d;for(u=a;;u++){const n=8*t.getNumDataCodewords(u,r),a=i.getTotalBits(e,u);if(a<=n){d=a;break}if(u>=s)throw new RangeError("Data too long")}for(const e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])c&&d<=8*t.getNumDataCodewords(u,e)&&(r=e);let p=[];for(const t of e){n(t.mode.modeBits,4,p),n(t.numChars,t.mode.numCharCountBits(u),p);for(const e of t.getData())p.push(e)}o(p.length==d);const m=8*t.getNumDataCodewords(u,r);o(p.length<=m),n(0,Math.min(4,m-p.length),p),n(0,(8-p.length%8)%8,p),o(p.length%8==0);for(let e=236;p.length<m;e^=253)n(e,8,p);let h=[];for(;8*h.length<p.length;)h.push(0);return p.forEach(((e,t)=>h[t>>>3]|=e<<7-(7&t))),new t(u,r,h,l)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let r=0;r<t;r++)for(let n=0;n<t;n++)0==r&&0==n||0==r&&n==t-1||r==t-1&&0==n||this.drawAlignmentPattern(e[r],e[n]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let r=t;for(let e=0;e<10;e++)r=r<<1^1335*(r>>>9);const n=21522^(t<<10|r);o(n>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,a(n,e));this.setFunctionModule(8,7,a(n,6)),this.setFunctionModule(8,8,a(n,7)),this.setFunctionModule(7,8,a(n,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,a(n,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,a(n,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,a(n,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;o(t>>>18==0);for(let e=0;e<18;e++){const r=a(t,e),n=this.size-11+e%3,o=Math.floor(e/3);this.setFunctionModule(n,o,r),this.setFunctionModule(o,n,r)}}drawFinderPattern(e,t){for(let r=-4;r<=4;r++)for(let n=-4;n<=4;n++){const a=Math.max(Math.abs(n),Math.abs(r)),o=e+n,s=t+r;0<=o&&o<this.size&&0<=s&&s<this.size&&this.setFunctionModule(o,s,2!=a&&4!=a)}}drawAlignmentPattern(e,t){for(let r=-2;r<=2;r++)for(let n=-2;n<=2;n++)this.setFunctionModule(e+n,t+r,1!=Math.max(Math.abs(n),Math.abs(r)))}setFunctionModule(e,t,r){this.modules[t][e]=r,this.isFunction[t][e]=!0}addEccAndInterleave(e){const r=this.version,n=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(r,n))throw new RangeError("Invalid argument");const a=t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][r],s=t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][r],i=Math.floor(t.getNumRawDataModules(r)/8),l=a-i%a,c=Math.floor(i/a);let u=[];const d=t.reedSolomonComputeDivisor(s);for(let r=0,n=0;r<a;r++){let a=e.slice(n,n+c-s+(r<l?0:1));n+=a.length;const o=t.reedSolomonComputeRemainder(a,d);r<l&&a.push(0),u.push(a.concat(o))}let p=[];for(let e=0;e<u[0].length;e++)u.forEach(((t,r)=>{(e!=c-s||r>=l)&&p.push(t[e])}));return o(p.length==i),p}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let r=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let n=0;n<this.size;n++)for(let o=0;o<2;o++){const s=t-o,i=0==(t+1&2)?this.size-1-n:n;!this.isFunction[i][s]&&r<8*e.length&&(this.modules[i][s]=a(e[r>>>3],7-(7&r)),r++)}}o(r==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let r=0;r<this.size;r++){let n;switch(e){case 0:n=(r+t)%2==0;break;case 1:n=t%2==0;break;case 2:n=r%3==0;break;case 3:n=(r+t)%3==0;break;case 4:n=(Math.floor(r/3)+Math.floor(t/2))%2==0;break;case 5:n=r*t%2+r*t%3==0;break;case 6:n=(r*t%2+r*t%3)%2==0;break;case 7:n=((r+t)%2+r*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][r]&&n&&(this.modules[t][r]=!this.modules[t][r])}}getPenaltyScore(){let e=0;for(let r=0;r<this.size;r++){let n=!1,a=0,o=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[r][s]==n?(a++,5==a?e+=t.PENALTY_N1:a>5&&e++):(this.finderPenaltyAddHistory(a,o),n||(e+=this.finderPenaltyCountPatterns(o)*t.PENALTY_N3),n=this.modules[r][s],a=1);e+=this.finderPenaltyTerminateAndCount(n,a,o)*t.PENALTY_N3}for(let r=0;r<this.size;r++){let n=!1,a=0,o=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[s][r]==n?(a++,5==a?e+=t.PENALTY_N1:a>5&&e++):(this.finderPenaltyAddHistory(a,o),n||(e+=this.finderPenaltyCountPatterns(o)*t.PENALTY_N3),n=this.modules[s][r],a=1);e+=this.finderPenaltyTerminateAndCount(n,a,o)*t.PENALTY_N3}for(let r=0;r<this.size-1;r++)for(let n=0;n<this.size-1;n++){const a=this.modules[r][n];a==this.modules[r][n+1]&&a==this.modules[r+1][n]&&a==this.modules[r+1][n+1]&&(e+=t.PENALTY_N2)}let r=0;for(const e of this.modules)r=e.reduce(((e,t)=>e+(t?1:0)),r);const n=this.size*this.size,a=Math.ceil(Math.abs(20*r-10*n)/n)-1;return o(0<=a&&a<=9),e+=a*t.PENALTY_N4,o(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2));let r=[6];for(let n=this.size-7;r.length<e;n-=t)r.splice(1,0,n);return r}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let r=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;r-=(25*t-10)*t-55,e>=7&&(r-=36)}return o(208<=r&&r<=29648),r}static getNumDataCodewords(e,r){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let r=[];for(let t=0;t<e-1;t++)r.push(0);r.push(1);let n=1;for(let a=0;a<e;a++){for(let e=0;e<r.length;e++)r[e]=t.reedSolomonMultiply(r[e],n),e+1<r.length&&(r[e]^=r[e+1]);n=t.reedSolomonMultiply(n,2)}return r}static reedSolomonComputeRemainder(e,r){let n=r.map((e=>0));for(const a of e){const e=a^n.shift();n.push(0),r.forEach(((r,a)=>n[a]^=t.reedSolomonMultiply(r,e)))}return n}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw new RangeError("Byte out of range");let r=0;for(let n=7;n>=0;n--)r=r<<1^285*(r>>>7),r^=(t>>>n&1)*e;return o(r>>>8==0),r}finderPenaltyCountPatterns(e){const t=e[1];o(t<=3*this.size);const r=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(r&&e[0]>=4*t&&e[6]>=t?1:0)+(r&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,r){return e&&(this.finderPenaltyAddHistory(t,r),t=0),t+=this.size,this.finderPenaltyAddHistory(t,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};let r=t;function n(e,t,r){if(t<0||t>31||e>>>t!=0)throw new RangeError("Value out of range");for(let n=t-1;n>=0;n--)r.push(e>>>n&1)}function a(e,t){return 0!=(e>>>t&1)}function o(e){if(!e)throw new Error("Assertion error")}r.MIN_VERSION=1,r.MAX_VERSION=40,r.PENALTY_N1=3,r.PENALTY_N2=3,r.PENALTY_N3=40,r.PENALTY_N4=10,r.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],r.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=r;const s=class{constructor(e,t,r){if(this.mode=e,this.numChars=t,this.bitData=r,t<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}static makeBytes(e){let t=[];for(const r of e)n(r,8,t);return new s(s.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!s.isNumeric(e))throw new RangeError("String contains non-numeric characters");let t=[];for(let r=0;r<e.length;){const a=Math.min(e.length-r,3);n(parseInt(e.substr(r,a),10),3*a+1,t),r+=a}return new s(s.Mode.NUMERIC,e.length,t)}static makeAlphanumeric(e){if(!s.isAlphanumeric(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let t,r=[];for(t=0;t+2<=e.length;t+=2){let a=45*s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t));a+=s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t+1)),n(a,11,r)}return t<e.length&&n(s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t)),6,r),new s(s.Mode.ALPHANUMERIC,e.length,r)}static makeSegments(e){return""==e?[]:s.isNumeric(e)?[s.makeNumeric(e)]:s.isAlphanumeric(e)?[s.makeAlphanumeric(e)]:[s.makeBytes(s.toUtf8ByteArray(e))]}static makeEci(e){let t=[];if(e<0)throw new RangeError("ECI assignment value out of range");if(e<128)n(e,8,t);else if(e<16384)n(2,2,t),n(e,14,t);else{if(!(e<1e6))throw new RangeError("ECI assignment value out of range");n(6,3,t),n(e,21,t)}return new s(s.Mode.ECI,0,t)}static isNumeric(e){return s.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return s.ALPHANUMERIC_REGEX.test(e)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let r=0;for(const n of e){const e=n.mode.numCharCountBits(t);if(n.numChars>=1<<e)return 1/0;r+=4+e+n.bitData.length}return r}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let r=0;r<e.length;r++)"%"!=e.charAt(r)?t.push(e.charCodeAt(r)):(t.push(parseInt(e.substr(r+1,2),16)),r+=2);return t}};let i=s;i.NUMERIC_REGEX=/^[0-9]*$/,i.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,i.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",e.QrSegment=i})(n||(n={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};let r=t;r.LOW=new t(0,1),r.MEDIUM=new t(1,0),r.QUARTILE=new t(2,3),r.HIGH=new t(3,2),e.Ecc=r})(t=e.QrCode||(e.QrCode={}))})(n||(n={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};let r=t;r.NUMERIC=new t(1,[10,12,14]),r.ALPHANUMERIC=new t(2,[9,11,13]),r.BYTE=new t(4,[8,16,16]),r.KANJI=new t(8,[8,10,12]),r.ECI=new t(7,[0,0,0]),e.Mode=r})(t=e.QrSegment||(e.QrSegment={}))})(n||(n={}));var m=n,h={L:m.QrCode.Ecc.LOW,M:m.QrCode.Ecc.MEDIUM,Q:m.QrCode.Ecc.QUARTILE,H:m.QrCode.Ecc.HIGH},g=128,f="L",b="#FFFFFF",v="#000000",k=!1,y=4,E=.1;function w(e,t=0){const r=[];return e.forEach((function(e,n){let a=null;e.forEach((function(o,s){if(!o&&null!==a)return r.push(`M${a+t} ${n+t}h${s-a}v1H${a+t}z`),void(a=null);if(s!==e.length-1)o&&null===a&&(a=s);else{if(!o)return;null===a?r.push(`M${s+t},${n+t} h1v1H${s+t}z`):r.push(`M${a+t},${n+t} h${s+1-a}v1H${a+t}z`)}}))})),r.join("")}function _(e,t){return e.slice().map(((e,r)=>r<t.y||r>=t.y+t.h?e:e.map(((e,r)=>(r<t.x||r>=t.x+t.w)&&e))))}function C(e,t,r,n){if(null==n)return null;const a=r?y:0,o=e.length+2*a,s=Math.floor(t*E),i=o/t,l=(n.width||s)*i,c=(n.height||s)*i,u=null==n.x?e.length/2-l/2:n.x*i,d=null==n.y?e.length/2-c/2:n.y*i;let p=null;if(n.excavate){let e=Math.floor(u),t=Math.floor(d);p={x:e,y:t,w:Math.ceil(l+u-e),h:Math.ceil(c+d-t)}}return{x:u,y:d,h:c,w:l,excavation:p}}var j=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}();function S(e){const t=e,{value:r,size:n=g,level:s=f,bgColor:i=b,fgColor:l=v,includeMargin:c=k,style:u,imageSettings:E}=t,S=p(t,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),x=null==E?void 0:E.src,P=(0,a.useRef)(null),T=(0,a.useRef)(null),[L,N]=(0,a.useState)(!1);(0,a.useEffect)((()=>{if(null!=P.current){const e=P.current,t=e.getContext("2d");if(!t)return;let a=m.QrCode.encodeText(r,h[s]).getModules();const o=c?y:0,u=a.length+2*o,d=C(a,n,c,E),p=T.current,g=null!=d&&null!==p&&p.complete&&0!==p.naturalHeight&&0!==p.naturalWidth;g&&null!=d.excavation&&(a=_(a,d.excavation));const f=window.devicePixelRatio||1;e.height=e.width=n*f;const b=n/u*f;t.scale(b,b),t.fillStyle=i,t.fillRect(0,0,u,u),t.fillStyle=l,j?t.fill(new Path2D(w(a,o))):a.forEach((function(e,r){e.forEach((function(e,n){e&&t.fillRect(n+o,r+o,1,1)}))})),g&&t.drawImage(p,d.x+o,d.y+o,d.w,d.h)}})),(0,a.useEffect)((()=>{N(!1)}),[x]);const A=d({height:n,width:n},u);let R=null;return null!=x&&(R=o().createElement("img",{src:x,key:x,style:{display:"none"},onLoad:()=>{N(!0)},ref:T})),o().createElement(o().Fragment,null,o().createElement("canvas",d({style:A,height:n,width:n,ref:P},S)),R)}function x(e){const t=e,{value:r,size:n=g,level:a=f,bgColor:s=b,fgColor:i=v,includeMargin:l=k,imageSettings:c}=t,u=p(t,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let E=m.QrCode.encodeText(r,h[a]).getModules();const j=l?y:0,S=E.length+2*j,x=C(E,n,l,c);let P=null;null!=c&&null!=x&&(null!=x.excavation&&(E=_(E,x.excavation)),P=o().createElement("image",{xlinkHref:c.src,height:x.h,width:x.w,x:x.x+j,y:x.y+j,preserveAspectRatio:"none"}));const T=w(E,j);return o().createElement("svg",d({height:n,width:n,viewBox:`0 0 ${S} ${S}`},u),o().createElement("path",{fill:s,d:`M0,0 h${S}v${S}H0z`,shapeRendering:"crispEdges"}),o().createElement("path",{fill:i,d:T,shapeRendering:"crispEdges"}),P)}var P=e=>{const t=e,{renderAs:r}=t,n=p(t,["renderAs"]);return"svg"===r?o().createElement(x,d({},n)):o().createElement(S,d({},n))}},40142:(e,t)=>{"use strict";var r=Object.prototype.hasOwnProperty;function n(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function a(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var n,o,s=[];for(o in"string"!=typeof t&&(t="?"),e)if(r.call(e,o)){if((n=e[o])||null!=n&&!isNaN(n)||(n=""),o=a(o),n=a(n),null===o||null===n)continue;s.push(o+"="+n)}return s.length?t+s.join("&"):""},t.parse=function(e){for(var t,r=/([^=?#&]+)=?([^&]*)/g,a={};t=r.exec(e);){var o=n(t[1]),s=n(t[2]);null===o||null===s||o in a||(a[o]=s)}return a}},51516:(e,t,r)=>{"use strict";var n=r(91850);t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot},671:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(25162),a=r.n(n),o=r(99196),s=r.n(o),i=r(19905),l=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function c(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.state={isSupported:i.Gb&&i.WD},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),l(t,[{key:"componentDidMount",value:function(){this.state.isSupported&&(this.handleVisibilityChange=this.handleVisibilityChange.bind(this),document.addEventListener(i.WD.event,this.handleVisibilityChange))}},{key:"componentWillUnmount",value:function(){this.state.isSupported&&document.removeEventListener(i.WD.event,this.handleVisibilityChange)}},{key:"handleVisibilityChange",value:function(){var e;"function"==typeof this.props.onChange&&(e=this.props).onChange.apply(e,c((0,i.XO)()));"function"==typeof this.props.children&&this.forceUpdate()}},{key:"render",value:function(){return this.props.children?"function"==typeof this.props.children?this.state.isSupported?(e=this.props).children.apply(e,c((0,i.XO)())):this.props.children():s().Children.only(this.props.children):null;var e}}]),t}(s().Component);u.displayName="PageVisibility",u.propTypes={onChange:a().func,children:a().oneOfType([a().node,a().func])};const d=u},90105:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(671).Z},19905:(e,t,r)=>{"use strict";r.d(t,{Gb:()=>o,WD:()=>s,XO:()=>i});var n="undefined"!=typeof document,a=[{hidden:"hidden",event:"visibilitychange",state:"visibilityState"},{hidden:"webkitHidden",event:"webkitvisibilitychange",state:"webkitVisibilityState"},{hidden:"mozHidden",event:"mozvisibilitychange",state:"mozVisibilityState"},{hidden:"msHidden",event:"msvisibilitychange",state:"msVisibilityState"},{hidden:"oHidden",event:"ovisibilitychange",state:"oVisibilityState"}],o=n&&Boolean(document.addEventListener),s=function(){if(!o)return null;var e=!0,t=!1,r=void 0;try{for(var n,s=a[Symbol.iterator]();!(e=(n=s.next()).done);e=!0){var i=n.value;if(i.hidden in document)return i}}catch(e){t=!0,r=e}finally{try{!e&&s.return&&s.return()}finally{if(t)throw r}}return null}(),i=function(){if(!s)return[!0,"visible"];var e=s.hidden,t=s.state;return[!document[e],document[t]]}},24561:(e,t,r)=>{"use strict";var n=r(99196),a=Symbol.for("react.element"),o=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var n,o={},c=null,u=null;for(n in void 0!==r&&(c=""+r),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,n)&&!l.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===o[n]&&(o[n]=t[n]);return{$$typeof:a,type:e,key:c,ref:u,props:o,_owner:i.current}}t.Fragment=o,t.jsx=c,t.jsxs=c},30275:(e,t,r)=>{"use strict";e.exports=r(24561)},24274:e=>{"use strict";function t(e,r){var n;if(Array.isArray(r))for(n=0;n<r.length;n++)t(e,r[n]);else for(n in r)e[n]=(e[n]||[]).concat(r[n])}e.exports=function(e){var r,n={};return t(n,e),(r=function(e){return function(t){return function(r){var a,o,s=n[r.type],i=t(r);if(s)for(a=0;a<s.length;a++)(o=s[a](r,e))&&e.dispatch(o);return i}}}).effects=n,r}},82298:e=>{"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},6209:(e,t,r)=>{"use strict";r.d(t,{Z:()=>C});var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var r=-1;return e.some((function(e,n){return e[0]===t&&(r=n,!0)})),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var r=e(this.__entries__,t),n=this.__entries__[r];return n&&n[1]},t.prototype.set=function(t,r){var n=e(this.__entries__,t);~n?this.__entries__[n][1]=r:this.__entries__.push([t,r])},t.prototype.delete=function(t){var r=this.__entries__,n=e(r,t);~n&&r.splice(n,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var r=0,n=this.__entries__;r<n.length;r++){var a=n[r];e.call(t,a[1],a[0])}},t}()}(),a="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,o="undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),s="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(o):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var i=["top","right","bottom","left","width","height","size","weight"],l="undefined"!=typeof MutationObserver,c=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var r=!1,n=!1,a=0;function o(){r&&(r=!1,e()),n&&l()}function i(){s(o)}function l(){var e=Date.now();if(r){if(e-a<2)return;n=!0}else r=!0,n=!1,setTimeout(i,t);a=e}return l}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,r=t.indexOf(e);~r&&t.splice(r,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){a&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),l?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){a&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,r=void 0===t?"":t;i.some((function(e){return!!~r.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),u=function(e,t){for(var r=0,n=Object.keys(t);r<n.length;r++){var a=n[r];Object.defineProperty(e,a,{value:t[a],enumerable:!1,writable:!1,configurable:!0})}return e},d=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||o},p=v(0,0,0,0);function m(e){return parseFloat(e)||0}function h(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.reduce((function(t,r){return t+m(e["border-"+r+"-width"])}),0)}function g(e){var t=e.clientWidth,r=e.clientHeight;if(!t&&!r)return p;var n=d(e).getComputedStyle(e),a=function(e){for(var t={},r=0,n=["top","right","bottom","left"];r<n.length;r++){var a=n[r],o=e["padding-"+a];t[a]=m(o)}return t}(n),o=a.left+a.right,s=a.top+a.bottom,i=m(n.width),l=m(n.height);if("border-box"===n.boxSizing&&(Math.round(i+o)!==t&&(i-=h(n,"left","right")+o),Math.round(l+s)!==r&&(l-=h(n,"top","bottom")+s)),!function(e){return e===d(e).document.documentElement}(e)){var c=Math.round(i+o)-t,u=Math.round(l+s)-r;1!==Math.abs(c)&&(i-=c),1!==Math.abs(u)&&(l-=u)}return v(a.left,a.top,i,l)}var f="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof d(e).SVGGraphicsElement}:function(e){return e instanceof d(e).SVGElement&&"function"==typeof e.getBBox};function b(e){return a?f(e)?function(e){var t=e.getBBox();return v(0,0,t.width,t.height)}(e):g(e):p}function v(e,t,r,n){return{x:e,y:t,width:r,height:n}}var k=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=v(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=b(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),y=function(e,t){var r,n,a,o,s,i,l,c=(n=(r=t).x,a=r.y,o=r.width,s=r.height,i="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(i.prototype),u(l,{x:n,y:a,width:o,height:s,top:a,right:n+o,bottom:s+a,left:n}),l);u(this,{target:e,contentRect:c})},E=function(){function e(e,t,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof d(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new k(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof d(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new y(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),w="undefined"!=typeof WeakMap?new WeakMap:new n,_=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=c.getInstance(),n=new E(t,r,this);w.set(this,n)};["observe","unobserve","disconnect"].forEach((function(e){_.prototype[e]=function(){var t;return(t=w.get(this))[e].apply(t,arguments)}}));const C=void 0!==o.ResizeObserver?o.ResizeObserver:_},53191:e=>{"use strict";var t=256,r=[],n=window,a=Math.pow(t,6),o=Math.pow(2,52),s=2*o,i=255,l=Math.random;function c(e){var r,n=e.length,a=this,o=0,s=a.i=a.j=0,l=a.S=[];for(n||(e=[n++]);o<t;)l[o]=o++;for(o=0;o<t;o++)l[o]=l[s=i&s+e[o%n]+(r=l[o])],l[s]=r;(a.g=function(e){for(var r,n=0,o=a.i,s=a.j,l=a.S;e--;)r=l[o=i&o+1],n=n*t+l[i&(l[o]=l[s=i&s+r])+(l[s]=r)];return a.i=o,a.j=s,n})(t)}function u(e,t){var r,n=[],a=(typeof e)[0];if(t&&"o"==a)for(r in e)try{n.push(u(e[r],t-1))}catch(e){}return n.length?n:"s"==a?e:e+"\0"}function d(e,t){for(var r,n=e+"",a=0;a<n.length;)t[i&a]=i&(r^=19*t[i&a])+n.charCodeAt(a++);return p(t)}function p(e){return String.fromCharCode.apply(0,e)}e.exports=function(i,l){if(l&&!0===l.global)return l.global=!1,Math.random=e.exports(i,l),l.global=!0,Math.random;var m=[],h=(d(u(l&&l.entropy||!1?[i,p(r)]:0 in arguments?i:function(e){try{return n.crypto.getRandomValues(e=new Uint8Array(t)),p(e)}catch(e){return[+new Date,n,n.navigator&&n.navigator.plugins,n.screen,p(r)]}}(),3),m),new c(m));return d(p(h.S),r),function(){for(var e=h.g(6),r=a,n=0;e<o;)e=(e+n)*t,r*=t,n=h.g(1);for(;e>=s;)e/=2,r/=2,n>>>=1;return(e+n)/r}},e.exports.resetGlobal=function(){Math.random=l},d(Math.random(),r)},44434:(e,t,r)=>{"use strict";r.d(t,{G:()=>i,a:()=>s});var n=r(38697),a=r(68308),o=r(83078);function s(e,t){var r=e.toLowerCase();return 0===t?(0,o.l)(r):r}function i(e,t){return void 0===t&&(t={}),(0,a.B)(e,(0,n.pi)({delimiter:" ",transform:s},t))}},59491:(e,t,r)=>{"use strict";r.d(t,{f:()=>o});var n=r(38697),a=r(77352);function o(e,t){return void 0===t&&(t={}),(0,a.$)(e,(0,n.pi)({delimiter:"_"},t))}},36222:(e,t,r)=>{"use strict";r.d(t,{$L:()=>l.$L,X_:()=>i.X_,jt:()=>n.Z,oN:()=>i.oN,pw:()=>a.Z,rp:()=>s.r,tK:()=>s.t,u_:()=>o.u_,v_:()=>o.v_});r(2890),r(56694);var n=r(67742),a=r(42194),o=r(59822),s=r(58890),i=r(20281),l=r(16700)},67742:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51128),a=r.n(n),o=r(56694);const s=a()("jetpack-ai-client:ask-question");async function i(e){let{postId:t=null,fromCache:r=!1,feature:n,functions:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s("Asking question: %o. options: %o",e,{postId:t,fromCache:r,feature:n,functions:a}),new o.Z({question:e,options:{postId:t,feature:n,fromCache:r,functions:a}})}},4437:(e,t,r)=>{"use strict";r.d(t,{Z:()=>k});var n=r(52175),a=r(55609),o=r(94333),s=r(69307),i=r(65736),l=r(6163),c=r(61074),u=r(90986),d=r(79201),p=r(65235),m=r.n(p),h=r(99196),g=r.n(h),f=r(11928),b=r(22291);const __=i.__,v=()=>{};const k=(0,s.forwardRef)((function(e,t){let{disabled:r=!1,value:i="",placeholder:p="",showAccept:h=!1,acceptLabel:k=__("Accept","jetpack"),showButtonsLabel:y=!0,isOpaque:E=!1,state:w="init",onChange:_=v,onSend:C=v,onStop:j=v,onAccept:S=v}=e;const x=(0,s.useRef)(null),P="requesting"===w||"suggesting"===w,T=!(P||r||i?.length||E);(0,s.useImperativeHandle)(t,(()=>x.current)),(0,o.useKeyboardShortcut)("mod+enter",(()=>{h&&S?.()}),{target:x}),(0,o.useKeyboardShortcut)("enter",(e=>{e.preventDefault(),C?.(i)}),{target:x});const L=m()("jetpack-components-ai-control__controls-prompt_button",{"has-label":y});return g().createElement("div",{className:"jetpack-components-ai-control__container"},g().createElement("div",{className:m()("jetpack-components-ai-control__wrapper",{"is-opaque":E})},g().createElement(f.Z,{state:w}),g().createElement("div",{className:"jetpack-components-ai-control__input-wrapper"},g().createElement(n.PlainText,{value:i,onChange:_,placeholder:p,className:"jetpack-components-ai-control__input",disabled:P||r,ref:x})),i?.length>0&&g().createElement(a.Button,{icon:l.Z,className:"jetpack-components-ai-control__clear",onClick:()=>_("")}),g().createElement("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper"},P?g().createElement(a.Button,{className:L,onClick:j,isSmall:!0,label:__("Stop request","jetpack")},g().createElement(c.Z,{icon:l.Z}),y&&__("Stop","jetpack")):g().createElement(a.Button,{className:L,onClick:()=>C(i),isSmall:!0,disabled:!i?.length||r,label:__("Send request","jetpack")},g().createElement(c.Z,{icon:u.Z}),y&&__("Send","jetpack"))),h&&g().createElement("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper"},g().createElement(a.Button,{className:L,onClick:S,isSmall:!0,label:k},g().createElement(c.Z,{icon:d.Z}),y&&k))),T&&g().createElement(b.Eo,null))}))},22291:(e,t,r)=>{"use strict";r.d(t,{Eo:()=>b});var n=r(55609),a=r(69307),o=r(65736),s=r(30797),i=r(23435),l=r(79201),c=r(90496),u=r(61074);const __=o.__,d="warning",p="error",m="success",h="info",g={[d]:s.Z,[p]:i.Z,[m]:l.Z,[h]:c.Z};function f(e){let{severity:t=null,icon:r=null,children:n}=e;return React.createElement("div",{className:"jetpack-ai-assistant__message"},(t||r)&&React.createElement(u.Z,{icon:g[t]||r}),React.createElement("div",{className:"jetpack-ai-assistant__message-content"},n))}function b(){return React.createElement(f,{severity:h},(0,a.createInterpolateElement)(__("AI-generated content could be inaccurate or biased. <link>Learn more</link>","jetpack"),{link:React.createElement(n.ExternalLink,{href:"https://automattic.com/ai-guidelines"})}))}},11928:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(55609),a=r(65235),o=r.n(a),s=r(59822);function i(e){let{state:t,size:r=24}=e;return React.createElement("div",{className:o()("jetpack-ai-status-indicator__icon-wrapper",{[`is-${t}`]:!0})},React.createElement(n.Icon,{icon:s.u_,size:r}))}},58890:(e,t,r)=>{"use strict";r.d(t,{r:()=>a.Z,t:()=>n.Z});var n=r(4437),a=r(11928)},62282:(e,t,r)=>{"use strict";r.d(t,{h:()=>i,u:()=>s});var n=r(69307),a=r(99196),o=r.n(a);const s=(0,n.createContext)({}),i=e=>{let{value:t,children:r}=e;return o().createElement(s.Provider,{value:t,children:r})}},20281:(e,t,r)=>{"use strict";r.d(t,{X_:()=>o.Z,hE:()=>n.h,oN:()=>a.Z,uE:()=>n.u});var n=r(62282),a=r(3669),o=r(79466)},79466:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(69307),a=r(16700),o=r(20281);function s(){let{onDone:e,onSuggestion:t,onError:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s=(0,n.useContext)(o.uE),{eventSource:i}=s,l=(0,n.useCallback)((t=>e?.(t?.detail)),[e]),c=(0,n.useCallback)((e=>t?.(e?.detail)),[t]),u=(0,n.useCallback)((e=>{r?.(e?.detail)}),[]);return(0,n.useEffect)((()=>{if(i)return e&&i.addEventListener("done",l),t&&i.addEventListener("suggestion",c),r&&i.addEventListener(a.vF,u),()=>{i.removeEventListener("done",l),i.removeEventListener("suggestion",c),i.removeEventListener(a.vF,u)}}),[i]),s}},3669:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(94333),a=r(69307),o=r(99196),s=r.n(o),i=r(36222),l=r(20281);const c=(0,n.createHigherOrderComponent)((e=>t=>{const{suggestion:r,error:n,requestingState:o,request:c,stopSuggestion:u,eventSource:d}=(0,i.pw)(),p=(0,a.useMemo)((()=>({suggestion:r,requestingError:n,requestingState:o,eventSource:d,requestSuggestion:c,stopSuggestion:u})),[r,n,o,d,c,u]);return s().createElement(l.hE,{value:p},s().createElement(e,t))}),"withAiDataProvider")},42194:(e,t,r)=>{"use strict";r.d(t,{A:()=>u,Z:()=>d});var n=r(69307),a=r(65736),o=r(51128),s=r.n(o),i=r(67742),l=r(16700);const __=a.__,c=s()("jetpack-ai-client:use-suggestion");function u(e){switch(e){case l.$L:return{code:l.$L,message:__("You have reached the limit of requests for this site.","jetpack"),severity:"info"};case l.bC:return{code:l.bC,message:__("Your request was unclear. Mind trying again?","jetpack"),severity:"info"};case l.$u:return{code:l.$u,message:__("Jetpack AI services are currently unavailable. Sorry for the inconvenience.","jetpack"),severity:"info"};case l.q4:return{code:l.q4,message:__("This request has been flagged by our moderation system. Please try to rephrase it and try again.","jetpack"),severity:"info"};case l.co:default:return{code:l.co,message:__("It was not possible to process your request. Mind trying again?","jetpack"),severity:"info"}}}function d(){let{prompt:e,autoRequest:t=!1,askQuestionOptions:r={},onSuggestion:a,onDone:o,onError:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[d,p]=(0,n.useState)("init"),[m,h]=(0,n.useState)(""),[g,f]=(0,n.useState)(),b=(0,n.useRef)(void 0),v=(0,n.useCallback)((e=>{h(e?.detail),a?.(e?.detail)}),[a]),k=(0,n.useCallback)((e=>{o?.(e?.detail),p("done")}),[o]),y=(0,n.useCallback)((e=>{b?.current?.close(),p("error"),f(u(e)),s?.(u(e))}),[s]),E=(0,n.useCallback)((()=>y(l.$L)),[]),w=(0,n.useCallback)((()=>y(l.bC)),[]),_=(0,n.useCallback)((()=>y(l.$u)),[]),C=(0,n.useCallback)((()=>y(l.q4)),[]),j=(0,n.useCallback)((()=>y(l.co)),[]),S=(0,n.useCallback)((async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{...r};Array.isArray(e)&&e?.length?e.forEach(((t,r)=>{let{role:n,content:a}=t;return c("(%s/%s) %o\n%s",r+1,e.length,`[${n}]`,a)})):c("%o",e),p("requesting");try{if(b.current=await(0,i.Z)(e,t),!b?.current)return;const r=b.current;p("suggesting"),r.addEventListener("suggestion",v),r.addEventListener(l.$L,E),r.addEventListener(l.bC,w),r.addEventListener(l.$u,_),r.addEventListener(l.q4,C),r.addEventListener(l.co,j),r.addEventListener("done",k)}catch(e){console.error(e)}}),[k,E,w,_,C,j,v]),x=(0,n.useCallback)((()=>{if(!b?.current)return;const e=b?.current;e.close(),e.removeEventListener("suggestion",v),e.removeEventListener(l.$L,E),e.removeEventListener(l.bC,w),e.removeEventListener(l.$u,_),e.removeEventListener(l.q4,C),e.removeEventListener(l.co,j),e.removeEventListener("done",k),p("done")}),[b,v,E,w,_,C,j,k]);return(0,n.useEffect)((()=>{if(e?.length)return t&&S(e,r),()=>{x()}}),[t,e,S,x]),{suggestion:m,error:g,requestingState:d,request:S,stopSuggestion:x,eventSource:b.current}}},61317:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(55609),a=r(99196),o=r.n(a);const s=o().createElement(n.SVG,{viewBox:"0 0 32 32",width:"32",height:"32",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"ai-assistant-icon"},o().createElement(n.Path,{className:"spark-first",d:"M9.33301 5.33325L10.4644 8.20188L13.333 9.33325L10.4644 10.4646L9.33301 13.3333L8.20164 10.4646L5.33301 9.33325L8.20164 8.20188L9.33301 5.33325Z"}),o().createElement(n.Path,{className:"spark-second",d:"M21.3333 5.33333L22.8418 9.15817L26.6667 10.6667L22.8418 12.1752L21.3333 16L19.8248 12.1752L16 10.6667L19.8248 9.15817L21.3333 5.33333Z"}),o().createElement(n.Path,{className:"spark-third",d:"M14.6667 13.3333L16.5523 18.1144L21.3333 20L16.5523 21.8856L14.6667 26.6667L12.781 21.8856L8 20L12.781 18.1144L14.6667 13.3333Z"}))},59822:(e,t,r)=>{"use strict";r.d(t,{u_:()=>n.Z,v_:()=>a.Z});var n=r(61317),a=(r(4454),r(50500))},4454:(e,t,r)=>{"use strict";var n=r(55609),a=r(99196),o=r.n(a);n.SVG,n.Path,n.Path},50500:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(55609),a=r(99196),o=r.n(a);const s=o().createElement(n.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o().createElement(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.5 10C12.5 11.3807 11.3807 12.5 10 12.5C8.61929 12.5 7.5 11.3807 7.5 10C7.5 8.61929 8.61929 7.5 10 7.5C11.3807 7.5 12.5 8.61929 12.5 10ZM14 10C14 12.2091 12.2091 14 10 14C7.79086 14 6 12.2091 6 10C6 7.79086 7.79086 6 10 6C12.2091 6 14 7.79086 14 10ZM16.75 21V19C16.75 17.4812 15.5188 16.25 14 16.25L6 16.25C4.48122 16.25 3.25 17.4812 3.25 19V21H4.75L4.75 19C4.75 18.3096 5.30964 17.75 6 17.75L14 17.75C14.6904 17.75 15.25 18.3096 15.25 19V21H16.75Z",fill:"currentColor"}),o().createElement(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.976 16.3599C21.2507 14.5642 22.0001 12.3695 22.0001 9.99969C22.0001 7.63128 21.2515 5.43769 19.9782 3.64258L18.754 4.50967C19.8537 6.05996 20.5001 7.95434 20.5001 9.99969C20.5001 12.0464 19.8528 13.9419 18.7519 15.4928L19.976 16.3599ZM17.3357 14.4897C18.2357 13.222 18.7648 11.6727 18.7648 9.99969C18.7648 8.32808 18.2365 6.77984 17.3379 5.51279L16.1137 6.37988C16.8387 7.4021 17.2648 8.65114 17.2648 9.99969C17.2648 11.3496 16.8378 12.5998 16.1116 13.6226L17.3357 14.4897Z",fill:"currentColor"}))},2890:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(13419),a=r(86989),o=r.n(a),s=r(51128);const i=r.n(s)()("jetpack-ai-client:jwt"),l="jetpack-ai-jwt",c=12e4;async function u(){let{apiNonce:e,siteId:t,expirationTime:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=e||window.JP_CONNECTION_INITIAL_STATE.apiNonce,t=t||window.JP_CONNECTION_INITIAL_STATE.siteSuffix,r=r||c;const a=(0,n.Wp)(),s=localStorage.getItem(l);let u,d=null;if(s)try{d=JSON.parse(s)}catch(e){i("Error parsing token",e)}if(d&&d?.expire>Date.now())return i("Using cached token"),d;u=a?await o()({path:"/wpcom/v2/sites/"+t+"/jetpack-openai-query/jwt",method:"POST"}):await o()({path:"/jetpack/v4/jetpack-ai-jwt?_cacheBuster="+Date.now(),credentials:"same-origin",headers:{"X-WP-Nonce":e},method:"POST"});const p={token:u.token,blogId:a?t:u.blog_id,expire:Date.now()+r};return i("Storing new token"),localStorage.setItem(l,JSON.stringify(p)),p}},56694:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(90017),a=r.n(n),o=r(60400),s=r(51128),i=r.n(s),l=r(42194),c=r(2890),u=r(16700);const d=i()("jetpack-ai-client:suggestions-event-source");class p extends EventTarget{constructor(e){super(),a()(this,"fullMessage",void 0),a()(this,"fullFunctionCall",void 0),a()(this,"isPromptClear",void 0),a()(this,"controller",void 0),this.fullMessage="",this.fullFunctionCall={name:"",arguments:""},this.isPromptClear=!1,this.controller=new AbortController,this.initEventSource(e)}async initEventSource(e){let{url:t,question:r,token:n,options:a={}}=e;if(!n)try{d("Token was not provided, requesting one..."),n=(await(0,c.Z)()).token}catch(e){return void this.processErrorEvent(e)}const s={};if(a?.postId&&(s.post_id=a.postId),!t){const e=new URL("https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query");a?.fromCache&&e.searchParams.append("stream_cache","true"),t=e.toString(),d("URL not provided, using default: %o",t)}Array.isArray(r)?s.messages=r:s.question=r,a?.feature?.length&&(d("Feature: %o",a.feature),s.feature=a.feature),a?.functions?.length&&(d("Functions: %o",a.functions),s.functions=a.functions),await(0,o.L)(t,{openWhenHidden:!0,method:"POST",headers:{"Content-type":"application/json",Authorization:"Bearer "+n},body:JSON.stringify(s),onclose:()=>{d("Stream closed")},onerror:e=>{throw this.processErrorEvent(e),e},onmessage:e=>{this.processEvent(e)},onopen:async e=>{if(e.ok)return;let t;throw e.status>=400&&e.status<=500&&![422,429].includes(e.status)&&this.processConnectionError(e),503===e.status&&(t=u.$u,this.dispatchEvent(new CustomEvent(u.$u))),429===e.status&&(t=u.$L,this.dispatchEvent(new CustomEvent(u.$L))),422===e.status&&(t=u.q4,this.dispatchEvent(new CustomEvent(u.q4))),this.dispatchEvent(new CustomEvent(u.vF,{detail:(0,l.A)(t)})),new Error},signal:this.controller.signal})}checkForUnclearPrompt(){if(this.isPromptClear)return;const e=this.fullMessage.replace(/__|(\*\*)/g,"");e.startsWith("JETPACK_AI_ERROR")?(this.dispatchEvent(new CustomEvent(u.bC)),this.dispatchEvent(new CustomEvent(u.vF,{detail:(0,l.A)(u.bC)}))):"JETPACK_AI_ERROR".startsWith(e)?d(this.fullMessage):this.isPromptClear=!0}close(){this.controller.abort()}processEvent(e){var t;if("[DONE]"===e.data){if(this.fullMessage.length)return this.dispatchEvent(new CustomEvent("done",{detail:this.fullMessage})),void d("Done: %o",this.fullMessage);if(this.fullFunctionCall.name.length)return this.dispatchEvent(new CustomEvent("function_done",{detail:this.fullFunctionCall})),void d("Done: %o",this.fullFunctionCall)}let r;try{r=JSON.parse(e.data)}catch(t){return void d("Error parsing JSON",e,t)}const{delta:n}=null!==(t=r?.choices?.[0])&&void 0!==t?t:{delta:{content:null,function_call:null}},a=n.content,o=n.function_call;a&&(this.fullMessage+=a,this.checkForUnclearPrompt(),this.isPromptClear&&(this.dispatchEvent(new CustomEvent("chunk",{detail:a})),d("suggestion: %o",this.fullMessage),this.dispatchEvent(new CustomEvent("suggestion",{detail:this.fullMessage})))),o&&(null!=o.name&&(this.fullFunctionCall.name+=o.name),null!=o.arguments&&(this.fullFunctionCall.arguments+=o.arguments),this.dispatchEvent(new CustomEvent("functionCallChunk",{detail:this.fullFunctionCall})))}processConnectionError(e){d("Connection error: %o",e),this.dispatchEvent(new CustomEvent(u.co,{detail:e})),this.dispatchEvent(new CustomEvent(u.vF,{detail:(0,l.A)(u.co)}))}processErrorEvent(e){d("onerror: %o",e),this.dispatchEvent(new CustomEvent(u.co,{detail:e})),this.dispatchEvent(new CustomEvent(u.vF,{detail:(0,l.A)(u.co)}))}}},16700:(e,t,r)=>{"use strict";r.d(t,{$L:()=>a,$u:()=>n,bC:()=>i,co:()=>s,q4:()=>o,vF:()=>l});const n="error_service_unavailable",a="error_quota_exceeded",o="error_moderation",s="error_network",i="error_unclear_prompt",l="error_response"},6975:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51128);const a=r.n(n)()("dops:analytics");let o,s;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const i={initialize:function(e,t,r){i.setUser(e,t),i.setSuperProps(r),i.identifyUser()},setGoogleAnalyticsEnabled:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.googleAnalyticsEnabled=e,this.googleAnalyticsKey=t},setMcAnalyticsEnabled:function(e){this.mcAnalyticsEnabled=e},setUser:function(e,t){s={ID:e,username:t}},setSuperProps:function(e){o=e},assignSuperProps:function(e){o=Object.assign(o||{},e)},mc:{bumpStat:function(e,t){const r=function(e,t){let r="";if("object"==typeof e){for(const t in e)r+="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);a("Bumping stats %o",e)}else r="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),a('Bumping stat "%s" in group "%s"',t,e);return r}(e,t);i.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+r+"&t="+Math.random())},bumpStatWithPageView:function(e,t){const r=function(e,t){let r="";if("object"==typeof e){for(const t in e)r+="&"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);a("Built stats %o",e)}else r="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),a('Built stat "%s" in group "%s"',t,e);return r}(e,t);i.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+r+"&t="+Math.random())}},pageView:{record:function(e,t){i.tracks.recordPageView(e),i.ga.recordPageView(e,t)}},purchase:{record:function(e,t,r,n,a,o,s){i.ga.recordPurchase(e,t,r,n,a,o,s)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(o&&(a("- Super Props: %o",o),t=Object.assign(t,o)),a('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):a('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){const t="object"==typeof e?e:{target:e};i.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){i.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){a("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){let e={};i.ga.initialized||(s&&(e={userId:"u-"+s.ID}),window.ga("create",this.googleAnalyticsKey,"auto",e),i.ga.initialized=!0)},recordPageView:function(e,t){i.ga.initialize(),a("Recording Page View ~ [URL: "+e+"] [Title: "+t+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",e),window.ga("send",{hitType:"pageview",page:e,title:t}))},recordEvent:function(e,t,r,n){i.ga.initialize();let o="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==r&&(o+=" [Option Label: "+r+"]"),void 0!==n&&(o+=" [Option Value: "+n+"]"),a(o),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,r,n)},recordPurchase:function(e,t,r,n,a,o,s){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:n,currency:s}),window.ga("ecommerce:addItem",{id:e,name:t,sku:r,price:a,quantity:o}),window.ga("ecommerce:send")}},identifyUser:function(){s&&window._tkq.push(["identifyUser",s.ID,s.username])},setProperties:function(e){window._tkq.push(["setProperties",e])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}},l=i},64743:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>d});var n=r(61132),a=r(96483);function o(e){class t extends Error{constructor(){super(...arguments),this.name=e}}return t}const s=o("JsonParseError"),i=o("JsonParseAfterRedirectError"),l=o("Api404Error"),c=o("Api404AfterRedirectError"),u=o("FetchNetworkError");const d=new function(e,t){let r=e,o=e,s={"X-WP-Nonce":t},i={credentials:"same-origin",headers:s},l={method:"post",credentials:"same-origin",headers:Object.assign({},s,{"Content-type":"application/json"})},c=function(e){const t=e.split("?"),r=t.length>1?t[1]:"",n=r.length?r.split("&"):[];return n.push("_cacheBuster="+(new Date).getTime()),t[0]+"?"+n.join("&")};const u={setApiRoot(e){r=e},setWpcomOriginApiUrl(e){o=e},setApiNonce(e){s={"X-WP-Nonce":e},i={credentials:"same-origin",headers:s},l={method:"post",credentials:"same-origin",headers:Object.assign({},s,{"Content-type":"application/json"})}},setCacheBusterCallback:e=>{c=e},registerSite:(e,t)=>{const a={registration_nonce:e,no_iframe:!0};return(0,n.jetpackConfigHas)("consumer_slug")&&(a.plugin_slug=(0,n.jetpackConfigGet)("consumer_slug")),null!==t&&(a.redirect_uri=t),h(`${r}jetpack/v4/connection/register`,l,{body:JSON.stringify(a)}).then(p).then(m)},fetchAuthorizationUrl:e=>d((0,a.addQueryArgs)(`${r}jetpack/v4/connection/authorize_url`,{no_iframe:"1",redirect_uri:e}),i).then(p).then(m),fetchSiteConnectionData:()=>d(`${r}jetpack/v4/connection/data`,i).then(m),fetchSiteConnectionStatus:()=>d(`${r}jetpack/v4/connection`,i).then(m),fetchSiteConnectionTest:()=>d(`${r}jetpack/v4/connection/test`,i).then(p).then(m),fetchUserConnectionData:()=>d(`${r}jetpack/v4/connection/data`,i).then(m),fetchUserTrackingSettings:()=>d(`${r}jetpack/v4/tracking/settings`,i).then(p).then(m),updateUserTrackingSettings:e=>h(`${r}jetpack/v4/tracking/settings`,l,{body:JSON.stringify(e)}).then(p).then(m),disconnectSite:()=>h(`${r}jetpack/v4/connection`,l,{body:JSON.stringify({isActive:!1})}).then(p).then(m),fetchConnectUrl:()=>d(`${r}jetpack/v4/connection/url`,i).then(p).then(m),unlinkUser:()=>h(`${r}jetpack/v4/connection/user`,l,{body:JSON.stringify({linked:!1})}).then(p).then(m),reconnect:()=>h(`${r}jetpack/v4/connection/reconnect`,l).then(p).then(m),fetchConnectedPlugins:()=>d(`${r}jetpack/v4/connection/plugins`,i).then(p).then(m),setHasSeenWCConnectionModal:()=>h(`${r}jetpack/v4/seen-wc-connection-modal`,l).then(p).then(m),fetchModules:()=>d(`${r}jetpack/v4/module/all`,i).then(p).then(m),fetchModule:e=>d(`${r}jetpack/v4/module/${e}`,i).then(p).then(m),activateModule:e=>h(`${r}jetpack/v4/module/${e}/active`,l,{body:JSON.stringify({active:!0})}).then(p).then(m),deactivateModule:e=>h(`${r}jetpack/v4/module/${e}/active`,l,{body:JSON.stringify({active:!1})}),updateModuleOptions:(e,t)=>h(`${r}jetpack/v4/module/${e}`,l,{body:JSON.stringify(t)}).then(p).then(m),updateSettings:e=>h(`${r}jetpack/v4/settings`,l,{body:JSON.stringify(e)}).then(p).then(m),getProtectCount:()=>d(`${r}jetpack/v4/module/protect/data`,i).then(p).then(m),resetOptions:e=>h(`${r}jetpack/v4/options/${e}`,l,{body:JSON.stringify({reset:!0})}).then(p).then(m),activateVaultPress:()=>h(`${r}jetpack/v4/plugins`,l,{body:JSON.stringify({slug:"vaultpress",status:"active"})}).then(p).then(m),getVaultPressData:()=>d(`${r}jetpack/v4/module/vaultpress/data`,i).then(p).then(m),installPlugin:(e,t)=>{const n={slug:e,status:"active"};return t&&(n.source=t),h(`${r}jetpack/v4/plugins`,l,{body:JSON.stringify(n)}).then(p).then(m)},activateAkismet:()=>h(`${r}jetpack/v4/plugins`,l,{body:JSON.stringify({slug:"akismet",status:"active"})}).then(p).then(m),getAkismetData:()=>d(`${r}jetpack/v4/module/akismet/data`,i).then(p).then(m),checkAkismetKey:()=>d(`${r}jetpack/v4/module/akismet/key/check`,i).then(p).then(m),checkAkismetKeyTyped:e=>h(`${r}jetpack/v4/module/akismet/key/check`,l,{body:JSON.stringify({api_key:e})}).then(p).then(m),fetchStatsData:e=>d(function(e){let t=`${r}jetpack/v4/module/stats/data`;-1!==t.indexOf("?")?t+=`&range=${encodeURIComponent(e)}`:t+=`?range=${encodeURIComponent(e)}`;return t}(e),i).then(p).then(m).then(f),getPluginUpdates:()=>d(`${r}jetpack/v4/updates/plugins`,i).then(p).then(m),getPlans:()=>d(`${r}jetpack/v4/plans`,i).then(p).then(m),fetchSettings:()=>d(`${r}jetpack/v4/settings`,i).then(p).then(m),updateSetting:e=>h(`${r}jetpack/v4/settings`,l,{body:JSON.stringify(e)}).then(p).then(m),fetchSiteData:()=>d(`${r}jetpack/v4/site`,i).then(p).then(m).then((e=>JSON.parse(e.data))),fetchSiteFeatures:()=>d(`${r}jetpack/v4/site/features`,i).then(p).then(m).then((e=>JSON.parse(e.data))),fetchSiteProducts:()=>d(`${r}jetpack/v4/site/products`,i).then(p).then(m),fetchSitePurchases:()=>d(`${r}jetpack/v4/site/purchases`,i).then(p).then(m).then((e=>JSON.parse(e.data))),fetchSiteBenefits:()=>d(`${r}jetpack/v4/site/benefits`,i).then(p).then(m).then((e=>JSON.parse(e.data))),fetchSiteDiscount:()=>d(`${r}jetpack/v4/site/discount`,i).then(p).then(m).then((e=>e.data)),fetchSetupQuestionnaire:()=>d(`${r}jetpack/v4/setup/questionnaire`,i).then(p).then(m),fetchRecommendationsData:()=>d(`${r}jetpack/v4/recommendations/data`,i).then(p).then(m),fetchRecommendationsProductSuggestions:()=>d(`${r}jetpack/v4/recommendations/product-suggestions`,i).then(p).then(m),fetchRecommendationsUpsell:()=>d(`${r}jetpack/v4/recommendations/upsell`,i).then(p).then(m),fetchRecommendationsConditional:()=>d(`${r}jetpack/v4/recommendations/conditional`,i).then(p).then(m),saveRecommendationsData:e=>h(`${r}jetpack/v4/recommendations/data`,l,{body:JSON.stringify({data:e})}).then(p),fetchProducts:()=>d(`${r}jetpack/v4/products`,i).then(p).then(m),fetchRewindStatus:()=>d(`${r}jetpack/v4/rewind`,i).then(p).then(m).then((e=>JSON.parse(e.data))),fetchScanStatus:()=>d(`${r}jetpack/v4/scan`,i).then(p).then(m).then((e=>JSON.parse(e.data))),dismissJetpackNotice:e=>h(`${r}jetpack/v4/notice/${e}`,l,{body:JSON.stringify({dismissed:!0})}).then(p).then(m),fetchPluginsData:()=>d(`${r}jetpack/v4/plugins`,i).then(p).then(m),fetchIntroOffers:()=>d(`${r}jetpack/v4/intro-offers`,i).then(p).then(m),fetchVerifySiteGoogleStatus:e=>d(null!==e?`${r}jetpack/v4/verify-site/google/${e}`:`${r}jetpack/v4/verify-site/google`,i).then(p).then(m),verifySiteGoogle:e=>h(`${r}jetpack/v4/verify-site/google`,l,{body:JSON.stringify({keyring_id:e})}).then(p).then(m),submitSurvey:e=>h(`${r}jetpack/v4/marketing/survey`,l,{body:JSON.stringify(e)}).then(p).then(m),saveSetupQuestionnaire:e=>h(`${r}jetpack/v4/setup/questionnaire`,l,{body:JSON.stringify(e)}).then(p).then(m),updateLicensingError:e=>h(`${r}jetpack/v4/licensing/error`,l,{body:JSON.stringify(e)}).then(p).then(m),updateLicenseKey:e=>h(`${r}jetpack/v4/licensing/set-license`,l,{body:JSON.stringify({license:e})}).then(p).then(m),getUserLicensesCounts:()=>d(`${r}jetpack/v4/licensing/user/counts`,i).then(p).then(m),getUserLicenses:()=>d(`${r}jetpack/v4/licensing/user/licenses`,i).then(p).then(m),updateLicensingActivationNoticeDismiss:e=>h(`${r}jetpack/v4/licensing/user/activation-notice-dismiss`,l,{body:JSON.stringify({last_detached_count:e})}).then(p).then(m),updateRecommendationsStep:e=>h(`${r}jetpack/v4/recommendations/step`,l,{body:JSON.stringify({step:e})}).then(p),confirmIDCSafeMode:()=>h(`${r}jetpack/v4/identity-crisis/confirm-safe-mode`,l).then(p),startIDCFresh:e=>h(`${r}jetpack/v4/identity-crisis/start-fresh`,l,{body:JSON.stringify({redirect_uri:e})}).then(p).then(m),migrateIDC:()=>h(`${r}jetpack/v4/identity-crisis/migrate`,l).then(p),attachLicenses:e=>h(`${r}jetpack/v4/licensing/attach-licenses`,l,{body:JSON.stringify({licenses:e})}).then(p).then(m),fetchSearchPlanInfo:()=>d(`${o}jetpack/v4/search/plan`,i).then(p).then(m),fetchSearchSettings:()=>d(`${o}jetpack/v4/search/settings`,i).then(p).then(m),updateSearchSettings:e=>h(`${o}jetpack/v4/search/settings`,l,{body:JSON.stringify(e)}).then(p).then(m),fetchSearchStats:()=>d(`${o}jetpack/v4/search/stats`,i).then(p).then(m),fetchWafSettings:()=>d(`${r}jetpack/v4/waf`,i).then(p).then(m),updateWafSettings:e=>h(`${r}jetpack/v4/waf`,l,{body:JSON.stringify(e)}).then(p).then(m),fetchWordAdsSettings:()=>d(`${r}jetpack/v4/wordads/settings`,i).then(p).then(m),updateWordAdsSettings:e=>h(`${r}jetpack/v4/wordads/settings`,l,{body:JSON.stringify(e)}),fetchSearchPricing:()=>d(`${o}jetpack/v4/search/pricing`,i).then(p).then(m),fetchMigrationStatus:()=>d(`${r}jetpack/v4/migration/status`,i).then(p).then(m),fetchBackupUndoEvent:()=>d(`${r}jetpack/v4/site/backup/undo-event`,i).then(p).then(m)};function d(e,t){return fetch(c(e),t)}function h(e,t,r){return fetch(e,Object.assign({},t,r)).catch(g)}function f(e){return e.general&&void 0===e.general.response||e.week&&void 0===e.week.response||e.month&&void 0===e.month.response?e:{}}Object.assign(this,u)};function p(e){return e.status>=200&&e.status<300?e:404===e.status?new Promise((()=>{throw e.redirected?new c(e.redirected):new l})):e.json().catch((e=>h(e))).then((t=>{const r=new Error(`${t.message} (Status ${e.status})`);throw r.response=t,r.name="ApiError",r}))}function m(e){return e.json().catch((t=>h(t,e.redirected,e.url)))}function h(e,t,r){throw t?new i(r):new s}function g(){throw new u}},90526:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h});var n=r(82674),a=r.n(n),o=r(55609),s=r(61074),i=r(15381),l=r(65235),c=r.n(l),u=r(99196),d=r.n(u),p=r(62103);const m=(0,u.forwardRef)(((e,t)=>{const{children:r,variant:n="primary",size:l="normal",weight:u="bold",icon:m,iconSize:h,disabled:g,isDestructive:f,isLoading:b,isExternalLink:v,className:k,text:y,fullWidth:E,...w}=e,_=c()(p.Z.button,k,{[p.Z.normal]:"normal"===l,[p.Z.small]:"small"===l,[p.Z.icon]:Boolean(m),[p.Z.loading]:b,[p.Z.regular]:"regular"===u,[p.Z["full-width"]]:E,[p.Z["is-icon-button"]]:Boolean(m)&&!r});w.ref=t;const C="normal"===l?20:16,j=v&&d().createElement(s.Z,{size:C,icon:i.Z,className:p.Z["external-icon"]}),S=v?"_blank":void 0,x=r?.[0]&&null!==r[0]&&"components-tooltip"!==r?.[0]?.props?.className;return d().createElement(o.Button,a()({target:S,variant:n,className:c()(_,{"has-text":!!m&&x}),icon:v?void 0:m,iconSize:h,disabled:g,"aria-disabled":g,isDestructive:f,text:y},w),b&&d().createElement(o.Spinner,null),d().createElement("span",null,r),j)}));m.displayName="Button";const h=m},3396:(e,t,r)=>{"use strict";r.d(t,{av:()=>p});var n=r(82674),a=r.n(n),o=r(55609),s=r(65235),i=r.n(s),l=r(45460);const c=e=>{let{className:t,size:r=24,viewBox:n="0 0 24 24",opacity:s=1,color:c="#2C3338",children:u}=e;const d={className:i()(l.Z.iconWrapper,t),width:r,height:r,viewBox:n,opacity:s,fill:void 0};return c&&(d.fill=c),React.createElement(o.SVG,a()({},d,{fillRule:"evenodd",clipRule:"evenodd",xmlns:"http://www.w3.org/2000/svg"}),React.createElement(o.G,{opacity:s},u))},u=e=>{let{className:t,fill:r="none",size:n,children:a}=e;return React.createElement(c,{className:i()(l.Z.socialIcon,t),size:n,color:r},a)},d={...{"anti-spam":e=>{let{opacity:t=1,size:r,color:n}=e;return React.createElement(c,{size:r,opacity:t,color:n},React.createElement(o.Path,{d:"M13.2,4.7l4.7,12.8c0.4,1.1,1,1.5,2.1,1.6c0.1,0,0.1,0,0.1,0l0.1,0.1l0.1,0.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.1 s0,0.1-0.1,0.1c-0.1,0-0.1,0.1-0.1,0.1s-0.1,0-0.2,0h-5.1c-0.1,0-0.1,0-0.2,0c-0.1,0-0.1-0.1-0.1-0.1l-0.1-0.1c0-0.1,0-0.1,0-0.1 c0-0.1,0-0.1,0-0.2s0-0.1,0.1-0.1l0.1-0.1c0,0,0.1,0,0.2,0c0.5,0,1.1-0.2,1.1-0.8c0-0.3-0.1-0.5-0.2-0.8l-1.1-3.1 c-0.1-0.2-0.1-0.2-0.2-0.2h-4.3c-0.7,0-1.5,0-1.9,0.9l-1.1,2.4C7.1,17.6,7,17.8,7,18.1c0,0.8,1,0.9,1.6,0.9c0.1,0,0.1,0,0.2,0 L8.8,19l0.1,0.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.1s-0.1,0.1-0.1,0.1l-0.1,0.1c-0.1,0-0.1,0-0.2,0H4.1c-0.1,0-0.1,0-0.1,0 c-0.1,0-0.1-0.1-0.1-0.1l-0.1-0.1c0-0.1,0-0.1,0-0.1c0-0.1,0-0.1,0-0.2s0-0.1,0.1-0.1L4,19c0,0,0.1,0,0.1,0C5.2,19,5.5,18.5,6,17.5 l5.4-12.4c0.2-0.5,0.8-1,1.3-1C13,4.2,13.1,4.4,13.2,4.7z M9.1,13.1c0,0.1-0.1,0.1-0.1,0.2c0,0.1,0.1,0.1,0.1,0.1h4.4 c0.3,0,0.4-0.1,0.4-0.3c0-0.1,0-0.2-0.1-0.3l-1.2-3.5c-0.3-0.8-0.8-1.9-0.8-2.7c0-0.1,0-0.1-0.1-0.1c0,0-0.1,0-0.1,0.1 c-0.1,0.6-0.4,1.2-0.7,1.7L9.1,13.1z"}),React.createElement(o.Path,{d:"M13.2,4.7l4.7,12.8c0.4,1.1,1,1.5,2.1,1.6c0.1,0,0.1,0,0.1,0l0.1,0.1l0.1,0.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.1 s0,0.1-0.1,0.1c-0.1,0-0.1,0.1-0.1,0.1s-0.1,0-0.2,0h-5.1c-0.1,0-0.1,0-0.2,0c-0.1,0-0.1-0.1-0.1-0.1l-0.1-0.1c0-0.1,0-0.1,0-0.1 c0-0.1,0-0.1,0-0.2s0-0.1,0.1-0.1l0.1-0.1c0,0,0.1,0,0.2,0c0.5,0,1.1-0.2,1.1-0.8c0-0.3-0.1-0.5-0.2-0.8l-1.1-3.1 c-0.1-0.2-0.1-0.2-0.2-0.2h-4.3c-0.7,0-1.5,0-1.9,0.9l-1.1,2.4C7.1,17.6,7,17.8,7,18.1c0,0.8,1,0.9,1.6,0.9c0.1,0,0.1,0,0.2,0 L8.8,19l0.1,0.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.1s-0.1,0.1-0.1,0.1l-0.1,0.1c-0.1,0-0.1,0-0.2,0H4.1c-0.1,0-0.1,0-0.1,0 c-0.1,0-0.1-0.1-0.1-0.1l-0.1-0.1c0-0.1,0-0.1,0-0.1c0-0.1,0-0.1,0-0.2s0-0.1,0.1-0.1L4,19c0,0,0.1,0,0.1,0C5.2,19,5.5,18.5,6,17.5 l5.4-12.4c0.2-0.5,0.8-1,1.3-1C13,4.2,13.1,4.4,13.2,4.7z M9.1,13.1c0,0.1-0.1,0.1-0.1,0.2c0,0.1,0.1,0.1,0.1,0.1h4.4 c0.3,0,0.4-0.1,0.4-0.3c0-0.1,0-0.2-0.1-0.3l-1.2-3.5c-0.3-0.8-0.8-1.9-0.8-2.7c0-0.1,0-0.1-0.1-0.1c0,0-0.1,0-0.1,0.1 c-0.1,0.6-0.4,1.2-0.7,1.7L9.1,13.1z"}),React.createElement(o.Path,{d:"M21.6,12.5c0,0.6-0.3,1-0.9,1c-0.6,0-0.8-0.3-0.8-0.8c0-0.6,0.4-1,0.9-1C21.3,11.7,21.6,12.1,21.6,12.5z"}),React.createElement(o.Path,{d:"M4.1,12.5c0,0.6-0.3,1-0.9,1s-0.8-0.3-0.8-0.8c0-0.6,0.4-1,0.9-1S4.1,12.1,4.1,12.5z"}))},backup:e=>{let{opacity:t=1,size:r,color:n}=e;return React.createElement(c,{size:r,opacity:t,color:n},React.createElement(o.Path,{d:"M2.1,5.8c0-0.1,0-0.1,0-0.2c0-0.2,0.1-0.5,0.1-0.7c0.1-0.4,0.4-0.6,0.7-0.8l8.3-2.9c0.1-0.1,0.3-0.1,0.4-0.1l0.5,0.1 l8.3,2.9c0.3,0.2,0.5,0.4,0.7,0.7c0.2,0.2,0.2,0.4,0.2,0.7c0,0.1,0,0.1,0,0.2v0.1c-0.1,0.5-0.2,0.9-0.3,1.4 c-0.2,0.4-0.3,1.2-0.7,2.2c-0.3,1-0.7,2.1-1.1,3.1c-0.5,1-1,2.1-1.6,3.3s-1.4,2.3-2.2,3.5c-0.9,1.1-1.8,2.2-2.8,3.1 c-0.2,0.2-0.5,0.4-0.9,0.4c-0.3,0-0.6-0.1-0.9-0.4c-1.2-1.1-2.4-2.4-3.5-4c-1-1.6-1.9-3-2.5-4.3c-0.6-1.3-1.1-2.7-1.6-4 C2.8,8.7,2.5,7.6,2.3,7C2.3,6.5,2.1,6.1,2.1,5.8z M2.9,5.9c0,0.2,0.1,0.4,0.1,0.8C3.1,7,3.2,7.5,3.5,8.2C3.7,9,3.9,9.7,4.2,10.6 c0.3,0.7,0.7,1.7,1.1,2.7c0.4,1,1,2,1.5,2.9c0.5,1,1.2,1.9,1.9,2.9c0.8,1,1.6,1.9,2.4,2.6c0.2,0.2,0.4,0.2,0.5,0.2 c0.2,0,0.4-0.1,0.5-0.2c1.2-1,2.2-2.3,3.2-3.8c1-1.5,1.8-2.8,2.3-4c0.6-1.3,1.1-2.5,1.5-3.9c0.4-1.3,0.7-2.2,0.9-2.8 c0.1-0.5,0.2-1,0.3-1.3c0-0.1,0-0.1,0-0.1c0-0.2,0-0.3-0.1-0.4C20.3,5.2,20.2,5.1,20,5L12,2.1c0,0-0.1,0-0.2,0s-0.1,0-0.1,0h-0.2 l-8,2.8C3.2,5,3.1,5.2,3,5.3C2.9,5.5,2.9,5.6,2.9,5.8C2.9,5.8,2.9,5.8,2.9,5.9z M5.9,6.7h3l2.8,7l2.8-7h3c-0.1,0.1-0.2,0.5-0.3,0.8 C17,7.8,17,8.2,16.8,8.4c-0.1,0.3-0.2,0.5-0.4,0.8c0,0.1-0.1,0.1-0.1,0.1s-0.1,0.1-0.2,0.1c-0.1,0-0.1,0-0.1,0 c-0.1,0-0.2,0.1-0.2,0.2c0,0-0.1,0.1-0.1,0.1s-0.1,0.1-0.1,0.1c0,0,0,0.1-0.1,0.2c0,0.1-0.1,0.1-0.1,0.1l-0.4,1.1 c-1.3,3.3-2.1,5.2-2.3,5.8h-2.2l-1-2.4c-0.1-0.3-0.3-0.8-0.5-1.3c-0.1-0.3-0.3-0.8-0.5-1.3L8,10.8c-0.1-0.1-0.1-0.2-0.1-0.4 C7.8,10.2,7.7,10,7.7,9.8C7.6,9.7,7.5,9.5,7.4,9.4C7.3,9.3,7.3,9.3,7.3,9.3c-0.1,0-0.2,0-0.2,0s-0.1,0-0.1,0 C6.6,8.5,6.3,7.6,5.9,6.7z"}))},boost:e=>{let{opacity:t=1,size:r,color:n}=e;return React.createElement(c,{size:r,opacity:t,color:n},React.createElement(o.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M4.19505 16.2545C4.47368 16.561 4.94802 16.5836 5.25451 16.3049L10.2595 11.7549L14.2842 15.2765L19 10.5607V13.75H20.5V9.5V8.75239V8.7476V8H19.7529H19.7471H19H14.75V9.5H17.9393L14.2158 13.2235L10.2405 9.74507L4.2455 15.195C3.93901 15.4737 3.91642 15.948 4.19505 16.2545Z"}))},crm:e=>{let{opacity:t=1,size:r,color:n}=e;return React.createElement(c,{size:r,opacity:t,color:n},React.createElement(o.Path,{d:"M15.5 9.5a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 1.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Zm-2.25 6v-2a2.75 2.75 0 0 0-2.75-2.75h-4A2.75 2.75 0 0 0 3.75 15v2h1.5v-2c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v2h1.5Zm7-2v2h-1.5v-2c0-.69-.56-1.25-1.25-1.25H15v-1.5h2.5A2.75 2.75 0 0 1 20.25 15ZM9.5 8.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm1.5 0a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0Z"}))},extras:e=>{let{opacity:t=1,size:r,color:n}=e;return React.createElement(c,{size:r,opacity:t,color:n},React.createElement(o.Path,{d:"M18.5 5.5V8H20V5.5h2.5V4H20V1.5h-1.5V4H16v1.5h2.5ZM12 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-6h-1.5v6a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h6V4Z"}))},protect:e=>{let{opacity:t=1,size:r,className:n,color:a}=e;return React.createElement(c,{className:n,size:r,opacity:t,color:a},React.createElement(o.Path,{d:"M12 3.17627L18.75 6.24445V10.8183C18.75 14.7173 16.2458 18.4089 12.7147 19.5735C12.2507 19.7265 11.7493 19.7265 11.2853 19.5735C7.75416 18.4089 5.25 14.7173 5.25 10.8183V6.24445L12 3.17627ZM6.75 7.21032V10.8183C6.75 14.1312 8.89514 17.2057 11.7551 18.149C11.914 18.2014 12.086 18.2014 12.2449 18.149C15.1049 17.2057 17.25 14.1312 17.25 10.8183V7.21032L12 4.82396L6.75 7.21032Z"}),React.createElement(o.Path,{d:"M15.5291 10.0315L11.1818 14.358L8.47095 11.66L9.52907 10.5968L11.1818 12.2417L14.4709 8.96826L15.5291 10.0315Z"}))},scan:e=>{let{opacity:t=1,size:r,color:n}=e;return React.createElement(c,{size:r,opacity:t,color:n},React.createElement(o.Path,{d:"m12 3.176 6.75 3.068v4.574c0 3.9-2.504 7.59-6.035 8.755a2.283 2.283 0 0 1-1.43 0c-3.53-1.164-6.035-4.856-6.035-8.755V6.244L12 3.176ZM6.75 7.21v3.608c0 3.313 2.145 6.388 5.005 7.33.159.053.331.053.49 0 2.86-.942 5.005-4.017 5.005-7.33V7.21L12 4.824 6.75 7.21Z"}))},search:e=>{let{opacity:t=1,size:r,color:n}=e;return React.createElement(c,{size:r,opacity:t,color:n},React.createElement(o.Path,{d:"M17.5 11.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm1.5 0a5.5 5.5 0 0 1-9.142 4.121l-3.364 2.943-.988-1.128 3.373-2.952A5.5 5.5 0 1 1 19 11.5Z"}))},social:e=>{let{opacity:t=1,size:r,color:n}=e;return React.createElement(c,{size:r,opacity:t,color:n},React.createElement(o.Path,{d:"M15.5 3.97809V18.0219L7.5 15.5977V20H6V15.1431L3.27498 14.3173C2.22086 13.9979 1.5 13.0262 1.5 11.9248V10.0752C1.5 8.97375 2.22087 8.00207 3.27498 7.68264L15.5 3.97809ZM14 16L7.5 14.0303L7.5 7.96969L14 5.99999V16ZM6 8.42423L6 13.5757L3.70999 12.8818C3.28835 12.754 3 12.3654 3 11.9248V10.0752C3 9.63462 3.28835 9.24595 3.70999 9.11818L6 8.42423ZM17.5 11.75H21.5V10.25H17.5V11.75ZM21.5 16L17.5 15V13.5L21.5 14.5V16ZM17.5 8.5L21.5 7.5V6L17.5 7V8.5Z"}))},star:e=>{let{size:t,className:r=l.Z["star-icon"],color:n}=e;return React.createElement(c,{className:r,size:t,color:n},React.createElement(o.Path,{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.89 5.82 21l2.002-7.14L2 9.256l7.418-.304"}))},videopress:e=>{let{opacity:t=1,size:r,color:n}=e;return React.createElement(c,{size:r,opacity:t,color:n},React.createElement(o.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M4.3,6.2c0.8,0,1.6,0.6,1.8,1.4l2.3,7.9c0,0,0,0,0,0l2.7-9.3h1.5h4.2c2.9,0,4.9,1.9,4.9,4.7c0,2.9-2,4.7-5,4.7 h-2h-2.5l-0.5,1.5c-0.4,1.4-1.7,2.3-3.2,2.3c-1.4,0-2.7-0.9-3.2-2.3L2.5,8.7C2.1,7.4,3,6.2,4.3,6.2z M13,12.8h2.9c1.3,0,2-0.7,2-1.9 c0-1.2-0.8-1.8-2-1.8h-1.7L13,12.8z"}))},jetpack:e=>{let{size:t,className:r=l.Z.jetpack,color:n}=e;return React.createElement(c,{className:r,size:t,color:n,viewBox:"0 0 32 32"},React.createElement(o.Path,{className:"jetpack-logo__icon-circle",d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z"}),React.createElement(o.Polygon,{fill:"#fff",points:"15,19 7,19 15,3"}),React.createElement(o.Polygon,{fill:"#fff",points:"17,29 17,13 25,13"}))}},...{facebook:e=>{let{fill:t,size:r,className:n}=e;return React.createElement(u,{fill:t,size:r,className:i()(l.Z.facebook,n)},React.createElement(o.Path,{d:"M12,2C6.5,2,2,6.5,2,12c0,5,3.7,9.1,8.4,9.9v-7H7.9V12h2.5V9.8c0-2.5,1.5-3.9,3.8-3.9c1.1,0,2.2,0.2,2.2,0.2v2.5h-1.3 c-1.2,0-1.6,0.8-1.6,1.6V12h2.8l-0.4,2.9h-2.3v7C18.3,21.1,22,17,22,12C22,6.5,17.5,2,12,2z"}))},instagram:e=>{let{fill:t,size:r,className:n}=e;return React.createElement(u,{fill:t,size:r,className:i()(l.Z.instagram,n)},React.createElement(o.Path,{d:"M12,4.622c2.403,0,2.688,0.009,3.637,0.052c0.877,0.04,1.354,0.187,1.671,0.31c0.42,0.163,0.72,0.358,1.035,0.673 c0.315,0.315,0.51,0.615,0.673,1.035c0.123,0.317,0.27,0.794,0.31,1.671c0.043,0.949,0.052,1.234,0.052,3.637 s-0.009,2.688-0.052,3.637c-0.04,0.877-0.187,1.354-0.31,1.671c-0.163,0.42-0.358,0.72-0.673,1.035 c-0.315,0.315-0.615,0.51-1.035,0.673c-0.317,0.123-0.794,0.27-1.671,0.31c-0.949,0.043-1.233,0.052-3.637,0.052 s-2.688-0.009-3.637-0.052c-0.877-0.04-1.354-0.187-1.671-0.31c-0.42-0.163-0.72-0.358-1.035-0.673 c-0.315-0.315-0.51-0.615-0.673-1.035c-0.123-0.317-0.27-0.794-0.31-1.671C4.631,14.688,4.622,14.403,4.622,12 s0.009-2.688,0.052-3.637c0.04-0.877,0.187-1.354,0.31-1.671c0.163-0.42,0.358-0.72,0.673-1.035 c0.315-0.315,0.615-0.51,1.035-0.673c0.317-0.123,0.794-0.27,1.671-0.31C9.312,4.631,9.597,4.622,12,4.622 M12,3 C9.556,3,9.249,3.01,8.289,3.054C7.331,3.098,6.677,3.25,6.105,3.472C5.513,3.702,5.011,4.01,4.511,4.511 c-0.5,0.5-0.808,1.002-1.038,1.594C3.25,6.677,3.098,7.331,3.054,8.289C3.01,9.249,3,9.556,3,12c0,2.444,0.01,2.751,0.054,3.711 c0.044,0.958,0.196,1.612,0.418,2.185c0.23,0.592,0.538,1.094,1.038,1.594c0.5,0.5,1.002,0.808,1.594,1.038 c0.572,0.222,1.227,0.375,2.185,0.418C9.249,20.99,9.556,21,12,21s2.751-0.01,3.711-0.054c0.958-0.044,1.612-0.196,2.185-0.418 c0.592-0.23,1.094-0.538,1.594-1.038c0.5-0.5,0.808-1.002,1.038-1.594c0.222-0.572,0.375-1.227,0.418-2.185 C20.99,14.751,21,14.444,21,12s-0.01-2.751-0.054-3.711c-0.044-0.958-0.196-1.612-0.418-2.185c-0.23-0.592-0.538-1.094-1.038-1.594 c-0.5-0.5-1.002-0.808-1.594-1.038c-0.572-0.222-1.227-0.375-2.185-0.418C14.751,3.01,14.444,3,12,3L12,3z M12,7.378 c-2.552,0-4.622,2.069-4.622,4.622S9.448,16.622,12,16.622s4.622-2.069,4.622-4.622S14.552,7.378,12,7.378z M12,15 c-1.657,0-3-1.343-3-3s1.343-3,3-3s3,1.343,3,3S13.657,15,12,15z M16.804,6.116c-0.596,0-1.08,0.484-1.08,1.08 s0.484,1.08,1.08,1.08c0.596,0,1.08-0.484,1.08-1.08S17.401,6.116,16.804,6.116z"}))},twitter:e=>{let{fill:t,size:r,className:n}=e;return React.createElement(u,{fill:t,size:r,className:i()(l.Z.twitter,n)},React.createElement(o.Path,{d:"M22.23,5.924c-0.736,0.326-1.527,0.547-2.357,0.646c0.847-0.508,1.498-1.312,1.804-2.27 c-0.793,0.47-1.671,0.812-2.606,0.996C18.324,4.498,17.257,4,16.077,4c-2.266,0-4.103,1.837-4.103,4.103 c0,0.322,0.036,0.635,0.106,0.935C8.67,8.867,5.647,7.234,3.623,4.751C3.27,5.357,3.067,6.062,3.067,6.814 c0,1.424,0.724,2.679,1.825,3.415c-0.673-0.021-1.305-0.206-1.859-0.513c0,0.017,0,0.034,0,0.052c0,1.988,1.414,3.647,3.292,4.023 c-0.344,0.094-0.707,0.144-1.081,0.144c-0.264,0-0.521-0.026-0.772-0.074c0.522,1.63,2.038,2.816,3.833,2.85 c-1.404,1.1-3.174,1.756-5.096,1.756c-0.331,0-0.658-0.019-0.979-0.057c1.816,1.164,3.973,1.843,6.29,1.843 c7.547,0,11.675-6.252,11.675-11.675c0-0.178-0.004-0.355-0.012-0.531C20.985,7.47,21.68,6.747,22.23,5.924z"}))},linkedin:e=>{let{fill:t,size:r,className:n}=e;return React.createElement(u,{fill:t,size:r,className:i()(l.Z.linkedin,n)},React.createElement(o.Path,{d:"M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"}))},tumblr:e=>{let{fill:t,size:r,className:n,invert:a}=e;return React.createElement(u,{fill:t,size:r,className:i()(l.Z.tumblr,n)},a?React.createElement(o.Path,{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zm-5.57 14.265c-2.445.042-3.37-1.742-3.37-2.998V10.6H8.922V9.15c1.703-.615 2.113-2.15 2.21-3.026.006-.06.053-.084.08-.084h1.645V8.9h2.246v1.7H12.85v3.495c.008.476.182 1.13 1.08 1.107.3-.008.698-.094.907-.194l.54 1.6c-.205.297-1.12.642-1.946.657z"}):React.createElement(o.Path,{d:"M17.04 21.28h-3.28c-2.84 0-4.94-1.37-4.94-5.02v-5.67H6.08V7.5c2.93-.73 4.11-3.3 4.3-5.48h3.01v4.93h3.47v3.65H13.4v4.93c0 1.47.73 2.01 1.92 2.01h1.73v3.75z"}))},google:e=>{let{fill:t,size:r,className:n}=e;return React.createElement(u,{fill:t,size:r,className:i()(l.Z.google,n)},React.createElement(o.Path,{d:"M12.02 10.18v3.73h5.51c-.26 1.57-1.67 4.22-5.5 4.22-3.31 0-6.01-2.75-6.01-6.12s2.7-6.12 6.01-6.12c1.87 0 3.13.8 3.85 1.48l2.84-2.76C16.99 2.99 14.73 2 12.03 2c-5.52 0-10 4.48-10 10s4.48 10 10 10c5.77 0 9.6-4.06 9.6-9.77 0-.83-.11-1.42-.25-2.05h-9.36z"}))},mastodon:e=>{let{fill:t,size:r,className:n}=e;return React.createElement(u,{fill:t,size:r,className:i()(l.Z.mastodon,n)},React.createElement(o.Path,{d:"M 19.997205,6.2868955 C 19.729197,4.3162778 17.992912,2.7633017 15.93468,2.4623753 15.587434,2.4115195 14.271759,2.2264681 11.224008,2.2264681 h -0.02277 c -3.0485688,0 -3.7026204,0.1850577 -4.0498676,0.2359072 C 5.1504449,2.7549655 3.3231548,4.1503966 2.879815,6.1443318 2.6665754,7.1263038 2.6438193,8.2149794 2.6834329,9.2136207 c 0.056471,1.4321143 0.067433,2.8617113 0.1989115,4.2879943 0.090908,0.947406 0.2494696,1.887266 0.4745239,2.812521 0.4214237,1.708868 2.1273496,3.130966 3.7987144,3.71116 1.7894479,0.605052 3.7138403,0.705478 5.5577463,0.290088 0.202828,-0.04667 0.403445,-0.100873 0.601781,-0.162549 0.447558,-0.140863 0.972662,-0.298434 1.358683,-0.575188 0.0052,-0.004 0.0097,-0.0089 0.01266,-0.01471 0.0031,-0.0056 0.0047,-0.01218 0.005,-0.01866 v -1.382076 c -9.4e-5,-0.006 -0.0016,-0.01202 -0.0043,-0.01754 -0.0027,-0.0054 -0.0067,-0.01028 -0.01155,-0.01392 -0.0049,-0.0038 -0.01044,-0.0063 -0.01648,-0.0078 -0.006,-0.0013 -0.01218,-0.0013 -0.01825,7.1e-5 -1.181368,0.279106 -2.391962,0.419012 -3.606552,0.416801 -2.0902554,0 -2.6524392,-0.981126 -2.8134375,-1.3896 -0.1293933,-0.353009 -0.2115739,-0.721231 -0.2444221,-1.095331 -3.29e-4,-0.0063 8.463e-4,-0.0125 0.00348,-0.01832 0.00253,-0.0056 0.00649,-0.01077 0.011389,-0.01471 0.0049,-0.004 0.010755,-0.0068 0.016957,-0.0081 0.00617,-0.0014 0.012655,-0.0012 0.018808,3.52e-4 1.1616831,0.277201 2.3525266,0.417106 3.5475526,0.416801 0.287408,0 0.573966,0 0.861395,-0.0074 1.201893,-0.03335 2.468685,-0.0942 3.6512,-0.322606 0.02952,-0.0058 0.059,-0.01091 0.0843,-0.01833 1.865209,-0.354279 3.640245,-1.466278 3.820617,-4.282163 0.0068,-0.110869 0.0236,-1.161191 0.0236,-1.276219 8.46e-4,-0.390958 0.127273,-2.7733487 -0.01856,-4.2371335 z m -2.87074,7.0263315 H 15.165179 V 8.5617567 c 0,-1.0003116 -0.421434,-1.5104614 -1.278618,-1.5104614 -0.942305,0 -1.414292,0.6035217 -1.414292,1.7955379 V 11.44764 H 10.522764 V 8.8468332 c 0,-1.1920162 -0.472832,-1.7955379 -1.4151372,-1.7955379 -0.8521293,0 -1.2777701,0.5101498 -1.2786179,1.5104614 V 13.313227 H 5.8693944 V 8.4175496 c 0,-1.0003133 0.2582014,-1.7949986 0.7745804,-2.3840846 0.5326766,-0.587672 1.2314038,-0.8894211 2.0986981,-0.8894211 1.003817,0 1.7623841,0.3817657 2.2680911,1.1445204 l 0.488023,0.8102521 0.488846,-0.8102521 c 0.505705,-0.7627547 1.264275,-1.1445204 2.26642,-1.1445204 0.866449,0 1.565152,0.3017491 2.099521,0.8894211 0.516404,0.5885211 0.774583,1.3832066 0.774583,2.3840846 z"}))}}};const p=e=>{let{serviceName:t,className:r,invert:n}=e;const a=d[o=t]?d[o]:null;var o;return a?React.createElement(a,{className:r,invert:n}):null}},78868:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(82674),a=r.n(n),o=r(65736),s=r(65235),i=r.n(s),l=r(99196),c=r.n(l);const __=o.__,u=e=>{let{logoColor:t="#069e08",showText:r=!0,className:n,height:o=32,...s}=e;const l=r?"0 0 118 32":"0 0 32 32";return c().createElement("svg",a()({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:l,className:i()("jetpack-logo",n),"aria-labelledby":"jetpack-logo-title",height:o},s),c().createElement("desc",{id:"jetpack-logo-title"},__("Jetpack Logo","jetpack")),c().createElement("path",{fill:t,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z M15,19H7l8-16V19z M17,29V13h8L17,29z"}),r&&c().createElement(c().Fragment,null,c().createElement("path",{d:"M41.3,26.6c-0.5-0.7-0.9-1.4-1.3-2.1c2.3-1.4,3-2.5,3-4.6V8h-3V6h6v13.4C46,22.8,45,24.8,41.3,26.6z"}),c().createElement("path",{d:"M65,18.4c0,1.1,0.8,1.3,1.4,1.3c0.5,0,2-0.2,2.6-0.4v2.1c-0.9,0.3-2.5,0.5-3.7,0.5c-1.5,0-3.2-0.5-3.2-3.1V12H60v-2h2.1V7.1 H65V10h4v2h-4V18.4z"}),c().createElement("path",{d:"M71,10h3v1.3c1.1-0.8,1.9-1.3,3.3-1.3c2.5,0,4.5,1.8,4.5,5.6s-2.2,6.3-5.8,6.3c-0.9,0-1.3-0.1-2-0.3V28h-3V10z M76.5,12.3 c-0.8,0-1.6,0.4-2.5,1.2v5.9c0.6,0.1,0.9,0.2,1.8,0.2c2,0,3.2-1.3,3.2-3.9C79,13.4,78.1,12.3,76.5,12.3z"}),c().createElement("path",{d:"M93,22h-3v-1.5c-0.9,0.7-1.9,1.5-3.5,1.5c-1.5,0-3.1-1.1-3.1-3.2c0-2.9,2.5-3.4,4.2-3.7l2.4-0.3v-0.3c0-1.5-0.5-2.3-2-2.3 c-0.7,0-2.3,0.5-3.7,1.1L84,11c1.2-0.4,3-1,4.4-1c2.7,0,4.6,1.4,4.6,4.7L93,22z M90,16.4l-2.2,0.4c-0.7,0.1-1.4,0.5-1.4,1.6 c0,0.9,0.5,1.4,1.3,1.4s1.5-0.5,2.3-1V16.4z"}),c().createElement("path",{d:"M104.5,21.3c-1.1,0.4-2.2,0.6-3.5,0.6c-4.2,0-5.9-2.4-5.9-5.9c0-3.7,2.3-6,6.1-6c1.4,0,2.3,0.2,3.2,0.5V13 c-0.8-0.3-2-0.6-3.2-0.6c-1.7,0-3.2,0.9-3.2,3.6c0,2.9,1.5,3.8,3.3,3.8c0.9,0,1.9-0.2,3.2-0.7V21.3z"}),c().createElement("path",{d:"M110,15.2c0.2-0.3,0.2-0.8,3.8-5.2h3.7l-4.6,5.7l5,6.3h-3.7l-4.2-5.8V22h-3V6h3V15.2z"}),c().createElement("path",{d:"M58.5,21.3c-1.5,0.5-2.7,0.6-4.2,0.6c-3.6,0-5.8-1.8-5.8-6c0-3.1,1.9-5.9,5.5-5.9s4.9,2.5,4.9,4.9c0,0.8,0,1.5-0.1,2h-7.3 c0.1,2.5,1.5,2.8,3.6,2.8c1.1,0,2.2-0.3,3.4-0.7C58.5,19,58.5,21.3,58.5,21.3z M56,15c0-1.4-0.5-2.9-2-2.9c-1.4,0-2.3,1.3-2.4,2.9 C51.6,15,56,15,56,15z"})))}},32054:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(94333),a=r(49710);const o=["sm","md","lg"],s=(e,t)=>{const r=Array.isArray(e)?e:[e],s=Array.isArray(t)?t:[t],[i,l,c]=o,u={sm:(0,n.useMediaQuery)(a.Z[i]),md:(0,n.useMediaQuery)(a.Z[l]),lg:(0,n.useMediaQuery)(a.Z[c])};return r.map(((e,t)=>{const r=s[t];return r?((e,t,r)=>{const n=o.indexOf(e),a=n+1,s=t.includes("=");let i=[];return t.startsWith("<")&&(i=o.slice(0,s?a:n)),t.startsWith(">")&&(i=o.slice(s?n:a)),i?.length?i.some((e=>r[e])):r[e]})(e,r,u):u[e]}))}},22636:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(65235),a=r.n(n),o=r(99196),s=r.n(o),i=r(46409);const l=e=>{let{children:t=null,width:r=null,height:n=null,className:o=""}=e;return s().createElement("div",{className:a()(i.Z.placeholder,o),style:{width:r,height:n}},t)}},52947:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(98709);const a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=(0,n.X)();return new Intl.NumberFormat(r,t).format(e)}},49777:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(28918);const a=e=>{let{value:t="https://jetpack.com",bgColor:r,fgColor:a,level:o,includeMargin:s,imageSettings:i,renderAs:l="canvas",size:c=248}=e;return React.createElement(n.ZP,{value:t,size:c,bgColor:r,fgColor:a,level:o,includeMargin:s,imageSettings:i,renderAs:l})}},45033:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(25162),a=r.n(n),o=r(99196),s=r.n(o);r(48026);const i=e=>{const t=e.className+" jp-components-spinner",r={width:e.size,height:e.size,fontSize:e.size,borderTopColor:e.color},n={borderTopColor:e.color,borderRightColor:e.color};return s().createElement("div",{className:t},s().createElement("div",{className:"jp-components-spinner__outer",style:r},s().createElement("div",{className:"jp-components-spinner__inner",style:n})))};i.propTypes={color:a().string,className:a().string,size:a().number},i.defaultProps={color:"#FFFFFF",className:"",size:20};const l=i},88275:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>p});var n=r(99196),a=r.n(n),o=r(93468);const s={"--font-headline-medium":"48px","--font-headline-small":"36px","--font-title-medium":"24px","--font-title-small":"20px","--font-body":"16px","--font-body-small":"14px","--font-body-extra-small":"12px","--font-title-large":"var(--font-headline-small)","--font-label":"var(--font-body-extra-small)"},i={"--jp-black":"#000000","--jp-black-80":"#2c3338","--jp-white":"#ffffff","--jp-white-off":"#f9f9f6","--jp-gray":"#dcdcde","--jp-gray-0":"#F6F7F7","--jp-gray-10":"#C3C4C7","--jp-gray-20":"#A7AAAD","--jp-gray-40":"#787C82","--jp-gray-50":"#646970","--jp-gray-60":"#50575E","--jp-gray-70":"#3C434A","--jp-gray-80":"#2C3338","--jp-gray-90":"#1d2327","--jp-gray-off":"#e2e2df","--jp-red-0":"#F7EBEC","--jp-red-5":"#FACFD2","--jp-red-40":"#E65054","--jp-red-50":"#D63638","--jp-red-60":"#B32D2E","--jp-red-70":"#8A2424","--jp-red-80":"#691C1C","--jp-red":"#d63639","--jp-yellow-5":"#F5E6B3","--jp-yellow-10":"#F2CF75","--jp-yellow-20":"#F0C930","--jp-yellow-30":"#DEB100","--jp-yellow-40":"#C08C00","--jp-yellow-50":"#9D6E00","--jp-yellow-60":"#7D5600","--jp-blue-20":"#68B3E8","--jp-blue-40":"#1689DB","--jp-pink":"#C9356E","--jp-green-0":"#f0f2eb","--jp-green-5":"#d0e6b8","--jp-green-10":"#9dd977","--jp-green-20":"#64ca43","--jp-green-30":"#2fb41f","--jp-green-40":"#069e08","--jp-green-50":"#008710","--jp-green-60":"#007117","--jp-green-70":"#005b18","--jp-green-80":"#004515","--jp-green-90":"#003010","--jp-green-100":"#001c09","--jp-green":"#069e08","--jp-green-primary":"var( --jp-green-40 )","--jp-green-secondary":"var( --jp-green-30 )"},l={"--jp-border-radius":"4px","--jp-menu-border-height":"1px","--jp-underline-thickness":"2px"},c={"--spacing-base":"8px"},u={},d=(e,t,r)=>{const n={...s,...i,...l,...c};for(const t in n)e.style.setProperty(t,n[t]);r&&e.classList.add(o.Z.global),t&&(u[t]={provided:!0,root:e})},p=e=>{let{children:t=null,targetDom:r,id:o,withGlobalStyles:s=!0}=e;const i=(0,n.useRef)(),l=u?.[o]?.provided;return(0,n.useLayoutEffect)((()=>{if(!l)return r?d(r,o,s):void(i?.current&&d(i.current,o,s))}),[r,i,l,o,s]),r?t:a().createElement("div",{ref:i},t)}},98709:(e,t,r)=>{"use strict";r.d(t,{X:()=>a});var n=r(69771);const a=()=>{var e;const{l10n:{locale:t}}=(0,n.getSettings)();if(t)return(e=>{const t=e.match(/^([a-z]{2,3})(_[a-z]{2}|_[a-z][a-z0-9]{4,7})?(?:_.*)?$/i);return t?`${t[1]}${t[2]?t[2]:""}`.replace("_","-"):"en-US"})(t);return null!==(e=window?.window?.navigator?.language)&&void 0!==e?e:"en-US"}},6895:(e,t,r)=>{"use strict";function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r={};let n;if("undefined"!=typeof window&&(n=window?.JP_CONNECTION_INITIAL_STATE?.calypsoEnv),0===e.search("https://")){const t=new URL(e);e=`https://${t.host}${t.pathname}`,r.url=encodeURIComponent(e)}else r.source=encodeURIComponent(e);for(const e in t)r[e]=encodeURIComponent(t[e]);!Object.keys(r).includes("site")&&"undefined"!=typeof jetpack_redirects&&jetpack_redirects.hasOwnProperty("currentSiteRawUrl")&&(r.site=jetpack_redirects.currentSiteRawUrl),n&&(r.calypso_env=n);return"https://jetpack.com/redirect/?"+Object.keys(r).map((e=>e+"="+r[e])).join("&")}r.d(t,{Z:()=>n})},61132:(e,t,r)=>{let n={};try{n=r(92787)}catch{console.error("jetpackConfig is missing in your webpack config file. See @automattic/jetpack-config"),n={missingConfig:!0}}const a=e=>n.hasOwnProperty(e);e.exports={jetpackConfigHas:a,jetpackConfigGet:e=>{if(!a(e))throw'This app requires the "'+e+'" Jetpack Config to be defined in your webpack configuration file. See details in @automattic/jetpack-config package docs.';return n[e]}}},31294:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(64743),a=r(9818),o=r(99196),s=r(80428);const i=window?.JP_CONNECTION_INITIAL_STATE?window.JP_CONNECTION_INITIAL_STATE:{},l=function(){let{registrationNonce:e=i.registrationNonce,apiRoot:t=i.apiRoot,apiNonce:r=i.apiNonce,redirectUri:l,autoTrigger:c,from:u,skipUserConnection:d}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{registerSite:p,connectUser:m,refreshConnectedPlugins:h}=(0,a.useDispatch)(s.t),g=(0,a.useSelect)((e=>e(s.t).getRegistrationError())),{siteIsRegistering:f,userIsConnecting:b,userConnectionData:v,connectedPlugins:k,connectionErrors:y,isRegistered:E,isUserConnected:w,hasConnectedOwner:_,isOfflineMode:C}=(0,a.useSelect)((e=>({siteIsRegistering:e(s.t).getSiteIsRegistering(),userIsConnecting:e(s.t).getUserIsConnecting(),userConnectionData:e(s.t).getUserConnectionData(),connectedPlugins:e(s.t).getConnectedPlugins(),connectionErrors:e(s.t).getConnectionErrors(),isOfflineMode:e(s.t).getIsOfflineMode(),...e(s.t).getConnectionStatus()}))),j=()=>d?l?(window.location=l,Promise.resolve(l)):Promise.resolve():m({from:u,redirectUri:l}),S=t=>(t&&t.preventDefault(),E?j():p({registrationNonce:e,redirectUri:l}).then((()=>j())));return(0,o.useEffect)((()=>{n.ZP.setApiRoot(t),n.ZP.setApiNonce(r)}),[t,r]),(0,o.useEffect)((()=>{!c||f||b||S()}),[]),{handleRegisterSite:S,handleConnectUser:j,refreshConnectedPlugins:h,isRegistered:E,isUserConnected:w,siteIsRegistering:f,userIsConnecting:b,registrationError:g,userConnectionData:v,hasConnectedOwner:_,connectedPlugins:k,connectionErrors:y,isOfflineMode:C}}},27523:(e,t,r)=>{"use strict";r.d(t,{LI:()=>o,N4:()=>i,Qo:()=>d,T1:()=>c,TS:()=>u,ZP:()=>w,b5:()=>m,i6:()=>a,qJ:()=>h,qV:()=>l,r7:()=>s,wQ:()=>p});var n=r(64743);const a="SET_CONNECTION_STATUS",o="SET_CONNECTION_STATUS_IS_FETCHING",s="SET_SITE_IS_REGISTERING",i="SET_USER_IS_CONNECTING",l="SET_REGISTRATION_ERROR",c="CLEAR_REGISTRATION_ERROR",u="SET_AUTHORIZATION_URL",d="DISCONNECT_USER_SUCCESS",p="SET_CONNECTED_PLUGINS",m="SET_CONNECTION_ERRORS",h="SET_IS_OFFLINE_MODE",g=e=>({type:a,connectionStatus:e}),f=e=>({type:s,isRegistering:e}),b=e=>({type:i,isConnecting:e}),v=e=>({type:l,registrationError:e}),k=()=>({type:c}),y=e=>({type:u,authorizationUrl:e}),E=e=>({type:p,connectedPlugins:e});const w={setConnectionStatus:g,setConnectionStatusIsFetching:e=>({type:o,isFetching:e}),fetchConnectionStatus:()=>({type:"FETCH_CONNECTION_STATUS"}),fetchAuthorizationUrl:e=>({type:"FETCH_AUTHORIZATION_URL",redirectUri:e}),setSiteIsRegistering:f,setUserIsConnecting:b,setRegistrationError:v,clearRegistrationError:k,setAuthorizationUrl:y,registerSite:function(e){let{registrationNonce:t,redirectUri:r}=e;return function*(){yield k(),yield f(!0);try{const e=yield{type:"REGISTER_SITE",registrationNonce:t,redirectUri:r};return yield g({isRegistered:!0}),yield y(e.authorizeUrl),yield f(!1),Promise.resolve(e)}catch(e){return yield v(e),yield f(!1),Promise.reject(e)}}()},connectUser:function(){let{from:e,redirectFunc:t,redirectUri:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function*(){yield b(!0),yield{type:"CONNECT_USER",from:e,redirectFunc:t,redirectUri:r}}()},disconnectUserSuccess:()=>({type:d}),setConnectedPlugins:E,refreshConnectedPlugins:()=>async e=>{let{dispatch:t}=e;return await new Promise((e=>n.ZP.fetchConnectedPlugins().then((r=>{t(E(r)),e(r)}))))},setConnectionErrors:e=>({type:m,connectionErrors:e}),setIsOfflineMode:e=>({type:h,isOfflineMode:e})}},31432:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(64743),a=r(9818),o=r(27057);const s={FETCH_AUTHORIZATION_URL:e=>{let{redirectUri:t}=e;return n.ZP.fetchAuthorizationUrl(t)},REGISTER_SITE:e=>{let{registrationNonce:t,redirectUri:r}=e;return n.ZP.registerSite(t,r)},CONNECT_USER:(0,a.createRegistryControl)((e=>{let{resolveSelect:t}=e;return function(){let{from:e,redirectFunc:r,redirectUri:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise(((a,s)=>{t(o.Z).getAuthorizationUrl(n).then((t=>{const n=r||(e=>window.location.assign(e)),o=new URL(t);e&&o.searchParams.set("from",encodeURIComponent(e));const s=o.toString();n(s),a(s)})).catch((e=>{s(e)}))}))}}))}},41479:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(9818),a=r(27523);const o=(0,n.combineReducers)({connectionStatus:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case a.i6:return{...e,...t.connectionStatus};case a.Qo:return{...e,isUserConnected:!1}}return e},connectionStatusIsFetching:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===a.LI?t.isFetching:e},siteIsRegistering:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===a.r7?t.isRegistering:e},userIsConnecting:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===a.N4?t.isConnecting:e},registrationError:(e,t)=>{switch(t.type){case a.T1:return!1;case a.qV:return t.registrationError;default:return e}},authorizationUrl:(e,t)=>t.type===a.TS?t.authorizationUrl:e,userConnectionData:(e,t)=>(t.type,e),connectedPlugins:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.type===a.wQ?t.connectedPlugins:e},connectionErrors:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.type===a.b5?t.connectionErrors:e},isOfflineMode:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===a.qJ?t.isConnecting:e}})},77728:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(9818),a=r(27523),o=r(27057);const s={...{getAuthorizationUrl:{isFulfilled:function(e){const t=Boolean(e.authorizationUrl);for(var r=arguments.length,a=new Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];const i=(0,n.select)(o.Z).hasFinishedResolution("getAuthorizationUrl",a);return t&&!i&&(0,n.dispatch)(o.Z).finishResolution("getAuthorizationUrl",a),t},*fulfill(e){const t=yield a.ZP.fetchAuthorizationUrl(e);yield a.ZP.setAuthorizationUrl(t.authorizeUrl)}}}}},82725:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={...{getConnectionStatus:e=>e.connectionStatus||{},getConnectionStatusIsFetching:()=>!1,getSiteIsRegistering:e=>e.siteIsRegistering||!1,getUserIsConnecting:e=>e.userIsConnecting||!1,getRegistrationError:e=>e.registrationError||!1,getAuthorizationUrl:e=>e.authorizationUrl||!1,getUserConnectionData:e=>e.userConnectionData||!1,getConnectedPlugins:e=>e.connectedPlugins||[],getConnectionErrors:e=>e.connectionErrors||[],getIsOfflineMode:e=>e.isOfflineMode||!1,getWpcomUser:e=>e?.userConnectionData?.currentUser?.wpcomUser,getBlogId:e=>e?.userConnectionData?.currentUser?.blogId}}},13535:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(90017),a=r.n(n),o=r(9818);class s{static mayBeInit(e,t){null===s.store&&(s.store=(0,o.createReduxStore)(e,t),(0,o.register)(s.store))}}a()(s,"store",null);const i=s},27057:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n="jetpack-connection"},80428:(e,t,r)=>{"use strict";r.d(t,{t:()=>c.Z});var n=r(27523),a=r(31432),o=r(41479),s=r(77728),i=r(82725),l=r(13535),c=r(27057);const u=window.JP_CONNECTION_INITIAL_STATE;u||console.error("Jetpack Connection package: Initial state is missing. Check documentation to see how to use the Connection composer package to set up the initial state."),l.Z.mayBeInit(c.Z,{__experimentalUseThunks:!0,reducer:o.Z,actions:n.ZP,selectors:i.Z,resolvers:s.Z,controls:a.Z,initialState:u||{}})},74356:(e,t,r)=>{"use strict";r.d(t,{$R:()=>l.Z,$S:()=>i.Z,Nh:()=>u.Z,i$:()=>s.Z,iS:()=>n.ZP,mJ:()=>o.Z,oL:()=>c.Z,pD:()=>a.Z});r(77771),r(23177),r(4277),r(49021),r(95788);var n=r(68407),a=(r(63609),r(8454)),o=r(74140),s=r(54005),i=(r(8350),r(76848),r(79631),r(8714)),l=(r(19649),r(52403)),c=r(37568),u=(r(48751),r(14085));r(45579),r(75323),r(91474),r(86419)},85761:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(3396),a=r(69307),o=r(65235),s=r.n(o),i=r(25162),l=r.n(i);const c=e=>{const{checked:t,serviceName:r,label:o,onClick:i,profilePicture:l}=e,[c,u]=(0,a.useState)(!!l),d=(0,a.useCallback)((()=>u(!1)),[]),p=(0,a.useCallback)((e=>{13===e.keyCode&&i()}),[i]);return React.createElement("div",{onClick:i,onKeyDown:p,role:"switch","aria-checked":t,tabIndex:"0",className:s()("components-connection-icon",{"components-connection-icon__picture":c})},c&&React.createElement("img",{src:l,alt:o,onError:d}),React.createElement(n.av,{alt:o,serviceName:"instagram-business"===r?"instagram":r,className:"jetpack-publicize-gutenberg-social-icon",invert:"tumblr"===r}))};c.propTypes={serviceName:l().string,label:l().string,profilePicture:l().string};const u=c},24479:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(65235),a=r.n(n),o=r(25162),s=r.n(o),i=r(85761);const l=e=>{const{checked:t,disabled:r,onChange:n,serviceName:o,label:s,profilePicture:l}=e,c=a()("components-connection-toggle",{"is-not-checked":!t,"is-disabled":r});return React.createElement("div",{className:c,title:s},React.createElement(i.Z,{checked:t,label:s,onClick:n,serviceName:o,profilePicture:l}))};l.propTypes={className:s().string,checked:s().bool,id:s().string.isRequired,disabled:s().bool,onChange:s().func,serviceName:s().string,label:s().string,profilePicture:s().string};const c=l},49021:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(90017),a=r.n(n),o=r(55609),s=r(94333),i=r(9818),l=r(69307),c=r(65736);const __=c.__;class u extends l.Component{constructor(){super(...arguments),a()(this,"refreshConnectionClick",(e=>{const{href:t,title:r}=e.target;e.preventDefault();const n=window.open(t,r,""),a=window.setInterval((()=>{!1!==n.closed&&(window.clearInterval(a),this.props.refreshConnections())}),500)}))}componentDidMount(){this.props.refreshConnections()}renderRefreshableConnections(){const{failedConnections:e}=this.props,t=e.filter((e=>e.can_refresh));return t.length?React.createElement(o.Notice,{className:"jetpack-publicize-notice",isDismissible:!1,status:"error"},React.createElement("p",null,__("Before you hit Publish, please refresh the following connection(s) to make sure we can share your post:","jetpack")),t.map((e=>React.createElement(o.Button,{href:e.refresh_url,isSmall:!0,key:e.id,onClick:this.refreshConnectionClick,title:e.refresh_text},e.refresh_text)))):null}renderNonRefreshableConnections(){const{failedConnections:e}=this.props,t=e.filter((e=>!e.can_refresh));return t.length?t.map((e=>React.createElement(o.Notice,{className:"jetpack-publicize-notice",isDismissible:!1,status:"error"},React.createElement("p",null,e.test_message)))):null}render(){return React.createElement(l.Fragment,null,this.renderRefreshableConnections(),this.renderNonRefreshableConnections())}}const d=(0,s.compose)([(0,i.withSelect)((e=>({failedConnections:e("jetpack/publicize").getFailedConnections()}))),(0,i.withDispatch)((e=>({refreshConnections:e("jetpack/publicize").refreshConnectionTestResults})))])(u)},4277:(e,t,r)=>{"use strict";r.d(t,{Z:()=>g});var n=r(90017),a=r.n(n),o=r(13419),s=r(55609),i=r(9818),l=r(69307),c=r(65736),u=r(92819),d=r(24479),p=r(28161),m=r(91853);const __=c.__;class h extends l.Component{constructor(){super(...arguments),a()(this,"maybeDisplayLinkedInNotice",(()=>this.connectionNeedsReauth()&&React.createElement(s.Notice,{className:p.Z["publicize-notice"],isDismissible:!1,status:"error"},React.createElement("p",null,__("Your LinkedIn connection needs to be reauthenticated to continue working – head to Sharing to take care of it.","jetpack")),React.createElement(s.ExternalLink,{href:`https://wordpress.com/marketing/connections/${(0,o.lQ)()}`},__("Go to Sharing settings","jetpack"))))),a()(this,"connectionNeedsReauth",(()=>(0,u.includes)(this.props.mustReauthConnections,this.props.name))),a()(this,"onConnectionChange",(()=>{const{id:e}=this.props;this.props.toggleConnection(e)}))}connectionIsFailing(){const{failedConnections:e,name:t}=this.props;return e.some((e=>e.service_name===t))}render(){const{disabled:e,enabled:t,id:r,label:n,name:a,profilePicture:o}=this.props,s="connection-"+a+"-"+r,i=a.replace("_","-"),l=React.createElement(d.Z,{id:s,className:m.Z["connection-toggle"],checked:t,onChange:this.onConnectionChange,disabled:e||this.connectionIsFailing()||this.connectionNeedsReauth(),serviceName:i,label:n,profilePicture:o});return React.createElement("li",null,this.maybeDisplayLinkedInNotice(),React.createElement("div",{className:m.Z["connection-container"]},l))}}const g=(0,i.withSelect)((e=>({failedConnections:e("jetpack/publicize").getFailedConnections(),mustReauthConnections:e("jetpack/publicize").getMustReauthConnections()})))(h)},95788:(e,t,r)=>{"use strict";r.d(t,{Z:()=>S});var n=r(6895),a=r(13419),o=r(55609),s=r(9818),i=r(69307),l=r(65736),c=r(88219),u=r(75323),d=r(39118),p=r(75263),m=r(98811),h=r(46791),g=r(37568),f=r(48751),b=r(4277),v=r(29753),k=r(71961),y=r(62578),E=r(69709),w=r(75631);const _n=l._n,__=l.__,_="jetpack/publicize",C=2592e3,j=(e,t)=>{var r;return!1===e.is_healthy&&t===(null!==(r=e.error_code)&&void 0!==r?r:"broken")};function S(e){let{isPublicizeEnabled:t,isPublicizeDisabledBySitePlan:r,numberOfSharesRemaining:S=null,isEnhancedPublishingEnabled:x=!1,shouldShowAdvancedPlanNudge:P=!1,isSocialImageGeneratorAvailable:T=!1,connectionsAdminUrl:L,adminUrl:N}=e;const{connections:A,toggleById:R,hasConnections:I,enabledConnections:M}=(0,g.Z)(),{message:Z,updateMessage:B,maxLength:D}=(0,f.Z)(),{isEnabled:F}=(0,p.Z)(),{dismissNotice:z,shouldShowNotice:O,NOTICES:U}=(0,u.Z)(),{isInstagramConnectionSupported:H}=(0,s.useSelect)((e=>({isInstagramConnectionSupported:e(_).isInstagramConnectionSupported()}))),V=!A.some((e=>"instagram-business"===e.service_name))&&H&&O(U.instagram),G=(0,i.useCallback)((()=>{z(U.instagram)}),[z,U]),q=T&&F,$=r?o.Disabled:i.Fragment,W=A.filter((e=>j(e,"broken"))),X=A.filter((e=>j(e,"unsupported"))),J=null!==S&&S<=M.length,{isEditedPostDirty:K}=(0,s.useSelect)("core/editor"),{autosave:Y}=(0,s.useDispatch)("core/editor"),Q=(0,i.useCallback)((async e=>{const t=e.target.getAttribute("target");K()&&!t&&(e.preventDefault(),await Y(),window.location.href=e.target.href),t&&(e.preventDefault(),window.open(e.target.href,t,"noreferrer"))}),[Y,K]),ee=(0,i.useCallback)((()=>z(U.advancedUpgradeEditor,3*C)),[z,U]),{attachedMedia:te,shouldUploadAttachedMedia:re}=(0,c.Z)(),ne=(0,d.Z)(),ae=te[0]?.id||ne,oe=(0,h.ZP)(A,(0,m.Z)(ae)[0],{isSocialImageGeneratorEnabledForPost:F,shouldUploadAttachedMedia:re}),se=(0,i.useMemo)((()=>Object.keys(oe)),[oe]),ie=0!==S&&se.length>0,le=(0,i.useCallback)((e=>{let{enabled:t,is_healthy:n=!0,connection_id:a}=e;return t&&!r&&!1!==n&&!oe[a]}),[r,oe]);return React.createElement($,null,I&&React.createElement(React.Fragment,null,React.createElement(o.PanelRow,null,React.createElement("ul",{className:w.Z["connections-list"]},A.map((e=>{const{display_name:r,enabled:n,id:a,service_name:o,toggleable:s,profile_picture:i,is_healthy:l,connection_id:c}=e;return React.createElement(b.Z,{disabled:!t||!n&&s&&J||!1===l||void 0!==oe[c||a],enabled:le(e),key:c||a,id:c||a,label:r,name:o,toggleConnection:R,profilePicture:i})})),React.createElement("li",null,React.createElement(E.Z,null)))),null!==S&&React.createElement(o.PanelRow,null,React.createElement(y.Z,{type:S<A.length?"warning":"default"},React.createElement(i.Fragment,null,(0,i.createInterpolateElement)((0,l.sprintf)(/* translators: %d is the number of shares remaining, upgradeLink is the link to upgrade to a different plan */
_n("You have %d share remaining in the next 30 days. <upgradeLink>Upgrade now</upgradeLink> to share more.","You have %d shares remaining in the next 30 days. <upgradeLink>Upgrade now</upgradeLink> to share more.",S,"jetpack"),S),{upgradeLink:React.createElement("a",{className:w.Z["upgrade-link"],href:(0,n.Z)("jetpack-social-basic-plan-block-editor",{site:(0,a.lQ)(),query:"redirect_to="+encodeURIComponent(window.location.href)}),onClick:Q})}),React.createElement("br",null),React.createElement("a",{className:w.Z["more-link"],href:(0,n.Z)("jetpack-social-block-editor-more-info",{site:(0,a.lQ)(),...N?{query:"redirect_to="+encodeURIComponent(N)}:{}}),target:"_blank",rel:"noopener noreferrer",onClick:Q},__("More about Jetpack Social.","jetpack"))))),React.createElement(React.Fragment,null,W.length>0&&React.createElement(y.Z,{type:"error"},(0,i.createInterpolateElement)(_n("One of your social connections is broken. Reconnect them on the <fixLink>connection management</fixLink> page.","Some of your social connections are broken. Reconnect them on the <fixLink>connection management</fixLink> page.",W.length,"jetpack"),{fixLink:React.createElement(o.ExternalLink,{href:L})})),X.length>0&&React.createElement(y.Z,{type:"error"},(0,i.createInterpolateElement)(__("Twitter is not supported anymore. <moreInfo>Learn more here</moreInfo>.","jetpack"),{moreInfo:React.createElement(o.ExternalLink,{href:L})}))),ie&&(Object.values(oe).includes(h.rs)?x?React.createElement(y.Z,{type:"warning"},__("To share to Instagram, add an image/video, or enable Social Image Generator.","jetpack"),React.createElement("br",null),React.createElement(o.ExternalLink,{href:(0,n.Z)("jetpack-social-media-support-information")},__("Learn more","jetpack"))):React.createElement(y.Z,{type:"warning"},__("You need a featured image to share to Instagram.","jetpack"),React.createElement("br",null),React.createElement(o.ExternalLink,{href:(0,n.Z)("jetpack-social-media-support-information")},__("Learn more","jetpack"))):React.createElement(y.Z,{type:"warning"},React.createElement("p",null,se.length===A.length?_n("The selected media cannot be shared to this platform.","The selected media cannot be shared to any of these platforms.",A.length,"jetpack"):_n("The selected media cannot be shared to one of these platforms.","The selected media cannot be shared to some of these platforms.",se.length,"jetpack")),React.createElement(o.ExternalLink,{href:(0,n.Z)("jetpack-social-media-support-information")},__("Troubleshooting tips","jetpack"))))),!r&&React.createElement(i.Fragment,null,V&&React.createElement(y.Z,{onDismiss:G,type:"highlight",actions:[React.createElement(o.Button,{key:"connect",href:L,target:"_blank",rel:"noreferrer noopener",variant:"primary"},__("Connect now","jetpack")),React.createElement(o.Button,{key:"learn-more",href:(0,n.Z)("jetpack-social-connecting-to-social-networks"),target:"_blank",rel:"noreferrer noopener"},__("Learn more","jetpack"))]},__("You can now share directly to your Instagram account!","jetpack")),t&&A.some((e=>e.enabled))&&React.createElement(React.Fragment,null,React.createElement(k.Z,{maxLength:D,onChange:B,message:Z})),P&&O(U.advancedUpgradeEditor)&&React.createElement(y.Z,{onDismiss:ee,type:"highlight"},(0,i.createInterpolateElement)(__("Need more reach? Unlock custom media sharing with the <upgradeLink>Advanced Plan</upgradeLink>","jetpack"),{upgradeLink:React.createElement(o.ExternalLink,{href:(0,n.Z)("jetpack-social-advanced-site-checkout",{site:(0,a.lQ)(),query:"redirect_to="+encodeURIComponent(window.location.href)})})})),x&&React.createElement(v.Z,{disabled:q,connections:A,notice:q?__("It is not possible to add an image or video when Social Image Generator is enabled.","jetpack"):null})))}},9888:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>k});var n=r(88275),a=r(86989),o=r.n(a),s=r(55609),i=r(9818),l=r(12238),c=r(65736),u=r(65235),d=r.n(u),p=r(99196),m=r.n(p),h=r(75263),g=r(58487),f=r(90785);const __=c.__,_x=c._x,b="featured-image-still-loading",v=(e,t,r,n)=>{if("none"===e||"custom"===e&&!t||"featured"===(null!=e?e:"featured")&&!r)return null;const a=n("custom"===e?t:r);return a?(e=>e?.media_details?.sizes?.large?.source_url||e?.source_url)(a):b};function k(e){let{shouldDebounce:t=!0,...r}=e;const[a,c]=(0,p.useState)(null),[u,k]=(0,p.useState)(!0),{customText:y,imageType:E,imageId:w,template:_,setToken:C}={...(0,h.Z)(),...r},{title:j,imageUrl:S}=(0,i.useSelect)((e=>{const t=e(l.store).getEditedPostAttribute("featured_media");return{title:e(l.store).getEditedPostAttribute("title"),imageUrl:v(E,w,t,e("core").getMedia)}})),x=(0,p.useMemo)((()=>y||j||" "),[y,j]),P=(0,p.useRef)(x),T=(0,p.useRef)(a);(0,p.useEffect)((()=>{T.current=a})),(0,p.useEffect)((()=>{const e=setTimeout((async()=>{if(k(!0),S===b)return;const e=await o()({path:"/jetpack/v4/social-image-generator/generate-preview-token",method:"POST",data:{text:x,image_url:S,template:_}});C?.(e);const t=(0,f.t)(e);t!==T.current?c(t):k(!1)}),x!==P.current&&t?1500:0);return()=>{clearTimeout(e),P.current=x}}),[x,_,S]);const L=(0,p.useCallback)((()=>{k(!1)}),[]);return m().createElement(n.ZP,null,m().createElement(s.BaseControl,{label:_x("Preview","Heading for the generated preview image","jetpack")},m().createElement("div",{className:g.Z.container},m().createElement("img",{className:d()({[g.Z.hidden]:u}),src:a,alt:__("Generated preview","jetpack"),onLoad:L}),u&&m().createElement(s.Spinner,{"data-testid":"spinner"}))))}},90785:(e,t,r)=>{"use strict";r.d(t,{t:()=>a});var n=r(6895);function a(e){return e?(0,n.Z)("sigenerate",{query:`t=${e}`}):""}},88649:(e,t,r)=>{"use strict";r.d(t,{Z:()=>b});var n=r(90526),a=r(88275),o=r(52175),s=r(55609),i=r(69307),l=r(65736),c=r(61074),u=r(6163),d=r(65235),p=r.n(d),m=r(46791),h=r(13858),g=r(69339);const __=l.__,f=e=>t=>{t.currentTarget.focus(),e()};function b(e){let{buttonLabel:t,subTitle:r,mediaId:l=null,mediaDetails:d={},onChange:b,wrapperClassName:v}=e;const{mediaData:{width:k,height:y,sourceUrl:E}={},metaData:{mime:w,length:_=null}={}}=d,C=!(E&&k&&y&&w),j=(0,i.useCallback)((()=>b(null)),[b]),S=(0,i.useCallback)((e=>{b(e)}),[b]),x=(0,i.useCallback)((e=>{const t=(0,m.Wv)(w);return t&&!_?null:React.createElement("div",{className:p()(g.Z["preview-wrapper"],v)},React.createElement("button",{className:g.Z.remove,onClick:j},React.createElement(s.VisuallyHidden,null,__("Remove media","jetpack")),React.createElement(c.Z,{icon:u.Z})),React.createElement("button",{className:g.Z.preview,onClick:f(e),"data-unstable-ignore-focus-outside-for-relatedtarget":".media-modal"},t?React.createElement(h.Z,{sourceUrl:E,mime:w,duration:_}):React.createElement(s.ResponsiveWrapper,{naturalWidth:k,naturalHeight:y,isInline:!0},React.createElement("img",{src:E,alt:"",className:g.Z["preview-image"]}))))}),[y,_,w,j,E,k,v]),P=(0,i.useCallback)((e=>React.createElement("div",{className:g.Z.container},l?React.createElement(React.Fragment,null,React.createElement("button",{className:g.Z["remove-loading"],onClick:j},React.createElement(s.VisuallyHidden,null,__("Remove media","jetpack")),React.createElement(c.Z,{icon:u.Z})),React.createElement(s.Spinner,{"data-testid":"spinner"})):React.createElement(React.Fragment,null,React.createElement(n.Z,{variant:"secondary",size:"small",className:g.Z.preview,onClick:f(e),"data-unstable-ignore-focus-outside-for-relatedtarget":".media-modal"},t),r&&React.createElement("span",null,r)))),[t,l,j,r]),T=(0,i.useCallback)((e=>{let{open:t}=e;return l&&!C?x(t):P(t)}),[l,C,x,P]);return React.createElement(a.ZP,null,React.createElement(o.MediaUploadCheck,null,React.createElement(o.MediaUpload,{title:t,onSelect:S,render:T,value:l})))}},29753:(e,t,r)=>{"use strict";r.d(t,{Z:()=>g});var n=r(88275),a=r(6895),o=r(55609),s=r(69307),i=r(65736),l=r(99196),c=r(88219),u=r(98811),d=r(88649),p=r(53513),m=r(45811);const __=i.__,h=__("Choose Media","jetpack");function g(e){let{disabled:t=!1,notice:r=""}=e;const{attachedMedia:i,updateAttachedMedia:g}=(0,c.Z)(),[f]=(0,u.Z)(i[0]?.id),b=(0,s.useCallback)((e=>{if(e){const{id:t,url:r}=e;g([{id:t,url:r}])}else g([])}),[g]),v=t?o.Disabled:l.Fragment,k=t?{className:m.Z.disabled,"data-testid":"disabled"}:{};return React.createElement(n.ZP,null,React.createElement(o.BaseControl,{label:__("Media","jetpack"),className:m.Z.wrapper},r?React.createElement(o.Notice,{className:m.Z.notice,isDismissible:!1,status:"warning"},React.createElement("p",{"data-testid":"notice"},r)):React.createElement("p",{className:m.Z.subtitle},__("Choose a visual to accompany your post.","jetpack")),React.createElement(v,k,React.createElement(d.Z,{buttonLabel:h,subTitle:__("Add an image or video","jetpack"),mediaId:i[0]?.id,mediaDetails:f,onChange:b}),React.createElement(o.ExternalLink,{href:(0,a.Z)("jetpack-social-media-support-information")},__("Learn photo and video best practices","jetpack")))),React.createElement(p.Z,null))}},71961:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(55609),a=r(65736);const __=a.__,_n=a._n;function o(e){let{message:t="",onChange:r,disabled:o,maxLength:s}=e;const i=s-t.length;return React.createElement(n.TextareaControl,{value:t,label:__("Message","jetpack"),onChange:r,disabled:o,maxLength:s,placeholder:__("Write a message for your audience here.","jetpack"),rows:4,help:(0,a.sprintf)(/* translators: placeholder is a number. */
_n("%d character remaining","%d characters remaining",i,"jetpack"),i)})}},62578:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(55609),a=r(65736),o=r(61074),s=r(6163),i=r(65235),l=r.n(i),c=r(25162),u=r.n(c),d=r(82283);const __=a.__,p=e=>{let{children:t,type:r="default",actions:a=[],onDismiss:i}=e;const c=l()(d.Z.notice,d.Z[`notice--${r}`]);return React.createElement("div",{className:c},React.createElement("div",{className:d.Z.content}," ",t," "),i&&React.createElement("button",{className:d.Z.dismiss,onClick:i},React.createElement(n.VisuallyHidden,null,__("Dismiss notice","jetpack")),React.createElement(o.Z,{icon:s.Z})),a&&a.length>0&&React.createElement("div",{className:d.Z.actions},a.map((e=>e))))};p.propTypes={children:u().node.isRequired,type:u().oneOf(["default","highlight","warning","error"]),actions:u().arrayOf(u().element),onDismiss:u().func};const m=p},8714:(e,t,r)=>{"use strict";r.d(t,{Z:()=>g});var n=r(55609),a=r(9818),o=r(12238),s=r(69307),i=r(65736),l=r(14085),c=r(86419),u=r(37568),d=r(49021),p=r(95788),m=r(91474),h=r(63609);const __=i.__,g=e=>{let{prePublish:t,enableTweetStorm:r,children:i}=e;const{refresh:g,hasConnections:f,hasEnabledConnections:b}=(0,u.Z)(),v=(0,a.useSelect)((e=>e(o.store).isCurrentPostPublished()),[]),{isPublicizeEnabled:k,hidePublicizeFeature:y,isPublicizeDisabledBySitePlan:E,togglePublicizeFeature:w,isShareLimitEnabled:_,numberOfSharesRemaining:C,hasPaidPlan:j,connectionsAdminUrl:S,adminUrl:x,isEnhancedPublishingEnabled:P,isSocialImageGeneratorAvailable:T,shouldShowAdvancedPlanNudge:L}=(0,l.Z)();(0,c.M1)((function(){b&&g()}),[b,g]);const N=t?s.Fragment:n.PanelBody,A=t?{}:{title:__("Share this post","jetpack")};return React.createElement(N,A,i,!y&&React.createElement(s.Fragment,null,!v&&React.createElement(n.ToggleControl,{label:k?__("Share when publishing","jetpack"):__("Sharing is disabled","jetpack",0),onChange:w,checked:k,disabled:!f}),React.createElement(d.Z,null),React.createElement(p.Z,{isPublicizeEnabled:k,isPublicizeDisabledBySitePlan:E,connectionsAdminUrl:S,numberOfSharesRemaining:_&&!j?C:null,isEnhancedPublishingEnabled:P,isSocialImageGeneratorAvailable:T,adminUrl:x,shouldShowAdvancedPlanNudge:L}),r&&k&&React.createElement(h.Z,{prePublish:t}),React.createElement(m.o,null)))}},52403:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(6895),a=r(13419),o=r(86989),s=r.n(o),i=r(72067),l=r(69307),c=r(14085),u=r(86419),d=r(37568),p=r(19649);const m=()=>{var e;const[t,r]=(0,l.useState)(null===(e=(0,a.Pb)()?.social?.reviewRequestDismissed)||void 0===e||e),[o,m]=(0,l.useState)(!1),{hasEnabledConnections:h}=(0,d.Z)(),{isPublicizeEnabled:g,isPostAlreadyShared:f}=(0,c.Z)();(0,u.e3)((()=>{m(!f&&g&&h)}),[f,h,g]);const b=(0,l.useCallback)((()=>{var e;const t=null!==(e=(0,a.Pb)()?.social?.dismissReviewRequestPath)&&void 0!==e?e:null;s()({path:t,method:"POST",data:{dismissed:!0}}).catch((e=>{throw e})),r(!0)}),[]);return t||!o?null:React.createElement(i.PluginPostPublishPanel,{id:"publicize-title"},React.createElement(p.Z,{href:(0,n.Z)("jetpack-social-plugin-reviews"),onClose:b}))}},19649:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(88275),a=r(90526),o=r(13419),s=r(65736),i=r(99196),l=r(2097);const __=s.__,c=e=>{let{href:t,onClose:r}=e;const{recordEvent:c}=(0,o.z$)({pageViewEventName:"social_plugin_review_prompt",pageViewNamespace:"jetpack",pageViewSuffix:"view"}),u=(0,i.useCallback)((()=>{c("jetpack_social_plugin_review_prompt_new_review_click")}),[c]),d=(0,i.useCallback)((()=>{c("jetpack_social_plugin_review_prompt_dismiss_click"),r()}),[c,r]);return React.createElement(n.ZP,null,React.createElement("div",{className:l.Z.prompt},React.createElement("h2",{className:l.Z.header},/* translators: %s is the celebration emoji */
(0,s.sprintf)(__("Presto! %s","jetpack"),String.fromCodePoint(127881))),React.createElement("p",null,__("Just like that, Jetpack Social has shared your post to your connected social accounts.","jetpack")),React.createElement("p",null,__("Please leave a review to let others know how easy getting your posts on social media can be!","jetpack")),React.createElement("div",{className:l.Z.buttons},React.createElement(a.Z,{onClick:u,isExternalLink:!0,href:t,className:l.Z.button},__("Leave a Review","jetpack")),React.createElement(a.Z,{onClick:d,variant:"link",className:l.Z.button},__("Dismiss","jetpack")))))}},69709:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(65736),a=r(92819),o=r(90105),s=r(14085),i=r(37568),l=r(78619);const __=n.__,c=2e3;function u(){const{refresh:e}=(0,i.Z)(),t=(0,a.debounce)((function(t){t&&e()}),c),{connectionsAdminUrl:r}=(0,s.Z)();return React.createElement(o.Z,{onChange:t},React.createElement("a",{className:l.Z["settings-link"],href:r,target:"_blank",rel:"noreferrer",title:__("Connect an account","jetpack")},React.createElement("svg",{width:"24",height:"24",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("rect",{x:"0.375",y:"0.375",width:"27.25",height:"27.25",rx:"1.125",fill:"#F6F7F7"}),React.createElement("path",{d:"M19 13.3333H14.6667V9H13.3333V13.3333H9V14.6667H13.3333V19H14.6667V14.6667H19V13.3333Z",fill:"black"}),React.createElement("rect",{x:"0.375",y:"0.375",width:"27.25",height:"27.25",rx:"1.125",stroke:"#A7AAAD",strokeWidth:"0.75",strokeDasharray:"2 2"}))))}},91474:(e,t,r)=>{"use strict";r.d(t,{o:()=>h});var n=r(55609),a=r(9818),o=r(12238),s=r(69307),i=r(65736),l=r(53961),c=r(14085),u=r(45579),d=r(37568);const __=i.__;function p(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:__("Unable to share the Post","jetpack");const{createErrorNotice:t}=(0,a.dispatch)(l.store);t(e,{id:"publicize-post-share-message"})}function m(){const{hasEnabledConnections:e}=(0,d.Z)(),{isPublicizeEnabled:t}=(0,c.Z)(),{isFetching:r,isError:i,isSuccess:m,doPublicize:h}=(0,u.Z)(),g=(0,a.useSelect)((e=>e(o.store).isCurrentPostPublished()),[]);(0,s.useEffect)((()=>{if(!r)return i?p():void(m&&function(){const{createSuccessNotice:e}=(0,a.dispatch)(l.store);e(__("Post shared","jetpack"),{id:"publicize-post-share-message",type:"snackbar"})}())}),[r,i,m]);const f=!t||!e||!g||r,b=(0,s.useCallback)((()=>{if(!g)return p(__("You must publish your post before you can share it.","jetpack"));(0,a.dispatch)(l.store).removeNotice("publicize-post-share-message"),h()}),[h,g]);return React.createElement(n.Button,{variant:"secondary",onClick:b,disabled:f,isBusy:r},__("Share post","jetpack"))}function h(){const{isRePublicizeUpgradableViaUpsell:e}=(0,c.Z)();return(0,a.useSelect)((e=>e(o.store).isCurrentPostPublished()),[])?e?null:React.createElement(n.PanelRow,null,React.createElement(m,null)):null}},54005:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(55609),a=r(69307),o=r(65736),s=r(75263),i=r(9888),l=r(81469);const __=o.__,c=e=>{let{prePublish:t=!1}=e;const r=t?a.Fragment:n.PanelBody,o=t?{}:{title:__("Social Image Generator","jetpack")},{isEnabled:c,setIsEnabled:u}=(0,s.Z)(),[d,p]=(0,a.useState)(!1),m=(0,a.useCallback)((()=>p(!0)),[]),h=(0,a.useCallback)((()=>p(!1)),[]);return React.createElement(r,o,d&&React.createElement(l.Z,{onClose:h}),React.createElement(n.ToggleControl,{label:__("Enable Social Image","jetpack"),help:c?"":__("Social Image is disabled for this post.","jetpack"),checked:c,onChange:u}),c&&React.createElement(React.Fragment,null,React.createElement("hr",null),React.createElement(i.ZP,{shouldDebounce:!1}),React.createElement("hr",null),React.createElement(n.Button,{variant:"secondary",onClick:m,label:__("Open the Social Image Generator settings","jetpack")},__("Settings","jetpack"))))}},81469:(e,t,r)=>{"use strict";r.d(t,{Z:()=>g});var n=r(88275),a=r(55609),o=r(69307),s=r(65736),i=r(75263),l=r(98811),c=r(9888),u=r(88649),d=r(39356),p=r(40088);const __=s.__,m=["image/jpeg","image/png"],h=__("Choose Image","jetpack"),g=e=>{let{onClose:t}=e;const{customText:r,imageType:s,imageId:g,template:f,updateSettings:b}=(0,i.Z)(),[v,k]=(0,o.useState)(g),[y,E]=(0,o.useState)(s||"featured"),[w,_]=(0,o.useState)(r),[C,j]=(0,o.useState)(f),[S]=(0,l.Z)(v),x=(0,o.useCallback)((()=>{b({template:C,image_type:y,custom_text:w||"",..."custom"===y&&{image_id:v}}),t()}),[b,C,y,v,w,t]),P=(0,o.useCallback)((e=>{k(e?.id)}),[k]);return React.createElement(n.ZP,{targetDom:document.body},React.createElement(a.Modal,{onRequestClose:t},React.createElement(c.ZP,{className:p.Z.preview,imageId:v,customText:w,imageType:y,template:C}),React.createElement(a.SelectControl,{label:__("Image Type","jetpack"),value:y||"featured",options:[{label:__("Featured Image","jetpack"),value:"featured"},{label:__("Custom Image","jetpack"),value:"custom"},{label:__("No Image","jetpack"),value:"none"}],onChange:E}),"custom"===y&&React.createElement(u.Z,{buttonLabel:h,subTitle:__("Add a custom image","jetpack"),mediaId:v,mediaDetails:S,onChange:P,allowedMediaTypes:m,wrapperClassName:p.Z.mediaPicker}),React.createElement(a.TextControl,{className:p.Z.customText,value:w||"",onChange:_,label:__("Custom Header","jetpack"),help:__("By default the post title is used for the image. You can use this field to set your own text.","jetpack")}),React.createElement(a.BaseControl,{label:__("Templates","jetpack"),className:p.Z.templateControl},React.createElement(d.Z,{value:C,onTemplateSelected:j})),React.createElement(a.Button,{onClick:t,variant:"tertiary"},__("Cancel","jetpack")),React.createElement(a.Button,{onClick:x,variant:"primary"},__("Save","jetpack"))))}},79631:(e,t,r)=>{"use strict";r(9818),r(69307),r(65736),r(99196),r(23177),r(8350)},8350:(e,t,r)=>{"use strict";r(55609),r(69307),r(65736),r(39356),r(15214)},39356:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(69307),a=r(65736),o=r(65235),s=r.n(o),i=r(47320),l=r(57227);const __=a.__,c=e=>{let{value:t=null,onTemplateSelected:r=null}=e;const o=(0,n.useCallback)((e=>{const t=e.target.id;r?.(t)}),[r]);return React.createElement("div",{className:i.Z.templates},l.Z.map((e=>React.createElement("button",{onClick:o,id:e.name,key:e.name,className:s()(i.Z.template,{[i.Z["template--active"]]:e.name===t})},React.createElement("img",{src:e.image,alt:e.label}),React.createElement("span",{className:"screen-reader-text"},/* translators: %s is the name of the template */
(0,a.sprintf)(__("Pick the %s template","jetpack"),e.label))))))}},57227:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(30253),a=r(91948),o=r(5353);const s=[{name:"highway",label:"Highway",image:r(27956)},{name:"dois",label:"Dois",image:n},{name:"edge",label:"Edge",image:a},{name:"fullscreen",label:"Fullscreen",image:o}]},76848:(e,t,r)=>{"use strict";r(9818),r(69307),r(99196),r(23177)},53513:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(88275),a=r(55609),o=r(65736),s=r(99196),i=r(88219),l=r(89696);const __=o.__;function c(){const{shouldUploadAttachedMedia:e,updateShouldUploadAttachedMedia:t}=(0,i.Z)(),r=(0,s.useCallback)((e=>{t(e)}),[t]);return React.createElement(n.ZP,null,React.createElement(a.CheckboxControl,{className:l.Z.checkbox,checked:e,onChange:r,label:__("Share as a social post","jetpack"),help:__("By default, the image and text appear on social media as a link preview. To optimize engagement, share as a social post.","jetpack")}))}},63855:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(82674),a=r.n(n),o=r(13477),s=r(9818),i=r(37568),l=r(48751);const c=(0,s.withSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor");return{excerpt:t("excerpt"),content:t("content").split("\x3c!--more")[0]}}))((e=>{const{connections:t}=(0,i.Z)(),{message:r}=(0,l.Z)(),{title:n,excerpt:s,content:c}=e,u=t?.find((e=>"facebook"===e.service_name));let d;return u&&(d={displayName:u.display_name,avatarUrl:u.profile_picture}),React.createElement(o.S,a()({},e,{type:"article",user:d,customText:r||s||c||n}))}))},83704:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(82674),a=r.n(n),o=r(17915),s=r(9818),i=r(22629),l=r(99196),c=r.n(l);const u=function(e){const t=(0,s.useSelect)((e=>{const{getEntityRecord:t}=e("core");return(0,i.decodeEntities)(t("root","site").title)}));return c().createElement(o.X,a()({},e,{siteTitle:t}))}},4124:(e,t,r)=>{"use strict";r.d(t,{m:()=>l});var n=r(4049),a=r(99196),o=r.n(a),s=r(48751),i=r(34074);function l(e){const{title:t,image:r}=e,{name:a,profileImage:l}=(0,i.getInstagramDetails)(),{message:c}=(0,s.Z)(),u=c||t;return o().createElement(n.V,{image:r,name:a,profileImage:l,caption:u})}},27725:(e,t,r)=>{"use strict";r.d(t,{y:()=>c});var n=r(93453),a=r(65736),o=r(99196),s=r.n(o),i=r(48751),l=r(34074);const __=a.__;function c(e){const{title:t,url:r,image:a,media:o}=e,{name:c,profileImage:u}=(0,l.getLinkedInDetails)(),{message:d}=(0,i.Z)(),p=`${d||t} ${o.length?r:""}`.trim();return s().createElement(n.S,{jobTitle:__("Job Title (Company Name)","jetpack"),image:a,name:c,profileImage:u,title:t,description:p,url:r,media:o})}},28586:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(82674),a=r.n(n),o=r(60312),s=r(9818),i=r(37568),l=r(48751),c=r(34074);const u=e=>{const{connections:t}=(0,i.Z)(),{message:r}=(0,l.Z)(),{content:n,siteName:u}=(0,s.useSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor"),{getSite:r}=e("core");return{content:t("content").split("\x3c!--more")[0],siteName:r().title}})),d=(0,c.shouldUploadAttachedMedia)(),p=t?.find((e=>"mastodon"===e.service_name));let m;return p&&(m={displayName:p.display_name,avatarUrl:p.profile_picture,address:p.username}),React.createElement(o.I,a()({},e,{siteName:u,user:m,description:n,customText:r,customImage:e.media?.[0]?.url,isSocialPost:d}))}},8454:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(55609),a=r(9818),o=r(65736),s=r(39517),i=r(34074),l=r(90785),c=r(81694),u=r(25399);const __=o.__,d=(0,a.withSelect)((e=>{const{getMedia:t}=e("core"),{getEditedPostAttribute:r}=e("core/editor"),{isTweetStorm:n}=e("jetpack/publicize"),a=r("featured_media");let o=a?(0,u.i)(t(a)):"";const s=(0,i.getImageGeneratorPostSettings)(),c=s.enabled?(0,l.t)(s.token):"",d=(0,i.getAttachedMedia)();if(c)o=c;else if(d?.[0]?.id){const[e]=d;!!e.id&&t(e.id)?.mime_type?.startsWith("image/")&&e.url&&(o=e.url)}const p=[];if((0,i.shouldUploadAttachedMedia)())if(c)p.push({type:"image/jpeg",url:c,alt:""});else{const e=e=>{const r=t(e);return r?{type:r.mime_type,url:(0,u.i)(r),alt:r.alt_text}:null};for(const{id:t}of d){const r=e(t);r&&p.push(r)}0===p.length&&a&&p.push(e(a))}return{title:r("meta")?.jetpack_seo_html_title||r("title"),description:r("meta")?.advanced_seo_description||r("excerpt")||r("content").split("\x3c!--more")[0]||__("Visit the post for more.","jetpack"),url:r("link"),image:o,media:p,initialTabName:n()?"twitter":null}}))((function(e){let{onClose:t,image:r,media:a,title:o,description:i,url:l,initialTabName:u}=e;const d=(0,c.P)();return React.createElement(n.Modal,{onRequestClose:t,className:"jetpack-social-previews__modal",__experimentalHideHeader:!0},React.createElement(n.Button,{className:"jetpack-social-previews__modal--close-btn",onClick:t,icon:s.Z,label:__("Close","jetpack")}),React.createElement(n.TabPanel,{className:"jetpack-social-previews__modal-previews",tabs:d,initialTabName:u},(e=>React.createElement("div",null,React.createElement(e.preview,{title:o,description:i,url:l,image:r,media:a})))))}))},74140:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(55609),a=r(65736),o=r(81694);const __=a.__,_x=a._x,s=e=>{let{openModal:t}=e;const r=(0,o.P)();return React.createElement("div",{className:"jetpack-social-previews__panel"},React.createElement("p",null,__("Preview what this will look like on social networks and Google search.","jetpack")),React.createElement("div",{className:"jetpack-gutenberg-social-icons"},r.map((e=>React.createElement(e.icon,{key:e.name,className:"jetpack-social-previews__icon"})))),React.createElement(n.Button,{variant:"secondary",onClick:t,label:__("Open Social Previews","jetpack")},_x("Preview","Button label that opens the social previews modal","jetpack")))}},94714:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(82674),a=r.n(n),o=r(1044),s=r(9818),i=r(37568),l=r(48751);const c=e=>{const{content:t,author:r}=(0,s.useSelect)((e=>{const{getUser:t}=e("core"),{getEditedPostAttribute:r}=e("core/editor"),n=r("author"),a=n&&t(n);return{content:r("content").split("\x3c!--more")[0],author:a?.name}})),{connections:n}=(0,i.Z)(),{message:c}=(0,l.Z)(),u=n?.find((e=>"tumblr"===e.service_name));let d;return u&&(d={displayName:r,avatarUrl:u.profile_picture}),React.createElement(o.b,a()({},e,{user:d,description:t,customText:c}))}},24766:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(835),a=r(9818),o=r(99196),s=r.n(o);const i=(0,a.withSelect)(((e,t)=>{let{title:r,description:n,image:a,url:o,media:s}=t;const{getTweetTemplate:i,getTweetStorm:l,getShareMessage:c,isTweetStorm:u}=e("jetpack/publicize");let d=[];return u()?d=l():d.push({...i(),text:c()+(s.length?` ${o}`:""),cardType:a?"summary_large_image":"summary",title:r,description:n,image:a,media:s,url:o}),{tweets:d}}))((function(e){let{tweets:t}=e;return s().createElement(n.c,{tweets:t,hidePostPreview:!0})}))},81694:(e,t,r)=>{"use strict";r.d(t,{P:()=>b});var n=r(82674),a=r.n(n),o=r(3396),s=r(9818),i=r(65736),l=r(99196),c=r.n(l),u=r(63855),d=r(83704),p=r(4124),m=r(27725),h=r(28586),g=r(94714),f=r(24766);const __=i.__;function b(){const{isInstagramSupported:e,isMastodonSupported:t}=(0,s.useSelect)((e=>{const t=e("jetpack/publicize");return{isInstagramSupported:t.isInstagramConnectionSupported(),isMastodonSupported:t.isMastodonConnectionSupported()}}));return(0,l.useMemo)((()=>[{title:__("Google Search","jetpack"),icon:e=>c().createElement(o.av,a()({serviceName:"google"},e)),name:"google",preview:d.Z},{title:__("Twitter","jetpack"),icon:e=>c().createElement(o.av,a()({serviceName:"twitter"},e)),name:"twitter",preview:f.Z},{title:__("Facebook","jetpack"),icon:e=>c().createElement(o.av,a()({serviceName:"facebook"},e)),name:"facebook",preview:u.Z},e?{title:__("Instagram","jetpack"),icon:e=>c().createElement(o.av,a()({serviceName:"instagram"},e)),name:"instagram",preview:p.m}:null,{title:__("LinkedIn","jetpack"),icon:e=>c().createElement(o.av,a()({serviceName:"linkedin"},e)),name:"linkedin",preview:m.y},{title:__("Tumblr","jetpack"),icon:e=>c().createElement(o.av,a()({serviceName:"tumblr"},e)),name:"tumblr",preview:g.Z},t?{title:__("Mastodon","jetpack"),icon:e=>c().createElement(o.av,a()({serviceName:"mastodon"},e)),name:"mastodon",preview:h.Z}:null].filter(Boolean)),[e,t])}},25399:(e,t,r)=>{"use strict";function n(e){return e?e.media_details?.sizes?.large?.source_url||e.source_url:null}r.d(t,{i:()=>n})},68407:(e,t,r)=>{"use strict";r.d(t,{H8:()=>l,ZP:()=>c,nE:()=>i});var n=r(94333),a=r(9818),o=r(92694),s=r(36797);const i={"core/gallery":{contentAttributes:["images"]},"core/heading":{contentAttributes:["content"]},"core/image":{contentAttributes:["alt","url"]},"core/list":{contentAttributes:["values"]},"core/paragraph":{contentAttributes:["content"]},"core/quote":{contentAttributes:["value","citation"]},"core/separator":{contentAttributes:[]},"core/spacer":{contentAttributes:[]},"core/verse":{contentAttributes:["content"]},"core/video":{contentAttributes:["src"]},"core/embed":{contentAttributes:["url"]},"jetpack/gif":{contentAttributes:["giphyUrl"]}},l=["core/column","core/columns","core/group"];(0,o.addFilter)("blocks.registerBlockType","jetpack/publishing-tweetstorms",(e=>{const{edit:t}=e;return{...e,edit:e=>React.createElement(s.Z,{ChildEdit:t,childProps:e})}}));const c=(0,n.compose)([(0,a.withSelect)((e=>({isTweetStorm:e("jetpack/publicize").isTweetStorm(),isTyping:e("core/block-editor").isTyping()})))])((e=>{let{isTweetStorm:t,isTyping:r}=e;return t?document.body.classList.add("jetpack-tweetstorm"):document.body.classList.remove("jetpack-tweetstorm"),t&&r?document.body.classList.add("jetpack-tweetstorm-is-typing"):document.body.classList.remove("jetpack-tweetstorm-is-typing"),null}))},63609:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(55609),a=r(94333),o=r(9818),s=r(69307),i=r(65736);r(42998);const __=i.__,l=(0,a.compose)([(0,o.withSelect)((e=>{const{isTweetStorm:t,getTweetStorm:r}=e("jetpack/publicize");return{connections:e("core/editor").getEditedPostAttribute("jetpack_publicize_connections"),isTweetStorm:t(),tweetStormLength:r().length}})),(0,o.withDispatch)((e=>({setTweetstorm:t=>{e("core/editor").editPost({meta:{jetpack_is_tweetstorm:t}}),t?e("jetpack/publicize").refreshTweets():(e("core/annotations").__experimentalRemoveAnnotationsBySource("jetpack-tweetstorm"),e("core/annotations").__experimentalRemoveAnnotationsBySource("jetpack-tweetstorm-line-break"))}})))])((e=>{let{connections:t,isTweetStorm:r,tweetStormLength:a,setTweetstorm:o,prePublish:i}=e;const l=(0,s.useCallback)((e=>{o("tweetstorm"===e)}),[o]);if(!t?.some((e=>"twitter"===e.service_name&&e.enabled&&!1!==e.is_healthy)))return null;const c=(e,t)=>React.createElement(React.Fragment,null,React.createElement("strong",null,e),React.createElement("br",null),t),u=[];return a>=102?u.push({id:"jetpack-publicize-twitter-tweetstorm-too-long",status:"error",content:__("Only the first 100 tweets of this post will be published in the Twitter thread.","jetpack"),isDismissible:!1}):a>=22?u.push({id:"jetpack-publicize-twitter-tweetstorm-a-bit-long",status:"warning",content:__("This post will create a Twitter thread more than 20 tweets long.","jetpack"),isDismissible:!1}):i&&a<=2&&u.push({id:"jetpack-publicize-twitter-tweetstorm-too-short",status:"warning",content:__("None of the content in this post could be transformed into tweets, it may be better to share as a single tweet.","jetpack"),isDismissible:!1}),React.createElement(n.PanelRow,null,React.createElement(n.RadioControl,{label:__("Twitter settings","jetpack"),selected:r?"tweetstorm":"single",options:[{label:c(__("Single Tweet","jetpack"),__("Share a link to this post to Twitter.","jetpack")),value:"single"},{label:c(__("Twitter Thread","jetpack"),__("Share the content of this post as a Twitter thread.","jetpack")),value:"tweetstorm"}],onChange:l}),r&&React.createElement(n.NoticeList,{className:"jetpack-publicize-twitter-options__notices",notices:u}))}))},36797:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(3396),a=r(55609),o=r(94333),s=r(9818),i=r(69307),l=r(92819);r(42998);class c extends i.Component{componentDidMount(){const{isTweetStorm:e,updateTweets:t}=this.props;e&&t()}componentDidUpdate(e){const{boundaries:t,childProps:r,currentAnnotations:n,isTweetStorm:a,updateAnnotations:o,updateTweets:s,supportedBlockType:i,contentAttributesChanged:c}=this.props;a&&i&&(c(e.childProps,r)&&s(),n.length===t.filter((e=>["normal","line-break"].includes(e.type))).length&&(0,l.isEqual)(e.boundaries,t)||o())}render(){const{ChildEdit:e,childProps:t,isTweetStorm:r,isSelectedTweetBoundary:o,boundaryStylesSelectors:s,popoverWarnings:i}=this.props;return r?React.createElement(React.Fragment,null,React.createElement(e,t),o&&React.createElement("div",{className:"jetpack-publicize-twitter__tweet-divider"},React.createElement("div",{className:"jetpack-publicize-twitter__tweet-divider-icon"},React.createElement(n.av,{serviceName:"twitter"})),i.length>0&&React.createElement(a.Popover,{className:"jetpack-publicize-twitter__tweet-divider-popover",focusOnMount:!1,position:"bottom center"},React.createElement("ol",null,i.map(((e,t)=>React.createElement("li",{key:`jetpack-publicize-twitter__tweet-divider-popover-warning-${t}`},e)))))),s&&React.createElement("style",{type:"text/css"},s.map((e=>`${e}::after {\n\t\t\t\t\t\t\t\tcontent: "";\n\t\t\t\t\t\t\t\tbackground: #0009;\n\t\t\t\t\t\t\t\twidth: 3px;\n\t\t\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\t\t\tmargin: 0 1px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t.is-dark-theme ${e}::after {\n\t\t\t\t\t\t\t\tbackground: #fff9;\n\t\t\t\t\t\t\t}`)))):React.createElement(e,t)}}const u=(0,o.compose)([(0,s.withSelect)(((e,t)=>{let{childProps:r}=t;const{isTweetStorm:n,getPopoverWarnings:a,getBoundariesForBlock:o,getBoundaryStyleSelectors:s,isSelectedTweetBoundary:i,getSupportedBlockType:l,contentAttributesChanged:c}=e("jetpack/publicize"),u=e("core/annotations").__experimentalGetAllAnnotationsForBlock(r.clientId);return{isTweetStorm:n(),isSelectedTweetBoundary:i(r),boundaries:o(r.clientId),boundaryStylesSelectors:s(r.clientId),popoverWarnings:a(r),currentAnnotations:u,supportedBlockType:l(r.name),contentAttributesChanged:c}})),(0,s.withDispatch)(((e,t,r)=>{let{childProps:n}=t,{select:a}=r;return{updateTweets:()=>e("jetpack/publicize").refreshTweets(),updateAnnotations:()=>{const{contentAttributesChanged:t,getTweetsForBlock:r}=a("jetpack/publicize"),o=r(n.clientId);if(!o||0===o.length)return;if(t(o.reduce(((e,t)=>e||t.blocks.find((e=>e.clientId===n.clientId))),!1),n))return;a("core/annotations").__experimentalGetAllAnnotationsForBlock(n.clientId).forEach((t=>{["jetpack-tweetstorm","jetpack-tweetstorm-line-break"].includes(t.source)&&e("core/annotations").__experimentalRemoveAnnotation(t.id)}));o.filter((e=>e.boundary)).map((e=>e.boundary)).forEach((t=>{const{container:r,type:a,start:o,end:s}=t;"normal"===a?e("core/annotations").__experimentalAddAnnotation({blockClientId:n.clientId,source:"jetpack-tweetstorm",richTextIdentifier:r,range:{start:o,end:s}}):"line-break"===a&&e("core/annotations").__experimentalAddAnnotation({blockClientId:n.clientId,source:"jetpack-tweetstorm-line-break",richTextIdentifier:r,range:{start:o,end:s}})}))}}}))])(c)},13858:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(69307),a=r(87728);const o=e=>{let{sourceUrl:t,mime:r,duration:o}=e;const[s,i]=(0,n.useState)(!1),[l,c]=(0,n.useState)(0),u=(0,n.useRef)(null),d=(0,n.useRef)(null),p=(0,n.useRef)(null);(0,n.useEffect)((()=>{u.current?.load()}),[t]);const m=(0,n.useCallback)((()=>{u.current.pause(),u.current.currentTime=0,clearInterval(d.current),clearTimeout(p.current),c(0),i(!1)}),[]),h=(0,n.useCallback)((()=>{p.current=setTimeout((()=>{s||(u.current.play(),i(!0),d.current=setInterval((()=>{c((e=>e+1))}),1e3))}),500)}),[s]),g=()=>{const e=o-l,t=Math.floor(e/60),r=String(Math.floor(e%60)).padStart(2,"0");return React.createElement("div",{className:a.Z.progress},React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"6",height:"8",fill:"none"},React.createElement("path",{fill:"#fff",d:"M5.25 3.567a.5.5 0 0 1 0 .866L.75 7.031A.5.5 0 0 1 0 6.598V1.402A.5.5 0 0 1 .75.969l4.5 2.598Z"})),React.createElement("span",{className:a.Z.duration},`${t}:${r}`))};return React.createElement("div",{className:a.Z.wrapper,onMouseEnter:h,onMouseLeave:m},React.createElement("video",{ref:u,onEnded:m,muted:!0},React.createElement("source",{src:t,type:r})),React.createElement(g,null))}},88219:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(9818),a=r(12238),o=r(69307);const s="jetpack/publicize";function i(){const{editPost:e}=(0,n.useDispatch)(a.store),{shouldUploadAttachedMedia:t,attachedMedia:r,currentOptions:i}=(0,n.useSelect)((e=>({shouldUploadAttachedMedia:e(s).shouldUploadAttachedMedia(),attachedMedia:e(s).getAttachedMedia(),currentOptions:e(s).getJetpackSocialOptions()}))),l=(0,o.useCallback)(((t,r)=>{e({meta:{jetpack_social_options:{...i,[t]:r}}})}),[i,e]);return{attachedMedia:r,shouldUploadAttachedMedia:t,updateAttachedMedia:e=>l("attached_media",e),updateShouldUploadAttachedMedia:e=>l("should_upload_attached_media",e)}}},75323:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(13419),a=r(86989),o=r.n(a),s=r(99196);const i={instagram:"instagram",advancedUpgradeEditor:"advanced-upgrade-nudge-editor",advancedUpgradeAdmin:"advanced-upgrade-nudge-admin"},l=e=>-1===e?0:new Date(Date.now()+1e3*e).getTime();function c(){const[e,t]=(0,s.useState)((()=>{var e,t;return null!==(e=null!==(t=(0,n.Pb)()?.social?.dismissedNotices)&&void 0!==t?t:window?.jetpackSocialInitialState?.jetpackSettings?.dismissedNotices)&&void 0!==e?e:{}})),r=(0,s.useCallback)((function(e){const r=l(arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1);t((t=>({...t,[e]:r}))),o()({path:"jetpack/v4/social/dismiss-notice",method:"POST",data:{notice:e,reappearance_time:r}})}),[]),a=(0,s.useCallback)((t=>{const r=e[t];return!(0===r||r>Date.now())}),[e]);return(0,s.useMemo)((()=>({dismissedNotices:e,shouldShowNotice:a,dismissNotice:r,NOTICES:i})),[e,a,r])}},39118:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(9818),a=r(12238);const o=()=>(0,n.useSelect)((e=>e(a.store).getEditedPostAttribute("featured_media")))},75263:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(9818),a=r(12238),o=r(69307);const s="jetpack/publicize",i=(e,t)=>{var r,n,a,o,s,i;return{isEnabled:null!==(r=e?.enabled)&&void 0!==r?r:!t,customText:null!==(n=e?.custom_text)&&void 0!==n?n:null,imageType:null!==(a=e?.image_type)&&void 0!==a?a:null,imageId:null!==(o=e?.image_id)&&void 0!==o?o:null,template:null!==(s=e?.template)&&void 0!==s?s:null,token:null!==(i=e?.token)&&void 0!==i?i:null}};function l(){const{editPost:e}=(0,n.useDispatch)(a.store),{postSettings:t,currentOptions:r}=(0,n.useSelect)((e=>({postSettings:e(s).getImageGeneratorPostSettings(),currentOptions:e(s).getJetpackSocialOptions()}))),{isPostPublished:l}=(0,n.useSelect)((e=>({isPostPublished:e(a.store).isCurrentPostPublished()}))),c=(0,o.useCallback)((t=>{e({meta:{jetpack_social_options:{...r,image_generator_settings:t}}})}),[r,e]),u=(0,o.useCallback)(((e,r)=>{const n={...t,[e]:r};c(n)}),[t,c]),d=(0,o.useCallback)((e=>{const r={...t,...e};c(r)}),[t,c]);return{...i(r?.image_generator_settings,l),setIsEnabled:e=>u("enabled",e),setToken:e=>u("token",e),updateSettings:d}}},98811:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(9818),a=r(69307);const o=async e=>{var t;if(!e)return{};let r={mime:e.mime_type,fileSize:e.media_details.filesize,length:e.media_details?.length};"video/videopress"===e.mime_type&&(r=await(async e=>{if(!e?.media_details?.videopress?.original||!e?.media_details?.videopress?.duration)return{};const t=await fetch(e?.media_details?.videopress?.original,{method:"HEAD"}),r=t.headers.get("content-length"),n=t.headers.get("content-type");return r&&n?{mime:n,fileSize:r,length:Math.round(e.media_details.videopress.duration/1e3)}:{}})(e));const n=null!==(t=e?.media_details?.sizes)&&void 0!==t?t:{};if(0===Object.keys(n).length)return{mediaData:{width:e.media_details.width,height:e.media_details.height,sourceUrl:e.source_url},metaData:r};const a=n.large||n.thumbnail;return{mediaData:{width:a.width,height:a.height,sourceUrl:a.source_url},metaData:r}};function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const[t,r]=(0,a.useState)([{}]),s=(0,n.useSelect)((t=>t("core").getMedia(e,{context:"view"})),[e]),i=(0,a.useCallback)((async()=>{try{const e=await o(s);r([null!=e?e:{}])}catch{r([{}])}}),[s]);return(0,a.useEffect)((()=>{i()}),[i]),t}},46791:(e,t,r)=>{"use strict";r.d(t,{Wv:()=>i,ZP:()=>c,rs:()=>o});var n=r(69307),a=r(1795);const o="NO_MEDIA_ERROR",s="FILE_SIZE_ERROR";function i(e){return"video"===e.split("/")[0]}const l=(e,t,r,n)=>{var l;const c=null!==(l=a.$8[r])&&void 0!==l?l:a.ay;if(!e||0===Object.keys(e).length)return c.requiresMedia?o:null;if(!c.requiresMedia&&!n)return null;const{mime:u,fileSize:d}=e;if(!u||!c.allowedMediaTypes.includes(u.toLowerCase()))return"FILE_TYPE_ERROR";const p=d?d/Math.pow(1e3,2):null;return i(u)?((e,t,r,n,o)=>{const{minSize:i=0,maxSize:l=a.zc,minLength:c=0,maxLength:u=a.zc,maxWidth:d=a.zc,aspectRatio:p=a.ay.video.aspectRatio}=o;if(!e||e>l||e<i)return s;if(!t||t<c)return"VIDEO_LENGTH_TOO_SHORT_ERROR";if(t>u)return"VIDEO_LENGTH_TOO_LONG_ERROR";const m=r/n;return m<p.min||m>p.max||r>d?"DIMENSION_ERROR":null})(p,e.length,t?.width,t?.height,c.video):((e,t)=>!e||e>t?s:null)(p,c.image.maxSize)},c=(e,t,r)=>{let{isSocialImageGeneratorEnabledForPost:a,shouldUploadAttachedMedia:o}=r;const s=(0,n.useRef)({});return(0,n.useMemo)((()=>{const r=a?{}:e.reduce(((e,r)=>{let{connection_id:n,service_name:a}=r;const s=l(t.metaData,t.mediaData,a,o);return s&&(e[n]=s),e}),{});return JSON.stringify(r)!==JSON.stringify(s.current)&&(s.current=r),s.current}),[a,e,t.metaData,t.mediaData,o])}},1795:(e,t,r)=>{"use strict";r.d(t,{$8:()=>d,ay:()=>u,zc:()=>c});const n="video/mp4",a="video/mov",o="video/videopress",s=["image/jpeg","image/jpg","image/png"],i=s.concat(["image/gif","image/tiff","image/tif","image/bmp"]),l=s.concat(["image/gif","image/heic","image/heif","image/webp","image/avif"]),c=1e5,u={requiresMedia:!1,allowedMediaTypes:s.concat([n,o,a]),image:{maxSize:4},video:{minLength:0,minSize:0,maxSize:c,maxLength:c,maxWidth:c,aspectRatio:{min:0,max:c}}},d={twitter:{allowedMediaTypes:s.concat([n,o]),image:{maxSize:5},video:{maxSize:512,maxLength:140}},facebook:{allowedMediaTypes:i.concat([o,"video/3g2","video/3gp","video/3gpp","video/asf","video/avi","video/dat","video/divx","video/dv","video/f4v","video/flv","video/gif","video/m2ts","video/m4v","video/mkv","video/mod","video/mov","video/mp4","video/mpe","video/mpeg","video/mpeg4","video/mpg","video/mts","video/nsv","video/ogm","video/ogv","video/qt","video/tod","video/ts","video/vob","video/wmv"]),image:{maxSize:4},video:{maxSize:1e4,maxLength:14400}},tumblr:{allowedMediaTypes:s.concat([n,a,o]),image:{maxSize:20},video:{maxSize:500,maxLength:600}},linkedin:{allowedMediaTypes:s.concat([n,o]),image:{maxSize:20},video:{minSize:.075,maxSize:200,maxLength:600,minLength:3}},"instagram-business":{requiresMedia:!0,allowedMediaTypes:["image/jpg","image/jpeg",n,a,o],image:{maxSize:8},video:{maxLength:90,minLength:3,maxSize:1e3,maxWidth:1920,aspectRatio:{min:.01,max:10}}},mastodon:{allowedMediaTypes:l.concat(["video/webm","video/quicktime","video/ogg",n,o]),image:{maxSize:10},video:{maxSize:40}}}},14085:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(13419),a=r(9818),o=r(12238);const s="republicize";function i(){var e,t;const{togglePublicizeFeature:r}=(0,a.useDispatch)("jetpack/publicize"),i=null!==(e=(0,n.Pb)()?.social?.sharesData)&&void 0!==e?e:{},l=i.is_share_limit_enabled,c=(0,n.OZ)(s)?.available||l,u=(0,a.useSelect)((e=>e(o.store).isCurrentPostPublished()),[]),d=(0,a.useSelect)((e=>e("jetpack/publicize").getJetpackSocialPostAlreadyShared()),[]),p=null!==(t=(0,n.Pb)()?.social?.publicizeConnectionsUrl)&&void 0!==t?t:"https://wordpress.com/marketing/connections/",m=(0,a.useSelect)((e=>e("jetpack/publicize").getFeatureEnableState()),[]),h=(0,n.X1)(s)&&!c,g=u?c:m,f=u&&h,b=u&&!c,v=!!(0,n.Pb)()?.social?.hasPaidPlan,k=!!(0,n.Pb)()?.social?.isEnhancedPublishingEnabled;return{isPublicizeEnabledMeta:m,isPublicizeEnabled:g,togglePublicizeFeature:r,isPublicizeDisabledBySitePlan:f,isRePublicizeFeatureAvailable:c,isRePublicizeUpgradableViaUpsell:h,hidePublicizeFeature:b,isShareLimitEnabled:l,isPostAlreadyShared:d,numberOfSharesRemaining:i.shares_remaining,shouldShowAdvancedPlanNudge:i.show_advanced_plan_upgrade_nudge,hasPaidPlan:v,isEnhancedPublishingEnabled:k,isSocialImageGeneratorAvailable:!!(0,n.Pb)()?.social?.isSocialImageGeneratorAvailable,isSocialImageGeneratorEnabled:!!(0,n.Pb)()?.social?.isSocialImageGeneratorEnabled,connectionsAdminUrl:p+(0,n.lQ)(),adminUrl:(0,n.Pb)()?.social?.adminUrl}}},86419:(e,t,r)=>{"use strict";r.d(t,{M1:()=>i,e3:()=>l});var n=r(94333),a=r(9818),o=r(12238),s=r(69307);function i(e,t){const r=(0,a.useSelect)((e=>e(o.store).isPublishingPost()),[]),i=(0,n.usePrevious)(r);(0,s.useEffect)((()=>{i&&!r&&e()}),[r,i,e,t])}function l(e,t){const r=(0,a.useSelect)((e=>e(o.store).isPublishingPost()),[]),i=(0,n.usePrevious)(r);(0,s.useEffect)((()=>{!i&&r&&e()}),[r,i,e,t])}},45579:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(13419),a=r(86989),o=r.n(a),s=r(9818),i=r(12238),l=r(69307),c=r(65736),u=r(37568),d=r(48751);const __=c.__;function p(e){const t=e?.code,r=e?.errors?.length;if(!t&&!r)return!1;let n="";return t&&(n=__("Unable to share the Post","jetpack")),r&&(n=__("Unable to share the Post","jetpack")),{message:n,result:e}}function m(e){var t;const{message:r}=(0,d.Z)(),{skippedConnections:a}=(0,u.Z)(),c=(0,s.useSelect)((e=>e(i.store).getCurrentPostId()),[]);e=e||c;const[m,h]=(0,l.useState)({data:[],error:{}}),g=(null!==(t=(0,n.Pb)()?.social?.resharePath)&&void 0!==t?t:"/wpcom/v2/posts/{postId}/publicize").replace("{postId}",e),f=(0,l.useCallback)((function(){const t={isFetching:!1,isError:!1,isSuccess:!1,data:[],error:{},postId:e};if(!m.isFetching)return h({...t,isFetching:!0}),o()({path:g,method:"POST",data:{message:r,skipped_connections:a}}).then((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=p(e);if(t)return h((e=>({...e,isFetching:!1,isSuccess:!1,isError:!0,data:[],error:t})));h((t=>({...t,isFetching:!1,isSuccess:!0,isError:!1,data:e?.results,error:{}})))})).catch((e=>{h((t=>({...t,isFetching:!1,isSuccess:!1,isError:!0,data:[],error:p(e)})))})),function(){h(t)}}),[e,r,a,m.isFetching,g]);return{...m,doPublicize:f}}},37568:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(9818);function a(){const{refreshConnectionTestResults:e,toggleConnectionById:t}=(0,n.useDispatch)("jetpack/publicize"),r=(0,n.useSelect)((e=>e("jetpack/publicize").getConnections()),[]),a=r.filter((e=>!e.enabled)).map((e=>e.id)),o=r.filter((e=>e.enabled));return{connections:r,hasConnections:r.length>0,hasEnabledConnections:r&&r.some((e=>e.enabled)),skippedConnections:a,enabledConnections:o,toggleById:t,refresh:e}}},48751:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(9818),a=r(12238);function o(){const{editPost:e}=(0,n.useDispatch)(a.store),{message:t,maxLength:r}=(0,n.useSelect)((e=>({message:e("jetpack/publicize").getShareMessage(),maxLength:e("jetpack/publicize").getShareMessageMaxLength()})),[]);return{message:t,maxLength:r,updateMessage:function(t){e({meta:{jetpack_publicize_message:t}})}}}},54725:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(371),a=r(4462);const o={...n.ZP,...a.ZP}},371:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>l,dz:()=>s,ff:()=>i});var n=r(9818),a=r(23177),o=r(4957);const s="SET_JETPACK_SETTINGS";function i(e){return{type:s,options:e}}const l={updateJetpackSettings:function*(e){try{yield i({is_updating:!0}),yield i(e),yield(0,o.RF)(e);const t=yield(0,o.es)();return yield i(t),!0}catch(e){const t=(0,n.select)(a.E).getJetpackSettings();return yield i(t),!1}finally{yield i({is_updating:!1})}},setJetpackSettings:i}},4462:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>l,ch:()=>i,kg:()=>s});var n=r(9818),a=r(23177),o=r(4957);const s="SET_SOCIAL_IMAGE_GENERATOR_SETTINGS";function i(e){return{type:s,options:e}}const l={updateSocialImageGeneratorSettings:function*(e){try{yield i({isUpdating:!0}),yield i(e),yield(0,o.Ux)(e);const t=yield(0,o.oB)();return yield i(t),!0}catch(e){const t=(0,n.select)(a.E).getSocialImageGeneratorSettings();return yield i(t),!1}finally{yield i({isUpdating:!1})}},setSocialImageGeneratorSettings:i}},4957:(e,t,r)=>{"use strict";r.d(t,{RF:()=>u,Ux:()=>p,ZP:()=>m,es:()=>c,oB:()=>d});var n=r(86989),a=r.n(n);const o="FETCH_JETPACK_SETTINGS",s="UPDATE_JETPACK_SETTINGS",i="FETCH_SOCIAL_IMAGE_GENERATOR_SETTINGS",l="UPDATE_SOCIAL_IMAGE_GENERATOR_SETTINGS",c=()=>({type:o}),u=e=>({type:s,settings:e}),d=()=>({type:i}),p=e=>({type:l,settings:e}),m={[o]:function(){return a()({path:"/jetpack/v4/social/settings"})},[s]:function(e){return a()({path:"/jetpack/v4/social/settings",method:"POST",data:e.settings})},[i]:function(){return a()({path:"/jetpack/v4/social-image-generator/settings"})},[l]:function(e){return a()({path:"/jetpack/v4/social-image-generator/settings",method:"POST",data:e.settings})}}},23177:(e,t,r)=>{"use strict";r.d(t,{E:()=>c});var n=r(9818),a=r(54725),o=r(4957),s=r(45272),i=r(15781),l=r(22987);const c="jetpack-social-plugin",u={reducer:s.Z,actions:a.Z,selectors:l.Z,resolvers:i.ZP,controls:o.ZP,initialState:window?.jetpackSocialInitialState||window?.Initial_State?.socialInitialState||{}},d=(0,n.createReduxStore)(c,u);(0,n.register)(d)},71837:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}},45272:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(9818),a=r(71837),o=r(80697),s=r(35652),i=r(28696),l=r(54489);const c=(0,n.combineReducers)({sharesData:s.Z,siteData:i.Z,connectionData:a.Z,jetpackSettings:o.Z,socialImageGeneratorSettings:l.Z})},80697:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(371);const a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.type===n.dz?{...e,...t.options}:e}},35652:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}},28696:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}},54489:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(4462);const a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.type===n.kg?{...e,...t.options}:e}},15781:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>s});var n=r(371),a=r(4462),o=r(4957);const s={getJetpackSettings:function*(){try{const e=yield(0,o.es)();if(e)return(0,n.ff)(e)}catch(e){console.log(e)}},getSocialImageGeneratorSettings:function*(){try{const e=yield(0,o.oB)();if(e)return(0,a.ch)(e)}catch(e){console.log(e)}}}},43354:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});const n=e=>{var t;return null!==(t=e.connectionData?.connections)&&void 0!==t?t:{}},a={getConnections:n,getConnectionsAdminUrl:e=>{var t;return null!==(t=e.connectionData?.adminUrl)&&void 0!==t?t:null},hasConnections:e=>Object.keys(n(e)).length>0}},22987:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(43354),a=r(82836),o=r(66450),s=r(85675),i=r(45073);const l={...s.Z,...n.Z,...a.Z,...o.Z,...i.Z}},82836:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={getJetpackSettings:e=>e.jetpackSettings,isModuleEnabled:e=>e.jetpackSettings.publicize_active,showPricingPage:e=>e.jetpackSettings.show_pricing_page,isUpdatingJetpackSettings:e=>e.jetpackSettings.is_updating,hasPaidPlan:e=>{var t;return!(null===(t=e.jetpackSettings?.showNudge)||void 0===t||t)},isEnhancedPublishingEnabled:e=>{var t;return!(null!==(t=e.jetpackSettings?.isEnhancedPublishingEnabled)&&void 0!==t&&t)},getDismissedNotices:e=>e.jetpackSettings?.dismissedNotices,isInstagramConnectionSupported:e=>e.jetpackSettings?.isInstagramConnectionSupported,isMastodonConnectionSupported:e=>e.jetpackSettings?.isMastodonConnectionSupported}},66450:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={getSharesCount:e=>{var t,r;return(null!==(t=e.sharesData?.publicized_count)&&void 0!==t?t:0)+(null!==(r=e.sharesData?.to_be_publicized_count)&&void 0!==r?r:0)},getPostsCount:e=>{var t;return null!==(t=e.sharesData?.shared_posts_count)&&void 0!==t?t:0},isShareLimitEnabled:e=>{var t;return null!==(t=e.sharesData?.is_share_limit_enabled)&&void 0!==t&&t},numberOfSharesRemaining:e=>{var t;return null!==(t=e.sharesData?.shares_remaining)&&void 0!==t?t:null},shouldShowAdvancedPlanNudge:e=>{var t;return null!==(t=e.sharesData?.show_advanced_plan_upgrade_nudge)&&void 0!==t&&t}}},85675:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={getAdminUrl:e=>{var t;return null!==(t=e.siteData?.adminUrl)&&void 0!==t?t:null},getAPIRootUrl:e=>{var t;return null!==(t=e.siteData?.apiRoot)&&void 0!==t?t:null},getAPINonce:e=>{var t;return null!==(t=e.siteData?.apiNonce)&&void 0!==t?t:null},getRegistrationNonce:e=>{var t;return null!==(t=e.siteData?.registrationNonce)&&void 0!==t?t:null},getSiteSuffix:e=>{var t;return null!==(t=e.siteData?.siteSuffix)&&void 0!==t?t:null},getPluginVersion:e=>{var t;return null!==(t=e.siteData?.pluginVersion)&&void 0!==t?t:null}}},45073:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={getSocialImageGeneratorSettings:e=>e.socialImageGeneratorSettings,isSocialImageGeneratorAvailable:e=>e.socialImageGeneratorSettings.available,isSocialImageGeneratorEnabled:e=>e.socialImageGeneratorSettings.enabled,isUpdatingSocialImageGeneratorSettings:e=>e.socialImageGeneratorSettings.isUpdating,getSocialImageGeneratorDefaultTemplate:e=>e.socialImageGeneratorSettings.defaultTemplate}},13530:(e,t,r)=>{"use strict";r.r(t),r.d(t,{fetchFromAPI:()=>i,getTwitterCards:()=>u,refreshConnectionTestResults:()=>a,refreshTweets:()=>l,setTweets:()=>c,setTwitterCards:()=>d,toggleConnectionById:()=>o,togglePublicizeFeature:()=>s});var n=r(9818);function a(){return{type:"REFRESH_CONNECTION_TEST_RESULTS"}}function o(e){return{type:"TOGGLE_CONNECTION_BY_ID",connectionId:e}}function s(){return{type:"TOGGLE_PUBLICIZE_FEATURE"}}function i(e){return{type:"FETCH_FROM_API",path:e}}function l(){return{type:"REFRESH_TWEETS"}}function c(e){return{type:"SET_TWEETS",tweets:e}}function u(e){const{twitterCardIsCached:t}=(0,n.select)("jetpack/publicize");return{type:"GET_TWITTER_CARDS",urls:e.filter((e=>!t(e)))}}function d(e){return{type:"SET_TWITTER_CARDS",cards:e}}},99376:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(86989),a=r.n(n);const o={FETCH_FROM_API:e=>{let{path:t}=e;return a()({path:t})}}},43785:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>p});var n=r(13419),a=r(86989),o=r.n(a),s=r(4981),i=r(9818),l=r(12238),c=r(92819),u=r(68407);const d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const{getSupportedBlockType:t}=(0,i.select)("jetpack/publicize");return(0,c.flatMap)(e,(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t(e.name)||e.name.startsWith("core-embed/")?e:u.H8.includes(e.name)?d(e.innerBlocks):[]}))};const p={REFRESH_CONNECTION_TEST_RESULTS:async function(){try{var e;const t=(0,n.Pb)()?.social||{},r=null!==(e=t.connectionRefreshPath)&&void 0!==e?e:"/wpcom/v2/publicize/connection-test-results",a=await o()({path:r}),s=(0,i.select)("jetpack/publicize").getConnections(),c=a,u=[],d={done:!1,enabled:Boolean(t.sharesData?.shares_remaining),toggleable:!0};for(const e of c){const t=s.find((t=>t.connection_id?t.connection_id===e.connection_id:t.id===e.id)),{done:r,enabled:n,toggleable:a}=null!=t?t:d,o={display_name:e.display_name,username:e.username,service_name:e.service_name,id:e.id,profile_picture:e.profile_picture,done:r,enabled:n,toggleable:a,is_healthy:e.test_success,error_code:e.error_code,connection_id:e.connection_id};u.push(o)}return(0,i.dispatch)(l.store).editPost({jetpack_publicize_connections:u})}catch(e){}},TOGGLE_CONNECTION_BY_ID:async function(e){let{connectionId:t}=e;const r=(0,i.select)("jetpack/publicize").getConnections().map((e=>({...e,enabled:(e.connection_id?e.connection_id===t:e.id===t)?!e.enabled:e.enabled})));return(0,i.dispatch)(l.store).editPost({jetpack_publicize_connections:r})},TOGGLE_PUBLICIZE_FEATURE:async function(){const e=(0,i.select)("jetpack/publicize").getFeatureEnableState();return(0,i.dispatch)(l.store).editPost({meta:{jetpack_publicize_feature_enabled:!e}})},REFRESH_TWEETS:(0,c.throttle)((async function(){const e=(0,i.select)("core/block-editor").getBlocks(),t=d(e);try{const e=await o()({path:"/wpcom/v2/tweetstorm/parse",data:{blocks:t.map((e=>({attributes:e.attributes,block:(0,s.serialize)(e),clientId:e.clientId})))},method:"POST"}),r=(0,c.flatMap)(e,(e=>e.urls));return(0,i.dispatch)("jetpack/publicize").getTwitterCards(r),(0,i.dispatch)("jetpack/publicize").setTweets(e)}catch(e){}}),2e3,{leading:!0,trailing:!0}),GET_TWITTER_CARDS:async function(e){if(0===e.urls.length)return(0,i.dispatch)("jetpack/publicize").setTwitterCards([]);try{const t=await o()({path:"/wpcom/v2/tweetstorm/generate-cards",data:{urls:e.urls},method:"POST"});return(0,i.dispatch)("jetpack/publicize").setTwitterCards(t)}catch(e){}}}},77771:(e,t,r)=>{"use strict";var n=r(9818),a=r(13530),o=r(99376),s=r(92479),i=r(82726),l=r(34074);const c=(0,n.registerStore)("jetpack/publicize",{actions:a,controls:o.Z,reducer:i.Z,selectors:l});(0,s.Z)(c)},92479:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(92819),a=r(24274),o=r.n(a),s=r(43785);function i(e){const t=[o()(s.ZP)];let r=()=>{throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},a=[];const i={getState:e.getState,dispatch:function(){return r(...arguments)}};return a=t.map((e=>e(i))),r=(0,n.flowRight)(...a)(e.dispatch),e.dispatch=r,e}},82726:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});const n={tweets:[],twitterCards:[]};function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REFRESH_CONNECTION_TEST_RESULTS":case"TOGGLE_CONNECTION_BY_ID":case"TOGGLE_PUBLICIZE_FEATURE":return e;case"SET_TWEETS":return{...e,tweets:t.tweets};case"GET_TWITTER_CARDS":{const r={};return t.urls.forEach((e=>r[e]={error:"loading"})),{...e,twitterCards:{...e.twitterCards,...r}}}case"SET_TWITTER_CARDS":return{...e,twitterCards:{...e.twitterCards,...t.cards}}}return e}},34074:(e,t,r)=>{"use strict";r.r(t),r.d(t,{checkForTagsInContentAttributes:()=>L,contentAttributesChanged:()=>R,getAttachedMedia:()=>D,getBoundariesForBlock:()=>x,getBoundaryStyleSelectors:()=>T,getConnections:()=>I,getFailedConnections:()=>p,getFeatureEnableState:()=>M,getFirstTweet:()=>v,getImageGeneratorPostSettings:()=>z,getInstagramDetails:()=>g,getJetpackSocialOptions:()=>Z,getJetpackSocialPostAlreadyShared:()=>B,getLastTweet:()=>k,getLinkedInDetails:()=>h,getMustReauthConnections:()=>m,getPopoverWarnings:()=>N,getShareMessage:()=>C,getShareMessageMaxLength:()=>j,getSupportedBlockType:()=>y,getTweetStorm:()=>b,getTweetTemplate:()=>f,getTweetsForBlock:()=>E,getTwitterCardForURLs:()=>w,isInstagramConnectionSupported:()=>O,isMastodonConnectionSupported:()=>U,isSelectedTweetBoundary:()=>A,isTweetStorm:()=>S,shouldUploadAttachedMedia:()=>F,twitterCardIsCached:()=>_});var n=r(13419),a=r(9818),o=r(12238),s=r(65736),i=r(92819),l=r(96524),c=r(68407);const __=s.__,u=255,d="\n\n"+__("A thread ⬇️","jetpack");function p(){return I().filter((e=>!1===e.test_success))}function m(){return I().filter((e=>"must_reauth"===e.test_success)).map((e=>e.service_name))}function h(){let{forceDefaults:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e){const e=I().find((e=>{let{service_name:t}=e;return"linkedin"===t}));if(e)return{name:e.display_name,profileImage:e.profile_picture}}return{name:"",profileImage:""}}function g(){const e=I().find((e=>{let{service_name:t}=e;return"instagram-business"===t}));return e?{name:e.username,profileImage:e.profile_picture}:{name:"username",profileImage:""}}function f(e){const t=e.connections||I(),r=t?.find((e=>"twitter"===e.service_name));return{name:r?.profile_display_name,profileImage:r?.profile_picture,screenName:r?.display_name}}function b(e){const t=f(e),r=[v(e),...e.tweets.slice(0,100).map((r=>({...t,text:r.text,media:r.media,tweet:r.tweet,urls:r.urls,...w(e,r.urls)})))];return r.length>1&&r.push(k(e)),r}function v(e){if(!(0,a.select)("core"))return;const t=f(e),{getMedia:r}=(0,a.select)("core"),{getEditedPostAttribute:n}=(0,a.select)("core/editor"),o=n("featured_media"),s=n("link"),i=o&&r(o),l=i?.media_details?.sizes?.large?.source_url||i?.source_url;return{...t,text:C()+` ${s}`,urls:[s],title:n("title"),description:n("meta")?.advanced_seo_description||n("excerpt")||n("content").split("\x3c!--more")[0]||__("Visit the post for more.","jetpack"),url:s,image:l,cardType:l?"summary_large_image":"summary"}}function k(e){if(!(0,a.select)("core/editor"))return;const{getEditedPostAttribute:t}=(0,a.select)("core/editor"),r=t("link"),n=e.tweets.length>100?__("The rest of this thread can be read here:","jetpack"):__("This thread can be read here:","jetpack");return{...v(e),text:`${n} ${r}`}}function y(e,t){if(c.nE[t])return c.nE[t]}const E=(0,l.Z)(((e,t)=>e.tweets.filter((e=>!!e.blocks.find((e=>e.clientId===t))))),(e=>[e.tweets]));function w(e,t){if(t)return t.reduce(((t,r)=>t||(e.twitterCards[r]&&!e.twitterCards[r].error?{url:r,...e.twitterCards[r]}:void 0)),void 0)}function _(e,t){return!!e.twitterCards[t]}function C(){const{getEditedPostAttribute:e}=(0,a.select)("core/editor"),t=e("meta"),r=e("title"),n=(0,i.get)(t,["jetpack_publicize_message"],"");return n?n.substr(0,j()):S()&&r?r.substr(0,j())+d:""}function j(){return S()?u-d.length:u}function S(){return!!(0,a.select)("core/editor").getEditedPostAttribute("meta")?.jetpack_is_tweetstorm}const x=(0,l.Z)(((e,t)=>{if(!S())return[];const r=E(e,t);return r&&0!==r.length?r.filter((e=>e.boundary)).map((e=>e.boundary)):[]}),(e=>[e.tweets]));function P(e,t){if(`block-${t}`===e.id)return`#block-${t}`;const r=e.parentNode,n=Array.prototype.indexOf.call(r.children,e);return P(r,t)+` > :nth-child( ${n+1} )`}const T=(0,l.Z)(((e,t)=>{const r=x(e,t),n=document.getElementById(`block-${t}`);return r.filter((e=>"end-of-line"===e.type)).map((e=>{if(!n)return!1;const r=n.getElementsByTagName("li").item(e.line);return!!r&&P(r,t)})).filter((e=>!!e))}),(e=>[e.tweets]));function L(e,t,r){if(0===r.length)return!1;if(!y(0,t.name)?.contentAttributes)return!1;const n=new RegExp(`<(${r.join("|")})( |>|/>)`,"gi");return y(0,t.name).contentAttributes.reduce(((e,r)=>!!e||n.test(t.attributes[r])),!1)}const N=(0,l.Z)(((e,t)=>{const{isTyping:r,isDraggingBlocks:n,isMultiSelecting:o,hasMultiSelection:s,isCaretWithinFormattedText:i}=(0,a.select)("core/block-editor");if(!S())return[];if(r()||n()||o()||s()||i())return[];const l=[];return y(0,t.name)||c.H8[t.name]?("core/gallery"===t.name&&t.attributes.images.length>4&&l.push(__("Twitter displays the first four images.","jetpack")),L(0,t,["strong","bold","em","i","sup","sub","span","s"])&&l.push(__("Twitter removes all text formatting.","jetpack")),L(0,t,["a"])&&l.push(__("Links will be posted seperately.","jetpack"))):l.push(__("This block is not exportable to Twitter","jetpack")),l}),(e=>[e.tweets]));function A(e,t){const{isBlockSelected:r}=(0,a.select)("core/block-editor");if(!S())return!1;const n=y(0,t.name),o=E(e,t.clientId);if(!o||0===o.length)return!1;const s=o[o.length-1];return r(t.clientId)&&!n||s.blocks[s.blocks.length-1].clientId===t.clientId&&o.some((e=>e.blocks.some((e=>r(e.clientId)))))}function R(e,t,r){const n=y(0,r.name);if(!n)return!1;const a=n.contentAttributes;return!(0,i.isEqual)(a.map((e=>({attribute:e,content:t.attributes[e]}))),a.map((e=>({attribute:e,content:r.attributes[e]}))))}function I(){return(0,a.select)(o.store).getEditedPostAttribute("jetpack_publicize_connections")||[]}function M(){const{getEditedPostAttribute:e}=(0,a.select)(o.store),t=e("meta");return(0,i.get)(t,["jetpack_publicize_feature_enabled"],!0)}function Z(){const{getEditedPostAttribute:e}=(0,a.select)(o.store),t=e("meta");return(0,i.get)(t,["jetpack_social_options"],{})}function B(){const{getEditedPostAttribute:e}=(0,a.select)(o.store),t=e("meta");return(0,i.get)(t,["jetpack_social_post_already_shared"],{})}function D(){return(0,i.get)(Z(),["attached_media"],[])}function F(){var e;return null!==(e=Z()?.should_upload_attached_media)&&void 0!==e&&e}function z(){var e;return null!==(e=Z()?.image_generator_settings)&&void 0!==e?e:{}}function O(){return!!(0,n.Pb)()?.social?.isInstagramConnectionSupported}function U(){return!!(0,n.Pb)()?.social?.isMastodonConnectionSupported}},13419:(e,t,r)=>{"use strict";r.d(t,{Dp:()=>u.Z,FK:()=>c.FK,HD:()=>c.HD,M6:()=>o.M6,OZ:()=>s.Z,Pb:()=>n.Z,Pm:()=>m.Z,Qq:()=>c.Qq,Rl:()=>c.Rl,T:()=>l.Z,Ug:()=>o.Ug,Wp:()=>o.Wp,X1:()=>c.X1,_D:()=>c._D,aQ:()=>o.aQ,el:()=>p.Z,lQ:()=>a.Z,m3:()=>c.m3,o_:()=>i.Z,z$:()=>d.Z});var n=r(50148),a=r(35004),o=r(99505),s=r(48052),i=r(76714),l=r(80354),c=r(75404),u=r(68586),d=r(61053),p=r(11380),m=r(6342)},6342:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(78868),a=r(99196),o=r.n(a);const s=()=>o().createElement(n.Z,{className:"jetpack-editor-panel-logo",height:16,logoColor:"#1E1E1E",showText:!1})},50148:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});const n="Jetpack_Editor_Initial_State";function a(){var e;return"object"==typeof window&&null!==(e=window?.[n])&&void 0!==e?e:null}},48052:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(50148);function a(e){var t,r,a;const o=(0,n.Z)(),s=null!==(t=o?.available_blocks?.[e]?.available)&&void 0!==t&&t,i=null!==(r=o?.available_blocks?.[e]?.unavailable_reason)&&void 0!==r?r:"unknown",l=null!==(a=o?.available_blocks?.[e]?.details)&&void 0!==a?a:[];return{available:s,...!s&&{details:l,unavailableReason:i}}}},35004:(e,t,r)=>{"use strict";function n(){return window&&window.Jetpack_Editor_Initial_State&&window.Jetpack_Editor_Initial_State.siteFragment?window.Jetpack_Editor_Initial_State.siteFragment:null}r.d(t,{Z:()=>n})},61053:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(6975),a=r(31294),o=r(69307);const{tracks:s}=n.Z,{recordEvent:i}=s,l=function(){let{pageViewEventName:e=null,pageViewNamespace:t="jetpack",pageViewSuffix:r="page_view",pageViewEventProperties:l={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[c,u]=(0,o.useState)(!1),{isUserConnected:d,isRegistered:p,userConnectionData:m={}}=(0,a.Z)(),{wpcomUser:{login:h,ID:g}={},blogId:f}=m.currentUser||{},b=(0,o.useCallback)((async function(e){d&&g&&h&&i(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}),[d,g,h]);return(0,o.useEffect)((()=>{d&&g&&h&&f&&n.Z.initialize(g,h,{blog_id:f})}),[f,g,h,d]),(0,o.useEffect)((()=>{const n=e?`${t}_${e}_${r}`:null;p&&n&&(c||(b(n,l),u(!0)))}),[c,t,e,r,p,l,b]),{recordEvent:b,tracks:s}}},11380:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(86989),a=r.n(n),o=r(69307),s=r(99505);async function i(e){if((0,s.Wp)())return!0;try{const t=await async function(){try{return await a()({path:"/jetpack/v4/module/all",method:"GET"})}catch(e){return e.message}}();return!(!t||!t.hasOwnProperty(e))&&!!t[e].activated}catch(e){return!1}}const l=e=>{const[t,r]=(0,o.useState)(Boolean(e)),[n,s]=(0,o.useState)(!1),[l,c]=(0,o.useState)(!1);(0,o.useEffect)((()=>{e&&(r(!0),i(e).then((e=>{c(e),r(!1)})))}),[e]);const u=(0,o.useCallback)((t=>{e&&l!==t&&(s(!0),async function(e,t){return await a()({path:`/jetpack/v4/module/${e}/active`,method:"POST",data:{active:t}})}(e,t).then((()=>{c(t),s(!1)})).catch((()=>{s(!1)})))}),[e,l]);return(0,o.useMemo)((()=>({isLoadingModules:t,isChangingStatus:n,isModuleActive:l,changeStatus:u})),[t,n,l,u])}},68586:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(50148);function a(){var e;return null!==(e=(0,n.Z)()?.jetpack?.is_current_user_connected)&&void 0!==e&&e}},75404:(e,t,r)=>{"use strict";r.d(t,{FK:()=>g,HD:()=>f,Qq:()=>u,Rl:()=>m,X1:()=>d,_D:()=>p,m3:()=>b});var n=r(65736),a=r(96483),o=r(92819),s=r(50148),i=r(48052),l=r(35004),c=r(99505);const __=n.__;function u(e){let{planSlug:t,plan:r,postId:n,postType:s}=e;const i=(0,o.startsWith)(t,"jetpack_")?t:(0,o.get)(r,["path_slug"]),u=(void 0===s?()=>{const e=new URLSearchParams(window.location.search);return(0,a.addQueryArgs)(window.location.protocol+`//${(0,l.Z)().replace("::","/")}/wp-admin/site-editor.php`,{postId:e.get("postId"),postType:e.get("postType"),plan_upgraded:1})}:()=>{const e=["page","post"].includes(s)?"":"edit";return(0,c.Wp)()?(0,a.addQueryArgs)("/"+(0,o.compact)([e,s,(0,l.Z)(),n]).join("/"),{plan_upgraded:1}):(0,a.addQueryArgs)(window.location.protocol+`//${(0,l.Z)().replace("::","/")}/wp-admin/post.php`,{action:"edit",post:n,plan_upgraded:1})})();return(0,c.Ug)()?(0,a.addQueryArgs)(`https://wordpress.com/plans/${(0,l.Z)()}`,{redirect_to:u,customerType:"business"}):i&&(0,a.addQueryArgs)(`https://wordpress.com/checkout/${(0,l.Z)()}/${i}`,{redirect_to:u})}function d(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{available:r,unavailableReason:n}=(0,i.Z)(t);return!r&&"missing_plan"===n}function p(e,t){return"missing_plan"===e&&t.required_plan}function m(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{details:r,unavailableReason:n}=(0,i.Z)(t);return p(n,r)}const h=[{name:"core/cover",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"video",description:__("Upgrade your plan to use video covers","jetpack")},{name:"core/audio",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"audio",description:__("Upgrade your plan to upload audio","jetpack")}];function g(){return(0,o.get)((0,s.Z)(),"jetpack.enable_upgrade_nudge",!1)}const f=e=>(0,o.map)(h,"name").includes(e),b=e=>(0,o.head)((0,o.filter)(h,(t=>{let{name:r}=t;return r===e})))},76714:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(98817),a=r(48052);function o(e,t){const{available:r,unavailableReason:o}=(0,a.Z)(e);return!!r&&(0,n.registerPlugin)(`jetpack-${e}`,t)}},99505:(e,t,r)=>{"use strict";r.d(t,{M6:()=>i,Ug:()=>s,Wp:()=>o,aQ:()=>l});var n=r(50148);function a(){return"object"==typeof window&&"string"==typeof window._currentSiteType?window._currentSiteType:null}function o(){return"simple"===a()}function s(){return"atomic"===a()}function i(){var e;const t=(0,n.Z)();return null!==(e=t?.jetpack?.is_private_site)&&void 0!==e&&e}function l(){var e;const t=(0,n.Z)();return null!==(e=t?.jetpack?.is_coming_soon)&&void 0!==e&&e}},80354:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(82674),a=r.n(n),o=r(94333);const s=e=>(0,o.createHigherOrderComponent)((t=>r=>React.createElement(t,a()({},r,{className:r.name===e?"has-warning is-interactive":r.className}))),"withHasWarningIsInteractiveClassNames")},84005:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={content:{type:"string"},originalContent:{type:"string"},promptType:{type:"string"},originalMessages:{type:"array",default:[]},messages:{type:"array",default:[]},useGutenbergSyntax:{type:"boolean",default:!1},useGpt4:{type:"boolean",default:!1},customSystemPrompt:{type:"string",default:""}}},83059:(e,t,r)=>{"use strict";r.d(t,{B3:()=>y,ZP:()=>w});var n=r(51806),a=r(36222),o=r(55609),s=r(65736),i=r(586),l=r(3639),c=r(92710),u=r(58532),d=r(65235),p=r.n(d),m=(r(99196),r(63634)),h=r(81612),g=r(27298);const __=s.__,f="correct-spelling",b="simplify",v="summarize",k="make-longer",y="ask-ai-assistant",E=[{name:__("Correct spelling and grammar","jetpack"),key:f,aiSuggestion:m.Hd,icon:i.Z},{name:__("Simplify","jetpack"),key:b,aiSuggestion:m.hI,icon:l.Z},{name:__("Summarize","jetpack"),key:v,aiSuggestion:m.Lq,icon:c.Z},{name:__("Expand","jetpack"),key:k,aiSuggestion:m.TV,icon:u.Z}];function w(e){let{key:t,label:r,exclude:s=[],requestingState:i,disabled:l,onChange:c,onReplace:u}=e;const d=E.filter((e=>!s.includes(e.key))),f="suggesting"===i?null:r||__("AI Assistant","jetpack");return(0,n.createElement)(o.Dropdown,{popoverProps:{variant:"toolbar"},renderToggle:e=>{let{isOpen:t,onToggle:r}=e;return(0,n.createElement)(o.ToolbarButton,{className:p()("jetpack-ai-assistant__button",{[`is-${i}`]:!0}),showTooltip:!0,onClick:r,"aria-haspopup":"true","aria-expanded":t,label:f,icon:a.u_,disabled:l})},renderContent:e=>{let{onClose:i}=e;return(0,n.createElement)(o.MenuGroup,{label:r},!s.includes(y)&&(0,n.createElement)(o.MenuItem,{icon:a.u_,iconPosition:"left",key:"key-ai-assistant",onClick:u,isSelected:"key-ai-assistant"===t},(0,n.createElement)("div",{className:"jetpack-ai-assistant__menu-item"},__("Ask AI Assistant","jetpack"))),d.map((e=>(0,n.createElement)(o.MenuItem,{icon:e?.icon,iconPosition:"left",key:`key-${e.key}`,onClick:()=>{c(e.aiSuggestion),i()},isSelected:t===e.key},(0,n.createElement)("div",{className:"jetpack-ai-assistant__menu-item"},e.name)))),(0,n.createElement)(g.IP,{onChange:e=>{c(m.Lg,{tone:e}),i()}}),(0,n.createElement)(h.xK,{onChange:e=>{c(m.Nw,{language:e}),i()}}))}})}},50687:(e,t,r)=>{"use strict";r.d(t,{Z:()=>w});var n=r(51806),a=r(36222),o=r(32054),s=r(52175),i=r(55609),l=r(94333),c=r(69307),u=r(65736),d=r(90986),p=r(6163),m=r(79201),h=r(65235),g=r.n(h),f=r(71449),b=r(3180),v=r(71597),k=r(4965),y=r(5246);const __=u.__,E="post"===window?.Jetpack_Editor_Initial_State?.screenBase,w=(0,c.forwardRef)(((e,t)=>{let{contentIsLoaded:r,getSuggestionFromOpenAI:u,retryRequest:h,handleAcceptContent:w,handleAcceptTitle:_,handleTryAgain:C,handleGetSuggestion:j,handleStopSuggestion:S,handleImageRequest:x,isWaitingState:P,loadingImages:T,userPrompt:L,setUserPrompt:N,showRetry:A,contentBefore:R,postTitle:I,wholeContent:M,promptType:Z,onChange:B,requireUpgrade:D,recordEvent:F,isGeneratingTitle:z}=e;const O=(0,c.useRef)(null),[U]=(0,o.Z)("sm"),H=(0,f.b)(),V=__("Ask Jetpack AI","jetpack");let G="";return G=P?L?.length?L:__("AI writing","jetpack"):V,(0,c.useImperativeHandle)(t,(()=>({focus:()=>{const e=O?.current;e?.focus?.()}})),[]),(0,l.useKeyboardShortcut)(["command+enter","ctrl+enter"],(()=>{r&&("generateTitle"===Z?_():w())}),{target:O}),(0,l.useKeyboardShortcut)("enter",(()=>{j("userPrompt")}),{target:O}),(0,n.createElement)(n.Fragment,null,D&&(0,n.createElement)(y.Z,null),!H&&(0,n.createElement)(b.Z,null),!P&&H&&(0,n.createElement)(k.Z,{isWaitingState:P,contentIsLoaded:r,getSuggestionFromOpenAI:u,retryRequest:h,handleAcceptContent:w,handleAcceptTitle:_,handleGetSuggestion:j,handleImageRequest:x,handleTryAgain:C,showRetry:A,contentBefore:R,hasPostTitle:!!I?.length,wholeContent:M,promptType:Z,setUserPrompt:e=>{if(!O?.current)return;O.current.focus();for(let t=0;t<e.length;t++)setTimeout((()=>{N(e.slice(0,t+1))}),25*t)},recordEvent:F,isGeneratingTitle:z}),(0,n.createElement)("div",{className:"jetpack-ai-assistant__input-container"},(0,n.createElement)("div",{className:g()("jetpack-ai-assistant__input-wrapper",{"is-disconnected":!H})},(0,n.createElement)("div",{className:"jetpack-ai-assistant__input-icon-wrapper"},P||T?(0,n.createElement)(i.Spinner,{className:"jetpack-ai-assistant__input-spinner"}):(0,n.createElement)(i.Icon,{icon:a.u_,size:24,className:"jetpack-ai-assistant__input-icon"})),(0,n.createElement)(s.PlainText,{value:P?"":L,onChange:e=>{N(e),B?.()},placeholder:G,className:"jetpack-ai-assistant__input",disabled:P||T||!H||D,ref:O}),(0,n.createElement)("div",{className:"jetpack-ai-assistant__controls"},(0,n.createElement)("div",{className:"jetpack-ai-assistant__prompt_button_wrapper"},P?(0,n.createElement)(i.Button,{className:"jetpack-ai-assistant__prompt_button",onClick:S,isSmall:!0,label:__("Stop request","jetpack")},(0,n.createElement)(i.Icon,{icon:p.Z}),__("Stop","jetpack")):(0,n.createElement)(i.Button,{className:"jetpack-ai-assistant__prompt_button",onClick:()=>j("userPrompt"),isSmall:!0,disabled:!L?.length||!H||D,label:__("Send request","jetpack")},(0,n.createElement)(i.Icon,{icon:d.Z}),!U&&__("Send","jetpack"))),(0,n.createElement)("div",{className:"jetpack-ai-assistant__prompt_button_wrapper"},r&&!P&&(E&&"generateTitle"===Z?(0,n.createElement)(i.Button,{className:"jetpack-ai-assistant__prompt_button",onClick:_,isSmall:!0,label:__("Accept title","jetpack")},(0,n.createElement)(i.Icon,{icon:m.Z}),__("Accept title","jetpack")):(0,n.createElement)(i.Button,{className:"jetpack-ai-assistant__prompt_button",onClick:w,isSmall:!0,label:__("Accept","jetpack")},(0,n.createElement)(i.Icon,{icon:m.Z}),__("Accept","jetpack")))))),r&&!P&&(0,n.createElement)(v.ZP,{state:v.Xx})))}))},3180:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(65736),o=r(26546),s=r(46867);const __=a.__,i=()=>{const e=`${window?.Jetpack_Editor_Initial_State?.adminUrl}admin.php?page=my-jetpack#/connection`,{autosaveAndRedirect:t,isRedirecting:r}=(0,s.Z)(e);return(0,n.createElement)(o.p,{buttonText:__("Reconnect Jetpack","jetpack"),checkoutUrl:e,className:"jetpack-ai-connect-banner",description:__("Your account is not connected to Jetpack at the moment.","jetpack"),goToCheckoutPage:e=>{t(e)},isRedirecting:r,visible:!0,align:null,title:null,context:null})}},81612:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>g,xK:()=>f});var n=r(51806),a=r(55609),o=r(65736),s=r(61074),i=r(46936),l=r(43618);r(99196);const __=o.__,c=["en","es","fr","de","it","pt","ru","zh","ja","ar","hi","ko"],u=window?.Jetpack_Editor_Initial_State?.siteLocale||navigator?.language,d=__("Translate","jetpack"),p=u?.split("-")[0]||"en",m=(u?.split("-")?.[1],{en:{label:__("English","jetpack")},es:{label:__("Spanish","jetpack")},fr:{label:__("French","jetpack")},de:{label:__("German","jetpack")},it:{label:__("Italian","jetpack")},pt:{label:__("Portuguese","jetpack")},ru:{label:__("Russian","jetpack")},zh:{label:__("Chinese","jetpack")},ja:{label:__("Japanese","jetpack")},ar:{label:__("Arabic","jetpack")},hi:{label:__("Hindi","jetpack")},ko:{label:__("Korean","jetpack")},id:{label:__("Indonesian","jetpack")},tl:{label:__("Filipino","jetpack")},vi:{label:__("Vietnamese","jetpack")}}),h=e=>{let{value:t,onChange:r}=e;const o=[...c.filter((e=>e!==p))];return c.includes(p)&&o.unshift(p),(0,n.createElement)(a.MenuGroup,{label:__("Select language","jetpack")},o.map((e=>(0,n.createElement)(a.MenuItem,{key:`key-${e}`,onClick:()=>r(e+" ("+m[e].label+")"),isSelected:t===e},m[e].label))))};function g(e){let{value:t=p,label:r=d,onChange:o}=e;return(0,n.createElement)(a.ToolbarDropdownMenu,{icon:l.Z,label:r,popoverProps:{variant:"toolbar"}},(()=>(0,n.createElement)(h,{value:t,onChange:o})))}function f(e){let{value:t=p,label:r=d,onChange:o}=e;return(0,n.createElement)(a.DropdownMenu,{className:"ai-assistant__i18n-dropdown",icon:l.Z,label:r,toggleProps:{children:(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:"ai-assistant__i18n-dropdown__toggle-label"},r),(0,n.createElement)(s.Z,{icon:i.Z}))}},(()=>(0,n.createElement)(h,{onChange:o,value:t})))}},50297:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(55609),o=r(65736);const __=o.__,s=e=>{let{image:t,inModal:r=!1,saveImage:o,setImageModal:s}=e;return(0,n.createElement)(a.Flex,{direction:"column"},r&&(0,n.createElement)(a.FlexItem,{style:{textAlign:"center"}},(0,n.createElement)(a.Button,{variant:"primary",onClick:()=>o(t)},__("Use this image","jetpack"))),(0,n.createElement)(a.FlexBlock,null,(0,n.createElement)("input",{type:"image",className:"wp-block-ai-image-image",src:t,alt:"",onClick:()=>s(t)})),!r&&(0,n.createElement)(a.FlexBlock,null,(0,n.createElement)(a.Flex,{direction:"column",style:{alignItems:"center"}},(0,n.createElement)(a.FlexItem,null,(0,n.createElement)(a.Button,{variant:"primary",onClick:()=>o(t)},__("Use this image","jetpack"))))))}},24404:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>h});var n=r(51806),a=r(55609),o=r(65736),s=r(77840);r(99196);const __=o.__,i="make-longer",l="makeLonger",c="make-shorter",u="makeShorter",d="summarize",p="summarize",m=[{name:__("Summarize","jetpack"),key:d,aiSuggestion:p},{name:__("Make longer","jetpack"),key:i,aiSuggestion:l},{name:__("Make shorter","jetpack"),key:c,aiSuggestion:u}];function h(e){let{key:t,label:r,exclude:o=[],onChange:i}=e;return(0,n.createElement)(a.ToolbarDropdownMenu,{icon:s.Z,label:r||__("Improve","jetpack"),popoverProps:{variant:"toolbar"}},(()=>{const e=m.filter((e=>!o.includes(e.key)));return(0,n.createElement)(a.MenuGroup,{label:r},e.map((e=>(0,n.createElement)(a.MenuItem,{key:`key-${e.key}`,onClick:()=>i(e.aiSuggestion,{contentType:"generated"}),isSelected:t===e.key},e.name))))}))}},71597:(e,t,r)=>{"use strict";r.d(t,{Xx:()=>m,ZP:()=>h});var n=r(82674),a=r.n(n),o=r(51806),s=r(55609),i=r(69307),l=r(65736),c=r(20770);const __=l.__,u="init",d="ready-to-generate",p="generating-content",m="content-generated";function h(e){const{state:t}=e;if(!t)return null;let r=null,n=c.by;switch(t){case u:r=__("Ask AI Assistant for anything…","jetpack");break;case d:r=(0,i.createInterpolateElement)(__("Press <em>Enter</em> to send your request.","jetpack"),{em:(0,o.createElement)("em",null)});break;case p:r=__("Generating content…","jetpack");break;case m:r=(0,i.createInterpolateElement)(__("AI-generated content could be inaccurate or biased. <link>Learn more</link>","jetpack"),{link:(0,o.createElement)(s.ExternalLink,{href:"https://automattic.com/ai-guidelines"})})}return(0,o.createElement)(c.ZP,a()({},e,{severity:n}),r)}},20770:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>h,by:()=>p});var n=r(51806),a=r(30797),o=r(23435),s=r(79201),i=r(90496),l=r(61074);const c="warning",u="error",d="success",p="info",m={[c]:a.Z,[u]:o.Z,[d]:s.Z,[p]:i.Z};function h(e){let{severity:t=null,icon:r=null,children:a}=e;return(0,n.createElement)("div",{className:"jetpack-ai-assistant__message"},(t||r)&&(0,n.createElement)(l.Z,{icon:m[t]||r}),(0,n.createElement)("div",{className:"jetpack-ai-assistant__message-content"},a))}},85642:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(51806),a=r(55609),o=r(65736),s=r(58532),i=r(586),l=r(3639),c=r(92710),u=r(32677),d=r(77840);r(99196);const __=o.__,p=[{label:__("Post about…","jetpack"),description:{original:"Write a post about ",translated:__("Write a post about ","jetpack")}},{label:__("Informative article on…","jetpack"),description:{original:"Craft an informative article explaining ",translated:__("Craft an informative article explaining ","jetpack")}},{label:__("Step-by-step tutorial on…","jetpack"),description:{original:"Write a step-by-step tutorial on ",translated:__("Write a step-by-step tutorial on ","jetpack")}},{label:__("Motivational post on…","jetpack"),description:{original:"Create a motivational post on ",translated:__("Create a motivational post on ","jetpack")}}];function m(e){let{hasContentBefore:t,hasContent:r,hasPostTitle:o,onPromptSelect:m,onSuggestionSelect:h}=e;const g=__("Write with AI…","jetpack");return(0,n.createElement)(a.ToolbarDropdownMenu,{className:"jetpack-ai-assistant__templates-control",icon:null,label:g,text:g},(e=>{let{onClose:g}=e;return(0,n.createElement)(n.Fragment,null,t&&(0,n.createElement)(a.MenuGroup,{label:__("Based on preceding content…","jetpack")},(0,n.createElement)(a.MenuItem,{icon:s.Z,iconPosition:"left",onClick:()=>h("continue")},__("Continue writing","jetpack")),(0,n.createElement)(a.MenuItem,{icon:i.Z,iconPosition:"left",onClick:()=>h("correctSpelling")},__("Correct spelling and grammar","jetpack")),(0,n.createElement)(a.MenuItem,{icon:l.Z,iconPosition:"left",onClick:()=>h("simplify")},__("Simplify","jetpack"))),r&&(0,n.createElement)(a.MenuGroup,{label:__("Based on entire content…","jetpack")},r&&(0,n.createElement)(a.MenuItem,{icon:c.Z,iconPosition:"left",onClick:()=>h("summarize")},__("Summarize","jetpack")),r&&(0,n.createElement)(a.MenuItem,{icon:u.Z,iconPosition:"left",onClick:()=>h("generateTitle")},__("Generate a post title","jetpack"))),(0,n.createElement)(a.MenuGroup,{label:__("Write…","jetpack")},o&&(0,n.createElement)(a.MenuItem,{icon:d.Z,iconPosition:"left",onClick:()=>h("titleSummary")},__("Summary based on title","jetpack")),p.map(((e,t)=>(0,n.createElement)(a.MenuItem,{icon:d.Z,iconPosition:"left",key:`key-${t}`,onClick:()=>{g(),m(e.description)}},e.label)))))}))}},27298:(e,t,r)=>{"use strict";r.d(t,{IP:()=>p,Nj:()=>c,ZP:()=>m});var n=r(51806),a=r(36222),o=r(55609),s=r(65736),i=r(46936);r(99196);const __=s.__,l=["formal","informal","optimistic","humorous","serious","skeptical","empathetic","confident","passionate","provocative"],c="formal",u={formal:{label:__("Formal","jetpack"),emoji:"🎩"},informal:{label:__("Informal","jetpack"),emoji:"😊"},optimistic:{label:__("Optimistic","jetpack"),emoji:"😃"},humorous:{label:__("Humorous","jetpack"),emoji:"😂"},serious:{label:__("Serious","jetpack"),emoji:"😐"},skeptical:{label:__("Skeptical","jetpack"),emoji:"🤨"},empathetic:{label:__("Empathetic","jetpack"),emoji:"💗"},confident:{label:__("Confident","jetpack"),emoji:"😎"},passionate:{label:__("Passionate","jetpack"),emoji:"❤️"},provocative:{label:__("Provocative","jetpack"),emoji:"🔥"}},d=e=>{let{value:t,onChange:r}=e;return(0,n.createElement)(o.MenuGroup,{label:__("Select tone","jetpack")},l.map((e=>(0,n.createElement)(o.MenuItem,{key:`key-${e}`,onClick:()=>r(e),isSelected:t===e},`${u[e].emoji} ${u[e].label}`))))};function p(e){let{value:t=c,onChange:r}=e;return(0,n.createElement)(o.DropdownMenu,{icon:a.v_,label:__("Change tone","jetpack"),className:"ai-assistant__tone-dropdown",popoverProps:{variant:"toolbar"},toggleProps:{children:(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:"ai-assistant__tone-dropdown__toggle-label"},__("Change tone","jetpack")),(0,n.createElement)(o.Icon,{icon:i.Z}))}},(()=>(0,n.createElement)(d,{value:t,onChange:r})))}function m(e){let{value:t=c,onChange:r}=e;return(0,n.createElement)(o.ToolbarDropdownMenu,{icon:a.v_,label:__("Change tone","jetpack"),popoverProps:{variant:"toolbar"}},(()=>(0,n.createElement)(d,{value:t,onChange:r})))}},4965:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h});var n=r(51806),a=r(52175),o=r(55609),s=r(65736),i=r(79201),l=r(48381),c=(r(75022),r(63634)),u=r(81612),d=r(24404),p=r(85642),m=r(27298);const __=s.__,h=e=>{let{contentIsLoaded:t,getSuggestionFromOpenAI:r,retryRequest:s,handleAcceptContent:h,handleImageRequest:g,handleTryAgain:f,showRetry:b,contentBefore:v,hasPostTitle:k,wholeContent:y,setUserPrompt:E,recordEvent:w,isGeneratingTitle:_}=e;return(0,n.createElement)(n.Fragment,null,t&&(0,n.createElement)(a.BlockControls,{group:"block"},(0,n.createElement)(m.ZP,{value:"neutral",onChange:e=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:c.Lg}),r(c.Lg,{tone:e,contentType:"generated"})},disabled:t}),(0,n.createElement)(u.ZP,{value:"en",onChange:e=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:c.Nw}),r(c.Nw,{language:e,contentType:"generated"})},disabled:t}),(0,n.createElement)(d.ZP,{onChange:r,exclude:_?["summarize"]:[]})),(0,n.createElement)(a.BlockControls,null,!b&&!t&&(0,n.createElement)(p.Z,{hasContentBefore:!!v?.length,hasContent:!!y?.length,hasPostTitle:k,onPromptSelect:e=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"prompt-template",prompt:e.original}),E(e.translated)},onSuggestionSelect:e=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:e}),r(e)}}),(0,n.createElement)(o.ToolbarGroup,null,!b&&t&&(0,n.createElement)(o.ToolbarButton,{onClick:f},__("Try Again","jetpack")),!b&&!t&&!!y?.length&&(0,n.createElement)(a.BlockControls,{group:"block"},(0,n.createElement)(m.ZP,{value:"neutral",onChange:e=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:c.Lg}),r(c.Lg,{tone:e})}}),(0,n.createElement)(u.ZP,{value:"en",label:__("Translate","jetpack"),onChange:e=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:c.Nw}),r(c.Nw,{language:e})}})),b&&t&&(0,n.createElement)(o.ToolbarButton,{icon:i.Z,onClick:h},__("Accept","jetpack")),b&&(0,n.createElement)(o.ToolbarButton,{icon:l.Z,onClick:s},__("Retry","jetpack"))),false))}},5246:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(69307),o=r(65736),s=(r(99196),r(26546)),i=r(63206),l=r(18135);const __=o.__,c=()=>{const{upgradeType:e}=(0,l.ZP)();return"vip"===e?(0,n.createElement)(s.p,{buttonText:null,checkoutUrl:null,className:"jetpack-ai-upgrade-banner",description:(0,a.createInterpolateElement)(__("You've reached the Jetpack AI rate limit. <strong>Please reach out to your VIP account team.</strong>","jetpack"),{strong:(0,n.createElement)("strong",null)}),goToCheckoutPage:null,isRedirecting:null,visible:!0,align:null,title:null,context:null}):(()=>{const{checkoutUrl:e,autosaveAndRedirect:t,isRedirecting:r}=(0,i.Z)();return(0,n.createElement)(s.p,{buttonText:"Upgrade",checkoutUrl:e,className:"jetpack-ai-upgrade-banner",description:(0,a.createInterpolateElement)(__("Congratulations on exploring Jetpack AI and reaching the free requests limit!<br /><strong>Upgrade now to keep using it.</strong>","jetpack"),{br:(0,n.createElement)("br",null),strong:(0,n.createElement)("strong",null)}),goToCheckoutPage:t,isRedirecting:r,visible:!0,align:null,title:null,context:null})})()}},45624:(e,t,r)=>{"use strict";r.d(t,{Z:()=>T});var n=r(82674),a=r.n(n),o=r(51806),s=r(13419),i=r(52175),l=r(4981),c=r(55609),u=r(94333),d=r(9818),p=r(69307),m=r(65736),h=r(65235),g=r.n(h),f=r(10185),b=r.n(f),v=r(99196),k=r(50687),y=r(50297),E=r(49259),w=r(18135),_=r(60751),C=r(3687),j=r(63634);const __=m.__,S=new(b())({breaks:!0}),x="post"===window?.Jetpack_Editor_Initial_State?.screenBase,P=window?.Jetpack_Editor_Initial_State?.["ai-assistant"]?.["is-playground-visible"];function T(e){let{attributes:t,setAttributes:r,clientId:n}=e;const[m,h]=(0,p.useState)(),[f,b]=(0,p.useState)({}),[T,L]=(0,p.useState)(!1),[N,A]=(0,p.useState)([]),[R,I]=(0,p.useState)(null),[M,Z]=(0,p.useState)(null),{tracks:B}=(0,s.z$)(),D=(0,d.useSelect)((e=>e("core/editor").getCurrentPostId())),F=(0,d.useSelect)((e=>()=>e("core/block-editor").getBlock(n)),[n]),z=(0,v.useRef)(null),O=(0,v.useRef)(null),{replaceBlocks:U,replaceBlock:H,removeBlock:V}=(0,d.useDispatch)("core/block-editor"),{editPost:G}=(0,d.useDispatch)("core/editor"),{mediaUpload:q}=(0,d.useSelect)((e=>{const{getSettings:t}=e("core/block-editor");return{mediaUpload:t().mediaUpload}}),[]),$=()=>{setTimeout((()=>{z.current?.focus?.()}),100)},{requireUpgrade:W,refresh:X}=(0,w.ZP)(),{isLoadingCategories:J,isLoadingCompletion:K,wasCompletionJustRequested:Y,getSuggestionFromOpenAI:Q,stopSuggestion:ee,showRetry:te,contentBefore:re,postTitle:ne,retryRequest:ae,wholeContent:oe}=(0,_.Z)({onSuggestionDone:$,onUnclearPrompt:$,onModeration:$,attributes:t,clientId:n,content:t.content,setError:b,tracks:B,userPrompt:m,refreshFeatureData:X,requireUpgrade:W}),se=(0,E.$M)(n);(0,v.useEffect)((()=>{if(!se)return;const e=JSON.parse(localStorage.getItem(se));if(!e)return;const{type:t,options:r}=e;localStorage.removeItem(se),Q(t,r)}),[se,Q]),(0,v.useEffect)((()=>{f&&Z(!1)}),[f]);const ie=(0,v.useRef)(t?.content);(0,v.useEffect)((()=>{if(!t?.useGutenbergSyntax)return;if(!ie?.current?.length)return;const e=F();if(e?.innerBlocks?.length)return;const r=(0,l.parse)(ie.current);r?.length&&U(n,r)}),[ie,n,U,F,t?.useGutenbergSyntax]);const le=async e=>{if(T)return;L(!0),b({});const r=await fetch(e),a=await r.blob(),o=new File([a],"jetpack_ai_image.png",{type:"image/png"});q({filesList:[o],onFileChange:e=>{let[r]=e;r.id&&H(n,(0,l.createBlock)("core/image",{url:r.url,caption:t.requestedPrompt,alt:t.requestedPrompt}))},allowedTypes:["image"],onError:e=>{console.error(e),L(!1)}}),B.recordEvent("jetpack_ai_dalle_generation_upload",{post_id:D})},ce=t?.useGutenbergSyntax,ue=K||J,de=!!t.content,pe=async()=>{let e=[];if(ce)e=F(),e=e?.innerBlocks||[];else{const r=S.render(t.content).replace(/<li>\s+<p>/g,"<li>").replace(/<\/p>\s+<\/li>/g,"</li>");e=(0,l.rawHandler)({HTML:r})}await U(n,e);const r=(e=>{let t=null;return e.forEach((e=>{const r=document.querySelector(`.wp-block[data-block="${e.clientId}"]`);if(!r)return;"true"===r.contentEditable&&(t=r);const n=r.querySelectorAll("[contenteditable=true]");t=n.length?n[n.length-1]:t})),t})(e);r&&(e=>{const t=window.getSelection();t.selectAllChildren(e),t.collapseToEnd(),e.focus()})(r)},me=function(){Q(...arguments),setTimeout((()=>{O.current?.focus?.()}),100)},he=()=>{ee()};(0,u.useKeyboardShortcut)("esc",(e=>{e.stopImmediatePropagation(),he(),$()}),{target:O});const[ge,fe]=(0,p.useState)(!1),be=()=>{fe(!ge)},ve=(0,i.useBlockProps)({ref:O,className:g()({"is-waiting-response":Y})}),ke=(0,i.useInnerBlocksProps)(ve);return(0,o.createElement)("div",ve,f?.message&&!M&&"error_quota_exceeded"!==f?.code&&(0,o.createElement)(c.Notice,{status:f.status,isDismissible:!1,className:"jetpack-ai-assistant__error"},f.message),de&&!ce&&(0,o.createElement)("div",{className:"jetpack-ai-assistant__content"},(0,o.createElement)(p.RawHTML,null,S.render(t.content))),de&&ce&&(0,o.createElement)("div",a()({className:"jetpack-ai-assistant__content is-layout-building-mode"},ke)),P&&(0,o.createElement)(i.InspectorControls,null,(0,o.createElement)(c.PanelBody,{title:__("AI Playground","jetpack"),initialOpen:!0},(0,o.createElement)(c.PanelRow,null,(0,o.createElement)(c.ToggleControl,{label:__("Gutenberg Syntax","jetpack"),onChange:e=>r({useGutenbergSyntax:e}),checked:t.useGutenbergSyntax})),(0,o.createElement)(c.PanelRow,null,(0,o.createElement)(c.ToggleControl,{label:__("GPT-4","jetpack"),onChange:e=>r({useGpt4:e}),checked:t.useGpt4})),(0,o.createElement)(c.PanelRow,null,ge&&(0,o.createElement)(c.Modal,{title:__("Custom System Prompt","jetpack"),onRequestClose:be},(0,o.createElement)(c.TextareaControl,{rows:20,label:__("Set up the custom system prompt ","jetpack"),onChange:e=>r({customSystemPrompt:e}),className:"jetpack-ai-assistant__custom-prompt",value:t.customSystemPrompt||(0,j.t4)({useGutenbergSyntax:t.useGutenbergSyntax,useGpt4:t.useGpt4})?.content}),(0,o.createElement)("div",{className:"jetpack-ai-assistant__custom-prompt__footer"},(0,o.createElement)(c.Button,{onClick:()=>r({customSystemPrompt:""}),variant:"secondary"},__("Restore the prompt","jetpack")),(0,o.createElement)(c.Button,{onClick:be,variant:"secondary"},__("Close","jetpack")))),(0,o.createElement)(c.Button,{onClick:be,variant:"secondary"},__("Set system custom prompt","jetpack"))))),(0,o.createElement)(k.Z,{ref:z,content:t.content,contentIsLoaded:de,getSuggestionFromOpenAI:me,retryRequest:ae,handleAcceptContent:pe,handleAcceptTitle:()=>{x?(G({title:t.content.trim()}),V(n)):pe()},handleGetSuggestion:me,handleStopSuggestion:he,handleImageRequest:()=>{A([]),b({}),(0,C.b)(""===m.trim()?__("What would you like to see?","jetpack"):m,r,L,A,b,D),B.recordEvent("jetpack_ai_dalle_generation",{post_id:D})},handleTryAgain:()=>{r({content:t?.originalContent,promptType:void 0,messages:t?.originalMessages})},isWaitingState:ue,loadingImages:T,showRetry:te,setUserPrompt:h,contentBefore:re,postTitle:ne,userPrompt:m,wholeContent:oe,promptType:t.promptType,onChange:()=>Z(!0),requireUpgrade:"error_quota_exceeded"===f?.code||W,recordEvent:B.recordEvent,isGeneratingTitle:"generateTitle"===t.promptType}),!T&&N.length>0&&(0,o.createElement)(c.Flex,{direction:"column",style:{width:"100%"}},(0,o.createElement)(c.FlexBlock,{style:{textAlign:"center",margin:"12px",fontStyle:"italic",width:"100%"}},t.requestedPrompt),(0,o.createElement)(c.FlexBlock,{style:{fontSize:"20px",lineHeight:"38px"}},__("Please choose your image","jetpack")),(0,o.createElement)(c.Flex,{direction:"row",wrap:!0},N.map((e=>(0,o.createElement)(y.Z,{setImageModal:I,saveImage:le,image:e,key:e}))))),!T&&R&&(0,o.createElement)(c.Modal,{onRequestClose:()=>I(null)},(0,o.createElement)(y.Z,{saveImage:le,setImageModal:I,image:R,inModal:!0})))}},27559:(e,t,r)=>{"use strict";var n=r(31985),a=r(29137);(0,n.Z)(a.u2,a.Xd)},54765:(e,t,r)=>{"use strict";r.d(t,{J7:()=>d,NP:()=>c});var n=r(4981),a=r(9818),o=r(92694),s=r(29137),i=r(18135),l=r(71449);const c=["core/paragraph","core/heading","core/list"],u=window?.Jetpack_Editor_Initial_State.available_blocks?.["ai-assistant-support"];function d(){if(!(0,n.getBlockType)(s.pG))return!1;if(!u)return!1;if(!(0,l.b)())return!1;if(i.fb.errorCode)return!1;const{getHiddenBlockTypes:e}=(0,a.select)("core/edit-post")||{};return!(e?.()||[]).includes(s.pG)}(0,o.addFilter)("blocks.registerBlockType","jetpack/ai-assistant-support",(function(e,t){return c.includes(t)&&d()?{...e,supports:{...e.supports,"jetpack/ai":{assistant:!0}}}:e}),100)},49259:(e,t,r)=>{"use strict";r.d(t,{$M:()=>m,ZP:()=>h});var n=r(51806),a=r(13419),o=r(52175),s=r(94333),i=r(9818),l=r(69307),c=(r(99196),r(83059)),u=r(15064),d=r(854),p=r(6747);function m(e){return`ai-assistant-block-${e}`}const h=(0,s.createHigherOrderComponent)((e=>t=>{const{name:r}=t,{removeBlocks:s,replaceBlock:h}=(0,i.useDispatch)("core/block-editor"),{content:g,clientIds:f,blocks:b}=(0,u.Z)(),{tracks:v}=(0,a.z$)(),k=[];"core/list-item"===r&&k.push(c.B3);const y=(0,l.useCallback)(((e,t)=>{const[n]=b,[a,...o]=f,i={...n?.attributes||{},content:g},l=(0,p.b)(r,i),c={clientId:a,type:e,options:{...t,contentType:"generated"}};localStorage.setItem(m(l.clientId),JSON.stringify(c)),h(a,l),s(o)}),[b,f,g,r,h,s]),E=(0,l.useCallback)(((e,t)=>{v.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_button_click",{suggestion:e,block_type:r}),y(e,t)}),[v,y,r]),w=(0,l.useCallback)((()=>{const[e,...t]=f,[n]=b,a={...n?.attributes||{},content:g};h(e,(0,p.b)(r,a)),s(t)}),[b,r,g,h,f,s]),_=(0,d.t$)(g);return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(e,t),(0,n.createElement)(o.BlockControls,{group:"block"},(0,n.createElement)(c.ZP,{disabled:!_?.length,onChange:E,onReplace:w,exclude:k})))}),"withAIAssistant")},79191:(e,t,r)=>{"use strict";r.d(t,{Z:()=>y});var n=r(51806),a=r(36222),o=r(4981),s=r(94333),i=r(9818),l=r(69307),c=r(65736),u=r(53961),d=r(65235),p=r.n(d),m=r(5246),h=r(18135),g=r(63634),f=r(79817),b=r(44110);const __=c.__,v={huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480};function k(e){if(!e?.length)return"";const t=(0,i.select)("core/block-editor").getBlock(e);if(!t)return"";const{innerBlocks:r}=t;return r?.length?r.reduce(((e,t)=>e+(0,o.serialize)(t)+"\n\n"),""):""}function y(e){let{clientId:t,className:r=""}=e;const o=(0,l.useRef)(null),c=(0,l.useRef)(null),{inputValue:d,setInputValue:y,isVisible:E,assistantAnchor:w}=(0,l.useContext)(f.D),{requestSuggestion:_,requestingState:C,stopSuggestion:j,requestingError:S}=(0,a.X_)({onDone:()=>{setTimeout((()=>{c.current?.focus?.()}),10)}}),{requireUpgrade:x}=(0,h.ZP)(),P=S?.code===a.$L||x,T="requesting"===C||"suggesting"===C,L=__("Ask Jetpack AI to create your form","jetpack"),N=__("Creating your form. Please wait a few moments.","jetpack"),{removeNotice:A}=(0,i.useDispatch)(u.store),R=(0,l.useCallback)((()=>{if(!d?.length)return;A(b.uu);const e=(0,g.r1)(g.Re,{request:d,content:k(t)});_(e,{feature:"jetpack-form-ai-extension"})}),[t,d,A,_]),I=(0,s.useViewportMatch)("medium","<"),M=I&&w,Z=(0,l.useRef)(null),B=(0,l.useRef)(I),[D,F]=(0,l.useState)(I);if((0,l.useEffect)((()=>{const e=o?.current;if(e)return Z?.current||(Z.current=new ResizeObserver((e=>{if(!E)return;if(M)return;const t=e[0].contentRect.width<v.mobile;t!==B.current&&(B.current=t,F(t))}))),Z.current.observe(e),()=>{Z?.current?.disconnect()}}),[M,E]),(0,l.useEffect)((()=>{const e=setTimeout((()=>{E&&c?.current&&c.current.focus()}),300);return function(){clearTimeout(e)}}),[]),!E)return null;const z=(0,n.createElement)("div",{ref:o,className:p()("jetpack-ai-assistant__bar",{[r]:r,"is-fixed":M,"is-mobile-mode":D})},P&&(0,n.createElement)(m.Z,null),(0,n.createElement)(a.tK,{ref:c,disabled:P,value:T?void 0:d,placeholder:T?N:L,onChange:y,onSend:R,onStop:j,state:C,isOpaque:P,showButtonsLabel:!D}));return M?(0,l.createPortal)(z,w):z}},81732:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(51806),a=r(36222),o=r(55609),s=r(94333),i=r(69307),l=r(65736),c=r(99196),u=r(79817),d=r(44110);const __=l.__,p="jetpack-ai-assistant-bar__slot";function m(e){let{jetpackFormClientId:t}=e;const{isVisible:r,toggle:l,setAnchor:m,assistantAnchor:h}=(0,i.useContext)(u.D),{requestingState:g}=(0,a.X_)(),f=(0,i.useRef)(null),b=(0,s.useViewportMatch)("medium","<");(0,c.useEffect)((()=>{if(!f.current)return;const e=f.current.closest(".block-editor-block-contextual-toolbar");if(!e)return;let t=e.parentElement?.querySelector(`.${p}`);if(t)return m(t);t=document.createElement("div"),t.setAttribute("role","toolbar"),t.setAttribute("aria-label",__("AI Assistant","jetpack")),t.setAttribute("aria-orientation","horizontal"),t.className=p,e.after(t);const r=e.offsetHeight;t.style.top=`${r}px`,m(t)}),[m]),(0,c.useEffect)((()=>{b||h?.remove()}),[b,h]);const v=(0,i.useCallback)((()=>{if(!t)return l();(0,d.Vl)(t,l)}),[t,l]),k="requesting"===g||"suggesting"===g;return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(o.KeyboardShortcuts,{bindGlobal:!0,shortcuts:{"mod+/":l}}),(0,n.createElement)(o.ToolbarButton,{ref:f,showTooltip:!0,onClick:v,"aria-haspopup":"true","aria-expanded":r,label:__("Ask AI Assistant","jetpack"),icon:a.u_,disabled:k}))}},59090:(e,t,r)=>{"use strict";r.d(t,{aE:()=>n,nB:()=>a});const n=window?.Jetpack_Editor_Initial_State.available_blocks?.["ai-assistant-form-support"]?.available,a=["jetpack/field-name","jetpack/field-email","jetpack/field-text","jetpack/field-textarea","jetpack/field-checkbox","jetpack/field-date","jetpack/field-telephone","jetpack/field-url","jetpack/field-checkbox-multiple","jetpack/field-radio","jetpack/field-select","jetpack/field-consent","jetpack/button"]},94662:(e,t,r)=>{"use strict";r.d(t,{V:()=>b});var n=r(51806),a=r(36222),o=r(52175),s=r(4981),i=r(94333),l=r(9818),c=r(69307),u=r(92694),d=r(18135),p=r(71449),m=r(79191),h=r(81732),g=r(59090),f=r(44110);function b(e){let{checkChildrenBlocks:t=!1,clientId:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{clientId:""};if(!(0,s.getBlockType)("jetpack/ai-assistant"))return!1;if(!g.aE)return!1;if(!r?.length)return!1;const{getBlockParentsByBlockName:n}=(0,l.select)("core/block-editor");if(n(r,"core/query")?.length>0)return!1;if(t){if(!g.nB.includes(e))return!1}else if("jetpack/contact-form"!==e)return!1;if(!(0,p.b)())return!1;if(d.fb.errorCode)return!1;const{getHiddenBlockTypes:a}=(0,l.select)("core/edit-post")||{};return!(a?.()||[]).includes(e)}const v=(0,i.createHigherOrderComponent)((e=>t=>{if(!b(t?.name,{clientId:t.clientId}))return(0,n.createElement)(e,t);const{eventSource:r}=(0,a.X_)(),s=(0,c.useCallback)((()=>{r&&r?.close()}),[r]);(0,c.useEffect)((()=>()=>{s()}),[s]);return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(e,t),(0,n.createElement)(m.Z,{clientId:t.clientId}),(0,n.createElement)(o.BlockControls,{group:"block"},(0,n.createElement)(h.Z,null)))}),"withAiAssistantComponents");(0,u.addFilter)("editor.BlockEdit","jetpack/jetpack-form-block-edit",v,100);const k=(0,i.createHigherOrderComponent)((e=>t=>{const r=(0,l.useSelect)((e=>{const{getBlockParentsByBlockName:r}=e("core/block-editor");return r(t.clientId,"jetpack/contact-form")?.[0]}),[t.clientId]);if(!b(t?.name,{checkChildrenBlocks:!0,clientId:r}))return(0,n.createElement)(e,t);return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(e,t),(0,n.createElement)(o.BlockControls,{group:"parent"},(0,n.createElement)(h.Z,{jetpackFormClientId:r})))}),"withAiToolbarButton");(0,u.addFilter)("editor.BlockEdit","jetpack/jetpack-form-block-edit",k),(0,u.addFilter)("editor.BlockListBlock","jetpack/ai-assistant-support",f.ZP,100),(0,u.addFilter)("editor.BlockListBlock","jetpack/ai-assistant-block-list",a.oN,110)},79817:(e,t,r)=>{"use strict";r.d(t,{D:()=>o,v:()=>s});var n=r(51806),a=r(69307);const o=(0,a.createContext)({}),s=e=>{let{value:t,children:r}=e;return(0,n.createElement)(o.Provider,{value:t,children:r})}},44110:(e,t,r)=>{"use strict";r.d(t,{Vl:()=>f,ZP:()=>b,uu:()=>g});var n=r(51806),a=r(36222),o=r(4981),s=r(55609),i=r(94333),l=r(9818),c=r(69307),u=r(65736),d=r(53961),p=r(94662),m=r(56359),h=r(79817);const __=u.__,g="ai-assistant";function f(e,t){(0,l.dispatch)("core/block-editor").selectBlock(e).then(t)}const b=(0,i.createHigherOrderComponent)((e=>t=>{const{clientId:r,isSelected:i}=t,[u,b]=(0,c.useState)(""),[v,k]=(0,c.useState)(!0),[y,E]=(0,c.useState)(!1),[w,_]=(0,c.useState)(null),C=(0,c.useRef)([]),{replaceInnerBlocks:j}=(0,l.useDispatch)("core/block-editor"),S=(0,l.useSelect)((e=>e("core/editor")),[]).getCurrentPostId(),x=(0,c.useCallback)((()=>{k(!0)}),[]),P=(0,c.useCallback)((()=>{k(!1)}),[]),T=(0,c.useCallback)((()=>{k(!v)}),[v]),L=(0,c.useCallback)((e=>{_(e)}),[]),{createNotice:N}=(0,l.useDispatch)(d.store),A=(0,c.useCallback)((e=>{let{severity:t,message:r,code:n}=e;n!==a.$L&&N(t,r,{isDismissible:!0,id:g})}),[N]);(0,c.useEffect)((()=>{i||P()}),[i,P]);const R=(0,c.useMemo)((()=>({inputValue:u,setInputValue:b,isVisible:v,show:x,hide:P,toggle:T,isFixed:y,setAssistantFixed:E,assistantAnchor:w,setAnchor:L})),[u,v,x,P,T,y,w,L]),I=(0,c.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=e.replace(/<!-- (\/)*wp:jetpack\/(contact-)*form ({.*} )*(\/)*-->/g,""),a=(0,m.J)(n),s=(0,o.parse)(a).filter((e=>e.isValid&&"core/freeform"!==e.name&&"core/missing"!==e.name));if(s.length!==C.current.length&&(j(r,s),C.current=s),t){const e=s.filter((e=>"jetpack/button"===e.name));if(C.current=C.current||[],e.length>1){let t=0;C.current=C.current.filter((r=>"jetpack/button"!==r.name||(t++,t===e.length))),j(r,C.current)}else 0===e.length&&j(r,[...C.current,(0,o.createBlock)("jetpack/button",{label:__("Submit","jetpack"),element:"button",text:__("Submit","jetpack"),borderRadius:8,lock:{remove:!0}})])}}),[r,j]);return(0,a.X_)({askQuestionOptions:{postId:S},onDone:e=>{I(e,!0),b("")},onSuggestion:I,onError:A}),(0,p.V)(t.name,{clientId:t.clientId})?(0,n.createElement)(h.v,{value:R},(0,n.createElement)(s.KeyboardShortcuts,{shortcuts:{"mod+/":()=>f(r,x)}},(0,n.createElement)(e,t))):(0,n.createElement)(e,t)}),"withUiHandlerDataProvider")},63206:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(6895),a=r(13419),o=r(46867);function s(){const e=(0,n.Z)("jetpack-ai-monthly-plan-ai-assistant-block-banner",{site:(0,a.lQ)()}),t=(0,a.Ug)()||(0,a.Wp)()?e:`${window?.Jetpack_Editor_Initial_State?.adminUrl}admin.php?page=my-jetpack#/add-jetpack-ai`,{autosaveAndRedirect:r,isRedirecting:s}=(0,o.Z)(t);return{checkoutUrl:t,autosaveAndRedirect:r,isRedirecting:s}}},18135:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>c,fb:()=>i});var n=r(86989),a=r.n(n),o=r(99196);const s=window?.Jetpack_Editor_Initial_State?.["ai-assistant"],i={hasFeature:!!s?.["has-feature"],isOverLimit:!!s?.["is-over-limit"],requestsCount:s?.["requests-count"]||0,requestsLimit:s?.["requests-limit"]||20,requireUpgrade:!!s?.["site-require-upgrade"],errorMessage:s?.["error-message"]||"",errorCode:s?.["error-code"],upgradeType:s?.["upgrade-type"]||"default"};async function l(){const e=await a()({path:"/wpcom/v2/jetpack-ai/ai-assistant-feature"});try{return{hasFeature:!!e["has-feature"],isOverLimit:!!e["is-over-limit"],requestsCount:e["requests-count"],requestsLimit:e["requests-limit"],requireUpgrade:!!e["site-require-upgrade"],errorMessage:e["error-message"],errorCode:e["error-code"],upgradeType:e["upgrade-type"]}}catch(e){console.error(e)}}function c(){const[e,t]=(0,o.useState)(i);return(0,o.useEffect)((()=>{l().then(t)}),[]),{...e,refresh:()=>l().then(t)}}},63010:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(9818);function a(){const e=(0,n.useSelect)((e=>e("core/block-editor").getSelectedBlockClientIds()),[]),t=(0,n.useSelect)((t=>t("core/block-editor").getBlocksByClientId(e)),[e]),r={count:0,clientIds:[],blocks:[]};return e?.length&&t?.length?{count:t.length,clientIds:e,blocks:t}:r}},60751:(e,t,r)=>{"use strict";r.d(t,{Z:()=>g});var n=r(36222),a=r(4981),o=r(9818),s=r(69307),i=r(65736),l=r(51128),c=r.n(l),u=r(27298),d=r(63634),p=r(854);const __=i.__,m=c()("jetpack-ai-assistant:event"),h=c()("jetpack-ai-assistant:prompt"),g=e=>{let{attributes:t,clientId:r,content:i,setError:l,tracks:c,userPrompt:g,onSuggestionDone:f,onUnclearPrompt:b,onModeration:v,refreshFeatureData:k,requireUpgrade:y}=e;const[E,w]=(0,s.useState)(!1),[_,C]=(0,s.useState)(!1),[j,S]=(0,s.useState)(!1),[x,P]=(0,s.useState)(!1),[T,L]=(0,s.useState)(""),{updateBlockAttributes:N}=(0,o.useDispatch)("core/block-editor"),A=(0,s.useRef)(),R=(0,o.useSelect)((e=>e("core/editor").getEditedPostAttribute("title")));let I=!1;const M=(0,o.useSelect)((e=>e("core/editor").getEditedPostAttribute("categories")))||[],Z=(0,o.useSelect)((e=>M.map((t=>{const r=e("core").getEntityRecord("taxonomy","category",t);if(r)return r;I=!0})).filter(Boolean)),[M]),B=(0,o.useSelect)((e=>e("core/editor").getEditedPostAttribute("tags")),[])||[],D=(0,o.useSelect)((e=>B.map((t=>{const r=e("core").getEntityRecord("taxonomy","post_tag",t);if(r)return r;I=!0})).filter(Boolean)),[B]);(0,s.useEffect)((()=>(w(I),()=>{A?.current&&(m("Cleaning things up..."),A?.current?.close())})),[I,A]);const F=(0,o.useSelect)((e=>e("core/editor").getCurrentPostId())),z=(Z.filter((e=>1!==e.id)).map((e=>{let{name:t}=e;return t})).join(", "),D.map((e=>{let{name:t}=e;return t})).join(", "),async function(e){var s;let f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const E=f?.functions?.reduce(((e,t)=>{let{name:r,implementation:n}=t;return{...e,[r]:n}}),{});if(y)return C(!1),S(!1),P(!1),void l({code:"error_quota_exceeded",message:__("You have reached the limit of requests for this site.","jetpack"),status:"info"});if(f={retryRequest:!1,tone:u.Nj,...f},_)return;P(!1),l({});let w=T;c.recordEvent("jetpack_ai_chat_completion",{post_id:F});const j=null!==(s=[...t.messages])&&void 0!==s?s:[];let x={};if(f.retryRequest)x=w[w.length-1];else{const n=t?.isLayoutBuldingModeEnable?(0,p.WN)(r):(0,p.xN)();w=(0,d.Iq)({generatedContent:i,allPostContent:n,postContentAbove:(0,p.h7)(r),currentPostTitle:R,options:f,userPrompt:g,type:e,isGeneratingTitle:"generateTitle"===t.promptType,useGutenbergSyntax:!!t?.useGutenbergSyntax,customSystemPrompt:t?.customSystemPrompt}),x=w.pop(),w=[...w,...j],w.push(x),L(w),"generateTitle"!==t.promptType&&N(r,{promptType:e})}try{C(!0),S(!0),w.forEach(((e,t)=>{let{role:r,content:n}=e;return h("(%s/%s) %o\n%s",t+1,w.length,`[${r}]`,n)})),A.current=await(0,n.jt)(w,{postId:F,requireUpgrade:y,feature:t?.useGpt4?"ai-assistant-experimental":"ai-assistant",functions:f?.functions})}catch(e){e.message?l({message:e.message,code:e?.code||"unknown",status:"error"}):l({message:__("Whoops, we have encountered an error. AI is like really, really hard and this is an experimental feature. Please try again later.","jetpack"),code:"unknown",status:"error"}),P(!0),C(!1),S(!1)}const I=async e=>{const{detail:r}=e,a={role:"assistant",content:null,function_call:r},o=await(E[r.name]?.(JSON.parse(r.arguments))),s={role:"function",name:r?.name,content:JSON.stringify(o)};w=[...w,a,s],A?.current?.removeEventListener("function_done",I),A?.current?.removeEventListener("done",M),A?.current?.removeEventListener("error_unclear_prompt",Z),A?.current?.removeEventListener("error_network",B),A?.current?.removeEventListener("error_service_unavailable",D),A?.current?.removeEventListener("error_quota_exceeded",z),A?.current?.removeEventListener("error_moderation",U),A?.current?.removeEventListener("suggestion",H),A.current=await(0,n.jt)(w,{postId:F,requireUpgrade:y,feature:t?.useGpt4?"ai-assistant-experimental":null,functions:f.functions}),A?.current?.addEventListener("function_done",I),A?.current?.addEventListener("done",M),A?.current?.addEventListener("error_unclear_prompt",Z),A?.current?.addEventListener("error_network",B),A?.current?.addEventListener("error_service_unavailable",D),A?.current?.addEventListener("error_quota_exceeded",z),A?.current?.addEventListener("error_moderation",U),A?.current?.addEventListener("suggestion",H)},M=e=>{const{detail:n}=e,s=n.replaceAll(d._W,""),i={role:"assistant",content:s};j.push(x,i),h("Add %o\n%s",`[${x.role}]`,x.content),h("Add %o\n%s",`[${i.role}]`,i.content),j.length>20&&j.splice(0,j.length-20),O();const l=t?.useGutenbergSyntax;if(N(r,{content:s,messages:j}),!l)return;const{replaceInnerBlocks:c}=(0,o.dispatch)("core/block-editor"),u=(0,a.parse)(n).filter((e=>e.isValid));c(r,u),k()},Z=()=>{A?.current?.close(),C(!1),S(!1),l({code:"error_unclear_prompt",message:__("Your request was unclear. Mind trying again?","jetpack"),status:"info"}),b?.()},B=n=>{let{detail:a}=n;const{name:o,message:s}=a;"TypeError"===o&&"Failed to fetch"===s&&(j.splice(0,8),N(r,{messages:j}),w=(0,d.Iq)({generatedContent:i,allPostContent:(0,p.xN)(),postContentAbove:(0,p.h7)(r),currentPostTitle:R,options:f,userPrompt:g,type:e,isGeneratingTitle:"generateTitle"===t.promptType,useGutenbergSyntax:!!t?.useGutenbergSyntax,customSystemPrompt:t?.customSystemPrompt}),L([...w,...j,x])),A?.current?.close(),C(!1),S(!1),P(!0),l({code:"error_network",message:__("It was not possible to process your request. Mind trying again?","jetpack"),status:"info"})},D=()=>{A?.current?.close(),C(!1),S(!1),P(!0),l({code:"error_service_unavailable",message:__("Jetpack AI services are currently unavailable. Sorry for the inconvenience.","jetpack"),status:"info"})},z=()=>{A?.current?.close(),C(!1),S(!1),P(!1),l({code:"error_quota_exceeded",message:__("You have reached the limit of requests for this site.","jetpack"),status:"info"})},U=()=>{A?.current?.close(),C(!1),S(!1),P(!1),l({code:"error_moderation",message:__("This request has been flagged by our moderation system. Please try to rephrase it and try again.","jetpack"),status:"info"}),v?.()},H=e=>{S(!1),m("(suggestion)",e?.detail),N(r,{content:e?.detail?.replaceAll(d._W,"")})};return A?.current?.addEventListener("function_done",I),A?.current?.addEventListener("done",M),A?.current?.addEventListener("error_unclear_prompt",Z),A?.current?.addEventListener("error_network",B),A?.current?.addEventListener("error_service_unavailable",D),A?.current?.addEventListener("error_quota_exceeded",z),A?.current?.addEventListener("error_moderation",U),A?.current?.addEventListener("suggestion",H),A?.current});function O(){A?.current&&(A?.current?.close(),C(!1),S(!1),f?.())}return{isLoadingCategories:E,isLoadingCompletion:_,wasCompletionJustRequested:j,setIsLoadingCategories:w,setShowRetry:P,showRetry:x,postTitle:R,contentBefore:(0,p.h7)(r),wholeContent:(0,p.xN)(),getSuggestionFromOpenAI:z,stopSuggestion:O,retryRequest:()=>z("",{retryRequest:!0})}}},15064:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(854),a=r(63010);function o(){const e=(0,a.Z)();return{...e,content:e.blocks?e.blocks.filter((e=>null!=e)).map((e=>(0,n.op)(e.clientId))).join("\n\n"):""}}},29137:(e,t,r)=>{"use strict";r.d(t,{Xd:()=>g,pG:()=>h,u2:()=>m});var n=r(51806),a=r(36222),o=r(6895),s=r(55609),i=r(69307),l=r(65736),c=r(70355),u=r(84005),d=r(45624),p=r(6747);r(81765),r(54765),r(94662);const __=l.__,_x=l._x,m="ai-assistant",h=`jetpack/${m}`,g={apiVersion:2,title:__("AI Assistant (Experimental)","jetpack"),description:(0,n.createElement)(i.Fragment,null,(0,n.createElement)("p",null,__("Automatically generate and modify content, powered by AI magic.","jetpack")),(0,n.createElement)("p",null,__("The AI Assistant can be imprecise with information about people, places, or facts.","jetpack")),(0,n.createElement)("p",null,__("We are experimenting with this feature and can tweak or remove it at any point.","jetpack")),(0,n.createElement)("p",null,(0,n.createElement)(s.ExternalLink,{href:"https://automattic.com/ai-guidelines"},__("AI guidelines.","jetpack"))),(0,n.createElement)(s.ExternalLink,{href:(0,o.Z)("jetpack_ai_feedback")},__("Share your feedback.","jetpack"))),icon:{src:a.u_,foreground:(0,c.m)()},category:"text",keywords:[_x("AI","block search term","jetpack"),_x("GPT","block search term","jetpack"),_x("AL","block search term","jetpack"),_x("Magic","block search term","jetpack"),_x("help","block search term","jetpack"),_x("assistant","block search term","jetpack")],supports:{html:!1,multiple:!0,reusable:!1},edit:d.Z,save:()=>null,attributes:u.Z,transforms:p.Z,example:{attributes:{content:__("With **Jetpack AI Assistant**, you can provide a prompt, and it will generate high-quality blog posts, informative pages, well-organized lists, and thorough tables that meet your specific requirements.\n\nTo start using the **Jetpack AI Assistant**, type `/AI` in the block editor.","jetpack")}}}},71449:(e,t,r)=>{"use strict";r.d(t,{b:()=>u});var n=r(13419),a=r(51128),o=r.n(a);const s=window?.JP_CONNECTION_INITIAL_STATE,i=o()("jetpack-ai-assistant:connection");let l=!1;const c=e=>{l||(i(e),l=!0)};function u(){return(0,n.Wp)()?(c("Simple site connected ✅"),!0):(0,n.Ug)()?(c("Atomic site connected ✅"),!0):s?.connectionStatus?.isUserConnected?(c("Jetpack user is connected ✅"),!0):(c("User is not connected ❌"),!1)}},3687:(e,t,r)=>{"use strict";r.d(t,{b:()=>s});var n=r(86989),a=r.n(n),o=r(65736);const __=o.__;function s(e,t,r,n,o,s){r(!0),o(null),t({requestedPrompt:e}),a()({path:"/wpcom/v2/jetpack-ai/images/generations",method:"POST",data:{prompt:e,post_id:s}}).then((e=>{r(!1);const t=e.data.map((e=>"data:image/png;base64,"+e.b64_json));n(t)})).catch((e=>{e.message?o(e.message):o(__("Whoops, we have encountered an error. AI is like really, really hard and this is an experimental feature. Please try again later.","jetpack")),r(!1)}))}},63634:(e,t,r)=>{"use strict";r.d(t,{Hd:()=>i,Iq:()=>P,Lg:()=>d,Lq:()=>p,Nw:()=>m,Re:()=>g,TV:()=>c,_W:()=>b,_r:()=>k,hI:()=>s,r1:()=>T,t4:()=>v});var n=r(51128);const a="titleSummary",o="continue",s="simplify",i="correctSpelling",l="generateTitle",c="makeLonger",u="makeShorter",d="changeTone",p="summarize",m="changeLanguage",h="userPrompt",g="jetpackFormCustomPrompt",f=r.n(n)()("jetpack-ai-assistant:prompt"),b="````";function v(e){let{context:t="You are an advanced polyglot ghostwriter. Your task is to generate and modify content based on user requests. This functionality is integrated into the Jetpack product developed by Automattic. Users interact with you through a Gutenberg block, you are inside the WordPress editor",rules:r,useGutenbergSyntax:n=!1,useMarkdown:a=!0,customSystemPrompt:o=null}=e,s="";r?.length&&(s=r.map((e=>`- ${e}.`)).join("\n")+"\n");let i=`${t}. Strictly follow these rules:\n\n${s}${a?"- Format your responses in Markdown syntax, ready to be published.":""}\n- Execute the request without any acknowledgement to the user.\n- Avoid sensitive or controversial topics and ensure your responses are grammatically correct and coherent.\n- If you cannot generate a meaningful response to a user's request, reply with “__JETPACK_AI_ERROR__“. This term should only be used in this context, it is used to generate user facing errors.\n`;return n&&(i=`${t}. Strictly follow these rules:\n\t\n${s}- Format your responses in Gutenberg HTML format including HTML comments for WordPress blocks. All responses must be valid Gutenberg HTML.\n- Use only WordPress core blocks\n- Execute the request without any acknowledgement to the user.\n- Avoid sensitive or controversial topics and ensure your responses are grammatically correct and coherent.\n- If you cannot generate a meaningful response to a user's request, reply with “__JETPACK_AI_ERROR__“. This term should only be used in this context, it is used to generate user facing errors.\n`),o&&(i=o),{role:"system",content:i}}function k(e){return`${b}${e.replaceAll(b,"")}${b}`}function y(e){let{content:t,role:r="user"}=e;return[{role:r,content:`Repeat the text delimited with ${b}, without the delimiter, correcting any spelling and grammar mistakes directly in the text without providing feedback about the corrections, keeping the language of the text: ${k(t)}`}]}function E(e){let{content:t,role:r="user"}=e;return[{role:r,content:`Simplify the text delimited with ${b}, using words and phrases that are easier to understand and keeping the language of the text: ${k(t)}`}]}function w(e){let{content:t,role:r="user"}=e;return[{role:r,content:`Summarize the text delimited with ${b}, keeping the language of the text: ${k(t)}`}]}function _(e){let{content:t,role:r="user"}=e;return[{role:r,content:`Expand the text delimited with ${b} to about double its size, keeping the language of the text: ${k(t)}`}]}function C(e){let{content:t,language:r,role:n="user"}=e;return[{role:n,content:`Translate the text delimited with ${b} to ${r}, preserving the same core meaning and tone: ${k(t)}`}]}function j(e){let{content:t,tone:r,role:n="user"}=e;return[{role:n,content:`Rewrite the text delimited with ${b}, with a ${r} tone, keeping the language of the text: ${k(t)}`}]}function S(e){let{content:t,role:r="user",request:n}=e;if(!n)throw new Error("You must provide a custom prompt for the Jetpack Form Custom Prompt");return[{role:"system",content:'You are an expert developer in Gutenberg, the WordPress block editor, and thoroughly familiar with the Jetpack Form feature.\nStrictly follow those rules:\n- Do not wrap the response in any block, element or any kind of delimiter.\n- DO NOT add any additional feedback to the "user", just generate the requested block structure.\n- Do not refer to yourself, the user or the response in any way.\n- When the user provides instructions, translate them into appropriate Gutenberg blocks and Jetpack form structure.\n- Avoid sensitive or controversial topics and ensure your responses are grammatically correct and coherent.\n- If you cannot generate a meaningful response to a user\'s request, reply only with "__JETPACK_AI_ERROR__". This term should only be used in this context, it is used to generate user facing errors.'},{role:r,content:`Handle the following request: ${n}\n\nStrong requirements:\n- Do not wrap the generated structure with any block, like the \`\x3c!-- wp:jetpack/contact-form --\x3e\` syntax.\n- Always add, at the end, exactly one jetpack/button for the form submission. Forms require one button to be valid.\n- Replace placeholders (like FIELD_LABEL, IS_REQUIRED, etc.) with the user's specifications.\n- Use syntax templates for blocks as follows:\n\t- \`Name Field\`: \x3c!-- wp:jetpack/field-name {"label":FIELD_LABEL,"required":IS_REQUIRED,"requiredText":REQUIRED_TEXT,"placeholder":PLACEHOLDER_TEXT} /--\x3e\n\t- \`Email Field\`: \x3c!-- wp:jetpack/field-email {"label":FIELD_LABEL,"required":IS_REQUIRED,"requiredText":REQUIRED_TEXT,"placeholder":PLACEHOLDER_TEXT} /--\x3e\n\t- \`Text Input Field\`: \x3c!-- wp:jetpack/field-text {"label":FIELD_LABEL,"required":IS_REQUIRED,"requiredText":REQUIRED_TEXT,"placeholder":PLACEHOLDER_TEXT} /--\x3e\n\t- \`Multi-line Text Field \`: \x3c!-- wp:jetpack/field-textarea {"label":FIELD_LABEL,"required":IS_REQUIRED,"requiredText":REQUIRED_TEXT,"placeholder":PLACEHOLDER_TEXT} /--\x3e\n\t- \`Checkbox\`: \x3c!-- wp:jetpack/field-checkbox {"label":FIELD_LABEL,"required":IS_REQUIRED,"requiredText":REQUIRED_TEXT} /--\x3e\n\t- \`Date Picker\`: \x3c!-- wp:jetpack/field-date {"label":FIELD_LABEL,"required":IS_REQUIRED,"requiredText":REQUIRED_TEXT,"placeholder":PLACEHOLDER_TEXT} /--\x3e\n\t- \`Phone Number Field\`: \x3c!-- wp:jetpack/field-telephone {"label":FIELD_LABEL,"required":IS_REQUIRED,"requiredText":REQUIRED_TEXT,"placeholder":PLACEHOLDER_TEXT} /--\x3e\n\t- \`URL Field\`: \x3c!-- wp:jetpack/field-url {"label":FIELD_LABEL,"required":IS_REQUIRED,"requiredText":REQUIRED_TEXT,"placeholder":PLACEHOLDER_TEXT} /--\x3e\n\t- \`Multiple Choice (Checkbox)\`: \x3c!-- wp:jetpack/field-checkbox-multiple {"label":FIELD_LABEL,"required":IS_REQUIRED,"requiredText":REQUIRED_TEXT, "options": [OPTION_ONE, OPTION_TWO, OPTION_THREE]} /--\x3e\n\t- \`Single Choice (Radio)\`: \x3c!-- wp:jetpack/field-radio {"label":FIELD_LABEL,"required":IS_REQUIRED,"requiredText":REQUIRED_TEXT, "options": [OPTION_ONE, OPTION_TWO, OPTION_THREE]} /--\x3e\n\t- \`Dropdown Field\`: \x3c!-- wp:jetpack/field-select {"label":FIELD_LABEL,"required":IS_REQUIRED,"requiredText":REQUIRED_TEXT, "options": [OPTION_ONE, OPTION_TWO, OPTION_THREE],"toggleLabel":TOGGLE_LABEL} /--\x3e\n\t- \`Terms Consent\`:  \x3c!-- wp:jetpack/field-consent {"consentType":"CONSENT_TYPE","implicitConsentMessage":"IMPLICIT_CONSENT_MESSAGE","explicitConsentMessage":"EXPLICIT_CONSENT_MESSAGE", /--\x3e\n\t- \`Button\`: \x3c!-- wp:jetpack/button {"label":FIELD_LABEL,"element":"button","text":BUTTON_TEXT,"borderRadius":BORDER_RADIUS,"lock":{"remove":true}} /--\x3e\n\n- When a column layout is requested, add "width" attribute with value 25 (4 columns), 50 (2 columns) or 100 (force single column), like so: \`Name Field\`:\n\t- \x3c!-- wp:jetpack/field-name {"label":FIELD_LABEL,"required":IS_REQUIRED,"requiredText":REQUIRED_TEXT,"placeholder":PLACEHOLDER_TEXT, "width":25} /--\x3e\nJetpack Form to modify:\n${t}`}]}const x=e=>{let{rules:t=[],request:r=null,relevantContent:n=null,isContentGenerated:a=!1,isGeneratingTitle:o=!1,useGutenbergSyntax:s=!1,customSystemPrompt:i=null}=e;if(!r&&!n)throw new Error("You must provide either a request or content");const l=[v({rules:t,useGutenbergSyntax:s,customSystemPrompt:i})];if(null!=n&&n?.length){const e=n.replaceAll(b,"");a||l.push({role:"user",content:`The specific relevant content for this request, if necessary, delimited with ${b} characters: ${b}${e}${b}`})}const c={role:"user",content:r};return o&&(c.content+=" Only output a title, do not generate body content."),l.push(c),l.forEach((e=>{f(`Role: ${e?.role}.\nMessage: ${e?.content}\n---`)})),l};function P(e){let{generatedContent:t,allPostContent:r,postContentAbove:n,currentPostTitle:g,options:f,type:b,userPrompt:v,isGeneratingTitle:k,useGutenbergSyntax:y,customSystemPrompt:E}=e;const w="generated"===f?.contentType,_=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0;const n="generated"===r?.contentType;let h="the title";switch(t||(h=n?"your last answer":"the content"),e){case a:return{request:`Write a short piece for a blog post based on ${h}.`};case o:return{request:`Continue writing from ${h}.`,rules:n?[]:["Only output the continuation of the content, without repeating it"]};case s:return{request:`Simplify ${h}.`,rules:["Use words and phrases that are easier to understand for non-technical people","Output in the same language of the content","Use as much of the original language as possible"]};case i:return{request:`Repeat ${h}, correcting any spelling and grammar mistakes, and do not add new content.`};case l:return{request:"Generate a new title for this blog post and only output the title.",rules:["Only output the raw title, without any prefix or quotes"]};case c:return{request:`Make ${h} longer.`};case u:return{request:`Make ${h} shorter.`};case d:return{request:`Rewrite ${h} with a ${r.tone} tone.`};case p:return{request:`Summarize ${h}.`};case m:return{request:`Translate ${h} to the following language: ${r.language}.`};default:return null}}(b,k,f);if(b!==h){let e;switch(b){case a:e=g;break;case o:case s:case i:e=n;break;case l:e=r;break;case c:case u:e=t;break;case d:case p:case m:e=w?t:r}return x({..._,relevantContent:e,isContentGenerated:w,isGeneratingTitle:k,useGutenbergSyntax:y,customSystemPrompt:E})}return x({request:v,relevantContent:t||r,isContentGenerated:!!t?.length,isGeneratingTitle:k,useGutenbergSyntax:y,customSystemPrompt:E})}function T(e,t){f("Addressing prompt type: %o %o",e,t);const{prevMessages:r=[]}=t,n={role:"system",content:"You are an advanced polyglot ghostwriter. Your task is to help the user create and modify content based on their requests.\nWriting rules:\n- Execute the request without any acknowledgment or explanation to the user.\n- Avoid sensitive or controversial topics and ensure your responses are grammatically correct and coherent.\n- If you cannot generate a meaningful response to a user's request, reply with “__JETPACK_AI_ERROR__“. This term should only be used in this context, it is used to generate user facing errors.\n"},a=[...r];switch(a.push(n),e){case i:return[...a,...y(t)];case s:return[...a,...E(t)];case p:return[...a,...w(t)];case c:return[...a,..._(t)];case m:return[...a,...C(t)];case d:return[...a,...j(t)];case g:return[...r,...S(t)];default:throw new Error(`Unknown prompt type: ${e}`)}}},854:(e,t,r)=>{"use strict";r.d(t,{WN:()=>l,h7:()=>s,op:()=>c,t$:()=>u,xN:()=>i});var n=r(4981),a=r(9818);const o=new(r(92213).Z);function s(e){var t;if(!e)return"";const r=(0,a.select)("core/block-editor"),s=r.getBlockIndex(e),i=null!==(t=r.getBlocks().slice(0,s))&&void 0!==t?t:[];return i?.length?o.turndown((0,n.serialize)(i)):""}function i(){const e=(0,a.select)("core/block-editor").getBlocks();return e?.length?o.turndown((0,n.serialize)(e)):""}function l(e){const t=(0,a.select)("core/block-editor").getBlock(e);return t?.innerBlocks?.length?t.innerBlocks.filter((e=>null!=e)).map((e=>c(e.clientId))).join("\n\n"):""}function c(e){if(!e)return"";const t=(0,a.select)("core/block-editor").getBlock(e);return t?(0,n.getBlockContent)(t):""}function u(e){if(!e?.replace(/\s+/,"").length)return"";const t=document.createElement("div");t.innerHTML=e;const{textContent:r,innerText:n}=t;return r&&!r.replace(/\s+/,"").length||n&&!n.replace(/\s+/,"").length?"":t.textContent||t.innerText||""}},56359:(e,t,r)=>{"use strict";function n(e){const t=document.createElement("div");return t.innerHTML=e,t.innerHTML}r.d(t,{J:()=>n})},81765:(e,t,r)=>{"use strict";var n=r(4981),a=r(92694),o=r(54765),s=r(49259);(0,a.addFilter)("blocks.registerBlockType","jetpack/handle-jetpack-ai-supports",(function(e){const t=(0,n.getBlockSupport)(e,"jetpack/ai");return t&&t?.assistant&&(0,o.J7)()?{...e,edit:(0,s.ZP)(e.edit)}:e}),100)},6747:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u,b:()=>c});var n=r(4981),a=r(92213),o=r(29137),s=r(54765);const i=new a.Z({emDelimiter:"_",headingStyle:"atx"}),l=[];function c(e,t){const{content:r,...a}=t;let s=r;"core/heading"===e&&t?.level&&(s=s.replace(/<(\/?)h\d([^>]*)>/g,`<$1h${t.level}$2>`));const l=i.turndown(s),c=[{role:"user",content:"Tell me some content for this block, please."},{role:"assistant",content:l}];return(0,n.createBlock)(o.pG,{...a,content:l,originalContent:l,messages:c,originalMessages:c})}for(const e of s.NP)l.push({type:"block",blocks:[e],isMatch:()=>(0,s.J7)(),transform:(t,r)=>{const a=(0,n.getSaveContent)(e,t,r);return c(e,{...t,content:a})}});const u={from:l}},14511:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={answersLink:{type:"string",source:"attribute",attribute:"href",selector:".jetpack-blogging-prompt__answers-link"},answersLinkText:{type:"string",source:"html",selector:".jetpack-blogging-prompt__answers-link"},gravatars:{type:"array",source:"query",selector:".jetpack-blogging-prompt__answers-gravatar",query:{url:{type:"string",source:"attribute",attribute:"src"}}},promptLabel:{type:"string",source:"html",selector:".jetpack-blogging-prompt__label"},promptText:{type:"string",source:"html",selector:".jetpack-blogging-prompt__text"},promptFetched:{type:"boolean",default:!1},promptId:{type:"number"},showResponses:{type:"boolean",default:!0},showLabel:{type:"boolean",default:!0},tagsAdded:{type:"boolean",default:!1}}},14303:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(51806),a=r(86989),o=r.n(a),s=r(52175),i=r(55609),l=r(9818),c=r(69307),u=r(65736),d=r(96483),p=r(44266);const __=u.__,_x=u._x;const m=(0,i.withNotices)((function(e){let{attributes:t,noticeOperations:r,noticeUI:a,setAttributes:m}=e;const h=(0,c.useRef)(!1),{answersLink:g,answersLinkText:f,gravatars:b,promptFetched:v,promptId:k,promptLabel:y,promptText:E,showLabel:w,showResponses:_,tagsAdded:C}=t,j=(0,s.useBlockProps)({className:"jetpack-blogging-prompt"});(0,p.n)(k,C,(e=>m({tagsAdded:e})));const S=(0,l.useSelect)((e=>{const{getEntityRecord:t,hasFinishedResolution:r}=e("core"),n=t("root","site")?.language||"en_US";return r("getEntityRecord",["root","site"])?n:null}),[]);(0,c.useEffect)((()=>{if(!S||h.current||v)return;const e=()=>{m({promptFetched:!1,promptId:null,tagsAdded:!1}),h.current=!1,r.removeAllNotices()};let t="/wpcom/v3/blogging-prompts";if(k)t+="/"+encodeURIComponent(k);else{const e=new Date;t+=`?after=--${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}&order=desc`}t=(0,d.addQueryArgs)(t,{_locale:S}),h.current=!0,o()({path:t}).then((e=>{const t=k?e:e[0];m({answersLink:t.answered_link,answersLinkText:t.answered_link_text,gravatars:t.answered_users_sample.map((e=>{let{avatar:t}=e;return{url:t}})),promptFetched:!0,promptLabel:t.label,promptText:t.text,promptId:t.id})})).catch((t=>{m({promptFetched:!0});const a="rest_post_invalid_id"===t.code&&k?(o=k,(0,n.createElement)(n.Fragment,null,(0,u.sprintf)(/* translators: %d is the prompt id. */
__("Prompt with id %d not found.","jetpack"),o)," ",(0,n.createElement)(i.Button,{variant:"link",onClick:e},__("Reset prompt","jetpack")))):(t=>(0,n.createElement)(n.Fragment,null,(0,u.sprintf)(/* translators: %s is the error message. */
__("Error while fetching prompt: %s","jetpack"),t)," ",(0,n.createElement)(i.Button,{variant:"link",onClick:e},__("Retry","jetpack"))))(t.message);var o;r.removeAllNotices(),r.createErrorNotice(a)}))}),[h,r,v,k,m,S]);const x=e=>{m({showLabel:e})},P=e=>{m({showResponses:e})};return(0,n.createElement)("div",j,a,(0,n.createElement)(n.Fragment,null,(0,n.createElement)(s.InspectorControls,null,(0,n.createElement)(i.PanelBody,{title:_x("Settings","title of block settings sidebar section","jetpack")},(0,n.createElement)(i.ToggleControl,{label:__("Show daily prompt label","jetpack"),checked:w,onChange:x}),(0,n.createElement)(i.ToggleControl,{label:__("Show other responses","jetpack"),checked:_,onChange:P})))),v?(0,n.createElement)(n.Fragment,null,w&&(0,n.createElement)("div",{className:"jetpack-blogging-prompt__label"},y),(0,n.createElement)("div",{className:"jetpack-blogging-prompt__text"},E),_&&k&&(0,n.createElement)("div",{className:"jetpack-blogging-prompt__answers"},b&&b.slice(0,3).map((e=>{let{url:t}=e;return t&&(0,n.createElement)("img",{className:"jetpack-blogging-prompt__answers-gravatar",src:t,key:t})})),(0,n.createElement)("a",{className:"jetpack-blogging-prompt__answers-link",href:g,target:"_blank",rel:"external noreferrer noopener"},f))):(0,n.createElement)("div",{className:"jetpack-blogging-prompt__spinner"},(0,n.createElement)(i.Spinner,null)))}))},35681:(e,t,r)=>{"use strict";var n=r(4981),a=r(9818),o=r(31985),s=r(46185),i=r(50187);(0,o.Z)(i.u2,i.Xd),function(){var e;const t=new URL(document.location.href);if(!t.pathname.endsWith("/wp-admin/post-new.php"))return;const r=null!==(e=t.searchParams.get("answer_prompt"))&&void 0!==e?e:"0",o=parseInt(r);o&&async function(e){await(0,s.U)();const{insertBlocks:t}=(0,a.dispatch)("core/block-editor");t([(0,n.createBlock)(`jetpack/${i.u2}`,{promptFetched:!1,promptId:e,tagsAdded:!0}),(0,n.createBlock)("core/paragraph")],0,void 0,!1)}(o)}()},50187:(e,t,r)=>{"use strict";r.d(t,{Xd:()=>h,u2:()=>m});var n=r(65736),a=r(70355),o=r(5820),s=r(14511),i=r(14303),l=r(19597),c=r(65783),u=r(43807),d=r(45416),p=r(2275);const __=n.__,_x=n._x,m="blogging-prompt",h={apiVersion:2,title:__("Writing Prompt","jetpack"),description:__("Answer a new and inspiring writing prompt each day.","jetpack"),icon:{src:d.Z,foreground:(0,a.m)()},category:(0,o.Z)("text"),keywords:[_x("writing","block search term","jetpack"),_x("blogging","block search term","jetpack")],supports:{align:!1,alignWide:!1,anchor:!1,className:!0,color:{background:!0,gradients:!0,link:!0,text:!0},customClassName:!0,html:!1,inserter:!0,multiple:!1,reusable:!0,spacing:{margin:["top","bottom"],padding:!0,blockGap:!1}},edit:i.Z,save:p.Z,attributes:s.Z,styles:[{name:"block",label:__("Block","jetpack"),isDefault:!0},{name:"quote",label:__("Quote","jetpack")}],example:{attributes:{answersLink:"https://wordpress.com/tag/dailyprompt",answersLinkText:__("View all responses","jetpack"),gravatars:[{url:l},{url:c},{url:u}],promptLabel:__("Daily writing prompt","jetpack"),promptText:__("What's your favorite place to visit?","jetpack"),promptFetched:!0,promptId:1234,showResponses:!0,showLabel:!0,tagsAdded:!0}}}},2275:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(52175);const o=function(e){let{attributes:t}=e;const{answersLink:r,answersLinkText:o,gravatars:s,promptId:i,promptLabel:l,promptText:c,showLabel:u,showResponses:d}=t,p=a.useBlockProps.save({className:"jetpack-blogging-prompt"});return(0,n.createElement)("div",p,u&&(0,n.createElement)("div",{className:"jetpack-blogging-prompt__label"},l),(0,n.createElement)("div",{className:"jetpack-blogging-prompt__text"},c),d&&i&&(0,n.createElement)("div",{className:"jetpack-blogging-prompt__answers"},s.map((e=>{let{url:t}=e;return t&&(0,n.createElement)("img",{className:"jetpack-blogging-prompt__answers-gravatar","aria-hidden":"true",src:t,key:t})})),(0,n.createElement)("a",{className:"jetpack-blogging-prompt__answers-link",href:r,target:"_blank",rel:"external noreferrer noopener"},o)))}},44266:(e,t,r)=>{"use strict";r.d(t,{n:()=>c});var n=r(86989),a=r.n(n),o=r(9818),s=r(69307),i=r(81975);function l(e){const t=(0,i.escapeHTML)(e);return a()({path:"/wp/v2/tags",method:"POST",data:{name:t}}).catch((t=>"term_exists"!==t.code?Promise.reject(t):Promise.resolve({id:t.data.term_id,name:e})))}function c(e,t,r){const{editPost:n}=(0,o.useDispatch)("core/editor"),a=(0,s.useRef)("not-started"),{postType:i,postsSupportTags:c,tags:u,tagIds:d,tagsHaveResolved:p}=(0,o.useSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor"),{getEntityRecords:r,getPostType:n,hasFinishedResolution:a}=e("core"),o=t("tags"),s={_fields:"id,name",context:"view",include:o?.join(","),per_page:-1};return{postType:t("type"),postsSupportTags:n("post")?.taxonomies.includes("post_tag"),tagIds:o||[],tags:o&&o.length?r("taxonomy","post_tag",s):[],tagsHaveResolved:!o||!o.length||a("getEntityRecords",["taxonomy","post_tag",s])}}),[]);(0,s.useEffect)((()=>{"post"===i&&c&&!t&&p&&e&&Array.isArray(u)&&("not-started"===a.current&&(u.some((e=>e.name&&"dailyprompt"===e.name))&&u.some((t=>t.name&&t.name===`dailyprompt-${e}`))?a.current="fulfilled":(a.current="pending",Promise.all([l("dailyprompt"),l(`dailyprompt-${e}`)]).then((e=>{const t=e.map((e=>e.id));n({tags:[...d,...t]}),a.current="fulfilled"})).catch((e=>{console.error(e),a.current="rejected"})))),"fulfilled"===a.current&&r(!0))}),[n,c,i,e,a,r,u,d,t,p])}},50756:(e,t,r)=>{"use strict";r.d(t,{Z:()=>g});var n=r(90017),a=r.n(n),o=r(51806),s=r(55609),i=r(69307),l=r(65736),c=r(65235),u=r.n(c),d=r(92819);const __=l.__,p="09:00",m="17:00";class h extends i.Component{constructor(){super(...arguments),a()(this,"renderInterval",((e,t)=>{const{day:r}=this.props,{opening:n,closing:a}=e;return(0,o.createElement)(i.Fragment,{key:t},(0,o.createElement)("div",{className:"business-hours__row"},(0,o.createElement)("div",{className:u()(r.name,"business-hours__day")},0===t&&this.renderDayToggle()),(0,o.createElement)("div",{className:u()(r.name,"business-hours__hours")},(0,o.createElement)(s.TextControl,{type:"time",label:__("Opening","jetpack"),value:n,className:"business-hours__open",placeholder:p,onChange:e=>{this.setHour(e,"opening",t)}}),(0,o.createElement)(s.TextControl,{type:"time",label:__("Closing","jetpack"),value:a,className:"business-hours__close",placeholder:m,onChange:e=>{this.setHour(e,"closing",t)}})),(0,o.createElement)("div",{className:"business-hours__remove"},r.hours.length>1&&(0,o.createElement)(s.Button,{isSmall:!0,variant:"link",icon:"trash",label:__("Remove Hours","jetpack"),onClick:()=>{this.removeInterval(t)}}))),t===r.hours.length-1&&(0,o.createElement)("div",{className:"business-hours__row business-hours-row__add"},(0,o.createElement)("div",{className:u()(r.name,"business-hours__day")}," "),(0,o.createElement)("div",{className:u()(r.name,"business-hours__hours")},(0,o.createElement)(s.Button,{variant:"link",label:__("Add Hours","jetpack"),onClick:this.addInterval},__("Add Hours","jetpack"))),(0,o.createElement)("div",{className:"business-hours__remove"}," ")))})),a()(this,"setHour",((e,t,r)=>{const{day:n,attributes:a,setAttributes:o}=this.props,{days:s}=a;o({days:s.map((a=>a.name===n.name?{...a,hours:a.hours.map(((n,a)=>a===r?{...n,[t]:e}:n))}:a))})})),a()(this,"toggleClosed",(e=>{const{day:t,attributes:r,setAttributes:n}=this.props,{days:a}=r;n({days:a.map((r=>{if(r.name===t.name){const t=e?[{opening:p,closing:m}]:[];return{...r,hours:t}}return r}))})})),a()(this,"addInterval",(()=>{const{day:e,attributes:t,setAttributes:r}=this.props,{days:n}=t;e.hours.push({opening:"",closing:""}),r({days:n.map((t=>t.name===e.name?{...t,hours:e.hours}:t))})})),a()(this,"removeInterval",(e=>{const{day:t,attributes:r,setAttributes:n}=this.props,{days:a}=r;n({days:a.map((r=>t.name===r.name?{...r,hours:r.hours.filter(((t,r)=>e!==r))}:r))})}))}isClosed(){const{day:e}=this.props;return(0,d.isEmpty)(e.hours)}renderDayToggle(){const{day:e,localization:t}=this.props;return(0,o.createElement)(i.Fragment,null,(0,o.createElement)("span",{className:"business-hours__day-name"},t.days[e.name]),(0,o.createElement)(s.ToggleControl,{label:this.isClosed()?__("Closed","jetpack"):__("Open","jetpack"),checked:!this.isClosed(),onChange:this.toggleClosed}))}renderClosed(){const{day:e}=this.props;return(0,o.createElement)("div",{className:"business-hours__row business-hours-row__closed"},(0,o.createElement)("div",{className:u()(e.name,"business-hours__day")},this.renderDayToggle()),(0,o.createElement)("div",{className:u()(e.name,"closed","business-hours__hours")}," "),(0,o.createElement)("div",{className:"business-hours__remove"}," "))}render(){const{day:e}=this.props;return this.isClosed()?this.renderClosed():e.hours.map(this.renderInterval)}}const g=h},80190:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(90017),a=r.n(n),o=r(51806),s=r(69771),i=r(69307),l=r(65736),c=r(92819);const _x=l._x;class u extends i.Component{constructor(){super(...arguments),a()(this,"renderInterval",((e,t)=>{const{day:r}=this.props,n=r.hours;return(0,o.createElement)("span",{key:t},(0,l.sprintf)("%1$s - %2$s",this.formatTime(e.opening),this.formatTime(e.closing)),n.length>1+t&&(0,o.createElement)("span",null,", "))}))}formatTime(e){const{timeFormat:t}=this.props,[r,n]=e.split(":"),a=new Date;return!(!r||!n)&&(a.setHours(r),a.setMinutes(n),(0,s.date)(t,a))}render(){const{day:e,localization:t}=this.props,r=e.hours.filter((e=>this.formatTime(e.opening)&&this.formatTime(e.closing)));return(0,o.createElement)("div",{className:"jetpack-business-hours__item"},(0,o.createElement)("dt",{className:e.name},t.days[e.name]),(0,o.createElement)("dd",null,(0,c.isEmpty)(r)?_x("Closed","business is closed on a full day","jetpack"):r.map(this.renderInterval),(0,o.createElement)("br",null)))}}const d=u},86162:(e,t,r)=>{"use strict";r.d(t,{Z:()=>E});var n=r(82674),a=r.n(n),o=r(90017),s=r.n(o),i=r(51806),l=r(86989),c=r.n(l),u=r(55609),d=r(69771),p=r(69307),m=r(65736),h=r(65235),g=r.n(h),f=r(50756),b=r(80190),v=r(96405);const __=m.__,k={days:{Sun:__("Sunday","jetpack"),Mon:__("Monday","jetpack"),Tue:__("Tuesday","jetpack"),Wed:__("Wednesday","jetpack"),Thu:__("Thursday","jetpack"),Fri:__("Friday","jetpack"),Sat:__("Saturday","jetpack")},startOfWeek:0};class y extends p.Component{constructor(){super(...arguments),s()(this,"state",{localization:k,hasFetched:!1})}componentDidMount(){this.apiFetch()}apiFetch(){this.setState({data:k},(()=>{c()({path:"/wpcom/v2/business-hours/localized-week"}).then((e=>{this.setState({localization:e,hasFetched:!0})}),(()=>{this.setState({localization:k,hasFetched:!0})}))}))}render(){const{attributes:e,className:t,isSelected:r}=this.props,{days:n}=e,{localization:o,hasFetched:s}=this.state,{startOfWeek:l}=o,c=n.concat(n.slice(0,l)).slice(l);if(!s)return(0,i.createElement)(u.Placeholder,{icon:v.qv,label:__("Loading business hours","jetpack")});if(!r){const e=(0,d.getSettings)(),{formats:{time:r}}=e;return(0,i.createElement)("dl",{className:g()(t,"jetpack-business-hours")},c.map(((e,t)=>(0,i.createElement)(b.Z,{key:t,day:e,localization:o,timeFormat:r}))))}return(0,i.createElement)("div",{className:g()(t,"is-edit")},c.map(((e,t)=>(0,i.createElement)(f.Z,a()({key:t,day:e,localization:o},this.props)))))}}const E=y},60866:(e,t,r)=>{"use strict";var n=r(31985),a=r(96405);(0,n.Z)(a.u2,a.Xd)},96405:(e,t,r)=>{"use strict";r.d(t,{Xd:()=>p,qv:()=>d,u2:()=>u});var n=r(51806),a=r(55609),o=r(65736),s=r(70355),i=r(36598),l=r(86162);const __=o.__,_x=o._x,c=[{name:"Sun",hours:[]},{name:"Mon",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Tue",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Wed",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Thu",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Fri",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Sat",hours:[]}],u="business-hours",d=(0,i.Z)((0,n.createElement)(a.Path,{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"})),p={title:__("Business Hours","jetpack"),description:__("Display opening hours for your business.","jetpack"),icon:{src:d,foreground:(0,s.m)()},category:"grow",supports:{html:!0,color:{gradients:!0},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0},align:["wide","full"]},keywords:[_x("opening hours","block search term","jetpack"),_x("closing time","block search term","jetpack"),_x("schedule","block search term","jetpack"),_x("working day","block search term","jetpack")],attributes:{days:{type:"array",default:c}},edit:e=>(0,n.createElement)(l.Z,e),save:()=>null,example:{attributes:{days:c}}}},98625:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(55609),a=r(92819);const o=(0,n.withFallbackStyles)(((e,t)=>{const{backgroundColor:r,textColor:n}=t,o=(0,a.get)(r,"color"),s=!(0,a.get)(n,"color")&&e?e.querySelector('[contenteditable="true"]'):null;return{fallbackBackgroundColor:o||!e?void 0:getComputedStyle(e).backgroundColor,fallbackTextColor:n||!s?void 0:getComputedStyle(s).color}}))},70424:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(24381);const a={element:{type:"string",enum:["a","button","input"]},saveInPostContent:{type:"boolean",default:!1},uniqueId:{type:"string"},passthroughAttributes:{type:"object"},text:{type:"string"},placeholder:{type:"string"},url:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string",validator:n.Z},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:n.Z},gradient:{type:"string"},customGradient:{type:"string"},borderRadius:{type:"number"},width:{type:"string"}}},43043:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(55609),o=r(69307),s=r(65736),i=r(90446);const __=s.__;function l(e){let{borderRadius:t="",setAttributes:r}=e;const s=(0,o.useCallback)((e=>r({borderRadius:e})),[r]);return(0,n.createElement)(a.PanelBody,{title:__("Border Settings","jetpack")},(0,n.createElement)(a.RangeControl,{allowReset:!0,initialPosition:i.pg,label:__("Border radius","jetpack"),max:i.Gp,min:i.G0,onChange:s,value:t}))}},36953:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(52175),o=r(65736);const __=o.__;function s(e){let{isGradientAvailable:t,backgroundColor:r,fallbackBackgroundColor:o,fallbackTextColor:s,gradientValue:i,setBackgroundColor:l,setGradient:c,setTextColor:u,textColor:d}=e;const p=(0,n.createElement)(a.ContrastChecker,{backgroundColor:r.color,fallbackBackgroundColor:o,fallbackTextColor:s,isLargeText:!1,textColor:d.color});return t?(0,n.createElement)(a.__experimentalPanelColorGradientSettings,{settings:[{colorValue:d.color,label:__("Text Color","jetpack"),onColorChange:u},{colorValue:r.color,gradientValue:i,label:__("Background","jetpack"),onColorChange:l,onGradientChange:c}],title:__("Background & Text Color","jetpack")},p):(0,n.createElement)(a.PanelColorSettings,{colorSettings:[{value:d.color,onChange:u,label:__("Text Color","jetpack")},{value:r.color,onChange:l,label:__("Background","jetpack")}],title:__("Background & Text Color","jetpack")},p)}},90446:(e,t,r)=>{"use strict";r.d(t,{DA:()=>a,G0:()=>i,Gp:()=>s,pg:()=>o});var n=r(52175);const a=!!n.__experimentalUseGradient,o=5,s=50,i=0},29343:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(9818),o=r(30429),s=r(43043),i=r(36953);function l(e){let{attributes:t,backgroundColor:r,clientId:l,context:c,fallbackBackgroundColor:u,fallbackTextColor:d,setAttributes:p,setBackgroundColor:m,setTextColor:h,textColor:g,gradientValue:f,setGradient:b,isGradientAvailable:v}=e;const{align:k,borderRadius:y}=t,E="jetpack/parentBlockWidth"in c,w=E?c["jetpack/parentBlockWidth"]:t.width,_=(0,a.useSelect)((e=>{const{getBlock:t,getBlockRootClientId:r}=e("core/block-editor");return t(r(l))})),{updateBlockAttributes:C}=(0,a.useDispatch)("core/block-editor");return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(i.Z,{backgroundColor:r,fallbackBackgroundColor:u,fallbackTextColor:d,gradientValue:f,setBackgroundColor:m,setGradient:b,setTextColor:h,textColor:g,isGradientAvailable:v}),(0,n.createElement)(s.Z,{borderRadius:y,setAttributes:p}),(0,n.createElement)(o.G,{align:k,width:w,onChange:e=>{E?C(_.clientId,{width:e}):p({width:e})}}))}},5501:(e,t,r)=>{"use strict";r.d(t,{Z:()=>f});var n=r(82674),a=r.n(n),o=r(51806),s=r(52175),i=r(94333),l=r(65736),c=r(65235),u=r.n(c),d=r(81673),p=r(98625),m=r(90446),h=r(29343),g=r(16969);const __=l.__;const f=(0,i.compose)((0,s.withColors)({backgroundColor:"background-color"},{textColor:"color"}),p.Z)((function(e){const{attributes:t,backgroundColor:r,className:n,clientId:i,context:l,setAttributes:c,textColor:p}=e,{borderRadius:f,element:b,placeholder:v,text:k,width:y,fontSize:E}=t,w="jetpack/parentBlockWidth"in l;(0,g.Z)({attributes:t,clientId:i,setAttributes:c}),(0,d.Z)({attributes:t,disableEffects:w,setAttributes:c});const{gradientClass:_,gradientValue:C,setGradient:j}=m.DA?(0,s.__experimentalUseGradient)({gradientAttribute:"gradient",customGradientAttribute:"customGradient"}):{},S=u()("wp-block-button",n),x=u()("wp-block-button__link",{"has-background":r.color||C,[r.class]:!C&&r.class,"has-text-color":p.color,[p.class]:p.class,[_]:_,"no-border-radius":0===f,"has-custom-width":!!y,[`has-${E}-font-size`]:!!E,"has-custom-font-size":!!E}),P={...!r.color&&C?{background:C}:{backgroundColor:r.color},fontSize:t.style?.typography?.fontSize,color:p.color,borderRadius:f?f+"px":void 0,width:y};return(0,o.createElement)("div",{className:S},(0,o.createElement)(s.RichText,{allowedFormats:"input"===b?[]:void 0,className:x,disableLineBreaks:"input"===b,onChange:e=>c({text:e}),placeholder:v||__("Add text…","jetpack"),style:P,value:k,withoutInteractiveFormatting:!0}),(0,o.createElement)(s.InspectorControls,null,(0,o.createElement)(h.Z,a()({gradientValue:C,setGradient:j,isGradientAvailable:m.DA},e))))}))},48887:(e,t,r)=>{"use strict";var n=r(31985),a=r(77123);(0,n.Z)(a.u,a.X)},26361:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(55609);const o=(0,n.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(a.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 13h8v-1.5H8V13z"}))},77123:(e,t,r)=>{"use strict";r.d(t,{X:()=>u,u:()=>c});var n=r(65736),a=r(5820),o=r(70424),s=r(5501),i=r(26361),l=r(29586);const __=n.__,c="button",u={title:__("Button","jetpack"),icon:i.Z,category:(0,a.Z)("design","layout"),keywords:[],supports:{html:!1,inserter:!1,align:["left","center","right"],typography:{fontSize:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}}},styles:[{name:"fill",label:__("Fill","jetpack"),isDefault:!0},{name:"outline",label:__("Outline","jetpack")}],attributes:o.Z,edit:s.Z,save:l.Z,usesContext:["jetpack/parentBlockWidth"]}},29586:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(52175),o=r(65235),s=r.n(o),i=r(90446);function l(e){let{attributes:t,blockName:r,uniqueId:o}=e;const{backgroundColor:l,borderRadius:c,className:u,customBackgroundColor:d,customGradient:p,customTextColor:m,gradient:h,saveInPostContent:g,text:f,textColor:b,url:v,width:k,fontSize:y}=t;if(!g)return null;const E=(0,a.getColorClassName)("background-color",l),w=i.DA?(0,a.__experimentalGetGradientClass)(h):void 0,_=(0,a.getColorClassName)("color",b),C=s()("wp-block-button","jetpack-submit-button",u,{[`wp-block-jetpack-${r}`]:r}),j=s()("wp-block-button__link",{"has-text-color":b||m,[_]:_,"has-background":l||h||d||p,[E]:E,[w]:w,"no-border-radius":0===c,"has-custom-width":!!k,[`has-${y}-font-size`]:!!y,"has-custom-font-size":!!y}),S={background:p||void 0,backgroundColor:E||p||h?void 0:d,fontSize:t.style?.typography?.fontSize,color:_?void 0:m,borderRadius:c?c+"px":void 0,width:k};return(0,n.createElement)("div",{className:C},(0,n.createElement)(a.RichText.Content,{className:j,"data-id-attr":o||"placeholder",href:v,id:o,rel:"noopener noreferrer",role:"button",style:S,tagName:"a",target:"_blank",value:f}))}},16969:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(9818),a=r(69307),o=r(92819);function s(e){let{attributes:t,clientId:r,setAttributes:s}=e;const{passthroughAttributes:i}=t,{attributesToSync:l}=(0,n.useSelect)((e=>{const{getBlockAttributes:n,getBlockRootClientId:a}=e("core/block-editor"),s=n(a(r))||{},l=(0,o.mapValues)(i,(e=>s[e]));return{attributesToSync:(0,o.pickBy)(l,((e,r)=>e!==t[r]))}}));(0,a.useEffect)((()=>{(0,o.isEmpty)(l)||s(l)}),[l,s])}},81340:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(24381);const a={backgroundColor:{type:"string",default:"ffffff",validator:n.Z},hideEventTypeDetails:{type:"boolean",default:!1},primaryColor:{type:"string",default:"00A2FF",validator:n.Z},textColor:{type:"string",default:"4D5055",validator:n.Z},style:{type:"string",default:"inline",validValues:["inline","link"]},url:{type:"string",validator:e=>!e||e.startsWith("https://calendly.com/")}}},60153:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>d});var n=r(51806),a=r(13419),o=r(52175),s=r(55609),i=r(65736),l=r(57538);const __=i.__,_x=i._x,c=e=>{let{onEditClick:t}=e;return(0,n.createElement)(s.ToolbarGroup,null,(0,n.createElement)(s.ToolbarButton,{onClick:()=>t(!0)},__("Edit","jetpack")))},u=e=>{const{attributes:{hideEventTypeDetails:t,url:r},defaultClassName:o,embedCode:i,parseEmbedCode:l,setAttributes:c,setEmbedCode:u}=e;let d=null;return r&&(d=(0,a.Ug)()||(0,a.Wp)()?"https://wordpress.com/support/wordpress-editor/blocks/calendly-block/#customize-the-calendly-block":"https://jetpack.com/support/jetpack-blocks/calendly-block/#customizing-a-calendly-block"),(0,n.createElement)(n.Fragment,null,(0,n.createElement)(s.PanelBody,{PanelBody:!0,title:__("Calendar settings","jetpack"),initialOpen:!1},(0,n.createElement)("form",{onSubmit:l,className:`${o}-embed-form-sidebar`},(0,n.createElement)("input",{type:"text",id:"embedCode",onChange:e=>u(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:i||"",className:"components-placeholder__input"}),(0,n.createElement)("div",null,(0,n.createElement)(s.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))),(0,n.createElement)(s.ToggleControl,{label:__("Hide event type details","jetpack"),checked:t,onChange:()=>c({hideEventTypeDetails:!t})})),d&&(0,n.createElement)(s.Notice,{className:`${o}-color-notice`,isDismissible:!1},(0,n.createElement)(s.ExternalLink,{href:d},__("Explore more customization options.","jetpack"))))},d=e=>{const{attributes:t,clientId:r,isEditingUrl:a,setAttributes:s,setIsEditingUrl:i}=e,{style:d,url:p}=t,m=[{value:"inline",label:__("Inline","jetpack")},{value:"link",label:__("Link","jetpack")}];return(0,n.createElement)(n.Fragment,null,p&&!a&&(0,n.createElement)(o.BlockControls,null,(0,n.createElement)(c,{onEditClick:i})),p&&(0,n.createElement)(l.Z,{clientId:r,styleOptions:m,onSelectStyle:s,activeStyle:d,attributes:t,viewportWidth:500}),(0,n.createElement)(o.InspectorControls,null,(0,n.createElement)(u,e)))}},83830:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(4981),o=r(65736),s=r(24381);const __=o.__,i={attributes:{backgroundColor:{type:"string",default:"ffffff",validator:s.Z},submitButtonText:{type:"string",default:__("Schedule time with me","jetpack")},submitButtonTextColor:{type:"string"},submitButtonBackgroundColor:{type:"string"},submitButtonClasses:{type:"string"},hideEventTypeDetails:{type:"boolean",default:!1},primaryColor:{type:"string",default:"00A2FF",validator:s.Z},textColor:{type:"string",default:"4D5055",validator:s.Z},style:{type:"string",default:"inline",validValues:["inline","link"]},url:{type:"string",validator:e=>!e||e.startsWith("https://calendly.com/")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string",validator:s.Z},customTextButtonColor:{type:"string",validator:s.Z}},migrate:e=>{const{submitButtonText:t,submitButtonTextColor:r,submitButtonBackgroundColor:n,submitButtonClasses:o,backgroundButtonColor:s,textButtonColor:i,customBackgroundButtonColor:l,customTextButtonColor:c,...u}=e,d={text:(p=e).submitButtonText||__("Schedule time with me","jetpack"),textColor:p.submitButtonTextColor||p.textButtonColor,customTextColor:p.customTextButtonColor,backgroundColor:p.submitButtonBackgroundColor||p.backgroundButtonColor,customBackgroundColor:p.customBackgroundButtonColor,url:p.url};var p;return[u,[(0,a.createBlock)("jetpack/button",{element:"a",uniqueId:"calendly-widget-id",...d})]]},save:e=>{let{attributes:{url:t}}=e;return(0,n.createElement)("a",{href:t},t)}}},29415:(e,t,r)=>{"use strict";r.d(t,{Z:()=>y});var n=r(82674),a=r.n(n),o=r(51806),s=r(52175),i=r(4981),l=r(55609),c=r(9818),u=r(69307),d=r(65736),p=r(92819),m=r(4554),h=r(23621),g=r(81340),f=r(60153),b=r(70176),v=r(4867),k=r(50785);const __=d.__,_x=d._x;const y=(0,l.withNotices)((function(e){const{attributes:t,className:r,clientId:n,name:d,noticeOperations:y,noticeUI:E,setAttributes:w}=e,_=(0,i.getBlockDefaultClassName)(d),C=(0,m.S)(g.Z,t);(0,p.isEqual)(C,t)||w(C);const{backgroundColor:j,hideEventTypeDetails:S,primaryColor:x,textColor:P,style:T,url:L}=C,[N,A]=(0,u.useState)(L),[R,I]=(0,u.useState)(!1),[M,Z]=(0,u.useState)(!1),[B,D]=(0,u.useState)({}),F=()=>{y.removeAllNotices(),y.createErrorNotice(__("Your calendar couldn't be embedded. Please double check your URL or code.","jetpack"))};(0,u.useEffect)((()=>{L&&k.lR!==L&&"link"!==T&&(0,h.Z)(L,Z).catch((()=>{w({url:void 0}),F()}))}),[]);const z=e=>{if(!e)return void F();e.preventDefault();const t=(0,v.CC)(N);if(t){if(t.buttonAttributes&&"link"===t.style){const e=(0,c.select)("core/editor").getBlocksByClientId(n);e.length&&e[0].innerBlocks.forEach((e=>{(0,c.dispatch)("core/editor").updateBlockAttributes(e.clientId,t.buttonAttributes)})),D(t.buttonAttributes)}(0,h.Z)(t.url,Z).then((()=>{const e=(0,m.S)(g.Z,t);w(e),I(!1),y.removeAllNotices()})).catch((()=>{w({url:void 0}),F()}))}else F()},O=(0,o.createElement)("div",{className:"wp-block-embed is-loading"},(0,o.createElement)(l.Spinner,null),(0,o.createElement)("p",null,__("Embedding…","jetpack"))),U=(0,o.createElement)(l.Placeholder,{label:__("Calendly","jetpack"),instructions:__("Enter your Calendly web address or embed code below.","jetpack"),icon:b.Z,notices:E},(0,o.createElement)("form",{onSubmit:z},(0,o.createElement)("input",{type:"text",id:"embedCode",onChange:e=>A(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:N||"",className:"components-placeholder__input"}),(0,o.createElement)("div",null,(0,o.createElement)(l.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))),(0,o.createElement)("div",{className:`${_}-learn-more`},(0,o.createElement)(l.ExternalLink,{href:"https://help.calendly.com/hc/en-us/articles/223147027-Embed-options-overview"},__("Need help finding your embed code?","jetpack")))),H=(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:`${_}-overlay`}),(0,o.createElement)("iframe",{src:(()=>{const e=new URLSearchParams({embed_domain:"wordpress.com",embed_type:"Inline",hide_event_type_details:S?1:0,background_color:j,primary_color:x,text_color:P});return`${L}?${e}`})(),width:"100%",height:"100%",frameBorder:"0","data-origwidth":"100%","data-origheight":"100%",title:"Calendly"})),V=(0,o.createElement)(s.InnerBlocks,{template:[[k.Ss.name,{...k.Ss.attributes,...B,passthroughAttributes:{url:"url"}}]],templateLock:"all"});if(M)return O;let G=r;return L&&!R&&(G+=` calendly-style-${T}`),(0,o.createElement)("div",{className:G},(0,o.createElement)(f.ZP,a()({},e,{defaultClassName:_,embedCode:N,isEditingUrl:R,parseEmbedCode:z,setEmbedCode:A,setIsEditingUrl:I})),L&&!R?"inline"===T?H:V:U)}))},52020:(e,t,r)=>{"use strict";var n=r(31985),a=r(50785);(0,n.Z)(a.u2,a.Xd)},70176:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(55609);const o=(0,n.createElement)(a.SVG,{height:"24",viewBox:"0 0 23 24",width:"23",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(a.Path,{d:"M19,1h-2.3v0c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v0H8.6v0c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v0H4C1.8,1,0,2.8,0,5 v15c0,2.2,1.8,4,4,4h15c2.2,0,4-1.8,4-4V5C23,2.8,21.2,1,19,1z M21,20c0,1.1-0.9,2-2,2H4c-1.1,0-2-0.9-2-2V5c0-1.1,0.9-2,2-2h2.6 v0.8c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1V3h6.1v0.8c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1V3H19c1.1,0,2,0.9,2,2V20z M13.9,14.8l1.4,1.4 c-0.9,0.9-2.1,1.3-3.5,1.3c-2.4,0-4.5-2.1-4.5-4.7s2.1-4.7,4.5-4.7c1.4,0,2.5,0.4,3.4,1.1L14,10.9c-0.5-0.4-1.2-0.6-2.1-0.6 c-1.2,0-2.5,1.1-2.5,2.7c0,1.6,1.3,2.7,2.5,2.7C12.7,15.5,13.4,15.3,13.9,14.8z"}))},50785:(e,t,r)=>{"use strict";r.d(t,{Ss:()=>m,Xd:()=>g,lR:()=>p,u2:()=>h});var n=r(4981),a=r(65736),o=r(70355),s=r(81340),i=r(83830),l=r(29415),c=r(70176),u=r(15816),d=r(4867);const __=a.__,_x=a._x,p="https://calendly.com/wpcom/jetpack-block-example",m={name:"jetpack/button",attributes:{element:"a",text:__("Schedule time with me","jetpack"),uniqueId:"calendly-widget-id",url:p}},h="calendly",g={title:__("Calendly","jetpack"),description:__("Embed a calendar for customers to schedule appointments","jetpack"),icon:{src:c.Z,foreground:(0,o.m)()},category:"grow",keywords:[_x("calendar","block search term","jetpack"),_x("schedule","block search term","jetpack"),_x("appointments","block search term","jetpack"),_x("events","block search term","jetpack"),_x("dates","block search term","jetpack")],supports:{align:!0,alignWide:!1,html:!1},edit:l.Z,save:u.Z,attributes:s.Z,example:{attributes:{hideEventTypeDetails:!1,style:"inline",url:p},innerBlocks:[m]},transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&d.mL.test(e.textContent),transform:e=>{const t=(0,d.CC)(e.textContent);return(0,n.createBlock)("jetpack/calendly",t)}}]},deprecated:[i.Z]}},15816:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(52175);function o(){return(0,n.createElement)("div",null,(0,n.createElement)(a.InnerBlocks.Content,null))}},4867:(e,t,r)=>{"use strict";r.d(t,{CC:()=>a,mL:()=>n});const n=/(^|\/\/)(calendly\.com[^"']*)/i,a=e=>{if(!e)return;const t=(e=>{const t=e.match(n);if(t)return"https://"+t[2]})(e);if(!t)return;const r=(e=>{const t={},r=new URL(e);if(t.url=r.origin+r.pathname,!r.search)return t;const n=new URLSearchParams(r.search),a=n.get("background_color"),o=n.get("primary_color"),s=n.get("text_color"),i=/^[A-Za-z0-9]{6}$/;return n.get("hide_event_type_details")&&(t.hideEventTypeDetails=n.get("hide_event_type_details")),a&&a.match(i)&&(t.backgroundColor=a),o&&o.match(i)&&(t.primaryColor=o),s&&s.match(i)&&(t.textColor=s),t})(t),a=(e=>e.indexOf("data-url")>0?"inline":e.indexOf("initPopupWidget")>0||e.indexOf("initBadgeWidget")>0?"link":void 0)(e);if(a&&(r.style=a),"link"===a){r.buttonAttributes={};const t=(e=>{let t=e.match(/false;">([^<]+)<\//);return t?t[1]:(t=e.match(/text: '([^']*?)'/),t?t[1]:void 0)})(e);t&&(r.buttonAttributes.text=t);const n=(e=>{const t=e.match(/textColor: '([^']*?)'/);if(t)return t[1]})(e);n&&(r.buttonAttributes.textColor=void 0,r.buttonAttributes.customTextColor=n);const a=(e=>{const t=e.match(/color: '([^']*?)'/);if(t)return t[1]})(e);a&&(r.buttonAttributes.backgroundColor=void 0,r.buttonAttributes.customBackgroundColor=a)}return r}},36553:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(51806),a=r(52175),o=r(55609),s=r(69307),i=r(65736),l=r(65235),c=r.n(l),u=r(35208);const __=i.__;class d extends s.Component{constructor(){super(...arguments),this.preventEnterKey=this.preventEnterKey.bind(this)}preventEnterKey(e){"Enter"!==e.key||e.preventDefault()}render(){const{attributes:{address:e,addressLine2:t,addressLine3:r,city:i,region:l,postal:d,country:p,linkToGoogleMaps:m},isSelected:h,setAttributes:g}=this.props,f=[e,t,r,i,l,d,p].some((e=>""!==e)),b=c()({"jetpack-address-block":!0,"is-selected":h}),v=(0,n.createElement)(o.ToggleControl,{label:__("Link address to Google Maps","jetpack"),checked:m,onChange:e=>g({linkToGoogleMaps:e})});return(0,n.createElement)("div",{className:b},!h&&f&&(0,u.Z)(this.props),(h||!f)&&(0,n.createElement)(s.Fragment,null,(0,n.createElement)(a.PlainText,{value:e,placeholder:__("Street Address","jetpack"),"aria-label":__("Street Address","jetpack"),onChange:e=>g({address:e}),onKeyDown:this.preventEnterKey}),(0,n.createElement)(a.PlainText,{value:t,placeholder:__("Address Line 2","jetpack"),"aria-label":__("Address Line 2","jetpack"),onChange:e=>g({addressLine2:e}),onKeyDown:this.preventEnterKey}),(0,n.createElement)(a.PlainText,{value:r,placeholder:__("Address Line 3","jetpack"),"aria-label":__("Address Line 3","jetpack"),onChange:e=>g({addressLine3:e}),onKeyDown:this.preventEnterKey}),(0,n.createElement)(a.PlainText,{value:i,placeholder:__("City","jetpack"),"aria-label":__("City","jetpack"),onChange:e=>g({city:e}),onKeyDown:this.preventEnterKey}),(0,n.createElement)(a.PlainText,{value:l,placeholder:__("State/Province/Region","jetpack"),"aria-label":__("State/Province/Region","jetpack"),onChange:e=>g({region:e}),onKeyDown:this.preventEnterKey}),(0,n.createElement)(a.PlainText,{value:d,placeholder:__("Postal/Zip Code","jetpack"),"aria-label":__("Postal/Zip Code","jetpack"),onChange:e=>g({postal:e}),onKeyDown:this.preventEnterKey}),(0,n.createElement)(a.PlainText,{value:p,placeholder:__("Country","jetpack"),"aria-label":__("Country","jetpack"),onChange:e=>g({country:e}),onKeyDown:this.preventEnterKey}),v))}}const p=d},11005:(e,t,r)=>{"use strict";r.d(t,{X:()=>d,u:()=>u});var n=r(51806),a=r(55609),o=r(69307),s=r(65736),i=r(36598),l=r(36553),c=r(35208);const __=s.__,_x=s._x,u="address",d={title:__("Address","jetpack"),description:__("Lets you add a physical address with Schema markup.","jetpack"),keywords:[_x("location","block search term","jetpack"),_x("direction","block search term","jetpack"),_x("place","block search term","jetpack")],icon:(0,i.Z)((0,n.createElement)(o.Fragment,null,(0,n.createElement)(a.Path,{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zM7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 2.88-2.88 7.19-5 9.88C9.92 16.21 7 11.85 7 9z"}),(0,n.createElement)(a.Circle,{cx:"12",cy:"9",r:"2.5"}))),category:"grow",attributes:{address:{type:"string",default:""},addressLine2:{type:"string",default:""},addressLine3:{type:"string",default:""},city:{type:"string",default:""},region:{type:"string",default:""},postal:{type:"string",default:""},country:{type:"string",default:""},linkToGoogleMaps:{type:"boolean",default:!1}},parent:["jetpack/contact-info"],edit:l.Z,save:c.Z}},35208:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(69307),o=r(65736);const __=o.__,s=e=>{let{attributes:{address:t,addressLine2:r,addressLine3:o,city:s,region:i,postal:l,country:c}}=e;return(0,n.createElement)(a.Fragment,null,t&&(0,n.createElement)("div",{className:"jetpack-address__address jetpack-address__address1"},t),r&&(0,n.createElement)("div",{className:"jetpack-address__address jetpack-address__address2"},r),o&&(0,n.createElement)("div",{className:"jetpack-address__address jetpack-address__address3"},o),s&&!(i||l)&&(0,n.createElement)("div",{className:"jetpack-address__city"},s),s&&(i||l)&&(0,n.createElement)("div",null,(0,n.createElement)("span",{className:"jetpack-address__city"},s),", ",(0,n.createElement)("span",{className:"jetpack-address__region"},i)," ",(0,n.createElement)("span",{className:"jetpack-address__postal"},l)),!s&&(i||l)&&(0,n.createElement)("div",null,(0,n.createElement)("span",{className:"jetpack-address__region"},i)," ",(0,n.createElement)("span",{className:"jetpack-address__postal"},l)),c&&(0,n.createElement)("div",{className:"jetpack-address__country"},c))},i=e=>{let{attributes:{address:t,addressLine2:r,addressLine3:n,city:a,region:o,postal:s,country:i}}=e;let l=o?`+${o},`:"";l=s?`${l}+${s}`:l;return`https://www.google.com/maps/search/${t?`${t},`:""}${r?`${r},`:""}${n?`${n},`:""}${a?`+${a},`:""}${l}${i?`+${i}`:""}`.replace(" ","+")},l=e=>(e=>{let{address:t,addressLine2:r,addressLine3:n,city:a,region:o,postal:s,country:i}=e;return[t,r,n,a,o,s,i].some((e=>""!==e))})(e.attributes)&&(0,n.createElement)("div",{className:e.className},e.attributes.linkToGoogleMaps&&(0,n.createElement)("a",{href:i(e),target:"_blank",rel:"noopener noreferrer",title:__("Open address in Google Maps","jetpack")},(0,n.createElement)(s,e)),!e.attributes.linkToGoogleMaps&&(0,n.createElement)(s,e))},83238:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(52175),o=r(65235),s=r.n(o);const i=["jetpack/markdown","jetpack/address","jetpack/email","jetpack/phone","jetpack/map","jetpack/business-hours","core/paragraph","core/image","core/heading","core/gallery","core/list","core/quote","core/shortcode","core/audio","core/code","core/cover","core/html","core/separator","core/spacer","core/subhead","core/video"],l=[["jetpack/email"],["jetpack/phone"],["jetpack/address"]],c=e=>{const{isSelected:t}=e;return(0,n.createElement)("div",{className:s()({"jetpack-contact-info-block":!0,"is-selected":t})},(0,n.createElement)(a.InnerBlocks,{allowedBlocks:i,templateLock:!1,template:l}))}},82566:(e,t,r)=>{"use strict";var n=r(31985),a=r(64446);(0,n.Z)(a.u2,a.Xd,a.Nk)},31336:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(65736),a=r(66425),o=r(90458);const __=n.__,s=e=>{const{setAttributes:t}=e;return(0,a.Z)("email",e,__("Email","jetpack"),o.Z,(e=>t({email:e})))}},99804:(e,t,r)=>{"use strict";r.d(t,{X:()=>u,u:()=>c});var n=r(51806),a=r(55609),o=r(65736),s=r(36598),i=r(31336),l=r(90458);const __=o.__,_x=o._x,c="email",u={title:__("Email Address","jetpack"),description:__("Lets you add an email address with an automatically generated click-to-email link.","jetpack"),keywords:["e-mail","email",_x("message","block search term","jetpack")],icon:(0,s.Z)((0,n.createElement)(a.Path,{d:"M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0l-8 5-8-5h16zm0 12H4V8l8 5 8-5v10z"})),category:"grow",attributes:{email:{type:"string",default:""}},edit:i.Z,save:l.Z,parent:["jetpack/contact-info"]}},90458:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(69307),o=r(92384);const s=e=>{let{attributes:{email:t},className:r}=e;return t&&(0,n.createElement)("div",{className:r},t.split(/(\s+)/).map(((e,t)=>{const r=e.replace(/([.,/#!$%^&*;:{}=\-_`~()\][])+$/g,"");return e.indexOf("@")&&o.validate(r)?e===r?(0,n.createElement)("a",{href:`mailto:${e}`,key:t},e):(0,n.createElement)(a.Fragment,{key:t},(0,n.createElement)("a",{href:`mailto:${e}`,key:t},r),(0,n.createElement)(a.Fragment,null,e.slice(-(e.length-r.length)))):(0,n.createElement)(a.Fragment,{key:t},e)})))}},64446:(e,t,r)=>{"use strict";r.d(t,{Nk:()=>b,Xd:()=>f,u2:()=>h});var n=r(51806),a=r(52175),o=r(4981),s=r(55609),i=r(65736),l=r(70355),c=r(36598),u=r(11005),d=r(83238),p=r(99804),m=r(52398);const __=i.__,_x=i._x,h="contact-info",g=(0,c.Z)((0,n.createElement)(s.Path,{d:"M19 5v14H5V5h14m0-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 9c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3zm0-4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm6 10H6v-1.53c0-2.5 3.97-3.58 6-3.58s6 1.08 6 3.58V18zm-9.69-2h7.38c-.69-.56-2.38-1.12-3.69-1.12s-3.01.56-3.69 1.12z"})),f={title:__("Contact Info","jetpack"),description:__("Lets you add an email address, phone number, and physical address with improved markup for better SEO results.","jetpack"),keywords:[_x("email","block search term","jetpack"),_x("phone","block search term","jetpack"),_x("address","block search term","jetpack")],icon:{src:g,foreground:(0,l.m)()},category:"grow",supports:{align:["wide","full"],html:!1,color:{link:!0,gradients:!0},spacing:{padding:!0,margin:!0},typography:{fontSize:!0,lineHeight:!0}},transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:r}=e;return!!r?.raw&&"widget_contact_info"===t},transform:e=>{let{instance:t}=e,r=[(0,o.createBlock)("core/heading",{content:t.raw.title}),(0,o.createBlock)("jetpack/email",{email:t.raw.email}),(0,o.createBlock)("jetpack/phone",{phone:t.raw.phone}),(0,o.createBlock)("jetpack/address",{address:t.raw.address})];return t.raw.hours&&(r=[...r,(0,o.createBlock)("core/paragraph",{content:t.raw.hours})]),t.raw.showmap&&t.raw.address&&(r=[...r,(0,o.createBlock)("jetpack/map",{address:t.raw.address})]),(0,o.createBlock)("jetpack/contact-info",{},r)}}]},attributes:{},edit:d.Z,save:e=>{let{className:t}=e;return(0,n.createElement)("div",{className:t},(0,n.createElement)(a.InnerBlocks.Content,null))},example:{attributes:{},innerBlocks:[{name:"jetpack/email",attributes:{email:"hello@yourjetpack.blog"}},{name:"jetpack/phone",attributes:{phone:"123-456-7890"}},{name:"jetpack/address",attributes:{address:"987 Photon Drive",city:"Speedyville",region:"CA",postal:"12345",country:"USA"}}]}},b=[{name:u.u,settings:u.X},{name:p.u,settings:p.X},{name:m.u,settings:m.X}]},70835:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(65736),a=r(66425),o=r(21621);const __=n.__,s=e=>{const{setAttributes:t}=e;return(0,a.Z)("phone",e,__("Phone number","jetpack"),o.Z,(e=>t({phone:e})))}},52398:(e,t,r)=>{"use strict";r.d(t,{X:()=>u,u:()=>c});var n=r(51806),a=r(55609),o=r(65736),s=r(36598),i=r(70835),l=r(21621);const __=o.__,_x=o._x,c="phone",u={title:__("Phone Number","jetpack"),description:__("Lets you add a phone number with an automatically generated click-to-call link.","jetpack"),keywords:[_x("mobile","block search term","jetpack"),_x("telephone","block search term","jetpack"),_x("cell","block search term","jetpack")],icon:(0,s.Z)((0,n.createElement)(a.Path,{d:"M6.54 5c.06.89.21 1.76.45 2.59l-1.2 1.2c-.41-1.2-.67-2.47-.76-3.79h1.51m9.86 12.02c.85.24 1.72.39 2.6.45v1.49c-1.32-.09-2.59-.35-3.8-.75l1.2-1.19M7.5 3H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.49c0-.55-.45-1-1-1-1.24 0-2.45-.2-3.57-.57-.1-.04-.21-.05-.31-.05-.26 0-.51.1-.71.29l-2.2 2.2c-2.83-1.45-5.15-3.76-6.59-6.59l2.2-2.2c.28-.28.36-.67.25-1.02C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1z"})),category:"grow",attributes:{phone:{type:"string",default:""}},parent:["jetpack/contact-info"],edit:i.Z,save:l.Z}},21621:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(51806);const a=e=>{let{attributes:{phone:t},className:r}=e;return t&&(0,n.createElement)("div",{className:r},function(e){const t=e.match(/\d+\.\d+|\d+\b|\d+(?=\w)/g);if(!t)return e;const r=e.indexOf(t[0]);let a=r?e.substring(r-1):e,o=r?e.substring(0,r):"",s=a.replace(/\D/g,"");return/[0-9/+/(]/.test(a[0])?(o=o.slice(0,-1),"+"===a[0]&&(s="+"+s)):a=a.substring(1),[o.trim()?(0,n.createElement)("span",{key:"phonePrefix",className:"phone-prefix"},o):null,(0,n.createElement)("a",{key:"phoneNumber",href:`tel:${s}`},a)]}(t))}},1699:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(65736);const a={text:{type:"string",source:"html",selector:"p",default:(0,n.__)('Privacy &amp; Cookies: This site uses cookies. By continuing to use this website, you agree to their use. To find out more, including how to control cookies, see here: <a href="https://automattic.com/cookies/">Cookie Policy</a>.',"jetpack")},style:{type:"object",default:{color:{text:"var(--wp--preset--color--contrast)",background:"var(--wp--preset--color--tertiary)",link:"var(--wp--preset--color--contrast)"},spacing:{padding:{top:"1em",right:"1em",bottom:"1em",left:"1em"}}}},align:{type:"string",default:"wide"},consentExpiryDays:{type:"integer",default:365},showOverlay:{type:"boolean",default:!1}}},20598:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(82674),a=r.n(n),o=r(51806),s=r(52175),i=r(55609),l=r(65736),c=r(89626);const __=l.__;const u=function(e){let{clientId:t,attributes:r,setAttributes:n}=e;const{consentExpiryDays:u,align:d,text:p}=r;(0,c.N)(t);const m=(0,s.useBlockProps)({className:`wp-block-jetpack-cookie-consent align${d}`});return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(s.InspectorControls,null,(0,o.createElement)(i.PanelBody,{title:__("Block Settings","jetpack")},(0,o.createElement)(i.SelectControl,{label:__("Alignment","jetpack"),value:d,options:[{label:(0,l.isRTL)()?__("Right","jetpack"):__("Left","jetpack"),value:"left"},{label:__("Full","jetpack"),value:"full"},{label:__("Wide","jetpack"),value:"wide"},{label:(0,l.isRTL)()?__("Left","jetpack"):__("Right","jetpack"),value:"right"}],onChange:e=>function(e){const t=["wide","full"].includes(e)?{width:void 0,height:void 0}:{};n({...t,align:e})}(e)}),(0,o.createElement)(i.TextControl,{label:__("Consent Expiry Time (in days)","jetpack"),value:u,type:"number",min:"1",max:"365",onChange:e=>n({consentExpiryDays:parseInt(e)})}),(0,o.createElement)("p",null,__("Note: The block position in the editor is not indicative of the position on the front end. The block will always be positioned at the bottom of the page.","jetpack")))),(0,o.createElement)("div",a()({},m,{style:m.style}),(0,o.createElement)(s.RichText,{tagName:"p",value:p,onChange:e=>n({text:e})}),(0,o.createElement)(s.InnerBlocks,{allowedBlocks:["core/button"],template:[["core/button",{text:__("Accept","jetpack")}]],templateLock:"all"})))}},54271:(e,t,r)=>{"use strict";var n=r(31985),a=r(68830);(0,n.Z)(a.u2,a.Xd)},16449:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(55609);const o=(0,n.createElement)(a.SVG,{height:"24",viewBox:"0 0 25 25",width:"24",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(a.Path,{stroke:"currentColor",fill:"white",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4.419 12c0-6.4 5.358-8 8.037-8h1.005v4h3.014v3h4.019v1c0 6.4-5.024 8-8.038 8-3.014 0-8.037-1.6-8.037-8zm5.023-4h.001m-2.01 4h0m5.023 1h.001m-2.01 3h0m6.028-1h0"}))},68830:(e,t,r)=>{"use strict";r.d(t,{Xd:()=>u,u2:()=>c});var n=r(65736),a=r(70355),o=r(1699),s=r(20598),i=r(16449),l=r(92097);const __=n.__,c="cookie-consent",u={title:__("Cookie Consent","jetpack"),description:__("Displays a customizable cookie consent banner. To display this block on all pages of your site, please add it inside a Template Part that is present on all your templates, like a Header or a Footer.","jetpack"),icon:{src:i.Z,foreground:(0,a.m)()},category:"grow",keywords:["cookie","consent","privacy","GDPR","EU",__("cookies","jetpack"),__("privacy","jetpack"),__("EU","jetpack")],supports:{align:["left","right","wide","full"],alignWide:!0,anchor:!1,color:{gradients:!0,link:!0},spacing:{padding:!0},customClassName:!0,className:!0,html:!1,lock:!1,multiple:!1,reusable:!1},edit:s.Z,save:l.Z,attributes:o.Z,example:{attributes:{}}}},92097:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(82674),a=r.n(n),o=r(51806),s=r(52175);function i(e){let{attributes:t}=e;const r=s.useBlockProps.save();return(0,o.createElement)("div",a()({},r,{style:r.style,role:"dialog","aria-modal":"true"}),(0,o.createElement)(s.RichText.Content,{tagName:"p",value:t.text}),(0,o.createElement)(s.InnerBlocks.Content,null),(0,o.createElement)("span",null,t.consentExpiryDays))}},89626:(e,t,r)=>{"use strict";r.d(t,{N:()=>l});var n=r(4981),a=r(94333),o=r(37798),s=r(9818),i=r(69307);function l(e){const t=(0,s.useSelect)((e=>{const{isSavingPost:t,isSavingNonPostEntityChanges:r}=e("core/editor");return t()||r()}),[]),r=!(!(0,a.usePrevious)(t)||t),[,l]=(0,o.useEntityProp)("root","site","cookie_consent_template"),{saveEditedEntityRecord:c}=(0,s.useDispatch)(o.store),[u,d]=(0,i.useState)(!1),p=(0,s.useSelect)((e=>{const{getBlock:t}=e("core/block-editor");return t})),m=(0,i.useCallback)((e=>{d(!0),l(e),c("root","site",void 0,{cookie_consent_template:e}).finally((()=>{d(!1)}))}),[d,l,c]);(0,i.useEffect)((()=>()=>{p(e)||m(null)}),[]),(0,i.useEffect)((()=>{r&&!u&&m((0,n.serialize)([p(e)]))}),[r,u,m,p,e])}},10764:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(51806),a=r(25607),o=r(43317),s=r(52175),i=r(69307),l=r(65235),c=r.n(l),u=r(79162);const d=e=>{let{className:t=null,currency:r=null,defaultValue:l=null,disabled:d=!1,label:p="",onChange:m=null,value:h=""}=e;const[g,f]=(0,i.useState)((0,a.ZP)(h,r,{symbol:""})),[b,v]=(0,i.useState)(!1),[k,y]=(0,i.useState)(!1),E=(0,i.useRef)(null),w=(0,i.useCallback)((e=>{if(f(e),!m)return;const t=(0,u.Vm)(e,r);t&&t>=(0,u.hj)(r)?(m(t),y(!1)):y(!0)}),[r,m]),_=()=>{E.current&&(E.current.focus(),v(!0))};return(0,i.useEffect)((()=>{if(!E.current)return;const e=E.current,t=()=>{v(!1),g||w((0,a.ZP)(l,r,{symbol:""}))};return e.addEventListener("blur",t),()=>{e.removeEventListener("blur",t)}}),[r,l,g,E,w]),(0,i.useEffect)((()=>{b||k||f((0,a.ZP)(h,r,{symbol:""}))}),[r,b,k,w,h]),(0,i.useEffect)((()=>{w((0,a.ZP)(h,r,{symbol:""}))}),[h]),(0,n.createElement)("div",{className:c()("donations__amount",t,{"has-focus":b,"has-error":k}),role:"button",tabIndex:0,onClick:_,onKeyDown:_},o.M[r].symbol,d?(0,n.createElement)("div",{className:"donations__amount-value"},(0,a.ZP)(h||l,r,{symbol:""})):(0,n.createElement)(s.RichText,{allowedFormats:[],"aria-label":p,multiline:!1,onChange:e=>w(e),placeholder:(0,a.ZP)(l,r,{symbol:""}),ref:E,value:g,withoutInteractiveFormatting:!0}))}},82275:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(51806),a=r(43317),o=r(13419),s=r(52175),i=r(55609),l=r(65736),c=r(39630),u=r(79162);const __=l.__,d=e=>{const{attributes:t,setAttributes:r}=e,{currency:l,oneTimeDonation:d,monthlyDonation:p,annualDonation:m,showCustomAmount:h}=t,g=(e,n)=>{const a={"1 month":"monthlyDonation","1 year":"annualDonation"}[e],o=t[a];r({[a]:{...o,show:n}})};return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(s.BlockControls,null,(0,n.createElement)(i.ToolbarGroup,null,(0,n.createElement)(i.ToolbarItem,null,(()=>(0,n.createElement)(i.Dropdown,{contentClassName:"jetpack-donations__currency-popover",renderToggle:e=>{let{onToggle:t,isOpen:r}=e;return(0,n.createElement)(i.Button,{className:"jetpack-donations__currency-toggle",icon:(0,n.createElement)(n.Fragment,null,l+" - "+a.M[l].symbol,(0,n.createElement)(i.Dashicon,{icon:"arrow-down"})),label:__("Change currency","jetpack"),onClick:t,onKeyDown:e=>{r||e.keyCode!==c.DOWN||(e.preventDefault(),e.stopPropagation(),t())}})},renderContent:e=>{let{onClose:t}=e;return(0,n.createElement)(i.MenuGroup,null,Object.keys(u.ck).map((e=>(0,n.createElement)(i.MenuItem,{isSelected:e===l,icon:e===l?"yes":"",onClick:()=>{(e=>{const t=(0,u.li)(e);r({currency:e,oneTimeDonation:{...d,amounts:t},monthlyDonation:{...p,amounts:t},annualDonation:{...m,amounts:t}})})(e),t()},key:`jetpack-donations-currency-${e}`},e+" - "+a.M[e].symbol))))}}))))),(0,n.createElement)(s.InspectorControls,null,(0,n.createElement)(i.PanelBody,{title:__("Settings","jetpack")},(0,n.createElement)(i.ToggleControl,{checked:p.show,onChange:e=>g("1 month",e),label:__("Show monthly donations","jetpack")}),(0,n.createElement)(i.ToggleControl,{checked:m.show,onChange:e=>g("1 year",e),label:__("Show annual donations","jetpack")}),(0,n.createElement)(i.ToggleControl,{checked:h,onChange:e=>r({showCustomAmount:e}),label:__("Show custom amount option","jetpack")}),(0,n.createElement)(i.ExternalLink,{href:`https://wordpress.com/earn/payments/${(0,o.lQ)()}`},__("View donation earnings","jetpack")))))}},853:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(25607),o=r(43317),s=r(52175),i=r(65736),l=r(79162);const __=i.__,c={attributes:{currency:{type:"string",default:"USD"},oneTimeDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a one-time donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate","jetpack")}},monthlyDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a monthly donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate monthly","jetpack")}},annualDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a yearly donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate yearly","jetpack")}},showCustomAmount:{type:"boolean",default:!0},chooseAmountText:{type:"string",default:__("Choose an amount","jetpack")},customAmountText:{type:"string",default:__("Or enter a custom amount","jetpack")}},supports:{html:!1},save:e=>{let{attributes:t}=e;const{currency:r,oneTimeDonation:i,monthlyDonation:c,annualDonation:u,showCustomAmount:d,chooseAmountText:p,customAmountText:m}=t;if(!i||!i.show||-1===i.planId)return null;const h={"one-time":{title:__("One-Time","jetpack")},...c.show&&{"1 month":{title:__("Monthly","jetpack")}},...u.show&&{"1 year":{title:__("Yearly","jetpack")}}};return(0,n.createElement)("div",null,(0,n.createElement)("div",{className:"donations__container"},Object.keys(h).length>1&&(0,n.createElement)("div",{className:"donations__nav"},Object.entries(h).map((e=>{let[t,{title:r}]=e;return(0,n.createElement)("div",{role:"button",tabIndex:0,className:"donations__nav-item",key:`jetpack-donations-nav-item-${t} `,"data-interval":t},r)}))),(0,n.createElement)("div",{className:"donations__content"},(0,n.createElement)("div",{className:"donations__tab"},(0,n.createElement)(s.RichText.Content,{tagName:"h4",className:"donations__one-time-item",value:i.heading}),c.show&&(0,n.createElement)(s.RichText.Content,{tagName:"h4",className:"donations__monthly-item",value:c.heading}),u.show&&(0,n.createElement)(s.RichText.Content,{tagName:"h4",className:"donations__annual-item",value:u.heading}),(0,n.createElement)(s.RichText.Content,{tagName:"p",value:p}),(0,n.createElement)("div",{className:"donations__amounts donations__one-time-item"},i.amounts.map((e=>(0,n.createElement)("div",{className:"donations__amount","data-amount":e},(0,a.ZP)(e,r))))),c.show&&(0,n.createElement)("div",{className:"donations__amounts donations__monthly-item"},c.amounts.map((e=>(0,n.createElement)("div",{className:"donations__amount","data-amount":e},(0,a.ZP)(e,r))))),u.show&&(0,n.createElement)("div",{className:"donations__amounts donations__annual-item"},u.amounts.map((e=>(0,n.createElement)("div",{className:"donations__amount","data-amount":e},(0,a.ZP)(e,r))))),d&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(s.RichText.Content,{tagName:"p",value:m}),(0,n.createElement)("div",{className:"donations__amount donations__custom-amount"},o.M[r].symbol,(0,n.createElement)("div",{className:"donations__amount-value","data-currency":r,"data-empty-text":(0,a.ZP)(100*(0,l.hj)(r),r,{symbol:""})}))),(0,n.createElement)("div",{className:"donations__separator"},"——"),(0,n.createElement)(s.RichText.Content,{tagName:"p",className:"donations__one-time-item",value:i.extraText}),c.show&&(0,n.createElement)(s.RichText.Content,{tagName:"p",className:"donations__monthly-item",value:c.extraText}),u.show&&(0,n.createElement)(s.RichText.Content,{tagName:"p",className:"donations__annual-item",value:u.extraText}),(0,n.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__one-time-item"},(0,n.createElement)(s.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__one-time-item",value:i.buttonText})),c.show&&(0,n.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__monthly-item"},(0,n.createElement)(s.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__monthly-item",value:c.buttonText})),u.show&&(0,n.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__annual-item"},(0,n.createElement)(s.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__annual-item",value:u.buttonText}))))))}}},86245:(e,t,r)=>{"use strict";r.d(t,{Z:()=>b});var n=r(82674),a=r.n(n),o=r(51806),s=r(45033),i=r(9818),l=r(69307),c=r(65736),u=r(79162),d=r(74251),p=r(23267),m=r(21789),h=r(85731),g=r(24177),f=r(72833);const __=c.__,b=e=>{const{attributes:t,className:r,setAttributes:n}=e,{currency:c}=t,[b,v]=(0,l.useState)(""),[k,y]=(0,l.useState)([]),{lockPostSaving:E,unlockPostSaving:w}=(0,i.useDispatch)("core/editor"),_=(0,i.useSelect)((e=>e("core/editor").getCurrentPost()),[]),{setConnectUrl:C,setConnectedAccountDefaultCurrency:j}=(0,i.useDispatch)(p.G4);(0,l.useEffect)((()=>{n({fallbackLinkUrl:_.link})}),[_.link,n]);const S=(0,i.useSelect)((e=>e(p.G4).getConnectedAccountDefaultCurrency()));if(!c&&S){const e=S.toUpperCase(),t=!!u.ck[e];n(t?{currency:e}:{currency:"USD"})}const x=e=>{v(e)};return(0,l.useEffect)((()=>{E("donations");const e=e=>e.reduce(((e,t)=>{let{id:r,currency:n,type:a,interval:o}=t;return n===c&&"donation"===a&&(e[o]=r),e}),{});(0,h.Z)("donation").then((t=>{if(!t&&"object"!=typeof t||t.errors)return w("donations"),void v(__("Could not load data from WordPress.com.","jetpack"));C((0,d.Z)(_.id,t.connect_url)),j(t?.connected_account_default_currency?.toUpperCase());const r=e(t.products);return(e=>{const t=Object.keys(e);return t.includes("one-time")&&t.includes("1 month")&&t.includes("1 year")})(r)?(y(r),void w("donations")):t.connect_url?(y({"one-time":-1,"1 month":-1,"1 year":-1}),void w("donations")):void(c&&(0,m.Z)(c).then((t=>{y(e(t)),w("donations")}),x))}),x)}),[E,c,_.id,C,j,w]),b?(0,o.createElement)(g.Z,{className:r,error:b}):c?(0,o.createElement)(f.Z,a()({},e,{products:k})):(0,o.createElement)(s.Z,null)}},67140:(e,t,r)=>{"use strict";var n=r(31985),a=r(29800);(0,n.Z)(a.u2,a.Xd)},21789:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(86989),a=r.n(n);const o=async e=>{try{return await a()({path:"/wpcom/v2/memberships/products",method:"POST",data:{type:"donation",currency:e,is_editable:!1}})}catch(e){return Promise.reject(e.message)}}},85731:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(86989),a=r.n(n),o=r(96483);const s=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=new URLSearchParams(window.location.search),r=(0,o.addQueryArgs)("/wpcom/v2/memberships/status",{source:"https://wordpress.com"===t.get("origin")?"gutenberg-wpcom":"gutenberg",...e&&{type:e},is_editable:!1});try{return await a()({path:r,method:"GET"})}catch(e){return Promise.reject(e.message)}}},29800:(e,t,r)=>{"use strict";r.d(t,{Xd:()=>c,u2:()=>l});var n=r(65736),a=r(81427),o=r(853),s=r(86245),i=r(75314);const __=n.__,_x=n._x,l="donations",c={title:__("Donations Form","jetpack"),description:__("Collect one-time, monthly, or annually recurring donations.","jetpack"),icon:a.K9,category:"earn",keywords:[_x("charity","block search term","jetpack"),_x("contribution","block search term","jetpack"),_x("credit card","block search term","jetpack"),_x("debit card","block search term","jetpack"),_x("donate","block search term","jetpack"),_x("earn","block search term","jetpack"),_x("ecommerce","block search term","jetpack"),_x("fundraising","block search term","jetpack"),_x("fundraiser","block search term","jetpack"),"gofundme",_x("money","block search term","jetpack"),_x("nonprofit","block search term","jetpack"),_x("non-profit","block search term","jetpack"),_x("paid","block search term","jetpack"),"patreon",_x("pay","block search term","jetpack"),_x("payments","block search term","jetpack"),_x("recurring","block search term","jetpack"),"stripe",_x("sponsor","block search term","jetpack"),"square",_x("tipping","block search term","jetpack"),"venmo"],supports:{html:!1},edit:s.Z,save:i.Z,example:{},deprecated:[o.Z]}},24177:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(55609),o=r(65736);const __=o.__,s=e=>{let{className:t,error:r}=e;return(0,n.createElement)(a.Placeholder,{icon:"lock",label:__("Donations","jetpack"),instructions:r,className:t})}},75314:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(52175);const o=e=>{let{attributes:t}=e;const{fallbackLinkUrl:r,oneTimeDonation:o,monthlyDonation:s,annualDonation:i}=t;return o&&o.show&&o.planId&&-1!==o.planId?(0,n.createElement)("div",null,(0,n.createElement)(a.RichText.Content,{tagName:"h4",value:o.heading}),(0,n.createElement)(a.RichText.Content,{tagName:"p",value:o.extraText}),(0,n.createElement)(a.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:r,rel:"noopener noreferrer noamphtml",target:"_blank",value:o.buttonText}),s.show&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)("hr",{className:"donations__separator"}),(0,n.createElement)(a.RichText.Content,{tagName:"h4",value:s.heading}),(0,n.createElement)(a.RichText.Content,{tagName:"p",value:s.extraText}),(0,n.createElement)(a.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:r,rel:"noopener noreferrer noamphtml",target:"_blank",value:s.buttonText})),i.show&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)("hr",{className:"donations__separator"}),(0,n.createElement)(a.RichText.Content,{tagName:"h4",value:i.heading}),(0,n.createElement)(a.RichText.Content,{tagName:"p",value:i.extraText}),(0,n.createElement)(a.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:r,rel:"noopener noreferrer noamphtml",target:"_blank",value:i.buttonText}))):null}},91757:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(52175),o=r(9818),s=r(65736),i=r(79162),l=r(10764);const __=s.__,c=e=>{let{activeTab:t,attributes:r,setAttributes:c}=e;const{currency:u,oneTimeDonation:d,monthlyDonation:p,annualDonation:m,showCustomAmount:h,chooseAmountText:g,customAmountText:f}=r,b={"one-time":"oneTimeDonation","1 month":"monthlyDonation","1 year":"annualDonation"},v=e=>r[b[t]][e],k=(e,n)=>{const a=b[t],o=r[a];c({[a]:{...o,[e]:n}})},y=(0,i.li)(u),E=v("amounts"),w=(0,o.useSelect)((e=>e("core/rich-text").getFormatTypes()),[]).map((e=>e.name)).filter((e=>"core/link"!==e));return(0,n.createElement)("div",{className:"donations__tab"},(0,n.createElement)(a.RichText,{tagName:"h4",placeholder:__("Write a message…","jetpack"),value:v("heading"),onChange:e=>k("heading",e)}),(0,n.createElement)(a.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:g,onChange:e=>c({chooseAmountText:e})}),(0,n.createElement)("div",{className:"donations__amounts"},E.map(((e,t)=>(0,n.createElement)(l.Z,{currency:u,defaultValue:y[t],label:(0,s.sprintf)(
// translators: %d: Tier level e.g: "1", "2", "3"
__("Tier %d","jetpack"),t+1),key:`jetpack-donations-amount-${t}`,onChange:e=>((e,t)=>{const r=[...E];r[t]=e,k("amounts",r)})(e,t),value:e})))),h&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(a.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:f,onChange:e=>c({customAmountText:e})}),(0,n.createElement)(l.Z,{currency:u,label:__("Custom amount","jetpack"),defaultValue:100*(0,i.hj)(u),className:"donations__custom-amount",disabled:!0})),(0,n.createElement)("hr",{className:"donations__separator"}),(0,n.createElement)(a.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:v("extraText"),onChange:e=>k("extraText",e)}),(0,n.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper"},(0,n.createElement)(a.RichText,{className:"wp-block-button__link donations__donate-button",placeholder:__("Write a message…","jetpack"),value:v("buttonText"),onChange:e=>{return t=e,void c({oneTimeDonation:{...d,buttonText:t},monthlyDonation:{...p,buttonText:t},annualDonation:{...m,buttonText:t}});var t},allowedFormats:w})))}},72833:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(51806),a=r(69307),o=r(65736),s=r(65235),i=r.n(s),l=r(16367),c=r(82275),u=r(91757);const __=o.__,d=e=>{const{attributes:t,className:r,products:o,setAttributes:s}=e,{oneTimeDonation:d,monthlyDonation:p,annualDonation:m}=t,[h,g]=(0,a.useState)("one-time"),f=(0,a.useCallback)((e=>h===e),[h]),b={"one-time":{title:__("One-Time","jetpack")},...p.show&&{"1 month":{title:__("Monthly","jetpack")}},...m.show&&{"1 year":{title:__("Yearly","jetpack")}}};return(0,a.useEffect)((()=>{d.planId===o["one-time"]&&p.planId===o["1 month"]&&m.planId===o["1 year"]||s({...o["one-time"]&&{oneTimeDonation:{...d,planId:o["one-time"]}},...o["1 month"]&&{monthlyDonation:{...p,planId:o["1 month"]}},...o["1 year"]&&{annualDonation:{...m,planId:o["1 year"]}}})}),[d,p,m,s,o]),(0,a.useEffect)((()=>{!p.show&&f("1 month")&&g("one-time"),!m.show&&f("1 year")&&g("one-time")}),[p,m,g,f]),(0,n.createElement)("div",{className:r},(0,n.createElement)(l.U,{blockName:"donations"}),(0,n.createElement)("div",{className:"donations__container"},Object.keys(b).length>1&&(0,n.createElement)("div",{className:"donations__nav"},Object.entries(b).map((e=>{let[t,{title:r}]=e;return(0,n.createElement)("div",{role:"button",tabIndex:0,className:i()("donations__nav-item",{"is-active":f(t)}),onClick:()=>g(t),onKeyDown:()=>g(t),key:`jetpack-donations-nav-item-${t} `},r)}))),(0,n.createElement)("div",{className:"donations__content"},(0,n.createElement)(u.Z,{activeTab:h,attributes:t,setAttributes:s}))),(0,n.createElement)(c.Z,e))}},2785:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={url:{type:"string",validator:e=>!e||e.startsWith("http")},eventId:{type:"number"},style:{type:"string",default:"inline"}}},6949:(e,t,r)=>{"use strict";r.d(t,{J:()=>s});var n=r(51806),a=r(55609),o=r(65736);const __=o.__,s=e=>{let{setEditingUrl:t}=e;return(0,n.createElement)(a.ToolbarGroup,null,(0,n.createElement)(a.ToolbarButton,{className:"components-toolbar__control",label:__("Edit URL","jetpack"),icon:"edit",onClick:()=>t(!0)}))}},1344:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=[r(24717).Z]},24717:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(51806),a=r(52175),o=r(4981),s=r(65736),i=r(65235),l=r.n(i),c=r(92819);const _x=s._x,u=["text","backgroundColor","textColor","customBackgroundColor","customTextColor","borderRadius"];const d={attributes:{url:{type:"string",validator:e=>!e||e.startsWith("http")},eventId:{type:"number"},useModal:{type:"boolean"},style:{type:"string"},text:{type:"string",default:_x("Register","verb: e.g. register for an event.","jetpack")},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},borderRadius:{type:"number"}},migrate:e=>{const{className:t,style:r}=e;let n=r;n||(n=e.useModal?"modal":"inline");const a={...(0,c.omit)(e,["useModal",...u]),className:t&&t.replace("is-style-outline",""),style:n},s=(0,c.pick)(e,u);return[a,[(0,o.createBlock)("jetpack/button",{element:"a",text:s.text||_x("Register","verb: e.g. register for an event.","jetpack"),...s,uniqueId:"eventbrite-widget-id",className:t&&-1!==t.indexOf("is-style-outline")?"is-style-outline":""})]]},save:function(e){let{attributes:t}=e;const{eventId:r,useModal:o,url:s,style:i}=t;if(r)return o||"modal"===i?function(e){const{backgroundColor:t,borderRadius:r,customBackgroundColor:o,customTextColor:s,eventId:i,text:c,textColor:u,url:d}=e,p=(0,a.getColorClassName)("color",u),m=(0,a.getColorClassName)("background-color",t),h=l()("wp-block-button__link",{"has-text-color":u||s,[p]:p,"has-background":t||o,[m]:m,"no-border-radius":0===r}),g={backgroundColor:m?void 0:o,color:p?void 0:s,borderRadius:r?r+"px":void 0};return(0,n.createElement)("div",{className:"wp-block-button"},(0,n.createElement)(a.RichText.Content,{className:h,href:d,id:`eventbrite-widget-${i}`,rel:"noopener noreferrer",role:"button",style:g,tagName:"a",target:"_blank",value:c}))}(t):s&&(0,n.createElement)("a",{className:"eventbrite__direct-link",href:s},s)},isEligible:(e,t)=>("modal"===e.style||e.useModal)&&((0,c.isEmpty)(t)||(0,c.some)((0,c.pick)(e,u),Boolean))}},16078:(e,t,r)=>{"use strict";r.d(t,{Z:()=>y});var n=r(90017),a=r.n(n),o=r(51806),s=r(13419),i=r(52175),l=r(55609),c=r(69307),u=r(65736),d=r(57538),p=r(4554),m=r(23621),h=r(2785),g=r(6949),f=r(8964),b=r(77825),v=r(75334);const __=u.__,_x=u._x;class k extends c.Component{constructor(){super(...arguments),a()(this,"state",{editedUrl:this.props.attributes.url||"",editingUrl:!1,isResolvingUrl:!1}),a()(this,"setUrl",(e=>{const{attributes:t,noticeOperations:r,setAttributes:n}=this.props,{style:a}=t;if(!e||v.Q7===e||"modal"===a)return;const o=(0,b.Ve)(e);if(o){const t={eventId:o,url:e};(0,m.Z)(t.url,this.setIsResolvingUrl).then((e=>{const a=(0,p.S)(h.Z,{...t,url:e});n(a),this.setState({editedUrl:e}),r.removeAllNotices()})).catch((()=>{n({eventId:void 0,url:void 0}),this.setErrorNotice()}))}else this.setErrorNotice()})),a()(this,"setIsResolvingUrl",(e=>this.setState({isResolvingUrl:e}))),a()(this,"setEditingUrl",(e=>this.setState({editingUrl:e}))),a()(this,"setErrorNotice",(()=>{const{noticeOperations:e,onReplace:t}=this.props,{editedUrl:r}=this.state;e.removeAllNotices(),e.createErrorNotice((0,o.createElement)(o.Fragment,null,__("Sorry, this content could not be embedded.","jetpack")," ",(0,o.createElement)(l.Button,{variant:"link",onClick:()=>(0,b.N3)(r,t)},_x("Convert block to link","button label","jetpack"))))})),a()(this,"submitForm",(e=>{e&&e.preventDefault(),this.setUrl((0,b.qq)(this.state.editedUrl)),this.setState({editingUrl:!1})})),a()(this,"cannotEmbed",(()=>{const{url:e}=this.props.attributes,{isResolvingUrl:t}=this.state;return!t&&e&&!v.Wh.test(e)}))}componentDidMount(){const{url:e}=this.props.attributes;this.setUrl(e)}renderLoading(){return(0,o.createElement)("div",{className:"wp-block-embed is-loading"},(0,o.createElement)(l.Spinner,null),(0,o.createElement)("p",null,__("Embedding…","jetpack")))}renderInspectorControls(){const{style:e}=this.props.attributes,{attributes:t,clientId:r,setAttributes:n}=this.props,a=[{value:"inline",label:__("In-page Embed","jetpack"),preview:(0,o.createElement)("div",{className:"block-editor-block-preview__container"},(0,o.createElement)("img",{src:f,alt:__("In page Eventbrite checkout example","jetpack")}))},{value:"modal",label:__("Button & Modal","jetpack")}];return(0,o.createElement)(d.Z,{title:_x("Embed Type","option for how the embed displays on a page, e.g. inline or as a modal","jetpack"),clientId:r,styleOptions:a,onSelectStyle:n,activeStyle:e,attributes:t,viewportWidth:130})}renderEditEmbed(){const{className:e,noticeUI:t}=this.props,{editedUrl:r}=this.state,n=(0,s.Wp)()||(0,s.Ug)()?"http://support.wordpress.com/wordpress-editor/blocks/eventbrite-block/":"https://jetpack.com/support/jetpack-blocks/eventbrite-block/";return(0,o.createElement)("div",{className:e},(0,o.createElement)(l.Placeholder,{label:__("Eventbrite Checkout","jetpack"),instructions:__("Paste a link to an Eventbrite event to embed ticket checkout.","jetpack"),icon:v.qv,notices:t},(0,o.createElement)("form",{onSubmit:this.submitForm},(0,o.createElement)("input",{type:"url",value:r,className:"components-placeholder__input","aria-label":__("Eventbrite URL","jetpack"),placeholder:__("Enter an event URL to embed here…","jetpack"),onChange:e=>this.setState({editedUrl:e.target.value})}),(0,o.createElement)(l.Button,{variant:"secondary",type:"submit"},_x("Embed","submit button label","jetpack"))),(0,o.createElement)("div",{className:"components-placeholder__learn-more"},(0,o.createElement)(l.ExternalLink,{href:n},__("Learn more about Eventbrite embeds","jetpack")))))}renderInlinePreview(){const{className:e}=this.props,{eventId:t}=this.props.attributes;if(!t)return;const r=`eventbrite-widget-${t}`,n=`\n\t\t\t<script src="https://www.eventbrite.com/static/widgets/eb_widgets.js"><\/script>\n\t\t\t<style>\n\t\t\t\t/* Prevent scrollbar on the embed preview */\n\t\t\t\tbody {\n\t\t\t\t\toverflow: hidden;\n\t\t\t\t}\n\t\t\t\t/* Eventbrite embeds have a CSS height transition on loading, which causes <Sandbox>\n\t\t\t\tto not recognise the resizing. We need to disable that transition. */\n\t\t\t\t* {\n\t\t\t\t\ttransition: none !important;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<script>\n\t\t\t\twindow.EBWidgets.createWidget({\n\t\t\t\t\twidgetType: 'checkout',\n\t\t\t\t\teventId: ${t},\n\t\t\t\t\tiframeContainerId: '${r}',\n\t\t\t\t});\n\t\t\t<\/script>\n\t\t\t<div id="${r}"></div>\n\t\t`;return(0,o.createElement)("div",{className:e},(0,o.createElement)(l.SandBox,{html:n}),(0,o.createElement)("div",{className:"block-library-embed__interactive-overlay"}))}render(){const{attributes:e}=this.props,{url:t,style:r}=e,{editingUrl:n,isResolvingUrl:a}=this.state;return a?this.renderLoading():n||!t||this.cannotEmbed()?this.renderEditEmbed():(0,o.createElement)(o.Fragment,null,this.renderInspectorControls(),(0,o.createElement)(i.BlockControls,null,(0,o.createElement)(g.J,{setEditingUrl:this.setEditingUrl})),"modal"===r?(0,o.createElement)(i.InnerBlocks,{template:[[v.Ss.name,v.Ss.attributes]],templateLock:"all"}):this.renderInlinePreview())}}const y=(0,l.withNotices)(k)},83772:(e,t,r)=>{"use strict";var n=r(31985),a=r(75334);(0,n.Z)(a.u2,a.Xd)},75334:(e,t,r)=>{"use strict";r.d(t,{Q7:()=>g,Ss:()=>p,Wh:()=>m,Xd:()=>k,qv:()=>v,u2:()=>f});var n=r(51806),a=r(4981),o=r(55609),s=r(65736),i=r(70355),l=r(2785),c=r(1344),u=r(16078),d=r(86435);const __=s.__,_x=s._x,p={name:"jetpack/button",attributes:{element:"a",text:_x("Register","verb: e.g. register for an event.","jetpack"),uniqueId:"eventbrite-widget-id"}},m=/^\s*https?:\/\/(?:www\.)?(?:eventbrite\.[a-z.]+)\/e\/[^\/]*?(\d+)\/?(?:\?[^\/]*)?\s*$/i,h=/^\s*https?:\/\/(?:.+\.)?(?:eventbrite\.[a-z.]+)\/?(?:\?[^\/]*)?\s*$/i,g="https://www.eventbrite.com/e/test-event-tickets-123456789",f="eventbrite",b=__("Eventbrite Checkout","jetpack"),v=(0,n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(o.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,n.createElement)(o.G,{id:"eventbrite-icon"},(0,n.createElement)(o.Path,{d:"M18.041,3.931L5.959,3C4.325,3,3,4.325,3,5.959v12.083C3,19.675,4.325,21,5.959,21l12.083-0.931C19.699,19.983,21,18.744,21,17.11V6.89C21,5.256,19.741,4.027,18.041,3.931zM16.933,8.17c-0.082,0.215-0.192,0.432-0.378,0.551c-0.188,0.122-0.489,0.132-0.799,0.132c-1.521,0-3.062-0.048-4.607-0.048c-0.152,0.708-0.304,1.416-0.451,2.128c0.932-0.004,1.873,0.005,2.81,0.005c0.726,0,1.462-0.069,1.586,0.525c0.04,0.189-0.001,0.426-0.052,0.615c-0.105,0.38-0.258,0.676-0.625,0.783c-0.185,0.054-0.408,0.058-0.646,0.058c-1.145,0-2.345,0.017-3.493,0.02c-0.169,0.772-0.328,1.553-0.489,2.333c1.57-0.005,3.067-0.041,4.633-0.058c0.627-0.007,1.085,0.194,1.009,0.85c-0.031,0.262-0.098,0.497-0.211,0.725c-0.102,0.208-0.248,0.376-0.488,0.452c-0.237,0.075-0.541,0.064-0.862,0.078c-0.304,0.014-0.614,0.008-0.924,0.016c-0.309,0.009-0.619,0.022-0.919,0.022c-1.253,0-2.429,0.08-3.683,0.073c-0.603-0.004-1.014-0.249-1.124-0.757c-0.059-0.273-0.018-0.58,0.036-0.841c0.541-2.592,1.083-5.176,1.629-7.763c0.056-0.265,0.114-0.511,0.225-0.714C9.279,7.051,9.534,6.834,9.9,6.735c0.368-0.099,0.883-0.047,1.344-0.047c0.305,0,0.612,0.008,0.914,0.016c0.925,0.026,1.817,0.03,2.747,0.053c0.304,0.007,0.615,0.016,0.915,0.016c0.621,0,1.17,0.073,1.245,0.614C17.104,7.675,17.014,7.954,16.933,8.17z"}))),k={title:b,description:__("Embed Eventbrite event details and ticket checkout.","jetpack"),icon:{src:v,foreground:(0,i.m)()},category:"embed",keywords:[_x("events","block search term","jetpack"),_x("tickets","block search term","jetpack")],supports:{html:!1,align:!0},attributes:l.Z,edit:u.Z,save:d.Z,transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&(m.test(e.textContent)||h.test(e.textContent)),transform:e=>(0,a.createBlock)("jetpack/eventbrite",{url:e.textContent.trim()})}]},example:{attributes:{url:g,eventId:123456789,style:"modal"},innerBlocks:[p]},deprecated:c.Z}},86435:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(52175);function o(e){let{attributes:t}=e;const{eventId:r,style:o,url:s}=t;if(r)return"modal"===o?(0,n.createElement)("div",null,(0,n.createElement)(a.InnerBlocks.Content,null)):s&&(0,n.createElement)("a",{className:"eventbrite__direct-link",href:s},s)}},77825:(e,t,r)=>{"use strict";r.d(t,{N3:()=>s,Ve:()=>i,qq:()=>l});var n=r(51806),a=r(4981),o=r(69307);function s(e,t){const r=(0,n.createElement)("a",{href:e},e);t((0,a.createBlock)("core/paragraph",{content:(0,o.renderToString)(r)}))}function i(e){if(!e)return null;const t=e.match(/(\d+)\/?(?:\?[^\/]*)?\s*$/);return t&&t[1]?parseInt(t[1],10):null}function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e&&"string"==typeof e?e.trim():null}},56071:(e,t,r)=>{"use strict";var n=r(51806),a=r(52175),o=r(55609),s=r(92694),i=r(65736),l=r(13306);const __=i.__,c=e=>{if(e.isDeprecation)return e;if("core/embed"!==e.name)return e;const{edit:t}=e;return{...e,edit:(0,o.withNotices)((e=>{const{noticeOperations:r,noticeUI:s,onReplace:i}=e,{url:c}=e.attributes,{isGatheringStorm:u,unleashStorm:d}=(0,l.Z)({onReplace:i});return"twitter"!==e.attributes.providerNameSlug?(0,n.createElement)(t,e):(0,n.createElement)(n.Fragment,null,s,(0,n.createElement)(a.BlockControls,null,(0,n.createElement)(o.ToolbarGroup,{className:"gathering-tweetstorms__embed-toolbar"},(0,n.createElement)(o.ToolbarButton,{className:"gathering-tweetstorms__embed-toolbar-button",onClick:()=>d(c,r),label:__("Import the entire Twitter thread directly into this post.","jetpack"),showTooltip:!0,disabled:u||!c},__("Unroll","jetpack")),u&&(0,n.createElement)(o.ToolbarItem,{as:o.Spinner}))),(0,n.createElement)(t,e))}))}};(0,s.addFilter)("blocks.registerBlockType","jetpack/gathering-tweetstorms",c)},13306:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(86989),a=r.n(n),o=r(4981),s=r(9818),i=r(69307),l=r(65736),c=r(96483),u=r(92819);const __=l.__;function d(e){let{onReplace:t}=e;const[r,n]=(0,i.useState)(!1),l=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("jetpack_publicize_connections")));return{isGatheringStorm:r,unleashStorm:(e,r)=>{if((0,u.isEmpty)(e))return;const i=e.match(/^https?:\/\/(?:www\.)?twitter\.com\/([^/]+)\/status\/\d+/);if((0,u.isEmpty)(i))return;const d=i[1];r.removeAllNotices(),n(!0),a()({path:(0,c.addQueryArgs)("/wpcom/v2/tweetstorm/gather",{url:e})}).then((e=>{if(n(!1),!(0,u.isArray)(e))return void r.createErrorNotice(__("An error occurred. Please try again later.","jetpack"));if((0,u.isEmpty)(e))return void r.createErrorNotice(__("We were unable to get any content from this tweet.","jetpack"));t(e.map((e=>{switch(e.type){case"paragraph":return(0,o.createBlock)("core/paragraph",{content:e.content});case"gallery":return(0,o.createBlock)("core/gallery",{images:e.images});case"image":return(0,o.createBlock)("core/image",{url:e.url,alt:e.alt});case"video":return(0,o.createBlock)("core/video",{src:e.url,caption:e.alt});case"embed":return(0,o.createBlock)("core/embed",{url:e.url})}})));(0,u.some)(l,(e=>"twitter"===e.service_name&&`@${d}`===e.display_name))||(0,s.dispatch)("core/notices").createWarningNotice(__("We were unable to verify that this Twitter thread was published on a Twitter account belonging to you. Please ensure you have permission to reproduce it before publishing.","jetpack")),(0,s.dispatch)("core/notices").createSuccessNotice(__("Twitter thread successfully imported","jetpack"),{type:"snackbar"})})).catch((e=>{n(!1),r.createErrorNotice(e.message)}))}}}},12084:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(55609),o=r(69307),s=r(65736);const __=s.__;const i=(0,o.forwardRef)((function(e,t){let{onSubmit:r,onChange:o,value:s=""}=e;return(0,n.createElement)("form",{className:"wp-block-jetpack-gif_input-container",onSubmit:r},(0,n.createElement)("input",{type:"text",className:"wp-block-jetpack-gif_input components-placeholder__input",placeholder:__("Enter search terms, e.g. cat…","jetpack"),value:s,onChange:o,ref:t,"aria-labelledby":"wp-block-jetpack-gif_search-button"}),(0,n.createElement)(a.Button,{id:"wp-block-jetpack-gif_search-button",variant:"secondary",type:"submit"},__("Search","jetpack")))}))},72844:(e,t,r)=>{"use strict";r.d(t,{U:()=>n});const n="t1PkR1Vq0mzHueIFBvZSZErgFs9NBmYW"},57852:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(52175),o=r(55609);function s(){return(0,n.createElement)(a.InspectorControls,null,(0,n.createElement)(o.PanelBody,{className:"components-panel__body-gif-branding"},(0,n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 202 22"},(0,n.createElement)(o.Path,{d:"M4.6 5.9H0v10h1.6v-3.1h3c4.8 0 4.8-6.9 0-6.9zm0 5.4h-3v-4h3c2.6.1 2.6 4 0 4zM51.2 12.3c2-.3 2.7-1.7 2.7-3.1 0-1.7-1.2-3.3-3.5-3.3h-4.6v10h1.6v-3.4h2.1l3 3.4h1.9l-.2-.3-3-3.3zM47.4 11V7.4h3c1.3 0 1.9.9 1.9 1.8s-.6 1.8-1.9 1.8h-3zM30.6 13.6L28 5.9h-1.1l-2.5 7.7-2.6-7.7H20l3.7 10H25l1.4-3.5L27.5 9l1.1 3.4 1.3 3.5h1.4l3.5-10h-1.7z"}),(0,n.createElement)(o.Path,{d:"M14.4 5.7c-3 0-5.1 2.2-5.1 5.2 0 2.6 1.6 5.1 5.1 5.1 3.5 0 5.1-2.5 5.1-5.2-.1-2.6-1.7-5.1-5.1-5.1zm-.1 8.9c-2.5 0-3.5-1.9-3.5-3.7 0-2.2 1.2-3.8 3.5-3.8 2.4 0 3.5 2 3.5 3.8.1 2-1 3.7-3.5 3.7zM57.7 11.6h5.5v-1.5h-5.5V7.4h5.7V5.9h-7.3v10h7.3v-1.6h-5.7zM38 14.3v-2.7h5.5v-1.5H38V7.4h5.7V5.9h-7.3v10h7.3v-1.6zM93 10.3l-2.7-4.4h-1.9V6l3.8 5.8v4.1h1.6v-4.1l4-5.8v-.1h-2zM69.3 5.9h-3.8v10h3.8c3.5 0 5.1-2.5 5-5.1-.1-2.5-1.6-4.9-5-4.9zm0 8.4h-2.2V7.4h2.2c2.3 0 3.4 1.7 3.4 3.4s-1 3.5-3.4 3.5zM86.3 10.7c.9-.4 1.4-1.1 1.4-2 0-2-1.5-2.8-3.4-2.8h-4.6v10h4.6c2 0 3.7-.7 3.7-2.8 0-.8-.5-2-1.7-2.4zm-5-3.4h3c1.2 0 1.8.7 1.8 1.4 0 .8-.6 1.3-1.8 1.3h-3V7.3zm3 7.1h-3v-2.9h3c.9 0 2.1.5 2.1 1.6 0 1-1.2 1.3-2.1 1.3zM113.9 13.3h5.3V16c-1.2.9-2.9 1.1-4 1.1-4.2 0-5.6-3.3-5.6-6 0-4.1 2.2-6.1 5.6-6.1 1.4 0 3.2.4 4.8 1.8l3.4-3.4C120.7.6 118.1 0 115.2 0c-7.8 0-11.4 5.6-11.4 11s3.1 10.9 11.4 10.9c4 0 7.6-1.4 8.9-4.1V8.6h-10.2v4.7zM171.9 8.5h-7.4V.6h-5.9v20.8h5.9v-7.8h7.4v7.8h5.9V.6h-5.9zM195.1.6l-4.5 7.1-4.3-7.1h-6.6v.2l7.9 12.3v8.3h5.9v-8.3L201.8.9V.6zM127.4.6h5.9v20.8h-5.9zM147.6.6h-10.1v20.8h5.9v-5.6h4.2c5.6-.1 8.3-3.4 8.3-7.6.1-4.1-2.7-7.6-8.3-7.6zm0 10.2h-4.2V5.6h4.2c1.6 0 2.5 1.2 2.5 2.6 0 1.4-.9 2.6-2.5 2.6z"}))))}},61266:(e,t,r)=>{"use strict";r.d(t,{Z:()=>g});var n=r(51806),a=r(52175),o=r(55609),s=r(69307),i=r(65736),l=r(65235),c=r.n(l),u=r(12084),d=r(57852),p=r(27147),m=r(80163),h=r(25073);const __=i.__;const g=function(e){let{attributes:t,setAttributes:r,className:i,isSelected:l}=e;const{align:g,caption:f,giphyUrl:b,searchText:v,paddingTop:k}=t,y=c()(i,`align${g}`),[E,w]=(0,s.useState)(!1),_=(0,s.createRef)(),{isFetching:C,giphyData:j,fetchGiphyData:S}=(0,p.Z)(),x=()=>{_.current.focus(),w(!1)};(0,s.useEffect)((()=>{j&&j[0]&&r((0,m.ix)(j[0]))}),[j,r]);const P=e=>{e.preventDefault(),t.searchText&&!C&&S((0,m.Gr)(t.searchText))},T=e=>r({searchText:e.target.value});return(0,n.createElement)("div",{className:y},(0,n.createElement)(d.Z,null),b?(0,n.createElement)("figure",null,l&&(0,n.createElement)(u.Z,{onSubmit:P,onChange:T,value:v,ref:_}),l&&j&&j.length>1&&(0,n.createElement)("div",{className:"wp-block-jetpack-gif_thumbnails-container"},j.map((e=>{const t={backgroundImage:`url(${e.images.downsized_still.url})`};return(0,n.createElement)("button",{className:"wp-block-jetpack-gif_thumbnail-container",key:e.id,onClick:t=>{t.preventDefault(),(e=>{r((0,m.ix)(e))})(e)},style:t})}))),(0,n.createElement)("div",{className:"wp-block-jetpack-gif-wrapper",style:{paddingTop:k}},(0,n.createElement)("div",{className:"wp-block-jetpack-gif_cover",onClick:x,onKeyDown:x,role:"button",tabIndex:"0"}),(0,n.createElement)("iframe",{src:b,title:v})),(!a.RichText.isEmpty(f)||l)&&!!b&&(0,n.createElement)(a.RichText,{className:"wp-block-jetpack-gif-caption gallery-caption",inlineToolbar:!0,isSelected:E,onFocus:()=>w(!1),onChange:e=>r({caption:e}),placeholder:__("Write caption…","jetpack"),tagName:"figcaption",value:f})):(0,n.createElement)(o.Placeholder,{className:"wp-block-jetpack-gif_placeholder",icon:h.qv,label:h.TN,instructions:__("Search for a term or paste a Giphy URL","jetpack")},(0,n.createElement)(u.Z,{onSubmit:P,onChange:T,value:v,ref:_})))}},63139:(e,t,r)=>{"use strict";var n=r(31985),a=r(25073);(0,n.Z)(a.u2,a.Xd)},27147:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(69307);const a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const[t,r]=(0,n.useState)(!1),[a,o]=(0,n.useState)(e),[s,i]=(0,n.useState)("");return(0,n.useEffect)((()=>{if(!s)return;(async()=>{r(!0);const e=await fetch(s).then((e=>!!e.ok&&e)).catch((()=>!1));if(e){const t=await e.json(),r=void 0!==t.data.images?[t.data]:t.data;r[0].images&&o(r)}r(!1)})()}),[s]),{isFetching:t,giphyData:a,fetchGiphyData:i}}},25073:(e,t,r)=>{"use strict";r.d(t,{TN:()=>c,Xd:()=>d,qv:()=>u,u2:()=>l});var n=r(51806),a=r(55609),o=r(65736),s=r(70355),i=r(61266);const __=o.__,_x=o._x,l="gif",c=__("GIF","jetpack"),u=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,n.createElement)(a.Path,{d:"M18 13v7H4V6h5.02c.05-.71.22-1.38.48-2H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-5l-2-2zm-1.5 5h-11l2.75-3.53 1.96 2.36 2.75-3.54L16.5 18zm2.8-9.11c.44-.7.7-1.51.7-2.39C20 4.01 17.99 2 15.5 2S11 4.01 11 6.5s2.01 4.5 4.49 4.5c.88 0 1.7-.26 2.39-.7L21 13.42 22.42 12 19.3 8.89zM15.5 9C14.12 9 13 7.88 13 6.5S14.12 4 15.5 4 18 5.12 18 6.5 16.88 9 15.5 9z"})),d={title:c,icon:{src:u,foreground:(0,s.m)()},category:"embed",keywords:[_x("animated","block search term","jetpack"),_x("giphy","block search term","jetpack"),_x("image","block search term","jetpack")],description:__("Search for and insert an animated image.","jetpack"),attributes:{align:{type:"string",default:"center"},caption:{type:"string"},giphyUrl:{type:"string"},searchText:{type:"string"},paddingTop:{type:"string",default:"56.2%"}},supports:{html:!1,align:!0},edit:i.Z,save:()=>null,example:{attributes:{align:"center",giphyUrl:"https://giphy.com/embed/fxKWgoOG9hzPPkE1oc",paddingTop:"100%",searchText:"WordPress"}}}},80163:(e,t,r)=>{"use strict";r.d(t,{Gr:()=>a,ix:()=>i});var n=r(72844);const a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=null;e=e.trim();const r=e.match(/^https?:\/\/(media\.|i\.)?giphy\.com\/(embed|gifs|media)?\/?([-\w]*)(\/giphy)?(\.gif)?$/);return r&&r[3]&&(t=function(){let e=arguments.length>1?arguments[1]:void 0;const t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(e);return t[t.length-1]}(r[3],"-")),t?`https://api.giphy.com/v1/gifs/${encodeURIComponent(t)}?api_key=${encodeURIComponent(n.U)}`:(e=>`https://api.giphy.com/v1/gifs/search?q=${encodeURIComponent(e)}&api_key=${encodeURIComponent(n.U)}&limit=10`)(e)},o=e=>`${Math.floor(e.images.original.height/e.images.original.width*100)}%`,s=e=>e?.embed_url,i=e=>({giphyUrl:s(e),paddingTop:o(e)})},4966:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(55609),o=r(65736);const __=o.__,_x=o._x,s=e=>{const{className:t,embedValue:r,onChange:o,onSubmit:s}=e;return(0,n.createElement)(a.PanelBody,{title:__("Calendar settings","jetpack"),initialOpen:!1},(0,n.createElement)("form",{onSubmit:s,className:t},(0,n.createElement)("textarea",{type:"text",value:r,className:"components-placeholder__input","aria-label":__("Google Calendar URL or iframe","jetpack"),placeholder:__("Enter URL or iframe to embed here…","jetpack"),onChange:o}),(0,n.createElement)(a.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack"))))}},81907:(e,t,r)=>{"use strict";r.d(t,{Z:()=>g});var n=r(51806),a=r(13419),o=r(52175),s=r(4981),i=r(55609),l=r(94333),c=r(69307),u=r(65736),d=r(90162),p=r(4966),m=r(47875),h=r(4525);const __=u.__,_x=u._x;const g=(0,l.compose)(i.withNotices,(0,d.withViewportMatch)({isMobile:"< small"}))((function(e){const{attributes:{url:t,height:r},className:l,isMobile:u,isSelected:d,name:g,noticeOperations:f,noticeUI:b,setAttributes:v}=e,[k,y]=(0,c.useState)(t||""),[E,w]=(0,c.useState)(!1),[_,C]=(0,c.useState)(!1);(0,c.useEffect)((()=>{!d&&_&&C(!1)}),[d,_]);const j=()=>{C(!0)},S=e=>{e&&e.preventDefault();const t=(0,h.L7)(k.trim());if(!h.Wh.test(t.url))return f.removeAllNotices(),void f.createErrorNotice(__("Your calendar couldn't be embedded. Please double check your URL or Embed Code. Please note, you need to use the 'Public URL' or 'Embed Code', the 'Shareable Link' will not work.","jetpack"));v(t),w(!1),f.removeAllNotices()},x=(0,s.getBlockDefaultClassName)(g),P=`<iframe src="${t}" style="border:0" scrolling="no" frameborder="0" height="${u?"300":r}"></iframe>`,T=(0,n.createElement)(i.ExternalLink,{href:"https://en.support.wordpress.com/google-calendar/"},__("Enable Permissions for the calendar you want to share","jetpack")),L=(0,n.createElement)(o.InspectorControls,null,(0,n.createElement)(p.Z,{className:`${x}-embed-form-sidebar`,embedValue:k,onChange:e=>y(e.target.value),onSubmit:S}));if(E||!t){const e=(0,a.Wp)()||(0,a.Ug)()?"https://en.support.wordpress.com/wordpress-editor/blocks/google-calendar/":"https://jetpack.com/support/jetpack-blocks/google-calendar/";return(0,n.createElement)("div",{className:l},L,(0,n.createElement)(i.Placeholder,{className:l,label:__("Google Calendar","jetpack"),icon:m.Z,instructions:(0,n.createElement)("ol",{className:`${x}-placeholder-instructions`},(0,n.createElement)("li",null,T),(0,n.createElement)("li",null,__("Paste the embed code you copied from your Google Calendar below","jetpack"))),notices:b},(N=`${x}-embed-form-editor`,(0,n.createElement)("form",{onSubmit:S,className:N},(0,n.createElement)("textarea",{type:"text",value:k,className:"components-placeholder__input","aria-label":__("Google Calendar URL or iframe","jetpack"),placeholder:__("Enter URL or iframe to embed here…","jetpack"),onChange:e=>y(e.target.value)}),(0,n.createElement)(i.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))),(0,n.createElement)("div",{className:`${x}-placeholder-links`},(0,n.createElement)(i.ExternalLink,{href:e},__("Learn more","jetpack")))))}var N;return(0,n.createElement)("div",{className:l},L,(0,n.createElement)("div",null,(0,n.createElement)(i.SandBox,{html:P,onFocus:j}),!_&&(0,n.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:j})))}))},58710:(e,t,r)=>{"use strict";var n=r(31985),a=r(13839);(0,n.Z)(a.u2,a.Xd)},47875:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(55609);const o=(0,n.createElement)(a.SVG,{height:"23",viewBox:"0 0 24 23",width:"24",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(a.Path,{d:"M19.5,23h-15c-2.2,0-4-1.8-4-4V4c0-2.2,1.8-4,4-4h15c2.2,0,4,1.8,4,4v15C23.5,21.2,21.7,23,19.5,23z M4.5,2 c-1.1,0-2,0.9-2,2v15c0,1.1,0.9,2,2,2h15c1.1,0,2-0.9,2-2V4c0-1.1-0.9-2-2-2H4.5z M6.9,3.9L6.9,3.9c0.5,0,0.9,0.4,0.9,0.9V5 c0,0.5-0.4,0.9-0.9,0.9l0,0C6.5,5.9,6.1,5.5,6.1,5V4.7C6.1,4.3,6.5,3.9,6.9,3.9z M17,3.9L17,3.9c0.5,0,0.9,0.4,0.9,0.9V5 c0,0.5-0.4,0.9-0.9,0.9l0,0c-0.5,0-0.9-0.4-0.9-0.9V4.7C16.2,4.3,16.5,3.9,17,3.9z M8.8,17.6c1.8,0,3.2-1,3.2-2.4 c0-1.1-0.7-1.8-1.8-1.9v-0.1c0.9-0.2,1.5-0.9,1.5-1.8c0-1.3-1.2-2.2-2.9-2.2c-1.8,0-2.9,1-3,2.5h1.6c0-0.7,0.6-1.1,1.4-1.1 c0.8,0,1.3,0.4,1.3,1.1c0,0.7-0.5,1.1-1.3,1.1h-1v1.3h1c0.9,0,1.5,0.4,1.5,1.1c0,0.7-0.6,1.2-1.4,1.2c-0.9,0-1.4-0.4-1.5-1.1H5.7 C5.8,16.6,7,17.6,8.8,17.6z M17.6,17.4V9.3h-1.7l-2.1,1.4v1.6l2-1.4h0.1v6.4H17.6z"}))},13839:(e,t,r)=>{"use strict";r.d(t,{Xd:()=>d,u2:()=>u});var n=r(51806),a=r(4981),o=r(65736),s=r(70355),i=r(81907),l=r(47875),c=r(4525);const __=o.__,_x=o._x,u="google-calendar",d={title:__("Google Calendar","jetpack"),description:__("Embed a Google Calendar","jetpack"),keywords:[_x("events","block search term","jetpack"),_x("dates","block search term","jetpack"),_x("schedule","block search term","jetpack"),_x("appointments","block search term","jetpack")],icon:{src:l.Z,foreground:(0,s.m)()},category:"embed",supports:{align:!0,alignWide:!0,html:!1},attributes:{url:{type:"string"},height:{type:"integer",default:600}},edit:i.Z,save:e=>{let{attributes:{url:t}}=e;return(0,n.createElement)("a",{href:t},t)},transforms:{from:[{type:"shortcode",tag:"googleapps",isMatch:function(e){return"calendar"===e.named.domain},attributes:{url:{type:"string",shortcode:e=>{let{named:{domain:t,dir:r,query:n}}=e;return`https://${t}.google.com/${r}?${n}`}}}},{type:"raw",isMatch:e=>"P"===e.nodeName&&c.Wh.test(e.textContent),transform:e=>(0,a.createBlock)("jetpack/google-calendar",{url:e.textContent.trim()})},{type:"raw",isMatch:e=>"FIGURE"===e.nodeName&&c.E6.test(e.innerHTML),transform:e=>{const{url:t,height:r}=(0,c.jj)(e.innerHTML.trim());return(0,a.createBlock)("jetpack/google-calendar",{url:t,height:r})}}]},example:{attributes:{url:"https://calendar.google.com/calendar/embed?src=jb4bu80jirp0u11a6niie21pp4%40group.calendar.google.com&ctz=America/New_York"}}}},4525:(e,t,r)=>{"use strict";r.d(t,{E6:()=>o,L7:()=>u,Wh:()=>a,jj:()=>c});const n="s*https?://calendar.google.com/calendar",a=new RegExp(`^${n}`,"i"),o=new RegExp(`<iframe((?:\\s+\\w+=(['"]).*?\\2)*)\\s+src=(["'])(${n}.*?)\\3((?:\\s+\\w+=(['"]).*?\\6)*)`,"i"),s=new RegExp(`${n}\\?cid=([-A-Za-z0-9+/]+={0,3})`,"i"),i=/\s+(\w+)=(["'])(.*?)\2/gi;function l(e){const t=s.exec(e);if(t)return"https://calendar.google.com/calendar/embed?src="+encodeURIComponent(atob(t[1]))}function c(e){const t=o.exec(e);if(!t)return;const r={};return t.forEach(((e,t)=>{if(0===t)return;if(a.test(e))return void(r.url=e);let n;for(;null!==(n=i.exec(e));)r[n[1]]=n[3]})),{url:r.url,width:r.width,height:r.height}}function u(e){return o.test(e)?c(e):s.test(e)?{url:l(e)}:{url:e}}},76579:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(55609),o=r(65736);const __=o.__;function s(e){let{attributes:t,setAttributes:r}=e;const{orientation:o}=t;return(0,n.createElement)(a.PanelBody,{title:__("Orientation","jetpack")},(0,n.createElement)(a.RadioControl,{selected:o||"horizontal",options:[{label:__("Side by side","jetpack"),value:"horizontal"},{label:__("Above and below","jetpack"),value:"vertical"}],onChange:e=>r({orientation:e})}))}},63157:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(51806),a=r(52175),o=r(55609),s=r(94333),i=r(69307),l=r(65736),c=r(13369),u=r(76579),d=r(86504),p=r(37879);r(8503);const __=l.__,m=e=>{let{attributes:t,className:r,clientId:l,isSelected:m,setAttributes:h}=e;const{align:g,imageBefore:f,imageAfter:b,caption:v,orientation:k}=t;let y=null,E=null;const w=(0,i.useRef)();s.useResizeObserver&&([y,E]=(0,s.useResizeObserver)(),(0,p.Z)((e=>{e>0&&"undefined"!=typeof juxtapose&&juxtapose.sliders&&juxtapose.sliders.forEach((t=>{t.wrapper.parentElement.id===l&&t.optimizeWrapper(e)}))}),200,E.width));const _=f&&f.url&&b&&b.url?"image-compare__comparison juxtapose":"image-compare__placeholder";return(0,i.useLayoutEffect)((()=>{f.url&&b.url&&"undefined"!=typeof juxtapose&&juxtapose.makeSlider(w?.current)}),[g,f,b,k]),(0,n.createElement)("figure",{className:r,id:l},y,(0,n.createElement)(a.InspectorControls,{key:"controls"},(0,n.createElement)(u.Z,{attributes:t,setAttributes:h})),(0,n.createElement)("div",{ref:w,className:_,"data-mode":k||"horizontal"},(0,n.createElement)(o.Placeholder,{label:null},(0,n.createElement)("div",{className:"image-compare__image-before"},(0,n.createElement)(d.Z,{image:{id:f.id,url:f.url,alt:f.alt},placeHolderLabel:__("Image before","jetpack"),onChange:e=>{if("image"===e.media_type||"image"===e.type){var t,r;const{src:n}=(0,c.z)(e),{alt:a,id:o,media_details:s}=e,i=null!==(t=s?.width)&&void 0!==t?t:e.width,l=null!==(r=s?.height)&&void 0!==r?r:e.height;h({imageBefore:{id:o,url:n||e.url,alt:a,width:i,height:l}})}}})),(0,n.createElement)("div",{className:"image-compare__image-after"},(0,n.createElement)(d.Z,{image:{id:b.id,url:b.url,alt:b.alt},placeHolderLabel:__("Image after","jetpack"),onChange:e=>{if("image"===e.media_type||"image"===e.type){var t,r;const{src:n}=(0,c.z)(e),{alt:a,id:o,media_details:s}=e,i=null!==(t=s?.width)&&void 0!==t?t:e.width,l=null!==(r=s?.height)&&void 0!==r?r:e.height;h({imageAfter:{id:o,url:n||e.url,alt:a,width:i,height:l}})}}})))),(!a.RichText.isEmpty(v)||m&&f.url&&b.url)&&(0,n.createElement)(a.RichText,{tagName:"figcaption",placeholder:__("Write caption","jetpack"),value:v,onChange:e=>h({caption:e}),inlineToolbar:!0}))}},93052:(e,t,r)=>{"use strict";var n=r(31985),a=r(94039);(0,n.Z)(a.u,a.X)},17990:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(55609);const o=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M21 4h-6v1.5h6c.3 0 .5.2.5.5v.4l-3.6 3.5L15 8.1v1.8l2.6 1.7c.1.1.3.1.4.1.2 0 .4-.1.5-.2l3-2.9V18c0 .3-.2.5-.5.5h-6V20h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM1 6v12c0 1.1.9 2 2 2h10.5V4H3c-1.1 0-2 .9-2 2zm11 12.5H3c-.3 0-.5-.2-.5-.5v-1.4L5 14.7l1.5-1.1.1-.1 3 1.9c.1.1.3.1.4.1.2 0 .4-.1.5-.2L12 14v4.5zm0-6.6l-2.1 2L7 12c-.1-.1-.3-.1-.4-.1h-.1c-.1 0-.3.1-.4.1l-1.1.9-2.5 1.8V6c0-.3.2-.5.5-.5h9v6.4z"}))},86504:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(52175),o=r(55609),s=r(94333),i=r(69307);const l=(0,s.compose)([o.withNotices])((e=>{const{image:t,noticeOperations:r,noticeUI:o,onChange:s,placeHolderLabel:l}=e,c=(0,n.createElement)("img",{id:t.id,src:t.url,alt:t.alt}),u=(0,n.createElement)(i.Fragment,null,(0,n.createElement)(a.MediaPlaceholder,{labels:{title:l},accept:"image/*",allowedTypes:["image"],onSelect:s,onError:e=>r.createErrorNotice(e),notices:o}));return t&&t.url?c:u}))},94039:(e,t,r)=>{"use strict";r.d(t,{X:()=>p,u:()=>d});var n=r(65736),a=r(70355),o=r(5820),s=r(63157),i=r(17990),l=r(90767),c=r(58632),u=r(25250);const __=n.__,_x=n._x,d="image-compare",p={title:__("Image Compare","jetpack"),description:__("Compare two images with a slider. Works best with images of the same size.","jetpack"),icon:{src:i.Z,foreground:(0,a.m)()},category:(0,o.Z)("media","layout"),keywords:[_x("juxtapose","block search term","jetpack"),_x("photos","block search term","jetpack"),_x("pictures","block search term","jetpack"),_x("side by side","block search term","jetpack"),_x("slider","block search term","jetpack")],supports:{align:["wide","full"]},attributes:{imageBefore:{type:"object",default:{}},imageAfter:{type:"object",default:{}},caption:{type:"string"},orientation:{type:"string",default:"horizontal"}},example:{attributes:{imageBefore:{id:1,url:c,alt:__("Before","jetpack")},imageAfter:{id:2,url:l,alt:__("After","jetpack")},caption:__("Example image","jetpack")}},edit:s.Z,save:u.Z}},25250:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(52175);const o=e=>{let{attributes:t,className:r}=e;const{imageBefore:o,imageAfter:s,caption:i,orientation:l}=t;return(0,n.createElement)("figure",{className:r},(0,n.createElement)("div",{className:"juxtapose","data-mode":l||"horizontal"},(0,n.createElement)("img",{id:o.id,src:o.url,alt:o.alt,width:o.width,height:o.height,className:"image-compare__image-before"}),(0,n.createElement)("img",{id:s.id,src:s.url,alt:s.alt,width:s.width,height:s.height,className:"image-compare__image-after"})),!a.RichText.isEmpty(i)&&(0,n.createElement)(a.RichText.Content,{tagName:"figcaption",value:i}))}},37879:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(69307);const a=(e,t,r)=>{(0,n.useEffect)((()=>{const n=setTimeout((()=>e(r)),t);return()=>clearTimeout(n)}),[r])}},8503:(e,t,r)=>{"use strict";var n=r(47701);r.n(n)()((function(){const e={sliders:[],OPTIMIZATION_ACCEPTED:1,OPTIMIZATION_WAS_CONSTRAINED:2};function t(e,t){const r=this;this.image=new Image,this.loaded=!1,this.image.onload=function(){r.loaded=!0,t._onLoaded()},this.image.src=e.src,this.image.alt=e.alt||"",this.label=e.label||!1}function r(e,t){e&&e.classList.add(t)}function n(e,t){e&&e.classList.remove(t)}function a(e){return{width:parseInt(window.getComputedStyle(e).width,10),height:parseInt(window.getComputedStyle(e).height,10)}}function o(e,t){let r;if("string"==typeof t||"number"==typeof t)r=parseInt(t,10);else{const n=e.getBoundingClientRect(),a={top:n.top+document.body.scrollTop+document.documentElement.scrollTop,left:n.left+document.body.scrollLeft+document.documentElement.scrollLeft},o=e.offsetWidth;r=(function(e){let t;return t=e.pageX?e.pageX:e.touches?e.touches[0].pageX:e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,t}(t)-a.left)/o*100}return r}function s(e,t,r){let n;if("string"==typeof t||"number"==typeof t)n=parseInt(t,10);else{const a=e.getBoundingClientRect(),o={top:a.top+r.body.scrollTop+r.documentElement.scrollTop,left:a.left+r.body.scrollLeft+r.documentElement.scrollLeft},s=e.offsetHeight;n=(function(e){let t;return t=e.pageY?e.pageY:e.touches?e.touches[0].pageY:e.clientY+document.body.scrollTop+document.documentElement.scrollTop,t}(t)-o.top)/s*100}return n}const i={animate:!0,showLabels:!0,makeResponsive:!0};function l(e,r,n){let a;for(a in this.element=e,this.options={animate:!0,showLabels:!0,makeResponsive:!0,startingPosition:"50%",mode:"horizontal",callback:null},this.options)a in n&&(this.options[a]=a in i?"string"!=typeof(o=n[a])?Boolean(o):!("false"===o||""===o):n[a]);var o;2===r.length&&(this.imgBefore=new t(r[0],this),this.imgAfter=new t(r[1],this))}l.prototype={updateSlider:function(e,t){let a;a="vertical"===this.options.mode?s(this.slider,e,this.sliderParentDocument):o(this.slider,e),a=a.toFixed(2)+"%";const i=parseFloat(a),l=100-i+"%";i>0&&i<100&&(n(this.handle,"transition"),n(this.rightImage,"transition"),n(this.leftImage,"transition"),this.options.animate&&t&&(r(this.handle,"transition"),r(this.leftImage,"transition"),r(this.rightImage,"transition")),"vertical"===this.options.mode?(this.handle.style.top=a,this.leftImage.style.height=a,this.rightImage.style.height=l):(this.handle.style.left=a,this.leftImage.style.width=a,this.rightImage.style.width=l),this.sliderPosition=a)},getPosition:function(){return this.sliderPosition},displayLabel:function(e,t){const r=document.createElement("div");r.className="jx-label",r.setAttribute("tabindex",0),function(e,t){document.body.textContent?e.textContent=t:e.innerText=t}(r,t),e.appendChild(r)},setStartingPosition:function(e){this.options.startingPosition=e},calculateDims:function(e,t){const r=(n=this.imgBefore.image,{width:n.naturalWidth,height:n.naturalHeight,aspect:function(){return this.width/this.height}}).aspect();var n;return e?t=e/r:t&&(e=t*r),{width:e,height:t,ratio:r}},responsivizeIframe:function(e){return e.height<window.innerHeight?e.ratio>=1&&(this.wrapper.style.paddingTop=parseInt((window.innerHeight-e.height)/2)+"px"):e.height>window.innerHeight&&(e=this.calculateDims(0,window.innerHeight),this.wrapper.style.paddingLeft=parseInt((window.innerWidth-e.width)/2)+"px"),e},setWrapperDimensions:function(){const e=a(this.wrapper.parentNode).width,t=a(this.wrapper.parentNode).height;let r=this.calculateDims(e,t);window.location===window.parent.location||this.options.makeResponsive||(r=this.responsivizeIframe(r)),this.wrapper.style.height=parseInt(r.height)+"px",this.wrapper.style.width=parseInt(r.width)+"px"},optimizeWrapper:function(t){let r=e.OPTIMIZATION_ACCEPTED;return this.imgBefore.image.naturalWidth>=t&&this.imgAfter.image.naturalWidth>=t?(this.wrapper.style.width=t+"px",r=e.OPTIMIZATION_WAS_CONSTRAINED):this.imgAfter.image.naturalWidth<t?this.wrapper.style.width=this.imgAfter.image.naturalWidth+"px":this.wrapper.style.width=this.imgBefore.image.naturalWidth+"px",this.setWrapperDimensions(),r},_onLoaded:function(){if(this.imgBefore&&!0===this.imgBefore.loaded&&this.imgAfter&&!0===this.imgAfter.loaded){if(this.wrapper=this.element,!this.wrapper||this.wrapper.querySelector(".jx-slider"))return;r(this.wrapper,"juxtapose"),this.wrapper.style.width=this.imgBefore.image.naturalWidth,this.setWrapperDimensions(),this.slider=document.createElement("div"),this.slider.className="jx-slider",this.wrapper.appendChild(this.slider),this.sliderParentDocument=this.wrapper.ownerDocument,"horizontal"!==this.options.mode&&r(this.slider,this.options.mode),this.handle=document.createElement("div"),this.handle.className="jx-handle",this.rightImage=document.createElement("div"),this.rightImage.className="jx-image jx-right",this.rightImage.appendChild(this.imgAfter.image),this.leftImage=document.createElement("div"),this.leftImage.className="jx-image jx-left",this.leftImage.appendChild(this.imgBefore.image),this.slider.appendChild(this.handle),this.slider.appendChild(this.leftImage),this.slider.appendChild(this.rightImage),this.leftArrow=document.createElement("div"),this.rightArrow=document.createElement("div"),this.control=document.createElement("div"),this.controller=document.createElement("div"),this.leftArrow.className="jx-arrow jx-left",this.rightArrow.className="jx-arrow jx-right",this.control.className="jx-control",this.controller.className="jx-controller",this.controller.setAttribute("tabindex",0),this.controller.setAttribute("role","slider"),this.controller.setAttribute("aria-valuenow",50),this.controller.setAttribute("aria-valuemin",0),this.controller.setAttribute("aria-valuemax",100),this.controller.setAttribute("aria-label",window.imageCompareHandle?.msg||"Slide to compare images"),this.handle.appendChild(this.leftArrow),this.handle.appendChild(this.control),this.handle.appendChild(this.rightArrow),this.control.appendChild(this.controller),this._init()}},_init:function(){this.updateSlider(this.options.startingPosition,!1),!0===this.options.showLabels&&(this.imgBefore.label&&this.displayLabel(this.leftImage,this.imgBefore.label),this.imgAfter.label&&this.displayLabel(this.rightImage,this.imgAfter.label));const t=this;window.addEventListener("resize",(function(){t.setWrapperDimensions()})),this.slider.addEventListener("mousedown",(function(e){e.preventDefault(),t.updateSlider(e,!0);let r=!0;this.addEventListener("mousemove",(function(e){e.preventDefault(),r&&t.updateSlider(e,!1)})),this.addEventListener("mouseup",(function(e){e.preventDefault(),e.stopPropagation(),r=!1}))})),this.slider.addEventListener("touchstart",(function(e){e.preventDefault(),e.stopPropagation(),t.updateSlider(e,!0),this.addEventListener("touchmove",(function(e){e.preventDefault(),e.stopPropagation(),t.updateSlider(e,!1)}))})),this.handle.addEventListener("keydown",(function(e){const r=e.which||e.keyCode;let n=parseFloat(this.style.left);if(37===r){n-=1;const e=parseFloat(this.style.left)-1;t.updateSlider(e,!1),t.controller.setAttribute("aria-valuenow",n)}if(39===r){n+=1;const e=parseFloat(this.style.left)+1;t.updateSlider(e,!1),t.controller.setAttribute("aria-valuenow",n)}})),this.leftImage.addEventListener("keydown",(function(e){const r=e.which||e.keyCode;13!==r&&32!==r||(t.updateSlider("90%",!0),t.controller.setAttribute("aria-valuenow",91))})),this.rightImage.addEventListener("keydown",(function(e){const r=e.which||e.keyCode;13!==r&&32!==r||(t.updateSlider("10%",!0),t.controller.setAttribute("aria-valuenow",10))})),e.sliders.push(this),this.options.callback&&"function"==typeof this.options.callback&&this.options.callback(this)}},e.makeSlider=function(t,n){void 0===n&&(n=e.sliders.length);const a=t,o=a.querySelectorAll("img");if(o.length<2)return;const s={};a.getAttribute("data-animate")&&(s.animate=a.getAttribute("data-animate")),a.getAttribute("data-showlabels")&&(s.showLabels=a.getAttribute("data-showlabels")),a.getAttribute("data-startingposition")&&(s.startingPosition=a.getAttribute("data-startingposition")),a.getAttribute("data-mode")&&(s.mode=a.getAttribute("data-mode")),a.getAttribute("data-makeresponsive")&&(s.mode=a.getAttribute("data-makeresponsive"));return r(t,"juxtapose-"+n),a.innerHTML?a.innerHTML="":a.innerText="",new e.JXSlider(t,[{src:o[0].src,label:o[0].getAttribute("data-label"),alt:o[0].alt},{src:o[1].src,label:o[1].getAttribute("data-label"),alt:o[1].alt}],s)},e.scanPage=function(){const t=document.querySelectorAll(".juxtapose");for(let r=0;r<t.length;r++)e.makeSlider(t[r],r)},e.JXSlider=l,window.juxtapose=e,e.scanPage()}))},8979:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={accessToken:{type:"string"},instagramUser:{type:"string"},columns:{type:"number",default:3,min:1,max:6},count:{type:"number",default:9,min:1,max:30},spacing:{type:"number",default:10,min:0,max:50},isStackedOnMobile:{type:"boolean",default:!0}}},696:(e,t,r)=>{"use strict";r.d(t,{D:()=>a,u:()=>n});const n=30,a="jetpack-new-instagram-connection"},64129:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(55609),o=r(65736),s=r(696);const __=o.__,_n=o._n;function i(e){let{accountImageTotal:t,attributes:r,currentUserConnected:i,disconnectFromService:l,shouldRenderSidebarNotice:c,setAttributes:u}=e;const{accessToken:d,columns:p,count:m,instagramUser:h,isStackedOnMobile:g,spacing:f}=r;return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(a.PanelBody,{title:__("Account Settings","jetpack")},(0,n.createElement)(a.PanelRow,null,(0,n.createElement)("span",null,__("Account","jetpack")),(0,n.createElement)(a.ExternalLink,{href:`https://www.instagram.com/${h}/`},"@",h)),i&&(0,n.createElement)(a.PanelRow,null,(0,n.createElement)(a.Button,{isDestructive:!0,variant:"link",onClick:()=>l(d)},__("Disconnect your account","jetpack")))),(0,n.createElement)(a.PanelBody,{title:__("Display Settings","jetpack")},c?(()=>{const e=t?(0,o.sprintf)(/* translators: placeholder is a number. */
_n("There is currently only %s post in your Instagram account.","There are currently only %s posts in your Instagram account.",t,"jetpack"),t):__("There are currently no posts in your Instagram account.","jetpack");return(0,n.createElement)("div",{className:"wp-block-jetpack-instagram-gallery__count-notice"},(0,n.createElement)(a.Notice,{isDismissible:!1,status:"info"},e))})():null,(0,n.createElement)(a.RangeControl,{label:__("Number of Posts","jetpack"),value:m,onChange:e=>u({count:e}),min:1,max:s.u}),(0,n.createElement)(a.RangeControl,{label:__("Number of Columns","jetpack"),value:p,onChange:e=>u({columns:e}),min:1,max:6}),(0,n.createElement)(a.RangeControl,{label:__("Image Spacing (px)","jetpack"),value:f,onChange:e=>u({spacing:e}),min:0,max:50}),(0,n.createElement)(a.ToggleControl,{label:__("Stack on mobile","jetpack"),checked:g,onChange:()=>u({isStackedOnMobile:!g})})))}},36420:(e,t,r)=>{"use strict";r.d(t,{Z:()=>y});var n=r(51806),a=r(13419),o=r(52175),s=r(55609),i=r(69307),l=r(65736),c=r(65235),u=r.n(c),d=r(92819),p=r(4554),m=r(8979),h=r(696),g=r(64129),f=r(44961),b=r(79236),v=r(2681),k=r(75412);const __=l.__,y=(0,s.withNotices)((e=>{const{attributes:t,className:r,isSelected:l,noticeOperations:c,noticeUI:y,setAttributes:E}=e,{accessToken:w,align:_,columns:C,count:j,isStackedOnMobile:S,spacing:x}=t;(0,i.useEffect)((()=>{const e=(0,p.S)(m.Z,t);(0,d.isEqual)(e,t)||E(e)}),[t,E]);const[P,T]=(0,i.useState)(w),{isRequestingWpcomConnectUrl:L,wpcomConnectUrl:N}=(0,v.Z)(),{images:A,isLoadingGallery:R,setImages:I}=(0,k.Z)({accessToken:w,noticeOperations:c,setAttributes:E,setSelectedAccount:T}),{connectToService:M,disconnectFromService:Z,isConnecting:B,isRequestingUserConnections:D,userConnections:F}=(0,b.Z)({accessToken:w,noticeOperations:c,selectedAccount:P,setAttributes:E,setImages:I,setSelectedAccount:T}),z=(0,a.Dp)(),O=j>A.length?A.length:j,U=!R&&(!w||(0,d.isEmpty)(A)),H=!U,V=w&&R&&(0,d.isEmpty)(A),G=!U&&!V,q=u()(r,{[`align${_}`]:_}),$=u()("wp-block-jetpack-instagram-gallery__grid",`wp-block-jetpack-instagram-gallery__grid-columns-${C}`,{"is-stacked-on-mobile":S}),W={gridGap:x,"--latest-instagram-posts-spacing":x?`${x}px`:void 0},X={padding:x},J=()=>{P&&h.D!==P?E({accessToken:P,instagramUser:(0,d.find)(F,{token:P}).username}):M()};return(0,n.createElement)("div",{className:q},U&&(0,n.createElement)(s.Placeholder,{icon:"instagram",instructions:z?D||F.length?void 0:__("Connect to Instagram to start sharing your images.","jetpack"):__("First, you'll need to connect your WordPress.com account.","jetpack"),label:__("Latest Instagram Posts","jetpack"),notices:y},z?(()=>{const e=F.length>0,t=[...(0,d.map)(F,(e=>({label:`@${e.username}`,value:e.token}))),{label:__("Add a new account","jetpack"),value:h.D}],r=B||D||e&&!P;return(0,n.createElement)("div",null,e&&(0,n.createElement)(s.RadioControl,{label:__("Select your Instagram account:","jetpack"),onChange:e=>T(e),options:t,selected:P}),h.D===P&&(0,n.createElement)("p",{className:"wp-block-jetpack-instagram-gallery__new-account-instructions"},__("If you are currently logged in to Instagram on this device, you might need to log out of it first.","jetpack")),(0,n.createElement)(s.Button,{disabled:r,variant:"primary",onClick:J},B&&__("Connecting…","jetpack"),D&&__("Loading your connections…","jetpack"),!B&&!D&&__("Connect to Instagram","jetpack")))})():(0,n.createElement)(s.Button,{disabled:L||!N,href:N,variant:"secondary"},__("Connect to WordPress.com","jetpack"))),V&&(0,n.createElement)("div",{className:"wp-block-embed is-loading"},(0,n.createElement)(s.Spinner,null),(0,n.createElement)("p",null,__("Embedding…","jetpack"))),G&&(0,n.createElement)("div",{className:$,style:W},(0,d.times)(l?j:O,(e=>(0,n.createElement)("span",{className:u()("wp-block-jetpack-instagram-gallery__grid-post"),key:e,style:X},(e=>{if(A[e]){const r=A[e];return(0,n.createElement)(f.Z,{alt:r.title||r.url,src:r.url,attributes:t,spacing:x})}return(0,n.createElement)("img",{alt:__("Latest Instagram Posts placeholder","jetpack"),src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNMyc2tBwAEOgG/c94mJwAAAABJRU5ErkJggg=="})})(e))))),H&&(0,n.createElement)(o.InspectorControls,null,(0,n.createElement)(g.Z,{accountImageTotal:A.length,attributes:t,currentUserConnected:z,disconnectFromService:Z,shouldRenderSidebarNotice:H&&!V&&A.length<j,setAttributes:E})))}))},34575:(e,t,r)=>{"use strict";var n=r(31985),a=r(78544);(0,n.Z)(a.u,a.X)},44961:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(69307),o=r(65235),s=r.n(o);function i(e){let{src:t,alt:r,spacing:o}=e;const[i,l]=(0,a.useState)(!1),[c,u]=(0,a.useState)("auto"),d=(0,a.useRef)(),p=()=>{l(!0),u("auto")};(0,a.useEffect)((()=>{const e=t;if(e){const t=new window.Image;t.src=e,t.onload=p}d.current&&u(d.current.parentNode.getBoundingClientRect().width)}),[t]);const m=-1*o,h=s()("wp-block-jetpack-instagram-gallery__placeholder",{"is-loaded":i}),g=i?{margin:m}:{margin:m,height:c},f=s()({"is-loaded":i});return(0,n.createElement)("span",{style:g,className:h},(0,n.createElement)("img",{alt:r,className:f,ref:d,src:t}))}},78544:(e,t,r)=>{"use strict";r.d(t,{X:()=>u,u:()=>c});var n=r(51806),a=r(4981),o=r(65736),s=r(70355),i=r(8979),l=r(36420);const __=o.__,_x=o._x,c="instagram-gallery",u={title:__("Latest Instagram Posts","jetpack"),description:__("Display an automatically updating list of the latest posts from your Instagram feed.","jetpack"),icon:{src:"instagram",foreground:(0,s.m)()},category:"embed",keywords:[_x("images","block search term","jetpack"),_x("photos","block search term","jetpack"),_x("pictures","block search term","jetpack")],supports:{align:!0,html:!1},transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:r}=e;return!!r?.raw&&"wpcom_instagram_widget"===t},transform:e=>{let{instance:t}=e;return(0,a.createBlock)("jetpack/instagram-gallery",{columns:t.raw.columns,count:t.raw.count,accessToken:t.raw.token_id})}}]},attributes:i.Z,edit:l.Z,save:e=>{let{attributes:{instagramUser:t}}=e;return t&&(0,n.createElement)("div",null,(0,n.createElement)("a",{href:`https://www.instagram.com/${t}/`,rel:"noopener noreferrer",target:"_blank"},`https://www.instagram.com/${t}/`))}}},79236:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(13419),a=r(7211),o=r(86989),s=r.n(o),i=r(69307),l=r(65736),c=r(92819),u=r(696);const __=l.__;function d(e){let{accessToken:t,noticeOperations:r,selectedAccount:o,setAttributes:l,setImages:d,setSelectedAccount:p}=e;const[m,h]=(0,i.useState)(!1),[g,f]=(0,i.useState)(!1),[b,v]=(0,i.useState)([]),k=(0,n.Dp)();(0,i.useEffect)((()=>{!t&&k&&(f(!0),s()({path:"/wpcom/v2/instagram-gallery/connections"}).then((e=>{f(!1),v(e)})).catch((()=>{f(!1),v([])})))}),[t,k]),(0,i.useEffect)((()=>{u.D===o||(0,c.find)(b,{token:o})||p(void 0)}),[o,p,b]);return{connectToService:()=>{r.removeAllNotices(),h(!0),s()({path:"/wpcom/v2/instagram-gallery/connect-url"}).then((e=>{const t=new a.Z;t.open(e,"connect-to-instagram-popup","toolbar=0,location=0,menubar=0,"+t.getScreenCenterSpecs(700,700)),t.on("message",(e=>{let{keyring_id:t}=e;if(h(!1),t){const e=t.toString();l({accessToken:e}),p(e)}})),t.on("close",(e=>{"connect-to-instagram-popup"===e&&h(!1)}))})).catch((()=>{r.createErrorNotice(__("An error occurred. Please try again later.","jetpack")),h(!1)}))},disconnectFromService:()=>{r.removeAllNotices(),l({accessToken:void 0,instagramUser:void 0}),d([])},isConnecting:m,isRequestingUserConnections:g,userConnections:b}}},2681:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(13419),a=r(86989),o=r.n(a),s=r(9818),i=r(69307),l=r(96483);function c(){const{isAutoDraft:e}=(0,s.useSelect)((e=>{const{status:t}=e("core/editor").getCurrentPost();return{isAutoDraft:"auto-draft"===t}})),{savePost:t}=(0,s.useDispatch)("core/editor"),[r,a]=(0,i.useState)(),[c,u]=(0,i.useState)(!1),d=(0,n.Dp)();return(0,i.useEffect)((()=>{d||r||c||(e?t():(u(!0),o()({path:(0,l.addQueryArgs)("/jetpack/v4/connection/url",{from:"jetpack-block-editor",redirect:window.location.href})}).then((e=>{a(e),u(!1)}))))}),[d,e,c,t,r]),{isRequestingWpcomConnectUrl:c,wpcomConnectUrl:r}}},75412:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(86989),a=r.n(n),o=r(69307),s=r(65736),i=r(96483),l=r(92819),c=r(696);const __=s.__;function u(e){let{accessToken:t,noticeOperations:r,setAttributes:n,setSelectedAccount:s}=e;const[u,d]=(0,o.useState)([]),[p,m]=(0,o.useState)(!1);return(0,o.useEffect)((()=>{t&&(r.removeAllNotices(),m(!0),a()({path:(0,i.addQueryArgs)("/wpcom/v2/instagram-gallery/gallery",{access_token:t,count:c.u})}).then((e=>{let{external_name:t,images:a}=e;if(m(!1),!a||!(0,l.isArray)(a))return r.createErrorNotice(__("An error occurred. Please try again later.","jetpack")),d([]),n({accessToken:void 0,instagramUser:void 0}),void s(void 0);(0,l.isEmpty)(a)&&r.createErrorNotice(__("No images were found in your Instagram account.","jetpack")),n({instagramUser:t}),d(a)})).catch((()=>{m(!1),d([]),n({accessToken:void 0,instagramUser:void 0}),s(void 0)})))}),[t,n,s]),{images:u,isLoadingGallery:p,setImages:d}}},57158:(e,t,r)=>{"use strict";var n=r(13419),a=r(64007);(0,n.o_)(a.u,a.X)},64007:(e,t,r)=>{"use strict";r.d(t,{X:()=>o,u:()=>a});var n=r(28495);const a="likes",o={render:n.Z}},28495:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(51806),a=r(55609),o=r(94333),s=r(9818),i=r(12238),l=r(65736),c=r(8264);const __=l.__,u=(0,s.withSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor");return{areLikesEnabled:t("jetpack_likes_enabled")}})),d=(0,s.withDispatch)((e=>{const{editPost:t}=e("core/editor");return{editPost:t}})),p=(0,o.compose)([u,d])((e=>{let{areLikesEnabled:t,editPost:r}=e;return(0,n.createElement)(i.PostTypeSupportCheck,{supportKeys:"jetpack-post-likes"},(0,n.createElement)(c.Z,null,(0,n.createElement)(a.ToggleControl,{label:__("Show likes","jetpack"),checked:t,onChange:e=>{r({jetpack_likes_enabled:e})}})))}))},64968:(e,t,r)=>{"use strict";r.d(t,{Cw:()=>o,N3:()=>n,sf:()=>a});const n="processing",a="success",o="error"},84038:(e,t,r)=>{"use strict";r.d(t,{Q:()=>l});var n=r(51806),a=r(55609),o=r(65736),s=r(64968),i=r(24535);const __=o.__;function l(e){let{auditionNotification:t,clearAudition:r,setAttributes:o,emailPlaceholder:l,processingLabel:c,successLabel:u,errorLabel:d,interests:p,signupFieldTag:m,signupFieldValue:h,connectURL:g}=e;return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(a.PanelBody,{title:__("Text Elements","jetpack")},(0,n.createElement)(a.TextControl,{label:__("Email Placeholder","jetpack"),value:l,onChange:e=>{o({emailPlaceholder:e}),r()}})),(0,n.createElement)(a.PanelBody,{title:__("Notifications","jetpack")},(0,n.createElement)(a.TextControl,{label:__("Processing text","jetpack"),value:c,onChange:e=>{o({processingLabel:e}),t(s.N3)}}),(0,n.createElement)(a.TextControl,{label:__("Success text","jetpack"),value:u,onChange:e=>{o({successLabel:e}),t(s.sf)}}),(0,n.createElement)(a.TextControl,{label:__("Error text","jetpack"),value:d,onChange:e=>{o({errorLabel:e}),t(s.Cw)}})),(0,n.createElement)(a.PanelBody,{title:__("Mailchimp Groups","jetpack")},(0,n.createElement)(i.Z,{interests:p,onChange:(e,t)=>{const r=[...new Set([...p,e])].filter((r=>!(r===e&&!t)&&r));o({interests:r})}}),(0,n.createElement)(a.ExternalLink,{href:"https://mailchimp.com/help/send-groups-audience/"},__("Learn about groups","jetpack"))),(0,n.createElement)(a.PanelBody,{title:__("Signup Location Tracking","jetpack")},(0,n.createElement)(a.TextControl,{label:__("Signup Field Tag","jetpack"),placeholder:__("SIGNUP","jetpack"),value:m,onChange:e=>o({signupFieldTag:e})}),(0,n.createElement)(a.TextControl,{label:__("Signup Field Value","jetpack"),placeholder:__("website","jetpack"),value:h,onChange:e=>o({signupFieldValue:e})}),(0,n.createElement)(a.ExternalLink,{href:"https://mailchimp.com/help/determine-webpage-signup-location/"},__("Learn about signup location tracking","jetpack"))),(0,n.createElement)(a.PanelBody,{title:__("Mailchimp Connection","jetpack")},(0,n.createElement)(a.ExternalLink,{href:g},__("Manage Connection","jetpack"))))}},748:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(4981),a=r(65736),o=r(92819);const __=a.__,s=["submitButtonText","backgroundButtonColor","textButtonColor","submitButtonClasses","customBackgroundButtonColor","customTextButtonColor"],i={attributes:{emailPlaceholder:{type:"string",default:__("Enter your email","jetpack")},submitButtonText:{type:"string",default:__("Join my email list","jetpack")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},submitButtonClasses:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},consentText:{type:"string",default:__("By clicking submit, you agree to share your email address with the site owner and Mailchimp to receive marketing, updates, and other emails from the site owner. Use the unsubscribe link in those emails to opt out at any time.","jetpack")},interests:{type:"array",default:[]},processingLabel:{type:"string",default:__("Processing…","jetpack")},signupFieldTag:{type:"string"},signupFieldValue:{type:"string"},successLabel:{type:"string",default:__("Success! You're on the list.","jetpack")},errorLabel:{type:"string",default:__("Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.","jetpack")},preview:{type:"boolean",default:!1}},migrate:e=>{const t=(0,o.omit)(e,s),r={text:(a=e).submitButtonText||__("Join my email list","jetpack"),textColor:a.textButtonColor,customTextColor:a.customTextButtonColor,backgroundColor:a.backgroundButtonColor,customBackgroundColor:a.customBackgroundButtonColor};var a;return[t,[(0,n.createBlock)("jetpack/button",{element:"button",uniqueId:"mailchimp-widget-id",...r})]]},isEligible:(e,t)=>(0,o.isEmpty)(t)||(0,o.some)((0,o.pick)(e,s),Boolean),save:()=>null}},43818:(e,t,r)=>{"use strict";r.d(t,{Z:()=>y});var n=r(90017),a=r.n(n),o=r(51806),s=r(13419),i=r(86989),l=r.n(i),c=r(52175),u=r(55609),d=r(69307),p=r(65736),m=r(96483),h=r(65235),g=r.n(h),f=r(64968),b=r(84038),v=r(4495);const __=p.__;class k extends d.Component{constructor(){super(...arguments),a()(this,"componentDidMount",(()=>{this.apiCall()})),a()(this,"onError",(e=>{const{noticeOperations:t}=this.props;t.removeAllNotices(),t.createErrorNotice(e)})),a()(this,"apiCall",(()=>{const e=(0,s.Dp)();if(e){const t={path:"/wpcom/v2/mailchimp",method:"GET"};l()(t).then((t=>{const r=t.connect_url,n="connected"===t.code?1:2;this.setState({currentUserConnected:e,connected:n,connectURL:r})}),(t=>{this.setState({currentUserConnected:e,connected:2,connectURL:null}),this.onError(t.message)}))}else l()({path:(0,m.addQueryArgs)("/jetpack/v4/connection/url",{from:"jetpack-block-editor",redirect:window.location.href})}).then((t=>{const r=t;this.setState({currentUserConnected:e,connected:2,connectURL:r})}))})),a()(this,"auditionNotification",(e=>{this.setState({audition:e}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(this.clearAudition,3e3)})),a()(this,"clearAudition",(()=>{this.setState({audition:null})})),a()(this,"labelForAuditionType",(e=>{const{attributes:t}=this.props,{processingLabel:r,successLabel:n,errorLabel:a}=t;return e===f.N3?r:e===f.sf?n:e===f.Cw?a:null})),a()(this,"roleForAuditionType",(e=>e===f.Cw?"alert":"status")),a()(this,"render",(()=>{const{attributes:e,className:t,notices:r,noticeUI:n,setAttributes:a}=this.props,{audition:s,connected:i,connectURL:l,currentUserConnected:p}=this.state,{emailPlaceholder:m,consentText:h,interests:f,processingLabel:k,successLabel:y,errorLabel:E,preview:w,signupFieldTag:_,signupFieldValue:C}=e,j="wp-block-jetpack-mailchimp",S=(0,o.createElement)(u.Placeholder,{icon:v.qv,notices:r,className:"wp-block-jetpack-mailchimp",label:__("Mailchimp","jetpack")},(0,o.createElement)("div",{className:"align-center"},(0,o.createElement)(u.Spinner,null))),x=(0,o.createElement)(u.Placeholder,{className:"wp-block-jetpack-mailchimp",icon:v.qv,label:__("Mailchimp","jetpack"),notices:r,instructions:__("You need to connect your Mailchimp account and choose an audience in order to start collecting Email subscribers.","jetpack")},(0,o.createElement)(u.Button,{variant:"secondary",href:l,target:"_blank"},__("Set up Mailchimp form","jetpack")),(0,o.createElement)("div",{className:`${j}-recheck`},(0,o.createElement)(u.Button,{variant:"link",onClick:this.apiCall},__("Re-check Connection","jetpack")))),P=(0,o.createElement)(u.Placeholder,{className:"wp-block-jetpack-mailchimp",icon:v.qv,label:__("Mailchimp","jetpack"),notices:r,instructions:__("First, you'll need to connect your WordPress.com account.","jetpack")},(0,o.createElement)(u.Button,{variant:"secondary",href:l},__("Connect to WordPress.com","jetpack"))),T=(0,o.createElement)(c.InspectorControls,null,(0,o.createElement)(b.Q,{auditionNotification:this.auditionNotification,clearAudition:this.clearAudition,emailPlaceholder:m,processingLabel:k,successLabel:y,errorLabel:E,interests:f,setAttributes:this.props.setAttributes,signupFieldTag:_,signupFieldValue:C,connectURL:l})),L=g()(t,{[`${j}_notication-audition`]:s}),N=(0,o.createElement)("div",{className:L},(0,o.createElement)(u.TextControl,{"aria-label":m,className:"wp-block-jetpack-mailchimp_text-input",disabled:!0,onChange:()=>!1,placeholder:m,title:__("You can edit the email placeholder in the sidebar.","jetpack"),type:"email"}),(0,o.createElement)(c.InnerBlocks,{template:[[v.Ss.name,v.Ss.attributes]],templateLock:"all"}),(0,o.createElement)(c.RichText,{tagName:"p",placeholder:__("Write consent text","jetpack"),value:h,onChange:e=>a({consentText:e}),inlineToolbar:!0}),s&&(0,o.createElement)("div",{className:`${j}_notification ${j}_${s}`,role:this.roleForAuditionType(s)},this.labelForAuditionType(s))),A=N;return(0,o.createElement)(d.Fragment,null,n,w&&A,!w&&0===i&&S,!w&&2===i&&p&&x,!w&&2===i&&!p&&P,!w&&1===i&&T,!w&&1===i&&N)})),this.state={audition:null,connected:0,connectURL:null,currentUserConnected:null},this.timeout=null}}const y=(0,u.withNotices)(k)},61204:(e,t,r)=>{"use strict";var n=r(31985),a=r(4495);(0,n.Z)(a.u2,a.Xd)},4495:(e,t,r)=>{"use strict";r.d(t,{Ss:()=>m,Xd:()=>h,qv:()=>p,u2:()=>d});var n=r(51806),a=r(52175),o=r(55609),s=r(65736),i=r(70355),l=r(748),c=r(43818),u=r(84197);const __=s.__,_x=s._x,d="mailchimp",p=(0,n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,n.createElement)(o.G,{transform:"translate(-45.478101,-100.73059)"},(0,n.createElement)(o.G,{transform:"matrix(0.26458333,0,0,0.26458333,15.6741,59.72)"},(0,n.createElement)(o.Path,{d:"m 176.433,197.529 c 0.657,-0.078 1.286,-0.082 1.865,0 0.335,-0.768 0.392,-2.091 0.091,-3.532 -0.447,-2.142 -1.053,-3.438 -2.305,-3.236 -1.252,0.202 -1.298,1.754 -0.85,3.895 0.252,1.205 0.7,2.235 1.199,2.873"}),(0,n.createElement)(o.Path,{d:"m 165.688,199.224 c 0.895,0.393 1.446,0.654 1.661,0.426 0.139,-0.142 0.097,-0.413 -0.117,-0.762 -0.442,-0.721 -1.351,-1.453 -2.316,-1.864 -1.972,-0.849 -4.325,-0.567 -6.14,0.737 -0.599,0.439 -1.167,1.047 -1.086,1.416 0.026,0.119 0.116,0.209 0.326,0.239 0.494,0.056 2.22,-0.816 4.209,-0.938 1.403,-0.086 2.566,0.353 3.462,0.746"}),(0,n.createElement)(o.Path,{d:"m 163.887,200.252 c -1.167,0.184 -1.81,0.569 -2.223,0.926 -0.352,0.308 -0.57,0.649 -0.568,0.888 0.001,0.114 0.05,0.18 0.089,0.213 0.053,0.047 0.116,0.073 0.192,0.073 0.263,0 0.854,-0.237 0.854,-0.237 1.623,-0.581 2.694,-0.51 3.755,-0.39 0.586,0.066 0.864,0.102 0.992,-0.099 0.038,-0.058 0.084,-0.183 -0.033,-0.373 -0.273,-0.443 -1.451,-1.192 -3.057,-1.001"}),(0,n.createElement)(o.Path,{d:"m 172.805,204.025 c 0.792,0.389 1.664,0.236 1.948,-0.341 0.284,-0.577 -0.128,-1.361 -0.92,-1.75 -0.792,-0.389 -1.664,-0.236 -1.948,0.341 -0.284,0.578 0.128,1.361 0.92,1.75"}),(0,n.createElement)(o.Path,{d:"m 177.896,199.576 c -0.643,-0.011 -1.177,0.695 -1.192,1.578 -0.015,0.883 0.495,1.606 1.138,1.617 0.643,0.011 1.177,-0.695 1.192,-1.578 0.015,-0.882 -0.495,-1.606 -1.138,-1.617"}),(0,n.createElement)(o.Path,{d:"m 134.683,215.485 c -0.16,-0.201 -0.423,-0.14 -0.678,-0.08 -0.178,0.042 -0.379,0.088 -0.6,0.085 -0.473,-0.009 -0.874,-0.211 -1.099,-0.557 -0.293,-0.45 -0.276,-1.121 0.047,-1.889 l 0.151,-0.344 c 0.516,-1.158 1.379,-3.095 0.41,-4.941 -0.73,-1.39 -1.92,-2.255 -3.351,-2.437 -1.374,-0.174 -2.788,0.335 -3.69,1.33 -1.423,1.57 -1.646,3.707 -1.371,4.462 0.101,0.276 0.259,0.353 0.373,0.369 0.242,0.032 0.6,-0.144 0.824,-0.747 l 0.064,-0.196 c 0.1,-0.319 0.286,-0.913 0.591,-1.389 0.368,-0.574 0.94,-0.969 1.612,-1.114 0.684,-0.147 1.384,-0.016 1.97,0.368 0.997,0.652 1.381,1.874 0.955,3.039 -0.22,0.603 -0.578,1.756 -0.499,2.703 0.16,1.917 1.339,2.687 2.398,2.769 1.03,0.039 1.75,-0.54 1.932,-0.962 0.107,-0.25 0.017,-0.402 -0.042,-0.467"}),(0,n.createElement)(o.Path,{d:"m 144.475,180.275 c 3.36,-3.882 7.495,-7.257 11.2,-9.152 0.128,-0.066 0.264,0.073 0.195,0.199 -0.294,0.533 -0.861,1.674 -1.04,2.539 -0.028,0.135 0.119,0.236 0.233,0.159 2.305,-1.571 6.314,-3.255 9.831,-3.471 0.151,-0.009 0.224,0.184 0.104,0.277 -0.535,0.41 -1.12,0.978 -1.547,1.552 -0.073,0.098 -0.004,0.238 0.118,0.239 2.469,0.018 5.95,0.882 8.219,2.155 0.153,0.086 0.044,0.383 -0.128,0.344 -3.433,-0.787 -9.052,-1.384 -14.89,0.04 -5.211,1.271 -9.189,3.234 -12.09,5.344 -0.147,0.107 -0.323,-0.087 -0.204,-0.224 z m 16.732,37.612 0.001,0.002 0.002,0.004 z m 13.854,1.635 c 0.1,-0.042 0.168,-0.155 0.157,-0.268 -0.014,-0.139 -0.138,-0.24 -0.277,-0.226 0,0 -7.169,1.061 -13.942,-1.418 0.738,-2.398 2.699,-1.532 5.664,-1.293 5.344,0.319 10.134,-0.462 13.674,-1.478 3.067,-0.88 7.096,-2.616 10.225,-5.086 1.055,2.318 1.428,4.87 1.428,4.87 0,0 0.817,-0.146 1.5,0.274 0.645,0.397 1.118,1.222 0.795,3.356 -0.658,3.986 -2.352,7.222 -5.2,10.199 -1.734,1.866 -3.838,3.488 -6.246,4.668 -1.279,0.672 -2.64,1.253 -4.079,1.722 -10.736,3.507 -21.726,-0.348 -25.268,-8.626 -0.283,-0.622 -0.522,-1.274 -0.71,-1.955 -1.509,-5.455 -0.228,-12 3.778,-16.12 v -0.002 c 0.247,-0.262 0.499,-0.571 0.499,-0.96 0,-0.325 -0.207,-0.668 -0.386,-0.912 -1.402,-2.033 -6.257,-5.497 -5.282,-12.201 0.7,-4.816 4.912,-8.208 8.839,-8.007 l 0.995,0.057 c 1.702,0.101 3.186,0.319 4.587,0.378 2.345,0.102 4.453,-0.239 6.951,-2.32 0.842,-0.702 1.518,-1.311 2.661,-1.504 0.12,-0.021 0.419,-0.128 1.016,-0.1 0.61,0.033 1.19,0.2 1.711,0.547 2.002,1.332 2.286,4.559 2.39,6.919 0.059,1.347 0.222,4.607 0.278,5.543 0.127,2.14 0.69,2.441 1.828,2.816 0.64,0.211 1.234,0.368 2.11,0.614 2.65,0.744 4.221,1.499 5.212,2.469 0.591,0.606 0.866,1.25 0.951,1.864 0.312,2.28 -1.77,5.096 -7.283,7.655 -6.026,2.797 -13.337,3.505 -18.388,2.942 l -1.77,-0.2 c -4.04,-0.544 -6.345,4.677 -3.92,8.255 1.563,2.306 5.82,3.806 10.079,3.807 9.765,0.001 17.271,-4.169 20.063,-7.77 l 0.223,-0.318 c 0.138,-0.207 0.024,-0.321 -0.147,-0.204 -2.281,1.561 -12.413,7.758 -23.251,5.893 0,0 -1.317,-0.217 -2.519,-0.684 -0.955,-0.372 -2.955,-1.292 -3.198,-3.343 8.746,2.705 14.253,0.148 14.253,0.148 z m -48.039,-20.785 c -3.042,0.591 -5.723,2.315 -7.362,4.697 -0.98,-0.817 -2.805,-2.399 -3.128,-3.016 -2.617,-4.97 2.856,-14.632 6.68,-20.089 9.45,-13.485 24.25,-23.692 31.101,-21.84 1.114,0.315 4.803,4.592 4.803,4.592 0,0 -6.849,3.8 -13.2,9.097 -8.558,6.589 -15.022,16.166 -18.895,26.559 z m 5.111,22.805 c -0.46,0.079 -0.93,0.11 -1.404,0.098 -4.577,-0.123 -9.52,-4.243 -10.011,-9.129 -0.543,-5.401 2.217,-9.557 7.103,-10.543 0.584,-0.118 1.29,-0.186 2.051,-0.146 2.738,0.15 6.772,2.252 7.693,8.216 0.816,5.282 -0.48,10.659 -5.432,11.503 z m 61.996,-9.564 c -0.039,-0.139 -0.295,-1.072 -0.646,-2.197 -0.351,-1.126 -0.714,-1.917 -0.714,-1.917 1.408,-2.107 1.433,-3.992 1.245,-5.059 -0.2,-1.323 -0.751,-2.45 -1.861,-3.616 -1.11,-1.165 -3.381,-2.359 -6.572,-3.255 l -1.674,-0.465 c -0.008,-0.069 -0.088,-3.947 -0.16,-5.612 -0.053,-1.204 -0.156,-3.083 -0.739,-4.933 -0.695,-2.505 -1.905,-4.697 -3.416,-6.099 4.17,-4.322 6.773,-9.084 6.766,-13.168 -0.012,-7.855 -9.659,-10.232 -21.548,-5.309 l -2.519,1.069 c -0.011,-0.011 -4.554,-4.468 -4.622,-4.528 -13.555,-11.823 -55.935,35.284 -42.386,46.725 l 2.961,2.509 c -0.768,1.99 -1.07,4.27 -0.823,6.721 0.316,3.149 1.94,6.167 4.573,8.499 2.499,2.214 5.785,3.616 8.973,3.613 5.273,12.151 17.321,19.605 31.447,20.025 15.153,0.45 27.873,-6.66 33.203,-19.432 0.349,-0.896 1.828,-4.935 1.828,-8.501 0,-3.583 -2.026,-5.068 -3.316,-5.068"})))),m={name:"jetpack/button",attributes:{element:"button",text:__("Join my Mailchimp audience","jetpack"),uniqueId:"mailchimp-widget-id"}},h={title:__("Mailchimp","jetpack"),icon:{src:p,foreground:(0,i.m)()},description:__("A form enabling readers to join a Mailchimp audience.","jetpack"),category:"grow",keywords:[_x("email","block search term","jetpack"),_x("subscription","block search term","jetpack"),_x("newsletter","block search term","jetpack")],supports:{align:["wide","full"],color:{gradients:!0},spacing:{padding:!0,margin:!0}},attributes:{emailPlaceholder:{type:"string",default:__("Enter your email","jetpack")},consentText:{type:"string",default:__("By clicking submit, you agree to share your email address with the site owner and Mailchimp to receive marketing, updates, and other emails from the site owner. Use the unsubscribe link in those emails to opt out at any time.","jetpack")},interests:{type:"array",default:[]},processingLabel:{type:"string",default:__("Processing…","jetpack")},signupFieldTag:{type:"string"},signupFieldValue:{type:"string"},successLabel:{type:"string",default:__("Success! You're on the list.","jetpack")},errorLabel:{type:"string",default:__("Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.","jetpack")},preview:{type:"boolean",default:!1}},edit:c.Z,save:()=>(0,n.createElement)(a.InnerBlocks.Content,null),example:{attributes:{preview:!0},innerBlocks:[m]},deprecated:[l.Z],transforms:u.Z}},24535:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(90017),a=r.n(n),o=r(51806),s=r(86989),i=r.n(s),l=r(55609),c=r(69307);class u extends c.Component{constructor(){super(...arguments),a()(this,"state",{interest_categories:[]}),a()(this,"retrieveGroups",(()=>{i()({method:"GET",path:"/wpcom/v2/mailchimp/groups"}).then((e=>{const{interest_categories:t}=e;this.setState({interest_categories:t})}))})),a()(this,"render",(()=>{const{interest_categories:e}=this.state,{interests:t,onChange:r}=this.props;return(0,o.createElement)(c.Fragment,null,e&&(e||[]).map((e=>e.interests.map((e=>(0,o.createElement)(l.CheckboxControl,{label:e.name,value:e.id,checked:t.includes(e.id),onChange:t=>r(e.id,t),key:e.id}))))))}))}componentDidMount(){this.retrieveGroups()}}const d=u;u.defaultProps={interests:[],onChange:()=>null}},84197:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(4981);const a={to:[{type:"block",blocks:["jetpack/subscriptions"],transform:()=>(0,n.createBlock)("jetpack/subscriptions")}]}},2944:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(55609),o=r(69307),s=r(65736),i=r(31852);const __=s.__;class l extends o.Component{render(){const{onClose:e,onAddPoint:t,onError:r,apiKey:o,mapProvider:s}=this.props;return(0,n.createElement)(a.Button,{className:"component__add-point"},__("Add marker","jetpack"),(0,n.createElement)(a.Popover,{className:"component__add-point__popover",position:"bottom center"},(0,n.createElement)(a.Button,{className:"component__add-point__close",onClick:e},(0,n.createElement)(a.Dashicon,{icon:"no"})),(0,n.createElement)(i.Z,{onAddPoint:t,label:__("Add a location","jetpack"),apiKey:o,onError:r,mapProvider:s})))}}l.defaultProps={onAddPoint:()=>{},onClose:()=>{},onError:()=>{},mapProvider:"mapbox"};const c=l},75890:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(82674),a=r.n(n),o=r(51806),s=r(69307),i=r(21035),l=r(99128);const c=(0,s.forwardRef)(((e,t)=>{if("mapkit"===e.mapProvider){const r={...e,ref:null};return(0,o.createElement)(l.Z,a()({},r,{ref:t}))}return(0,o.createElement)(i.Z,a()({},e,{ref:t}))}))},75385:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(61323),o=r(82891);const s=e=>"mapkit"===e.mapProvider?(0,n.createElement)(o.Z,e):(0,n.createElement)(a.Z,e)},61323:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(90017),a=r.n(n),o=r(69307),s=r(84634);class i extends o.Component{constructor(){super(...arguments),a()(this,"closeClick",(()=>{this.props.unsetActiveMarker()}))}componentDidMount(){const{mapboxgl:e}=this.props;this.el=document.createElement("DIV"),this.infowindow=(0,s.xt)(e),this.infowindow.setDOMContent(this.el),this.infowindow.on("close",this.closeClick)}componentDidUpdate(e){this.props.activeMarker!==e.activeMarker&&(this.props.activeMarker?this.openWindow():this.closeWindow())}render(){return this.el?(0,o.createPortal)(this.props.children,this.el):null}openWindow(){const{map:e,activeMarker:t}=this.props;this.infowindow.setLngLat(t.getPoint()).addTo(e)}closeWindow(){this.infowindow.remove()}}i.defaultProps={unsetActiveMarker:()=>{},activeMarker:null,map:null,mapboxgl:null};const l=i},82891:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(55609),o=r(69307),s=r(65736),i=r(72672);const __=s.__,l=()=>{const{activeMarker:e,setActiveMarker:t,calloutReference:r,admin:s,points:l,setPoints:c}=(0,i.qw)(),[u,d]=(0,o.useState)(l),[p,m]=(0,o.useState)(!1),{title:h,caption:g}=u.find((t=>t.id===e?.id))||{},f=t=>{const r=l.map((r=>r.id===e.id?{...r,...t}:r));d(r),m(!0)};return(0,o.useEffect)((()=>{!e&&p&&c(u)}),[e,p,u,c]),(0,o.useEffect)((()=>{d(l),m(!1)}),[l]),e&&r?(0,o.createPortal)((0,n.createElement)(o.Fragment,null,s&&(0,n.createElement)(o.Fragment,null,(0,n.createElement)(a.TextControl,{label:__("Marker Title","jetpack"),value:h,onChange:e=>f({title:e})}),(0,n.createElement)(a.TextareaControl,{className:"wp-block-jetpack-map__marker-caption",label:__("Marker Caption","jetpack"),value:g,rows:"2",tag:"textarea",onChange:e=>f({caption:e})}),(0,n.createElement)(a.Button,{onClick:()=>{const r=l.filter((t=>t.id!==e.id));d(r),m(!0),t(null)},className:"wp-block-jetpack-map__delete-btn"},(0,n.createElement)(a.Dashicon,{icon:"trash",size:"15"})," ",__("Delete Marker","jetpack"))),!s&&(0,n.createElement)(o.Fragment,null,(0,n.createElement)("h3",null,h),(0,n.createElement)("p",null,g))),r):null};l.defaultProps={};const c=l},32333:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(90017),a=r.n(n),o=r(69307),s=r(85007),i=r(84634);class l extends o.Component{constructor(){super(...arguments),a()(this,"handleClick",(()=>{const{onClick:e}=this.props;e(this)})),a()(this,"getPoint",(()=>{const{point:e}=this.props;return[e.coordinates.longitude,e.coordinates.latitude]}))}componentDidMount(){this.renderMarker()}componentWillUnmount(){this.marker&&this.marker.remove()}componentDidUpdate(){this.renderMarker()}renderMarker(){const{map:e,point:t,mapboxgl:r,markerColor:n,mapRef:a}=this.props,{handleClick:o}=this,l=[t.coordinates.longitude,t.coordinates.latitude],{currentDoc:c}=(0,s.bL)(a.current),u=this.marker?this.marker.getElement():c.createElement("div");this.marker?this.marker.setLngLat(l):(u.className="wp-block-jetpack-map-marker",this.marker=new r.Marker(u).setLngLat(l).setOffset([0,-19]).addTo(e),this.marker.getElement().addEventListener("click",o)),(0,i.zb)(u,n)}render(){return null}}l.defaultProps={point:{},map:null,markerColor:"#000000",mapboxgl:null,onClick:()=>{}};const c=l},21035:(e,t,r)=>{"use strict";r.d(t,{Z:()=>v});var n=r(90017),a=r.n(n),o=r(51806),s=r(55609),i=r(69307),l=r(65736),c=r(92819),u=r(85007),d=r(45388),p=r(90055),m=r(84634),h=r(51321),g=r(75385),f=r(32333);const __=l.__;class b extends i.Component{constructor(){super(...arguments),a()(this,"onMarkerClick",(e=>{const{onMarkerClick:t}=this.props;this.setState({activeMarker:e}),t()})),a()(this,"onMapClick",(()=>{this.setState({activeMarker:null})})),a()(this,"clearCurrentMarker",(()=>{this.setState({activeMarker:null})})),a()(this,"updateActiveMarker",(e=>{const{points:t}=this.props,{activeMarker:r}=this.state,{index:n}=r.props,a=t.slice(0);(0,c.assign)(a[n],e),this.props.onSetPoints(a)})),a()(this,"deleteActiveMarker",(()=>{const{points:e}=this.props,{activeMarker:t}=this.state,{index:r}=t.props,n=e.slice(0);n.splice(r,1),this.props.onSetPoints(n),this.setState({activeMarker:null})})),a()(this,"sizeMap",(()=>{const{mapHeight:e}=this.props,{map:t}=this.state,r=this.mapRef.current;(0,h.Z)(r,e),t.resize(),this.setBoundsByMarkers()})),a()(this,"updateZoom",(()=>{const{zoom:e}=this.props,{map:t}=this.state;t.setZoom(e)})),a()(this,"setBoundsByMarkers",(()=>{const{admin:e,onSetMapCenter:t,onSetZoom:r,points:n,zoom:a}=this.props,{map:o,activeMarker:s,mapboxgl:i,zoomControl:l,boundsSetProgrammatically:c}=this.state;if(!o)return;if(n.length&&e?o.dragPan.disable():o.dragPan.enable(),!n.length)return;if(s)return;const u=(0,m.YB)(i,n);if(t(u.getCenter()),n.length>1){(0,m.k)(o,u),this.setState({boundsSetProgrammatically:!0});try{o.removeControl(l)}catch(e){}}else{if(o.setCenter(u.getCenter()),c){const e=12;o.setZoom(e),r(e)}else o.setZoom(parseInt(a,10));o.addControl(l),this.setState({boundsSetProgrammatically:!1})}})),a()(this,"scriptsLoaded",(()=>{const{mapCenter:e,points:t}=this.props;this.setState({loaded:!0}),t.length,this.initMap(e)})),this.state={map:null,fit_to_bounds:!1,loaded:!1,mapboxgl:null},this.mapRef=(0,i.createRef)(),this.debouncedSizeMap=(0,c.debounce)(this.sizeMap,250)}render(){const{points:e,admin:t,children:r,markerColor:n}=this.props,{map:a,activeMarker:l,mapboxgl:u}=this.state,{onMarkerClick:d,deleteActiveMarker:p,updateActiveMarker:m}=this,h=(0,c.get)(l,"props.point")||{},{title:b,caption:v}=h,k=i.Children.map(r,(e=>{if("AddPoint"===(0,c.get)(e,"props.tagName"))return e})),y=a&&u&&e.map(((e,t)=>(0,o.createElement)(f.Z,{mapRef:this.mapRef,key:t,point:e,index:t,map:a,mapboxgl:u,markerColor:n,onClick:d}))),E=u&&(0,o.createElement)(g.Z,{activeMarker:l,map:a,mapboxgl:u,unsetActiveMarker:()=>this.setState({activeMarker:null})},l&&t&&(0,o.createElement)(i.Fragment,null,(0,o.createElement)(s.TextControl,{label:__("Marker Title","jetpack"),value:b,onChange:e=>m({title:e})}),(0,o.createElement)(s.TextareaControl,{className:"wp-block-jetpack-map__marker-caption",label:__("Marker Caption","jetpack"),value:v,rows:"2",tag:"textarea",onChange:e=>m({caption:e})}),(0,o.createElement)(s.Button,{onClick:p,className:"wp-block-jetpack-map__delete-btn"},(0,o.createElement)(s.Dashicon,{icon:"trash",size:"15"})," ",__("Delete Marker","jetpack"))),l&&!t&&(0,o.createElement)(i.Fragment,null,(0,o.createElement)("h3",null,b),(0,o.createElement)("p",null,v)));return(0,o.createElement)(i.Fragment,null,(0,o.createElement)("div",{className:"wp-block-jetpack-map__gm-container",ref:this.mapRef},y),E,k)}componentDidMount(){const{apiKey:e}=this.props;e&&this.loadMapLibraries()}componentWillUnmount(){this.debouncedSizeMap.cancel(),window.removeEventListener("resize",this.debouncedSizeMap)}componentDidUpdate(e){const{admin:t,apiKey:r,children:n,points:a,mapStyle:o,mapDetails:s,scrollToZoom:i,showFullscreenButton:l}=this.props,{map:c,fullscreenControl:u}=this.state;r&&r.length>0&&r!==e.apiKey&&this.loadMapLibraries(),n!==e.children&&!1!==n&&this.clearCurrentMarker(),a!==e.points&&this.setBoundsByMarkers(),a.length!==e.points.length&&this.clearCurrentMarker(),o===e.mapStyle&&s===e.mapDetails||c.setStyle(this.getMapStyle()),i!==e.scrollToZoom&&(i?c.scrollZoom.enable():c.scrollZoom.disable()),l!==e.showFullscreenButton&&(l?(c.addControl(u),t&&u._fullscreenButton&&(u._fullscreenButton.disabled=!0)):c.removeControl(u))}getMapStyle(){const{mapStyle:e,mapDetails:t}=this.props;return(0,p.h)(e,t)}getMapType(){const{mapStyle:e}=this.props;switch(e){case"satellite":return"HYBRID";case"terrain":return"TERRAIN";default:return"ROADMAP"}}loadMapLibraries(){const{apiKey:e}=this.props,{currentWindow:t}=(0,u.bL)(this.mapRef.current),r={"mapbox-gl-js":()=>{(0,u.Dz)(t,"mapboxgl").then((t=>{t.accessToken=e,this.setState({mapboxgl:t},this.scriptsLoaded)}))}};(0,u.Pp)(d,r,this.mapRef.current)}initMap(e){const{mapboxgl:t}=this.state,{zoom:r,onMapLoaded:n,onError:a,scrollToZoom:o,showFullscreenButton:s,admin:i}=this.props;let l=null;try{l=new t.Map({container:this.mapRef.current,style:this.getMapStyle(),center:(0,m.b2)(e),zoom:parseInt(r,10),pitchWithRotate:!1,attributionControl:!1,dragRotate:!1})}catch(e){return void a("mapbox_error",e.message)}o||l.scrollZoom.disable();const c=new t.FullscreenControl;l.on("error",(e=>{a("mapbox_error",e.error.message)}));const u=new t.NavigationControl({showCompass:!1,showZoom:!0});l.on("zoomend",(()=>{this.props.onSetZoom(l.getZoom())})),l.on("moveend",(()=>{const{onSetMapCenter:e,points:t}=this.props;t.length<1&&e(l.getCenter())})),l.getCanvas().addEventListener("click",this.onMapClick),this.setState({map:l,zoomControl:u,fullscreenControl:c},(()=>{this.debouncedSizeMap(),l.addControl(u),s&&(l.addControl(c),i&&c._fullscreenButton&&(c._fullscreenButton.disabled=!0)),this.mapRef.current.addEventListener("alignmentChanged",this.debouncedSizeMap),l.resize(),n(),this.setState({loaded:!0}),window.addEventListener("resize",this.debouncedSizeMap)}))}}b.defaultProps={points:[],mapStyle:"default",zoom:13,onSetZoom:()=>{},onSetMapCenter:()=>{},onMapLoaded:()=>{},onMarkerClick:()=>{},onError:()=>{},markerColor:"red",apiKey:null,mapCenter:{},address:null};const v=b},99128:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(51806),a=r(69307),o=r(92819),s=r(32037),i=r(72672),l=r(96442),c=r(75385);const u=(0,a.forwardRef)(((e,t)=>{const{admin:r,points:l,onError:u,onSetPoints:p}=e,{loaded:m,error:h,mapkit:g,currentDoc:f,currentWindow:b}=(0,i.eV)(t),{map:v}=(0,i.$M)(g,m,t),k=a.Children.map(e.children,(e=>{if("AddPoint"===(0,o.get)(e,"props.tagName"))return e}));return(0,a.useEffect)((()=>{h&&u("mapkit_error",h)}),[h,u]),(0,n.createElement)(s.c,{value:{mapkit:g,map:v,loaded:m,currentDoc:f,currentWindow:b,admin:r,points:l,setPoints:p}},m&&g&&v?(0,n.createElement)(d,e):null,(0,n.createElement)("div",{style:{height:e.mapHeight?`${e.mapHeight}px`:"400px"},className:"wp-block-jetpack-map__gm-container",ref:t}),k,(0,n.createElement)(c.Z,{mapProvider:"mapkit"}))})),d=(0,a.memo)((e=>{let{address:t,mapCenter:r,mapStyle:n,zoom:o,onSetMapCenter:s,onSetZoom:c,onSetPoints:u,points:d,markerColor:p,onMarkerClick:m,onMapLoaded:h}=e;const{map:g,mapkit:f,setActiveMarker:b,setPreviousCenter:v,setCalloutReference:k,currentDoc:y}=(0,i.qw)(),E=(0,a.useRef)(m),w=(0,a.useRef)(u),_=(0,a.useCallback)((e=>{b(e),v(g.center),E.current&&E.current(e),g.setCenterAnimated(new f.Coordinate(e.coordinates.latitude,e.coordinates.longitude))}),[g,f,b,v,E]);return(0,i.LO)(r,s),(0,i.Xj)(n),(0,i.zZ)(o,c),(0,i.J2)(d,p,(0,l.eR)(y,k),_),(0,i.jo)(h),(0,i.mk)((e=>{b(null),e&&g.setCenterAnimated(e)})),(0,i.wd)(t,w),null}));u.defaultProps={points:[],mapStyle:"default",zoom:13,onSetZoom:()=>{},onSetMapCenter:()=>{},onMapLoaded:()=>{},onMarkerClick:()=>{},onError:()=>{},markerColor:"red",mapCenter:{},address:null};const p=u},53036:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(52175),o=r(55609),s=r(65736),i=r(57897),l=r(82695);const __=s.__,c=e=>{let{attributes:t,setAttributes:r,state:s,setState:c,context:u,mapRef:d,instanceId:p,minHeight:m,removeAPIKey:h,updateAPIKey:g,setPointVisibility:f,mapProvider:b}=e;const v=e=>{r({align:e}),d.current?.sizeMap&&setTimeout(d.current.sizeMap,0)};return"toolbar"===u?(0,n.createElement)(n.Fragment,null,(0,n.createElement)(a.BlockAlignmentToolbar,{value:t.align,onChange:v,controls:["center","wide","full"]}),(0,n.createElement)(o.ToolbarGroup,null,(0,n.createElement)(o.ToolbarButton,{icon:l.X.markerIcon,label:__("Add a marker","jetpack"),onClick:f}))):(0,n.createElement)(n.Fragment,null,(0,n.createElement)(a.PanelColorSettings,{title:__("Colors","jetpack"),initialOpen:!0,colorSettings:[{value:t.markerColor,onChange:e=>r({markerColor:e}),label:__("Marker Color","jetpack")}]}),(0,n.createElement)(o.PanelBody,{title:__("Map Settings","jetpack")},(0,n.createElement)(o.BaseControl,{label:__("Height in pixels","jetpack"),id:`block-jetpack-map-height-input-${p}`},(0,n.createElement)("input",{type:"number",id:`block-jetpack-map-height-input-${p}`,className:"wp-block-jetpack-map__height_input",onChange:e=>{r({mapHeight:e.target.value}),e.target!==document.activeElement&&d.current&&setTimeout(d.current.sizeMap,0)},onBlur:e=>{const{mapHeight:n}=t;let a=parseInt(e.target.value,10);if(isNaN(a))a=null;else if(null==n){var o;const e=null!==(o=d?.current?.mapRef)&&void 0!==o?o:d;a=e?.current.offsetHeight}else a<m&&(a=m);r({mapHeight:a}),d.current.sizeMap&&setTimeout(d.current.sizeMap,0)},value:t.mapHeight||"",min:m,step:"10"})),(0,n.createElement)(o.RangeControl,{label:__("Zoom level","jetpack"),help:t.points.length>1&&__("The default zoom level cannot be changed when there are two or more markers on the map.","jetpack"),disabled:t.points.length>1,value:Math.round(t.zoom),onChange:e=>{r({zoom:e}),d.current&&d.current.updateZoom&&setTimeout(d.current.updateZoom,0)},min:0,max:22}),"mapbox"===b?(0,n.createElement)(o.ToggleControl,{label:__("Show street names","jetpack"),checked:t.mapDetails,onChange:e=>r({mapDetails:e})}):null,(0,n.createElement)(o.ToggleControl,{label:__("Scroll to zoom","jetpack"),help:__("Allow the map to capture scrolling, and zoom in or out.","jetpack"),checked:t.scrollToZoom,onChange:e=>r({scrollToZoom:e})}),"mapbox"===b?(0,n.createElement)(o.ToggleControl,{label:__("Show Fullscreen Button","jetpack"),help:__("Allow your visitors to display the map in fullscreen.","jetpack"),checked:t.showFullscreenButton,onChange:e=>r({showFullscreenButton:e})}):null),t.points.length?(0,n.createElement)(o.PanelBody,{title:__("Markers","jetpack"),initialOpen:!1},(0,n.createElement)(i.Z,{points:t.points,onChange:e=>{r({points:e})}})):null,"mapbox"===b?(0,n.createElement)(o.PanelBody,{title:__("Mapbox Access Token","jetpack"),initialOpen:!1},(0,n.createElement)(o.TextControl,{help:"wpcom"===s.apiKeySource&&(0,n.createElement)(n.Fragment,null,__("You can optionally enter your own access token.","jetpack")," ",(0,n.createElement)(o.ExternalLink,{href:"https://account.mapbox.com/access-tokens/"},__("Find it on Mapbox","jetpack"))),label:__("Mapbox Access Token","jetpack"),value:s.apiKeyControl,onChange:e=>c({apiKeyControl:e})}),(0,n.createElement)(o.ButtonGroup,null,(0,n.createElement)(o.Button,{type:"button",onClick:g,disabled:!s.apiKeyControl||s.apiKeyControl===s.apiKey},__("Update Token","jetpack")),(0,n.createElement)(o.Button,{type:"button",onClick:h,disabled:"wpcom"===s.apiKeySource,variant:"secondary"},__("Remove Token","jetpack")))):null)}},55109:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={attributes:{align:{type:"string"},points:{type:"array",default:[]},mapDetails:{type:"boolean",default:!0},zoom:{type:"integer",default:13},mapCenter:{type:"object",default:{longitude:-122.41941550000001,latitude:37.7749295}},mapStyle:{type:"string",default:"default"},markerColor:{type:"string",default:"red"},preview:{type:"boolean",default:!1},scrollToZoom:{type:"boolean",default:!1},mapHeight:{type:"integer"}},migrate:e=>{const t=((e.className||"").replace(/is-style-[^ ]+/,"")+` is-style-${e.mapStyle}`).replace(/\s+/g," ").trim(),{mapStyle:r,...n}=e;return{...n,showFullscreenButton:!0,className:t}},save:r(85888).Z}},85888:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(69307);class o extends a.Component{render(){const{attributes:e}=this.props,{align:t,mapStyle:r,mapDetails:a,points:o,zoom:s,mapCenter:i,markerColor:l,scrollToZoom:c,mapHeight:u}=e,d=o.map(((e,t)=>{const{longitude:r,latitude:a}=e.coordinates,o="https://www.google.com/maps/search/?api=1&query="+a+","+r;return(0,n.createElement)("li",{key:t},(0,n.createElement)("a",{href:o},e.title))})),p=t?`align${t}`:null;return(0,n.createElement)("div",{className:p,"data-map-style":r,"data-map-details":a,"data-points":JSON.stringify(o),"data-zoom":s,"data-map-center":JSON.stringify(i),"data-marker-color":l,"data-scroll-to-zoom":c||null,"data-map-height":u||null},o.length>0&&(0,n.createElement)("ul",null,d))}}const s=o},45051:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={attributes:{align:{type:"string"},points:{type:"array",default:[]},mapDetails:{type:"boolean",default:!0},zoom:{type:"integer",default:13},mapCenter:{type:"object",default:{longitude:-122.41941550000001,latitude:37.7749295}},mapStyle:{type:"string",default:"default"},markerColor:{type:"string",default:"red"},preview:{type:"boolean",default:!1},scrollToZoom:{type:"boolean",default:!1},mapHeight:{type:"integer"},showFullscreenButton:{type:"boolean",default:!0}},migrate:e=>{const t=((e.className||"").replace(/is-style-[^ ]+/,"")+` is-style-${e.mapStyle}`).replace(/\s+/g," ").trim(),{mapStyle:r,...n}=e;return{...n,className:t}},save:r(95382).Z}},95382:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(69307);class o extends a.Component{render(){const{attributes:e}=this.props,{align:t,mapStyle:r,mapDetails:a,points:o,zoom:s,mapCenter:i,markerColor:l,scrollToZoom:c,mapHeight:u,showFullscreenButton:d}=e,p=o.map(((e,t)=>{const{longitude:r,latitude:a}=e.coordinates,o="https://www.google.com/maps/search/?api=1&query="+a+","+r;return(0,n.createElement)("li",{key:t},(0,n.createElement)("a",{href:o},e.title))})),m=t?`align${t}`:null;return(0,n.createElement)("div",{className:m,"data-map-style":r,"data-map-details":a,"data-points":JSON.stringify(o),"data-zoom":s,"data-map-center":JSON.stringify(i),"data-marker-color":l,"data-scroll-to-zoom":c||null,"data-map-height":u||null,"data-show-fullscreen-button":d||null},o.length>0&&(0,n.createElement)("ul",null,p))}}const s=o},740:(e,t,r)=>{"use strict";r.d(t,{Z:()=>C});var n=r(90017),a=r.n(n),o=r(51806),s=r(86989),i=r.n(s),l=r(52175),c=r(55609),u=r(94333),d=r(9818),p=r(69307),m=r(65736),h=r(81518),g=r(2944),f=r(75890),b=r(53036),v=r(1555),k=r(96406),y=r(82695),E=r(32566);const __=m.__,w={top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1};class _ extends p.Component{constructor(){super(...arguments),a()(this,"geoCodeAddress",((e,t)=>{t&&"mapkit"!==this.getMapProvider()&&(0,v.P)(e,t).then((e=>{if(e.features?.length){const t=e.features[0],r=[{title:t.text,placeTitle:t.text,caption:t.place_name,id:t.id,coordinates:{latitude:t.center[1],longitude:t.center[0]}}];this.props.setAttributes({points:r})}else this.onError(null,__("Could not find the coordinates of the provided address. Displaying default location. Feel free to add the location manually.","jetpack"))})).catch((e=>this.onError(null,e.message)))})),a()(this,"componentDidUpdate",(e=>{const t=this.props.attributes?.address,r=e.attributes?.address,n=this.props.attributes?.className,a=e.attributes?.className;t&&r!==t&&this.geoCodeAddress(t,this.state.apiKey),n&&a!==n&&!this.state.apiKey&&(this.setState({apiState:0}),this.apiCall())})),a()(this,"addPoint",(e=>{const{attributes:t,setAttributes:r}=this.props,{points:n}=t,a=n.slice(0);let o=!1;n.map((t=>{t.id===e.id&&(o=!0)})),o||(a.push(e),r({points:a}),this.setState({addPointVisibility:!1}))})),a()(this,"setPointVisibility",(()=>{this.setState({addPointVisibility:!0})})),a()(this,"updateAPIKeyControl",(e=>{this.setState({apiKeyControl:e.target.value})})),a()(this,"updateAPIKey",(()=>{const{noticeOperations:e}=this.props,{apiKeyControl:t}=this.state;e.removeAllNotices(),t&&this.apiCall(t,"POST")})),a()(this,"removeAPIKey",(()=>{this.apiCall(null,"DELETE")})),a()(this,"getMapProvider",(()=>{const e=(0,h.t)(y.X.styles,this.props?.attributes?.className);return(0,E.Z)({mapStyle:e})})),a()(this,"onError",((e,t)=>{const{noticeOperations:r}=this.props;r.removeAllNotices(),r.createErrorNotice(t)})),a()(this,"onMapResize",((e,t,r,n)=>{var a;const{onResizeStop:o,setAttributes:s}=this.props;o();const i=null!==(a=this.mapRef?.current?.mapRef)&&void 0!==a?a:this.mapRef;if(i){s({mapHeight:parseInt(i.current.offsetHeight+n.height,10)}),i.current.sizeMap&&setTimeout(i.current.sizeMap,0)}})),this.state={addPointVisibility:!1,apiState:0},this.mapRef=(0,p.createRef)()}apiCall(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET";return new Promise(((r,n)=>{const{noticeOperations:a}=this.props,o="/wpcom/v2/service-api-keys/mapbox",s=e?{path:o,method:t,data:{service_api_key:e}}:{path:o,method:t};this.setState({apiRequestOutstanding:!0},(()=>{i()(s).then((e=>{let{service_api_key:t,service_api_key_source:n}=e;a.removeAllNotices();const o=t?2:1,s="wpcom"===n?"":t;this.setState({apiState:o,apiKey:t,apiKeyControl:s,apiKeySource:n,apiRequestOutstanding:!1}),r()}),(e=>{let{message:t}=e;this.onError(null,t),this.setState({apiState:1,apiRequestOutstanding:!1}),n()}))}))}))}componentDidMount(){"mapbox"===this.getMapProvider()?this.apiCall().then((()=>{this.props.attributes?.address&&this.geoCodeAddress(this.props.attributes?.address,this.state.apiKey)})):this.setState({apiState:2})}render(){const{className:e,setAttributes:t,attributes:r,noticeUI:n,notices:a,isSelected:s,instanceId:i,onResizeStart:u}=this.props,{address:d,mapDetails:m,points:v,zoom:E,mapCenter:_,markerColor:C,preview:j,mapHeight:S,showFullscreenButton:x}=r,{addPointVisibility:P,apiKey:T,apiKeyControl:L,apiState:N,apiRequestOutstanding:A}=this.state,R=this.getMapProvider(),I=(0,o.createElement)(p.Fragment,null,(0,o.createElement)(l.BlockControls,null,(0,o.createElement)(b.Z,{attributes:r,setAttributes:t,state:this.state,setPointVisibility:this.setPointVisibility,context:"toolbar",mapRef:this.mapRef,mapProvider:R})),(0,o.createElement)(l.InspectorControls,null,(0,o.createElement)(b.Z,{attributes:r,setAttributes:t,state:this.state,setState:this.setState,mapRef:this.mapRef,instanceId:i,minHeight:400,removeAPIKey:this.removeAPIKey,updateAPIKey:this.updateAPIKey,mapProvider:R}))),M=(0,o.createElement)(c.Placeholder,{icon:y.X.icon},(0,o.createElement)(c.Spinner,null)),Z=(0,o.createElement)(p.Fragment,null,__("To use the map block, you need an Access Token.","jetpack"),(0,o.createElement)("br",null),(0,o.createElement)(c.ExternalLink,{href:"https://www.mapbox.com"},__("Create an account or log in to Mapbox.","jetpack")),(0,o.createElement)("br",null),__("Locate and copy the default access token. Then, paste it into the field below.","jetpack")),B=(0,o.createElement)(c.Placeholder,{icon:y.X.icon,label:__("Map","jetpack"),notices:a,instructions:Z},(0,o.createElement)(p.Fragment,null,(0,o.createElement)("form",null,(0,o.createElement)("input",{type:"text",className:"components-placeholder__input",disabled:A,placeholder:__("Paste Token Here","jetpack"),value:L,onChange:this.updateAPIKeyControl}),(0,o.createElement)(c.Button,{variant:"secondary",disabled:A||!L||L.length<1,onClick:this.updateAPIKey},__("Set Token","jetpack"))))),D=s&&v.length<=1,F=(0,h.t)(y.X.styles,r.className),z=(0,o.createElement)(p.Fragment,null,I,(0,o.createElement)("div",{className:e},(0,o.createElement)(c.ResizableBox,{size:{height:S||"auto",width:"100%"},grid:[10,10],showHandle:s,minHeight:400,enable:w,onResizeStart:u,onResizeStop:this.onMapResize},(0,o.createElement)("div",{className:"wp-block-jetpack-map__map_wrapper"},(0,o.createElement)(f.Z,{ref:this.mapRef,address:d,scrollToZoom:D,showFullscreenButton:x,mapStyle:F||"default",mapDetails:m,mapHeight:S,points:v,zoom:E,mapCenter:_,markerColor:C,onSetZoom:e=>{t({zoom:e})},admin:!0,apiKey:T,onSetPoints:e=>t({points:e}),onSetMapCenter:e=>t({mapCenter:e}),onMapLoaded:()=>this.setState({addPointVisibility:!v.length}),onMarkerClick:()=>this.setState({addPointVisibility:!1}),onError:this.onError,mapProvider:R},s&&P&&(0,o.createElement)(g.Z,{onAddPoint:this.addPoint,onClose:()=>this.setState({addPointVisibility:!1}),apiKey:T,onError:this.onError,tagName:"AddPoint",mapProvider:R})))))),O=y.X.styles.find((e=>e.name===F)),U=(0,o.createElement)("div",null,(0,o.createElement)("img",{alt:__("Map Preview","jetpack"),src:O?O.preview:k}));return(0,o.createElement)(p.Fragment,null,n,j&&U,!j&&0===N&&M,!j&&1===N&&B,!j&&2===N&&z)}}const C=(0,u.compose)([c.withNotices,(0,d.withDispatch)((e=>{const{toggleSelection:t}=e("core/block-editor");return{onResizeStart:()=>t(!1),onResizeStop:()=>t(!0)}}))])(_)},22055:(e,t,r)=>{"use strict";var n=r(31985),a=r(85406);(0,n.Z)(a.u,a.X)},1555:(e,t,r)=>{"use strict";function n(e,t){return fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURIComponent(e)}.json?access_token=${encodeURIComponent(t)}`).then((e=>e.json()))}r.d(t,{P:()=>n})},85406:(e,t,r)=>{"use strict";r.d(t,{X:()=>u,u:()=>c});var n=r(70355),a=r(55109),o=r(45051),s=r(740),i=r(19496),l=r(82695);const{name:c}=l.X,u={title:l.X.title,icon:{src:l.X.icon,foreground:(0,n.m)()},category:l.X.category,keywords:l.X.keywords,description:l.X.description,attributes:l.X.attributes,supports:l.X.supports,styles:l.X.styles,getEditWrapperProps(e){const{align:t}=e;if(-1!==l.X.validAlignments.indexOf(t))return{"data-align":t}},edit:s.Z,save:i.Z,example:l.X.example,deprecated:[o.Z,a.Z]}},31852:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(3142),o=r(3156);const s=e=>{const t="mapbox"===e.mapProvider?a.Z:o.Z;return(0,n.createElement)(t,e)}},3142:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(90017),a=r.n(n),o=r(51806),s=r(55609),i=r(69307),l=r(65736),c=r(96881);const u=(0,l.__)("Add a marker…","jetpack");class d extends i.Component{constructor(){super(...arguments),a()(this,"getOptionCompletion",(e=>{const{value:t}=e,r={placeTitle:t.text,title:t.text,caption:t.place_name,id:t.id,coordinates:{longitude:t.geometry.coordinates[0],latitude:t.geometry.coordinates[1]}};return this.props.onAddPoint(r),t.text})),a()(this,"search",(e=>{const{apiKey:t,onError:r}=this.props,n="https://api.mapbox.com/geocoding/v5/mapbox.places/"+encodeURI(e)+".json?access_token="+t;return new Promise((function(e,t){const a=new XMLHttpRequest;a.open("GET",n),a.onload=function(){if(200===a.status){const t=JSON.parse(a.responseText);e(t.features)}else{const e=JSON.parse(a.responseText);r(e.statusText,e.responseJSON.message),t(new Error("Mapbox Places Error"))}},a.send()}))})),a()(this,"onReset",(()=>{this.textRef.current.value=null})),this.textRef=(0,i.createRef)(),this.containerRef=(0,i.createRef)(),this.state={isEmpty:!0},this.autocompleter={name:"placeSearch",options:this.search,isDebounced:!0,getOptionLabel:e=>(0,o.createElement)("span",null,e.place_name),getOptionKeywords:e=>[e.place_name],getOptionCompletion:this.getOptionCompletion}}componentDidMount(){setTimeout((()=>{this.containerRef.current.querySelector("input").focus()}),50)}render(){const{label:e}=this.props;return(0,o.createElement)("div",{ref:this.containerRef},(0,o.createElement)(s.BaseControl,{label:e,className:"components-location-search"},(0,o.createElement)(c.Z,{completer:this.autocompleter,onReset:this.onReset},(e=>{let{isExpanded:t,listBoxId:r,activeId:n,onChange:a,onKeyDown:i}=e;return(0,o.createElement)(s.TextControl,{placeholder:u,ref:this.textRef,onChange:a,"aria-expanded":t,"aria-owns":r,"aria-activedescendant":n,onKeyDown:i})}))))}}d.defaultProps={onError:()=>{}};const p=d},3156:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(51806),a=r(55609),o=r(69307),s=r(65736),i=r(96881),l=r(72672);const c=(0,s.__)("Add a marker…","jetpack"),u=e=>{let{label:t,onAddPoint:r}=e;const s=(0,o.useRef)(),u=(0,o.useRef)(),{mapkit:d}=(0,l.qw)(),p={name:"placeSearch",options:async e=>new Promise((function(t,r){new d.Search({includePointsOfInterest:!1}).autocomplete(e,((e,n)=>{var a;if(e)return void r(e);const o=(null!==(a=n?.results.filter((e=>e.coordinate)))&&void 0!==a?a:[]).map((e=>({...e,placeName:e.displayLines?.join(", ")})));t(o)}))})),isDebounced:!0,getOptionLabel:e=>(0,n.createElement)("span",null,e.placeName),getOptionKeywords:e=>[e.placeName],getOptionCompletion:e=>{const{value:t}=e,n={placeTitle:t.placeName,title:t.placeName,caption:t.placeName,coordinates:{longitude:t.coordinate.longitude,latitude:t.coordinate.latitude},id:`${t.placeName} ${Number(t.coordinate.latitude).toFixed(2)} ${Number(t.coordinate.longitude).toFixed(2)}`};return r(n),t.placeName}};return(0,o.useEffect)((()=>{setTimeout((()=>{s.current.querySelector("input").focus()}),50)}),[]),(0,n.createElement)("div",{ref:s},(0,n.createElement)(a.BaseControl,{label:t,className:"components-location-search"},(0,n.createElement)(i.Z,{completer:p,onReset:()=>{u.current.value=""}},(e=>{let{isExpanded:t,listBoxId:r,activeId:o,onChange:s,onKeyDown:i}=e;return(0,n.createElement)(a.TextControl,{placeholder:c,ref:u,onChange:s,"aria-expanded":t,"aria-owns":r,"aria-activedescendant":o,onKeyDown:i})}))))}},57897:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(90017),a=r.n(n),o=r(51806),s=r(55609),i=r(69307);class l extends i.Component{constructor(){super(...arguments),a()(this,"onDeletePoint",(e=>{const t=parseInt(e.target.getAttribute("data-id")),{points:r,onChange:n}=this.props,a=r.slice(0);a.splice(t,1),n(a)})),this.state={selectedCell:null}}setMarkerField(e,t,r){const{points:n,onChange:a}=this.props,o=n.slice(0);o[r][e]=t,a(o)}render(){const{points:e}=this.props,t=e.map(((e,t)=>(0,o.createElement)(s.PanelBody,{title:e.placeTitle,key:e.id,initialOpen:!1},(0,o.createElement)(s.TextControl,{label:"Marker Title",value:e.title,onChange:e=>this.setMarkerField("title",e,t)}),(0,o.createElement)(s.TextareaControl,{label:"Marker Caption",value:e.caption,rows:"3",onChange:e=>this.setMarkerField("caption",e,t)}),(0,o.createElement)(s.Button,{"data-id":t,onClick:this.onDeletePoint,className:"component__locations__delete-btn"},(0,o.createElement)(s.Dashicon,{icon:"trash",size:"15"})," Delete Marker"))));return(0,o.createElement)("div",{className:"component__locations"},(0,o.createElement)(s.Panel,{className:"component__locations__panel"},t))}}l.defaultProps={points:Object.freeze([]),onChange:()=>{}};const c=l},96881:(e,t,r)=>{"use strict";r.d(t,{Z:()=>f});var n=r(90017),a=r.n(n),o=r(51806),s=r(55609),i=r(94333),l=r(69307),c=r(65736),u=r(39630),d=r(65235),p=r.n(d),m=r(92819);const __=c.__,_n=c._n;function h(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const r=[];for(let n=0;n<e.length;n++){const a=e[n];let{keywords:o=[]}=a;if("string"==typeof a.label&&(o=[...o,a.label]),r.push(a),r.length===t)break}return r}class g extends l.Component{static getInitialState(){return{selectedIndex:0,query:void 0,filteredOptions:[],isOpen:!1}}constructor(){super(...arguments),a()(this,"select",(e=>{const{completer:t}=this.props;(t.getOptionCompletion||{})(e),this.reset()})),a()(this,"reset",(()=>{this.setState(this.constructor.getInitialState())})),a()(this,"onChange",(e=>{const{completer:t}=this.props,{options:r}=this.state;if(!e)return void this.reset();t&&(t.isDebounced?this.debouncedLoadOptions(t,e):this.loadOptions(t,e));const n=t?h(r):[];t&&this.setState({selectedIndex:0,filteredOptions:n,query:e})})),a()(this,"onKeyDown",(e=>{const{isOpen:t,selectedIndex:r,filteredOptions:n}=this.state;if(!t)return;let a;switch(e.keyCode){case u.UP:a=(0===r?n.length:r)-1,this.setState({selectedIndex:a});break;case u.DOWN:a=(r+1)%n.length,this.setState({selectedIndex:a});break;case u.ENTER:this.select(n[r]);break;case u.LEFT:case u.RIGHT:case u.ESCAPE:return void this.reset();default:return}e.preventDefault(),e.stopPropagation()})),this.debouncedLoadOptions=(0,m.debounce)(this.loadOptions,250),this.state=this.constructor.getInitialState()}componentWillUnmount(){this.debouncedLoadOptions.cancel()}handleFocusOutside(){this.reset()}loadOptions(e,t){const{options:r}=e,n=this.activePromise=Promise.resolve("function"==typeof r?r(t):r).then((t=>{if(n!==this.activePromise)return;const r=t.map(((t,r)=>({key:`${r}`,value:t,label:e.getOptionLabel(t),keywords:e.getOptionKeywords?e.getOptionKeywords(t):[]}))),a=h(r),o=a.length===this.state.filteredOptions.length?this.state.selectedIndex:0;this.setState({options:r,filteredOptions:a,selectedIndex:o,isOpen:a.length>0}),this.announce(a)}))}announce(e){const{debouncedSpeak:t}=this.props;t&&(e.length?t((0,c.sprintf)(/* translators: placeholder is a number. */
_n("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length,"jetpack","jetpack"),e.length),"assertive"):t(__("No results.","jetpack"),"assertive"))}render(){const{onChange:e,onKeyDown:t}=this,{children:r,instanceId:n,completer:a}=this.props,{selectedIndex:i,filteredOptions:l}=this.state,{key:c=""}=l[i]||{},{className:u}=a,d=l.length>0,h=d?`components-autocomplete-listbox-${n}`:null,g=d?`components-autocomplete-item-${n}-${c}`:null;return(0,o.createElement)("div",{className:"components-autocomplete"},r({isExpanded:d,listBoxId:h,activeId:g,onChange:e,onKeyDown:t}),d&&(0,o.createElement)(s.Popover,{focusOnMount:!1,onClose:this.reset,position:"top center",className:"components-autocomplete__popover",noArrow:!0},(0,o.createElement)("div",{id:h,role:"listbox",className:"components-autocomplete__results"},(0,m.map)(l,((e,t)=>(0,o.createElement)(s.Button,{key:e.key,id:`components-autocomplete-item-${n}-${e.key}`,role:"option","aria-selected":t===i,disabled:e.isDisabled,className:p()("components-autocomplete__result",u,{"is-selected":t===i}),onClick:()=>this.select(e)},e.label))))))}}const f=(0,i.compose)([s.withSpokenMessages,i.withInstanceId,s.withFocusOutside])(g)},90055:(e,t,r)=>{"use strict";function n(e,t){return{default:{details:"mapbox://styles/automattic/cjolkhmez0qdd2ro82dwog1in",no_details:"mapbox://styles/automattic/cjolkci3905d82soef4zlmkdo"},black_and_white:{details:"mapbox://styles/automattic/cjolkixvv0ty42spgt2k4j434",no_details:"mapbox://styles/automattic/cjolkgc540tvj2spgzzoq37k4"},satellite:{details:"mapbox://styles/mapbox/satellite-streets-v10",no_details:"mapbox://styles/mapbox/satellite-v9"},terrain:{details:"mapbox://styles/automattic/cjolkf8p405fh2soet2rdt96b",no_details:"mapbox://styles/automattic/cjolke6fz12ys2rpbpvgl12ha"}}[e][t?"details":"no_details"]}r.d(t,{h:()=>n})},84634:(e,t,r)=>{"use strict";r.d(t,{YB:()=>a,b2:()=>n,k:()=>o,xt:()=>i,zb:()=>s});const n=e=>e.hasOwnProperty("lat")&&e.hasOwnProperty("lng")?e:{lat:e.latitude||0,lng:e.longitude||0};function a(e,t){const r=new e.LngLatBounds;return t.forEach((e=>{r.extend([e.coordinates.longitude,e.coordinates.latitude])})),r}function o(e,t){e.fitBounds(t,{padding:{top:80,bottom:80,left:40,right:40}})}function s(e,t){e.innerHTML=`\n\t\t<?xml version="1.0" encoding="UTF-8"?>\n\t\t<svg version="1.1" viewBox="0 0 32 38" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n\t\t\t<g fill-rule="evenodd">\n\t\t\t\t<path id="d" d="m16 38s16-11.308 16-22-7.1634-16-16-16-16 5.3076-16 16 16 22 16 22z" fill="${t}"/>\n\t\t\t</g>\n\t\t</svg>\n\t`}function i(e){return new e.Popup({closeButton:!0,closeOnClick:!1,offset:{left:[0,0],top:[0,5],right:[0,0],bottom:[0,-40]}})}},96442:(e,t,r)=>{"use strict";r.d(t,{E0:()=>d,E_:()=>i,F7:()=>l,eR:()=>c,ot:()=>s,rZ:()=>u});var n=r(85007);const a=6371e3;function o(e){return Math.abs(a*Math.cos(e*Math.PI/180)*2*Math.PI/256)}function s(e,t){return 512/Math.pow(2,e)*.5*o(t)}function i(e,t){const r=e/o(t);return Math.log2(512/(r/.5))}function l(e,t){if(0===t.length)return null;const r=new e.Coordinate(-90,180),n=new e.Coordinate(90,-180);t.forEach((e=>{r.latitude=Math.max(r.latitude,e.coordinates.latitude),r.longitude=Math.min(r.longitude,e.coordinates.longitude),n.latitude=Math.min(n.latitude,e.coordinates.latitude),n.longitude=Math.max(n.longitude,e.coordinates.longitude)}));const a=new e.Coordinate(r.latitude-.5*(r.latitude-n.latitude),r.longitude+.5*(n.longitude-r.longitude)),o=new e.CoordinateSpan(1.3*Math.abs(r.latitude-n.latitude),1.3*Math.abs(n.longitude-r.longitude));return new e.CoordinateRegion(a,o)}function c(e,t){return()=>{const r=e.createElement("div");return r.classList.add("mapkit-popup-content"),t(r),r}}function u(e,t){return new Promise((r=>{if(t.mapkitScriptIsLoading)(0,n.Dz)(t,"mapkit").then((e=>{r(e)}));else{t.mapkitScriptIsLoading=!0;const a=e.createElement("script");a.addEventListener("load",(async()=>{const e=await(0,n.Dz)(t,"mapkit");t.mapkitScriptIsLoading=!1,r(e)}),{once:!0}),a.src="https://cdn.apple-mapkit.com/mk/5.x.x/mapkit.js",a.crossOrigin="anonymous",e.head.appendChild(a)}}))}function d(e,t,r){return new Promise(((t,n)=>{r.mapkitIsInitialized?t():r.mapkitIsInitializing?function(e){return new Promise(((t,r)=>{const n=()=>{void 0===e.mapkitIsInitializing?r():!1===e.mapkitIsInitializing?t():e.requestAnimationFrame(n)};n()}))}(r).then((()=>{t()})):(r.mapkitIsInitializing=!0,r.mapkitIsInitialized=!1,e.init({authorizationCallback:async e=>{try{const a=await fetch("https://public-api.wordpress.com/wpcom/v2/mapkit");if(200===a.status){e((await a.json()).wpcom_mapkit_access_token)}else n();r.mapkitIsInitializing=!1,r.mapkitIsInitialized=!0,t()}catch(e){n()}}}))}))}},32037:(e,t,r)=>{"use strict";r.d(t,{L:()=>o,c:()=>s});var n=r(51806),a=r(69307);const o=(0,a.createContext)({map:null,mapkit:null,loaded:!1,activeMarker:null,calloutReference:null,currentDoc:null,currentWindow:null,admin:!1,setPoints:()=>{},points:[],previousCenter:null}),s=e=>{let{value:t,children:r}=e;const[s,i]=(0,a.useState)(null),[l,c]=(0,a.useState)(null),[u,d]=(0,a.useState)(null);return(0,n.createElement)(o.Provider,{value:{...t,activeMarker:s,setActiveMarker:i,calloutReference:l,setCalloutReference:c,previousCenter:u,setPreviousCenter:d}},r)}},72672:(e,t,r)=>{"use strict";r.d(t,{$M:()=>m,J2:()=>b,LO:()=>h,Xj:()=>g,eV:()=>p,jo:()=>v,mk:()=>k,qw:()=>d,wd:()=>y,zZ:()=>f});var n=r(80428),a=r(9818),o=r(69307),s=r(65736),i=r(92819),l=r(85007),c=r(96442),u=r(32037);const __=s.__,d=()=>(0,o.useContext)(u.L),p=e=>{const[t,r]=(0,o.useState)(!1),[s,i]=(0,o.useState)(!1),[u,d]=(0,o.useState)(null),[p,m]=(0,o.useState)(null),[h,g]=(0,o.useState)(null);return(0,o.useEffect)((()=>{const t=(0,a.select)(n.t).getBlogId(),{currentDoc:o,currentWindow:s}=(0,l.bL)(e.current);if(e.current){m(s),g(o);const e=__("Failed to retrieve a Mapkit API token. Please try refreshing.","jetpack");s.mapkit?(d(s.mapkit),(0,c.E0)(s.mapkit,t,s).then((()=>{r(!0)}),(()=>{i(e)}))):(0,c.rZ)(o,s).then((n=>{d(n),(0,c.E0)(n,t,s).then((()=>{r(!0)}),(()=>{i(e)}))}))}}),[e]),{loaded:t,error:s,mapkit:u,currentDoc:h,currentWindow:p}},m=(e,t,r)=>{const[n,a]=(0,o.useState)(null);return(0,o.useEffect)((()=>{e&&t&&a(new e.Map(r.current,{showsMapTypeControl:!1}))}),[e,t,r]),{map:n}},h=(e,t)=>{const{mapkit:r,map:n}=d(),a=(0,o.useRef)(e),s=(0,o.useRef)(t);(0,o.useEffect)((()=>{var e,t;if(!r||!n||!a.current)return;const o=null!==(e=a.current?.lat)&&void 0!==e?e:a.current?.latitude,s=null!==(t=a.current?.lng)&&void 0!==t?t:a.current?.longitude;"number"==typeof o&&"number"==typeof s&&(n.center=new r.Coordinate(o,s))}),[r,n,a]),(0,o.useEffect)((()=>{if(!r||!n)return;const e=()=>{if(n.center){const{latitude:e,longitude:t}=n.center;s.current({lat:e,lng:t})}};return n.addEventListener("region-change-end",(0,i.debounce)(e,1e3)),()=>{n.removeEventListener("region-change-end",e)}}),[r,n,s])},g=e=>{const{mapkit:t,map:r}=d();(0,o.useEffect)((()=>{t&&r&&(r.mapType=(()=>{switch(e){case"satellite":return t.Map.MapTypes.Satellite;case"black_and_white":return t.Map.MapTypes.MutedStandard;case"hybrid":return t.Map.MapTypes.Hybrid;default:return t.Map.MapTypes.Standard}})())}),[t,r,e])},f=(e,t)=>{const{mapkit:r,map:n,points:a}=d();(0,o.useEffect)((()=>{if(r&&n)if(a&&a.length<=1){const t=(0,c.ot)(13,n.center.latitude);if(e){const t=(0,c.ot)(e,n.center.latitude);t!==n.cameraDistance&&(n.cameraDistance=t)}else t!==n.cameraDistance&&(n.cameraDistance=t);n.isZoomEnabled=!0,n.isScrollEnabled=!0}else n.region=(0,c.F7)(r,a),n.isZoomEnabled=!1,n.isScrollEnabled=!1}),[r,n,e,a]),(0,o.useEffect)((()=>{const e=()=>{t((0,c.E_)(n.cameraDistance,n.center.latitude))};return n.addEventListener("zoom-end",e),()=>{n.removeEventListener("zoom-end",e)}}),[r,n,t])},b=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const{mapkit:a,map:s,loaded:i}=d(),l=(0,o.useRef)(r),c=(0,o.useRef)(n);(0,o.useEffect)((()=>{if(i){s.annotations.filter((t=>!e.find((e=>e.id===t.data.id)))).forEach((e=>s.removeAnnotation(e)));const r=e.map((e=>{const r=s.annotations.find((t=>t.data.id===e.id));if(r)return r.title=e.title,r.color=t,r;const n=new a.MarkerAnnotation(new a.Coordinate(e.coordinates.latitude,e.coordinates.longitude),{color:t,data:{id:e.id}});return n.calloutEnabled=!0,n.title=e.title,l.current&&(n.callout={calloutElementForAnnotation:l.current}),c.current&&n.addEventListener("select",(()=>c.current(e,s))),n}));s.annotations.length!==r.length&&s.showItems(r)}}),[e,i,s,a,t,l,c])},v=e=>{const{map:t,loaded:r}=d(),n=(0,o.useRef)(e);(0,o.useEffect)((()=>{r&&n.current(t)}),[r,t,n])},k=e=>{const{map:t,previousCenter:r,loaded:n}=d(),a=(0,o.useRef)(e);(0,o.useEffect)((()=>{n&&t.addEventListener("single-tap",(()=>{a.current(r)}))}),[n,t,r,a])},y=(e,t)=>{const{mapkit:r,map:n}=d();(0,o.useEffect)((()=>{if(r&&n&&e?.length){(new r.Geocoder).lookup(e,((e,r)=>{if(r?.results?.length){const e=r.results[0],n=e.formattedAddress,a={placeTitle:n,title:n,caption:n,coordinates:{longitude:e.coordinate.longitude,latitude:e.coordinate.latitude},id:`${n} ${Number(e.coordinate.latitude).toFixed(2)} ${Number(e.coordinate.longitude).toFixed(2)}`};t.current([a])}}))}}),[r,n,e,t])}},19496:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(69307),o=r(81518),s=r(82695);class i extends a.Component{render(){const{attributes:e}=this.props,{align:t,className:r,mapDetails:a,points:i,zoom:l,mapCenter:c,markerColor:u,scrollToZoom:d,mapHeight:p,showFullscreenButton:m}=e,h=(0,o.t)(s.X.styles,r),g=i.map(((e,t)=>{const{longitude:r,latitude:a}=e.coordinates,o="https://www.google.com/maps/search/?api=1&query="+a+","+r;return(0,n.createElement)("li",{key:t},(0,n.createElement)("a",{href:o},e.title))})),f=t?`align${t}`:null;return(0,n.createElement)("div",{className:f,"data-map-style":h,"data-map-details":a,"data-points":JSON.stringify(i),"data-zoom":l,"data-map-center":JSON.stringify(c),"data-marker-color":u,"data-scroll-to-zoom":d||null,"data-map-height":p||null,"data-show-fullscreen-button":m||null},i.length>0&&(0,n.createElement)("ul",null,g))}}const l=i},82695:(e,t,r)=>{"use strict";r.d(t,{X:()=>h});var n=r(51806),a=r(65736),o=r(80469),s=r(7247),i=r(13925),l=r(24873),c=r(25685),u=r(81667),d=r(15387),p=r(32566);const __=a.__,_x=a._x,m=(0,p.Z)(),h={name:"map",prefix:"jetpack",title:__("Map","jetpack"),icon:(0,n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},(0,n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),(0,n.createElement)("path",{d:"M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM10 5.47l4 1.4v11.66l-4-1.4V5.47zm-5 .99l3-1.01v11.7l-3 1.16V6.46zm14 11.08l-3 1.01V6.86l3-1.16v11.84z"})),category:"embed",keywords:[_x("maps","block search term","jetpack"),_x("location","block search term","jetpack"),_x("navigation","block search term","jetpack")],description:__("Add an interactive map showing one or more locations.","jetpack"),attributes:{align:{type:"string"},points:{type:"array",default:[]},address:{type:"string",default:""},mapDetails:{type:"boolean",default:!0},zoom:{type:"integer",default:13},mapCenter:{type:"object",default:{longitude:-122.41941550000001,latitude:37.7749295}},markerColor:{type:"string",default:"red"},preview:{type:"boolean",default:!1},scrollToZoom:{type:"boolean",default:!1},mapHeight:{type:"integer"},showFullscreenButton:{type:"boolean",default:!0}},supports:{defaultStylePicker:!1,html:!1},styles:[{name:"default",label:__("Basic","jetpack"),preview:"mapkit"===m?l:i,isDefault:!0},{name:"black_and_white",label:"mapkit"===m?__("Muted","jetpack",0):__("Black & White","jetpack"),preview:"mapkit"===m?s:o},{name:"satellite",label:__("Satellite","jetpack"),preview:"mapkit"===m?u:c},{name:"terrain",label:__("Terrain","jetpack"),preview:d}],validAlignments:["center","wide","full"],markerIcon:(0,n.createElement)("svg",{width:"14",height:"20",viewBox:"0 0 14 20",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)("g",{id:"Page-1",fill:"none",fillRule:"evenodd"},(0,n.createElement)("g",{id:"outline-add_location-24px",transform:"translate(-5 -2)"},(0,n.createElement)("polygon",{id:"Shape",points:"0 0 24 0 24 24 0 24"}),(0,n.createElement)("path",{d:"M12,2 C8.14,2 5,5.14 5,9 C5,14.25 12,22 12,22 C12,22 19,14.25 19,9 C19,5.14 15.86,2 12,2 Z M7,9 C7,6.24 9.24,4 12,4 C14.76,4 17,6.24 17,9 C17,11.88 14.12,16.19 12,18.88 C9.92,16.21 7,11.85 7,9 Z M13,6 L11,6 L11,8 L9,8 L9,10 L11,10 L11,12 L13,12 L13,10 L15,10 L15,8 L13,8 L13,6 Z",id:"Shape",fill:"#000",fillRule:"nonzero"})))),example:{attributes:{preview:!0}}}},32566:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=e=>{if(e?.mapStyle&&["terrain"].includes(e.mapStyle))return"mapbox";const t=function(e){const t=`; ${document.cookie}`.split(`; ${e}=`);if(2===t.length)return t.pop().split(";").shift()}("map_provider");return t||(window&&"string"==typeof window.Jetpack_Maps?.provider&&["mapbox","mapkit"].includes(window.Jetpack_Maps?.provider)?window.Jetpack_Maps?.provider:"mapbox")}},51321:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)e.style.height=t+"px";else{const t=e.offsetWidth,r=window.location.search.indexOf("map-block-counter")>-1?window.innerHeight:.8*window.innerHeight,n=Math.min(t*(3/4),r);e.style.height=n+"px"}}},461:(e,t,r)=>{"use strict";r.d(t,{Z:()=>b});var n=r(90017),a=r.n(n),o=r(51806),s=r(52175),i=r(94333),l=r(9818),c=r(69307),u=r(65736),d=r(65235),p=r.n(d),m=r(69283);const __=u.__,h="editor",g="preview";class f extends c.Component{constructor(){super(...arguments),a()(this,"input",null),a()(this,"state",{activePanel:h}),a()(this,"bindInput",(e=>{this.input=e})),a()(this,"updateSource",(e=>this.props.setAttributes({source:e}))),a()(this,"handleKeyDown",(e=>{const{attributes:t,removeBlock:r}=this.props,{source:n}=t;8===e.keyCode&&""===n&&(r(),e.preventDefault())})),a()(this,"toggleMode",(e=>()=>this.setState({activePanel:e})))}componentDidUpdate(e){e.isSelected&&!this.props.isSelected&&this.state.activePanel===g&&this.toggleMode(h)(),!e.isSelected&&this.props.isSelected&&this.state.activePanel===h&&this.input&&this.input.focus()}isEmpty(){const e=this.props.attributes.source;return!e||""===e.trim()}renderToolbarButton(e,t){const{activePanel:r}=this.state,{className:n}=this.props,a=p()(n,"components-button components-tab-button",{"is-pressed":r===e});return(0,o.createElement)("button",{className:a,onClick:this.toggleMode(e)},(0,o.createElement)("span",null,t))}render(){const{attributes:e,className:t,isSelected:r}=this.props,{source:n}=e,{activePanel:a}=this.state;return!r&&this.isEmpty()?(0,o.createElement)("p",{className:`${t}__placeholder`},__("Write your _Markdown_ **here**…","jetpack")):(0,o.createElement)("div",{className:t},(0,o.createElement)(s.BlockControls,null,(0,o.createElement)("div",{className:"components-toolbar"},this.renderToolbarButton(h,__("Markdown","jetpack")),this.renderToolbarButton(g,__("Preview","jetpack")))),a!==g&&r?(0,o.createElement)(s.PlainText,{className:`${t}__editor`,onChange:this.updateSource,onKeyDown:this.handleKeyDown,"aria-label":__("Markdown","jetpack"),innerRef:this.bindInput,value:n}):(0,o.createElement)(m.Z,{className:`${t}__preview`,source:n}))}}const b=(0,i.compose)([(0,l.withSelect)((e=>({currentBlockId:e("core/block-editor").getSelectedBlockClientId()}))),(0,l.withDispatch)(((e,t)=>{let{currentBlockId:r}=t;return{removeBlock:()=>e("core/block-editor").removeBlocks(r)}}))])(f)},49702:(e,t,r)=>{"use strict";var n=r(31985),a=r(80723);(0,n.Z)(a.u,a.X)},80723:(e,t,r)=>{"use strict";r.d(t,{X:()=>b,u:()=>p});var n=r(51806),a=r(13419),o=r(55609),s=r(69307),i=r(65736),l=r(70355),c=r(5820),u=r(461),d=r(2683);const __=i.__,_x=i._x,p="markdown",m=__("Try Markdown","jetpack"),h=__("Markdown is a text formatting syntax that is converted into HTML. You can _emphasize_ text or **make it strong** with just a few characters.","jetpack"),g=(0,n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 208 128"},(0,n.createElement)(o.Rect,{width:"198",height:"118",x:"5",y:"5",ry:"10",stroke:"currentColor",strokeWidth:"10",fill:"none"}),(0,n.createElement)(o.Path,{d:"M30 98v-68h20l20 25 20-25h20v68h-20v-39l-20 25-20-25v39zM155 98l-30-33h20v-35h20v35h20z"})),f=(0,a.Wp)()||(0,a.Ug)()?"https://en.support.wordpress.com/markdown-quick-reference/":"https://jetpack.com/support/jetpack-blocks/markdown-block/",b={title:__("Markdown","jetpack"),description:(0,n.createElement)(s.Fragment,null,(0,n.createElement)("p",null,__("Use regular characters and punctuation to style text, links, and lists.","jetpack")),(0,n.createElement)(o.ExternalLink,{href:f},__("Support reference","jetpack"))),icon:{src:g,foreground:(0,l.m)()},category:(0,c.Z)("text","formatting"),keywords:[_x("formatting","block search term","jetpack"),_x("syntax","block search term","jetpack"),_x("markup","block search term","jetpack")],attributes:{source:{type:"string"}},supports:{align:["wide","full"],html:!1,spacing:{padding:!0,margin:!0,__experimentalDefaultControls:{padding:!0,margin:!0}}},edit:u.Z,save:d.Z,example:{attributes:{source:`## ## ${m}\n\n${h}`}}}},69283:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h});var n=r(51806),a=r(52175),o=r(69307),s=r(65736),i=r(10185),l=r.n(i),c=r(82339),u=r.n(c);const __=s.__,d=new(l())({typographer:!0}).use(u()),p=e=>{if("A"===e.target.nodeName){window.confirm(__("Are you sure you wish to leave this page?","jetpack"))||e.preventDefault()}},m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,a.__experimentalGetSpacingClassesAndStyles)?.(e);return t?.style?t.style:{}},h=e=>{let{className:t,source:r="",attributes:a}=e;return(0,n.createElement)(o.RawHTML,{className:t,onClick:p,style:m(a)},r.length?d.render(r):"")}},2683:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(69283);const o=e=>{let{attributes:t,className:r}=e;return(0,n.createElement)(a.Z,{className:r,source:t.source,attributes:t})}},31283:(e,t,r)=>{"use strict";r.d(t,{Eo:()=>c,V1:()=>s,ez:()=>m,fL:()=>u,jn:()=>l,vW:()=>i});var n,a=r(65736),o=r(92819);const __=a.__,s=[{value:"en-US",label:"English"},{value:"fr-CA",label:"Français"},{value:"de-DE",label:"Deutsch"},{value:"es-MX",label:"Español"},{value:"ja-JP",label:"日本語"},{value:"nl-NL",label:"Nederlands"},{value:"it-IT",label:"Italiano"}],i=s.map((e=>e.value));const l={name:"button",label:__("Button (210 x 113 pixels)","jetpack")},c=e=>(0,o.compact)([{name:"standard",label:__("Standard (224 x 301 pixels)","jetpack"),isDefault:!0},{name:"tall",label:__("Tall (288 x 490 pixels)","jetpack")},{name:"wide",label:__("Wide (840 x 150 pixels)","jetpack")},(!e||1===e.length)&&l]),u=e=>c(e).map((e=>e.name)),d=null!==(n=window?.Jetpack_Editor_Initial_State?.siteLocale)&&void 0!==n?n:"en-US",p=!(0,o.isEmpty)(d)&&i.includes(d)?d:"en-US",m={rid:{default:[],type:"array"},style:{default:"standard",type:"string",validValues:u()},iframe:{default:!0,type:"boolean"},domain:{default:"com",type:"string"},lang:{default:p,type:"string",validValues:i},newtab:{default:!1,type:"boolean"},negativeMargin:{default:!1,type:"boolean"}}},80452:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(51806);const a={attributes:r(31283).ez,supports:{align:!0,html:!1},save:e=>{let{attributes:{rid:t}}=e;return(0,n.createElement)(n.Fragment,null,t.map((e=>(0,n.createElement)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`},`https://www.opentable.com/restref/client/?rid=${e}`))))}}},70398:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(51806);const a={attributes:r(31283).ez,migrate:e=>{const{style:t,className:r}=e,n="standard"===t?"":`is-style-${t}`;return{...e,className:r?`${r} ${n}`:n}},isEligible:e=>{let{style:t,className:r}=e;return!(!t||"standard"===t)&&(!r||-1===r.indexOf("is-style-"))},save:e=>{let{attributes:{rid:t}}=e;return(0,n.createElement)("div",null,t.map((e=>(0,n.createElement)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`},`https://www.opentable.com/restref/client/?rid=${e}`))))}}},76851:(e,t,r)=>{"use strict";r.d(t,{Z:()=>y});var n=r(51806),a=r(13419),o=r(52175),s=r(4981),i=r(55609),l=r(69307),c=r(65736),u=r(65235),d=r.n(u),p=r(92819),m=r(81518),h=r(4554),g=r(31283),f=r(15040),b=r(57087),v=r(41007),k=r(48769);const __=c.__;const y=(0,i.withNotices)((function(e){let{attributes:t,className:r,clientId:u,isSelected:y,name:E,noticeOperations:w,noticeUI:_,setAttributes:C}=e;const j=(0,s.getBlockDefaultClassName)(E),S=(0,h.S)(g.ez,t);(0,p.isEqual)(S,t)||C(S);const{align:x,rid:P,iframe:T,domain:L,lang:N,newtab:A,negativeMargin:R}=t,I=(0,p.isEmpty)(P),M=(0,m.t)((0,g.Eo)(),t.className),Z=(0,m.t)((0,g.Eo)(P),t.className),B=(0,v.Z)(Z),D=(0,p.isEqual)(P,["1"]);(0,l.useEffect)((()=>{if(w.removeAllNotices(),!I&&!D&&"wide"===Z&&"wide"!==x&&"full"!==x){const e=(0,n.createElement)(n.Fragment,null,__('With the OpenTable block you may encounter display issues if you use its "wide" style with anything other than "wide" or "full" alignment. The wide display style may also not work well on smaller screens.',"jetpack"));w.createNotice({status:"warning",content:e})}}),[D,x,I,P,Z]),(0,l.useEffect)((()=>{"button"===M&&Array.isArray(P)&&P.length>1&&C({className:"",style:""})}),[P,M,C]),(0,l.useEffect)((()=>{y&&(Array.isArray(P)&&P.length>1?(0,s.unregisterBlockStyle)("jetpack/opentable",["button"]):(0,s.registerBlockStyle)("jetpack/opentable",g.jn))}),[y,P]),(0,l.useEffect)((()=>{"wide"===B&&"wide"===x&&C({align:""}),"wide"===Z&&B&&Z!==B&&C({align:"wide"}),C({style:Z})}),[Z]);const F=(0,g.fL)(P),z=e=>P.length>1?["multi","button"!==e?e:"standard"]:["button"===e?"button":"standard","button"===e?"standard":e],O=e=>{Array.isArray(e)?C({rid:e,style:e.length>1&&"button"===Z?"standard":Z}):(e=>{const t=(0,k.CC)(e);t||(w.removeAllNotices(),w.createErrorNotice((0,n.createElement)(n.Fragment,null,(0,n.createElement)("strong",null,__("We ran into an issue","jetpack")),(0,n.createElement)("br",null),__("Please ensure this embed matches the one from your OpenTable account","jetpack"))));const r=(0,h.S)(g.ez,t);C(r),w.removeAllNotices()})(e)},U=(0,n.createElement)(n.Fragment,null,(0,n.createElement)(o.InspectorAdvancedControls,null,(0,n.createElement)(i.ToggleControl,{label:__("Load the widget in an iFrame (Recommended)","jetpack"),checked:T,onChange:()=>C({iframe:!T}),className:"is-opentable"}),"button"===Z&&(0,n.createElement)(i.ToggleControl,{label:__("Remove button margin","jetpack"),checked:R,onChange:()=>C({negativeMargin:!R})})),(0,n.createElement)(o.InspectorControls,null,(0,n.createElement)(i.PanelBody,{title:__("Settings","jetpack")},(0,n.createElement)(b.Z,{rids:P,onChange:O}),(0,n.createElement)(i.SelectControl,{label:__("Language","jetpack"),value:N,onChange:e=>C({lang:e}),options:g.V1}),(0,n.createElement)(i.ToggleControl,{label:__("Open in a new window","jetpack"),checked:A,onChange:()=>C({newtab:!A})})))),H=(0,a.Wp)()||(0,a.Ug)()?"https://en.support.wordpress.com/wordpress-editor/blocks/opentable-block/":"https://jetpack.com/support/jetpack-blocks/opentable-block/",V=(0,n.createElement)(i.Placeholder,{label:__("OpenTable Reservation","jetpack"),icon:f.Z,instructions:__("Enter your restaurant name, or paste an OpenTable Reservation Widget embed code.","jetpack"),notices:_},(0,n.createElement)(b.Z,{rids:P,onSubmit:O}),(0,n.createElement)("div",{className:`${j}-placeholder-links`},(0,n.createElement)(i.ExternalLink,{href:"https://restaurant.opentable.com/get-started/"},__("Sign up for OpenTable","jetpack")),(0,n.createElement)(i.ExternalLink,{href:H},__("Learn more","jetpack")))),G=d()(r,{[`is-style-${Z}`]:!I&&F.includes(Z)&&-1===r.indexOf("is-style"),"is-placeholder":I,"is-multi":"multi"===z(Z)[0],[`align${x}`]:x,"has-no-margin":R});return(0,n.createElement)(n.Fragment,null,_,(0,n.createElement)("div",{className:G},!I&&U,I?V:(e=>{const[t,r]=z(e||Z);return(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:`${j}-overlay`}),(0,n.createElement)("iframe",{title:(0,c.sprintf)(/* translators: Placeholder is a unique ID. */
__("Open Table Preview %s","jetpack"),u),scrolling:"no",src:`https://www.opentable.com/widget/reservation/canvas?rid=${(0,p.join)(P,"%2C")}&type=${t}&theme=${r}&overlay=false&domain=${L}&lang=${N&&g.vW.includes(N)?N:"en-US"}&newtab=${A}&disablega=true`}))})()))}))},92482:(e,t,r)=>{"use strict";var n=r(31985),a=r(69309);(0,n.Z)(a.u2,a.Xd)},15040:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(55609);const o=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 16",fill:"none",height:"16",width:"22"},(0,n.createElement)(a.Path,{d:"m1.997 5.982c-.39457-.00039-.7804.11622-1.108699.33511-.328295.21888-.584312.5302-.735674.89459-.15136174.36439-.1912714.76548-.1146819 1.15254.0765899.38707.2662379.74274.5449639 1.02202.278726.27929.634011.46965 1.020921.54702.38692.07732.78809.03826 1.15278-.11238.36469-.15063.67652-.40602.89606-.73387.21954-.32786.33693-.71345.33733-1.10803v-.002c.001-1.1-.89-1.994-1.992-1.995zm12.006 3.988c-.3946.0004-.7805-.11625-1.1088-.33517-.3283-.21893-.5843-.53031-.7357-.89476-.1513-.36444-.1912-.76558-.1145-1.15268s.2664-.74276.5453-1.022c.2788-.27925.6342-.46953 1.0211-.54679.387-.07725.7882-.038 1.1529.11278.3647.15079.6764.40634.8959.73432.2194.32799.3366.71369.3368 1.1083v.003c.0003.52814-.2092 1.03477-.5824 1.4085s-.8795.58397-1.4076.5845zm0-9.96999843c-1.5777-.0009886-3.1203.46588743-4.43262 1.34158843-1.31236.8757-2.33558 2.1209-2.94025 3.57813-.60467 1.45722-.76365 3.06103-.45683 4.60861.30683 1.54757 1.06567 2.96947 2.18058 4.08577 1.1149 1.1163 2.53582 1.8769 4.08302 2.1856 1.5472.3088 3.1512.1518 4.6091-.451 1.458-.6028 2.7045-1.6245 3.5819-2.9358.8773-1.3112 1.3461-2.8532 1.3471-4.4309v-.005c.0008-2.11466-.8384-4.14304-2.3331-5.63899-1.4946-1.495952-3.5222-2.3369478-5.6369-2.33800843z"}))},69309:(e,t,r)=>{"use strict";r.d(t,{Xd:()=>h,u2:()=>m});var n=r(51806),a=r(4981),o=r(65736),s=r(70355),i=r(31283),l=r(80452),c=r(70398),u=r(76851),d=r(15040),p=r(48769);const __=o.__,_x=o._x,m="opentable",h={title:__("OpenTable","jetpack"),description:__("Allow visitors to book a reservation with OpenTable","jetpack"),icon:{src:d.Z,foreground:(0,s.m)()},category:"earn",keywords:[_x("booking","block search term","jetpack"),_x("reservation","block search term","jetpack"),_x("restaurant","block search term","jetpack")],supports:{align:!0,html:!1},edit:u.Z,save:e=>{let{attributes:{rid:t}}=e;return(0,n.createElement)("div",null,t.map(((e,t)=>(0,n.createElement)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`,key:`${e}-${t}`},`https://www.opentable.com/restref/client/?rid=${e}`))))},attributes:i.ez,styles:(0,i.Eo)(),example:{attributes:{rid:["1"],style:"standard",iframe:!0,domain:"com",lang:"en-US",newtab:!1,negativeMargin:!1}},transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&0===e.textContent.indexOf("http")&&(p.pU.test(e.textContent)||p.tC.test(e.textContent)),transform:e=>{const t=(0,p.CC)(e.textContent);return(0,a.createBlock)("jetpack/opentable",t)}}]},deprecated:[l.Z,c.Z]}},57087:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(82674),a=r.n(n),o=r(51806),s=r(55609),i=r(69307),l=r(65736),c=r(92819),u=r(25392);const __=l.__,_n=l._n,d=20;function p(e){const[t,r]=(0,i.useState)(""),n=(0,u.Z)(t,d),[l,p]=(0,i.useState)(e.rids||[]),m=/^(\d+)$|\(\#(\d+)\)$/,h=n.filter((e=>l.indexOf(e.rid.toString())<0)).map((e=>e.name+` (#${e.rid})`)),g=(0,o.createElement)(s.FormTokenField,a()({value:l,suggestions:h,saveTransform:e=>u.$.test(e)?"":e.trim(),onInputChange:r,maxSuggestions:d,label:_n("Restaurant","Restaurants",l.length,"jetpack")},e,{onChange:t=>{const r=t.map((e=>{const t=m.exec(e);return t[1]||t[2]}));p(r),e.onChange&&e.onChange(r)}}));return(0,o.createElement)("div",{className:"wp-block-jetpack-opentable-restaurant-picker"},e.onSubmit?(0,o.createElement)("form",{onSubmit:r=>{r.preventDefault(),e.onSubmit((0,c.isEmpty)(l)?t:l)}},g,(0,o.createElement)(s.Button,{variant:"secondary",type:"submit"},__("Embed","jetpack"))):g)}},41007:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(69307);function a(e){const t=(0,n.useRef)();return(0,n.useEffect)((()=>{t.current=e}),[e]),t.current}},25392:(e,t,r)=>{"use strict";r.d(t,{$:()=>o,Z:()=>s});var n=r(69307),a=r(92819);const o=/^\s*(http[s]?:\/\/|\<script)/;function s(e,t){const[r,s]=(0,n.useState)([]),i=(0,n.useCallback)((0,a.throttle)((function(){fetch("https://www.opentable.com/widget/reservation/restaurant-search?pageSize="+t+"&query="+encodeURIComponent(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")).then((e=>e.json())).then((e=>s((0,a.unionBy)(r,e.items,"rid"))))}),500),[r]);return(0,n.useEffect)((()=>{(0,a.isEmpty)(e)||o.test(e)||i(e)}),[e]),r}},48769:(e,t,r)=>{"use strict";r.d(t,{CC:()=>s,pU:()=>o,tC:()=>a});const n=/<\s*script[^>]*src\s*=\s*["']?([^"']*)/i,a=/restref=([0-9]+)&/,o=/rid=([0-9]+)&/,s=e=>{if(e)return(e=>{if(!e)return;let t="";if(t=0===e.indexOf("http")?new URL(e):new URL("http:"+e),!t.host||-1===t.host.indexOf("opentable")||!t.search)return;const r=new URLSearchParams(t.search);let n=r.get("theme");"button"===r.get("type")&&(n=r.get("type"));let a=r.getAll("rid");if(a&&0!==a.length||(a=r.getAll("restref")),!a||0===a.length)return;const o={};a&&(o.rid=a);const s=r.get("domain");s&&(o.domain=s);const i=r.get("iframe");i&&(o.iframe=i);const l=r.get("lang");l&&(o.lang=l);const c=r.get("newtab");return c&&(o.newtab=c),n&&(o.style=n),o})((e=>{const t=e.match(n);return t&&t[1]?t[1]:a.test(e)||o.test(e)?e:void 0})(e))}},14119:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h});var n=r(51806),a=r(52175),o=r(9818),s=r(69307),i=r(92694),l=r(65235),c=r.n(l),u=r(2327),d=r(16367),p=r(7652);const m=["jetpack/recurring-payments"];const h=function(e){let{clientId:t,attributes:r}=e;const{layout:l,fontSize:h}=r,{connectUrl:g,isApiConnected:f}=(0,o.useSelect)((e=>{const{getConnectUrl:t,isApiStateConnected:r}=e(p.h);return{connectUrl:t(),isApiConnected:r()}})),b=(0,o.useSelect)((e=>e("core/block-editor").getBlock(t).innerBlocks.filter((e=>"jetpack/recurring-payments"===e.name))),[t]);(0,s.useEffect)((()=>{(0,i.addFilter)("jetpack.recurringPayments.editorSettings","jetpack/payment-buttons-hide-nudges-from-inner-blocks",((e,t)=>b.some((e=>e.clientId===t))?{...e,showStripeNudge:!1,showUpgradeNudge:!1}:e))}),[b]);const v=!f&&!!g,k=(0,a.useBlockProps)({className:c()({"has-custom-font-size":!!h||r?.style?.typography?.fontSize})}),y=(0,a.useInnerBlocksProps)(k,{allowedBlocks:m,orientation:"horizontal",template:[["jetpack/recurring-payments"]],templateInsertUpdatesSelection:!0,__experimentalLayout:l});return delete y.id,delete y["data-block"],(0,n.createElement)("div",k,v&&(0,n.createElement)(a.BlockControls,{group:"block"},(0,n.createElement)(u.Z,{blockName:"jetpack/payment-buttons",connectUrl:g})),v&&(0,n.createElement)(d.U,{blockName:"payment-buttons"}),(0,n.createElement)("div",y))}},27780:(e,t,r)=>{"use strict";var n=r(31985),a=r(5364);(0,n.Z)(a.u2,a.Xd)},5364:(e,t,r)=>{"use strict";r.d(t,{Xd:()=>f,u2:()=>p});var n=r(51806),a=r(13419),o=r(55609),s=r(69307),i=r(65736),l=r(70355),c=r(56367),u=r(14119),d=r(60357);const __=i.__,p="payment-buttons",m=__("Payment Buttons","jetpack"),h=(0,n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(o.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,n.createElement)(o.G,null,(0,n.createElement)(o.Path,{d:"M20 4H4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h16c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zm0 2v2H4V6h16zM4 18v-6h16v6H4zm2-4h7v2H6v-2zm9 0h3v2h-3v-2z"}))),g=(0,a.Wp)()||(0,a.Ug)()?"https://wordpress.com/support/video-tutorials-add-payments-features-to-your-site-with-our-guides/#how-to-use-the-payments-block-video":"https://jetpack.com/support/jetpack-blocks/payments-block/",f={apiVersion:2,title:m,icon:{src:h,foreground:(0,l.m)()},description:(0,n.createElement)(s.Fragment,null,(0,n.createElement)("p",null,__("Prompt visitors to purchase your products and subscriptions with a group of buttons.","jetpack")),(0,n.createElement)(o.ExternalLink,{href:g},__("Support reference","jetpack"))),category:"earn",keywords:[...new Set([c.Xd.title,...c.Xd.keywords])],edit:u.Z,save:d.Z,supports:{__experimentalExposeControlsToChildren:!0,align:["wide","full"],spacing:{blockGap:!0,margin:["vertical"],__experimentalDefaultControls:{blockGap:!0}},__experimentalLayout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}},typography:{fontSize:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}}}}},60357:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(52175),o=r(65235),s=r.n(o);function i(e){let{attributes:t}=e;const r=s()({"has-custom-font-size":!!t?.fontSize||t?.style?.typography?.fontSize}),o=a.useBlockProps.save({className:r}),i=a.useInnerBlocksProps.save(o);return(0,n.createElement)("div",i)}},48620:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(55609);function o(e){let{variations:t,onSelect:r,label:o}=e;return(0,n.createElement)("ul",{"aria-label":o,className:"wp-block-jetpack-payments-intro__variation-picker"},t.map((e=>(0,n.createElement)("li",{key:e.name},(0,n.createElement)(a.Button,{variant:"secondary",icon:e.icon,iconSize:48,onClick:()=>r(e),className:"wp-block-jetpack-payments-intro__variation-picker__variation",label:e.description||e.title}),(0,n.createElement)("span",{className:"wp-block-jetpack-payments-intro__variation-picker__variation-label",role:"presentation"},e.title)))))}},50215:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h});var n=r(51806),a=r(52175),o=r(4981),s=r(55609),i=r(9818),l=r(69307),c=r(65736),u=r(92819),d=r(48620),p=r(31654),m=r(76039);const __=c.__;function h(e){let{name:t,clientId:r,className:c}=e;const h=e=>e.categories?.includes("shop"),{blockType:g,hasInnerBlocks:f,hasPatterns:b,settings:v}=(0,i.useSelect)((e=>{const{getBlocks:n,__experimentalGetAllowedPatterns:s,getSettings:i}=e(a.store);return{settings:i(),blockType:(0,o.getBlockType)(t),hasInnerBlocks:n(r)?.length>0,hasPatterns:s?.().filter(h).length>0}})),{replaceBlock:k,selectBlock:y,updateSettings:E}=(0,i.useDispatch)(a.store),w=(0,l.useCallback)((e=>{!0===v?.allowedBlockTypes||v?.allowedBlockTypes?.includes(e)||E({...v,allowedBlockTypes:[...v.allowedBlockTypes,e]})}),[v,E]),_=e=>{const t=e.name;w(t),k(r,(0,o.createBlock)(t)),y(r)},C=m.Z.filter((e=>(0,o.getBlockType)(e.name)));(0,l.useEffect)((()=>{f||o.registerBlockVariation||_(C[0])}));const j=C.length&&o.registerBlockVariation;let S=__("Please select which kind of payment you'd like to add.","jetpack");return b&&(S=__("Start by choosing one of our suggested layout patterns.","jetpack")),!f&&j?(0,n.createElement)(s.Placeholder,{icon:(0,u.get)(g,["icon","src"]),label:(0,u.get)(g,["title"]),instructions:S,className:c},b&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(p.Z,{onBlockPatternSelect:e=>k(r,e.map(o.cloneBlock)),patternFilter:h}),(0,n.createElement)("p",null,__("Or use one of our blocks to create your own.","jetpack"))),(0,n.createElement)(d.Z,{label:__("Payment Block list","jetpack"),variations:C,onSelect:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C[0];_(e)}})):(0,n.createElement)(a.InnerBlocks,null)}},5477:(e,t,r)=>{"use strict";var n=r(31985),a=r(68007);(0,n.Z)(a.u2,a.Xd)},68007:(e,t,r)=>{"use strict";r.d(t,{Xd:()=>m,u2:()=>p});var n=r(51806),a=r(52175),o=r(65736),s=r(64967),i=r(70355),l=r(29800),c=r(50851),u=r(56367),d=r(50215);const __=o.__,_x=o._x,p="payments-intro",m={title:__("Payments","jetpack"),description:__("Sell products and services or receive donations on your website","jetpack"),icon:{src:s.Z,foreground:(0,i.m)()},category:"earn",keywords:[...new Set([l.Xd.title,...l.Xd.keywords,u.Xd.title,...u.Xd.keywords,c.X.title,...c.X.keywords,_x("paid","block search term","jetpack"),_x("pay","block search term","jetpack"),_x("money","block search term","jetpack"),_x("checkout","block search term","jetpack")])],supports:{alignWide:!1,className:!0,customClassName:!1,html:!1,reusable:!1},edit:d.Z,save:()=>(0,n.createElement)(a.InnerBlocks.Content,null)}},31654:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(52175),o=r(55609),s=r(69307),i=r(65736);const __=i.__;function l(e){let{onBlockPatternSelect:t,patternFilter:r}=e;const[i,l]=(0,s.useState)(!1);return a.__experimentalBlockPatternSetup?(0,n.createElement)(n.Fragment,null,(0,n.createElement)(o.Button,{variant:"primary",onClick:()=>l(!0),className:"wp-payments-intro-pattern-picker__opener"},__("Choose a pattern","jetpack")),i&&(0,n.createElement)(o.Modal,{className:"wp-block-jetpack-payments-intro__pattern-picker__selection-modal",title:__("Choose a pattern","jetpack"),closeLabel:__("Cancel","jetpack"),onRequestClose:()=>l(!1)},(0,n.createElement)(a.__experimentalBlockPatternSetup,{onBlockPatternSelect:t,filterPatternsFn:r}))):null}},76039:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(29800),a=r(5364),o=r(50851);const s=[[n.u2,n.Xd],[a.u2,a.Xd],[o.u,o.X]].map((e=>{var t;let[r,n]=e;return{name:r.includes("/")?r:"jetpack/"+r,title:n.title,description:n.description,icon:null!==(t=n.icon.src)&&void 0!==t?t:n.icon}}))},15774:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(55609),o=r(65736),s=r(66094);const __=o.__,_x=o._x;function i(e){let{className:t,onSubmit:r,noticeUI:o,url:i,setUrl:l}=e;return(0,n.createElement)("div",{className:t},(0,n.createElement)(a.Placeholder,{label:__("Pinterest","jetpack"),icon:s.qv,notices:o},(0,n.createElement)("form",{onSubmit:e=>{e.preventDefault(),r()}},(0,n.createElement)("input",{type:"url",value:i,className:"components-placeholder__input","aria-label":__("Pinterest URL","jetpack"),placeholder:__("Enter URL to embed here…","jetpack"),onChange:e=>l(e.target.value)}),(0,n.createElement)(a.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))))}},89488:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(4981),o=r(55609),s=r(69307),i=r(65736);const __=i.__,_x=i._x;function l(e){let{fallbackUrl:t,onClick:r}=e;return(0,n.createElement)(n.Fragment,null,__("Sorry, this content could not be embedded.","jetpack")," ",(0,n.createElement)(o.Button,{variant:"link",onClick:()=>{const e=(0,n.createElement)("a",{href:t},t);r((0,a.createBlock)("core/paragraph",{content:(0,s.renderToString)(e)}))}},_x("Convert block to link","button label","jetpack")))}},13647:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(55609),o=r(65736);const __=o.__;function s(){return(0,n.createElement)("div",{className:"wp-block-embed is-loading"},(0,n.createElement)(a.Spinner,null),(0,n.createElement)("p",null,__("Embedding…","jetpack")))}},89852:(e,t,r)=>{"use strict";r.d(t,{C:()=>s});var n=r(51806),a=r(55609),o=r(65736);const __=o.__;function s(e){let{setEditingState:t}=e;return(0,n.createElement)(a.ToolbarGroup,null,(0,n.createElement)(a.ToolbarButton,{className:"components-toolbar__control",label:__("Edit URL","jetpack"),icon:"edit",onClick:()=>t(!0)}))}},15479:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(34098);const o={attributes:{url:{type:"string"}},supports:{align:!1,html:!1},save:e=>{let{attributes:t,className:r}=e;const{url:o}=t;return(0,a.t)(o)?(0,n.createElement)("div",{className:r},(0,n.createElement)("a",{"data-pin-do":(0,a.t)(o),href:o})):null}}},43529:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(51806),a=r(52175),o=r(55609),s=r(69307),i=r(15774),l=r(89488),c=r(13647),u=r(89852),d=r(18867),p=r(34098);const m=(0,o.withNotices)((function(e){let{attributes:t,isSelected:r,className:m,noticeOperations:h,noticeUI:g,setAttributes:f,onReplace:b}=e;const{url:v}=t,{isFetching:k,pinterestUrl:y,testUrl:E,hasTestUrlError:w}=(0,d.Z)(),[_,C]=(0,s.useState)(!1),[j,S]=(0,s.useState)(""),[x,P]=(0,s.useState)(!1),T=(0,s.useCallback)((()=>(0,n.createElement)(l.Z,{fallbackUrl:j,onClick:b})),[w]),L=()=>{k||(E(j),P(!1))},N=()=>{C(!0)};if((0,s.useEffect)((()=>{v&&E(v)}),[]),(0,s.useEffect)((()=>{!r&&_&&C(!1)}),[r,_]),(0,s.useEffect)((()=>{f({url:y}),h.removeAllNotices(),y&&S(y),w&&h.createErrorNotice(T())}),[y,w,f,T]),k)return(0,n.createElement)(c.Z,null);const A=(0,p.t)(v);if(x||!v||v&&!A)return(0,n.createElement)(i.Z,{className:m,onSubmit:L,noticeUI:g,url:j,setUrl:S});const R=`<a data-pin-do='${A}' href='${v}'></a>`;return(0,n.createElement)("div",{className:m},(0,n.createElement)(a.BlockControls,null,(0,n.createElement)(u.C,{setEditingState:P})),(0,n.createElement)("div",null,(0,n.createElement)(o.SandBox,{html:R,scripts:["https://assets.pinterest.com/js/pinit.js"],onFocus:N}),!_&&(0,n.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:N})))}))},7414:(e,t,r)=>{"use strict";var n=r(31985),a=r(66094);(0,n.Z)(a.u2,a.Xd)},18867:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(69307),a=r(66094),o=r(23621);const s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const[t,r]=(0,n.useState)(!1),[s,i]=(0,n.useState)(e),[l,c]=(0,n.useState)(!1);return(0,n.useEffect)((()=>{s&&s!==a.a0&&(r(!0),(0,o.Z)(s).then((e=>{r(!1),i(e),c(!1)})).catch((()=>{r(!1),i(s||void 0),c(!0)})))}),[s]),{isFetching:t,pinterestUrl:s,hasTestUrlError:l,testUrl:i}}},66094:(e,t,r)=>{"use strict";r.d(t,{Wh:()=>d,Xd:()=>f,a0:()=>p,qv:()=>g,u2:()=>m});var n=r(51806),a=r(4981),o=r(55609),s=r(65736),i=r(70355),l=r(15479),c=r(43529),u=r(54709);const __=s.__,_x=s._x,d=/^\s*https?:\/\/(?:www\.)?(?:[a-z]{2}\.)?(?:pinterest\.[a-z.]+|pin\.it)\/([^/]+)(\/[^/]+)?/i,p="https://pinterest.com/anapinskywalker/",m="pinterest",h=__("Pinterest","jetpack"),g=(0,n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(o.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,n.createElement)(o.G,null,(0,n.createElement)(o.Path,{d:"M12,2C6.477,2,2,6.477,2,12c0,4.236,2.636,7.855,6.356,9.312c-0.087-0.791-0.166-2.005,0.035-2.869c0.182-0.78,1.173-4.971,1.173-4.971s-0.299-0.599-0.299-1.484c0-1.39,0.806-2.429,1.809-2.429c0.853,0,1.265,0.641,1.265,1.409c0,0.858-0.546,2.141-0.828,3.329c-0.236,0.996,0.499,1.807,1.481,1.807c1.777,0,3.144-1.874,3.144-4.579c0-2.394-1.72-4.068-4.177-4.068c-2.845,0-4.515,2.134-4.515,4.34c0,0.859,0.331,1.781,0.744,2.282c0.082,0.099,0.094,0.186,0.069,0.287C8.18,14.682,8.011,15.361,7.978,15.5c-0.044,0.183-0.145,0.222-0.334,0.134c-1.249-0.581-2.03-2.407-2.03-3.874c0-3.154,2.292-6.051,6.607-6.051c3.469,0,6.165,2.472,6.165,5.775c0,3.446-2.173,6.22-5.189,6.22c-1.013,0-1.966-0.526-2.292-1.148c0,0-0.501,1.909-0.623,2.377c-0.226,0.869-0.835,1.957-1.243,2.622C9.975,21.844,10.969,22,12,22c5.523,0,10-4.477,10-10C22,6.477,17.523,2,12,2z"}))),f={title:h,description:__("Embed a Pinterest pin, board, or user.","jetpack"),icon:{src:g,foreground:(0,i.m)()},category:"embed",keywords:[_x("social","block search term","jetpack"),_x("pinboard","block search term","jetpack"),_x("pins","block search term","jetpack")],supports:{align:!1,html:!1},attributes:{url:{type:"string"}},edit:c.Z,save:u.Z,transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&d.test(e.textContent),transform:e=>(0,a.createBlock)("jetpack/pinterest",{url:e.textContent.trim()})}]},example:{attributes:{url:p}},deprecated:[l.Z]}},54709:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(51806);function a(e){let{attributes:t}=e;const{url:r}=t;return(0,n.createElement)("a",{href:r},r)}},34098:(e,t,r)=>{"use strict";r.d(t,{t:()=>o});var n=r(96483),a=r(66094);function o(e){if(!a.Wh.test(e))return"";const t=(0,n.getPath)(e);return t?t.startsWith("pin/")?"embedPin":t.match(/^([^/]+)\/?$/)?"embedUser":t.match(/^([^/]+)\/([^/]+)\/?$/)?"embedBoard":"":""}},98075:(e,t,r)=>{"use strict";r.d(t,{G:()=>i,q:()=>l});var n=r(86989),a=r.n(n),o=r(96483),s=r(63226);const i=async()=>await a()({path:"/wpcom/v2/podcast-player/track-quantity"}),l=async e=>{let t,r,n,{url:i,guids:l=[],fetchEpisodeOptions:c=!1}=e;try{t=await a()({path:(0,o.addQueryArgs)("/wpcom/v2/podcast-player",{url:i,guids:l,"episode-options":c})})}catch(e){r=e}if(t)return{type:s.u,data:t};try{n=await a()({path:(0,o.addQueryArgs)("/oembed/1.0/proxy",{url:i})})}catch(e){}const u='<a href="'+i+'">'+i+"</a>";if(n&&n.html!==u)return{type:s.b};throw r}},30723:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(96483),a=r(24381);const o={url:{type:"string",validator:n.isUrl},selectedEpisodes:{type:"array",default:[]},itemsToShow:{type:"integer",default:5},showCoverArt:{type:"boolean",default:!0},showEpisodeTitle:{type:"boolean",default:!0},showEpisodeDescription:{type:"boolean",default:!0},primaryColor:{type:"string"},customPrimaryColor:{type:"string",validator:a.Z},hexPrimaryColor:{type:"string",validator:a.Z},secondaryColor:{type:"string"},customSecondaryColor:{type:"string",validator:a.Z},hexSecondaryColor:{type:"string",validator:a.Z},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:a.Z},hexBackgroundColor:{type:"string",validator:a.Z},exampleFeedData:{type:"object"}}},77715:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(51806),a=r(69307),o=r(65235),s=r.n(o),i=r(29431);const l=(0,a.memo)((e=>{let{playerId:t,title:r,cover:a,link:o,track:s,children:i,showEpisodeTitle:l,showCoverArt:u,showEpisodeDescription:d,colors:p}=e;return u||l||d?(0,n.createElement)("div",{className:"jetpack-podcast-player__header"},(0,n.createElement)("div",{className:"jetpack-podcast-player__current-track-info"},u&&a&&(0,n.createElement)("div",{className:"jetpack-podcast-player__cover"},(0,n.createElement)("img",{className:"jetpack-podcast-player__cover-image",src:a,alt:""})),l&&!!(r||s&&s.title)&&(0,n.createElement)(c,{playerId:t,title:r,link:o,track:s,colors:p})),!!(d&&s&&s.description)&&(0,n.createElement)("p",{id:`${t}__track-description`,className:"jetpack-podcast-player__track-description"},s.description),i):i})),c=(0,a.memo)((e=>{let{playerId:t,title:r,link:a,track:o,colors:l={primary:{name:null,custom:null,classes:""}}}=e;return(0,n.createElement)("h2",{id:`${t}__title`,className:"jetpack-podcast-player__title"},!(!o||!o.title)&&(0,n.createElement)("span",{className:s()("jetpack-podcast-player__current-track-title",l.primary.classes),style:{color:l.primary.custom}},o.title,(0,n.createElement)("a",{className:"jetpack-podcast-player__track-title-link",href:o.link||o.src,target:"_blank",rel:"noopener noreferrer nofollow"},i.Z)),!!(o&&o.title&&r)&&(0,n.createElement)("span",{className:"jetpack-podcast-player--visually-hidden"}," - "),!!r&&(0,n.createElement)(u,{title:r,link:a,colors:l}))})),u=(0,a.memo)((e=>{let{title:t,link:r}=e;return(0,n.createElement)("span",{className:"jetpack-podcast-player__podcast-title"},r?(0,n.createElement)("a",{className:"jetpack-podcast-player__link",href:r,target:"_blank",rel:"noopener noreferrer nofollow"},t):{title:t})})),d=l},39122:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(69307),o=r(97115),s=r(72862);const i=(0,a.memo)((e=>{let{playerId:t,tracks:r,selectTrack:a,currentTrack:i,playerState:l,colors:c}=e;return(0,n.createElement)("ol",{className:"jetpack-podcast-player__tracks","aria-labelledby":`jetpack-podcast-player__tracklist-title--${t}`,"aria-describedby":`jetpack-podcast-player__tracklist-description--${t}`},r.map(((e,t)=>{const r=i===t;return(0,n.createElement)(s.Z,{key:e.id,index:t,track:e,selectTrack:a,isActive:r,isPlaying:r&&l===o.Wp,isError:r&&l===o.Vy,colors:c})})))}))},71600:(e,t,r)=>{"use strict";r.d(t,{Z:()=>y});var n=r(90017),a=r.n(n),o=r(51806),s=r(25158),i=r(94333),l=r(9818),c=r(69307),u=r(65736),d=r(65235),p=r.n(d),m=r(72752),h=r(97115),g=r(66085),f=r(77715),b=r(39122),v=r(71540);const __=u.__;class k extends c.Component{constructor(){super(...arguments),a()(this,"state",{currentTrack:0,hasUserInteraction:!1}),a()(this,"recordUserInteraction",(()=>{this.state.hasUserInteraction||this.setState({hasUserInteraction:!0})})),a()(this,"selectTrack",(e=>{const{currentTrack:t}=this.state;if(t===e)return this.recordUserInteraction(),void this.props.toggleMediaSource(this.props.playerId);-1!==t&&this.props.pauseMediaSource(this.props.playerId),this.loadAndPlay(e)})),a()(this,"loadTrack",(e=>{const t=this.getTrack(e);if(!t)return!1;this.state.currentTrack!==e&&this.setState({currentTrack:e});const{title:r,link:n,description:a}=t;return this.props.updateMediaSourceData(this.props.playerId,{title:r,link:n}),(0,s.speak)(/* translators: %s is the track title. It describes the current state of the track as "Loading: [track title]". */
`${(0,u.sprintf)(__("Loading: %s","jetpack"),r)} ${a}`,"assertive"),!0})),a()(this,"loadAndPlay",(e=>{this.recordUserInteraction(),this.loadTrack(e)&&this.props.playMediaSource(this.props.playerId)})),a()(this,"getTrack",(e=>this.props.tracks[e])),a()(this,"handleError",(e=>{if(!this.state.hasUserInteraction){const t=window.navigator.userAgent.match(/Trident\/7\./)?"IE11: Playing sounds in webpages setting is not checked":e;this.setState((()=>{throw new Error(t)}))}this.props.errorMediaSource(this.props.playerId),(0,s.speak)(`${__("Error: Episode unavailable - Open in a new tab","jetpack")}`,"assertive")})),a()(this,"handlePlay",(()=>{this.props.playMediaSource(this.props.playerId),this.setState({hasUserInteraction:!0})})),a()(this,"handlePause",(()=>{this.props.pauseMediaSource(this.props.playerId),this.props.playerState!==h.Vy&&this.props.pauseMediaSource(this.props.playerId)})),a()(this,"handleTimeChange",(e=>{this.props.setMediaSourceCurrentTime(this.props.playerId,e)})),a()(this,"handleJump",(()=>{this.props.setMediaSourceCurrentTime(this.props.playerId,this.props.currentTime-5)})),a()(this,"handleSkip",(()=>{this.props.setMediaSourceCurrentTime(this.props.playerId,this.props.currentTime+30)})),a()(this,"updateMediaData",(e=>{this.props.updateMediaSourceData(this.props.playerId,{duration:e.target?.duration,domId:e.target?.id})}))}registerPlayer(){const e=this.getTrack(this.state.currentTrack)||{},{playerId:t}=this.props;this.props.registerMediaSource(t,{title:e.title,link:e.link,state:h._5}),this.props.setDefaultMediaSource(t)}componentDidMount(){this.props.playerId&&this.registerPlayer()}componentWillUnmount(){this.props.playerId&&this.props.unregisterMediaSource(this.props.playerId)}componentDidUpdate(e){const t=e=>e?.length?e.map((e=>e.guid)):[],r=t(this.props.tracks),n=new Set(t(e.tracks));r.length===n.size&&r.every((e=>n.has(e)))||this.loadTrack(0)}static getDerivedStateFromProps(e,t){return e.tracks.length<=t.currentTrack?{...t,currentTrack:0}:null}render(){const{playerId:e,title:t,link:r,cover:n,tracks:a,attributes:s,currentTime:i,playerState:l}=this.props,{itemsToShow:c,primaryColor:d,customPrimaryColor:h,hexPrimaryColor:v,secondaryColor:k,customSecondaryColor:y,hexSecondaryColor:E,backgroundColor:w,customBackgroundColor:_,hexBackgroundColor:C,showCoverArt:j,showEpisodeTitle:S,showEpisodeDescription:x}=s,{currentTrack:P}=this.state,T=a.slice(0,c),L=this.getTrack(P),N=(0,g.Aq)({primaryColor:d,customPrimaryColor:h,secondaryColor:k,customSecondaryColor:y,backgroundColor:w,customBackgroundColor:_}),A={color:y,backgroundColor:_,"--jetpack-podcast-player-primary":v,"--jetpack-podcast-player-secondary":E,"--jetpack-podcast-player-background":C},R=p()("jetpack-podcast-player",l,N.secondary.classes,N.background.classes);return(0,o.createElement)("section",{className:R,style:A,"aria-labelledby":t||L&&L.title?`${e}__title`:void 0,"aria-describedby":L&&L.description?`${e}__track-description`:void 0,"data-jetpack-iframe-ignore":!0},(0,o.createElement)(f.Z,{playerId:e,title:t,link:r,cover:n,track:this.getTrack(P),showCoverArt:j,showEpisodeTitle:S,showEpisodeDescription:x,colors:N},(0,o.createElement)(m.Z,{onJumpBack:this.handleJump,onSkipForward:this.handleSkip,trackSource:this.getTrack(P).src,onPlay:this.handlePlay,onPause:this.handlePause,onError:this.handleError,playStatus:l,currentTime:i,onTimeChange:this.handleTimeChange,onMetadataLoaded:this.updateMediaData})),T.length>1&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("h4",{id:`jetpack-podcast-player__tracklist-title--${e}`,className:"jetpack-podcast-player--visually-hidden"},(0,u.sprintf)(
// translators: %s is the track title.
__("Playlist: %s","jetpack"),t)),(0,o.createElement)("p",{id:`jetpack-podcast-player__tracklist-description--${e}`,className:"jetpack-podcast-player--visually-hidden"},__("Select an episode to play it in the audio player.","jetpack")),(0,o.createElement)(b.Z,{playerId:e,playerState:l,currentTrack:P,tracks:T,selectTrack:this.selectTrack,colors:N})))}}k.defaultProps={title:"",cover:"",link:"",attributes:{url:null,itemsToShow:5,showCoverArt:!0,showEpisodeTitle:!0,showEpisodeDescription:!0},tracks:[]};const y=(0,i.compose)([v.Z,(0,l.withSelect)(((e,t)=>{const{playerId:r}=t,{getMediaSourceCurrentTime:n,getMediaPlayerState:a}=e(h.tT);return{currentTime:n(r),playerState:a(r)}})),(0,l.withDispatch)((e=>{const{registerMediaSource:t,updateMediaSourceData:r,unregisterMediaSource:n,setDefaultMediaSource:a,playMediaSource:o,pauseMediaSource:s,toggleMediaSource:i,errorMediaSource:l,setMediaSourceCurrentTime:c}=e(h.tT);return{registerMediaSource:t,updateMediaSourceData:r,unregisterMediaSource:n,setDefaultMediaSource:a,playMediaSource:o,pauseMediaSource:s,toggleMediaSource:i,errorMediaSource:l,setMediaSourceCurrentTime:c}}))])(k)},46843:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(69307),o=r(65736);const __=o.__,s=(0,a.memo)((e=>{let{link:t,title:r,colors:a}=e;return(0,n.createElement)("div",{className:"jetpack-podcast-player__track-error"},__("Episode unavailable. ","jetpack"),t&&(0,n.createElement)("span",{className:a.secondary.classes,style:{color:a.secondary.custom}},(0,n.createElement)("a",{className:"jetpack-podcast-player__link",href:t,rel:"noopener noreferrer nofollow",target:"_blank"},(0,n.createElement)("span",{className:"jetpack-podcast-player--visually-hidden"},`${(0,o.sprintf)(/* translators: %s is the title of the track. This text is visually hidden from the screen, but available to screen readers. */
__("%s:","jetpack"),r)} `),__("Open in a new tab","jetpack"))))}))},96817:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(69307),o=r(65736),s=r(69650);const __=o.__,i=(0,a.memo)((e=>{let t,r,{isPlaying:a,isError:o,className:i}=e;o?(r="error",
/* translators: This is text to describe the current state. This will go
    before the track title, such as "Error: [The title of the track]". */
t=__("Error:","jetpack")):a&&(r="playing",
/* translators: Text to describe the current state. This will go before the
    track title, such as "Playing: [The title of the track]". */
t=__("Playing:","jetpack"));const l=s[r];return l?(0,n.createElement)("span",{className:`${i} ${i}--${r}`},(0,n.createElement)("span",{className:"jetpack-podcast-player--visually-hidden"},`${t} `),l):(0,n.createElement)("span",{className:i})}))},72862:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(51806),a=r(69307),o=r(65736),s=r(65235),i=r.n(s),l=r(66085),c=r(46843),u=r(96817);const __=o.__,d=(0,a.memo)((e=>{let{track:t,isActive:r,isPlaying:a,isError:o,selectTrack:s,index:d,colors:p={primary:{},secondary:{}}}=e;const m=(0,l.Gd)("color",p.primary.name),h=(0,l.Gd)("color",p.secondary.name),g=i()("jetpack-podcast-player__track",{"is-active":r,"has-primary":r&&(p.primary.name||p.primary.custom),[m]:r&&!!m,"has-secondary":!r&&(p.secondary.name||p.secondary.custom),[h]:!r&&!!h}),f={};r&&p.primary.custom&&!m?f.color=p.primary.custom:r||!p.secondary.custom||h||(f.color=p.secondary.custom);const
/* translators: This needs to be a single word with no spaces. It describes
  the current item in the group. A screen reader will announce it as "[title],
  current track". */
b=r?__("track","jetpack"):void 0;return(0,n.createElement)("li",{className:g,style:Object.keys(f).length?f:null},(0,n.createElement)("a",{className:"jetpack-podcast-player__link jetpack-podcast-player__track-link",href:t.link||t.src,role:"button","aria-current":b,onClick:e=>{e.shiftKey||e.metaKey||e.altKey||(e.preventDefault(),s(d))},onKeyDown:e=>{" "===event.key&&(e.preventDefault(),s(d))}},(0,n.createElement)(u.Z,{className:"jetpack-podcast-player__track-status-icon",isPlaying:a,isError:o}),(0,n.createElement)("span",{className:"jetpack-podcast-player__track-title"},t.title),t.duration&&(0,n.createElement)("time",{className:"jetpack-podcast-player__track-duration",dateTime:t.duration},t.duration)),r&&o&&(0,n.createElement)(c.Z,{link:t.link,title:t.title,colors:p}))}))},71540:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(90017),a=r.n(n),o=r(51806),s=r(69307),i=r(65736);const __=i.__;function l(e){class t extends s.Component{constructor(){super(...arguments),a()(this,"state",{didError:!1,isIE11AudioIssue:!1}),a()(this,"componentDidCatch",((e,t)=>{this.props.onError(e,t)}))}render(){const{didError:t,isIE11AudioIssue:r}=this.state;return t?(0,o.createElement)("section",{className:"jetpack-podcast-player"},(0,o.createElement)("p",{className:"jetpack-podcast-player__error"},r?__('The podcast player cannot be displayed as your browser settings do not allow for sounds to be played in webpages. This can be changed in your browser’s "Internet options" settings. In the "Advanced" tab you will have to check the box next to "Play sounds in webpages" in the "Multimedia" section. Once you have confirmed that the box is checked, please press "Apply" and then reload this page.',"jetpack"):__("An unexpected error occured within the Podcast Player. Reloading this page might fix the problem.","jetpack",0))):(0,o.createElement)(e,this.props)}}return a()(t,"getDerivedStateFromError",(e=>({didError:!0,isIE11AudioIssue:!!e.message.match(/IE11/)}))),t.defaultProps={onError:()=>{}},t}},63226:(e,t,r)=>{"use strict";r.d(t,{b:()=>a,u:()=>n});const n="podcast-feed",a="embed-block"},16542:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(96483),a=r(24381);const o={attributes:{url:{type:"string",validator:n.isUrl},itemsToShow:{type:"integer",default:5},showCoverArt:{type:"boolean",default:!0},showEpisodeDescription:{type:"boolean",default:!0},primaryColor:{type:"string"},customPrimaryColor:{type:"string",validator:a.Z},hexPrimaryColor:{type:"string",validator:a.Z},secondaryColor:{type:"string"},customSecondaryColor:{type:"string",validator:a.Z},hexSecondaryColor:{type:"string",validator:a.Z},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:a.Z},hexBackgroundColor:{type:"string",validator:a.Z},exampleFeedData:{type:"object"}},supports:{align:!1,alignWide:!0,anchor:!1,customClassName:!0,className:!0,html:!1,multiple:!0,reusable:!0},save:()=>null}},99800:(e,t,r)=>{"use strict";r.d(t,{Z:()=>P});var n=r(51806),a=r(13419),o=r(52175),s=r(4981),i=r(55609),l=r(94333),c=r(9818),u=r(69307),d=r(65736),p=r(96483),m=r(51128),h=r.n(m),g=r(92819),f=r(43718),b=r(85007),v=r(4554),k=r(98075),y=r(30723),E=r(71600),w=r(63226),_=r(13331),C=r(93610),j=r(66085);const __=d.__,S=h()("jetpack:podcast-player:edit"),x=(0,a.Wp)()||(0,a.Ug)()?"http://en.support.wordpress.com/wordpress-editor/blocks/podcast-player-block/":"https://jetpack.com/support/jetpack-blocks/podcast-player-block/",P=(0,l.compose)([(0,c.withDispatch)(((e,t)=>{let{clientId:r,attributes:n}=t;return{replaceWithEmbedBlock(){e("core/block-editor").replaceBlock(r,(0,s.createBlock)("core/embed",{url:n.url}))}}})),(0,o.withColors)("backgroundColor",{primaryColor:"color"},{secondaryColor:"color"}),i.withNotices,l.withInstanceId,f.K])((e=>{let{instanceId:t,className:r,attributes:a,setAttributes:s,noticeOperations:{createErrorNotice:l,removeAllNotices:c},noticeUI:d,primaryColor:m,setPrimaryColor:h,secondaryColor:f,setSecondaryColor:P,fallbackTextColor:T,backgroundColor:L,setBackgroundColor:N,fallbackBackgroundColor:A,isSelected:R,replaceWithEmbedBlock:I}=e;const M=(0,v.S)(y.Z,a),{url:Z,selectedEpisodes:B,itemsToShow:D,showCoverArt:F,showEpisodeTitle:z,showEpisodeDescription:O,exampleFeedData:U}=M,H=`jetpack-podcast-player-block-${t}`,[V,G]=(0,u.useState)(!1),[q,$]=(0,u.useState)(10),W=(0,u.useRef)(),[{selectedGuid:X,checkUrl:J,...K},Y]=(0,u.useReducer)(C.J,{editedUrl:Z||"",isEditing:!Z&&!U,isLoading:!1,feedData:U||{},isInteractive:!1,selectedGuid:B?.[0]?.guid,checkUrl:Z||""}),Q=(0,u.useMemo)((()=>(0,g.debounce)((e=>{Y({type:C.N.START_FETCH}),W.current?.cancel(),W.current=(0,j.W4)((0,k.q)({...e,fetchEpisodeOptions:!0})),W.current.promise.then((t=>{if(c(),t?.isCanceled)S("Block was unmounted during fetch",t);else switch(t?.type){case w.u:return s({url:e.url,selectedEpisodes:e.guids.map((e=>({guid:e})))}),Y({type:C.N.FEED_RECEIVED,payload:t.data});case w.b:return I()}}),(e=>{e?.isCanceled?S("Block was unmounted during fetch",e):(S("feed error",e),c(),l(e.message||__("Your podcast couldn't be embedded. Please double check your URL.","jetpack")),Y({type:C.N.START_EDITING}))}))}),300)),[I,s,l,c]);(0,u.useEffect)((()=>()=>{W?.current?.cancel?.()}),[]);const ee=(0,u.useCallback)((e=>{null===e||V||((0,b.DT)(["link#mediaelement-css","link#wp-mediaelement-css"],e),G(!0))}),[V]);(0,u.useEffect)((()=>{if(""!==J)return Q({url:J,guids:X?[X]:[]}),()=>W?.current?.cancel?.()}),[Q,J,X]),(0,u.useEffect)((()=>{(0,k.G)().then((e=>{$(e)}))}),[]),(0,u.useEffect)((()=>{X&&1!==D&&s({itemsToShow:1})}),[X,D,s]),(0,u.useEffect)((()=>{!R&&K.isInteractive&&Y({type:C.N.PREVENT_INTERACTIONS})}),[R,K.isInteractive]);const te=e=>{if(e.preventDefault(),""===K.editedUrl)return;const t=(0,p.prependHTTP)(K.editedUrl);(0,p.isURL)(t)?(t===J?(Y({type:C.N.CLEAR_FEED}),Q({url:J,guids:B[0]?.guid?[B[0].guid]:[]})):Y({type:C.N.CHECK_URL,payload:t}),Y({type:C.N.FINISH_EDITING,payload:t})):l(__("Your podcast couldn't be embedded. Please double check your URL.","jetpack"))};if(K.isEditing)return(0,n.createElement)(i.Placeholder,{icon:_.E,label:__("Podcast Player","jetpack"),instructions:__("Enter your podcast RSS feed URL.","jetpack"),className:"jetpack-podcast-player__placeholder"},(0,n.createElement)("form",{onSubmit:te},d,(0,n.createElement)(i.TextControl,{type:"text",inputMode:"url",placeholder:__("Enter URL here…","jetpack"),value:K.editedUrl,className:"components-placeholder__input",onChange:e=>Y({type:C.N.EDIT_URL,payload:e})}),(0,n.createElement)(i.Button,{variant:"primary",type:"submit"},__("Embed","jetpack"))),(0,n.createElement)("div",{className:"components-placeholder__learn-more"},(0,n.createElement)(i.ExternalLink,{href:x},__("Learn more about embeds","jetpack"))));if(!K.feedData.tracks?.length)return(0,n.createElement)(i.Placeholder,{icon:_.E,label:__("Podcast Player","jetpack"),instructions:__("Loading podcast feed…","jetpack")},(0,n.createElement)(i.Spinner,null));const re=(e,t)=>r=>{s({[e]:r}),t(r)};return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(o.BlockControls,null,(0,n.createElement)(i.ToolbarGroup,null,(0,n.createElement)(i.ToolbarButton,{"aria-label":__("Edit Podcast Feed URL","jetpack"),onClick:()=>Y({type:C.N.START_EDITING})},__("Replace","jetpack")))),(0,n.createElement)(o.InspectorControls,null,(0,n.createElement)(i.PanelBody,{title:__("Podcast settings","jetpack")},(i.ComboboxControl||0===B.length)&&(0,n.createElement)(i.RangeControl,{label:__("Number of items","jetpack"),value:D,onChange:e=>s({itemsToShow:X?1:e}),min:1,max:q,required:!0,disabled:!!X}),i.ComboboxControl&&(0,n.createElement)(i.ComboboxControl,{className:"jetpack-podcast-player__episode-selector",value:X,onChange:e=>Y({type:C.N.SELECT_EPISODE,payload:e}),options:K.feedData.options||[],label:__("Episode","jetpack"),onFilterValueChange:g.noop}),(0,n.createElement)(i.ToggleControl,{label:__("Show Cover Art","jetpack"),checked:F,onChange:e=>s({showCoverArt:e})}),(0,n.createElement)(i.ToggleControl,{label:__("Show Episode Title","jetpack"),checked:z,onChange:e=>s({showEpisodeTitle:e})}),(0,n.createElement)(i.ToggleControl,{label:__("Show Episode Description","jetpack"),checked:O,onChange:e=>s({showEpisodeDescription:e})})),(0,n.createElement)(o.PanelColorSettings,{title:__("Color Settings","jetpack"),colorSettings:[{value:m.color,onChange:re("hexPrimaryColor",h),label:__("Primary Color","jetpack")},{value:f.color,onChange:re("hexSecondaryColor",P),label:__("Secondary Color","jetpack")},{value:L.color,onChange:re("hexBackgroundColor",N),label:__("Background Color","jetpack")}]},(0,n.createElement)(o.ContrastChecker,{isLargeText:!1,textColor:f.color,backgroundColor:L.color,fallbackBackgroundColor:A,fallbackTextColor:T}))),(0,n.createElement)("div",{id:H,className:r,ref:ee},(0,n.createElement)(E.Z,{playerId:H,attributes:M,tracks:K.feedData.tracks,cover:K.feedData.cover,title:K.feedData.title,link:K.feedData.link}),!K.isInteractive&&!K.isLoading&&(0,n.createElement)("div",{className:"jetpack-podcast-player__interactive-overlay",onMouseUp:()=>Y({type:C.N.MAKE_INTERACTIVE})}),K.isLoading&&(0,n.createElement)("div",{className:"jetpack-podcast-player__loading-overlay"},(0,n.createElement)(i.Spinner,null))))}))},28345:(e,t,r)=>{"use strict";var n=r(31985),a=r(74989);(0,n.Z)(a.u2,a.Xd)},13331:(e,t,r)=>{"use strict";r.d(t,{E:()=>n.Z});var n=r(26152)},29431:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(70444);const o=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"}))},26152:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(70444);const o=(0,n.createElement)(a.SVG,{height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(a.G,null,(0,n.createElement)(a.Rect,{fill:"none",height:"24",width:"24"}),(0,n.createElement)(a.Rect,{fill:"none",height:"24",width:"24"}),(0,n.createElement)(a.Rect,{fill:"none",height:"24",width:"24"})),(0,n.createElement)(a.G,null,(0,n.createElement)(a.G,null),(0,n.createElement)(a.G,null,(0,n.createElement)(a.G,{transform:"matrix(1 0 0 1 144 120)"},(0,n.createElement)(a.Path,{d:"M-122-114h-5v8.18c-0.31-0.11-0.65-0.18-1-0.18c-1.66,0-3,1.34-3,3s1.34,3,3,3s3-1.34,3-3v-9h3V-114 L-122-114z M-129-114h-12v2h12V-114L-129-114z M-129-110h-12v2h12V-110L-129-110z M-133-106h-8v2h8V-106L-133-106z M-129-103 c0-0.55,0.45-1,1-1c0.55,0,1,0.45,1,1s-0.45,1-1,1C-128.55-102-129-102.45-129-103z"})))))},69650:(e,t,r)=>{"use strict";r.r(t),r.d(t,{error:()=>i,playing:()=>s});var n=r(51806),a=r(70444);const o={height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},s=(0,n.createElement)(a.SVG,o,(0,n.createElement)(a.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,n.createElement)(a.Path,{d:"M3 9v6h4l5 5V4L7 9H3zm7-.17v6.34L7.83 13H5v-2h2.83L10 8.83zM16.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77 0-4.28-2.99-7.86-7-8.77z"})),i=(0,n.createElement)(a.SVG,o,(0,n.createElement)(a.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,n.createElement)(a.Path,{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))},74989:(e,t,r)=>{"use strict";r.d(t,{Xd:()=>d,u2:()=>u});var n=r(65736),a=r(70355),o=r(30723),s=r(16542),i=r(99800),l=r(13331),c=r(10591);const __=n.__,_x=n._x,u="podcast-player",d={title:__("Podcast Player","jetpack"),description:__("Select and play episodes from a single podcast.","jetpack"),icon:{src:l.E,foreground:(0,a.m)()},category:"embed",keywords:[_x("audio","block search term","jetpack"),_x("embed","block search term","jetpack")],supports:{align:["wide","full"],spacing:{padding:!0,margin:!0},anchor:!1,customClassName:!0,className:!0,html:!1,multiple:!0,reusable:!0},edit:i.Z,save:c.Z,attributes:o.Z,example:{attributes:{customPrimaryColor:(0,a.m)(),hexPrimaryColor:(0,a.m)(),exampleFeedData:{title:__("Jetpack Example Podcast","jetpack"),link:"https://jetpack.com",cover:"https://jetpackme.files.wordpress.com/2020/05/jetpack-example-podcast-cover.png?w=160",tracks:[{id:"3",title:__("3. Our third episode","jetpack"),duration:"14:58"},{id:"2",title:__("2. Interview with a special guest","jetpack"),duration:"19:17"},{id:"1",title:__("1. Welcome to Example Podcast","jetpack"),duration:"11:25"}]}}},deprecated:[s.Z]}},10591:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(51806);function a(e){let{attributes:t}=e;const{url:r}=t;if(r&&""!==r)return(0,n.createElement)("a",{className:"jetpack-podcast-player__direct-link",href:r},r)}},93610:(e,t,r)=>{"use strict";r.d(t,{J:()=>a,N:()=>n});const n={EDIT_URL:"EDIT_URL",FINISH_EDITING:"FINISH_EDITING",START_EDITING:"START_EDITING",SELECT_EPISODE:"SELECT_EPISODE",FEED_RECEIVED:"FEED_RECEIVED",CLEAR_FEED:"CLEAR_FEED",MAKE_INTERACTIVE:"MAKE_INTERACTIVE",PREVENT_INTERACTIONS:"PREVENT_INTERACTIONS",START_FETCH:"START_FETCH",CHECK_URL:"CHECK_URL"},a=(e,t)=>{switch(t.type){case n.EDIT_URL:return{...e,editedUrl:t.payload};case n.START_EDITING:return{...e,isEditing:!0,isLoading:!1};case n.FINISH_EDITING:return{...e,editedUrl:t.payload,isEditing:!1};case n.FEED_RECEIVED:return{...e,isLoading:!1,feedData:t.payload};case n.CLEAR_FEED:return{...e,feedData:{}};case n.MAKE_INTERACTIVE:return{...e,isInteractive:!0};case n.PREVENT_INTERACTIONS:return{...e,isInteractive:!1};case n.START_FETCH:return{...e,isLoading:!0};case n.SELECT_EPISODE:return{...e,selectedGuid:t.payload};case n.CHECK_URL:return{...e,selectedGuid:null,feedData:{},checkUrl:t.payload};default:return{...e}}}},66085:(e,t,r)=>{"use strict";r.d(t,{Aq:()=>l,Gd:()=>s,W4:()=>i});var n=r(65235),a=r.n(n),o=r(92819);function s(e,t){if(e&&t)return`has-${t}-${e}`}function i(e){let t=!1;return{promise:new Promise(((r,n)=>{e.then((e=>t?n({isCanceled:!0}):r(e)),(e=>n(t?{isCanceled:!0}:e)))})),cancel(){t=!0}}}const l=(0,o.memoize)((e=>{let{primaryColor:t,customPrimaryColor:r,secondaryColor:n,customSecondaryColor:o,backgroundColor:i,customBackgroundColor:l}=e;const c=s("color",t),u=s("color",n),d=s("background-color",i);return{primary:{name:t,custom:r,classes:a()({"has-primary":c||r,[c]:c})},secondary:{name:n,custom:o,classes:a()({"has-secondary":u||o,[u]:u})},background:{name:i,custom:l,classes:a()({"has-background":d||l,[d]:d})}}}),(e=>Object.values(e).join()))},51054:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(52175);function o(){return(0,n.createElement)("div",{className:"premium-content-wrapper"},(0,n.createElement)(a.InnerBlocks,{allowedBlocks:["premium-content/subscriber-view","premium-content/logged-out-view"],templateLock:"all",template:[["premium-content/subscriber-view"],["premium-content/logged-out-view"]],__experimentalCaptureToolbars:!0,templateInsertUpdatesSelection:!1}))}},59948:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(69307);const o={selectedTab:{id:"",className:"",label:(0,n.createElement)(n.Fragment,null)}},s=(0,a.createContext)(o)},34601:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(55609);const o=(0,n.createElement)(a.SVG,{viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(a.Path,{d:"M12.7439 14.4271L8.64053 13.165L8.51431 13.8718L8.09208 20.7415C8.06165 21.2365 8.61087 21.5526 9.02363 21.2776L12.7439 18.799L16.7475 21.304C17.1687 21.5676 17.7094 21.2343 17.6631 20.7396L17.0212 13.8718L17.0212 13.165L12.7439 14.4271Z"}),(0,n.createElement)(a.Circle,{cx:"12.7439",cy:"8.69796",r:"5.94466",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),(0,n.createElement)(a.Path,{d:"M9.71023 8.12461L11.9543 10.3687L15.7776 6.54533",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}))},86614:(e,t,r)=>{"use strict";r.d(t,{H2:()=>i,Wp:()=>s,ch:()=>l});var n=r(4981),a=r(9818),o=r(50851);const s=e=>0===e.name.indexOf("premium-content/")||e.innerBlocks.some(s),i=e=>{const{getBlocksByClientId:t,getBlockParents:r}=(0,a.select)("core/block-editor");return!!t(r(e.clientId)).find((e=>0===e.name.indexOf("premium-content/")))};function l(){return(0,a.useSelect)((e=>e(n.store).getBlockTypes()),[]).reduce(((e,t)=>(t.name!==o.u&&e.push(t.name),e)),[])}},83196:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(51806),a=r(9818),o=r(72067),s=r(65736),i=r(50851),l=r(16912);const __=s.__;function c(){const e=(0,a.select)("core/block-editor").getSelectedBlock();(0,a.dispatch)("core/block-editor").replaceBlock(e.clientId,(0,l.e)(e.innerBlocks))}const u=()=>(0,n.createElement)(o.PluginBlockSettingsMenuItem,{allowedBlocks:[i.u],label:__("Remove block and keep content","jetpack"),onClick:c})},16912:(e,t,r)=>{"use strict";r.d(t,{e:()=>a});var n=r(4981);const a=e=>{const t=e.find((e=>"premium-content/subscriber-view"===e.name));return 1===t.innerBlocks.length&&"core/group"===t.innerBlocks[0].name?t.innerBlocks[0]:(0,n.createBlock)("core/group",{},t.innerBlocks)}},63613:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(52175),o=r(55609);function s(e){const{options:t,selectedOption:r,selectAction:s,contractViewport:i,label:l}=e,c=e=>e.id===r.id;return i?(0,n.createElement)(a.BlockControls,{group:"block"},(0,n.createElement)(o.ToolbarDropdownMenu,{label:l,icon:"arrow-down",text:r.label},(e=>{let{onClose:r}=e;return(0,n.createElement)(o.MenuGroup,null,t.map((e=>{const t=c(e);return(0,n.createElement)(o.MenuItem,{isSelected:t,icon:t?"yes":void 0,onClick:()=>{s(e),r()},key:`jetpack-premium-content-tab-${e.id}`},e.label)})))}))):(0,n.createElement)(a.BlockControls,{group:"other"},t.map((e=>{const t=c(e);return(0,n.createElement)(o.ToolbarButton,{onClick:()=>{s(e)},className:"components-tab-button",isPressed:t,key:`jetpack-premium-content-tab-${e.id}`},(0,n.createElement)("span",null,e.label))})))}},72738:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(51806),a=r(52175),o=r(94333),s=r(9818),i=r(69307),l=r(92694),c=r(65736);const __=c.__,u=["core/button","jetpack/recurring-payments","premium-content/login-button"];const d=(0,o.compose)([(0,s.withSelect)(((e,t)=>({subscribeButton:e("core/block-editor").getBlock(t.clientId).innerBlocks.find((e=>"jetpack/recurring-payments"===e.name))}))),(0,s.withDispatch)(((e,t)=>({setSubscribeButtonPlan(r){e("core/block-editor").updateBlockAttributes(t.subscribeButton.clientId,{planId:r})}})))])((function(e){let{context:t,subscribeButton:r,setSubscribeButtonPlan:o}=e;const s=t?t["premium-content/planId"]:null,c=!!t&&t["premium-content/isPreview"],d=[["core/button",{element:"a",uniqueId:"recurring-payments-id",text:__("Subscribe","jetpack")}],["premium-content/login-button"]],p=[["jetpack/recurring-payments",{planId:s},[["jetpack/button",{element:"a",uniqueId:"recurring-payments-id",text:__("Subscribe","jetpack"),passthroughAttributes:{uniqueId:"uniqueId",url:"url"}}]]],["premium-content/login-button"]];(0,i.useEffect)((()=>{s&&r&&r.attributes.planId!==s&&o(s)}),[s,r,o]),(0,i.useEffect)((()=>{r&&(0,l.addFilter)("jetpack.recurringPayments.editorSettings","jetpack/premium-content-hide-recurring-payments-controls",((e,t)=>t===r.clientId?{...e,showProductManagementControls:!1}:e))}),[r]);const m=(0,a.useBlockProps)({className:"wp-block-buttons"});return(0,n.createElement)("div",m,(0,n.createElement)(a.InnerBlocks,{allowedBlocks:u,template:c?d:p,templateInsertUpdatesSelection:!1,__experimentalLayout:{type:"default",alignments:[]},__experimentalMoverDirection:"horizontal"}))}))},737:(e,t,r)=>{"use strict";r.d(t,{X:()=>u,u:()=>c});var n=r(51806),a=r(52175),o=r(65736),s=r(58829),i=r(72738),l=r(60439);const __=o.__,c="premium-content/buttons",u={apiVersion:2,title:__("Premium Content buttons","jetpack"),description:__("Prompt Premium Content visitors to take action with a group of button-style links.","jetpack"),category:"grow",icon:s.Z,supports:{align:!0,alignWide:!1,lightBlockWrapper:!0,inserter:!1},keywords:[__("link","jetpack")],edit:i.Z,save:l.Z,usesContext:["premium-content/planId","premium-content/isPreview"],deprecated:[{attributes:{},supports:{align:!0,alignWide:!1,lightBlockWrapper:!0,inserter:!1},save:()=>(0,n.createElement)("div",{className:"wp-block-buttons"},(0,n.createElement)(a.InnerBlocks.Content,null))}]}},60439:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(52175);function o(){const e=a.useBlockProps.save({className:"wp-block-buttons"});return(0,n.createElement)("div",e,(0,n.createElement)(a.InnerBlocks.Content,null))}},23842:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={isEligible:(e,t)=>{if("premium-content/logged-out-view"===t?.[0]?.name)return!0},migrate:(e,t)=>[e,[t[1],t[0]]],save:r(96882).Z}},12215:(e,t,r)=>{"use strict";r.d(t,{Z:()=>C});var n=r(82674),a=r.n(n),o=r(51806),s=r(52175),i=r(55609),l=r(94333),c=r(9818),u=r(69307),d=r(65736),p=r(60386),m=r(14436),h=r(16367),g=r(7652),f=r(51054),b=r(59948),v=r(63613);const __=d.__,k=[{id:"premium",label:(0,o.createElement)("span",null,__("Subscriber View","jetpack")),className:"wp-premium-content-subscriber-view"},{id:"wall",label:(0,o.createElement)("span",null,__("Guest View","jetpack")),className:"wp-premium-content-logged-out-view"}],y=0,E=1,w="premium-content";function _(e){const[t,r]=(0,u.useState)(k[E]),{isPreview:n,selectedPlanId:a}=e.attributes,{clientId:d,isSelected:_,className:C,setAttributes:j}=e,{isApiLoading:S,selectedBlock:x}=(0,c.useSelect)((e=>({selectedBlock:e(s.store).getSelectedBlock(),isApiLoading:e(g.h).isApiStateLoading()})));(0,u.useEffect)((()=>{if(_)return;if(!x)return;const e=(0,c.select)(s.store);e.getBlockParents(x.clientId).includes(d)&&("premium-content/logged-out-view"===x.name||e.getBlockParentsByBlockName(x.clientId,"premium-content/logged-out-view").length?r(k[E]):r(k[y]))}),[d,_,x]);const P=(0,l.useViewportMatch)("medium","<");return(0,o.createElement)("div",{className:C},!n&&(0,o.createElement)(o.Fragment,null,S&&(0,o.createElement)(i.Placeholder,{icon:"lock",label:__("Paid Content","jetpack"),instructions:__("Loading data…","jetpack")},(0,o.createElement)(i.Spinner,null)),(0,o.createElement)(p.Z,{blockName:w,clientId:d,productType:m.DM,selectedProductId:a,setSelectedProductId:e=>j({selectedPlanId:e})}),(0,o.createElement)(v.Z,{options:k,selectedOption:t,selectAction:r,contractViewport:P,label:__("Change view","jetpack")})),!S&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(h.U,{blockName:w}),(0,o.createElement)(b.Z.Provider,{value:{selectedTab:t}},(0,o.createElement)(f.Z,null))))}function C(e){return(0,o.createElement)(i.Disabled.Consumer,null,(t=>(0,o.createElement)(_,a()({},e,{attributes:{...e.attributes,isPreview:t||e.attributes?.isPreview}}))))}},85053:(e,t,r)=>{"use strict";var n=r(98817),a=r(31985),o=r(83196),s=r(737),i=r(9160),l=r(88430),c=r(52149),u=r(50851);(0,a.Z)(u.u,u.X,[{name:i.u,settings:i.X},{name:c.u,settings:c.X},{name:s.u,settings:s.X},{name:l.u,settings:l.X}],!1),(0,n.registerPlugin)("block-settings-remove-block-keep-content",{render:o.Z})},50851:(e,t,r)=>{"use strict";r.d(t,{X:()=>h,u:()=>m});var n=r(4981),a=r(65736),o=r(34601),s=r(86614),i=r(16912),l=r(23842),c=r(12215),u=r(96882);const __=a.__,_x=a._x,d=["core/nextpage","core/spacer","core/separator","core/more","core/loginout","core/post-navigation-link"],p=e=>{if(e.some(s.Wp))return!1;if((0,s.H2)(e[0]))return!1;return!e.every((e=>d.includes(e.name)))},m="premium-content/container",h={title:__("Paid Content","jetpack"),description:__("Restrict access to your content for paying subscribers.","jetpack"),icon:o.Z,category:"grow",keywords:[_x("buy","block search term","jetpack"),_x("credit card","block search term","jetpack"),_x("debit card","block search term","jetpack"),_x("earn","block search term","jetpack"),_x("exclusive","block search term","jetpack"),_x("gated","block search term","jetpack"),"gofundme",_x("memberships","block search term","jetpack"),_x("money","block search term","jetpack"),_x("newsletter","block search term","jetpack"),_x("paid","block search term","jetpack"),"patreon",_x("pay","block search term","jetpack"),_x("payments","block search term","jetpack"),_x("paywall","block search term","jetpack"),_x("premium content","block search term","jetpack"),_x("purchase","block search term","jetpack"),_x("recurring","block search term","jetpack"),_x("repeat","block search term","jetpack"),_x("signin","block search term","jetpack"),"stripe",_x("subscribe","block search term","jetpack"),_x("subscriptions","block search term","jetpack"),_x("support","block search term","jetpack"),_x("sponsor","block search term","jetpack"),"square","toast","venmo","stripe","substack"],attributes:{newPlanName:{type:"string",default:__("Monthly Subscription","jetpack")},newPlanCurrency:{type:"string",default:"USD"},newPlanPrice:{type:"number",default:5},newPlanInterval:{type:"string",default:"1 month"},selectedPlanId:{type:"number",default:0},isPreview:{type:"boolean",default:!1},isPremiumContentChild:{type:"bool",default:!0}},edit:c.Z,save:u.Z,providesContext:{"premium-content/planId":"selectedPlanId","premium-content/isPreview":"isPreview",isPremiumContentChild:"isPremiumContentChild"},supports:{html:!1},example:{attributes:{isPreview:!0}},transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["*"],isMatch:(e,t)=>!e.some((e=>e.isPremiumContentChild))&&(void 0===t||p(t)),__experimentalConvert(e){if(!p(e))return;const t=e.map((e=>(0,n.createBlock)(e.name,e.attributes,e.innerBlocks)));return(0,n.createBlock)("premium-content/container",{},[(0,n.createBlock)("premium-content/subscriber-view",{},t),(0,n.createBlock)("premium-content/logged-out-view")])}}],to:[{type:"block",blocks:["core/group"],transform:(e,t)=>(0,i.e)(t)}]},deprecated:[l.Z]}},98143:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(2582),a=r(52439);const o=[n.Z,a.Z]},2582:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(52175),o=r(4981);const s={attributes:{subscribeButtonText:{type:"string",default:"Subscribe"},loginButtonText:{type:"string",default:"Log In"},buttonClasses:{type:"string",default:""},backgroundButtonColor:{type:"string",default:""},textButtonColor:{type:"string",default:""},customBackgroundButtonColor:{type:"string",default:""},customTextButtonColor:{type:"string",default:""}},isEligible:e=>{let{buttonClasses:t}=e;return!!t},migrate:(e,t)=>{if(Array.isArray(t))for(let r=0;r<t.length;r++)if(t[r].name&&"premium-content/buttons"===t[r].name)return[e,[...t]];const r=(0,o.createBlock)("premium-content/buttons",{},[(0,o.createBlock)("jetpack/recurring-payments",{submitButtonText:e.subscribeButtonText,backgroundButtonColor:e.backgroundButtonColor,textButtonColor:e.textButtonColor,customBackgroundButtonColor:e.customBackgroundButtonColor,customTextButtonColor:e.customTextButtonColor}),(0,o.createBlock)("premium-content/login-button",{text:e.loginButtonText,backgroundColor:e.backgroundButtonColor,textColor:e.textButtonColor,style:{color:{background:e.customBackgroundButtonColor,text:e.customTextButtonColor}}})]);return[e,[...t,r]]},save:()=>(0,n.createElement)("div",{className:"wp-block-premium-content-logged-out-view"},(0,n.createElement)(a.InnerBlocks.Content,null))}},52439:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(51806);const a={attributes:{},supports:{inserter:!1,html:!1},save:()=>(0,n.createElement)("div",{className:"wp-block-premium-content-logged-out-view"})}},36694:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(52175),o=r(65736),s=r(59948),i=r(86614);const __=o.__;function l(){const e=(0,i.ch)();return(0,n.createElement)(s.Z.Consumer,null,(t=>{let{selectedTab:r}=t;return(0,n.createElement)("div",{hidden:"premium"===r.id,className:r.className},(0,n.createElement)(a.InnerBlocks,{allowedBlocks:e,templateLock:!1,templateInsertUpdatesSelection:!1,template:[["core/heading",{content:__("Subscribe to get access","jetpack"),level:3}],["core/paragraph",{content:__("Read more of this content when you subscribe today.","jetpack")}],["premium-content/buttons"]]}))}))}},9160:(e,t,r)=>{"use strict";r.d(t,{X:()=>p,u:()=>d});var n=r(94333),a=r(9818),o=r(65736),s=r(72629),i=r(34601),l=r(98143),c=r(36694),u=r(96588);const __=o.__,d="premium-content/logged-out-view",p={title:__("Guest View","jetpack"),description:__("The container for all content shown to site visitors who are not subscribers.","jetpack"),icon:i.Z,category:"grow",parent:["premium-content/container"],supports:{inserter:!1,html:!1},edit:c.Z,save:u.Z,deprecated:l.Z},m=(0,a.subscribe)((()=>{const e=(0,a.select)("core/rich-text").getFormatType("core/link");if(!e)return;m(),(0,s.unregisterFormatType)("core/link");const t=(0,n.compose)((0,a.withSelect)((e=>({selectedBlock:e("core/block-editor").getSelectedBlock()}))),(0,n.ifCondition)((e=>e.selectedBlock&&e.selectedBlock.name!==d)))(e.edit);(0,s.registerFormatType)("core/link",{...e,edit:t})}))},96588:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(52175);function o(){return(0,n.createElement)("div",{className:"wp-block-premium-content-logged-out-view entry-content"},(0,n.createElement)(a.InnerBlocks.Content,null))}},34154:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(65736);const a={text:{type:"string",source:"html",selector:"a",default:(0,n.__)("Log in","jetpack")},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"}}},98810:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(51806),a=r(92819),o=r(65736),s=r(69307),i=r(9818),l=r(52175);const __=o.__,c="web"===s.Platform.OS;const u=e=>{if(!(0,a.isObject)(e))return e;const t=(0,a.pickBy)((0,a.mapValues)(e,u),a.identity);return(0,a.isEqual)(t,{})?void 0:t};function d(e){let{settings:t,clientId:r,enableContrastChecking:a=!0}=e;const{getComputedStyle:o,Node:i}=window,[u,d]=(0,s.useState)(),[p,m]=(0,s.useState)(),h=c?__("Color settings","jetpack"):__("Color Settings","jetpack",0);return(0,s.useEffect)((()=>{if(c&&!a)return;const e=function(e){return document.getElementById("block-"+e)}(r);if(!e)return;m(o(e).color);let t=e,n=o(t).backgroundColor;for(;"rgba(0, 0, 0, 0)"===n&&t.parentNode&&t.parentNode.nodeType===i.ELEMENT_NODE;)t=t.parentNode,n=o(t).backgroundColor;d(n)})),(0,n.createElement)(l.InspectorControls,null,(0,n.createElement)(l.__experimentalPanelColorGradientSettings,{title:h,initialOpen:!1,settings:t},c&&a&&(0,n.createElement)(l.ContrastChecker,{backgroundColor:u,textColor:p})))}const p=function(e){const{attributes:t}=e,{colors:r,gradients:a}=(0,i.useSelect)((e=>e("core/block-editor").getSettings()),[]),o=(0,s.useRef)(t);(0,s.useEffect)((()=>{o.current=t}),[t]);const{style:c,textColor:p,backgroundColor:m,gradient:h}=t;let g;g=h?(0,l.getGradientValueBySlug)(a,h):c?.color?.gradient;const f=t=>n=>{const a=(0,l.getColorObjectByColorValue)(r,n),s=t+"Color",i={...o.current.style,color:{...o.current?.style?.color,[t]:a?.slug?void 0:n}},c=a?.slug?a.slug:void 0,d={style:u(i),[s]:c};e.setAttributes(d),o.current={...o.current,...d}};return(0,n.createElement)(d,{enableContrastChecking:!h&&!c?.color?.gradient,clientId:e.clientId,settings:[{label:__("Text Color","jetpack"),onColorChange:f("text"),colorValue:(0,l.getColorObjectByAttributeValues)(r,p,c?.color?.text).color},{label:__("Background Color","jetpack"),onColorChange:f("background"),colorValue:(0,l.getColorObjectByAttributeValues)(r,m,c?.color?.background).color,gradientValue:g,onGradientChange:t=>{const r=(0,l.getGradientSlugByValue)(a,t);let n;if(r){const e={...o.current?.style,color:{...o.current?.style?.color,gradient:void 0}};n={style:u(e),gradient:r}}else{const e={...o.current?.style,color:{...o.current?.style?.color,gradient:t}};n={style:u(e),gradient:void 0}}e.setAttributes(n),o.current={...o.current,...n}}}]})}},53201:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(65235),a=r.n(n),o=r(52175);function s(e){const{backgroundColor:t,textColor:r,gradient:n,style:s}=e,i=(0,o.getColorClassName)("background-color",t),l=(0,o.__experimentalGetGradientClass)(n),c=(0,o.getColorClassName)("color",r),u=a()(c,l,{[i]:!s?.color?.gradient&&!!i,"has-text-color":r||s?.color?.text,"has-background":t||s?.color?.background||n||s?.color?.gradient});return{className:u||void 0,style:s?.color?.background||s?.color?.text||s?.color?.gradient?{background:s?.color?.gradient?s.color.gradient:void 0,backgroundColor:s?.color?.background?s.color.background:void 0,color:s?.color?.text?s.color.text:void 0}:{}}}},74634:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(52175),o=r(65736),s=r(65235),i=r.n(s),l=r(53201);const c={attributes:{text:{type:"string",source:"html",selector:"a",default:(0,o.__)("Log in","jetpack")},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"}},supports:{align:!0,alignWide:!1,html:!1,lightBlockWrapper:!0,inserter:!1},save:e=>{let{attributes:t}=e;const{borderRadius:r,text:o}=t,s=(0,l.Z)(t),c=i()("wp-block-button__link",s.className,{"no-border-radius":0===r}),u={borderRadius:r?r+"px":void 0,...s.style};return(0,n.createElement)("div",{className:"wp-block-button"},(0,n.createElement)(a.RichText.Content,{tagName:"a",className:c,style:u,value:o}))}}},53163:(e,t,r)=>{"use strict";r.d(t,{Z:()=>f});var n=r(51806),a=r(52175),o=r(55609),s=r(69307),i=r(65736),l=r(65235),c=r.n(l),u=r(98810),d=r(53201);const __=i.__,p=0,m=50,h=5;function g(e){let{borderRadius:t="",setAttributes:r}=e;const a=(0,s.useCallback)((e=>{r({borderRadius:e})}),[r]);return(0,n.createElement)(o.PanelBody,{title:__("Border settings","jetpack")},(0,n.createElement)(o.RangeControl,{value:t,label:__("Border radius","jetpack"),min:p,max:m,initialPosition:h,allowReset:!0,onChange:a}))}const f=function(e){const{attributes:t,setAttributes:r,className:o}=e,{borderRadius:s,text:i}=t,l=(0,d.Z)(t),p=(0,a.useBlockProps)({className:"wp-block-button"});return(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",p,(0,n.createElement)(a.RichText,{placeholder:__("Add text…","jetpack"),value:i,onChange:e=>r({text:e}),withoutInteractiveFormatting:!0,className:c()(o,"wp-block-button__link",l.className,{"no-border-radius":0===s}),style:{borderRadius:s?s+"px":void 0,...l.style}})),(0,n.createElement)(a.InspectorControls,null,(0,n.createElement)(u.Z,e),(0,n.createElement)(g,{borderRadius:s,setAttributes:r})))}},88430:(e,t,r)=>{"use strict";r.d(t,{X:()=>u,u:()=>c});var n=r(65736),a=r(58829),o=r(34154),s=r(74634),i=r(53163),l=r(91430);const __=n.__,c="premium-content/login-button",u={title:__("Premium Content login button","jetpack"),description:__("Prompt subscriber visitors to log in with a button-style link (only visible for logged out users).","jetpack"),category:"grow",attributes:o.Z,icon:a.Z,keywords:[__("link","jetpack")],supports:{align:!0,alignWide:!1,html:!1,lightBlockWrapper:!0,inserter:!1},styles:[{name:"fill",label:__("Fill","jetpack"),isDefault:!0},{name:"outline",label:__("Outline","jetpack")}],edit:i.Z,save:l.Z,deprecated:[s.Z]}},91430:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(52175),o=r(65235),s=r.n(o),i=r(53201);function l(e){let{attributes:t}=e;const{borderRadius:r,text:o,align:l}=t,c=(0,i.Z)(t),u=s()("wp-block-button","wp-block-premium-content-login-button",{alignleft:"left"===l},{aligncenter:"center"===l},{alignright:"right"===l}),d=s()("wp-block-button__link",c.className,{"no-border-radius":0===r}),p={borderRadius:r?r+"px":void 0,...c.style},m=a.useBlockProps.save({className:u});return(0,n.createElement)("div",m,(0,n.createElement)(a.RichText.Content,{tagName:"a",className:d,style:p,value:o}))}},96882:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(52175);function o(){return(0,n.createElement)("div",{className:"wp-block-premium-content-container"},(0,n.createElement)(a.InnerBlocks.Content,null))}},67416:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=[r(19178).Z]},19178:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(51806);const a={attributes:{},supports:{inserter:!1,html:!1},save:()=>(0,n.createElement)("div",{className:"wp-block-premium-content-subscriber-view"})}},34166:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(51806),a=r(52175),o=r(94333),s=r(9818),i=r(65736),l=r(59948),c=r(86614);const __=i.__;const u=(0,o.compose)([(0,s.withSelect)(((e,t)=>({hasInnerBlocks:!!e("core/block-editor").getBlocksByClientId(t.clientId)[0].innerBlocks.length})))])((function(e){let{hasInnerBlocks:t}=e;const r=(0,c.ch)();return(0,n.createElement)(l.Z.Consumer,null,(e=>{let{selectedTab:o}=e;return(0,n.createElement)("div",{hidden:"wall"===o.id,className:o.className},(0,n.createElement)(a.InnerBlocks,{allowedBlocks:r,renderAppender:!t&&a.InnerBlocks.ButtonBlockAppender,templateLock:!1,templateInsertUpdatesSelection:!1,template:[["core/heading",{content:__("Subscriber Content","jetpack"),level:3}],["core/paragraph",{content:__("Add content here that will only be visible to your subscribers.","jetpack")}]]}))}))}))},52149:(e,t,r)=>{"use strict";r.d(t,{X:()=>c,u:()=>l});var n=r(65736),a=r(34601),o=r(67416),s=r(34166),i=r(31356);const __=n.__,l="premium-content/subscriber-view",c={title:__("Subscriber View","jetpack"),description:__("The container for all content shown to subscribers.","jetpack"),icon:a.Z,category:"grow",attributes:{},edit:s.Z,save:i.Z,parent:["premium-content/container"],supports:{inserter:!1,html:!1},deprecated:o.Z}},31356:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(52175);function o(){return(0,n.createElement)("div",{className:"wp-block-premium-content-subscriber-view entry-content"},(0,n.createElement)(a.InnerBlocks.Content,null))}},10799:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(52175),o=r(55609),s=r(65736),i=r(92819);const __=s.__,l=e=>{let{id:t,setRating:r,children:a}=e;return(0,n.createElement)("span",{className:"jetpack-ratings-button",tabIndex:0,role:"button",onKeyDown:(o=t,e=>{let{code:t}=e;return"Enter"===t?r(o):null}),onClick:(e=>()=>r(e))(t)},a);var o},c=e=>function(t){let{className:r,setAttributes:s,attributes:{align:c,color:u,rating:d,maxRating:p}}=t;const m=e=>{e===d?Math.ceil(d)===d&&(e-=.5):.5===d&&1===e&&(e=0),s({rating:e})};return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(a.BlockControls,null,(0,n.createElement)(a.AlignmentToolbar,{value:c,onChange:e=>s({align:e})})),(0,n.createElement)("div",{className:r,style:{textAlign:c}},(0,i.range)(1,p+1).map((t=>(0,n.createElement)(l,{key:t,id:t,setRating:m},(0,n.createElement)("span",null,(0,n.createElement)(e,{className:d>=t-.5?null:"is-rating-unfilled",color:u})),(0,n.createElement)("span",null,(0,n.createElement)(e,{className:d>=t?null:"is-rating-unfilled",color:u})))))),(0,n.createElement)(a.InspectorControls,null,(0,n.createElement)(o.PanelBody,{title:__("Settings","jetpack")},(0,n.createElement)(o.RangeControl,{label:__("Highest rating","jetpack"),value:p,onChange:e=>s({maxRating:e}),min:2,max:10}),(0,n.createElement)(a.PanelColorSettings,{title:__("Color Settings","jetpack"),initialOpen:!0,colorSettings:[{value:u,onChange:e=>s({color:e}),label:__("Color","jetpack")}]}))))}},36836:(e,t,r)=>{"use strict";var n=r(31985),a=r(90362);(0,n.Z)(a.u,a.X)},5056:(e,t,r)=>{"use strict";r.d(t,{d:()=>o,r:()=>s});var n=r(51806),a=r(55609);const o=()=>(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4V6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"})),s=e=>{const t=(e=>e&&e.color?e.color:"currentColor")(e),r=(e=>e&&e.className?e.className:"")(e);return(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",color:t},(0,n.createElement)(a.Path,{className:r,fill:t,stroke:t,d:"M12,17.3l6.2,3.7l-1.6-7L22,9.2l-7.2-0.6L12,2L9.2,8.6L2,9.2L7.5,14l-1.6,7L12,17.3z"}))}},90362:(e,t,r)=>{"use strict";r.d(t,{X:()=>c,u:()=>l});var n=r(65736),a=r(70355),o=r(10799),s=r(5056),i=r(78403);const __=n.__,_x=n._x,l="rating-star",c={title:__("Star Rating","jetpack"),description:__("Rate movies, books, songs, recipes — anything you can put a number on.","jetpack"),icon:{src:s.d,foreground:(0,a.m)()},keywords:[_x("star","block search term","jetpack"),_x("rating","block search term","jetpack"),_x("review","block search term","jetpack")],category:"widgets",example:{},styles:[{name:"filled",label:_x("Filled","block style","jetpack"),isDefault:!0},{name:"outlined",label:_x("Outlined","block style","jetpack")}],attributes:{rating:{type:"number",default:1},maxRating:{type:"number",default:5},color:{type:"string"},align:{type:"string",default:"left"}},edit:(0,o.Z)(s.r),save:(0,i.Z)("★")}},78403:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(92819);const o=e=>function(t){let{className:r,attributes:{align:o,rating:s,color:i}}=t;return(0,n.createElement)("figure",{className:r,style:{textAlign:o}},(0,a.range)(1,s+1).map((t=>(0,n.createElement)("span",{key:t,style:{color:i}},e))))}},7463:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(4981),a=r(92819);const o=["submitButtonText","submitButtonClasses","backgroundButtonColor","textButtonColor","customBackgroundButtonColor","customTextButtonColor"],s={attributes:{planId:{type:"integer"},submitButtonText:{type:"string"},submitButtonClasses:{type:"string"},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},align:{type:"string"}},migrate:e=>{const t=(0,a.omit)(e,o),r={text:(s=e).submitButtonText,textColor:s.textButtonColor,customTextColor:s.customTextButtonColor,backgroundColor:s.backgroundButtonColor,customBackgroundColor:s.customBackgroundButtonColor};var s;return[t,[(0,n.createBlock)("jetpack/button",{element:"a",uniqueId:"recurring-payments-id",...r})]]},isEligible:(e,t)=>(0,a.isEmpty)(t)||(0,a.some)((0,a.pick)(e,o),Boolean),save:()=>null}},25370:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(52175);const o={attributes:{planId:{type:"integer"},align:{type:"string"},url:{type:"string",default:"#"},uniqueId:{type:"string",default:"id"},width:{type:"string"}},supports:{html:!1,__experimentalExposeControlsToChildren:!0},save:e=>{let{attributes:{width:t}}=e;const r={width:t};t?.includes("%")&&(r.width=`calc( ${t} - var( --jetpack-payment-buttons-gap, 0 ) * ${(100-t.replace("%",""))/100} )`);const o=a.useInnerBlocksProps.save({...a.useBlockProps.save(),style:r});return(0,n.createElement)("div",o)}}},3821:(e,t,r)=>{"use strict";r.d(t,{Z:()=>b});var n=r(51806),a=r(52175),o=r(9818),s=r(12238),i=r(69307),l=r(92694),c=r(99196),u=r(60386),d=r(16367),p=r(99307),m=r(81673),h=r(30429),g=r(51527);const f="recurring-payments";function b(e){let{attributes:t,clientId:r,setAttributes:b}=e;const{align:v,planId:k,width:y}=t,E=(0,p.j3)(),w=(0,o.useSelect)((e=>e(s.store)?.getCurrentPost()?.link),[]),_=(0,c.useCallback)((e=>{b({planId:e,url:(e=>{if(p.yn!==E||!w)return"#";const t=new URL(w);return t.searchParams.set("recurring_payments",e),t.toString()})(e),uniqueId:`recurring-payments-${e}`})}),[E,w,b]);(0,i.useEffect)((()=>{_(k)}),[k,_]);const{showProductManagementControls:C,showStripeNudge:j}=(0,l.applyFilters)("jetpack.recurringPayments.editorSettings",{showProductManagementControls:!0,showStripeNudge:!0},r);(0,m.Z)({attributes:t,setAttributes:b});const S=(0,a.useBlockProps)({style:(0,g.r)({width:y})}),x=(0,a.useInnerBlocksProps)({},{template:[["jetpack/button",{element:"a",passthroughAttributes:{uniqueId:"uniqueId",url:"url"}}]],templateLock:"all",templateInsertUpdatesSelection:!0});return(0,n.createElement)("div",S,C&&(0,n.createElement)(u.Z,{blockName:f,clientId:r,selectedProductId:k,setSelectedProductId:_}),(0,n.createElement)(a.InspectorControls,null,(0,n.createElement)(h.G,{align:v,width:y,onChange:e=>b({width:e})})),j&&(0,n.createElement)(d.U,{blockName:f}),(0,n.createElement)("div",x))}},94315:(e,t,r)=>{"use strict";var n=r(31985),a=r(56367);(0,n.Z)(a.u2,a.Xd)},56367:(e,t,r)=>{"use strict";r.d(t,{Xd:()=>v,u2:()=>h});var n=r(51806),a=r(13419),o=r(4981),s=r(55609),i=r(69307),l=r(65736),c=r(70355),u=(r(79162),r(7463)),d=r(25370),p=r(3821),m=r(53453);const __=l.__,_x=l._x,h="recurring-payments",g=__("Payment Button","jetpack"),f=(0,n.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(s.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,n.createElement)(s.G,null,(0,n.createElement)(s.Path,{d:"M20 4H4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h16c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zm0 2v2H4V6h16zM4 18v-6h16v6H4zm2-4h7v2H6v-2zm9 0h3v2h-3v-2z"}))),b=(0,a.Wp)()||(0,a.Ug)()?"https://wordpress.com/support/video-tutorials-add-payments-features-to-your-site-with-our-guides/#how-to-use-the-payments-block-video":"https://jetpack.com/support/jetpack-blocks/payments-block/",v={apiVersion:2,title:g,icon:{src:f,foreground:(0,c.m)()},description:(0,n.createElement)(i.Fragment,null,(0,n.createElement)("p",null,__("Button allowing you to sell products and subscriptions.","jetpack")),(0,n.createElement)(s.ExternalLink,{href:b},__("Support reference","jetpack"))),category:"earn",keywords:[_x("buy","block search term","jetpack"),_x("contribution","block search term","jetpack"),_x("commerce","block search term","jetpack"),_x("credit card","block search term","jetpack"),_x("debit card","block search term","jetpack"),_x("donate","block search term","jetpack"),_x("Donations","block search term","jetpack"),_x("earn","block search term","jetpack"),_x("ecommerce","block search term","jetpack"),"gofundme",_x("memberships","block search term","jetpack"),_x("money","block search term","jetpack"),_x("paid","block search term","jetpack"),"patreon",_x("pay","block search term","jetpack"),_x("payments","block search term","jetpack"),_x("products","block search term","jetpack"),_x("purchase","block search term","jetpack"),_x("recurring","block search term","jetpack"),_x("sell","block search term","jetpack"),_x("shop","block search term","jetpack"),"stripe",_x("subscribe","block search term","jetpack"),_x("subscriptions","block search term","jetpack"),_x("sponsor","block search term","jetpack"),"square","toast","venmo"],usesContext:["isPremiumContentChild"],providesContext:{"jetpack/parentBlockWidth":"width"},attributes:{planId:{type:"integer"},align:{type:"string"},url:{type:"string",default:"#"},uniqueId:{type:"string",default:"id"},width:{type:"string"}},edit:p.Z,save:m.Z,parent:["jetpack/payment-buttons"],supports:{html:!1,__experimentalExposeControlsToChildren:!0},deprecated:[d.Z,u.Z],transforms:{from:[{type:"block",blocks:["core/buttons"],isMatch:(e,t)=>void 0!==t&&1===t.innerBlocks.length&&"core/button"===t.innerBlocks[0].name,transform:(e,t)=>{var r,n;const a=t[0],s={element:"a",text:null!==(r=a.attributes.text)&&void 0!==r?r:"",className:null!==(n=a.attributes.className)&&void 0!==n?n:""},i=a.attributes.width;i&&(s.width=i.toString()+"%");const l=a.attributes.style?.border?.radius;l&&(s.borderRadius=parseInt(l.substring(0,l.length-2)));const c=(0,o.createBlock)("jetpack/button",s,[]);return(0,o.createBlock)("jetpack/"+h,{},[c])}}]}}},53453:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(52175),o=r(51527);function s(e){let{attributes:{width:t}}=e;const r=a.useInnerBlocksProps.save({...a.useBlockProps.save(),style:(0,o.r)({width:t})});return(0,n.createElement)("div",r)}},51527:(e,t,r)=>{"use strict";r.d(t,{r:()=>n});const n=e=>{let{width:t}=e;const r={width:t};return t?.includes("%")&&(r.width=`calc(${t} - var(--jetpack-payment-buttons-gap, 0) * ${(100-t.replace("%",""))/100})`),r}},53296:(e,t,r)=>{"use strict";r.d(t,{AP:()=>l,Hj:()=>i});var n=r(51806),a=r(55609),o=r(65736);const __=o.__,s=6;function i(e){let{attributes:t,setAttributes:r}=e;const{displayAuthor:o,displayContext:i,displayDate:l,displayHeadline:c,displayThumbnails:u,headline:d,postsToShow:p}=t;return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(a.PanelBody,{title:__("Layout settings","jetpack")},(0,n.createElement)(a.ToggleControl,{label:__("Display headline","jetpack"),checked:c,onChange:e=>r({displayHeadline:e})}),c&&(0,n.createElement)(a.TextControl,{value:d,onChange:e=>r({headline:e}),label:__("Headline","jetpack")}),(0,n.createElement)(a.RangeControl,{label:__("Number of posts","jetpack"),value:p,onChange:e=>r({postsToShow:Math.min(e,s)}),min:1,max:s})),(0,n.createElement)(a.PanelBody,{title:__("Metadata settings","jetpack")},(0,n.createElement)(a.ToggleControl,{label:__("Display date","jetpack"),checked:l,onChange:e=>r({displayDate:e})}),(0,n.createElement)(a.ToggleControl,{label:__("Display author","jetpack"),checked:o,onChange:e=>r({displayAuthor:e})}),(0,n.createElement)(a.ToggleControl,{label:__("Display context (category or tag)","jetpack"),checked:i,onChange:e=>r({displayContext:e})}),(0,n.createElement)(a.ToggleControl,{label:__("Display thumbnail","jetpack"),checked:u,onChange:e=>r({displayThumbnails:e})})))}function l(e){let{attributes:t,setAttributes:r}=e;const{postLayout:o}=t,s=[{icon:"grid-view",title:__("Grid view","jetpack"),onClick:()=>r({postLayout:"grid"}),isActive:"grid"===o},{icon:"list-view",title:__("List view","jetpack"),onClick:()=>r({postLayout:"list"}),isActive:"list"===o}];return(0,n.createElement)(a.ToolbarGroup,{controls:s})}},86434:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>f});var n=r(51806),a=r(52175),o=r(55609),s=r(94333),i=r(9818),l=r(69307),c=r(65736),u=r(92819),d=r(53296);const __=c.__;function p(e){return(0,n.createElement)("div",{className:"jp-related-posts-i2__post",id:e.id,"aria-labelledby":e.id+"-heading"},(0,n.createElement)("strong",{id:e.id+"-heading",className:"jp-related-posts-i2__post-link"},e.isInSiteEditor?__("Preview unavailable in site editor.","jetpack"):__("Preview unavailable: you haven't published enough posts with similar content.","jetpack")),e.displayThumbnails&&(0,n.createElement)("figure",{className:"jp-related-posts-i2__post-image-placeholder","aria-label":__("Placeholder image","jetpack")},(0,n.createElement)(o.SVG,{className:"jp-related-posts-i2__post-image-placeholder-square",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 350 200"},(0,n.createElement)("title",null,__("Grey square","jetpack")),(0,n.createElement)(o.Path,{d:"M0 0h350v200H0z",fill:"#8B8B96","fill-opacity":".1"})),(0,n.createElement)(o.SVG,{className:"jp-related-posts-i2__post-image-placeholder-icon",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,n.createElement)("title",null,__("Icon for image","jetpack")),(0,n.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,n.createElement)(o.Path,{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14 6 17h12l-3.86-5.14z"}))),e.displayDate&&(0,n.createElement)("div",{className:"jp-related-posts-i2__post-date has-small-font-size"},__("August 3, 2018","jetpack")),e.displayAuthor&&(0,n.createElement)("div",{className:"jp-related-posts-i2__post-author has-small-font-size"},__("by John Doe","jetpack")),e.displayContext&&(0,n.createElement)("div",{className:"jp-related-posts-i2__post-context has-small-font-size"},__("In “Uncategorized”","jetpack")))}function m(e){const t=e.post?.block_context?.text||"",r=e.post?.block_context?.link||"",a=""!==t,o=""!==r;return(0,n.createElement)("div",{className:"jp-related-posts-i2__post",id:e.id,"aria-labelledby":e.id+"-heading"},(0,n.createElement)("a",{className:"jp-related-posts-i2__post-link",id:e.id+"-heading",href:e.post.url,rel:"nofollow noopener noreferrer",target:"_blank"},e.post.title),e.displayThumbnails&&e.post.img&&e.post.img.src&&(0,n.createElement)("a",{className:"jp-related-posts-i2__post-img-link",href:e.post.url},(0,n.createElement)("img",{className:"jp-related-posts-i2__post-img",src:e.post.img.src,alt:e.post.title,rel:"nofollow noopener noreferrer",target:"_blank"})),e.displayDate&&(0,n.createElement)("div",{className:"jp-related-posts-i2__post-date has-small-font-size"},e.post.date),e.displayAuthor&&(0,n.createElement)("div",{className:"jp-related-posts-i2__post-author has-small-font-size"},e.post.author),e.displayContext&&a&&(0,n.createElement)("div",{className:"jp-related-posts-i2__post-context has-small-font-size"},o&&(0,n.createElement)("a",{href:r},t),!1===o&&t))}function h(e){const t="jp-related-posts-i2__row";let r=0;const a=e.posts.length>3;switch(e.posts.length){case 2:case 4:case 5:r=2;break;default:r=3}return(0,n.createElement)("div",null,(0,n.createElement)("div",{className:t,"data-post-count":e.posts.slice(0,r).length},e.posts.slice(0,r)),a&&(0,n.createElement)("div",{className:t,"data-post-count":e.posts.slice(r).length},e.posts.slice(r)))}class g extends l.Component{render(){const{attributes:e,className:t,posts:r,setAttributes:o,instanceId:s,isInSiteEditor:i}=this.props,{displayAuthor:c,displayContext:u,displayDate:g,displayHeadline:f,displayThumbnails:b,headline:v,postLayout:k,postsToShow:y}=e,E="jp-relatedposts-i2",w=[];for(let e=0;e<y;e++)r[e]?w.push((0,n.createElement)(m,{id:`related-posts-${s}-post-${e}`,key:E+"-"+e,post:r[e],displayThumbnails:b,displayDate:g,displayContext:u,displayAuthor:c})):w.push((0,n.createElement)(p,{id:`related-posts-${s}-post-${e}`,key:"related-post-placeholder-"+e,displayThumbnails:b,displayDate:g,displayContext:u,isInSiteEditor:i,displayAuthor:c}));return(0,n.createElement)(l.Fragment,null,(0,n.createElement)(a.InspectorControls,null,(0,n.createElement)(d.Hj,{attributes:e,setAttributes:o})),(0,n.createElement)(a.BlockControls,null,(0,n.createElement)(d.AP,{attributes:e,setAttributes:o})),(0,n.createElement)("div",{className:t,id:`related-posts-${s}`},f&&(0,n.createElement)("h3",null,v),(0,n.createElement)("div",{className:E,"data-layout":k},(0,n.createElement)(h,{posts:w}))))}}const f=(0,s.compose)(s.withInstanceId,(0,i.withSelect)((e=>{const{getCurrentPost:t}=e("core/editor"),r=t();return{posts:(0,u.get)(r,"jetpack-related-posts",[]),isInSiteEditor:(0,u.isEmpty)(r)}})))(g)},89517:(e,t,r)=>{"use strict";var n=r(31985),a=r(92882);(0,n.Z)(a.u2,a.Xd)},92882:(e,t,r)=>{"use strict";r.d(t,{Xd:()=>u,u2:()=>l});var n=r(51806),a=r(55609),o=r(65736),s=r(70355),i=r(86434);const __=o.__,_x=o._x,l="related-posts",c=(0,n.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(a.G,{stroke:"currentColor",strokeWidth:"2",strokeLinecap:"square"},(0,n.createElement)(a.Path,{d:"M4,4 L4,19 M4,4 L19,4 M4,9 L19,9 M4,14 L19,14 M4,19 L19,19 M9,4 L9,19 M19,4 L19,19"}))),u={title:__("Related Posts","jetpack"),description:__("Display a list of related posts.","jetpack"),icon:{src:c,foreground:(0,s.m)()},category:"embed",keywords:[_x("similar content","block search term","jetpack"),_x("linked","block search term","jetpack"),_x("connected","block search term","jetpack")],attributes:{postLayout:{type:"string",default:"grid"},displayAuthor:{type:"boolean",default:!1},displayDate:{type:"boolean",default:!0},displayHeadline:{type:"boolean",default:!1},displayThumbnails:{type:"boolean",default:!1},displayContext:{type:"boolean",default:!1},headline:{type:"string",default:""},postsToShow:{type:"number",default:3}},supports:{html:!1,multiple:!1,reusable:!1,color:{gradients:!0,link:!0},spacing:{margin:!0,padding:!0},typography:{__experimentalFontFamily:!0,fontSize:!0,lineHeight:!0},align:["wide","full"]},transforms:{from:[{type:"shortcode",tag:"jetpack-related-posts"}]},edit:i.ZP,save:()=>null,example:{attributes:{postLayout:"grid",displayAuthor:!1,displayDate:!0,displayHeadline:!1,displayThumbnails:!0,displayContext:!1,headline:"",postsToShow:2}}}},4498:(e,t,r)=>{"use strict";r.d(t,{Z:()=>b});var n=r(90017),a=r.n(n),o=r(51806),s=r(52175),i=r(55609),l=r(9818),c=r(69307),u=r(65736),d=r(65235),p=r.n(d),m=r(51100),h=r(30314);const __=u.__,_n=u._n,g=[{value:m.FV,label:__("Show after threshold","jetpack")},{value:m.Am,label:__("Show before threshold","jetpack")}];class f extends c.Component{constructor(){super(...arguments),a()(this,"state",{isThresholdValid:!0}),a()(this,"setCriteria",(e=>this.props.setAttributes({criteria:e}))),a()(this,"setThreshold",(e=>{if(/^\d+$/.test(e)&&+e>0)return this.props.setAttributes({threshold:+e}),void this.setState({isThresholdValid:!0});this.setState({isThresholdValid:!1})}))}getNoticeLabel(){return this.props.attributes.criteria===m.FV?1===this.props.attributes.threshold?__("This block will only appear to people who have visited this page more than once.","jetpack"):(0,u.sprintf)(/* translators: placeholder is a number. */
_n("This block will only appear to people who have visited this page more than %d time.","This block will only appear to people who have visited this page more than %d times.",+this.props.attributes.threshold,"jetpack"),this.props.attributes.threshold):1===this.props.attributes.threshold?__("This block will only appear to people who are visiting this page for the first time.","jetpack"):(0,u.sprintf)(/* translators: placeholder is a number. */
_n("This block will only appear to people who are visiting this page for %d time.","This block will only appear to people who have visited this page at most %d times.",+this.props.attributes.threshold,"jetpack"),this.props.attributes.threshold)}render(){return(0,o.createElement)("div",{className:p()(this.props.className,{"wp-block-jetpack-repeat-visitor--is-unselected":!this.props.isSelected})},(0,o.createElement)(i.Placeholder,{icon:h.qv,label:__("Repeat Visitor","jetpack"),className:"wp-block-jetpack-repeat-visitor-placeholder"},(0,o.createElement)(i.TextControl,{className:"wp-block-jetpack-repeat-visitor-threshold",defaultValue:this.props.attributes.threshold,help:this.state.isThresholdValid?"":__("Please enter a valid number.","jetpack"),label:__("Visit count threshold","jetpack"),min:"1",onChange:this.setThreshold,pattern:"[0-9]",type:"number"}),(0,o.createElement)(i.RadioControl,{label:__("Visibility","jetpack"),selected:this.props.attributes.criteria,options:g,onChange:this.setCriteria})),(0,o.createElement)(i.Notice,{status:"info",isDismissible:!1},this.getNoticeLabel()),(0,o.createElement)("div",{className:"wp-block-jetpack-repeat-visitor__inner-container"},(0,o.createElement)(s.InnerBlocks,null)))}}const b=(0,l.withSelect)(((e,t)=>{const{isBlockSelected:r,hasSelectedInnerBlock:n}=e("core/block-editor");return{isSelected:r(t.clientId)||n(t.clientId)}}))(f)},48516:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(52175);const o=e=>{let{className:t}=e;return(0,n.createElement)("div",{className:t},(0,n.createElement)("div",{className:"wp-block-jetpack-repeat-visitor__inner-container"},(0,n.createElement)(a.InnerBlocks.Content,null)))}},51100:(e,t,r)=>{"use strict";r.d(t,{Am:()=>a,FV:()=>n,Kv:()=>o});const n="after-visits",a="before-visits",o=3},50323:(e,t,r)=>{"use strict";var n=r(31985),a=r(30314);(0,n.Z)(a.u2,a.Xd)},30314:(e,t,r)=>{"use strict";r.d(t,{Xd:()=>g,qv:()=>h,u2:()=>m});var n=r(51806),a=r(52175),o=r(55609),s=r(65736),i=r(70355),l=r(36598),c=r(4498),u=r(48516),d=r(51100);const __=s.__,_x=s._x,p={attributes:{criteria:{type:"string",default:d.FV},threshold:{type:"number",default:d.Kv}},supports:{html:!1},save:e=>{let{className:t}=e;return(0,n.createElement)("div",{className:t},(0,n.createElement)(a.InnerBlocks.Content,null))}},m="repeat-visitor",h=(0,l.Z)((0,n.createElement)(o.Path,{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"})),g={attributes:{criteria:{type:"string",default:d.FV},threshold:{type:"number",default:d.Kv}},category:"widgets",description:__("Control block visibility based on how often a visitor has viewed the page.","jetpack"),icon:{src:h,foreground:(0,i.m)()},keywords:[_x("return","block search term","jetpack"),_x("visitors","block search term","jetpack"),_x("visibility","block search term","jetpack")],supports:{align:["wide","full"],html:!1},title:__("Repeat Visitor","jetpack"),edit:c.Z,save:u.Z,example:{attributes:{criteria:d.FV,threshold:d.Kv},innerBlocks:[{name:"core/paragraph",attributes:{content:__("This block will only appear to a visitor who visited the page three or more times.","jetpack")}}]},deprecated:[p]}},26208:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(52175);function o(e){let{className:t}=e;return(0,n.createElement)("div",{className:t},(0,n.createElement)(a.InnerBlocks,{template:[["jetpack/whatsapp-button",{}]],allowedBlocks:["jetpack/whatsapp-button"]}))}},23346:(e,t,r)=>{"use strict";var n=r(31985),a=r(71290),o=r(17458);(0,n.Z)(o.u2,o.Xd,[{name:a.u2,settings:a.Xd}])},17458:(e,t,r)=>{"use strict";r.d(t,{Xd:()=>p,u2:()=>d});var n=r(51806),a=r(52175),o=r(55609),s=r(65736),i=r(70355),l=r(36598),c=r(26208),u=r(1645);const __=s.__,_x=s._x,d="send-a-message",p={title:__("Send A Message","jetpack"),description:__("Let your visitors send you messages with the tap of a button.","jetpack"),icon:{src:(0,l.Z)((0,n.createElement)(o.Path,{d:"M21 6h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1zm-4 6V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1z"})),foreground:(0,i.m)()},category:"grow",keywords:[_x("whatsapp","keyword","jetpack"),_x("messenger","keyword","jetpack"),_x("contact","keyword","jetpack"),_x("support","keyword","jetpack")],supports:{html:!1},attributes:{},edit:c.Z,save:e=>(0,n.createElement)("div",{className:e.className},(0,n.createElement)(a.InnerBlocks.Content,null)),variations:u.Z,example:{}}},46482:(e,t,r)=>{"use strict";r.d(t,{n:()=>n});const n=[{code:"US",label:"🇺🇸 +1",value:"1US"},{code:"CA",label:"🇨🇦 +1",value:"1CA"},{code:"BS",label:"🇧🇸 +1242",value:"1242BS"},{code:"BB",label:"🇧🇧 +1246",value:"1246BB"},{code:"AI",label:"🇦🇮 +1264",value:"1264AI"},{code:"AG",label:"🇦🇬 +1268",value:"1268AG"},{code:"VG",label:"🇻🇬 +1284",value:"1284VG"},{code:"VI",label:"🇻🇮 +1340",value:"1340VI"},{code:"BM",label:"🇧🇲 +1441",value:"1441BM"},{code:"GD",label:"🇬🇩 +1473",value:"1473GD"},{code:"TC",label:"🇹🇨 +1649",value:"1649TC"},{code:"MS",label:"🇲🇸 +1664",value:"1664MS"},{code:"MP",label:"🇲🇵 +1670",value:"1670MP"},{code:"GU",label:"🇬🇺 +1671",value:"1671GU"},{code:"AS",label:"🇦🇸 +1684",value:"1684AS"},{code:"LC",label:"🇱🇨 +1758",value:"1758LC"},{code:"DM",label:"🇩🇲 +1767",value:"1767DM"},{code:"VC",label:"🇻🇨 +1784",value:"1784VC"},{code:"DO",label:"🇩🇴 +1849",value:"1849DO"},{code:"TT",label:"🇹🇹 +1868",value:"1868TT"},{code:"KN",label:"🇰🇳 +1869",value:"1869KN"},{code:"JM",label:"🇯🇲 +1876",value:"1876JM"},{code:"PR",label:"🇵🇷 +1939",value:"1939PR"},{code:"EG",label:"🇪🇬 +20",value:"20EG"},{code:"MA",label:"🇲🇦 +212",value:"212MA"},{code:"DZ",label:"🇩🇿 +213",value:"213DZ"},{code:"TN",label:"🇹🇳 +216",value:"216TN"},{code:"LY",label:"🇱🇾 +218",value:"218LY"},{code:"GM",label:"🇬🇲 +220",value:"220GM"},{code:"SN",label:"🇸🇳 +221",value:"221SN"},{code:"MR",label:"🇲🇷 +222",value:"222MR"},{code:"ML",label:"🇲🇱 +223",value:"223ML"},{code:"GN",label:"🇬🇳 +224",value:"224GN"},{code:"CI",label:"🇨🇮 +225",value:"225CI"},{code:"BF",label:"🇧🇫 +226",value:"226BF"},{code:"NE",label:"🇳🇪 +227",value:"227NE"},{code:"TG",label:"🇹🇬 +228",value:"228TG"},{code:"BJ",label:"🇧🇯 +229",value:"229BJ"},{code:"MU",label:"🇲🇺 +230",value:"230MU"},{code:"LR",label:"🇱🇷 +231",value:"231LR"},{code:"SL",label:"🇸🇱 +232",value:"232SL"},{code:"GH",label:"🇬🇭 +233",value:"233GH"},{code:"NG",label:"🇳🇬 +234",value:"234NG"},{code:"TD",label:"🇹🇩 +235",value:"235TD"},{code:"CF",label:"🇨🇫 +236",value:"236CF"},{code:"CM",label:"🇨🇲 +237",value:"237CM"},{code:"CV",label:"🇨🇻 +238",value:"238CV"},{code:"ST",label:"🇸🇹 +239",value:"239ST"},{code:"GQ",label:"🇬🇶 +240",value:"240GQ"},{code:"GA",label:"🇬🇦 +241",value:"241GA"},{code:"CG",label:"🇨🇬 +242",value:"242CG"},{code:"CD",label:"🇨🇩 +243",value:"243CD"},{code:"AO",label:"🇦🇴 +244",value:"244AO"},{code:"GW",label:"🇬🇼 +245",value:"245GW"},{code:"IO",label:"🇮🇴 +246",value:"246IO"},{code:"SC",label:"🇸🇨 +248",value:"248SC"},{code:"SD",label:"🇸🇩 +249",value:"249SD"},{code:"RW",label:"🇷🇼 +250",value:"250RW"},{code:"ET",label:"🇪🇹 +251",value:"251ET"},{code:"SO",label:"🇸🇴 +252",value:"252SO"},{code:"DJ",label:"🇩🇯 +253",value:"253DJ"},{code:"KE",label:"🇰🇪 +254",value:"254KE"},{code:"TZ",label:"🇹🇿 +255",value:"255TZ"},{code:"UG",label:"🇺🇬 +256",value:"256UG"},{code:"BI",label:"🇧🇮 +257",value:"257BI"},{code:"MZ",label:"🇲🇿 +258",value:"258MZ"},{code:"ZM",label:"🇿🇲 +260",value:"260ZM"},{code:"MG",label:"🇲🇬 +261",value:"261MG"},{code:"YT",label:"🇾🇹 +262",value:"262YT"},{code:"RE",label:"🇷🇪 +262",value:"262RE"},{code:"ZW",label:"🇿🇼 +263",value:"263ZW"},{code:"NA",label:"🇳🇦 +264",value:"264NA"},{code:"MW",label:"🇲🇼 +265",value:"265MW"},{code:"LS",label:"🇱🇸 +266",value:"266LS"},{code:"BW",label:"🇧🇼 +267",value:"267BW"},{code:"SZ",label:"🇸🇿 +268",value:"268SZ"},{code:"KM",label:"🇰🇲 +269",value:"269KM"},{code:"ZA",label:"🇿🇦 +27",value:"27ZA"},{code:"SH",label:"🇸🇭 +290",value:"290SH"},{code:"ER",label:"🇪🇷 +291",value:"291ER"},{code:"AW",label:"🇦🇼 +297",value:"297AW"},{code:"FO",label:"🇫🇴 +298",value:"298FO"},{code:"GL",label:"🇬🇱 +299",value:"299GL"},{code:"GR",label:"🇬🇷 +30",value:"30GR"},{code:"NL",label:"🇳🇱 +31",value:"31NL"},{code:"BE",label:"🇧🇪 +32",value:"32BE"},{code:"FR",label:"🇫🇷 +33",value:"33FR"},{code:"ES",label:"🇪🇸 +34",value:"34ES"},{code:"KY",label:"🇰🇾 +345",value:"345KY"},{code:"GI",label:"🇬🇮 +350",value:"350GI"},{code:"PT",label:"🇵🇹 +351",value:"351PT"},{code:"LU",label:"🇱🇺 +352",value:"352LU"},{code:"IE",label:"🇮🇪 +353",value:"353IE"},{code:"IS",label:"🇮🇸 +354",value:"354IS"},{code:"AL",label:"🇦🇱 +355",value:"355AL"},{code:"MT",label:"🇲🇹 +356",value:"356MT"},{code:"CY",label:"🇨🇾 +357",value:"357CY"},{code:"FI",label:"🇫🇮 +358",value:"358FI"},{code:"BG",label:"🇧🇬 +359",value:"359BG"},{code:"HU",label:"🇭🇺 +36",value:"36HU"},{code:"LT",label:"🇱🇹 +370",value:"370LT"},{code:"LV",label:"🇱🇻 +371",value:"371LV"},{code:"EE",label:"🇪🇪 +372",value:"372EE"},{code:"MD",label:"🇲🇩 +373",value:"373MD"},{code:"AM",label:"🇦🇲 +374",value:"374AM"},{code:"BY",label:"🇧🇾 +375",value:"375BY"},{code:"AD",label:"🇦🇩 +376",value:"376AD"},{code:"MC",label:"🇲🇨 +377",value:"377MC"},{code:"SM",label:"🇸🇲 +378",value:"378SM"},{code:"VA",label:"🇻🇦 +379",value:"379VA"},{code:"UA",label:"🇺🇦 +380",value:"380UA"},{code:"RS",label:"🇷🇸 +381",value:"381RS"},{code:"ME",label:"🇲🇪 +382",value:"382ME"},{code:"XK",label:"🇽🇰 +383",value:"383XK"},{code:"HR",label:"🇭🇷 +385",value:"385HR"},{code:"SI",label:"🇸🇮 +386",value:"386SI"},{code:"BA",label:"🇧🇦 +387",value:"387BA"},{code:"MK",label:"🇲🇰 +389",value:"389MK"},{code:"IT",label:"🇮🇹 +39",value:"39IT"},{code:"RO",label:"🇷🇴 +40",value:"40RO"},{code:"CH",label:"🇨🇭 +41",value:"41CH"},{code:"CZ",label:"🇨🇿 +420",value:"420CZ"},{code:"SK",label:"🇸🇰 +421",value:"421SK"},{code:"LI",label:"🇱🇮 +423",value:"423LI"},{code:"AT",label:"🇦🇹 +43",value:"43AT"},{code:"IM",label:"🇮🇲 +44",value:"44IM"},{code:"GG",label:"🇬🇬 +44",value:"44GG"},{code:"JE",label:"🇯🇪 +44",value:"44JE"},{code:"GB",label:"🇬🇧 +44",value:"44GB"},{code:"DK",label:"🇩🇰 +45",value:"45DK"},{code:"SE",label:"🇸🇪 +46",value:"46SE"},{code:"NO",label:"🇳🇴 +47",value:"47NO"},{code:"SJ",label:"🇸🇯 +47",value:"47SJ"},{code:"PL",label:"🇵🇱 +48",value:"48PL"},{code:"DE",label:"🇩🇪 +49",value:"49DE"},{code:"FK",label:"🇫🇰 +500",value:"500FK"},{code:"GS",label:"🇬🇸 +500",value:"500GS"},{code:"BZ",label:"🇧🇿 +501",value:"501BZ"},{code:"GT",label:"🇬🇹 +502",value:"502GT"},{code:"SV",label:"🇸🇻 +503",value:"503SV"},{code:"HN",label:"🇭🇳 +504",value:"504HN"},{code:"NI",label:"🇳🇮 +505",value:"505NI"},{code:"CR",label:"🇨🇷 +506",value:"506CR"},{code:"PA",label:"🇵🇦 +507",value:"507PA"},{code:"PM",label:"🇵🇲 +508",value:"508PM"},{code:"HT",label:"🇭🇹 +509",value:"509HT"},{code:"PE",label:"🇵🇪 +51",value:"51PE"},{code:"MX",label:"🇲🇽 +52",value:"52MX"},{code:"CU",label:"🇨🇺 +53",value:"53CU"},{code:"AR",label:"🇦🇷 +54",value:"54AR"},{code:"BR",label:"🇧🇷 +55",value:"55BR"},{code:"CL",label:"🇨🇱 +56",value:"56CL"},{code:"CO",label:"🇨🇴 +57",value:"57CO"},{code:"VE",label:"🇻🇪 +58",value:"58VE"},{code:"BL",label:"🇧🇱 +590",value:"590BL"},{code:"MF",label:"🇲🇫 +590",value:"590MF"},{code:"GP",label:"🇬🇵 +590",value:"590GP"},{code:"BO",label:"🇧🇴 +591",value:"591BO"},{code:"GY",label:"🇬🇾 +592",value:"592GY"},{code:"EC",label:"🇪🇨 +593",value:"593EC"},{code:"GF",label:"🇬🇫 +594",value:"594GF"},{code:"PY",label:"🇵🇾 +595",value:"595PY"},{code:"MQ",label:"🇲🇶 +596",value:"596MQ"},{code:"SR",label:"🇸🇷 +597",value:"597SR"},{code:"UY",label:"🇺🇾 +598",value:"598UY"},{code:"MY",label:"🇲🇾 +60",value:"60MY"},{code:"CC",label:"🇨🇨 +61",value:"61CC"},{code:"AU",label:"🇦🇺 +61",value:"61AU"},{code:"CX",label:"🇨🇽 +61",value:"61CX"},{code:"ID",label:"🇮🇩 +62",value:"62ID"},{code:"PH",label:"🇵🇭 +63",value:"63PH"},{code:"NZ",label:"🇳🇿 +64",value:"64NZ"},{code:"SG",label:"🇸🇬 +65",value:"65SG"},{code:"TH",label:"🇹🇭 +66",value:"66TH"},{code:"TL",label:"🇹🇱 +670",value:"670TL"},{code:"NF",label:"🇳🇫 +672",value:"672NF"},{code:"BN",label:"🇧🇳 +673",value:"673BN"},{code:"NR",label:"🇳🇷 +674",value:"674NR"},{code:"PG",label:"🇵🇬 +675",value:"675PG"},{code:"TO",label:"🇹🇴 +676",value:"676TO"},{code:"SB",label:"🇸🇧 +677",value:"677SB"},{code:"VU",label:"🇻🇺 +678",value:"678VU"},{code:"FJ",label:"🇫🇯 +679",value:"679FJ"},{code:"PW",label:"🇵🇼 +680",value:"680PW"},{code:"WF",label:"🇼🇫 +681",value:"681WF"},{code:"CK",label:"🇨🇰 +682",value:"682CK"},{code:"NU",label:"🇳🇺 +683",value:"683NU"},{code:"WS",label:"🇼🇸 +685",value:"685WS"},{code:"KI",label:"🇰🇮 +686",value:"686KI"},{code:"NC",label:"🇳🇨 +687",value:"687NC"},{code:"TV",label:"🇹🇻 +688",value:"688TV"},{code:"PF",label:"🇵🇫 +689",value:"689PF"},{code:"TK",label:"🇹🇰 +690",value:"690TK"},{code:"FM",label:"🇫🇲 +691",value:"691FM"},{code:"MH",label:"🇲🇭 +692",value:"692MH"},{code:"RU",label:"🇷🇺 +7",value:"7RU"},{code:"KZ",label:"🇰🇿 +77",value:"77KZ"},{code:"JP",label:"🇯🇵 +81",value:"81JP"},{code:"KR",label:"🇰🇷 +82",value:"82KR"},{code:"VN",label:"🇻🇳 +84",value:"84VN"},{code:"KP",label:"🇰🇵 +850",value:"850KP"},{code:"HK",label:"🇭🇰 +852",value:"852HK"},{code:"MO",label:"🇲🇴 +853",value:"853MO"},{code:"KH",label:"🇰🇭 +855",value:"855KH"},{code:"LA",label:"🇱🇦 +856",value:"856LA"},{code:"CN",label:"🇨🇳 +86",value:"86CN"},{code:"PN",label:"🇵🇳 +872",value:"872PN"},{code:"BD",label:"🇧🇩 +880",value:"880BD"},{code:"TW",label:"🇹🇼 +886",value:"886TW"},{code:"TR",label:"🇹🇷 +90",value:"90TR"},{code:"IN",label:"🇮🇳 +91",value:"91IN"},{code:"PK",label:"🇵🇰 +92",value:"92PK"},{code:"AF",label:"🇦🇫 +93",value:"93AF"},{code:"LK",label:"🇱🇰 +94",value:"94LK"},{code:"MM",label:"🇲🇲 +95",value:"95MM"},{code:"MV",label:"🇲🇻 +960",value:"960MV"},{code:"LB",label:"🇱🇧 +961",value:"961LB"},{code:"JO",label:"🇯🇴 +962",value:"962JO"},{code:"SY",label:"🇸🇾 +963",value:"963SY"},{code:"IQ",label:"🇮🇶 +964",value:"964IQ"},{code:"KW",label:"🇰🇼 +965",value:"965KW"},{code:"SA",label:"🇸🇦 +966",value:"966SA"},{code:"YE",label:"🇾🇪 +967",value:"967YE"},{code:"OM",label:"🇴🇲 +968",value:"968OM"},{code:"PS",label:"🇵🇸 +970",value:"970PS"},{code:"AE",label:"🇦🇪 +971",value:"971AE"},{code:"IL",label:"🇮🇱 +972",value:"972IL"},{code:"BH",label:"🇧🇭 +973",value:"973BH"},{code:"QA",label:"🇶🇦 +974",value:"974QA"},{code:"BT",label:"🇧🇹 +975",value:"975BT"},{code:"MN",label:"🇲🇳 +976",value:"976MN"},{code:"NP",label:"🇳🇵 +977",value:"977NP"},{code:"IR",label:"🇮🇷 +98",value:"98IR"},{code:"TJ",label:"🇹🇯 +992",value:"992TJ"},{code:"TM",label:"🇹🇲 +993",value:"993TM"},{code:"AZ",label:"🇦🇿 +994",value:"994AZ"},{code:"GE",label:"🇬🇪 +995",value:"995GE"},{code:"KG",label:"🇰🇬 +996",value:"996KG"},{code:"UZ",label:"🇺🇿 +998",value:"998UZ"}]},1645:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(65736),a=r(42770),o=r(57954);const __=n.__,s=[{isDefault:!0,name:"whatsapp-button",title:__("WhatsApp Button","jetpack"),description:__("Let your visitors send you messages on WhatsApp with the tap of a button.","jetpack"),icon:(0,a.p)("send-a-message",o.Z),innerBlocks:[["jetpack/whatsapp-button",{}]]}]},88377:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(65736);const __=n.__,a={countryCode:{type:"string"},phoneNumber:{type:"string"},firstMessage:{type:"string",default:__("Hi, I got your WhatsApp information from your website.","jetpack")},buttonText:{type:"string",source:"html",selector:"a.whatsapp-block__button",default:__("Chat on WhatsApp","jetpack")},backgroundColor:{type:"string",default:"#25D366"},colorClass:{type:"string",default:"dark"},openInNewTab:{type:"boolean",default:!1}}},35513:(e,t,r)=>{"use strict";r.d(t,{Z:()=>g});var n=r(51806),a=r(52175),o=r(55609),s=r(69307),i=r(65736),l=r(39630),c=r(59809),u=r(36598),d=r(46482);const __=i.__,_x=i._x,p="#25D366",m="#465B64",h="#F4F4F4";function g(e){let{attributes:t,setAttributes:r,context:i}=e;const{countryCode:g,phoneNumber:f,firstMessage:b,openInNewTab:v,backgroundColor:k}=t,[y,E]=(0,s.useState)(!0),w=()=>(0,n.createElement)(n.Fragment,null,(0,n.createElement)(o.BaseControl,{label:__("Phone Number","jetpack"),help:__("Enter the phone number you use for WhatsApp and would like to be contacted on.","jetpack"),className:"jetpack-whatsapp-button__phonenumber"},(0,n.createElement)(o.SelectControl,{label:__("Country code","jetpack"),value:g,onChange:e=>r({countryCode:e}),options:d.n,hideLabelFromVision:!0}),(0,n.createElement)(o.TextControl,{placeholder:__("Your phone number…","jetpack"),onChange:e=>{r({phoneNumber:e}),0===e.length&&E(!0),e.length>2&&E((e=>{const t=RegExp(/^[+]?[\s./0-9]*[(]?[0-9]{1,4}[)]?[-\s./0-9]*$/,"g");return!(void 0===e||e.length<1)&&t.test(g.replace(/\D/g,"")+e)})(e))},value:f}),!y&&(0,n.createElement)(c.Z,{isError:!0,className:"jetpack-whatsapp-error"},__("Please enter a valid phone number.","jetpack"))),"inspector"===i&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(o.TextareaControl,{label:__("Default First Message","jetpack"),help:__("The default first message that will be sent by visitors when using this button.","jetpack"),value:b,onChange:e=>r({firstMessage:e})}),(0,n.createElement)(o.ToggleControl,{label:__("Open in new tab","jetpack"),checked:v,onChange:e=>r({openInNewTab:e}),help:__("When the button is tapped, should a new tab be opened if the visitor does not have WhatsApp installed?","jetpack")})));return"toolbar"===i?(0,n.createElement)(o.ToolbarGroup,null,(0,n.createElement)(o.Dropdown,{placement:"bottom-start",className:"jetpack-whatsapp-button-settings-selector",contentClassName:"jetpack-whatsapp-button__popover",renderToggle:e=>{let{isOpen:t,onToggle:r}=e;return((e,t)=>(0,n.createElement)(o.Button,{className:"components-toolbar__control jetpack-contact-form__toggle",label:__("WhatsApp Button Settings","jetpack"),onClick:t,onKeyDown:r=>{e||r.keyCode!==l.DOWN||(r.preventDefault(),r.stopPropagation(),t())},icon:(0,u.Z)((0,n.createElement)(o.Path,{d:"M10.82 12.49c.02-.16.04-.32.04-.49 0-.17-.02-.33-.04-.49l1.08-.82c.1-.07.12-.21.06-.32l-1.03-1.73c-.06-.11-.2-.15-.31-.11l-1.28.5c-.27-.2-.56-.36-.87-.49l-.2-1.33c0-.12-.11-.21-.24-.21H5.98c-.13 0-.24.09-.26.21l-.2 1.32c-.31.12-.6.3-.87.49l-1.28-.5c-.12-.05-.25 0-.31.11l-1.03 1.73c-.06.12-.03.25.07.33l1.08.82c-.02.16-.03.33-.03.49 0 .17.02.33.04.49l-1.09.83c-.1.07-.12.21-.06.32l1.03 1.73c.06.11.2.15.31.11l1.28-.5c.27.2.56.36.87.49l.2 1.32c.01.12.12.21.25.21h2.06c.13 0 .24-.09.25-.21l.2-1.32c.31-.12.6-.3.87-.49l1.28.5c.12.05.25 0 .31-.11l1.03-1.73c.06-.11.04-.24-.06-.32l-1.1-.83zM7 13.75c-.99 0-1.8-.78-1.8-1.75s.81-1.75 1.8-1.75 1.8.78 1.8 1.75S8 13.75 7 13.75zM18 1.01L8 1c-1.1 0-2 .9-2 2v3h2V5h10v14H8v-1H6v3c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99z"}))}))(t,r)},renderContent:w})):(0,n.createElement)(n.Fragment,null,(0,n.createElement)(o.PanelBody,{title:__("WhatsApp Button Settings","jetpack"),initialOpen:!0},w()),(0,n.createElement)(a.PanelColorSettings,{title:__("Color Settings","jetpack"),initialOpen:!1,colorSettings:[{value:k,onChange:e=>(e=>{if(r({backgroundColor:e}),void 0===e||e===p||e===m)return r({colorClass:"dark"});r({colorClass:"light"})})(e),label:__("Background Color","jetpack"),disableCustomColors:!0,colors:[{name:_x("WhatsApp Green","background color name","jetpack"),slug:"whatsapp-green",color:p},{name:_x("WhatsApp Dark","background color name","jetpack"),slug:"whatsapp-dark",color:m},{name:_x("WhatsApp Light","background color name","jetpack"),slug:"whatsapp-light",color:h},{name:_x("White","background color name","jetpack"),slug:"whatsapp-white",color:"#FFFFFF"}]}]}))}},33314:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(52175),o=r(65235),s=r.n(o),i=r(88377),l=r(71290);const c={attributes:i.Z,supports:{html:!1,reusable:!1},save:function(e){let{attributes:t,className:r}=e;const{countryCode:o,phoneNumber:i,firstMessage:c,colorClass:u,buttonText:d,backgroundColor:p,openInNewTab:m}=t,h=m?"_blank":"_self",g=o&&i?o.replace(/\D+/g,"")+i.replace(/\D+/g,""):"",f=s()(r,u?"is-color-"+u:void 0,d.length?void 0:"has-no-text");return(0,n.createElement)("div",{className:f},(0,n.createElement)("a",{className:"whatsapp-block__button",href:(()=>{let e=l.pf+g;return""!==c&&(e+="&text="+encodeURIComponent(c)),e})(),style:{backgroundColor:p},target:h,rel:"noopener noreferrer"},(0,n.createElement)(a.RichText.Content,{value:d})))}}},49150:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(51806),a=r(52175),o=r(9818),s=r(69307),i=r(65235),l=r.n(i),c=r(46482),u=r(35513);function d(e){let{attributes:t,setAttributes:r,className:i,clientId:d}=e;const{countryCode:p,buttonText:m,colorClass:h,backgroundColor:g}=t,{selectBlock:f}=(0,o.useDispatch)("core/block-editor"),b=(0,s.useCallback)((async()=>{r({countryCode:"1"});const e=await fetch("https://public-api.wordpress.com/geo/").then((e=>!!e.ok&&e)).catch((()=>!1));if(e){const t=await e.json();c.n.forEach((e=>{e.code===t.country_short&&r({countryCode:e.value})}))}}),[r]);(0,s.useEffect)((()=>{void 0===p&&(b(),f(d))}),[d,p,b,f]);return(0,n.createElement)("div",{className:l()(i,h?"is-color-"+h:void 0)},(0,n.createElement)(a.BlockControls,null,(0,n.createElement)(u.Z,{context:"toolbar",setAttributes:r,attributes:t})),(0,n.createElement)(a.InspectorControls,null,(0,n.createElement)(u.Z,{context:"inspector",setAttributes:r,attributes:t})),(0,n.createElement)(a.RichText,{placeholder:m.default,value:m,onChange:e=>r({buttonText:e}),withoutInteractiveFormatting:!0,allowedFormats:[],className:"whatsapp-block__button",tagName:"a",preserveWhiteSpace:!1,style:{backgroundColor:g,color:"dark"===h?"#fff":"#465B64"}}))}},57954:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(55609),o=r(70355);const s=(0,n.createElement)(a.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,n.createElement)(a.Path,{fill:(0,o.m)(),d:"M24,11.6909333 C24,18.1477333 18.7256,23.3818667 12.2181333,23.3818667 C10.1522667,23.3818667 8.21146667,22.8538667 6.52293333,21.9272 L0,24 L2.12666667,17.7274667 C1.05386667,15.9658667 0.436,13.8997333 0.436,11.6909333 C0.436,5.23413333 5.71093333,0 12.2181333,0 C18.7261333,0 24,5.23413333 24,11.6909333 Z M12.2181333,1.86186667 C6.75573333,1.86186667 2.31253333,6.2712 2.31253333,11.6909333 C2.31253333,13.8416 3.0136,15.8333333 4.19946667,17.4536 L2.96186667,21.104 L6.76853333,19.8941333 C8.33253333,20.9210667 10.2061333,21.52 12.2184,21.52 C17.68,21.52 22.124,17.1112 22.124,11.6914667 C22.124,6.27173333 17.6802667,1.86186667 12.2181333,1.86186667 Z M18.1677333,14.3834667 C18.0949333,14.2642667 17.9026667,14.1922667 17.6141333,14.0490667 C17.3250667,13.9058667 15.9048,13.2122667 15.6408,13.1170667 C15.376,13.0216 15.1829333,12.9736 14.9906667,13.2602667 C14.7984,13.5472 14.2448,14.1922667 14.076,14.3834667 C13.9074667,14.5752 13.7392,14.5992 13.4501333,14.4557333 C13.1616,14.3125333 12.2312,14.0096 11.128,13.0336 C10.2696,12.2741333 9.68986667,11.3365333 9.52133333,11.0493333 C9.35306667,10.7626667 9.50373333,10.6077333 9.648,10.4650667 C9.77813333,10.3365333 9.93706667,10.1304 10.0813333,9.9632 C10.2261333,9.79573333 10.2741333,9.67653333 10.3698667,9.48506667 C10.4666667,9.29386667 10.4184,9.12666667 10.3458667,8.98293333 C10.2738667,8.83973333 9.69573333,7.4296 9.4552,6.85573333 C9.21466667,6.2824 8.9744,6.37786667 8.8056,6.37786667 C8.63733333,6.37786667 8.44453333,6.35386667 8.252,6.35386667 C8.05946667,6.35386667 7.7464,6.4256 7.4816,6.71226667 C7.21706667,6.9992 6.4712,7.69253333 6.4712,9.1024 C6.4712,10.5125333 7.5056,11.8749333 7.6504,12.0658667 C7.79466667,12.2568 9.64773333,15.2445333 12.5837333,16.392 C15.52,17.5389333 15.52,17.1562667 16.0496,17.1082667 C16.5786667,17.0605333 17.7578667,16.4152 17.9994667,15.7464 C18.2394667,15.0765333 18.2394667,14.5029333 18.1677333,14.3834667 Z"}))},71290:(e,t,r)=>{"use strict";r.d(t,{Xd:()=>m,pf:()=>p,u2:()=>u});var n=r(65736),a=r(70355),o=r(88377),s=r(33314),i=r(49150),l=r(57954),c=r(89014);const __=n.__,_x=n._x,u="whatsapp-button",d=__("WhatsApp Button","jetpack"),p="https://api.whatsapp.com/send?phone=",m=(__("Chat on WhatsApp","jetpack"),__("Hi, I got your WhatsApp information from your website.","jetpack"),{title:d,description:__("Let your visitors send you a message on WhatsApp with the tap of a button.","jetpack"),icon:{src:l.Z,foreground:(0,a.m)()},category:"grow",parent:["jetpack/send-a-message"],keywords:[_x("whatsapp","keyword","jetpack"),_x("messenger","keyword","jetpack"),_x("contact","keyword","jetpack"),_x("support","keyword","jetpack")],supports:{html:!1,reusable:!1,align:["left","center","right"]},attributes:o.Z,edit:i.Z,save:c.Z,example:{attributes:{countryCode:"1",phoneNumber:"555-123-4567"}},deprecated:[s.Z]})},89014:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(52175),o=r(65235),s=r.n(o),i=r(71290);function l(e){let{attributes:t,className:r}=e;const{countryCode:o,phoneNumber:l,firstMessage:c,buttonText:u,backgroundColor:d,colorClass:p,openInNewTab:m}=t,h=o&&l?o.replace(/\D+/g,"")+l.replace(/\D+/g,""):"",g=s()(r,p?"is-color-"+p:void 0,u.length?void 0:"has-no-text"),f=m?"_blank":"_self";return(0,n.createElement)("div",{className:g},(0,n.createElement)("a",{className:"whatsapp-block__button",href:(()=>{let e=i.pf+h;return""!==c&&(e+="&text="+encodeURIComponent(c)),e})(),style:{backgroundColor:d,color:"dark"===p?"#fff":"#465B64"},target:f,rel:"noopener noreferrer"},(0,n.createElement)(a.RichText.Content,{value:u})))}},4587:(e,t,r)=>{"use strict";r.d(t,{J:()=>l});var n=r(82674),a=r.n(n),o=r(51806),s=r(55609),i=r(65736);r(99196);const __=i.__,_n=i._n,l=e=>{let{suggestedLimit:t,value:r,label:n,...l}=e;const c=!t||r.length<=t?(0,i.sprintf)(/* translators: Placeholder is a number of characters in a sentence. */
_n("%d character","%d characters",r.length,"jetpack"),r.length):(0,i.sprintf)(/* translators: Placeholder is a number of characters in a sentence. */
__("It's recommended to use less than %d characters in this field.","jetpack"),t);return(0,o.createElement)("div",{className:"jetpack-seo-message-box"},(0,o.createElement)(s.TextareaControl,a()({label:n,help:c,value:r},l)))}},74866:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(90017),a=r.n(n),o=r(51806),s=r(69307),i=r(65736),l=r(4587),c=r(84638);const __=i.__;class u extends s.Component{constructor(){super(...arguments),a()(this,"onMessageChange",(e=>{this.props.updateMetaValue(e)}))}render(){const{metaValue:e}=this.props;return(0,o.createElement)(l.J,{value:e,onChange:this.onMessageChange,label:__("SEO Description","jetpack"),placeholder:__("Write a description…","jetpack"),suggestedLimit:156,rows:4})}}const d=(0,c.M)("advanced_seo_description")(u)},86254:(e,t,r)=>{"use strict";var n=r(13419),a=r(8606);(0,n.o_)(a.u,a.X)},8606:(e,t,r)=>{"use strict";r.d(t,{X:()=>f,u:()=>g});var n=r(82674),a=r.n(n),o=r(51806),s=r(13419),i=r(55609),l=r(72067),c=r(69307),u=r(65736),d=r(34613),p=r(74866),m=r(95377),h=r(4773);const __=u.__,g="seo",f={render:()=>{const e={title:__("SEO","jetpack")},t={icon:(0,o.createElement)(s.Pm,null),title:__("SEO","jetpack")};return(0,o.createElement)(c.Fragment,null,(0,o.createElement)(d.Z,null,(0,o.createElement)(i.PanelBody,a()({className:"jetpack-seo-panel"},e),(0,o.createElement)(i.PanelRow,null,(0,o.createElement)(h.Z,null)),(0,o.createElement)(i.PanelRow,null,(0,o.createElement)(p.Z,null)),(0,o.createElement)(i.PanelRow,null,(0,o.createElement)(m.Z,null)))),(0,o.createElement)(l.PluginPrePublishPanel,t,(0,o.createElement)(c.Fragment,null,(0,o.createElement)(i.PanelRow,null,(0,o.createElement)(h.Z,null)),(0,o.createElement)(i.PanelRow,null,(0,o.createElement)(p.Z,null)),(0,o.createElement)(i.PanelRow,null,(0,o.createElement)(m.Z,null)))))}}},95377:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(55609),o=r(65736),s=(r(99196),r(84638));const __=o.__,i=(0,s.M)("jetpack_seo_noindex")((e=>{let{metaValue:t,updateMetaValue:r}=e;return(0,n.createElement)(a.ToggleControl,{label:__("Hide page from search engines","jetpack"),help:__("If selected, a 'noindex' tag will help instruct search engines to not include this page in search results. This page will also be removed from the Jetpack sitemap.","jetpack"),checked:!!t,onChange:e=>{r(e)}})}))},4773:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(90017),a=r.n(n),o=r(51806),s=r(69307),i=r(65736),l=(r(99196),r(4587)),c=r(84638);const __=i.__;class u extends s.Component{constructor(){super(...arguments),a()(this,"onTitleChange",(e=>{this.props.updateMetaValue(e)}))}render(){const{metaValue:e}=this.props;return(0,o.createElement)(l.J,{value:e,onChange:this.onTitleChange,label:__("SEO Title","jetpack"),placeholder:__("Write a title…","jetpack"),suggestedLimit:70,rows:2})}}const d=(0,c.M)("jetpack_seo_html_title")(u)},84638:(e,t,r)=>{"use strict";r.d(t,{M:()=>s});var n=r(94333),a=r(9818),o=r(92819);const s=e=>(0,n.compose)([(0,a.withSelect)((t=>({metaValue:(0,o.get)(t("core/editor").getEditedPostAttribute("meta"),[e],"")}))),(0,a.withDispatch)((t=>({updateMetaValue(r){var n;"boolean"!=typeof(n=r)&&("string"!=typeof n||""!==n&&0===n.trim().length)||t("core/editor").editPost({meta:{[e]:r}})}})))])},14406:(e,t,r)=>{"use strict";var n=r(13419),a=r(44487);(0,n.o_)(a.u,a.X)},44487:(e,t,r)=>{"use strict";r.d(t,{X:()=>p,u:()=>d});var n=r(51806),a=r(55609),o=r(9818),s=r(69307),i=r(65736),l=r(92819),c=r(26788),u=r(34613);const __=i.__,d="shortlinks",p={render:()=>(0,n.createElement)(h,null)};class m extends s.Component{render(){const{shortlink:e}=this.props;return e?(0,n.createElement)(u.Z,null,(0,n.createElement)(a.PanelBody,{title:__("Shortlink","jetpack"),className:"jetpack-shortlinks__panel",initialOpen:!1},(0,n.createElement)(c.Z,{link:e}))):null}}const h=(0,o.withSelect)((e=>{const t=e("core/editor").getCurrentPost();return{shortlink:(0,l.get)(t,"jetpack_shortlink","")}}))(m)},36825:(e,t,r)=>{"use strict";r.d(t,{LC:()=>n,Rh:()=>o,a7:()=>a});const n="jp_pay_product",a="USD",o=[a,"EUR","AUD","BRL","CAD","CZK","DKK","HKD","HUF","ILS","JPY","MYR","MXN","TWD","NZD","NOK","PHP","PLN","GBP","RUB","SGD","SEK","CHF","THB"]},65093:(e,t,r)=>{"use strict";r.d(t,{G:()=>s});var n=r(51806),a=r(55609),o=r(65736);const __=o.__;function s(e){let{setAttributes:t,postLinkText:r}=e;return(0,n.createElement)(a.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1},(0,n.createElement)(a.BaseControl,{label:__("Purchase link text","jetpack"),help:__("Enter the text you want to display on a purchase link used as fallback when the PayPal button cannot be used (e.g. emails, AMP, etc.)","jetpack"),className:"jetpack-simple-payments__purchase-link-text"},(0,n.createElement)(a.TextControl,{placeholder:__("Click here to purchase","jetpack"),onChange:e=>t({postLinkText:e}),value:r})))}},66763:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(69307);const o={attributes:{currency:{type:"string",default:"USD"},content:{type:"string",default:""},email:{type:"string",default:""},featuredMediaId:{type:"number",default:0},featuredMediaUrl:{type:"string",default:null},featuredMediaTitle:{type:"string",default:null},multiple:{type:"boolean",default:!1},price:{type:"number"},productId:{type:"number"},title:{type:"string",default:""}},supports:{className:!1,customClassName:!1,html:!1,reusable:!1},save:e=>{let{attributes:t}=e;const{productId:r}=t;return r?(0,n.createElement)(a.RawHTML,null,`[simple-payment id="${r}"]`):null}}},21559:(e,t,r)=>{"use strict";r.d(t,{Z:()=>C});var n=r(90017),a=r.n(n),o=r(51806),s=r(43317),i=r(52175),l=r(55609),c=r(94333),u=r(9818),d=r(69307),p=r(65736),m=r(65235),h=r.n(m),g=r(92384),f=r(92819),b=r(59809),v=r(36825),k=r(39416),y=r(72802),E=r(96059);const __=p.__,_n=p._n;class w extends d.Component{constructor(){super(...arguments),a()(this,"state",{fieldEmailError:null,fieldPriceError:null,fieldTitleError:null,isSavingProduct:!1}),a()(this,"shouldInjectPaymentAttributes",!!this.props.attributes.productId),a()(this,"validateAttributes",(()=>{const e=this.validatePrice(),t=this.validateTitle(),r=this.validateEmail(),n=this.validateCurrency();return e&&t&&r&&n})),a()(this,"validateCurrency",(()=>{const{currency:e}=this.props.attributes;return v.Rh.includes(e)})),a()(this,"validatePrice",(()=>{const{currency:e,price:t}=this.props.attributes,{precision:r}=(0,s.X)(e);return t&&0!==parseFloat(t)?Number.isNaN(parseFloat(t))?(this.setState({fieldPriceError:__("Invalid price","jetpack")}),!1):parseFloat(t)<0?(this.setState({fieldPriceError:__("Your price is negative — enter a positive number so people can pay the right amount.","jetpack")}),!1):(0,E.N3)(t)>r?0===r?(this.setState({fieldPriceError:__("We know every penny counts, but prices in this currency can’t contain decimal values.","jetpack")}),!1):(this.setState({fieldPriceError:(0,p.sprintf)(/* translators: Placeholder is a number of decimals in a number. */
_n("The price cannot have more than %d decimal place.","The price cannot have more than %d decimal places.",r,"jetpack"),r)}),!1):(this.state.fieldPriceError&&this.setState({fieldPriceError:null}),!0):(this.setState({fieldPriceError:__("If you’re selling something, you need a price tag. Add yours here.","jetpack")}),!1)})),a()(this,"validateEmail",(()=>{const{email:e}=this.props.attributes;return e?g.validate(e)?(this.state.fieldEmailError&&this.setState({fieldEmailError:null}),!0):(this.setState({fieldEmailError:(0,p.sprintf)(/* translators: placeholder is an email address. */
__("%s is not a valid email address.","jetpack"),e)}),!1):(this.setState({fieldEmailError:__("We want to make sure payments reach you, so please add an email address.","jetpack")}),!1)})),a()(this,"validateTitle",(()=>{const{title:e}=this.props.attributes;return e?(this.state.fieldTitleError&&this.setState({fieldTitleError:null}),!0):(this.setState({fieldTitleError:__("Please add a brief title so that people know what they’re paying for.","jetpack")}),!1)})),a()(this,"handleEmailChange",(e=>{this.props.setAttributes({email:e}),this.setState({fieldEmailError:null})})),a()(this,"handleContentChange",(e=>{this.props.setAttributes({content:e})})),a()(this,"handlePriceChange",(e=>{e=parseFloat(e),isNaN(e)?this.props.setAttributes({price:void 0}):this.props.setAttributes({price:e}),this.setState({fieldPriceError:null})})),a()(this,"handleCurrencyChange",(e=>{this.props.setAttributes({currency:e})})),a()(this,"handleMultipleChange",(e=>{this.props.setAttributes({multiple:!!e})})),a()(this,"handleTitleChange",(e=>{this.props.setAttributes({title:e}),this.setState({fieldTitleError:null})})),a()(this,"getCurrencyList",v.Rh.map((e=>{const{symbol:t}=(0,s.X)(e);return{value:e,label:t===e?e:`${e} ${(0,f.trimEnd)(t,".")}`}}))),a()(this,"renderSettings",(()=>(0,o.createElement)(i.InspectorControls,null,(0,o.createElement)(l.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1},(0,o.createElement)(l.BaseControl,{label:__("Purchase link text","jetpack"),help:__("Enter the text you want to display on a purchase link used as fallback when the PayPal button cannot be used (e.g. emails, AMP, etc.)","jetpack"),className:"jetpack-simple-payments__purchase-link-text"},(0,o.createElement)(l.TextControl,{placeholder:__("Click here to purchase","jetpack"),onChange:e=>this.props.setAttributes({postLinkText:e}),value:this.props.attributes.postLinkText}))))))}componentDidMount(){this.injectPaymentAttributes();const{attributes:e,hasPublishAction:t,postLinkUrl:r,setAttributes:n}=this.props,{productId:a}=e;!a&&t&&this.saveProduct();const o=r&&r!==this.props.attributes.postLinkUrl,s=!this.props.attributes.postLinkText;(o||s)&&n({...o&&{postLinkUrl:r},...s&&{postLinkText:__("Click here to purchase.","jetpack")}})}componentDidUpdate(e){const{hasPublishAction:t,isSelected:r,postLinkUrl:n,setAttributes:a}=this.props;(0,f.isEqual)(e.simplePayment,this.props.simplePayment)||this.injectPaymentAttributes(),!e.isSaving&&this.props.isSaving&&t&&this.validateAttributes()?this.saveProduct():e.isSelected&&!r&&this.validateAttributes();const o=n&&n!==this.props.attributes.postLinkUrl,s=!this.props.attributes.postLinkText;(o||s)&&a({...o&&{postLinkUrl:n},...s&&{postLinkText:__("Click here to purchase.","jetpack")}})}injectPaymentAttributes(){const{simplePayment:e,featuredMedia:t}=this.props;if(!this.shouldInjectPaymentAttributes||(0,f.isEmpty)(e))return;const{attributes:r,setAttributes:n}=this.props,{content:a,currency:o,email:s,featuredMediaId:i,featuredMediaUrl:l,featuredMediaTitle:c,multiple:u,price:d,title:p}=r;n({content:(0,f.get)(e,["content","raw"],a),currency:(0,f.get)(e,["meta","spay_currency"],o),email:(0,f.get)(e,["meta","spay_email"],s),featuredMediaId:(0,f.get)(e,["featured_media"],i),featuredMediaUrl:(0,f.get)(t,"url",l),featuredMediaTitle:(0,f.get)(t,"title",c),multiple:Boolean((0,f.get)(e,["meta","spay_multiple"],Boolean(u))),price:(0,f.get)(e,["meta","spay_price"],d||void 0),title:(0,f.get)(e,["title","raw"],p)}),this.shouldInjectPaymentAttributes=!this.shouldInjectPaymentAttributes}toApi(){const{attributes:e}=this.props,{content:t,currency:r,email:n,featuredMediaId:a,multiple:o,price:s,productId:i,title:l}=e;return{id:i,content:t,featured_media:a,meta:{spay_currency:r,spay_email:n,spay_multiple:o,spay_price:s},status:i?"publish":"draft",title:l}}saveProduct(){if(this.state.isSavingProduct)return;const{attributes:e,setAttributes:t}=this.props,{email:r}=e,{saveEntityRecord:n}=(0,u.dispatch)("core");this.setState({isSavingProduct:!0},(()=>{n("postType",v.LC,this.toApi()).then((e=>(e&&t({productId:e.id}),e))).catch((e=>{if(!e||!e.data)return;const{data:{key:t}}=e;this.setState({fieldEmailError:"spay_email"===t?(0,p.sprintf)(/* translators: placeholder is an email address. */
__("%s is not a valid email address.","jetpack"),r):null,fieldPriceError:"spay_price"===t?__("Invalid price.","jetpack"):null})})).finally((()=>{this.setState({isSavingProduct:!1})}))}))}render(){const{fieldEmailError:e,fieldPriceError:t,fieldTitleError:r}=this.state,{attributes:n,instanceId:a,isSelected:s,setAttributes:i,simplePayment:c}=this.props,{content:u,currency:d,email:p,featuredMediaId:m,featuredMediaUrl:g,featuredMediaTitle:v,multiple:w,price:_,productId:C,title:j}=n,S=C&&(0,f.isEmpty)(c);if(!s&&S)return(0,o.createElement)("div",{className:"simple-payments__loading"},(0,o.createElement)(y.Z,{"aria-busy":"true",content:"█████",formattedPrice:"█████",title:"█████"}));if(!s&&p&&_&&j&&!e&&!t&&!r)return(0,o.createElement)(y.Z,{"aria-busy":"false",content:u,featuredMediaUrl:g,featuredMediaTitle:v,formattedPrice:(0,E.w)(_,d),multiple:w,title:j});const x=S?l.Disabled:"div";return(0,o.createElement)(x,{className:"wp-block-jetpack-simple-payments"},this.renderSettings(),(0,o.createElement)(k.Z,{featuredMediaId:m,featuredMediaUrl:g,featuredMediaTitle:v,setAttributes:i}),(0,o.createElement)("div",null,(0,o.createElement)(l.TextControl,{"aria-describedby":`${a}-title-error`,className:h()("simple-payments__field","simple-payments__field-title",{"simple-payments__field-has-error":r}),label:__("Item name","jetpack"),onChange:this.handleTitleChange,placeholder:__("Item name","jetpack"),required:!0,type:"text",value:j}),(0,o.createElement)(b.Z,{id:`${a}-title-error`,isError:!0},r),(0,o.createElement)(l.TextareaControl,{className:"simple-payments__field simple-payments__field-content",label:__("Describe your item in a few words","jetpack"),onChange:this.handleContentChange,placeholder:__("Describe your item in a few words","jetpack"),value:u}),(0,o.createElement)("div",{className:"simple-payments__price-container"},(0,o.createElement)(l.SelectControl,{className:"simple-payments__field simple-payments__field-currency",label:__("Currency","jetpack"),onChange:this.handleCurrencyChange,options:this.getCurrencyList,value:d}),(0,o.createElement)(l.TextControl,{"aria-describedby":`${a}-price-error`,className:h()("simple-payments__field","simple-payments__field-price",{"simple-payments__field-has-error":t}),label:__("Price","jetpack"),onChange:this.handlePriceChange,placeholder:(0,E.w)(0,d,!1),required:!0,step:"1",type:"number",value:_||""}),(0,o.createElement)(b.Z,{id:`${a}-price-error`,isError:!0},t)),(0,o.createElement)("div",{className:"simple-payments__field-multiple"},(0,o.createElement)(l.ToggleControl,{checked:Boolean(w),label:__("Allow people to buy more than one item at a time","jetpack"),onChange:this.handleMultipleChange})),(0,o.createElement)(l.TextControl,{"aria-describedby":`${a}-email-${e?"error":"help"}`,className:h()("simple-payments__field","simple-payments__field-email",{"simple-payments__field-has-error":e}),label:__("Email","jetpack"),onChange:this.handleEmailChange,placeholder:__("Email","jetpack"),required:!0,type:"text",value:p}),(0,o.createElement)(b.Z,{id:`${a}-email-error`,isError:!0},e),(0,o.createElement)(b.Z,{id:`${a}-email-help`},__("Enter the email address associated with your PayPal account. Don’t have an account?","jetpack")+" ",(0,o.createElement)(l.ExternalLink,{href:"https://www.paypal.com/"},__("Create one on PayPal","jetpack")))))}}const _=(0,u.withSelect)(((e,t)=>{const{getEntityRecord:r,getMedia:n}=e("core"),{isSavingPost:a,getCurrentPost:o}=e("core/editor"),{productId:s,featuredMediaId:i}=t.attributes,l=s?(0,f.pick)(r("postType",v.LC,s),[["content"],["meta","spay_currency"],["meta","spay_email"],["meta","spay_multiple"],["meta","spay_price"],["title","raw"],["featured_media"]]):void 0,c=o();return{hasPublishAction:!!(0,f.get)(c,["_links","wp:action-publish"]),isSaving:!!a(),simplePayment:l,featuredMedia:i?n(i):null,postLinkUrl:c.link}})),C=(0,c.compose)(_,c.withInstanceId)(w)},24097:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h});var n=r(51806),a=r(13419),o=r(55609),s=r(69307),i=r(65736),l=r(70355),c=r(36825),u=r(21559),d=r(83080);const __=i.__,_x=i._x,p=(0,n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,n.createElement)(o.Path,{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"})),m=(0,a.Wp)()||(0,a.Ug)()?"https://wordpress.com/support/pay-with-paypal/":"https://jetpack.com/support/jetpack-blocks/pay-with-paypal/",h={title:__("Pay with PayPal","jetpack"),description:(0,n.createElement)(s.Fragment,null,(0,n.createElement)("p",null,__("Lets you add credit and debit card payment buttons with minimal setup.","jetpack")),(0,n.createElement)("p",null,__("Good for collecting donations or payments for products and services.","jetpack")),(0,n.createElement)(o.ExternalLink,{href:m},__("Support reference","jetpack"))),icon:{src:p,foreground:(0,l.m)()},category:"earn",keywords:[_x("buy","block search term","jetpack"),_x("commerce","block search term","jetpack"),_x("products","block search term","jetpack"),_x("purchase","block search term","jetpack"),_x("sell","block search term","jetpack"),_x("shop","block search term","jetpack"),_x("simple","block search term","jetpack"),_x("payments","block search term","jetpack"),"PayPal"],attributes:{currency:{type:"string",default:c.a7},content:{type:"string",source:"html",selector:".jetpack-simple-payments-description p",default:""},email:{type:"string",default:""},featuredMediaId:{type:"number",default:0},featuredMediaUrl:{type:"string",source:"attribute",selector:".jetpack-simple-payments-image img",attribute:"src",default:null},featuredMediaTitle:{type:"string",source:"attribute",selector:".jetpack-simple-payments-image img",attribute:"alt",default:null},multiple:{type:"boolean",default:!1},postLinkUrl:{type:"string",source:"attribute",selector:".jetpack-simple-payments-purchase",attribute:"href"},postLinkText:{type:"string",source:"html",selector:".jetpack-simple-payments-purchase",default:__("Click here to purchase.","jetpack")},price:{type:"number"},productId:{type:"number"},title:{type:"string",source:"html",selector:".jetpack-simple-payments-title p",default:""}},transforms:{from:[{type:"shortcode",tag:"simple-payment",attributes:{productId:{type:"number",shortcode:e=>{let{named:{id:t}}=e;if(!t)return;const r=parseInt(t,10);return r||void 0}}}}]},edit:u.Z,save:d.Z,supports:{className:!1,customClassName:!1,html:!1,reusable:!1}}},83080:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(96059);function o(e){let{attributes:t}=e;const{content:r,currency:o,featuredMediaUrl:s,featuredMediaTitle:i,postLinkUrl:l,postLinkText:c,price:u,productId:d,title:p}=t;return d?(0,n.createElement)("div",{className:`jetpack-simple-payments-wrapper jetpack-simple-payments-${d}`},(0,n.createElement)("div",{className:"jetpack-simple-payments-product"},s&&(0,n.createElement)("div",{className:"jetpack-simple-payments-product-image"},(0,n.createElement)("div",{className:"jetpack-simple-payments-image"},(0,n.createElement)("figure",null,(0,n.createElement)("img",{src:s,alt:i})))),(0,n.createElement)("div",{className:"jetpack-simple-payments-details"},(0,n.createElement)("div",{className:"jetpack-simple-payments-title"},(0,n.createElement)("p",null,p)),(0,n.createElement)("div",{className:"jetpack-simple-payments-description"},(0,n.createElement)("p",null,r)),(0,n.createElement)("div",{className:"jetpack-simple-payments-price"},(0,n.createElement)("p",null,(0,a.w)(u,o))),(0,n.createElement)("a",{className:"jetpack-simple-payments-purchase",href:l,target:"_blank",rel:"noopener noreferrer"},c)))):null}},36239:(e,t,r)=>{"use strict";r.d(t,{Z:()=>S});var n=r(90017),a=r.n(n),o=r(51806),s=r(43317),i=r(52175),l=r(55609),c=r(94333),u=r(9818),d=r(69307),p=r(65736),m=r(6551),h=r(65235),g=r.n(h),f=r(92384),b=r(92819),v=r(59809),k=r(36825),y=r(65093),E=r(39416),w=r(72802),_=r(96059);const __=p.__,_n=p._n;class C extends d.Component{constructor(){super(...arguments),a()(this,"state",{fieldEmailError:null,fieldPriceError:null,fieldTitleError:null,isSavingProduct:!1}),a()(this,"shouldInjectPaymentAttributes",!!this.props.attributes.productId),a()(this,"validateAttributes",(()=>{const e=this.validatePrice(),t=this.validateTitle(),r=this.validateEmail(),n=this.validateCurrency();return e&&t&&r&&n})),a()(this,"validateCurrency",(()=>{const{currency:e}=this.props.attributes;return k.Rh.includes(e)})),a()(this,"validatePrice",(()=>{const{currency:e,price:t}=this.props.attributes,{precision:r}=(0,s.X)(e);return t&&0!==parseFloat(t)?Number.isNaN(parseFloat(t))?(this.setState({fieldPriceError:__("Invalid price","jetpack")}),!1):parseFloat(t)<0?(this.setState({fieldPriceError:__("Your price is negative — enter a positive number so people can pay the right amount.","jetpack")}),!1):(0,_.N3)(t)>r?0===r?(this.setState({fieldPriceError:__("We know every penny counts, but prices in this currency can’t contain decimal values.","jetpack")}),!1):(this.setState({fieldPriceError:(0,p.sprintf)(/* translators: Placeholder is a number of decimals in a number. */
_n("The price cannot have more than %d decimal place.","The price cannot have more than %d decimal places.",r,"jetpack"),r)}),!1):(this.state.fieldPriceError&&this.setState({fieldPriceError:null}),!0):(this.setState({fieldPriceError:__("If you’re selling something, you need a price tag. Add yours here.","jetpack")}),!1)})),a()(this,"validateEmail",(()=>{const{email:e}=this.props.attributes;return e?f.validate(e)?(this.state.fieldEmailError&&this.setState({fieldEmailError:null}),!0):(this.setState({fieldEmailError:(0,p.sprintf)(/* translators: Placeholder is an email address. */
__("%s is not a valid email address.","jetpack"),e)}),!1):(this.setState({fieldEmailError:__("We want to make sure payments reach you, so please add an email address.","jetpack")}),!1)})),a()(this,"validateTitle",(()=>{const{title:e}=this.props.attributes;return e?(this.state.fieldTitleError&&this.setState({fieldTitleError:null}),!0):(this.setState({fieldTitleError:__("Please add a brief title so that people know what they’re paying for.","jetpack")}),!1)})),a()(this,"handleEmailChange",(e=>{this.props.setAttributes({email:e}),this.setState({fieldEmailError:null})})),a()(this,"handleContentChange",(e=>{this.props.setAttributes({content:e})})),a()(this,"handlePriceChange",(e=>{e=parseFloat(e),isNaN(e)?this.props.setAttributes({price:void 0}):this.props.setAttributes({price:e}),this.setState({fieldPriceError:null})})),a()(this,"handleCurrencyChange",(e=>{this.props.setAttributes({currency:e})})),a()(this,"handleMultipleChange",(e=>{this.props.setAttributes({multiple:!!e})})),a()(this,"handleTitleChange",(e=>{this.props.setAttributes({title:e}),this.setState({fieldTitleError:null})})),a()(this,"getCurrencyList",k.Rh.map((e=>{const{symbol:t}=(0,s.X)(e);return{value:e,label:t===e?e:`${e} ${(0,b.trimEnd)(t,".")}`}}))),a()(this,"renderSettings",(()=>(0,o.createElement)(i.InspectorControls,null,(0,o.createElement)(y.G,{postLinkText:this.props.attributes.postLinkText,setAttributes:this.props.setAttributes}))))}componentDidMount(){this.injectPaymentAttributes();const{attributes:e,hasPublishAction:t,postLinkUrl:r,setAttributes:n,isPostEditor:a}=this.props,{productId:o}=e;(!o&&t||!a)&&this.saveProduct();const s=r&&r!==this.props.attributes.postLinkUrl,i=!this.props.attributes.postLinkText;(s||i)&&n({...s&&{postLinkUrl:r},...i&&{postLinkText:__("Click here to purchase.","jetpack")}}),window.wp?.customize?.bind("change",(e=>{let t;const r=e.id.match(/^widget_(.+)(?:\[(\d+)\])$/);if(r){t=`${r[1]}-${parseInt(r[2],10)}`}else t=e.id;t===(0,m.getWidgetIdFromBlock)(this.props.block)&&this.validateAttributes()&&this.saveProduct()}))}componentDidUpdate(e){const{hasPublishAction:t,isSelected:r,postLinkUrl:n,setAttributes:a,isPostEditor:o}=this.props;(0,b.isEqual)(e.simplePayment,this.props.simplePayment)||this.injectPaymentAttributes(),e.isSaving||!this.props.isSaving||!t&&o||!this.validateAttributes()?e.isSelected&&!r&&this.validateAttributes():this.saveProduct();const s=n&&n!==this.props.attributes.postLinkUrl,i=!this.props.attributes.postLinkText;(s||i)&&a({...s&&{postLinkUrl:n},...i&&{postLinkText:__("Click here to purchase.","jetpack")}})}injectPaymentAttributes(){const{simplePayment:e,featuredMedia:t}=this.props;if(!this.shouldInjectPaymentAttributes||(0,b.isEmpty)(e))return;const{attributes:r,setAttributes:n}=this.props,{content:a,currency:o,email:s,featuredMediaId:i,featuredMediaUrl:l,featuredMediaTitle:c,multiple:u,price:d,title:p}=r;n({content:(0,b.get)(e,["content","raw"],a),currency:(0,b.get)(e,["meta","spay_currency"],o),email:(0,b.get)(e,["meta","spay_email"],s),featuredMediaId:(0,b.get)(e,["featured_media"],i),featuredMediaUrl:(0,b.get)(t,"url",l),featuredMediaTitle:(0,b.get)(t,"title",c),multiple:Boolean((0,b.get)(e,["meta","spay_multiple"],Boolean(u))),price:(0,b.get)(e,["meta","spay_price"],d||void 0),title:(0,b.get)(e,["title","raw"],p)}),this.shouldInjectPaymentAttributes=!this.shouldInjectPaymentAttributes}toApi(){const{attributes:e}=this.props,{content:t,currency:r,email:n,featuredMediaId:a,multiple:o,price:s,productId:i,title:l}=e;return{id:i,content:t,featured_media:a,meta:{spay_currency:r,spay_email:n,spay_multiple:o,spay_price:s},status:i?"publish":"draft",title:l}}saveProduct(){if(this.state.isSavingProduct)return;const{attributes:e,setAttributes:t}=this.props,{email:r}=e,{saveEntityRecord:n}=(0,u.dispatch)("core");this.setState({isSavingProduct:!0},(()=>{n("postType",k.LC,this.toApi()).then((e=>(e&&t({productId:e.id}),e))).catch((e=>{if(!e||!e.data)return;const{data:{key:t}}=e;this.setState({fieldEmailError:"spay_email"===t?(0,p.sprintf)(/* translators: Placeholder is an email address. */
__("%s is not a valid email address.","jetpack"),r):null,fieldPriceError:"spay_price"===t?__("Invalid price.","jetpack"):null})})).finally((()=>{this.setState({isSavingProduct:!1})}))}))}render(){const{fieldEmailError:e,fieldPriceError:t,fieldTitleError:r}=this.state,{attributes:n,instanceId:a,isSelected:s,setAttributes:i,simplePayment:c}=this.props,{content:u,currency:d,email:p,featuredMediaId:m,featuredMediaUrl:h,featuredMediaTitle:f,multiple:k,price:y,productId:C,title:j}=n,S=C&&(0,b.isEmpty)(c);if(!s&&S)return(0,o.createElement)("div",{className:"simple-payments__loading"},(0,o.createElement)(w.Z,{"aria-busy":"true",content:"█████",formattedPrice:"█████",title:"█████"}));if(!s&&p&&y&&j&&!e&&!t&&!r)return(0,o.createElement)(w.Z,{"aria-busy":"false",content:u,featuredMediaUrl:h,featuredMediaTitle:f,formattedPrice:(0,_.T4)(y,d),multiple:k,title:j});const x=S?l.Disabled:"div";return(0,o.createElement)(x,{className:"wp-block-jetpack-simple-payments"},this.renderSettings(),(0,o.createElement)(E.Z,{featuredMediaId:m,featuredMediaUrl:h,featuredMediaTitle:f,setAttributes:i}),(0,o.createElement)("div",null,(0,o.createElement)(l.TextControl,{"aria-describedby":`${a}-title-error`,className:g()("simple-payments__field","simple-payments__field-title",{"simple-payments__field-has-error":r}),label:__("Item name","jetpack"),onChange:this.handleTitleChange,placeholder:__("Item name","jetpack"),required:!0,type:"text",value:j}),(0,o.createElement)(v.Z,{id:`${a}-title-error`,isError:!0},r),(0,o.createElement)(l.TextareaControl,{className:"simple-payments__field simple-payments__field-content",label:__("Describe your item in a few words","jetpack"),onChange:this.handleContentChange,placeholder:__("Describe your item in a few words","jetpack"),"aria-label":__("Describe your item in a few words","jetpack"),value:u}),(0,o.createElement)("div",{className:"simple-payments__price-container"},(0,o.createElement)(l.SelectControl,{className:"simple-payments__field simple-payments__field-currency",label:__("Currency","jetpack"),onChange:this.handleCurrencyChange,options:this.getCurrencyList,value:d}),(0,o.createElement)(l.TextControl,{"aria-describedby":`${a}-price-error`,className:g()("simple-payments__field","simple-payments__field-price",{"simple-payments__field-has-error":t}),label:__("Price","jetpack"),onChange:this.handlePriceChange,placeholder:(0,_.T4)(0,d,!1),required:!0,step:"1",type:"number",value:y||""}),(0,o.createElement)(v.Z,{id:`${a}-price-error`,isError:!0},t)),(0,o.createElement)("div",{className:"simple-payments__field-multiple"},(0,o.createElement)(l.ToggleControl,{checked:Boolean(k),label:__("Allow people to buy more than one item at a time","jetpack"),onChange:this.handleMultipleChange})),(0,o.createElement)(l.TextControl,{"aria-describedby":`${a}-email-${e?"error":"help"}`,className:g()("simple-payments__field","simple-payments__field-email",{"simple-payments__field-has-error":e}),label:__("Email","jetpack"),onChange:this.handleEmailChange,placeholder:__("Email","jetpack"),required:!0,type:"text",value:p}),(0,o.createElement)(v.Z,{id:`${a}-email-error`,isError:!0},e),(0,o.createElement)(v.Z,{id:`${a}-email-help`},__("Enter the email address associated with your PayPal account. Don’t have an account?","jetpack")+" ",(0,o.createElement)(l.ExternalLink,{href:"https://www.paypal.com/"},__("Create one on PayPal","jetpack")))))}}const j=(0,u.withSelect)(((e,t)=>{const{getEntityRecord:r,getMedia:n}=e("core"),{getCurrentPost:a}=e("core/editor"),{__experimentalGetDirtyEntityRecords:o,isSavingEntityRecord:s}=e("core"),i=o,{productId:l,featuredMediaId:c}=t.attributes,u=l?(0,b.pick)(r("postType",k.LC,l),[["content"],["meta","spay_currency"],["meta","spay_email"],["meta","spay_multiple"],["meta","spay_price"],["title","raw"],["featured_media"]]):void 0,d=a();return{block:e("core/block-editor").getBlock(t.clientId),hasPublishAction:!!(0,b.get)(d,["_links","wp:action-publish"]),isSaving:i().some((e=>s(e.kind,e.name,e.key))),simplePayment:u,featuredMedia:c?n(c):null,postLinkUrl:d?.guid?.raw,isPostEditor:Object.keys(a()).length>0}})),S=(0,c.compose)(j,c.withInstanceId)(C)},36227:(e,t,r)=>{"use strict";var n=r(31985),a=r(61390);(0,n.Z)(a.u2,a.Xd)},39416:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(51806),a=r(52175),o=r(55609),s=r(69307),i=r(65736),l=r(92819),c=r(94545);const __=i.__,u=e=>t=>e({featuredMediaId:(0,l.get)(t,"id",0),featuredMediaUrl:(0,l.get)(t,"url",null),featuredMediaTitle:(0,l.get)(t,"title",null)}),d=e=>{let{featuredMediaId:t,featuredMediaUrl:r,featuredMediaTitle:i,setAttributes:l}=e;return t?(0,n.createElement)("div",null,(0,n.createElement)(s.Fragment,null,(0,n.createElement)(a.BlockControls,null,(0,n.createElement)(o.ToolbarGroup,null,(0,n.createElement)(o.ToolbarItem,null,(()=>(0,n.createElement)(a.MediaUpload,{onSelect:u(l),allowedTypes:["image"],value:t,render:e=>{let{open:t}=e;return(0,n.createElement)(c.Z,{label:__("Edit Image","jetpack"),onClick:t})}}))),(0,n.createElement)(o.ToolbarButton,{icon:"trash",title:__("Remove Image","jetpack"),onClick:()=>l({featuredMediaId:null,featuredMediaUrl:null,featuredMediaTitle:null})}))),(0,n.createElement)("figure",null,(0,n.createElement)("img",{src:r,alt:i})))):(0,n.createElement)(a.MediaPlaceholder,{icon:(0,n.createElement)(a.BlockIcon,{icon:"format-image"}),labels:{title:__("Product Image","jetpack")},accept:"image/*",allowedTypes:["image"],onSelect:u(l)})}},61390:(e,t,r)=>{"use strict";r.d(t,{Xd:()=>v,u2:()=>g});var n=r(51806),a=r(13419),o=r(55609),s=r(69307),i=r(65736),l=r(70355),c=r(36825),u=r(66763),d=r(24097),p=r(36239),m=r(16376),h=r(60206);const __=i.__,_x=i._x,g="simple-payments",f=(0,n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,n.createElement)(o.Path,{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"})),b=(0,a.Wp)()||(0,a.Ug)()?"https://wordpress.com/support/pay-with-paypal/":"https://jetpack.com/support/jetpack-blocks/pay-with-paypal/",v={title:__("Pay with PayPal","jetpack"),description:(0,n.createElement)(s.Fragment,null,(0,n.createElement)("p",null,__("Lets you add credit and debit card payment buttons with minimal setup.","jetpack")),(0,n.createElement)("p",null,__("Good for collecting donations or payments for products and services.","jetpack")),(0,n.createElement)(o.ExternalLink,{href:b},__("Support reference","jetpack"))),icon:{src:f,foreground:(0,l.m)()},category:"earn",keywords:[_x("buy","block search term","jetpack"),_x("commerce","block search term","jetpack"),_x("credit card","block search term","jetpack"),_x("debit card","block search term","jetpack"),_x("earn","block search term","jetpack"),_x("ecommerce","block search term","jetpack"),_x("money","block search term","jetpack"),_x("paid","block search term","jetpack"),_x("payments","block search term","jetpack"),_x("products","block search term","jetpack"),_x("purchase","block search term","jetpack"),_x("sell","block search term","jetpack"),_x("shop","block search term","jetpack"),"square",_x("payments","block search term","jetpack")],attributes:{currency:{type:"string",default:c.a7},content:{type:"string",source:"html",selector:".jetpack-simple-payments-description p",default:""},email:{type:"string",default:""},featuredMediaId:{type:"number",default:0},featuredMediaUrl:{type:"string",source:"attribute",selector:".jetpack-simple-payments-image img",attribute:"src",default:null},featuredMediaTitle:{type:"string",source:"attribute",selector:".jetpack-simple-payments-image img",attribute:"alt",default:null},multiple:{type:"boolean",default:!1},postLinkUrl:{type:"string",source:"attribute",selector:".jetpack-simple-payments-purchase",attribute:"href"},postLinkText:{type:"string",source:"html",selector:".jetpack-simple-payments-purchase",default:__("Click here to purchase.","jetpack")},price:{type:"number"},productId:{type:"number"},title:{type:"string",source:"html",selector:".jetpack-simple-payments-title p",default:""}},transforms:{from:[{type:"shortcode",tag:"simple-payment",attributes:{productId:{type:"number",shortcode:e=>{let{named:{id:t}}=e;if(!t)return;const r=parseInt(t,10);return r||void 0}}}}]},edit:p.Z,save:m.Z,example:{attributes:{price:25,title:__("Jetpack t-shirt","jetpack"),content:__("Take flight in ultimate comfort with this stylish t-shirt featuring the Jetpack logo.","jetpack"),email:"jetpack@jetpack.com",featuredMediaUrl:h}},supports:{className:!1,customClassName:!1,html:!1,reusable:!1},deprecated:[u.Z,d.Z]}},72802:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(65736),o=r(23879),s=r(22323);const __=a.__,i=e=>{let{title:t="",content:r="",formattedPrice:a="",multiple:i=!1,featuredMediaUrl:l=null,featuredMediaTitle:c=null}=e;return(0,n.createElement)("div",{className:"jetpack-simple-payments-wrapper"},(0,n.createElement)("div",{className:"jetpack-simple-payments-product"},l&&(0,n.createElement)("div",{className:"jetpack-simple-payments-product-image"},(0,n.createElement)("figure",{className:"jetpack-simple-payments-image"},(0,n.createElement)("img",{src:l,alt:c}))),(0,n.createElement)("div",{className:"jetpack-simple-payments-details"},t&&(0,n.createElement)("div",{className:"jetpack-simple-payments-title"},(0,n.createElement)("p",null,t)),r&&(0,n.createElement)("div",{className:"jetpack-simple-payments-description"},(0,n.createElement)("p",null,r)),a&&(0,n.createElement)("div",{className:"jetpack-simple-payments-price"},(0,n.createElement)("p",null,a)),(0,n.createElement)("div",{className:"jetpack-simple-payments-purchase-box"},i&&(0,n.createElement)("div",{className:"jetpack-simple-payments-items"},(0,n.createElement)("input",{className:"jetpack-simple-payments-items-number",readOnly:!0,type:"number",value:"1"})),(0,n.createElement)("div",{className:"jetpack-simple-payments-button"},(0,n.createElement)("img",{alt:__("Pay with PayPal","jetpack"),src:s,srcSet:`${o} 2x`}))))))}},16376:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(96059);function o(e){let{attributes:t}=e;const{content:r,currency:o,featuredMediaUrl:s,featuredMediaTitle:i,postLinkUrl:l,postLinkText:c,price:u,productId:d,title:p}=t;return d?(0,n.createElement)("div",{className:`jetpack-simple-payments-wrapper jetpack-simple-payments-${d}`},(0,n.createElement)("div",{className:"jetpack-simple-payments-product"},s&&(0,n.createElement)("div",{className:"jetpack-simple-payments-product-image"},(0,n.createElement)("div",{className:"jetpack-simple-payments-image"},(0,n.createElement)("figure",null,(0,n.createElement)("img",{src:s,alt:i})))),(0,n.createElement)("div",{className:"jetpack-simple-payments-details"},(0,n.createElement)("div",{className:"jetpack-simple-payments-title"},(0,n.createElement)("p",null,p)),(0,n.createElement)("div",{className:"jetpack-simple-payments-description"},(0,n.createElement)("p",null,r)),(0,n.createElement)("div",{className:"jetpack-simple-payments-price"},(0,n.createElement)("p",null,(0,a.T4)(u,o))),(0,n.createElement)("a",{className:"jetpack-simple-payments-purchase",href:l,target:"_blank",rel:"noopener noreferrer"},c)))):null}},96059:(e,t,r)=>{"use strict";r.d(t,{N3:()=>o,T4:()=>l,w:()=>i});var n=r(43317),a=r(92819);r(36825);const o=e=>{const t=(""+e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0},s=function(){var e,t,r;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US";const a=window?.window?.navigator;return a?.languages?.length?a.languages[0]:null!==(e=null!==(t=null!==(r=a?.userLanguage)&&void 0!==r?r:a?.language)&&void 0!==t?t:a?.browserLanguage)&&void 0!==e?e:n},i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const{precision:o,symbol:s}=(0,n.X)(t),i=e.toFixed(o);return r?`${i} ${(0,a.trimEnd)(s,".")}`:i},l=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1?arguments[1]:void 0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!window.Intl||"function"!=typeof Intl.NumberFormat)return i(t,r,n);const a=[null!==(e=window?.Jetpack_Editor_Initial_State?.siteLocale)&&void 0!==e?e:"en-US",s(),"en-US"];let o,l={};for(o of(n&&(l={style:"currency",currency:r}),a))try{return Intl.NumberFormat(o,l).format(t)}catch{continue}return i(t,r,n)}},20288:(e,t,r)=>{"use strict";r.d(t,{G:()=>c,J:()=>u});var n=r(51806),a=r(52175),o=r(55609),s=r(69307),i=r(65736),l=r(92819);const __=i.__,_x=i._x;function c(e){let{attributes:{autoplay:t,delay:r,effect:a,images:i,sizeSlug:c},imageSizeOptions:u,onChangeImageSize:d,setAttributes:p}=e;const m="undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,h=[{label:_x("Slide","Slideshow transition effect","jetpack"),value:"slide"},{label:_x("Fade","Slideshow transition effect","jetpack"),value:"fade"}];return(0,n.createElement)(s.Fragment,null,(0,n.createElement)(o.PanelBody,{title:__("Autoplay","jetpack")},(0,n.createElement)(o.ToggleControl,{label:__("Autoplay","jetpack"),help:__("Autoplay between slides","jetpack"),checked:t,onChange:e=>{p({autoplay:e})}}),t&&(0,n.createElement)(o.RangeControl,{label:__("Delay between transitions (in seconds)","jetpack"),value:r,onChange:e=>{p({delay:e})},min:1,max:5}),t&&m&&(0,n.createElement)("span",null,__("The Reduce Motion accessibility option is selected, therefore autoplay will be disabled in this browser.","jetpack"))),(0,n.createElement)(o.PanelBody,{title:__("Effects","jetpack")},(0,n.createElement)(o.SelectControl,{label:__("Transition","jetpack"),value:a,onChange:e=>{p({effect:e})},options:h})),!(0,l.isEmpty)(i)&&!(0,l.isEmpty)(u)&&(0,n.createElement)(o.PanelBody,{title:__("Image Settings","jetpack")},(0,n.createElement)(o.SelectControl,{label:__("Size","jetpack"),value:c,options:u,onChange:e=>d(e)})))}function u(e){let{allowedMediaTypes:t,attributes:{images:r},onSelectImages:i}=e;return(0,n.createElement)(s.Fragment,null,!!r.length&&(0,n.createElement)(o.ToolbarGroup,null,(0,n.createElement)(o.ToolbarItem,null,(()=>(0,n.createElement)(a.MediaUpload,{onSelect:i,allowedTypes:t,multiple:!0,gallery:!0,value:r.map((e=>e.id)),render:e=>{let{open:t}=e;return(0,n.createElement)(o.Button,{label:__("Edit Slideshow","jetpack"),onClick:t},__("Edit","jetpack"))}})))))}},30847:(e,t,r)=>{"use strict";async function n(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:".swiper-container",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a={effect:"slide",grabCursor:!0,init:!0,initialSlide:0,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{bulletElement:"button",clickable:!0,el:".swiper-pagination",type:"bullets"},preventClicks:!1,preventClicksPropagation:!1,releaseFormElements:!1,setWrapperSize:!0,threshold:5,touchStartPreventDefault:!1,on:Object.fromEntries(Object.entries(n||{}).map((e=>{let[t,r]=e;return[t,function(){r(this)}]})))},[{default:o}]=await Promise.all([Promise.all([r.e(147),r.e(390)]).then(r.t.bind(r,59101,23)),Promise.all([r.e(147),r.e(390)]).then(r.bind(r,89701))]);return new o(e,{...a,...t})}r.d(t,{Z:()=>n})},21233:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>E});var n=r(90017),a=r.n(n),o=r(51806),s=r(11313),i=r(52175),l=r(55609),c=r(94333),u=r(9818),d=r(12238),p=r(69307),m=r(65736),h=r(92819),g=r(20288),f=r(19486),b=r(19775);const __=m.__,v=["image"],k=(e,t)=>{const r=(0,h.pick)(e,["alt","id","link","caption"]);return r.url=(0,h.get)(e,["sizes",t,"url"])||(0,h.get)(e,["media_details","sizes",t,"source_url"])||e.url,r};class y extends p.Component{constructor(){super(...arguments),a()(this,"onSelectImages",(e=>{const{sizeSlug:t}=this.props.attributes,r=e.map((e=>k(e,t)));this.setAttributes({images:r})})),a()(this,"onRemoveImage",(e=>()=>{const t=(0,h.filter)(this.props.attributes.images,((t,r)=>e!==r));this.setState({selectedImage:null}),this.setAttributes({images:t})})),a()(this,"addFiles",(e=>{const t=this.props.attributes.images||[],r=this.props.attributes.sizeSlug,{lockPostSaving:n,unlockPostSaving:a,noticeOperations:o}=this.props,i="slideshowBlockLock";n(i),(0,d.mediaUpload)({allowedTypes:v,filesList:e,onFileChange:e=>{const n=e.map((e=>k(e,r)));this.setAttributes({images:[...t,...n]}),n.every((e=>(0,s.isBlobURL)(e.url)))||a(i)},onError:o.createErrorNotice})})),a()(this,"uploadFromFiles",(e=>this.addFiles(e.target.files))),a()(this,"updateImagesSize",(e=>{const{images:t}=this.props.attributes,{resizedImages:r}=this.props,n=t.map((t=>{const n=r.find((e=>{let{id:r}=e;return parseInt(r,10)===parseInt(t.id,10)})),a=(0,h.get)(n,["sizes",e,"source_url"]);return{...t,...a&&{url:a}}}));this.setAttributes({images:n,sizeSlug:e})})),this.state={selectedImage:null}}componentDidMount(){const{ids:e,sizeSlug:t}=this.props.attributes;t||this.setAttributes({sizeSlug:e.length?"full":"large"})}setAttributes(e){if(e.ids)throw new Error('The "ids" attribute should not be changed directly. It is managed automatically when "images" attribute changes');e.images&&(e={...e,ids:e.images.map((e=>{let{id:t}=e;return parseInt(t,10)}))}),this.props.setAttributes(e)}getImageSizeOptions(){const{imageSizes:e}=this.props;return(0,h.map)(e,(e=>{let{name:t,slug:r}=e;return{value:r,label:t}}))}render(){const{attributes:e,className:t,isSelected:r,noticeOperations:n,noticeUI:a}=this.props,{align:s,autoplay:c,delay:u,effect:d,images:m}=e,h=this.getImageSizeOptions(),k=(0,o.createElement)(p.Fragment,null,(0,o.createElement)(i.InspectorControls,null,(0,o.createElement)(g.G,{attributes:e,imageSizeOptions:h,onChangeImageSize:this.updateImagesSize,setAttributes:e=>this.setAttributes(e)})),(0,o.createElement)(i.BlockControls,null,(0,o.createElement)(g.J,{allowedMediaTypes:v,attributes:e,onSelectImages:this.onSelectImages})));return 0===m.length?(0,o.createElement)(p.Fragment,null,k,(0,o.createElement)(i.MediaPlaceholder,{icon:b.qv,className:t,labels:{title:__("Slideshow","jetpack"),instructions:__("Drag images, upload new ones or select files from your library.","jetpack")},onSelect:this.onSelectImages,accept:"image/*",allowedTypes:v,multiple:!0,notices:a,onError:n.createErrorNotice})):(0,o.createElement)(p.Fragment,null,k,a,(0,o.createElement)(f.Z,{align:s,autoplay:c,className:t,delay:u,effect:d,images:m,onError:n.createErrorNotice}),(0,o.createElement)(l.DropZone,{onFilesDrop:this.addFiles}),r&&(0,o.createElement)("div",{className:"wp-block-jetpack-slideshow__add-item"},(0,o.createElement)(l.FormFileUpload,{multiple:!0,className:"wp-block-jetpack-slideshow__add-item-button",onChange:this.uploadFromFiles,accept:"image/*",icon:"insert"},__("Upload an image","jetpack"))))}}const E=(0,c.compose)((0,u.withSelect)(((e,t)=>({imageSizes:e("core/editor").getEditorSettings().imageSizes,resizedImages:t.attributes.ids.reduce(((t,r)=>{const n=e("core").getMedia(r);return[...t,{id:r,sizes:(0,h.get)(n,["media_details","sizes"])}]}),[])}))),(0,u.withDispatch)((e=>{const{lockPostSaving:t,unlockPostSaving:r}=e("core/editor");return{lockPostSaving:t,unlockPostSaving:r}})),l.withNotices)(y)},17013:(e,t,r)=>{"use strict";var n=r(31985),a=r(19775);(0,n.Z)(a.u2,a.Xd)},19775:(e,t,r)=>{"use strict";r.d(t,{Xd:()=>b,qv:()=>h,u2:()=>f});var n=r(51806),a=r(55609),o=r(65736),s=r(70355),i=r(5820),l=r(21233),c=r(67240),u=r(65784),d=r(6425),p=r(85983),m=r(81504);const __=o.__,_x=o._x,h=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},(0,n.createElement)(a.Path,{d:"M21 8V19C21 20.1046 20.1057 21 19.0011 21C15.8975 21 9.87435 21 6 21",fill:"none",stroke:"currentColor",strokeWidth:"1.5"}),(0,n.createElement)(a.Rect,{x:"3.75",y:"3.75",width:"13.5",height:"13.5",rx:"0.875",fill:"none",stroke:"currentColor",strokeWidth:"1.5"}),(0,n.createElement)(a.Path,{d:"M9 14L12 11L9 8",fill:"none",stroke:"currentColor",strokeWidth:"1.5"})),g={align:"center",autoplay:!0,ids:[22,23],images:[{alt:"",caption:"",id:22,url:u},{alt:"",caption:"",id:23,url:d},{alt:"",caption:"",id:23,url:p}],effect:"slide"},f="slideshow",b={title:__("Slideshow","jetpack"),category:(0,i.Z)("media","layout"),keywords:[_x("image","block search term","jetpack"),_x("gallery","block search term","jetpack"),_x("slider","block search term","jetpack")],description:__("Display multiple images in sequential order.","jetpack"),attributes:{align:{default:"center",type:"string"},autoplay:{type:"boolean",default:!1},delay:{type:"number",default:3},ids:{default:[],type:"array"},images:{type:"array",default:[],source:"query",selector:".swiper-slide",query:{alt:{source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},id:{source:"attribute",selector:"img",attribute:"data-id"},url:{source:"attribute",selector:"img",attribute:"src"}}},effect:{type:"string",default:"slide"},sizeSlug:{type:"string"}},supports:{align:["center","wide","full"],html:!1},icon:{src:h,foreground:(0,s.m)()},edit:l.ZP,save:c.Z,transforms:m.Z,example:{attributes:g}}},85575:(e,t,r)=>{"use strict";r.d(t,{D:()=>a});var n=r(65736);const __=n.__;function a(e,t,r){let a="";if(r<=5)for(let e=1;e<=r;e++){a+='<button class="'+`swiper-pagination-bullet${e===t?" swiper-pagination-bullet-active":""}`+'" tab-index="0" role="button" aria-label="'+(0,n.sprintf)(/* translators: placeholder is the the video number to navigate to */
__("Go to slide %s","jetpack"),e)+'"></button>'}else a+=`<div class="swiper-pagination-simple">${t} / ${r}</div>`;return a}},67240:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(19486);const o=e=>{let{attributes:{align:t,autoplay:r,delay:o,effect:s,images:i},className:l}=e;return(0,n.createElement)(a.Z,{align:t,autoplay:r,className:l,delay:o,effect:s,images:i})}},19486:(e,t,r)=>{"use strict";r.d(t,{Z:()=>k});var n=r(90017),a=r.n(n),o=r(51806),s=r(11313),i=r(52175),l=r(55609),c=r(69307),u=r(65736),d=r(65235),p=r.n(d),m=r(92819),h=r(6209),g=r(30847),f=r(85575),b=r(17766);const __=u.__;class v extends c.Component{constructor(e){var t;super(e),t=this,a()(this,"pendingRequestAnimationFrame",null),a()(this,"resizeObserver",null),a()(this,"initializeResizeObserver",(e=>{this.clearResizeObserver(),this.resizeObserver=new h.Z((()=>{this.clearPendingRequestAnimationFrame(),this.pendingRequestAnimationFrame=requestAnimationFrame((()=>{(0,b.$m)(e),e.update()}))})),this.resizeObserver.observe(e.el)})),a()(this,"clearPendingRequestAnimationFrame",(()=>{this.pendingRequestAnimationFrame&&(cancelAnimationFrame(this.pendingRequestAnimationFrame),this.pendingRequestAnimationFrame=null)})),a()(this,"clearResizeObserver",(()=>{this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)})),a()(this,"prefersReducedMotion",(()=>"undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)),a()(this,"buildSwiper",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return(0,g.Z)(t.slideshowRef.current,{autoplay:!(!t.props.autoplay||t.prefersReducedMotion())&&{delay:1e3*t.props.delay,disableOnInteraction:!1},effect:t.props.effect,loop:!0,initialSlide:e,navigation:{nextEl:t.btnNextRef.current,prevEl:t.btnPrevRef.current},pagination:{clickable:!0,el:t.paginationRef.current,type:"custom",renderCustom:f.D}},{init:b.UA,imagesReady:b.$m,paginationRender:b.Wj,transitionEnd:b.HV})})),this.slideshowRef=(0,c.createRef)(),this.btnNextRef=(0,c.createRef)(),this.btnPrevRef=(0,c.createRef)(),this.paginationRef=(0,c.createRef)()}componentDidMount(){const{onError:e}=this.props;this.buildSwiper().then((e=>{this.swiperInstance=e,this.initializeResizeObserver(e)})).catch((()=>{e(__("The Swiper library could not be loaded.","jetpack"))}))}componentWillUnmount(){this.clearResizeObserver(),this.clearPendingRequestAnimationFrame()}componentDidUpdate(e){const{align:t,autoplay:r,delay:n,effect:a,images:o,onError:s}=this.props;if(t===e.align&&(0,m.isEqual)(o,e.images)||this.swiperInstance&&this.swiperInstance.update(),a!==e.effect||r!==e.autoplay||n!==e.delay||o!==e.images){let t;t=this.swiperIndex?o.length===e.images.length?this.swiperInstance.realIndex:e.images.length:0,this.swiperInstance&&this.swiperInstance.destroy(!0,!0),this.buildSwiper(t).then((e=>{this.swiperInstance=e,this.initializeResizeObserver(e)})).catch((()=>{s(__("The Swiper library could not be loaded.","jetpack"))}))}}render(){if(!this.props?.images?.length)return null;const{autoplay:e,className:t,delay:r,effect:n,images:a}=this.props;return(0,o.createElement)("div",{className:t,"data-autoplay":e||null,"data-delay":e?r:null,"data-effect":n},(0,o.createElement)("div",{className:"wp-block-jetpack-slideshow_container swiper-container",ref:this.slideshowRef},(0,o.createElement)("ul",{className:"wp-block-jetpack-slideshow_swiper-wrapper swiper-wrapper"},a.map((e=>{let{alt:t,caption:r,id:n,url:a}=e;return(0,o.createElement)("li",{className:p()("wp-block-jetpack-slideshow_slide","swiper-slide",(0,s.isBlobURL)(a)&&"is-transient"),key:n||a},(0,o.createElement)("figure",null,(0,o.createElement)("img",{alt:t,className:`wp-block-jetpack-slideshow_image wp-image-${n}`,"data-id":n,src:a}),(0,s.isBlobURL)(a)&&(0,o.createElement)(l.Spinner,null),r&&(0,o.createElement)(i.RichText.Content,{className:"wp-block-jetpack-slideshow_caption gallery-caption",tagName:"figcaption",value:r})))}))),(0,o.createElement)("a",{className:"wp-block-jetpack-slideshow_button-prev swiper-button-prev swiper-button-white",ref:this.btnPrevRef,role:"button"}),(0,o.createElement)("a",{className:"wp-block-jetpack-slideshow_button-next swiper-button-next swiper-button-white",ref:this.btnNextRef,role:"button"}),(0,o.createElement)("a",{"aria-label":"Pause Slideshow",className:"wp-block-jetpack-slideshow_button-pause",role:"button"}),(0,o.createElement)("div",{className:"wp-block-jetpack-slideshow_pagination swiper-pagination swiper-pagination-white",ref:this.paginationRef})))}}a()(v,"defaultProps",{effect:"slide"});const k=v},17766:(e,t,r)=>{"use strict";r.d(t,{$m:()=>c,HV:()=>u,UA:()=>l,Wj:()=>d});var n=r(81975);const a=16/9,o=.8,s=600,i="wp-block-jetpack-slideshow_autoplay-paused";function l(e){c(e),u(e);document.querySelector("body").dispatchEvent(new Event("jetpack-lazy-images-load")),e.el.querySelector(".wp-block-jetpack-slideshow_button-pause").addEventListener("click",(function(){e.el&&(e.el.classList.contains(i)?(e.el.classList.remove(i),e.autoplay.start(),this.setAttribute("aria-label","Pause Slideshow")):(e.el.classList.add(i),e.autoplay.stop(),this.setAttribute("aria-label","Play Slideshow")))}))}function c(e){if(!e||!e.el)return;const t=e.el.querySelector('.swiper-slide[data-swiper-slide-index="0"] img');if(!t)return;const r=t.clientWidth/t.clientHeight,n=Math.max(Math.min(r,a),1),i="undefined"!=typeof window?window.innerHeight*o:s,l=Math.min(e.width/n,i),c=`${Math.floor(l)}px`,u=`${Math.floor(l/2)}px`;e.el.classList.add("wp-swiper-initialized"),e.wrapperEl.style.height=c,e.el.querySelector(".wp-block-jetpack-slideshow_button-prev").style.top=u,e.el.querySelector(".wp-block-jetpack-slideshow_button-next").style.top=u}function u(e){(e.slides||[]).forEach(((t,r)=>{t.setAttribute("aria-hidden",r===e.activeIndex?"false":"true"),r===e.activeIndex?t.setAttribute("tabindex","-1"):t.removeAttribute("tabindex")})),function(e){const t=e.slides[e.activeIndex];if(!t)return;const r=t.getElementsByTagName("FIGCAPTION")[0],a=t.getElementsByTagName("IMG")[0];e.a11y.liveRegion&&(e.a11y.liveRegion[0].innerHTML=r?r.innerHTML:(0,n.escapeHTML)(a.alt))}(e)}function d(e){(e.pagination.bullets||[]).forEach((t=>{t.addEventListener("click",(()=>{const t=e.slides[e.realIndex];setTimeout((()=>{t.focus()}),500)}))}))}},81504:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(4981),a=r(92819);function o(e){return(0,a.filter)(e,(e=>{let{id:t,url:r}=e;return t&&r}))}const s={from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],isMatch:e=>o(e).length>0,transform:e=>{const t=o(e);return(0,n.createBlock)("jetpack/slideshow",{images:t.map((e=>{let{alt:t,caption:r,id:n,url:a}=e;return{alt:t,caption:r,id:n,url:a}})),ids:t.map((e=>{let{id:t}=e;return t}))})}},{type:"block",blocks:["core/gallery","jetpack/tiled-gallery"],transform:e=>{let{images:t}=e;const r=o(t);return r.length>0?(0,n.createBlock)("jetpack/slideshow",{images:r.map((e=>{let{alt:t,caption:r,id:n,url:a}=e;return{alt:t,caption:r,id:n,url:a}})),ids:r.map((e=>{let{id:t}=e;return t}))}):(0,n.createBlock)("jetpack/slideshow")}}],to:[{type:"block",blocks:["core/gallery"],transform:e=>{let{images:t,ids:r}=e;return(0,n.createBlock)("core/gallery",{images:t,ids:r})}},{type:"block",blocks:["core/image"],transform:e=>{let{images:t}=e;return t.length>0?t.map((e=>{let{id:t,url:r,alt:a,caption:o}=e;return(0,n.createBlock)("core/image",{id:t,url:r,alt:a,caption:o})})):(0,n.createBlock)("core/image")}}]}},91403:(e,t,r)=>{"use strict";var n=r(13419),a=r(32078);(0,n.o_)(a.u2,a.Xd)},32078:(e,t,r)=>{"use strict";r.d(t,{Xd:()=>p,u2:()=>d});var n=r(51806),a=r(74356),o=r(13419),s=r(55609),i=r(72067),l=r(69307),c=r(65736),u=r(34613);const __=c.__,d="social-previews",p={render:()=>(0,n.createElement)(m,null)},m=function(){const[e,t]=(0,l.useState)(!1);return(0,n.createElement)(n.Fragment,null,e&&(0,n.createElement)(a.pD,{onClose:()=>t(!1)}),(0,n.createElement)(u.Z,null,(0,n.createElement)(s.PanelBody,{title:__("Social Previews","jetpack"),initialOpen:!1},(0,n.createElement)(a.mJ,{openModal:()=>t(!0)}))),(0,n.createElement)(i.PluginPrePublishPanel,{title:__("Social Previews","jetpack"),icon:(0,n.createElement)(o.Pm,null),initialOpen:!1},(0,n.createElement)(a.mJ,{openModal:()=>t(!0)})))}},65492:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(52175),o=r(55609),s=r(69307),i=r(65736),l=r(94545);const __=i.__,c=e=>{let{allowedMediaTypes:t,attributes:{mediaFiles:r},onSelectMedia:i}=e;return(0,n.createElement)(s.Fragment,null,(0,n.createElement)(a.BlockControls,null,!!r.length&&(0,n.createElement)(o.ToolbarGroup,null,(0,n.createElement)(o.ToolbarItem,null,(()=>(0,n.createElement)(a.MediaUpload,{title:__("Edit Story","jetpack"),onSelect:i,allowedTypes:t,addToGallery:!0,multiple:"add",value:r.map((e=>e.id)),render:e=>{let{open:t}=e;return(0,n.createElement)(l.Z,{label:__("Edit Story","jetpack"),onClick:t})}}))))))}},19693:(e,t,r)=>{"use strict";r.d(t,{Z:()=>v});var n=r(51806),a=r(11313),o=r(52175),s=r(55609),i=r(9818),l=r(69307),c=r(65736),u=r(65235),d=r.n(u),p=r(92819),m=r(65492),h=r(73022),g=r(93688);const __=c.__,f=["image","video"],b=e=>{const t=(0,p.pick)(e,["alt","title","id","link","type","mime","caption","width","height"]);return t.url=(0,p.get)(e,["media_details","original","url"])||(0,p.get)(e,["media_details","videopress","original"])||(0,p.get)(e,["media_details","sizes","large","source_url"])||(0,p.get)(e,["sizes","large","url"])||e.url,t.type=e.media_type||e.type,t.mime=e.mime_type||e.mime,t.title=t.title?.rendered||t.title,t.width=t.width||e.media_details?.width,t.height=t.height||e.media_details?.height,t},v=(0,s.withNotices)((function(e){let{attributes:t,className:r,isSelected:s,noticeOperations:c,noticeUI:u,setAttributes:p}=e;const{mediaFiles:v}=t,{lockPostSaving:k,unlockPostSaving:y}=(0,i.useDispatch)("core/editor"),E="storyBlockLock",w=e=>{const t=e.map((e=>{if(!isNaN(e)){return v.find((t=>t.id===e))||{id:e}}return e})).map(b),r=t.filter((e=>!(0,a.isBlobURL)(e.url)));t.length!==r.length?k(E):y(E),p({mediaFiles:t})},_=(0,n.createElement)(m.Z,{allowedMediaTypes:f,attributes:t,onSelectMedia:w}),C=!!v.length,j=(0,n.createElement)(o.MediaPlaceholder,{addToGallery:C,isAppender:C,className:r,disableMediaButtons:C&&!s,icon:!C&&g.qv,labels:{title:!C&&__("Story","jetpack"),instructions:!C&&__("Drag images and videos, upload new ones, or select files from your library.","jetpack")},onSelect:w,accept:f.map((e=>e+"/*")).join(","),allowedTypes:f,multiple:"add",value:v,notices:C?void 0:u,onError:c.createErrorNotice});return C?(0,n.createElement)(l.Fragment,null,_,u,(0,n.createElement)("div",{className:d()("wp-block-jetpack-story","wp-story",r)},(0,n.createElement)(h.Z,{slides:v,disabled:!s,showSlideCount:s,shadowDOM:{enabled:!1},playInFullscreen:!1,tapToPlayPause:!1,playOnNextSlide:!1})),s&&j):(0,n.createElement)(l.Fragment,null,_,j)}))},88067:(e,t,r)=>{"use strict";var n=r(31985),a=r(93688);(0,n.Z)(a.u2,a.Xd)},66512:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(70444);const o=(0,r(36598).Z)((0,n.createElement)(a.G,null,(0,n.createElement)(a.Path,{d:"M17 5a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2h9z"}),(0,n.createElement)(a.Path,{d:"M13 4H5a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2z"}),(0,n.createElement)(a.Path,{d:"M7 16h8a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z"})))},93688:(e,t,r)=>{"use strict";r.d(t,{Xd:()=>p,qv:()=>i.Z,u2:()=>d});var n=r(65736),a=r(70355),o=r(5820),s=r(19693),i=r(66512),l=r(29143),c=r(15915);const __=n.__,_x=n._x,u={mediaFiles:[{alt:"",caption:"",mime:"image/jpg",type:"image",id:22,url:c}]},d="story",p={title:__("Story","jetpack"),category:(0,o.Z)("media","layout"),keywords:[_x("story","block search term","jetpack"),_x("image","block search term","jetpack"),_x("video","block search term","jetpack"),_x("gallery","block search term","jetpack")],description:__("Add an interactive story.","jetpack"),attributes:{settings:{type:"object"},mediaFiles:{type:"array",default:[]}},supports:{html:!1},icon:{src:i.Z,foreground:(0,a.m)()},edit:s.Z,save:l.Z,example:{attributes:u}}},19395:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(70444);function o(e){let{currentMedia:t}=e;const r=t&&"image"===t.type?t.url:null;return(0,n.createElement)("div",{className:"wp-story-background"},(0,n.createElement)("div",{className:"wp-story-background-image",style:{backgroundImage:r?`url("${r}")`:"none"}}),(0,n.createElement)("div",{className:"wp-story-background-blur"}),(0,n.createElement)(a.SVG,{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"0",height:"0"},(0,n.createElement)("filter",{id:"gaussian-blur-18"},(0,n.createElement)("feGaussianBlur",{stdDeviation:"18"}))))}},94754:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(65736),o=r(65235),s=r.n(o);const __=a.__;function i(e){let{isEllipsis:t,disabled:r,index:o,isSelected:i,progress:l,onClick:c}=e;const u=r||t;let d=null;return t||(d=i?(0,a.sprintf)(/* translators: %d: Slide number. */
__("Slide %d, currently selected","jetpack"),o+1):(0,a.sprintf)(/* translators: %d: Slide number. */
__("Go to slide %d","jetpack"),o+1)),(0,n.createElement)("button",{role:u?"presentation":"tab",key:o,className:s()("wp-story-pagination-bullet",{"wp-story-pagination-ellipsis":t}),"aria-label":d,"aria-disabled":u||i,onClick:u||i?void 0:c,disabled:u},(0,n.createElement)("div",{className:"wp-story-pagination-bullet-bar"},(0,n.createElement)("div",{className:"wp-story-pagination-bullet-bar-progress",style:{width:`${l}%`}})))}},44689:(e,t,r)=>{"use strict";r.d(t,{b:()=>l,r:()=>c});var n=r(82674),a=r.n(n),o=r(51806),s=r(65235),i=r.n(s);const l=e=>{let{className:t,size:r,label:n,isPressed:s,...l}=e;return(0,o.createElement)("button",a()({type:"button","aria-label":n,"aria-pressed":s,className:i()("jetpack-mdc-icon-button","circle-icon","outlined","bordered",t),style:{width:`${r}px`,height:`${r}px`}},l))},c=e=>{let{className:t,size:r=24,label:n,isPressed:s,...l}=e;return(0,o.createElement)("button",a()({type:"button","aria-label":n,"aria-pressed":s,className:i()("jetpack-mdc-icon-button",t),style:{width:`${r}px`,height:`${r}px`}},l))}},51543:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(51806);const a=()=>(0,n.createElement)("div",{className:"wp-story-loading-spinner"},(0,n.createElement)("div",{className:"wp-story-loading-spinner__outer"},(0,n.createElement)("div",{className:"wp-story-loading-spinner__inner"})))},85584:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(65736),o=r(44689),s=r(89620);const _x=a._x;function i(e){let{playing:t,muted:r,onPlayPressed:a,onMutePressed:i,showMute:l}=e;return(0,n.createElement)("div",{className:"wp-story-controls"},(0,n.createElement)(o.r,{isPressed:t,label:t?_x("pause","Button tooltip text","jetpack"):_x("play","Button tooltip text","jetpack",0),onClick:a},t?(0,n.createElement)(s.fp,null):(0,n.createElement)(s.o1,null)),l&&(0,n.createElement)(o.r,{isPressed:r,label:r?_x("unmute","Button tooltip text","jetpack"):_x("mute","Button tooltip text","jetpack",0),onClick:i},r?(0,n.createElement)(s.xb,null):(0,n.createElement)(s.MC,null)))}},14904:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(65736),o=r(44689),s=r(89620);const __=a.__;function i(e){let{fullscreen:t,onExitFullscreen:r,siteIconUrl:a,storyTitle:i}=e;return t?(0,n.createElement)("div",{className:"wp-story-meta"},(0,n.createElement)("div",{className:"wp-story-icon"},(0,n.createElement)("img",{alt:__("Site icon","jetpack"),src:a,width:"40",height:"40"})),(0,n.createElement)("div",null,(0,n.createElement)("div",{className:"wp-story-title"},i)),(0,n.createElement)(o.r,{className:"wp-story-exit-fullscreen",label:__("Exit Fullscreen","jetpack"),onClick:r},(0,n.createElement)(s.Tw,null))):null}},89620:(e,t,r)=>{"use strict";r.d(t,{JM:()=>p,MC:()=>u,Tw:()=>c,Vq:()=>m,fp:()=>l,o1:()=>i,xb:()=>d});var n=r(51806),a=r(70444),o=r(36598);const s=e=>{let{children:t,size:r}=e;return(0,o.Z)(t,r,r)},i=e=>{let{size:t}=e;return(0,n.createElement)(s,{size:t},(0,n.createElement)(a.Path,{d:"M8 5v14l11-7z"}))},l=e=>{let{size:t}=e;return(0,n.createElement)(s,{size:t},(0,n.createElement)(a.Path,{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"}))},c=e=>{let{size:t}=e;return(0,n.createElement)(s,{size:t},(0,n.createElement)(a.Path,{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}))},u=e=>{let{size:t}=e;return(0,n.createElement)(s,{size:t},(0,n.createElement)(a.Path,{d:"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z"}))},d=e=>{let{size:t}=e;return(0,n.createElement)(s,{size:t},(0,n.createElement)(a.Path,{d:"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z"}))},p=e=>{let{size:t}=e;return(0,n.createElement)(s,{size:t},(0,n.createElement)(a.Path,{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}))},m=e=>{let{size:t}=e;return(0,n.createElement)(s,{size:t},(0,n.createElement)(a.Path,{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}))}},69835:(e,t,r)=>{"use strict";r.d(t,{Aq:()=>i.Z,WB:()=>l.Z,ZX:()=>a.Z,aV:()=>s.Z,gT:()=>n.Z,h4:()=>o.Z,pU:()=>c.pU});var n=r(94754),a=r(85584),o=r(14904),s=r(74629),i=r(19395),l=r(51543),c=r(41126);r(44689)},41126:(e,t,r)=>{"use strict";r.d(t,{pU:()=>u});var n=r(82674),a=r.n(n),o=r(51806),s=r(65235),i=r.n(s);const l=e=>{let{title:t,alt:r,className:n,id:a,mediaRef:s,mime:l,sizes:c,srcset:u,url:d}=e;return(0,o.createElement)("img",{ref:s,"data-id":a,"data-mime":l,title:t,alt:r,src:d,className:i()("wp-story-image",`wp-image-${a}`,n),srcSet:u,sizes:c})},c=e=>{let{title:t,className:r,id:n,mediaRef:a,mime:s,url:l,poster:c}=e;return(0,o.createElement)("video",{className:i()("wp-story-video","intrinsic-ignore",`wp-video-${n}`,r),ref:a,"data-id":n,title:t,type:s,src:l,poster:c,tabIndex:-1,preload:"auto",playsInline:!0})},u=e=>{let{targetAspectRatio:t,cropUpTo:r,type:n,width:s,height:i,...u}=e,d=null;if(s&&i){const e=s/i;if(e>=t){e>t/(1-r)||(d="wp-story-crop-wide")}else{e<t*(1-r)||(d="wp-story-crop-narrow")}}const p="video"===n||(u.mime||"").startsWith("video/");return(0,o.createElement)("figure",null,p?(0,o.createElement)(c,a()({},u,{className:d})):(0,o.createElement)(l,a()({},u,{className:d})))}},74629:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(69307),o=r(65736),s=r(99891),i=r(44689),l=r(89620);const __=o.__;function c(e){let{ended:t,hasPrevious:r,onNextSlide:c,onPreviousSlide:u,icon:d,slideCount:p,showSlideCount:m}=e;const h=(0,a.useCallback)((e=>{t||(e.stopPropagation(),u())}),[u,t]),g=(0,a.useCallback)((e=>{t||(e.stopPropagation(),c())}),[c,t]);return(0,n.createElement)("div",{className:"wp-story-overlay"},m&&(0,n.createElement)("div",{className:"wp-story-embed-icon"},d,(0,n.createElement)("span",null,p)),!m&&(0,n.createElement)("div",{className:"wp-story-embed-icon-expand"},(0,n.createElement)(s.Z,{role:"img"})),r&&(0,n.createElement)("div",{className:"wp-story-prev-slide",onClick:h},(0,n.createElement)(i.b,{size:44,label:__("Previous Slide","jetpack"),className:"outlined-w"},(0,o.isRTL)()?(0,n.createElement)(l.Vq,{size:24}):(0,n.createElement)(l.JM,{size:24}))),(0,n.createElement)("div",{className:"wp-story-next-slide",onClick:g},(0,n.createElement)(i.b,{size:44,label:__("Next Slide","jetpack"),className:"outlined-w"},(0,o.isRTL)()?(0,n.createElement)(l.JM,{size:24}):(0,n.createElement)(l.Vq,{size:24}))))}},93340:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(51806),a=r(69307),o=r(65235),s=r.n(o),i=r(47591),l=r(74240),c=r(7449);const u=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent);function d(e){let{className:t,fullscreenClassName:r,bodyFullscreenClassName:o,fullscreen:d,shadowDOM:p,onKeyDown:m,onExitFullscreen:h,playerQuerySelector:g,children:f}=e;const b=(0,a.useRef)(),v=(0,a.useRef)(),[k,y]=(0,a.useState)(null),E=u&&i.am(),w=d&&!E,_=d&&E;return(0,a.useLayoutEffect)((()=>{if(E)d?b.current&&i.uP(b.current,h):i.bG()&&i.JF();else if(d){if(y([document.documentElement.scrollLeft,document.documentElement.scrollTop]),document.body.classList.add(o),document.getElementsByTagName("html")[0].classList.add(o),v.current){const e=v.current.querySelector(g);e&&e.focus()}}else if(document.body.classList.remove(o),document.getElementsByTagName("html")[0].classList.remove(o),k){window.scrollTo(...k);const e=b.current.querySelector(g);e&&e.focus()}}),[d]),(0,n.createElement)(n.Fragment,null,(0,n.createElement)(l.Z,p,(0,n.createElement)("div",{ref:b,className:s()(t,{[r]:_}),onKeyDown:m},!w&&f)),(0,n.createElement)(c.Z,{className:s()(t,{[r]:w}),isOpened:w,onRequestClose:h,shadowDOM:p,onKeyDown:w&&m,focusOnMount:!1,modalRef:v},w&&f))}},73022:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(9818),o=r(69307),s=r(39630),i=r(93340),l=r(75096);r(31179);function c(e){let{id:t,slides:r,metadata:c,disabled:u,...d}=e;const p=(0,o.useMemo)((()=>t||Math.random().toString(36)),[t]),{init:m,setEnded:h,setPlaying:g,setFullscreen:f,showSlide:b}=(0,a.useDispatch)("jetpack/story/player"),{playing:v,currentSlideIndex:k,fullscreen:y,isReady:E,playerSettings:w}=(0,a.useSelect)((e=>{const{getCurrentSlideIndex:t,getSettings:r,isFullscreen:n,isPlayerReady:a,isPlaying:o}=e("jetpack/story/player");return a(p)?{playing:o(p),currentSlideIndex:t(p),isReady:!0,fullscreen:n(p),playerSettings:r(p)}:{isReady:!1}}),[p]);(0,o.useEffect)((()=>{E||m(p,{slideCount:r.length,...d})}),[E,p]);const _=(0,o.useCallback)((e=>{switch(e.keyCode){case s.ENTER:if(y)break;case s.SPACE:g(p,!v);break;case s.LEFT:k>0&&b(p,k-1);break;case s.RIGHT:k<r.length-1?b(p,k+1):h(p)}}),[p,k,y,v]),C=(0,o.useCallback)((()=>{f(p,!1)}),[p]);return E?(0,n.createElement)(i.Z,{shadowDOM:w.shadowDOM,className:"wp-story-app",fullscreenClassName:"wp-story-fullscreen",bodyFullscreenClassName:"wp-story-in-fullscreen",playerQuerySelector:".wp-story-container",fullscreen:y,onExitFullscreen:C,onKeyDown:_},(0,n.createElement)(l.Z,{id:p,slides:r,metadata:c,disabled:u})):null}},47591:(e,t,r)=>{"use strict";r.d(t,{JF:()=>s,am:()=>n,bG:()=>a,uP:()=>o});const n=()=>document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled,a=()=>document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullScreenElement,o=(e,t)=>{if((e.requestFullscreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen).call(e),t){const e=()=>{document.fullscreenElement||(document.removeEventListener("fullscreenchange",e),t())};document.addEventListener("fullscreenchange",e)}},s=()=>(document.exitFullscreen||document.webkitExitFullscreen||document.mozCancelFullScreen||document.msExitFullscreen).call(document)},74240:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(69307);const o=window&&window.Element&&window.Element.prototype.hasOwnProperty("attachShadow");function s(e){let{enabled:t,delegatesFocus:r=!1,mode:s="open",globalStyleElements:l=[],adoptedStyleSheets:c=null,mountOnElement:u=null,children:d}=e;const[p,m]=(0,a.useState)(null),h=u||p,[g,f]=(0,a.useState)(null),b="string"==typeof l?[...document.querySelectorAll(l)]:l,v=o&&t&&b.length>0,k=(0,a.useCallback)((e=>{null!==e&&m(e.parentNode)}),[]);if((0,a.useEffect)((()=>{if(!h)return;if(h.shadowRoot)return void f(h.shadowRoot);const e=h.attachShadow({delegatesFocus:r,mode:s});c&&(e.adoptedStyleSheets=c),f(e)}),[h]),v&&!g)return u?null:(0,n.createElement)("span",{ref:k});const y=(0,n.createElement)(n.Fragment,null,v&&(0,n.createElement)(i,{globalStyleElements:b}),d);return v?(0,a.createPortal)(y,g):y}function i(e){let{globalStyleElements:t}=e;return(0,n.createElement)(n.Fragment,null,t.map(((e,t)=>{let{id:r,tagName:a,attributes:o,innerHTML:s}=e;return"LINK"===a?(0,n.createElement)("link",{key:r||t,id:r,rel:o.rel.value,href:o.href.value}):"STYLE"===a?(0,n.createElement)("style",{key:r||t,id:r},s):void 0})))}},64930:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(69307);const a=e=>{const t=(0,n.useRef)(),r=(0,n.useRef)(),a=(0,n.useRef)(e),o=(0,n.useCallback)((e=>{e.touches&&1===e.touches.length&&e.preventDefault()}),[]);return(0,n.useEffect)((()=>{a.current=e}),[e]),{onTouchStart:(0,n.useCallback)((e=>{e.target&&(e.target.addEventListener("touchend",o,{passive:!1}),r.current=e.target),t.current=setTimeout((()=>{a.current&&a.current(!0),t.current=null}),200)}),[]),onTouchEnd:(0,n.useCallback)((e=>{t.current?clearTimeout(t.current):(a.current&&a.current(!1),e.stopPropagation()),r.current&&r.current.removeEventListener("touchend",o)}),[])}}},3065:(e,t,r)=>{"use strict";async function n(e){const t=e.tagName.toLowerCase();if("img"===t){if(e.complete)return;await new Promise((t=>{e.addEventListener("load",t,{once:!0})}))}else if("video"===t||"audio"===t){if(e.HAVE_ENOUGH_DATA===e.readyState)return;await new Promise((t=>{e.addEventListener("canplaythrough",t,{once:!0}),e.addEventListener("load",t,{once:!0}),e.HAVE_NOTHING===e.readyState&&e.networkState!==e.NETWORK_LOADING&&e.load()}))}}r.d(t,{Z:()=>n})},89082:(e,t,r)=>{"use strict";r.d(t,{BM:()=>i,i1:()=>l});var n=r(92819);const a=new Set(["alert","status","log","marquee","timer"]);let o=[],s=!1;function i(e){if(s)return;const t=document.body.children;(0,n.forEach)(t,(t=>{t!==e&&function(e){const t=e.getAttribute("role");return!("SCRIPT"===e.tagName||e.hasAttribute("aria-hidden")||e.hasAttribute("aria-live")||a.has(t))}(t)&&(t.setAttribute("aria-hidden","true"),o.push(t))})),s=!0}function l(){s&&((0,n.forEach)(o,(e=>{e.removeAttribute("aria-hidden")})),o=[],s=!1)}},43520:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(94333),o=r(39630);function s(e){let{overlayClassName:t,children:r,className:s,focusOnMount:i,shouldCloseOnEsc:l=!0,onRequestClose:c,onKeyDown:u,modalRef:d}=e;const p=(0,a.useFocusOnMount)(i),m=(0,a.useConstrainedTabbing)(),h=(0,a.useFocusReturn)();return(0,n.createElement)("div",{className:t,onKeyDown:function(e){l&&e.keyCode===o.ESCAPE&&(e.stopPropagation(),c&&c(e)),e.target&&"button"===e.target.tagName.toLowerCase()&&e.keyCode===o.SPACE||u&&u(e)}},(0,n.createElement)("div",{className:s,ref:(0,a.useMergeRefs)([m,h,p,d])},r))}},7449:(e,t,r)=>{"use strict";r.d(t,{Z:()=>g});var n=r(82674),a=r.n(n),o=r(51806),s=r(94333),i=r(69307),l=r(74240),c=r(89082),u=r(43520);let d,p=0;const m=()=>{};class h extends i.Component{constructor(e){super(e),this.prepareDOM()}componentDidMount(){p++,1===p&&this.openFirstModal()}componentWillUnmount(){p--,0===p&&this.closeLastModal(),this.cleanDOM()}prepareDOM(){d||(d=document.createElement("div"),document.body.appendChild(d)),this.node=document.createElement("div"),d.appendChild(this.node),this.node.ontouchstart=m,this.node.ontouchend=m}cleanDOM(){d.removeChild(this.node)}openFirstModal(){c.BM(d)}closeLastModal(){c.i1()}render(){const{children:e,isOpened:t,shadowDOM:r,...n}=this.props;return(0,o.createElement)(l.Z,a()({},r,{mountOnElement:this.node}),t&&(0,o.createElement)(u.Z,n,e))}}h.defaultProps={shouldCloseOnEsc:!0,isOpened:!1,focusOnMount:!0};const g=(0,s.withInstanceId)(h)},75096:(e,t,r)=>{"use strict";r.d(t,{Z:()=>k});var n=r(82674),a=r.n(n),o=r(51806),s=r(11313),i=r(94333),l=r(9818),c=r(69307),u=r(65736),d=r(65235),p=r.n(d),m=r(92819),h=r(66512),g=r(69835),f=r(64930),b=r(68440),v=r(63408);const __=u.__;function k(e){let{id:t,slides:r,metadata:n,disabled:u}=e;const{setFullscreen:d,setEnded:k,setPlaying:y,setMuted:E,showSlide:w}=(0,l.useDispatch)("jetpack/story/player"),{playing:_,muted:C,currentSlideIndex:j,currentSlideEnded:S,ended:x,fullscreen:P,settings:T}=(0,l.useSelect)((e=>{const{getCurrentSlideIndex:r,getSettings:n,hasCurrentSlideEnded:a,hasEnded:o,isFullscreen:s,isMuted:i,isPlaying:l}=e("jetpack/story/player");return{playing:l(t),muted:i(t),currentSlideIndex:r(t),currentSlideEnded:a(t),ended:o(t),fullscreen:s(t),settings:n(t)}}),[t]),L=(0,c.useRef)(),[N,A]=(0,c.useState)(null),[R,{width:I,height:M}]=(0,i.useResizeObserver)(),[Z,B]=(0,c.useState)(T.defaultAspectRatio),D=(0,m.some)(r,(e=>(0,s.isBlobURL)(e.url))),F=e=>{w(t,e)},z=(0,c.useCallback)((()=>{u||P||T.playInFullscreen&&!_&&y(t,!0)}),[_,u,P]),{onTouchStart:O,onTouchEnd:U}=(0,f.Z)((e=>{y(t,!e)}),[]),H=(0,c.useCallback)((()=>{j>0&&F(j-1)}),[j]),V=(0,c.useCallback)((()=>{j<r.length-1?F(j+1):k(t)}),[j,r]),G=(0,c.useCallback)((()=>{d(t,!1)}),[]);let q,$;return(0,c.useEffect)((()=>{u&&_&&y(t,!1)}),[u,_]),(0,c.useEffect)((()=>{_&&S&&V()}),[_,S]),(0,c.useLayoutEffect)((()=>{if(!L.current)return;let e=Math.round(T.defaultAspectRatio*L.current.offsetHeight);P&&(e=Math.abs(1-e/I)<T.cropUpTo?I:e),A(e)}),[I,M,P]),(0,c.useLayoutEffect)((()=>{N&&L.current&&L.current.offsetHeight>0&&B(N/L.current.offsetHeight)}),[N]),q=P?[__("You are currently playing a story.","jetpack"),_?__("Press space to pause.","jetpack"):__("Press space to play.","jetpack",0),__("Press escape to exit.","jetpack")].join(" "):__("Play story","jetpack"),$=u?"presentation":P?"dialog":"button",(0,o.createElement)("div",{className:"wp-story-display-contents"},R,(0,o.createElement)("div",{role:$,"aria-label":q,tabIndex:P?-1:0,className:p()("wp-story-container",{"wp-story-with-controls":!u&&!P&&!T.playInFullscreen,"wp-story-fullscreen":P,"wp-story-ended":x,"wp-story-disabled":u,"wp-story-clickable":!u&&!P}),style:{maxWidth:`${N}px`},onClick:z,onTouchStart:O,onTouchEnd:U},(0,o.createElement)(g.h4,a()({},n,{fullscreen:P,onExitFullscreen:G})),(0,o.createElement)("div",{ref:L,className:"wp-story-wrapper"},r.map(((e,r)=>(0,o.createElement)(v.Z,{playerId:t,key:r,media:e,index:r,playing:!u&&_,uploading:D,settings:T,targetAspectRatio:Z})))),(0,o.createElement)(g.aV,{icon:h.Z,slideCount:r.length,showSlideCount:T.showSlideCount,ended:x,hasPrevious:j>0,onPreviousSlide:H,onNextSlide:V}),T.showProgressBar&&(0,o.createElement)(b.ZP,{playerId:t,slides:r,disabled:!P,onSlideSeek:F,maxBullets:P?T.maxBulletsFullscreen:T.maxBullets}),(0,o.createElement)(g.ZX,{playing:_,muted:C,onPlayPressed:()=>y(t,!_),onMutePressed:()=>E(t,!C),showMute:(e=>{const t=e<r.length?r[e]:null;return!!t&&("video"===t.type||(t.mime||"").startsWith("video/"))})(j)})),P&&(0,o.createElement)(g.Aq,{currentMedia:T.blurredBackground&&r.length>j&&r[j]}))}},68440:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>l});var n=r(51806),a=r(9818),o=r(92819),s=r(69835);const i=e=>{let{key:t,playerId:r,index:o,disabled:i,isSelected:l,onClick:c}=e;const u=(0,a.useSelect)((e=>e("jetpack/story/player").getCurrentSlideProgressPercentage(r)),[]);return(0,n.createElement)(s.gT,{key:t,index:o,progress:u,disabled:i,isSelected:l,onClick:c})},l=e=>{let{playerId:t,slides:r,disabled:l,onSlideSeek:c,maxBullets:u}=e;const{currentSlideIndex:d}=(0,a.useSelect)((e=>({currentSlideIndex:e("jetpack/story/player").getCurrentSlideIndex(t)})),[]),p=Math.min(r.length,u),m=Math.floor(p/2);let h,g=0,f=r.length-1;return r.length<=u||d<m?(h=d,f=p-1):d>=r.length-m?(h=d-r.length+p,g=r.length-p):(h=m,g=d-m,f=d+m),(0,n.createElement)("div",{className:"wp-story-pagination wp-story-pagination-bullets",role:"tablist"},g>0&&(0,n.createElement)(s.gT,{key:"bullet-0",index:g-1,progress:100,isEllipsis:!0}),(0,o.range)(1,p+1).map(((e,r)=>{const a=r+g;let o=null;if(a<d)o=100;else{if(!(a>d))return(0,n.createElement)(i,{playerId:t,key:`bullet-${r}`,index:a,disabled:l,isSelected:h===r,onClick:()=>c(a)});o=0}return(0,n.createElement)(s.gT,{key:`bullet-${r}`,index:a,progress:o,disabled:l,isSelected:h===r,onClick:()=>c(a)})})),f<r.length-1&&(0,n.createElement)(s.gT,{key:`bullet-${p+1}`,index:f+1,progress:0,isEllipsis:!0}))}},63408:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(82674),a=r.n(n),o=r(51806),s=r(9818),i=r(69307),l=r(65235),c=r.n(l),u=r(69835),d=r(3065);const p=e=>{let{playerId:t,media:r,index:n,playing:l,uploading:p,settings:m,targetAspectRatio:h}=e;const{currentSlideIndex:g,buffering:f}=(0,s.useSelect)((e=>({currentSlideIndex:e("jetpack/story/player").getCurrentSlideIndex(t),buffering:e("jetpack/story/player").isBuffering(t)})),[]),{slideReady:b}=(0,s.useDispatch)("jetpack/story/player"),v=n===g,k=(0,i.useRef)(null),[y,E]=(0,i.useState)(!1),[w,_]=(0,i.useState)(!0);return(0,i.useEffect)((()=>{if(v&&!w){const e=k.current&&k.current.src&&"video"===k.current.tagName.toLowerCase()?k.current:null;b(t,k.current,e?e.duration:m.imageTime)}}),[v,w]),(0,i.useEffect)((()=>{n<=g+(l?1:0)&&E(!0)}),[l,g]),(0,i.useLayoutEffect)((()=>{k.current&&(0,d.Z)(k.current).then((()=>{_(!1)}))}),[y,p]),(0,o.createElement)(o.Fragment,null,v&&(w||p||f)&&(0,o.createElement)("div",{className:c()("wp-story-slide","is-loading",{transparent:l&&f,"semi-transparent":p||!l&&f})},(0,o.createElement)(u.WB,null)),(0,o.createElement)("div",{role:"figure",className:"wp-story-slide",style:{display:v&&!w?"block":"none"},tabIndex:v?0:-1},y&&(0,o.createElement)(u.pU,a()({},r,{targetAspectRatio:h,cropUpTo:m.cropUpTo,index:n,mediaRef:k}))))}},29154:(e,t,r)=>{"use strict";function n(e,t){return{type:"SET_MUTED",value:t,playerId:e}}function a(e,t){return{type:"SET_PLAYING",value:t,playerId:e}}function o(e,t){return{type:"SHOW_SLIDE",index:t,playerId:e}}function s(e,t,r){return{type:"SLIDE_READY",mediaElement:t,duration:r,playerId:e}}function i(e,t){return{type:"SET_CURRENT_SLIDE_PROGRESS",value:t,playerId:e}}function l(e){return{type:"RESET_CURRENT_SLIDE_PROGRESS",playerId:e}}function c(e){return{type:"SET_CURRENT_SLIDE_ENDED",playerId:e}}function u(e,t){return{type:"SET_FULLSCREEN",playerId:e,fullscreen:t}}function d(e){return{type:"ENDED",playerId:e}}function p(e){return{type:"INIT",playerId:e,settings:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}}}function m(e,t){return{type:"SET_BUFFERING",value:t,playerId:e}}r.r(t),r.d(t,{init:()=>p,resetCurrentSlideProgress:()=>l,setBuffering:()=>m,setCurrentSlideEnded:()=>c,setCurrentSlideProgress:()=>i,setEnded:()=>d,setFullscreen:()=>u,setMuted:()=>n,setPlaying:()=>a,showSlide:()=>o,slideReady:()=>s})},17380:(e,t,r)=>{"use strict";r.d(t,{H2:()=>o,Qz:()=>a,XO:()=>n});const n={currentTime:0,duration:null,timeout:null,lastUpdate:null},a={progress:n,index:0,mediaElement:null,duration:null,ended:!1,ready:!1},o={slideCount:0,currentSlide:a,previousSlide:null,muted:!1,playing:!1,ended:!1,buffering:!1,fullscreen:!1,settings:{imageTime:5,startMuted:!1,playInFullscreen:!0,playOnNextSlide:!0,playOnLoad:!1,exitFullscreenOnEnd:!0,loadInFullscreen:!1,blurredBackground:!0,showSlideCount:!1,showProgressBar:!0,shadowDOM:{enabled:!0,mode:"open",globalStyleElements:'#jetpack-block-story-css, link[href*="jetpack/_inc/blocks/story/view.css"]'},defaultAspectRatio:.5625,cropUpTo:.2,volume:.8,maxBullets:7,maxBulletsFullscreen:14}}},78733:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(29154),a=r(20876);const o=e=>e&&e.src&&"video"===e.tagName.toLowerCase();function s(e,t){const{getState:r}=t,n=e.playerId,s=(0,a.isMuted)(r(),n),i=(0,a.isPlaying)(r(),n),l=(0,a.getCurrentMediaElement)(r(),n),c=(0,a.getPreviousSlideMediaElement)(r(),n),u=(0,a.getSettings)(r(),n);o(c)&&(c.currentTime=0,c.onwaiting=null,c.onplaying=null,c.pause()),o(l)&&(s!==l.muted&&(l.muted=s,s||(l.volume=u.volume)),i?l.play():l.pause())}function i(e,t){const{getState:r,dispatch:s}=t,l=e.playerId,c=(0,a.isCurrentSlideReady)(r(),l),u=(0,a.isPlaying)(r(),l),d=(0,a.getCurrentSlideProgress)(r(),l);if(clearTimeout(d.timeout),!u||!c)return void(d.lastUpdate&&s((0,n.setCurrentSlideProgress)(l,{...d,lastUpdate:null})));const p=(0,a.getCurrentMediaElement)(r(),l),m=(0,a.getCurrentMediaDuration)(r(),l),h=d.lastUpdate?Date.now()-d.lastUpdate:100,g=o(p)?p.currentTime:d.currentTime+h/1e3;if(g>=m){s((0,n.setCurrentSlideEnded)(l));const e=(0,a.getSlideCount)(r(),l);(0,a.getCurrentSlideIndex)(r(),l)===e-1&&s((0,n.setEnded)(l))}else s((0,n.setCurrentSlideProgress)(l,{timeout:setTimeout((()=>i(e,t)),100),lastUpdate:Date.now(),duration:m,currentTime:g}))}const l={SET_PLAYING:[i,s],SLIDE_READY:[function(e,t){const{getState:r,dispatch:s}=t,i=e.playerId,l=(0,a.getCurrentMediaElement)(r(),i);if(!o(l))return;const c=(0,a.getCurrentSlideProgress)(r(),i);0===l.currentTime&&c.currentTime>0&&(l.currentTime=c.currentTime),l.onwaiting=()=>s((0,n.setBuffering)(i,!0)),l.onplaying=()=>s((0,n.setBuffering)(i,!1))},i,s],SET_MUTED:s,SHOW_SLIDE:s}},31179:(e,t,r)=>{"use strict";var n=r(9818),a=r(29154),o=r(74787),s=r(13498),i=r(20876);const l=(0,n.registerStore)("jetpack/story/player",{actions:a,reducer:s.Z,selectors:i});(0,o.Z)(l)},74787:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(92819),a=r(24274),o=r.n(a),s=r(78733);function i(e){const t=[o()(s.Z)];let r=()=>{throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},a=[];const i={getState:e.getState,dispatch:function(){return r(...arguments)}};return a=t.map((e=>e(i))),r=(0,n.flowRight)(...a)(e.dispatch),e.dispatch=r,e}},13498:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(92819),a=r(17380);function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.H2,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_SLIDE":{const r=e.currentSlide===t.index+1;return{...e,currentSlide:{...a.Qz,index:t.index},previousSlide:e.currentSlide,playing:r?e.settings.playOnNextSlide:e.playing}}case"SLIDE_READY":return{...e,buffering:!1,currentSlide:{...e.currentSlide,mediaElement:t.mediaElement,duration:t.duration,ready:!0},previousSlide:null};case"SET_CURRENT_SLIDE_PROGRESS":return{...e,currentSlide:{...e.currentSlide,progress:t.value}};case"SET_CURRENT_SLIDE_ENDED":return{...e,currentSlide:{...e.currentSlide,ended:!0}};case"RESET_CURRENT_SLIDE_PROGRESS":return{...e,currentSlide:{...e.currentSlide,progress:{...a.XO}}};case"SET_MUTED":return{...e,muted:t.value};case"SET_PLAYING":{const r=t.value&&e.ended;return{...e,playing:t.value,buffering:!!t.value&&e.buffering,fullscreen:!e.playing&&t.value?e.settings.playInFullscreen:e.fullscreen,ended:!r&&e.ended,currentSlide:r?{...a.Qz,index:0}:e.currentSlide,previousSlide:r?null:e.previousSlide}}case"SET_BUFFERING":return{...e,buffering:t.value};case"SET_FULLSCREEN":return{...e,fullscreen:t.fullscreen,playing:!(e.fullscreen&&!t.fullscreen&&e.settings.playInFullscreen)&&e.playing};case"INIT":{const r=(0,n.merge)({},e.settings,t.settings);return{...e,settings:r,playing:r.playOnLoad,fullscreen:r.loadInFullscreen}}case"ENDED":return{...e,currentSlide:{...a.Qz,index:e.settings.slideCount-1,progress:{...a.XO,currentTime:100,duration:100}},ended:!0,playing:!1,fullscreen:!e.settings.exitFullscreenOnEnd}}return e}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.playerId?{...e,[t.playerId]:o(e[t.playerId],t)}:e}},20876:(e,t,r)=>{"use strict";function n(e,t){return!!e[t]}function a(e,t){return e[t].currentSlide.index}function o(e,t){return e[t].currentSlide.progress}function s(e,t){const r=e[t].currentSlide.progress.currentTime,n=e[t].currentSlide.progress.duration,a=Math.round(100*r/n);return a>=100?100:a}function i(e,t){return e[t].playing}function l(e,t){return e[t].muted}function c(e,t){return e[t].buffering}function u(e,t){return e[t].currentSlide.mediaElement}function d(e,t){return e[t].currentSlide.duration}function p(e,t){return e[t].currentSlide.ended}function m(e,t){return e[t].currentSlide.ready}function h(e,t){return e[t].previousSlide?.mediaElement}function g(e,t){return e[t].fullscreen}function f(e,t){return e[t].ended}function b(e,t){return e[t].settings}function v(e,t){return e[t].settings.slideCount}r.r(t),r.d(t,{getCurrentMediaDuration:()=>d,getCurrentMediaElement:()=>u,getCurrentSlideIndex:()=>a,getCurrentSlideProgress:()=>o,getCurrentSlideProgressPercentage:()=>s,getPreviousSlideMediaElement:()=>h,getSettings:()=>b,getSlideCount:()=>v,hasCurrentSlideEnded:()=>p,hasEnded:()=>f,isBuffering:()=>c,isCurrentSlideReady:()=>m,isFullscreen:()=>g,isMuted:()=>l,isPlayerReady:()=>n,isPlaying:()=>i})},29143:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(65235),o=r.n(a);const s=e=>{let{className:t}=e;return(0,n.createElement)("div",{className:o()("wp-story",t)})}},62924:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(65736);const __=n.__,a={subscribePlaceholder:{type:"string",default:__("Type your email…","jetpack")},showSubscribersTotal:{type:"boolean",default:!1},includeSocialFollowers:{type:"boolean",default:!0},buttonOnNewLine:{type:"boolean",default:!1},buttonWidth:{type:"string"},submitButtonText:{type:"string",default:__("Subscribe","jetpack")},emailFieldBackgroundColor:{type:"string"},customEmailFieldBackgroundColor:{type:"string"},emailFieldGradient:{type:"string"},customEmailFieldGradient:{type:"string"},buttonBackgroundColor:{type:"string"},customButtonBackgroundColor:{type:"string"},buttonGradient:{type:"string"},customButtonGradient:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"string"},borderRadius:{type:"number"},borderWeight:{type:"number"},borderColor:{type:"string"},customBorderColor:{type:"string"},padding:{type:"number"},spacing:{type:"number"},successMessage:{type:"string",default:__("Success! An email was just sent to confirm your subscription. Please find the email now and click 'Confirm Follow' to start subscribing.","jetpack")}}},58841:(e,t,r)=>{"use strict";r.d(t,{FP:()=>h,G0:()=>n,Gp:()=>a,HE:()=>d,K3:()=>i,S9:()=>o,Tr:()=>p,VF:()=>s,XJ:()=>l,bK:()=>u,pC:()=>m,tm:()=>g,xV:()=>c});const n=0,a=50,o=0,s=0,i=15,l=1,c=5,u=50,d=15,p=0,m=50,h=10,g="16px"},57532:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h});var n=r(51806),a=r(52947),o=r(74356),s=r(13419),i=r(52175),l=r(55609),c=r(69307),u=r(65736),d=r(34904),p=r(30429),m=r(58841);const __=u.__,_n=u._n;function h(e){let{buttonBackgroundColor:t,borderColor:r,buttonGradient:h,borderRadius:g,borderWeight:f,buttonOnNewLine:b,emailFieldBackgroundColor:v,fallbackButtonBackgroundColor:k,fallbackTextColor:y,fontSize:E,includeSocialFollowers:w,isGradientAvailable:_,padding:C,setAttributes:j,setBorderColor:S,setButtonBackgroundColor:x,setTextColor:P,showSubscribersTotal:T,spacing:L,subscriberCount:N,textColor:A,buttonWidth:R,successMessage:I}=e;const{isPublicizeEnabled:M}=(0,o.Nh)();return(0,n.createElement)(n.Fragment,null,N>0&&(0,n.createElement)(d.Z,null,(0,c.createInterpolateElement)((0,u.sprintf)(/* translators: %s is the number of subscribers. The \xA0 non-breaking space is to make sure the last two words are on the same line. */
_n("<span>%s reader</span> is subscribed.","<span>%s readers</span> are subscribed.",N,"jetpack"),(0,a.Z)(N)),{span:(0,n.createElement)("span",{style:{fontWeight:"bold"}})})),_&&(0,n.createElement)(i.__experimentalPanelColorGradientSettings,{title:__("Color","jetpack"),className:"wp-block-jetpack-subscriptions__backgroundpanel",settings:[{colorValue:t.color,onColorChange:x,gradientValue:h.gradientValue,onGradientChange:h.setGradient,label:__("Button Background","jetpack")},{colorValue:A.color,onColorChange:P,label:__("Button Text","jetpack")},{colorValue:r.color,onColorChange:S,label:__("Border","jetpack")}],initialOpen:!0},(0,n.createElement)(i.ContrastChecker,{fontSize:E.size,textColor:A.color,backgroundColor:v.color,fallbackButtonBackgroundColor:k,fallbackTextColor:y})),!_&&(0,n.createElement)(i.PanelColorSettings,{title:__("Background Colors","jetpack"),className:"wp-block-jetpack-subscriptions__backgroundpanel",colorSettings:[{value:t.color,onChange:x,label:__("Button Background Color","jetpack")},{value:A.color,onChange:P,label:__("Button Text Color","jetpack")},{value:r.color,onColorChange:S,label:__("Border Color","jetpack")}],initialOpen:!1},(0,n.createElement)(i.ContrastChecker,{fontSize:E.size,textColor:A.color,backgroundColor:v.color,fallbackButtonBackgroundColor:k,fallbackTextColor:y})),(0,n.createElement)(l.PanelBody,{title:__("Typography","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__textpanel"},(0,n.createElement)(i.FontSizePicker,{withSlider:!0,value:E.size,onChange:e=>{const t=e||m.tm;j({fontSize:t,customFontSize:t})},__nextHasNoMarginBottom:!0})),(0,n.createElement)(l.PanelBody,{title:__("Border","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__borderpanel"},(0,n.createElement)(l.RangeControl,{value:g,label:__("Border Radius","jetpack"),min:m.G0,max:m.Gp,initialPosition:m.S9,allowReset:!0,onChange:e=>j({borderRadius:e})}),(0,n.createElement)(l.RangeControl,{value:f,label:__("Border Weight","jetpack"),min:m.VF,max:m.K3,initialPosition:m.XJ,allowReset:!0,onChange:e=>j({borderWeight:e})})),(0,n.createElement)(l.PanelBody,{title:__("Spacing","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__spacingpanel"},(0,n.createElement)(l.RangeControl,{value:C,label:__("Space Inside","jetpack"),min:m.xV,max:m.bK,initialPosition:m.HE,allowReset:!0,onChange:e=>j({padding:e})}),(0,n.createElement)(l.RangeControl,{value:L,label:__("Space Between","jetpack"),min:m.Tr,max:m.pC,initialPosition:m.FP,allowReset:!0,onChange:e=>j({spacing:e})}),(0,n.createElement)(p.g,{width:R,onChange:e=>j({buttonWidth:e})})),(0,n.createElement)(l.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__displaypanel"},(0,n.createElement)(l.ToggleControl,{label:__("Show subscriber count","jetpack"),checked:T,onChange:()=>{j({showSubscribersTotal:!T})},help:()=>{if(!N||N<1)return __("This will remain hidden until there is at least one subscriber.","jetpack")}}),T&&M?(0,n.createElement)(l.ToggleControl,{disabled:!T,label:__("Include social followers in count","jetpack"),checked:w,onChange:()=>{j({includeSocialFollowers:!w})}}):null,(0,n.createElement)(l.ToggleControl,{label:__("Place button on new line","jetpack"),checked:b,onChange:()=>{j({buttonOnNewLine:!b})}}),!(0,s.Wp)()&&(0,n.createElement)(l.TextareaControl,{value:I,label:__("Success message","jetpack"),help:__("Edit the message displayed when a user subscribes.","jetpack"),onChange:e=>j({successMessage:e})})))}},2916:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(75623),a=r(45097),o=r(20121),s=r(76609),i=r(11689),l=r(79024),c=r(68600);const u=[r(39583).Z,c.Z,l.Z,i.Z,s.Z,o.Z,a.Z,n.Z]},75623:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(69307),o=r(65736),s=r(92819);const i={attributes:{subscribeButton:{type:"string",default:(0,o.__)("Subscribe","jetpack")},showSubscribersTotal:{type:"boolean",default:!1}},migrate:e=>({submitButtonText:e.subscribeButton,showSubscribersTotal:e.showSubscribersTotal}),isEligible:e=>!(!e.hasOwnProperty("subscribeButton")||!(0,s.isEmpty)(e.subscribeButton)),save:function(e){let{attributes:t}=e;return(0,n.createElement)(a.RawHTML,null,`[jetpack_subscription_form show_subscribers_total="${t.showSubscribersTotal}" show_only_email_and_button="true"]`)}}},45097:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(65736),a=r(65534);const __=n.__,o={attributes:{subscribePlaceholder:{type:"string",default:__("Email Address","jetpack")},subscribeButton:{type:"string",default:__("Subscribe","jetpack")},showSubscribersTotal:{type:"boolean",default:!1},submitButtonText:{type:"string",default:__("Subscribe","jetpack")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},submitButtonClasses:{type:"string"}},migrate:e=>({subscribePlaceholder:e.subscribePlaceholder,showSubscribersTotal:e.showSubscribersTotal,buttonOnNewLine:!0,submitButtonText:e.submitButtonText,buttonBackgroundColor:e.backgroundButtonColor?e.backgroundButtonColor:"primary",customButtonBackgroundColor:e.customBackgroundButtonColor,textColor:e.textButtonColor?e.textButtonColor:"background",customTextColor:e.customTextButtonColor}),save:a.Z}},65534:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(69307);function o(e){let{attributes:t}=e;const{showSubscribersTotal:r,submitButtonClasses:o,customBackgroundButtonColor:s,customTextButtonColor:i,submitButtonText:l}=t;return(0,n.createElement)(a.RawHTML,null,`[jetpack_subscription_form show_only_email_and_button="true" custom_background_button_color="${s}" custom_text_button_color="${i}" submit_button_text="${l}" submit_button_classes="${o}" show_subscribers_total="${r}" ]`)}},20084:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(65736);const __=n.__,a={subscribePlaceholder:{type:"string",default:__("Enter your email address","jetpack")},showSubscribersTotal:{type:"boolean",default:!1},buttonOnNewLine:{type:"boolean",default:!1},submitButtonText:{type:"string",default:__("Sign Up","jetpack")},emailFieldBackgroundColor:{type:"string"},customEmailFieldBackgroundColor:{type:"string"},emailFieldGradient:{type:"string"},customEmailFieldGradient:{type:"string"},buttonBackgroundColor:{type:"string"},customButtonBackgroundColor:{type:"string"},buttonGradient:{type:"string"},customButtonGradient:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},fontSize:{type:"number"},customFontSize:{type:"number"},borderRadius:{type:"number"},borderWeight:{type:"number"},borderColor:{type:"string"},customBorderColor:{type:"string"},padding:{type:"number"},spacing:{type:"number"}}},60293:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>h});var n=r(51806),a=r(52175),o=r(69307),s=r(65235),i=r.n(s),l=r(20084);const c=0,u=1,d=15,p=10,m=16;function h(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const{subscribePlaceholder:s,showSubscribersTotal:h,buttonOnNewLine:g,submitButtonText:f,emailFieldBackgroundColor:b,customEmailFieldBackgroundColor:v,emailFieldGradient:k,customEmailFieldGradient:y,buttonBackgroundColor:E,customButtonBackgroundColor:w,buttonGradient:_,customButtonGradient:C,textColor:j,customTextColor:S,fontSize:x,customFontSize:P,borderRadius:T,borderWeight:L,borderColor:N,customBorderColor:A,padding:R,spacing:I}=t,M=!!a.__experimentalGetGradientClass,Z=(0,a.getColorClassName)("color",j),B=(0,a.getFontSizeClass)(x),D=(0,a.getColorClassName)("border-color",N),F=(0,a.getColorClassName)("background-color",E),z=M?(0,a.__experimentalGetGradientClass)(_):void 0,O=(0,a.getColorClassName)("background-color",b),U=M?(0,a.__experimentalGetGradientClass)(k):void 0,H=i()(0===T?"no-border-radius":void 0,B,D),V=i()(H,j?"has-text-color":void 0,Z,E||_?"has-background":void 0,F,z),G=i()(H,O,U),q=!O&&y?y:v,$=!F&&C?C:w;let W=s,X=f;return"check-text-defaults"===r&&(W=s===l.Z.subscribePlaceholder.default?"Enter your email address":s,X=f===l.Z.submitButtonText.default?"Sign Up":f),(0,n.createElement)("div",{className:i()(e,"wp-block-jetpack-subscriptions__supports-newline",g?"wp-block-jetpack-subscriptions__use-newline":void 0,h?"wp-block-jetpack-subscriptions__show-subs":void 0)},(0,n.createElement)(o.RawHTML,null,`\n\t\t\t[jetpack_subscription_form\n\t\t\t\tsubscribe_placeholder="${W}"\n\t\t\t\tshow_subscribers_total="${h}"\n\t\t\t\tbutton_on_newline="${g}"\n\t\t\t\tsubmit_button_text="${X}"\n\t\t\t\tcustom_background_emailfield_color="${q}"\n\t\t\t\tcustom_background_button_color="${$}"\n\t\t\t\tcustom_text_button_color="${S}"\n\t\t\t\tcustom_font_size="${P||m}"\n\t\t\t\tcustom_border_radius="${T||c}"\n\t\t\t\tcustom_border_weight="${L||u}"\n\t\t\t\tcustom_border_color="${A}"\n\t\t\t\tcustom_padding="${R||d}"\n\t\t\t\tcustom_spacing="${I||p}"\n\t\t\t\tsubmit_button_classes="${V}"\n\t\t\t\temail_field_classes="${G}"\n\t\t\t\tshow_only_email_and_button="true"\n\t\t\t]`))}},20121:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(20084),a=r(60293);const o={attributes:n.Z,migrate:e=>{const{fontSize:t,customFontSize:r}=e;return{...e,fontSize:t?`${t}px`:void 0,customFontSize:r?`${r}px`:void 0}},save:e=>{let{className:t,attributes:r}=e;return(0,a.ZP)(t,r)}}},76609:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(20084),a=r(60293);const o={attributes:n.Z,migrate:e=>{const{fontSize:t,customFontSize:r}=e;return{...e,fontSize:t?`${t}px`:void 0,customFontSize:r?`${r}px`:void 0}},save:e=>{let{className:t,attributes:r}=e;return(0,a.ZP)(t,r,"check-text-defaults")}}},11689:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(20084),a=r(92167);const o={attributes:n.Z,migrate:e=>{const{fontSize:t,customFontSize:r}=e;return{...e,fontSize:t?`${t}px`:void 0,customFontSize:r?`${r}px`:void 0}},save:a.ZP}},92167:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>g});var n=r(51806),a=r(52175),o=r(69307),s=r(65235),i=r.n(s),l=r(92819),c=r(20084);const u=0,d=1,p=15,m=10,h=16;function g(e){let{className:t,attributes:r}=e;const{subscribePlaceholder:s,showSubscribersTotal:g,buttonOnNewLine:f,submitButtonText:b,emailFieldBackgroundColor:v,customEmailFieldBackgroundColor:k,emailFieldGradient:y,customEmailFieldGradient:E,buttonBackgroundColor:w,customButtonBackgroundColor:_,buttonGradient:C,customButtonGradient:j,textColor:S,customTextColor:x,fontSize:P,customFontSize:T,borderRadius:L,borderWeight:N,borderColor:A,customBorderColor:R,padding:I,spacing:M}=r,Z=!!a.__experimentalGetGradientClass,B=(0,a.getColorClassName)("color",S),D=(0,a.getFontSizeClass)(P),F=(0,a.getColorClassName)("border-color",A),z=(0,a.getColorClassName)("background-color",w),O=Z?(0,a.__experimentalGetGradientClass)(C):void 0,U=(0,a.getColorClassName)("background-color",v),H=Z?(0,a.__experimentalGetGradientClass)(y):void 0,V=i()(0===L?"no-border-radius":void 0,D,F),G=i()(V,S?"has-text-color":void 0,B,w||C?"has-background":void 0,z,O),q=i()(V,U,H),$=!U&&E?E:k,W=!z&&j?j:_,X={subscribe_placeholder:s!==c.Z.subscribePlaceholder.default?s:void 0,show_subscribers_total:g,button_on_newline:f,submit_button_text:b!==c.Z.submitButtonText.default?b:void 0,custom_background_emailfield_color:$,custom_background_button_color:W,custom_text_button_color:x,custom_font_size:T||h,custom_border_radius:L||u,custom_border_weight:N||d,custom_border_color:R,custom_padding:I||p,custom_spacing:M||m,submit_button_classes:G,email_field_classes:q,show_only_email_and_button:!0},J=(0,l.reduce)(X,((e,t,r)=>void 0===t?e:e+` ${r}="${t}"`),"");return(0,n.createElement)("div",{className:i()(t,"wp-block-jetpack-subscriptions__supports-newline",f?"wp-block-jetpack-subscriptions__use-newline":void 0,g?"wp-block-jetpack-subscriptions__show-subs":void 0)},(0,n.createElement)(o.RawHTML,null,`[jetpack_subscription_form${J}]`))}},29053:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(65736);const __=n.__,a={subscribePlaceholder:{type:"string",default:__("Email Address","jetpack")},showSubscribersTotal:{type:"boolean",default:!1},buttonOnNewLine:{type:"boolean",default:!1},buttonWidth:{type:"string"},submitButtonText:{type:"string",default:__("Subscribe","jetpack")},emailFieldBackgroundColor:{type:"string"},customEmailFieldBackgroundColor:{type:"string"},emailFieldGradient:{type:"string"},customEmailFieldGradient:{type:"string"},buttonBackgroundColor:{type:"string"},customButtonBackgroundColor:{type:"string"},buttonGradient:{type:"string"},customButtonGradient:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"string"},borderRadius:{type:"number"},borderWeight:{type:"number"},borderColor:{type:"string"},customBorderColor:{type:"string"},padding:{type:"number"},spacing:{type:"number"}}},79024:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(29053),a=r(62788);const o={attributes:n.Z,save:a.Z}},62788:(e,t,r)=>{"use strict";r.d(t,{Z:()=>g});var n=r(51806),a=r(52175),o=r(69307),s=r(65235),i=r.n(s),l=r(92819),c=r(29053);const u=0,d=1,p=15,m=10,h="16px";function g(e){let{className:t,attributes:r}=e;const{subscribePlaceholder:s,showSubscribersTotal:g,buttonOnNewLine:f,submitButtonText:b,emailFieldBackgroundColor:v,customEmailFieldBackgroundColor:k,emailFieldGradient:y,customEmailFieldGradient:E,buttonBackgroundColor:w,customButtonBackgroundColor:_,buttonGradient:C,customButtonGradient:j,textColor:S,customTextColor:x,fontSize:P,customFontSize:T,borderRadius:L,borderWeight:N,borderColor:A,customBorderColor:R,padding:I,spacing:M,buttonWidth:Z}=r,B=!!a.__experimentalGetGradientClass,D=(0,a.getColorClassName)("color",S),F=(0,a.getFontSizeClass)(P),z=(0,a.getColorClassName)("border-color",A),O=(0,a.getColorClassName)("background-color",w),U=B?(0,a.__experimentalGetGradientClass)(C):void 0,H=(0,a.getColorClassName)("background-color",v),V=B?(0,a.__experimentalGetGradientClass)(y):void 0,G=i()(0===L?"no-border-radius":void 0,F,z),q=i()(G,S?"has-text-color":void 0,D,w||C?"has-background":void 0,O,U),$=i()(G,H,V),W=!H&&E?E:k,X=!O&&j?j:_,J=Z||void 0,K={subscribe_placeholder:s!==c.Z.subscribePlaceholder.default?s:void 0,show_subscribers_total:g,button_on_newline:f,submit_button_text:b!==c.Z.submitButtonText.default?b:void 0,custom_background_emailfield_color:W,custom_background_button_color:X,custom_text_button_color:x,custom_font_size:T||h,custom_border_radius:L||u,custom_border_weight:N||d,custom_border_color:R,custom_button_width:J,custom_padding:I||p,custom_spacing:M||m,submit_button_classes:q,email_field_classes:$,show_only_email_and_button:!0},Y=(0,l.reduce)(K,((e,t,r)=>void 0===t?e:e+` ${r}="${t}"`),"");return(0,n.createElement)("div",{className:i()(t,"wp-block-jetpack-subscriptions__supports-newline",f?"wp-block-jetpack-subscriptions__use-newline":void 0,g?"wp-block-jetpack-subscriptions__show-subs":void 0)},(0,n.createElement)(o.RawHTML,null,`[jetpack_subscription_form${Y}]`))}},11109:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(65736);const __=n.__,a={subscribePlaceholder:{type:"string",default:__("Type your email…","jetpack")},showSubscribersTotal:{type:"boolean",default:!1},buttonOnNewLine:{type:"boolean",default:!1},buttonWidth:{type:"string"},submitButtonText:{type:"string",default:__("Subscribe","jetpack")},emailFieldBackgroundColor:{type:"string"},customEmailFieldBackgroundColor:{type:"string"},emailFieldGradient:{type:"string"},customEmailFieldGradient:{type:"string"},buttonBackgroundColor:{type:"string"},customButtonBackgroundColor:{type:"string"},buttonGradient:{type:"string"},customButtonGradient:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"string"},borderRadius:{type:"number"},borderWeight:{type:"number"},borderColor:{type:"string"},customBorderColor:{type:"string"},padding:{type:"number"},spacing:{type:"number"},successMessage:{type:"string",default:__("Success! An email was just sent to confirm your subscription. Please find the email now and click 'Confirm Follow' to start subscribing.","jetpack")}}},68600:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(11109),a=r(28135);const o={attributes:n.Z,save:a.ZP}},28135:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>f});var n=r(51806),a=r(52175),o=r(69307),s=r(65235),i=r.n(s),l=r(92819),c=r(11109);const u=0,d=1,p=15,m=10,h="16px",g=e=>e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;").replace(/\[/g,"&#091;").replace(/\]/g,"&#093;").replace(/\u00a0/g,"&nbsp;").replace(/\u200b/g,"&#x200b;");function f(e){let{className:t,attributes:r}=e;const{subscribePlaceholder:s,showSubscribersTotal:f,buttonOnNewLine:b,submitButtonText:v,emailFieldBackgroundColor:k,customEmailFieldBackgroundColor:y,emailFieldGradient:E,customEmailFieldGradient:w,buttonBackgroundColor:_,customButtonBackgroundColor:C,buttonGradient:j,customButtonGradient:S,textColor:x,customTextColor:P,fontSize:T,customFontSize:L,borderRadius:N,borderWeight:A,borderColor:R,customBorderColor:I,padding:M,spacing:Z,buttonWidth:B,successMessage:D}=r,F=!!a.__experimentalGetGradientClass,z=(0,a.getColorClassName)("color",x),O=(0,a.getFontSizeClass)(T),U=(0,a.getColorClassName)("border-color",R),H=(0,a.getColorClassName)("background-color",_),V=F?(0,a.__experimentalGetGradientClass)(j):void 0,G=(0,a.getColorClassName)("background-color",k),q=F?(0,a.__experimentalGetGradientClass)(E):void 0,$=i()(0===N?"no-border-radius":void 0,O,U),W=i()($,x?"has-text-color":void 0,z,_||j?"has-background":void 0,H,V),X=i()($,G,q),J=!G&&w?w:y,K=!H&&S?S:C,Y=B||void 0,Q={subscribe_placeholder:s!==c.Z.subscribePlaceholder.default?s:void 0,show_subscribers_total:f,button_on_newline:b,submit_button_text:v!==c.Z.submitButtonText.default?v:void 0,custom_background_emailfield_color:J,custom_background_button_color:K,custom_text_button_color:P,custom_font_size:L||h,custom_border_radius:N||u,custom_border_weight:A||d,custom_border_color:I,custom_button_width:Y,custom_padding:M||p,custom_spacing:Z||m,submit_button_classes:W,email_field_classes:X,show_only_email_and_button:!0,success_message:D},ee=(0,l.reduce)(Q,((e,t,r)=>void 0===t?e:e+` ${r}="${g(t.toString())}"`),"");return(0,n.createElement)("div",{className:i()(t,"wp-block-jetpack-subscriptions__supports-newline",b?"wp-block-jetpack-subscriptions__use-newline":void 0,f?"wp-block-jetpack-subscriptions__show-subs":void 0)},(0,n.createElement)(o.RawHTML,null,`[jetpack_subscription_form${ee}]`))}},84744:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(65736);const __=n.__,a={subscribePlaceholder:{type:"string",default:__("Type your email…","jetpack")},showSubscribersTotal:{type:"boolean",default:!1},buttonOnNewLine:{type:"boolean",default:!1},buttonWidth:{type:"string"},submitButtonText:{type:"string",default:__("Subscribe","jetpack")},emailFieldBackgroundColor:{type:"string"},customEmailFieldBackgroundColor:{type:"string"},emailFieldGradient:{type:"string"},customEmailFieldGradient:{type:"string"},buttonBackgroundColor:{type:"string"},customButtonBackgroundColor:{type:"string"},buttonGradient:{type:"string"},customButtonGradient:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"string"},borderRadius:{type:"number"},borderWeight:{type:"number"},borderColor:{type:"string"},customBorderColor:{type:"string"},padding:{type:"number"},spacing:{type:"number"},successMessage:{type:"string",default:__("Success! An email was just sent to confirm your subscription. Please find the email now and click 'Confirm Follow' to start subscribing.","jetpack")}}},39583:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(84744),a=r(24366);const o={attributes:n.Z,migrate:e=>({includeSocialFollowers:!0,...e}),save:a.Z}},24366:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(65235),o=r.n(a);function s(e){let{className:t,attributes:r}=e;const{showSubscribersTotal:a,buttonOnNewLine:s}=r;return(0,n.createElement)("div",{className:o()(t,"wp-block-jetpack-subscriptions__supports-newline",s?"wp-block-jetpack-subscriptions__use-newline":void 0,a?"wp-block-jetpack-subscriptions__show-subs":void 0)})}},99343:(e,t,r)=>{"use strict";r.d(t,{Z:()=>P});var n=r(51806),a=r(88275),o=r(13419),s=r(52175),i=r(55609),l=r(94333),c=r(9818),u=r(69307),d=r(65736),p=r(65235),m=r.n(p),h=r(92819),g=r(4554),f=r(19617),b=r(88966),v=r(7652),k=r(62924),y=r(58841),E=r(57532),w=r(68269),_=r(22750),C=r(30217);const _n=d._n,{getComputedStyle:j}=window,S=!!s.__experimentalUseGradient,x=(0,i.withFallbackStyles)(((e,t)=>{const{buttonBackgroundColor:r,textColor:n}=t,a=r&&r.color,o=n&&n.color,s=e.querySelector(".wp-block-jetpack-subscriptions__button");return{fallbackButtonBackgroundColor:a||!e?void 0:s&&j(s).backgroundColor,fallbackTextColor:o||!e?void 0:s&&j(s).color}}));const P=(0,l.compose)([(0,c.withSelect)((e=>{const t=e("jetpack/membership-products")?.getProducts()?.filter((e=>e.subscribe_as_site_subscriber));return{hasNewsletterPlans:0!==t?.length}})),(0,s.withColors)({emailFieldBackgroundColor:"backgroundColor"},{buttonBackgroundColor:"backgroundColor"},{textColor:"color"},"borderColor"),(0,s.withFontSizes)("fontSize"),x,e=>t=>(0,n.createElement)(a.ZP,null,(0,n.createElement)(e,t))])((function(e){const{className:t,attributes:r,setAttributes:a,emailFieldBackgroundColor:p,buttonBackgroundColor:j,setButtonBackgroundColor:x,fallbackButtonBackgroundColor:P,textColor:T,fallbackTextColor:L,setTextColor:N,borderColor:A,setBorderColor:R,fontSize:I,hasNewsletterPlans:M}=e,{isLoadingModules:Z,isChangingStatus:B,isModuleActive:D,changeStatus:F}=(0,o.el)(C.u2),z=(0,g.S)(k.Z,r);(0,h.isEqual)(z,r)||a(z);const{borderRadius:O,borderWeight:U,buttonWidth:H,includeSocialFollowers:V,padding:G,spacing:q,submitButtonText:$,subscribePlaceholder:W,showSubscribersTotal:X,buttonOnNewLine:J,successMessage:K}=z,{subscriberCount:Y,subscriberCountString:Q}=(0,c.useSelect)((e=>{if(!D)return{subscriberCounts:0,subscriberCountString:""};const{emailSubscribers:t,socialFollowers:r}=e(v.h).getSubscriberCounts();let n=t;return V&&(n+=r),{subscriberCount:n,subscriberCountString:(0,d.sprintf)(/* translators: Placeholder is a number of subscribers. */
_n("Join %s other subscriber","Join %s other subscribers",n,"jetpack"),n)}})),ee=S?(0,s.__experimentalUseGradient)({gradientAttribute:"emailFieldGradient",customGradientAttribute:"customEmailFieldGradient"}):{},te=S?(0,s.__experimentalUseGradient)({gradientAttribute:"buttonGradient",customGradientAttribute:"customButtonGradient"}):{},re={"no-border-radius":0===O,[I.class]:I.class,"has-text-color":T.color,[T.class]:T.class},ne={...re,"has-background":p.color||ee.gradientValue,[p.class]:!ee.gradientValue&&p.class,[ee.gradientClass]:ee.gradientClass},ae={...re,"has-background":j.color||te.gradientValue,[j.class]:!te.gradientValue&&j.class,[te.gradientClass]:te.gradientClass},oe=e=>e||y.FP,se={color:T.color,borderColor:A.color,borderRadius:O?O+"px":y.S9+"px",borderWidth:U?U+"px":y.XJ+"px",fontSize:I.size?I.size:y.tm,padding:(e=>{const t=e||y.HE;return t+"px "+Math.round(1.5*t)+"px "+t+"px "+Math.round(1.5*t)+"px"})(G)},ie={...se,...!p.color&&ee.gradientValue?{background:ee.gradientValue}:{backgroundColor:p.color}},le={...se,...!j.color&&te.gradientValue?{background:te.gradientValue}:{backgroundColor:j.color},...J?{marginTop:oe(q)+"px"}:{marginLeft:oe(q)+"px"},width:H},ce=(0,l.usePrevious)(j);return(0,u.useEffect)((()=>{D&&ce?.color===A?.color&&A?.color!==j?.color&&R(j.color)}),[j,ce,A,R,D]),Z?(0,n.createElement)(_.Z,null):D?(0,n.createElement)(n.Fragment,null,(0,n.createElement)(s.InspectorControls,null,(0,n.createElement)(E.Z,{buttonBackgroundColor:j,borderColor:A,buttonGradient:te,borderRadius:O,borderWeight:U,buttonOnNewLine:J,emailFieldBackgroundColor:p,fallbackButtonBackgroundColor:P,fallbackTextColor:L,fontSize:I,includeSocialFollowers:V,isGradientAvailable:S,padding:G,setAttributes:a,setBorderColor:R,setButtonBackgroundColor:x,setTextColor:N,showSubscribersTotal:X,spacing:q,subscriberCount:Y,textColor:T,buttonWidth:H,successMessage:K})),(0,f.M)()&&(0,n.createElement)(s.BlockControls,null,(0,n.createElement)(i.Toolbar,null,(0,n.createElement)(b.ZP,{context:"toolbar",hasNewsletterPlans:M}))),(0,n.createElement)("div",{className:m()(t,"wp-block-jetpack-subscriptions__container","wp-block-jetpack-subscriptions__supports-newline",J?"wp-block-jetpack-subscriptions__use-newline":void 0,X?"wp-block-jetpack-subscriptions__show-subs":void 0)},(0,n.createElement)("div",{className:"wp-block-jetpack-subscriptions__form",role:"form"},(0,n.createElement)(i.TextControl,{placeholder:W,disabled:!0,className:m()(ne,"wp-block-jetpack-subscriptions__textfield"),style:ie}),(0,n.createElement)(s.RichText,{className:m()(ae,"wp-block-jetpack-subscriptions__button","wp-block-button__link"),onChange:e=>a({submitButtonText:e}),style:le,value:$,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/strikethrough"]})),X&&(0,n.createElement)("div",{className:"wp-block-jetpack-subscriptions__subscount"},Q))):(0,n.createElement)(w.f,{changeStatus:F,isModuleActive:D,isLoading:B})}))},57780:(e,t,r)=>{"use strict";var n=r(13419),a=r(31985),o=r(30217);(0,a.Z)(o.u2,o.Xd),(0,n.o_)(o.u2,o.eC)},18005:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h});var n=r(51806),a=r(32054),o=r(13419),s=r(86989),i=r.n(s),l=r(55609),c=r(9818),u=r(69307),d=r(65736),p=r(79201),m=r(92770);const __=d.__;function h(e){let{isModalOpen:t,closeModal:r}=e;const[s,d]=(0,u.useState)(!1),[h,g]=(0,u.useState)(!1),[f,b]=(0,u.useState)(!1),v=(0,c.useSelect)((e=>e("core/editor").getCurrentPostId())),[k]=(0,a.Z)("sm"),{tracks:y}=(0,o.z$)();return(0,n.createElement)(n.Fragment,null,t&&(0,n.createElement)(l.Modal,{className:"jetpack-email-preview",onRequestClose:()=>{r(),d(!1)}},(0,n.createElement)(l.__experimentalHStack,{alignment:"topLeft"},(0,n.createElement)(l.__experimentalVStack,{className:"jetpack-email-preview__main",alignment:"topLeft"},(0,n.createElement)("h1",{className:"jetpack-email-preview__title"},__("Send a test email","jetpack")),f&&(0,n.createElement)(l.__experimentalHStack,{className:"jetpack-email-preview__email-sent"},f),s?(0,n.createElement)(l.__experimentalHStack,{className:"jetpack-email-preview__email-sent"},(0,n.createElement)(l.Icon,{className:"jetpack-email-preview__check",icon:p.Z,size:28}),(0,n.createElement)("div",{className:"jetpack-email-preview__sent_text"},__("Email sent successfully","jetpack"))):(0,n.createElement)(l.__experimentalHStack,null,(0,n.createElement)(l.TextControl,{className:"jetpack-email-preview__email",value:window?.Jetpack_Editor_Initial_State?.tracksUserData?.email,disabled:!0}),(0,n.createElement)(l.Button,{className:"jetpack-email-preview__button",variant:"primary",onClick:()=>{y.recordEvent("jetpack_send_email_preview",{post_id:v}),g(!0),i()({path:"/wpcom/v2/send-email-preview/",method:"POST",data:{id:v}}).then((()=>{g(!1),d(!0)})).catch((e=>{g(!1),e.message?b(e.message):b(__("Whoops, we have encountered an error. Please try again later.","jetpack"))}))},isBusy:h},__("Send","jetpack")))),!k&&(0,n.createElement)("img",{className:"jetpack-email-preview__img",src:m,alt:""}))))}},30217:(e,t,r)=>{"use strict";r.d(t,{Xd:()=>g,eC:()=>f,qv:()=>h,u2:()=>m});var n=r(51806),a=r(4981),o=r(55609),s=r(69307),i=r(65736),l=r(70355),c=r(62924),u=r(2916),d=r(99343),p=r(79914);const __=i.__,_x=i._x,m="subscriptions",h=(0,n.createElement)(o.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(o.Path,{d:"M20.9997 6.96749L21 7V17C21 18.1046 20.1046 19 19 19H5C3.89543 19 3 18.1046 3 17V7L3.00026 6.96747L3 6.96092C3 5.87793 3.87793 5 4.96092 5H19.0391C20.1221 5 21 5.87793 21 6.96092L20.9997 6.96749ZM19.3044 17.3967L13.9142 12.9048L13.2804 13.433C12.5387 14.0511 11.4613 14.0511 10.7196 13.433L10.0858 12.9048L4.69555 17.3967C4.77987 17.4615 4.88543 17.5 5 17.5H19C19.1146 17.5 19.2201 17.4615 19.3044 17.3967ZM19.5 15.6071V8.25L15.0858 11.9285L19.5 15.6071ZM4.5 8.25V15.6071L8.91424 11.9285L4.5 8.25ZM4.79543 6.54363C4.85788 6.51559 4.92712 6.5 5 6.5H19C19.0729 6.5 19.1421 6.51559 19.2046 6.54363L12.3201 12.2807C12.1347 12.4352 11.8653 12.4352 11.6799 12.2807L4.79543 6.54363Z",fill:(0,l.m)(),fillRule:"evenodd",clipRule:"evenodd"})),g={title:__("Subscribe","jetpack"),description:(0,n.createElement)(n.Fragment,null,(0,n.createElement)("p",null,__("Let readers subscribe to this blog's posts as a newsletter.","jetpack")),(0,n.createElement)("p",null,(0,s.createInterpolateElement)(__("Subscribers can read the posts in their email inbox or <ExternalLink>the Reader app</ExternalLink>.","jetpack"),{ExternalLink:(0,n.createElement)(o.ExternalLink,{href:"https://wordpress.com/read"})}))),icon:{src:h,foreground:(0,l.m)()},category:"grow",keywords:[_x("newsletter","block search term","jetpack"),_x("email","block search term","jetpack"),_x("follow","block search term","jetpack")],attributes:c.Z,edit:d.Z,styles:[{name:"compact",label:__("Compact","jetpack")},{name:"split",label:__("Split","jetpack"),isDefault:!0}],transforms:{from:[{type:"block",isMultiBlock:!1,blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:r}=e;return!!r?.raw&&"blog_subscription"===t},transform:e=>{let{instance:t}=e;return(0,a.createBlock)("jetpack/subscriptions",{showSubscribersTotal:t.raw.show_subscribers_total,submitButtonText:t.raw.subscribe_button,subscribePlaceholder:t.raw.subscribe_placeholder,successMessage:t.raw.success_message})}}]},example:{attributes:{}},supports:{spacing:{margin:!0,padding:!0},align:["wide","full"]},deprecated:u.Z},f={render:()=>(0,n.createElement)(n.Fragment,null,(0,n.createElement)(p.Z,null))}},79914:(e,t,r)=>{"use strict";r.d(t,{Z:()=>P});var n=r(51806),a=r(6895),o=r(13419),s=r(55609),i=r(37798),l=r(9818),c=r(72067),u=r(12238),d=r(69307),p=r(65736),m=r(61074),h=r(15381),g=r(40083),f=r(19617),b=r(52143),v=r(88966),k=r(7652),y=r(18005),E=r(30217);const __=p.__,w=e=>{let{children:t}=e;return(0,n.createElement)(s.Flex,{align:"center",gap:4,direction:"column",style:{alignItems:"center"}},(0,n.createElement)(s.FlexItem,null,__("In order to send posts to your subscribers, activate the Subscriptions feature.","jetpack")),(0,n.createElement)(s.FlexItem,null,t),(0,n.createElement)(s.FlexItem,null,(0,n.createElement)(s.ExternalLink,{href:"https://jetpack.com/support/subscriptions/"},__("Learn more about Subscriptions","jetpack"))))};function _(e){let{accessLevel:t,setPostMeta:r}=e;return(0,n.createElement)(c.PluginDocumentSettingPanel,{className:"jetpack-subscribe-newsletters-panel",title:__("Newsletter visibility","jetpack"),icon:(0,n.createElement)(o.Pm,null)},(0,n.createElement)(b.al,{accessLevel:t,setPostMeta:r}))}const C=()=>(0,n.createElement)(s.Notice,{status:"info",isDismissible:!1,className:"edit-post-post-visibility__notice"},__("You will be able to send newsletters once the site is published","jetpack")),j=()=>(0,n.createElement)(n.Fragment,null,(0,n.createElement)(c.PluginDocumentSettingPanel,{className:"jetpack-subscribe-newsletters-panel",title:__("Newsletter visibility","jetpack"),icon:(0,n.createElement)(o.Pm,null)},(0,n.createElement)(C,null)),(0,n.createElement)(c.PluginPrePublishPanel,{className:"jetpack-subscribe-newsletters-panel",title:__("Newsletter visibility","jetpack"),icon:(0,n.createElement)(o.Pm,null)},(0,n.createElement)(C,null)),(0,n.createElement)(c.PluginPostPublishPanel,{className:"jetpack-subscribe-newsletters-panel",title:__("Newsletter visibility","jetpack"),icon:(0,n.createElement)(o.Pm,null)},(0,n.createElement)(C,null)));function S(e){let{accessLevel:t,setPostMeta:r,isModuleActive:a,showPreviewModal:i}=e;const{tracks:d}=(0,o.z$)(),{changeStatus:p,isLoadingModules:m,isChangingStatus:h}=(0,o.el)(E.u2),f=(0,l.useSelect)((e=>{const t=e(u.store).getEditedPostAttribute("meta");return!a&&!m&&!t?.jetpack_post_was_ever_published}));return(0,n.createElement)(c.PluginPrePublishPanel,{initialOpen:!0,className:"jetpack-subscribe-newsletters-panel",title:(0,n.createElement)(n.Fragment,null,__("Newsletter:","jetpack"),t&&(0,n.createElement)("span",{className:"jetpack-subscribe-post-publish-panel__heading"},g.S[t].panelHeading)),icon:(0,n.createElement)(o.Pm,null)},a&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(b.IO,{accessLevel:t,setPostMeta:r}),(0,n.createElement)(s.Button,{variant:"secondary",onClick:i},__("Send test email","jetpack"))),f&&(0,n.createElement)(w,null,(0,n.createElement)(s.Button,{variant:"secondary",isBusy:h,disabled:a||h,onClick:()=>(d.recordEvent("jetpack_editor_subscriptions_enable"),p(!0))},h?__("Activating Subscriptions","jetpack"):__("Activate Subscriptions","jetpack",0))))}function x(e){let{accessLevel:t}=e;const{emailSubscribers:r,paidSubscribers:i}=(0,l.useSelect)((e=>e(k.h).getSubscriberCounts())),{postName:f,postPublishedLink:y}=(0,l.useSelect)((e=>{const t=e(u.store).getCurrentPost();return{postName:t.title,postPublishedLink:t.link}})),{isStripeConnected:E}=(0,l.useSelect)((e=>{const{getConnectUrl:t}=e(k.h);return{isStripeConnected:null===t()}})),w=(0,l.useSelect)((e=>e(u.store).getEditedPostVisibility())),_=(0,b.Y6)(t,r,i);let C=__("subscribers","jetpack");t===g.S.paid_subscribers.key&&(C=__("paid subscribers","jetpack"));const j=(0,p.sprintf)(/* translators: %1s is the post name,  %2s is the number of subscribers in numerical format, %3s Options are paid subscribers or subscribers */
__("<postPublishedLink>%1$s</postPublishedLink> was sent to <strong>%2$s %3$s</strong>.","jetpack"),f,_,C),S=(0,v.hc)(w,t);return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(c.PluginPostPublishPanel,{initialOpen:!0,title:(0,n.createElement)(n.Fragment,null,__("Newsletter:","jetpack"),t&&(0,n.createElement)("span",{className:"jetpack-subscribe-post-publish-panel__heading"},g.S[t].panelHeading)),className:"jetpack-subscribe-newsletters-panel jetpack-subscribe-post-publish-panel",icon:(0,n.createElement)(o.Pm,null)},!S&&(0,n.createElement)(s.Notice,{className:"jetpack-subscribe-post-publish-panel__notice",isDismissible:!1},(0,d.createInterpolateElement)(j,{strong:(0,n.createElement)("strong",null),postPublishedLink:(0,n.createElement)(b.rU,{href:y})}))),!E&&(0,n.createElement)(c.PluginPostPublishPanel,{initialOpen:!0,className:"jetpack-subscribe-newsletters-panel paid-newsletters-post-publish-panel",title:__("Set up a paid newsletter","jetpack"),icon:(0,n.createElement)(o.Pm,null)},(0,n.createElement)(s.PanelRow,null,(0,n.createElement)("p",null,__("Allow your subscribers to support your work. Connect a Stripe account to get started.","jetpack"))),(0,n.createElement)("div",{role:"link",className:"post-publish-panel__postpublish-buttons"},(0,n.createElement)(s.Button,{target:"_blank",variant:"secondary",href:(0,a.Z)("wpcom-earn",{site:(0,o.lQ)()})},__("Turn on paid newsletters","jetpack"),(0,n.createElement)(m.Z,{icon:h.Z,className:"paid-newsletters-post-publish-panel__external_icon"})))))}function P(){const{isModuleActive:e}=(0,o.el)(E.u2),t=(0,l.useSelect)((e=>e(u.store).getCurrentPostType()),[]),[,r]=(0,i.useEntityProp)("postType",t,"meta"),[a,s]=(0,d.useState)(!1),{tracks:c}=(0,o.z$)(),p=(0,f._)(t);return"post"!==t?null:(0,f.M)()?(0,o.M6)()||(0,o.aQ)()?(0,n.createElement)(j,null):(0,n.createElement)(n.Fragment,null,e&&(0,n.createElement)(_,{accessLevel:p,setPostMeta:r}),(0,n.createElement)(S,{accessLevel:p,setPostMeta:r,isModuleActive:e,showPreviewModal:()=>{c.recordEvent("jetpack_send_email_preview_prepublish_preview_button"),s(!0)}}),e&&(0,n.createElement)(x,{accessLevel:p,setPostMeta:r}),(0,n.createElement)(y.Z,{isModalOpen:a,closeModal:()=>s(!1)})):null}},68269:(e,t,r)=>{"use strict";r.d(t,{f:()=>c});var n=r(51806),a=r(13419),o=r(55609),s=r(69307),i=r(65736),l=r(30217);const __=i.__,c=e=>{let{changeStatus:t,isLoading:r,isModuleActive:i}=e;const{tracks:c}=(0,a.z$)();return(0,s.useEffect)((()=>{c.recordEvent("jetpack_editor_subscriptions_placeholder_view")}),[c]),(0,n.createElement)(o.Placeholder,{icon:l.qv,instructions:__("You'll need to activate the Subscriptions feature to use the Subcribe block.","jetpack"),label:l.Xd.title},(0,n.createElement)(o.Button,{disabled:i||r,isBusy:r,onClick:()=>(c.recordEvent("jetpack_editor_subscriptions_enable"),t(!0)),variant:"secondary"},r?__("Activating Subscriptions","jetpack"):__("Activate Subscriptions","jetpack",0)),(0,n.createElement)("div",{className:"membership-button__disclaimer"},(0,n.createElement)(o.ExternalLink,{href:"https://jetpack.com/support/subscriptions/"},__("Learn more about the Subscriptions feature.","jetpack"))))}},22750:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(22636),o=r(55609);const s=function(){return(0,n.createElement)(o.Placeholder,null,(0,n.createElement)(o.Flex,{gap:2,direction:"column",style:{width:"100%"}},(0,n.createElement)(o.Flex,{gap:4},(0,n.createElement)(o.FlexItem,null,(0,n.createElement)(a.Z,{width:30,height:30})),(0,n.createElement)(o.FlexBlock,null,(0,n.createElement)(a.Z,{width:"90%",height:30}))),(0,n.createElement)(o.Flex,{style:{marginTop:12}},(0,n.createElement)(o.FlexBlock,null,(0,n.createElement)(a.Z,{height:30,width:"60%"}))),(0,n.createElement)(o.Flex,{style:{marginTop:12}},(0,n.createElement)(o.FlexBlock,null,(0,n.createElement)(a.Z,{width:150,height:50}))),(0,n.createElement)(o.Flex,{style:{marginTop:18}},(0,n.createElement)(o.FlexBlock,null,(0,n.createElement)(a.Z,{width:"90%",height:16})))))}},3740:(e,t,r)=>{"use strict";r.d(t,{EU:()=>u,GP:()=>i,P0:()=>p,RA:()=>n,Z5:()=>s,hI:()=>o,q3:()=>a,sw:()=>c,xJ:()=>l,yw:()=>d});const n=["image"],a=4,o=20,s=20,i=2e3,l="circle",c="columns",u="rectangular",d="square",p=[{isDefault:!0,name:u},{name:l},{name:d},{name:c}]},73463:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(76476),a=r(43125),o=r(67525);const s=[r(99504),o,a,n]},1377:(e,t,r)=>{"use strict";r.d(t,{EU:()=>s,GP:()=>o,P0:()=>i,hI:()=>a,q3:()=>n});const n=4,a=20,o=2e3,s="rectangular",i=[{isDefault:!0,name:s},{name:"circle"},{name:"square"},{name:"columns"}]},56005:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(11313);function o(e){const{"aria-label":t,alt:r,height:o,id:s,link:i,linkTo:l,origUrl:c,url:u,width:d}=e;if((0,a.isBlobURL)(c))return null;let p;switch(l){case"media":p=u;break;case"attachment":p=i}const m=(0,n.createElement)("img",{alt:r,"aria-label":t,"data-height":o,"data-id":s,"data-link":i,"data-url":c,"data-width":d,src:u});return(0,n.createElement)("figure",{className:"tiled-gallery__item"},p?(0,n.createElement)("a",{href:p},m):m)}},76476:(e,t,r)=>{"use strict";r.r(t),r.d(t,{attributes:()=>a,save:()=>n.Z,support:()=>o});var n=r(91507);const a={align:{default:"center",type:"string"},className:{default:`is-style-${r(1377).EU}`,type:"string"},columns:{type:"number"},ids:{default:[],type:"array"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},caption:{selector:"figcaption",source:"html",type:"string"},height:{attribute:"data-height",selector:"img",source:"attribute",type:"number"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},linkTo:{default:"none",type:"string"}},o={align:["center","wide","full"],customClassName:!1,html:!1}},52235:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(51806);function a(e){let{children:t}=e;return(0,n.createElement)("div",{className:"tiled-gallery__col"},t)}},89754:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(51806);function a(e){let{children:t,galleryRef:r}=e;return(0,n.createElement)("div",{className:"tiled-gallery__gallery",ref:r},t)}},15645:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(51806),a=r(11313),o=r(69307),s=r(65736),i=r(69424),l=r(1377),c=r(56005),u=r(30791),d=r(79313);const __=s.__;class p extends o.Component{photonize(e){let{height:t,width:r,url:n}=e;if(!n)return;if((0,a.isBlobURL)(n)||/^https?:\/\/localhost/.test(n))return n;const o=n.split("?",1)[0],s=function(e){const{host:t}=new URL(e,window.location.href);return/\.files\.wordpress\.com$/.test(t)}(n)?h:i.Z,{layoutStyle:c}=this.props;if(m(c)&&r&&t){const e=Math.min(l.GP,r,t);return s(o,{resize:`${e},${e}`})}return s(o)}renderImage(e,t){const{images:r,linkTo:a,selectedImage:o}=this.props,i=(0,s.sprintf)(/* translators: %1$d is the order number of the image, %2$d is the total number of images. */
__("image %1$d of %2$d in gallery","jetpack"),t+1,r.length);return(0,n.createElement)(c.Z,{alt:e.alt,"aria-label":i,height:e.height,id:e.id,origUrl:e.url,isSelected:o===t,key:t,link:e.link,linkTo:a,url:this.photonize(e),width:e.width})}render(){const{align:e,children:t,className:r,columns:a,images:o,layoutStyle:s}=this.props,i=m(s)?d.Z:u.Z,l=this.props.images.map(this.renderImage,this);return(0,n.createElement)("div",{className:r},(0,n.createElement)(i,{align:e,columns:a,images:o,layoutStyle:s,renderedImages:l}),t)}}function m(e){return["circle","square"].includes(e)}function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},n=Object.assign(new URL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,a]of Object.entries(t))n.searchParams.set(r.hasOwnProperty(e)?r[e]:e,a);return n.toString()}},30791:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(90017),a=r.n(n),o=r(51806),s=r(69307),i=r(6209),l=r(52235),c=r(89754),u=r(36472),d=r(6817),p=r(6648);class m extends s.Component{constructor(){super(...arguments),a()(this,"gallery",(0,s.createRef)()),a()(this,"pendingRaf",null),a()(this,"ro",null),a()(this,"handleGalleryResize",(e=>{this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null),this.pendingRaf=requestAnimationFrame((()=>{for(const{contentRect:t,target:r}of e){const{width:e}=t;(0,p.W)(r).forEach((t=>(0,p.i)(t,e)))}}))}))}componentDidMount(){this.observeResize()}componentWillUnmount(){this.unobserveResize()}componentDidUpdate(e){(e.images!==this.props.images||e.align!==this.props.align||"columns"===this.props.layoutStyle&&e.columns!==this.props.columns)&&this.triggerResize()}triggerResize(){this.gallery.current&&this.handleGalleryResize([{target:this.gallery.current,contentRect:{width:this.gallery.current.clientWidth}}])}observeResize(){this.triggerResize(),this.ro=new i.Z(this.handleGalleryResize),this.gallery.current&&this.ro.observe(this.gallery.current)}unobserveResize(){this.ro&&(this.ro.disconnect(),this.ro=null),this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null)}render(){const{align:e,columns:t,images:r,layoutStyle:n,renderedImages:a}=this.props,s=(0,d.h9)(r),i="columns"===n?(0,d.sv)(s,t):(0,d.T9)(s,{isWide:["full","wide"].includes(e)});let p=0;return(0,o.createElement)(c.Z,{galleryRef:this.gallery},i.map(((e,t)=>(0,o.createElement)(u.Z,{key:t},e.map(((e,t)=>{const r=a.slice(p,p+e);return p+=e,(0,o.createElement)(l.Z,{key:t},r)}))))))}}},6817:(e,t,r)=>{"use strict";r.d(t,{T9:()=>j,h9:()=>a,sv:()=>s});var n=r(92819);function a(e){return(0,n.map)(e,o)}function o(e){let{height:t,width:r}=e;return t&&r?r/t:1}function s(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const r=(0,n.sum)(e)/t,a=[];let o=e,s=0;for(let e=0;e<t-1;e++){const t=(0,n.takeWhile)(o,(t=>{const n=s<=(e+1)*r;return n&&(s+=t),n})).length;a.push(t),o=(0,n.drop)(o,t)}return a.push(o.length),[a]}const i=S([2,1,2],5),l=x([P,P,T,P,P]),c=x([P,P,P,T,P,P,P]),u=S([3,1,3],5),d=x([T,P,P,T]),p=S([1,2,1],5),m=x([T,P,P,P]),h=S([1,3],3),g=x([P,P,P,T]),f=S([3,1],3),b=x([N(1.6),(0,n.overEvery)(L(.9),N(2)),(0,n.overEvery)(L(.9),N(2))]),v=S([1,2],3),k=S([1,1,1,1,1],1),y=S([1,1,1,1],1),E=S([1,1,1],3),w=x([(0,n.overEvery)(L(.9),N(2)),(0,n.overEvery)(L(.9),N(2)),N(1.6)]),_=S([2,1],3),C=x([function(e){return e>=2}]);function j(e){let{isWide:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=(e,a)=>{if(!a.length)return e;let o;o=a.length>15&&l(a)&&i(e)?[2,1,2]:a.length>15&&c(a)&&u(e)?[3,1,3]:5!==a.length&&d(a)&&p(e)?[1,2,1]:m(a)&&h(e)?[1,3]:g(a)&&f(e)?[3,1]:b(a)&&v(e)?[1,2]:t&&(5===a.length||10!==a.length&&a.length>6)&&k(e)&&(0,n.sum)((0,n.take)(a,5))<5?[1,1,1,1,1]:function(e,t){const r=(0,n.sum)((0,n.take)(t,4));return y(e)&&r<3.5&&t.length>5||r<7&&4===t.length}(e,a)?[1,1,1,1]:function(e,t,r){const a=(0,n.sum)((0,n.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&E(e)&&(a<2.5||a<5&&t.length>=3&&t[0]===t[2]||r)}(e,a,t)?[1,1,1]:w(a)&&_(e)?[2,1]:C(a)?[1]:a.length>3?[1,1]:Array(a.length).fill(1);const s=e.concat([o]),j=(0,n.sum)(o),S=a.slice(j);return r(s,S)};return r([],e)}function S(e,t){return r=>!(0,n.some)((0,n.takeRight)(r,t),(t=>(0,n.isEqual)(t,e)))}function x(e){return t=>t.length>=e.length&&(0,n.every)((0,n.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function P(e){return e>=1&&e<2}function T(e){return e<1}function L(e){return t=>t>=e}function N(e){return t=>t<e}},6648:(e,t,r)=>{"use strict";r.d(t,{W:()=>s,i:()=>o});var n=r(1377);function a(e,t){const r=(t-e.reduce(((e,t)=>e+t),0))/e.length;return e.map((e=>e+r))}function o(e,t){!function(e,t,r){let[o,s]=t;const d=1/o*(r-n.q3*(e.childElementCount-1)-s);!function(e,t){let{rawHeight:r,rowWidth:o}=t;const s=i(e),d=s.map((e=>(r-n.q3*(e.childElementCount-1))*c(e)[0])),p=a(d,o);s.forEach(((e,t)=>{const o=d[t],s=p[t];!function(e,t){let{colHeight:r,width:n,rawWidth:o}=t;const s=l(e).map((e=>o/u(e))),i=a(s,r);Array.from(e.children).forEach(((e,t)=>{const r=i[t];e.setAttribute("style",`height:${r}px;width:${n}px;`)}))}(e,{colHeight:r-n.q3*(e.childElementCount-1),width:s,rawWidth:o})}))}(e,{rawHeight:d,rowWidth:r-n.q3*(e.childElementCount-1)})}(e,function(e){const t=i(e).map(c).reduce(((e,t)=>{let[r,n]=e,[a,o]=t;return[r+a,n+o]}),[0,0]);return t}(e),t)}function s(e){return Array.from(e.querySelectorAll(".tiled-gallery__row"))}function i(e){return Array.from(e.querySelectorAll(".tiled-gallery__col"))}function l(e){return Array.from(e.querySelectorAll(".tiled-gallery__item > img, .tiled-gallery__item > a > img"))}function c(e){const t=l(e),r=t.length,n=1/t.map(u).reduce(((e,t)=>e+1/t),0);return[n,n*r||1]}function u(e){const t=parseInt(e.dataset.width,10),r=parseInt(e.dataset.height,10);return t&&!Number.isNaN(t)&&r&&!Number.isNaN(r)?t/r:1}},36472:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(65235),o=r.n(a);function s(e){let{children:t,className:r}=e;return(0,n.createElement)("div",{className:o()("tiled-gallery__row",r)},t)}},79313:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(92819),o=r(1377),s=r(52235),i=r(89754),l=r(36472);function c(e){let{columns:t,renderedImages:r}=e;const c=Math.min(o.hI,t),u=r.length%c;return(0,n.createElement)(i.Z,null,[...u?[(0,a.take)(r,u)]:[],...(0,a.chunk)((0,a.drop)(r,u),c)].map(((e,t)=>(0,n.createElement)(l.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,n.createElement)(s.Z,{key:t},e)))))))}},91507:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(81518),o=r(1377),s=r(15645);function i(e){return Math.min(3,e.images.length)}function l(e){let{attributes:t}=e;const{images:r}=t;if(!r.length)return null;const{align:l,className:c,columns:u=i(t),linkTo:d}=t;return(0,n.createElement)(s.Z,{align:l,className:c,columns:u,images:r,layoutStyle:(0,a.t)(o.P0,c),linkTo:d})}},86738:(e,t,r)=>{"use strict";r.d(t,{EU:()=>i,GP:()=>o,P0:()=>l,Z5:()=>a,hI:()=>n,xJ:()=>s});const n=20,a=20,o=2e3,s="circle",i="rectangular",l=[{isDefault:!0,name:i},{name:s},{name:"square"},{name:"columns"}]},64931:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(11313),o=r(65235),s=r.n(o);function i(e){const{alt:t,imageFilter:r,height:o,id:i,link:l,linkTo:c,origUrl:u,url:d,width:p}=e;if((0,a.isBlobURL)(u))return null;let m;switch(c){case"media":m=d;break;case"attachment":m=l}const h=(0,n.createElement)("img",{alt:t,"data-height":o,"data-id":i,"data-link":l,"data-url":u,"data-width":p,src:d});return(0,n.createElement)("figure",{className:s()("tiled-gallery__item",{[`filter__${r}`]:!!r})},m?(0,n.createElement)("a",{href:m},h):h)}},43125:(e,t,r)=>{"use strict";r.r(t),r.d(t,{attributes:()=>o,save:()=>a.Z,supports:()=>s});var n=r(86738),a=r(68405);const o={align:{default:"center",type:"string"},className:{default:`is-style-${n.EU}`,type:"string"},columns:{type:"number"},ids:{default:[],type:"array"},imageFilter:{type:"string"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},height:{attribute:"data-height",selector:"img",source:"attribute",type:"number"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},linkTo:{default:"none",type:"string"},roundedCorners:{type:"integer",default:0}},s={align:["center","wide","full"],customClassName:!1,html:!1}},85407:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(51806);function a(e){let{children:t}=e;return(0,n.createElement)("div",{className:"tiled-gallery__col"},t)}},40195:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(51806);function a(e){let{children:t,galleryRef:r}=e;return(0,n.createElement)("div",{className:"tiled-gallery__gallery",ref:r},t)}},73208:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(51806),a=r(69307),o=r(65736),s=r(65235),i=r.n(s),l=r(86738),c=r(64931),u=r(67091),d=r(84420),p=r(87178);const __=o.__;class m extends a.Component{renderImage(e,t){const{columns:r,imageFilter:a,images:s,linkTo:i,layoutStyle:l,selectedImage:d}=this.props,p=(0,o.sprintf)(/* translators: %1$d is the order number of the image, %2$d is the total number of images. */
__("image %1$d of %2$d in gallery","jetpack"),t+1,s.length),{src:m,srcSet:h}=(0,u.z)(e,{layoutStyle:l});return(0,n.createElement)(c.Z,{alt:e.alt,"aria-label":p,columns:r,height:e.height,id:e.id,imageFilter:a,isFirstItem:0===t,isLastItem:t+1===s.length,isSelected:d===t,key:t,link:e.link,linkTo:i,origUrl:e.url,showMovers:s.length>1,srcSet:h,url:m,width:e.width})}render(){const{align:e,children:t,className:r,columns:a,images:o,layoutStyle:s,roundedCorners:c}=this.props,m=(0,u.v)(s)?p.Z:d.Z,h=this.props.images.map(this.renderImage,this),g=s!==l.xJ?Math.min(c,l.Z5):0;return(0,n.createElement)("div",{className:i()(r,{[`has-rounded-corners-${g}`]:g>0})},(0,n.createElement)(m,{align:e,columns:a,images:o,layoutStyle:s,renderedImages:h}),t)}}},84420:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(90017),a=r.n(n),o=r(51806),s=r(69307),i=r(85407),l=r(40195),c=r(56243),u=r(12126);class d extends s.Component{constructor(){super(...arguments),a()(this,"gallery",(0,s.createRef)()),a()(this,"pendingRaf",null)}render(){const{align:e,columns:t,images:r,layoutStyle:n,renderedImages:a}=this.props,s=(0,u.h9)(r),d="columns"===n?(0,u.sv)(s,t):(0,u.T9)(s,{isWide:["full","wide"].includes(e)});let p=0;return(0,o.createElement)(l.Z,{galleryRef:this.gallery},d.map(((e,t)=>(0,o.createElement)(c.Z,{key:t},e.map(((e,t)=>{const r=a.slice(p,p+e);return p+=e,(0,o.createElement)(i.Z,{key:t},r)}))))))}}},12126:(e,t,r)=>{"use strict";r.d(t,{T9:()=>j,h9:()=>a,sv:()=>s});var n=r(92819);function a(e){return(0,n.map)(e,o)}function o(e){let{height:t,width:r}=e;return t&&r?r/t:1}function s(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const r=(0,n.sum)(e)/t,a=[];let o=e,s=0;for(let e=0;e<t-1;e++){const t=(0,n.takeWhile)(o,(t=>{const n=s<=(e+1)*r;return n&&(s+=t),n})).length;a.push(t),o=(0,n.drop)(o,t)}return a.push(o.length),[a]}const i=S([2,1,2],5),l=x([P,P,T,P,P]),c=x([P,P,P,T,P,P,P]),u=S([3,1,3],5),d=x([T,P,P,T]),p=S([1,2,1],5),m=x([T,P,P,P]),h=S([1,3],3),g=x([P,P,P,T]),f=S([3,1],3),b=x([N(1.6),(0,n.overEvery)(L(.9),N(2)),(0,n.overEvery)(L(.9),N(2))]),v=S([1,2],3),k=S([1,1,1,1,1],1),y=S([1,1,1,1],1),E=S([1,1,1],3),w=x([(0,n.overEvery)(L(.9),N(2)),(0,n.overEvery)(L(.9),N(2)),N(1.6)]),_=S([2,1],3),C=x([function(e){return e>=2}]);function j(e){let{isWide:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=(e,a)=>{if(!a.length)return e;let o;o=a.length>15&&l(a)&&i(e)?[2,1,2]:a.length>15&&c(a)&&u(e)?[3,1,3]:5!==a.length&&d(a)&&p(e)?[1,2,1]:m(a)&&h(e)?[1,3]:g(a)&&f(e)?[3,1]:b(a)&&v(e)?[1,2]:t&&(5===a.length||10!==a.length&&a.length>6)&&k(e)&&(0,n.sum)((0,n.take)(a,5))<5?[1,1,1,1,1]:function(e,t){const r=(0,n.sum)((0,n.take)(t,4));return y(e)&&r<3.5&&t.length>5||r<7&&4===t.length}(e,a)?[1,1,1,1]:function(e,t,r){const a=(0,n.sum)((0,n.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&E(e)&&(a<2.5||a<5&&t.length>=3&&t[0]===t[2]||r)}(e,a,t)?[1,1,1]:w(a)&&_(e)?[2,1]:C(a)?[1]:a.length>3?[1,1]:Array(a.length).fill(1);const s=e.concat([o]),j=(0,n.sum)(o),S=a.slice(j);return r(s,S)};return r([],e)}function S(e,t){return r=>!(0,n.some)((0,n.takeRight)(r,t),(t=>(0,n.isEqual)(t,e)))}function x(e){return t=>t.length>=e.length&&(0,n.every)((0,n.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function P(e){return e>=1&&e<2}function T(e){return e<1}function L(e){return t=>t>=e}function N(e){return t=>t<e}},56243:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(65235),o=r.n(a);function s(e){let{children:t,className:r}=e;return(0,n.createElement)("div",{className:o()("tiled-gallery__row",r)},t)}},87178:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(92819),o=r(86738),s=r(85407),i=r(40195),l=r(56243);function c(e){let{columns:t,renderedImages:r}=e;const c=Math.min(o.hI,t),u=r.length%c;return(0,n.createElement)(i.Z,null,[...u?[(0,a.take)(r,u)]:[],...(0,a.chunk)((0,a.drop)(r,u),c)].map(((e,t)=>(0,n.createElement)(l.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,n.createElement)(s.Z,{key:t},e)))))))}},68405:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(81518),o=r(86738),s=r(73208);function i(e){return Math.min(3,e.images.length)}function l(e){let{attributes:t}=e;const{imageFilter:r,images:l}=t;if(!l.length)return null;const{align:c,className:u,columns:d=i(t),linkTo:p,roundedCorners:m}=t;return(0,n.createElement)(s.Z,{align:c,className:u,columns:d,imageFilter:r,images:l,isSave:!0,layoutStyle:(0,a.t)(o.P0,u),linkTo:p,roundedCorners:m})}},67091:(e,t,r)=>{"use strict";r.d(t,{v:()=>i,z:()=>l});var n=r(11313),a=r(92819),o=r(69424),s=r(86738);function i(e){return["circle","square"].includes(e)}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.height||!e.url||!e.width)return{};if((0,n.isBlobURL)(e.url)||/^https?:\/\/localhost/.test(e.url)||/^https?:\/\/.*\.local\//.test(e.url))return{src:e.url};const r=e.url.split("?",1)[0],{height:l,width:u}=e,{layoutStyle:d}=t,p=function(e){const{host:t}=new URL(e,window.location.href);return/\.files\.wordpress\.com$/.test(t)}(r)||!0===function(){if("undefined"!=typeof jetpack_plan&&"vip"===jetpack_plan.data)return!0}()?c:o.Z;let m;if(i(d)&&u&&l){const e=Math.min(s.GP,u,l);m=p(r,{resize:`${e},${e}`})}else m=p(r);let h;if(i(d)){const e=Math.min(600,u,l),t=Math.min(s.GP,u,l);h=(0,a.range)(e,t,300).map((e=>{const t=p(r,{resize:`${e},${e}`,strip:"info"});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}else{const e=Math.min(600,u),t=Math.min(s.GP,u);h=(0,a.range)(e,t,300).map((e=>{const t=p(r,{strip:"info",width:e});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}return Object.assign({src:m},h&&{srcSet:h})}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},n=Object.assign(new URL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,a]of Object.entries(t))n.searchParams.set(r.hasOwnProperty(e)?r[e]:e,a);return n.toString()}},13993:(e,t,r)=>{"use strict";r.d(t,{EU:()=>i,GP:()=>o,P0:()=>l,Z5:()=>a,hI:()=>n,xJ:()=>s});const n=20,a=20,o=2e3,s="circle",i="rectangular",l=[{isDefault:!0,name:i},{name:s},{name:"square"},{name:"columns"}]},21959:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(11313),o=r(65235),s=r.n(o);function i(e){const{alt:t,imageFilter:r,height:o,id:i,link:l,linkTo:c,origUrl:u,url:d,width:p}=e;if((0,a.isBlobURL)(u))return null;let m;switch(c){case"media":m=d;break;case"attachment":m=l}const h=(0,n.createElement)("img",{alt:t,"data-height":o,"data-id":i,"data-link":l,"data-url":u,"data-width":p,src:d});return(0,n.createElement)("figure",{className:s()("tiled-gallery__item",{[`filter__${r}`]:!!r})},m?(0,n.createElement)("a",{href:m},h):h)}},67525:(e,t,r)=>{"use strict";r.r(t),r.d(t,{attributes:()=>o,migrate:()=>i,save:()=>a.Z,supports:()=>s});var n=r(13993),a=r(5826);const o={align:{default:"center",type:"string"},className:{default:`is-style-${n.EU}`,type:"string"},columns:{type:"number"},columnWidths:{default:[],type:"array"},ids:{default:[],type:"array"},imageFilter:{type:"string"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},height:{attribute:"data-height",selector:"img",source:"attribute",type:"number"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},linkTo:{default:"none",type:"string"},roundedCorners:{type:"integer",default:0}},s={align:["center","wide","full"],customClassName:!1,html:!1},i=e=>{const t=Math.pow(10,5);return{...e,columnWidths:e.columnWidths.map((e=>e.map((e=>Math.round(e*t)/t))))}}},17410:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(51806);function a(e){let{children:t,width:r}=e;const a=Math.pow(10,12),o=Math.round(r*a)/a,s=r?{flexBasis:`${o}%`}:void 0;return(0,n.createElement)("div",{className:"tiled-gallery__col",style:s},t)}},46349:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(51806);function a(e){let{children:t,galleryRef:r}=e;return(0,n.createElement)("div",{className:"tiled-gallery__gallery",ref:r},t)}},178:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(51806),a=r(69307),o=r(65736),s=r(65235),i=r.n(s),l=r(13993),c=r(21959),u=r(11197),d=r(47510),p=r(65662);const __=o.__;class m extends a.Component{renderImage(e,t){const{columns:r,imageFilter:a,images:s,isSave:i,linkTo:l,layoutStyle:d,onMoveBackward:p,onMoveForward:m,onRemoveImage:h,onSelectImage:g,selectedImage:f,setImageAttributes:b}=this.props,v=(0,o.sprintf)(/* translators: %1$d is the order number of the image, %2$d is the total number of images. */
__("image %1$d of %2$d in gallery","jetpack"),t+1,s.length),{src:k,srcSet:y}=(0,u.z)(e,{layoutStyle:d});return(0,n.createElement)(c.Z,{alt:e.alt,"aria-label":v,columns:r,height:e.height,id:e.id,imageFilter:a,isFirstItem:0===t,isLastItem:t+1===s.length,isSelected:f===t,key:t,link:e.link,linkTo:l,onMoveBackward:i?void 0:p(t),onMoveForward:i?void 0:m(t),onRemove:i?void 0:h(t),onSelect:i?void 0:g(t),origUrl:e.url,setAttributes:i?void 0:b(t),showMovers:s.length>1,srcSet:y,url:k,width:e.width})}render(){const{align:e,children:t,className:r,columns:a,images:o,layoutStyle:s,roundedCorners:c,onResize:m,isSave:h,columnWidths:g}=this.props,f=(0,u.v)(s)?p.Z:d.Z,b=this.props.images.map(this.renderImage,this),v=s!==l.xJ?Math.min(c,l.Z5):0;return(0,n.createElement)("div",{className:i()(r,{[`has-rounded-corners-${v}`]:v>0})},(0,n.createElement)(f,{align:e,columns:a,columnWidths:h?g:void 0,images:o,layoutStyle:s,renderedImages:b,onResize:h?void 0:m}),t)}}},47510:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(90017),a=r.n(n),o=r(51806),s=r(69307),i=r(17410),l=r(46349),c=r(78922),u=r(3453);class d extends s.Component{constructor(){super(...arguments),a()(this,"gallery",(0,s.createRef)()),a()(this,"pendingRaf",null)}render(){const{align:e,columns:t,images:r,layoutStyle:n,renderedImages:a,columnWidths:s}=this.props,d=(0,u.h9)(r),p="columns"===n?(0,u.sv)(d,t):(0,u.T9)(d,{isWide:["full","wide"].includes(e)});let m=0;return(0,o.createElement)(l.Z,{galleryRef:this.gallery},p.map(((e,t)=>(0,o.createElement)(c.Z,{key:t},e.map(((e,r)=>{const n=a.slice(m,m+e);return m+=e,(0,o.createElement)(i.Z,{key:r,width:s?.[t]?.[r]},n)}))))))}}},3453:(e,t,r)=>{"use strict";r.d(t,{T9:()=>j,h9:()=>a,sv:()=>s});var n=r(92819);function a(e){return(0,n.map)(e,o)}function o(e){let{height:t,width:r}=e;return t&&r?r/t:1}function s(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const r=(0,n.sum)(e)/t,a=[];let o=e,s=0;for(let e=0;e<t-1;e++){const t=(0,n.takeWhile)(o,(t=>{const n=s<=(e+1)*r;return n&&(s+=t),n})).length;a.push(t),o=(0,n.drop)(o,t)}return a.push(o.length),[a]}const i=S([2,1,2],5),l=x([P,P,T,P,P]),c=x([P,P,P,T,P,P,P]),u=S([3,1,3],5),d=x([T,P,P,T]),p=S([1,2,1],5),m=x([T,P,P,P]),h=S([1,3],3),g=x([P,P,P,T]),f=S([3,1],3),b=x([N(1.6),(0,n.overEvery)(L(.9),N(2)),(0,n.overEvery)(L(.9),N(2))]),v=S([1,2],3),k=S([1,1,1,1,1],1),y=S([1,1,1,1],1),E=S([1,1,1],3),w=x([(0,n.overEvery)(L(.9),N(2)),(0,n.overEvery)(L(.9),N(2)),N(1.6)]),_=S([2,1],3),C=x([function(e){return e>=2}]);function j(e){let{isWide:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=(e,a)=>{if(!a.length)return e;let o;o=a.length>15&&l(a)&&i(e)?[2,1,2]:a.length>15&&c(a)&&u(e)?[3,1,3]:5!==a.length&&d(a)&&p(e)?[1,2,1]:m(a)&&h(e)?[1,3]:g(a)&&f(e)?[3,1]:b(a)&&v(e)?[1,2]:t&&(5===a.length||10!==a.length&&a.length>6)&&k(e)&&(0,n.sum)((0,n.take)(a,5))<5?[1,1,1,1,1]:function(e,t){const r=(0,n.sum)((0,n.take)(t,4));return y(e)&&r<3.5&&t.length>5||r<7&&4===t.length}(e,a)?[1,1,1,1]:function(e,t,r){const a=(0,n.sum)((0,n.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&E(e)&&(a<2.5||a<5&&t.length>=3&&t[0]===t[2]||r)}(e,a,t)?[1,1,1]:w(a)&&_(e)?[2,1]:C(a)?[1]:a.length>3?[1,1]:Array(a.length).fill(1);const s=e.concat([o]),j=(0,n.sum)(o),S=a.slice(j);return r(s,S)};return r([],e)}function S(e,t){return r=>!(0,n.some)((0,n.takeRight)(r,t),(t=>(0,n.isEqual)(t,e)))}function x(e){return t=>t.length>=e.length&&(0,n.every)((0,n.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function P(e){return e>=1&&e<2}function T(e){return e<1}function L(e){return t=>t>=e}function N(e){return t=>t<e}},78922:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(65235),o=r.n(a);function s(e){let{children:t,className:r}=e;return(0,n.createElement)("div",{className:o()("tiled-gallery__row",r)},t)}},65662:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(92819),o=r(13993),s=r(17410),i=r(46349),l=r(78922);function c(e){let{columns:t,renderedImages:r}=e;const c=Math.min(o.hI,t),u=r.length%c;return(0,n.createElement)(i.Z,null,[...u?[(0,a.take)(r,u)]:[],...(0,a.chunk)((0,a.drop)(r,u),c)].map(((e,t)=>(0,n.createElement)(l.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,n.createElement)(s.Z,{key:t},e)))))))}},5826:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(81518),o=r(13993),s=r(178);function i(e){return Math.min(3,e.images.length)}function l(e){let{attributes:t}=e;const{imageFilter:r,images:l}=t;if(!l.length)return null;const{align:c,className:u,columns:d=i(t),linkTo:p,roundedCorners:m,columnWidths:h}=t;return(0,n.createElement)(s.Z,{align:c,className:u,columns:d,imageFilter:r,images:l,isSave:!0,layoutStyle:(0,a.t)(o.P0,u),linkTo:p,roundedCorners:m,columnWidths:h})}},11197:(e,t,r)=>{"use strict";r.d(t,{v:()=>i,z:()=>l});var n=r(11313),a=r(92819),o=r(69424),s=r(13993);function i(e){return["circle","square"].includes(e)}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.height||!e.url||!e.width)return{};if((0,n.isBlobURL)(e.url)||/^https?:\/\/localhost/.test(e.url)||/^https?:\/\/.*\.local\//.test(e.url))return{src:e.url};const r=e.url.split("?",1)[0],{height:l,width:u}=e,{layoutStyle:d}=t,p=function(e){const{host:t}=new URL(e,window.location.href);return/\.files\.wordpress\.com$/.test(t)}(r)||!0===function(){if("undefined"!=typeof jetpack_plan&&"vip"===jetpack_plan.data)return!0}()?c:o.Z;let m;if(i(d)&&u&&l){const e=Math.min(s.GP,u,l);m=p(r,{resize:`${e},${e}`})}else m=p(r);let h;if(i(d)){const e=Math.min(600,u,l),t=Math.min(s.GP,u,l);h=(0,a.range)(e,t,300).map((e=>{const t=p(r,{resize:`${e},${e}`,strip:"info"});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}else{const e=Math.min(600,u),t=Math.min(s.GP,u);h=(0,a.range)(e,t,300).map((e=>{const t=p(r,{strip:"info",width:e});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}return Object.assign({src:m},h&&{srcSet:h})}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},n=Object.assign(new URL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,a]of Object.entries(t))n.searchParams.set(r.hasOwnProperty(e)?r[e]:e,a);return n.toString()}},38698:(e,t,r)=>{"use strict";r.d(t,{EU:()=>l,GP:()=>s,P0:()=>c,Z5:()=>o,hI:()=>a,q3:()=>n,xJ:()=>i});const n=4,a=20,o=20,s=2e3,i="circle",l="rectangular",c=[{isDefault:!0,name:l},{name:i},{name:"square"},{name:"columns"}]},65597:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(11313),o=r(65235),s=r.n(o);function i(e){const{alt:t,imageFilter:r,height:o,id:i,link:l,linkTo:c,origUrl:u,url:d,width:p}=e;if((0,a.isBlobURL)(u))return null;let m;switch(c){case"media":m=d;break;case"attachment":m=l}const h=(0,n.createElement)("img",{alt:t,"data-height":o,"data-id":i,"data-link":l,"data-url":u,"data-width":p,src:d,"data-amp-layout":"responsive"});return(0,n.createElement)("figure",{className:s()("tiled-gallery__item",{[`filter__${r}`]:!!r})},m?(0,n.createElement)("a",{href:m},h):h)}},99504:(e,t,r)=>{"use strict";r.r(t),r.d(t,{attributes:()=>o,save:()=>a.Z,supports:()=>s});var n=r(38698),a=r(26225);const o={align:{default:"center",type:"string"},className:{default:`is-style-${n.EU}`,type:"string"},columns:{type:"number"},columnWidths:{default:[],type:"array"},ids:{default:[],type:"array"},imageFilter:{type:"string"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},height:{attribute:"data-height",selector:"img",source:"attribute",type:"number"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},imageCrop:{type:"boolean",default:!0},linkTo:{default:"none",type:"string"},roundedCorners:{type:"integer",default:0}},s={align:["center","wide","full"],color:{gradients:!0,text:!1},customClassName:!1,html:!1,spacing:{margin:!0,padding:!0},__experimentalHideChildBlockControls:!0}},63866:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(51806);function a(e){let{children:t,width:r}=e;const a=r?{flexBasis:`${r}%`}:void 0;return(0,n.createElement)("div",{className:"tiled-gallery__col",style:a},t)}},750:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(51806);function a(e){let{children:t,galleryRef:r}=e;return(0,n.createElement)("div",{className:"tiled-gallery__gallery",ref:r},t)}},9230:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(51806),a=r(69307),o=r(65736),s=r(65235),i=r.n(s),l=r(38698),c=r(65597),u=r(74713),d=r(82265),p=r(72264);const __=o.__;class m extends a.Component{renderImage(e,t){const{columns:r,imageFilter:a,images:s,isSave:i,linkTo:l,layoutStyle:d,onMoveBackward:p,onMoveForward:m,onRemoveImage:h,onSelectImage:g,selectedImage:f,setImageAttributes:b}=this.props,v=(0,o.sprintf)(/* translators: %1$d is the order number of the image, %2$d is the total number of images. */
__("image %1$d of %2$d in gallery","jetpack"),t+1,s.length),{src:k,srcSet:y}=(0,u.z)(e,{layoutStyle:d});return(0,n.createElement)(c.Z,{alt:e.alt,"aria-label":v,columns:r,height:e.height,id:e.id,imageFilter:a,isFirstItem:0===t,isLastItem:t+1===s.length,isSelected:f===t,key:t,link:e.link,linkTo:l,onMoveBackward:i?void 0:p(t),onMoveForward:i?void 0:m(t),onRemove:i?void 0:h(t),onSelect:i?void 0:g(t),origUrl:e.url,setAttributes:i?void 0:b(t),showMovers:s.length>1,srcSet:y,url:k,width:e.width})}render(){const{align:e,children:t,className:r,columns:a,images:o,layoutStyle:s,roundedCorners:c,onResize:m,style:h,isSave:g,columnWidths:f}=this.props,b=(0,u.v)(s)?p.Z:d.Z,v=this.props.images.map(this.renderImage,this),k=s!==l.xJ?Math.min(c,l.Z5):0;return(0,n.createElement)("div",{style:h,className:i()(r,{[`has-rounded-corners-${k}`]:k>0})},(0,n.createElement)(b,{align:e,columns:a,columnWidths:g?f:void 0,images:o,layoutStyle:s,renderedImages:v,onResize:g?void 0:m}),t)}}},82265:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(90017),a=r.n(n),o=r(51806),s=r(69307),i=r(6209),l=r(63866),c=r(750),u=r(2911),d=r(76981),p=r(76187);class m extends s.Component{constructor(){super(...arguments),a()(this,"gallery",(0,s.createRef)()),a()(this,"pendingRaf",null),a()(this,"ro",null),a()(this,"handleGalleryResize",(e=>{this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null),this.pendingRaf=requestAnimationFrame((()=>{for(const{contentRect:t,target:r}of e){const{width:e}=t,n=[];(0,p.W)(r).forEach((t=>{n.push((0,p.i)(t,e))})),void 0!==this.props.onResize&&this.props.onResize(n)}}))}))}componentDidMount(){this.observeResize()}componentWillUnmount(){this.unobserveResize()}componentDidUpdate(e){(e.images!==this.props.images||e.align!==this.props.align||"columns"===this.props.layoutStyle&&e.columns!==this.props.columns)&&this.triggerResize()}triggerResize(){this.gallery.current&&this.handleGalleryResize([{target:this.gallery.current,contentRect:{width:this.gallery.current.clientWidth}}])}observeResize(){this.triggerResize(),this.ro=new i.Z(this.handleGalleryResize),this.gallery.current&&this.ro.observe(this.gallery.current)}unobserveResize(){this.ro&&(this.ro.disconnect(),this.ro=null),this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null)}getColumnWidths(e,t,r){let n=0;return e.map((e=>e.map((e=>{const r=t.slice(n,n+e);return n+=e,r})))).map((e=>(0,p.i)(e,r)))}render(){const{align:e,columns:t,images:r,layoutStyle:n,renderedImages:a}=this.props,i=(0,d.h9)(r),p="columns"===n?(0,d.sv)(i,t):(0,d.T9)(i,{isWide:["full","wide"].includes(e)}),m=s.Platform.select({web:()=>this.props.columnWidths,native:()=>this.getColumnWidths(p,a,1e3)})();let h=0;return(0,o.createElement)(c.Z,{galleryRef:this.gallery},p.map(((e,t)=>(0,o.createElement)(u.Z,{key:t},e.map(((e,r)=>{const n=a.slice(h,h+e);return h+=e,(0,o.createElement)(l.Z,{key:r,width:m?.[t]?.[r]},n)}))))))}}},76981:(e,t,r)=>{"use strict";r.d(t,{T9:()=>j,h9:()=>a,sv:()=>s});var n=r(92819);function a(e){return(0,n.map)(e,o)}function o(e){let{height:t,width:r}=e;return t&&r?r/t:1}function s(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const r=(0,n.sum)(e)/t,a=[];let o=e,s=0;for(let e=0;e<t-1;e++){const t=(0,n.takeWhile)(o,(t=>{const n=s<=(e+1)*r;return n&&(s+=t),n})).length;a.push(t),o=(0,n.drop)(o,t)}return a.push(o.length),[a]}const i=S([2,1,2],5),l=x([P,P,T,P,P]),c=x([P,P,P,T,P,P,P]),u=S([3,1,3],5),d=x([T,P,P,T]),p=S([1,2,1],5),m=x([T,P,P,P]),h=S([1,3],3),g=x([P,P,P,T]),f=S([3,1],3),b=x([N(1.6),(0,n.overEvery)(L(.9),N(2)),(0,n.overEvery)(L(.9),N(2))]),v=S([1,2],3),k=S([1,1,1,1,1],1),y=S([1,1,1,1],1),E=S([1,1,1],3),w=x([(0,n.overEvery)(L(.9),N(2)),(0,n.overEvery)(L(.9),N(2)),N(1.6)]),_=S([2,1],3),C=x([function(e){return e>=2}]);function j(e){let{isWide:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=(e,a)=>{if(!a.length)return e;let o;o=a.length>15&&l(a)&&i(e)?[2,1,2]:a.length>15&&c(a)&&u(e)?[3,1,3]:5!==a.length&&d(a)&&p(e)?[1,2,1]:m(a)&&h(e)?[1,3]:g(a)&&f(e)?[3,1]:b(a)&&v(e)?[1,2]:t&&(5===a.length||10!==a.length&&a.length>6)&&k(e)&&(0,n.sum)((0,n.take)(a,5))<5?[1,1,1,1,1]:function(e,t){const r=(0,n.sum)((0,n.take)(t,4));return y(e)&&r<3.5&&t.length>5||r<7&&4===t.length}(e,a)?[1,1,1,1]:function(e,t,r){const a=(0,n.sum)((0,n.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&E(e)&&(a<2.5||a<5&&t.length>=3&&t[0]===t[2]||r)}(e,a,t)?[1,1,1]:w(a)&&_(e)?[2,1]:C(a)?[1]:a.length>3?[1,1]:Array(a.length).fill(1);const s=e.concat([o]),j=(0,n.sum)(o),S=a.slice(j);return r(s,S)};return r([],e)}function S(e,t){return r=>!(0,n.some)((0,n.takeRight)(r,t),(t=>(0,n.isEqual)(t,e)))}function x(e){return t=>t.length>=e.length&&(0,n.every)((0,n.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function P(e){return e>=1&&e<2}function T(e){return e<1}function L(e){return t=>t>=e}function N(e){return t=>t<e}},76187:(e,t,r)=>{"use strict";r.d(t,{W:()=>s,i:()=>o});var n=r(38698);function a(e,t){const r=(t-e.reduce(((e,t)=>e+t),0))/e.length;return e.map((e=>e+r))}function o(e,t){return function(e,t,r){let[o,s]=t;const d=1/o*(r-n.q3*(e.childElementCount-1)-s);return function(e,t){let{rawHeight:r,rowWidth:o}=t;const s=i(e),d=s.map((e=>(r-n.q3*(e.childElementCount-1))*c(e)[0])),p=a(d,o);s.forEach(((e,t)=>{const o=d[t],s=p[t];!function(e,t){let{colHeight:r,width:n,rawWidth:o}=t;const s=l(e).map((e=>o/u(e))),i=a(s,r);Array.from(e.children).forEach(((e,t)=>{const r=i[t];e.setAttribute("style",`height:${r}px;width:${n}px;`)}))}(e,{colHeight:r-n.q3*(e.childElementCount-1),width:s,rawWidth:o})}));return p.map((e=>parseFloat(e/o*100).toFixed(5)))}(e,{rawHeight:d,rowWidth:r-n.q3*(e.childElementCount-1)})}(e,function(e){const t=i(e).map(c).reduce(((e,t)=>{let[r,n]=e,[a,o]=t;return[r+a,n+o]}),[0,0]);return t}(e),t)}function s(e){return Array.from(e.querySelectorAll(".tiled-gallery__row"))}function i(e){return Array.from(e.querySelectorAll(".tiled-gallery__col"))}function l(e){return Array.from(e.querySelectorAll(".tiled-gallery__item > img, .tiled-gallery__item > a > img"))}function c(e){const t=l(e),r=t.length,n=1/t.map(u).reduce(((e,t)=>e+1/t),0);return[n,n*r||1]}function u(e){const t=parseInt(e.dataset.width,10),r=parseInt(e.dataset.height,10);return t&&!Number.isNaN(t)&&r&&!Number.isNaN(r)?t/r:1}},2911:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(65235),o=r.n(a);function s(e){let{children:t,className:r}=e;return(0,n.createElement)("div",{className:o()("tiled-gallery__row",r)},t)}},72264:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(92819),o=r(38698),s=r(63866),i=r(750),l=r(2911);function c(e){let{columns:t,renderedImages:r}=e;const c=Math.min(o.hI,t),u=r.length%c;return(0,n.createElement)(i.Z,null,[...u?[(0,a.take)(r,u)]:[],...(0,a.chunk)((0,a.drop)(r,u),c)].map(((e,t)=>(0,n.createElement)(l.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,n.createElement)(s.Z,{key:t},e)))))))}},26225:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(81518),o=r(38698),s=r(9230);function i(e){return Math.min(3,e.images.length)}function l(e){let{attributes:t}=e;const{imageFilter:r,images:l}=t;if(!l.length)return null;const{align:c,className:u,columns:d=i(t),linkTo:p,roundedCorners:m,columnWidths:h}=t;return(0,n.createElement)(s.Z,{align:c,className:u,columns:d,imageFilter:r,images:l,isSave:!0,layoutStyle:(0,a.t)(o.P0,u),linkTo:p,roundedCorners:m,columnWidths:h})}},74713:(e,t,r)=>{"use strict";r.d(t,{v:()=>c,z:()=>u});var n=r(13419),a=r(11313),o=r(92819),s=r(69424),i=r(99621),l=r(38698);function c(e){return["circle","square"].includes(e)}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.height||!e.width)return e.url?{src:e.url}:{};if((0,i.Z)())return{src:e.url};if((0,a.isBlobURL)(e.url)||/^https?:\/\/localhost/.test(e.url)||/^https?:\/\/.*\.local\//.test(e.url)||(0,n.Ug)()&&(0,n.M6)())return{src:e.url};const r=e.url.split("?",1)[0],{height:u,width:p}=e,{layoutStyle:m}=t,h=function(e){const{host:t}=new URL(e,window.location.href);return/\.files\.wordpress\.com$/.test(t)}(r)||!0===function(){if("undefined"!=typeof jetpack_plan&&"vip"===jetpack_plan.data)return!0}()?d:s.Z;let g;if(c(m)&&p&&u){const e=Math.min(l.GP,p,u);g=h(r,{resize:`${e},${e}`})}else g=h(r);let f;if(c(m)){const e=Math.min(600,p,u),t=Math.min(l.GP,p,u);f=(0,o.range)(e,t,300).map((e=>{const t=h(r,{resize:`${e},${e}`,strip:"info"});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}else{const e=Math.min(600,p),t=Math.min(l.GP,p);f=(0,o.range)(e,t,300).map((e=>{const t=h(r,{strip:"info",width:e});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}return Object.assign({src:g},f&&{srcSet:f})}function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},n=Object.assign(new URL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,a]of Object.entries(t))n.searchParams.set(r.hasOwnProperty(e)?r[e]:e,a);return n.toString()}},15078:(e,t,r)=>{"use strict";r.d(t,{F:()=>k,ZP:()=>w});var n=r(90017),a=r.n(n),o=r(51806),s=r(52175),i=r(55609),l=r(12238),c=r(69307),u=r(65736),d=r(92819),p=r(81518),m=r(94545),h=r(3740),g=r(38897),f=r(21340),b=r(99602);const __=u.__,v=[{value:"attachment",label:__("Attachment Page","jetpack")},{value:"media",label:__("Media File","jetpack")},{value:"none",label:__("None","jetpack")}];function k(e){return Math.min(3,e.images.length)}const y=e=>{const t=(0,d.pick)(e,[["alt"],["id"],["link"]]);return t.url=(0,d.get)(e,["sizes","large","url"])||(0,d.get)(e,["media_details","sizes","large","source_url"])||e.url,t};class E extends c.Component{constructor(){super(...arguments),a()(this,"state",{selectedImage:null,changed:void 0===this.props.attributes.columnWidths||0===this.props.attributes.columnWidths?.length}),a()(this,"addFiles",(e=>{const t=this.props.attributes.images||[],{noticeOperations:r}=this.props;(0,l.mediaUpload)({allowedTypes:h.RA,filesList:e,onFileChange:e=>{const r=e.map((e=>y(e)));this.setAttributes({images:t.concat(r)})},onError:r.createErrorNotice}),this.setState({changed:!0})})),a()(this,"onRemoveImage",(e=>()=>{const t=(0,d.filter)(this.props.attributes.images,((t,r)=>e!==r)),{columns:r}=this.props.attributes;this.setState({selectedImage:null,changed:!0}),this.setAttributes({images:t,columns:r?Math.min(t.length,r):r})})),a()(this,"onSelectImage",(e=>()=>{this.state.selectedImage!==e&&this.setState({selectedImage:e})})),a()(this,"onSelectImages",(e=>{const{columns:t}=this.props.attributes;this.setAttributes({columns:t?Math.min(e.length,t):t,images:e.map((e=>y(e)))}),this.setState({changed:!0})})),a()(this,"onMove",((e,t)=>{const r=[...this.props.attributes.images];r.splice(t,1,this.props.attributes.images[e]),r.splice(e,1,this.props.attributes.images[t]),this.setState({selectedImage:t,changed:!0}),this.setAttributes({images:r})})),a()(this,"onMoveForward",(e=>()=>{e!==this.props.attributes.images.length-1&&this.onMove(e,e+1)})),a()(this,"onMoveBackward",(e=>()=>{0!==e&&this.onMove(e,e-1)})),a()(this,"onResize",(e=>{this.state.changed&&this.setAttributes({columnWidths:e})})),a()(this,"setColumnsNumber",(e=>this.setAttributes({columns:e}))),a()(this,"setRoundedCorners",(e=>this.setAttributes({roundedCorners:e}))),a()(this,"setImageAttributes",(e=>t=>{const{attributes:{images:r}}=this.props;r[e]&&this.setAttributes({images:[...r.slice(0,e),{...r[e],...t},...r.slice(e+1)]})})),a()(this,"setLinkTo",(e=>this.setAttributes({linkTo:e}))),a()(this,"uploadFromFiles",(e=>this.addFiles(e.target.files)))}static getDerivedStateFromProps(e,t){return e.isSelected||null===t.selectedImage?null:{selectedImage:null}}setAttributes(e){if(e.ids)throw new Error('The "ids" attribute should not be changed directly. It is managed automatically when "images" attribute changes');e.images&&(e={...e,ids:e.images.map((e=>{let{id:t}=e;return parseInt(t,10)}))}),this.props.setAttributes(e)}render(){const{selectedImage:e}=this.state,{attributes:t,isSelected:r,className:n,noticeOperations:a,noticeUI:l,setAttributes:u}=this.props,{align:d,columns:y=k(t),imageFilter:E,images:w,linkTo:_,roundedCorners:C}=t,j=(0,o.createElement)(i.DropZone,{onFilesDrop:this.addFiles}),S=(0,o.createElement)(s.BlockControls,null,!!w.length&&(0,o.createElement)(c.Fragment,null,(0,o.createElement)(i.ToolbarGroup,null,(0,o.createElement)(i.ToolbarItem,null,(()=>(0,o.createElement)(s.MediaUpload,{onSelect:this.onSelectImages,allowedTypes:h.RA,multiple:!0,gallery:!0,value:w.map((e=>e.id)),render:e=>{let{open:t}=e;return(0,o.createElement)(m.Z,{label:__("Edit Gallery","jetpack"),onClick:t})}})))),(0,o.createElement)(g.Z,{value:E,onChange:e=>{u({imageFilter:e}),this.setState({selectedImage:null})}})));if(0===w.length)return(0,o.createElement)(c.Fragment,null,S,(0,o.createElement)(s.MediaPlaceholder,{icon:b.qv,className:n,labels:{title:__("Tiled Gallery","jetpack"),name:__("images","jetpack")},onSelect:this.onSelectImages,accept:"image/*",allowedTypes:h.RA,multiple:!0,notices:l,onError:a.createErrorNotice}));const x=(0,p.t)(h.P0,t.className);return(0,o.createElement)(c.Fragment,null,S,(0,o.createElement)(s.InspectorControls,null,(0,o.createElement)(i.PanelBody,{title:__("Tiled Gallery settings","jetpack")},["columns","circle","square"].includes(x)&&w.length>1&&(0,o.createElement)(i.RangeControl,{label:__("Columns","jetpack"),value:y,onChange:this.setColumnsNumber,min:1,max:Math.min(h.hI,w.length)}),x!==h.xJ&&(0,o.createElement)(i.RangeControl,{label:__("Rounded corners","jetpack"),value:C,onChange:this.setRoundedCorners,min:0,max:h.Z5}),(0,o.createElement)(i.SelectControl,{label:__("Link To","jetpack"),value:_,onChange:this.setLinkTo,options:v}))),l,(0,o.createElement)(f.Z,{align:d,className:n,columns:y,imageFilter:E,images:w,layoutStyle:x,linkTo:_,onMoveBackward:this.onMoveBackward,onMoveForward:this.onMoveForward,onRemoveImage:this.onRemoveImage,onSelectImage:this.onSelectImage,onResize:this.onResize,roundedCorners:C,selectedImage:r?e:null,setImageAttributes:this.setImageAttributes},j,r&&(0,o.createElement)("div",{className:"tiled-gallery__add-item"},(0,o.createElement)(i.FormFileUpload,{multiple:!0,className:"tiled-gallery__add-item-button",onChange:this.uploadFromFiles,accept:"image/*",icon:"insert"},__("Upload an image","jetpack")))))}}const w=(0,i.withNotices)(E)},47158:(e,t,r)=>{"use strict";var n=r(31985),a=r(99602);(0,n.Z)(a.u2,a.Xd)},38897:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(55609),o=r(65736);const __=o.__,_x=o._x,s=[{icon:(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,n.createElement)(a.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"})),title:_x("Original","image style","jetpack"),value:void 0},{icon:(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,n.createElement)(a.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm11 10h2V5h-4v2h2v8zm7-14H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"})),title:_x("Black and White","image style","jetpack"),value:"black-and-white"},{icon:(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,n.createElement)(a.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zm-4-4h-4v-2h2c1.1 0 2-.89 2-2V7c0-1.11-.9-2-2-2h-4v2h4v2h-2c-1.1 0-2 .89-2 2v4h6v-2z"})),title:_x("Sepia","image style","jetpack"),value:"sepia"},{icon:(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,n.createElement)(a.Path,{d:"M21 1H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm14 8v-1.5c0-.83-.67-1.5-1.5-1.5.83 0 1.5-.67 1.5-1.5V7c0-1.11-.9-2-2-2h-4v2h4v2h-2v2h2v2h-4v2h4c1.1 0 2-.89 2-2z"})),title:"1977",value:"1977"},{icon:(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,n.createElement)(a.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm12 10h2V5h-2v4h-2V5h-2v6h4v4zm6-14H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"})),title:_x("Clarendon","image style","jetpack"),value:"clarendon"},{icon:(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0z"}),(0,n.createElement)(a.Path,{d:"M21 1H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm14 8v-2c0-1.11-.9-2-2-2h-2V7h4V5h-6v6h4v2h-4v2h4c1.1 0 2-.89 2-2z"})),title:_x("Gingham","image style","jetpack"),value:"gingham"}],i=__("Pick an image filter","jetpack");function l(e){let{value:t,onChange:r}=e;return(0,n.createElement)(a.Dropdown,{placement:"bottom-start",className:"editor-block-switcher",contentClassName:"editor-block-switcher__popover",renderToggle:e=>{let{onToggle:t,isOpen:r}=e;return(0,n.createElement)(a.Toolbar,{controls:[{onClick:t,extraProps:{"aria-haspopup":"true","aria-expanded":r},title:i,tooltip:i,icon:(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,n.createElement)(a.Path,{d:"M19 10v9H4.98V5h9V3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-9h-2zm-2.94-2.06L17 10l.94-2.06L20 7l-2.06-.94L17 4l-.94 2.06L14 7zM12 8l-1.25 2.75L8 12l2.75 1.25L12 16l1.25-2.75L16 12l-2.75-1.25z"}))}]})},renderContent:e=>{let{onClose:o}=e;return(0,n.createElement)(a.NavigableMenu,{className:"tiled-gallery__filter-picker-menu"},s.map((e=>{let{icon:s,title:i,value:l}=e;return(0,n.createElement)(a.MenuItem,{className:t===l?"is-active":void 0,icon:s,isSelected:t===l,key:l||"original",onClick:(c=l,()=>{r(t===c?void 0:c),o()}),role:"menuitemcheckbox"},i);var c})))}})}},57773:(e,t,r)=>{"use strict";r.d(t,{Z:()=>f});var n=r(90017),a=r.n(n),o=r(51806),s=r(11313),i=r(55609),l=r(9818),c=r(69307),u=r(65736),d=r(39630),p=r(65235),m=r.n(p),h=r(62051);const __=u.__;class g extends c.Component{constructor(){super(...arguments),a()(this,"img",(0,c.createRef)()),a()(this,"onImageClick",(()=>{this.props.isSelected||this.props.onSelect()})),a()(this,"onImageKeyDown",(e=>{this.img.current===document.activeElement&&this.props.isSelected&&[d.BACKSPACE,d.DELETE].includes(e.keyCode)&&this.props.onRemove()}))}componentDidUpdate(){const{alt:e,height:t,image:r,link:n,url:a,width:o}=this.props;if(r){const s={};!e&&r.alt_text&&(s.alt=r.alt_text),!t&&r.media_details&&r.media_details.height&&(s.height=+r.media_details.height),!n&&r.link&&(s.link=r.link),!a&&r.source_url&&(s.url=r.source_url),!o&&r.media_details&&r.media_details.width&&(s.width=+r.media_details.width),Object.keys(s).length&&this.props.setAttributes(s)}}render(){const{"aria-label":e,alt:t,columns:r,height:n,id:a,imageFilter:l,isFirstItem:u,isLastItem:d,isSelected:p,link:g,linkTo:f,onMoveBackward:b,onMoveForward:v,onRemove:k,origUrl:y,showMovers:E,srcSet:w,url:_,width:C}=this.props;let j;switch(f){case"media":j=y;break;case"attachment":j=g}const S=(0,s.isBlobURL)(y),x=(0,o.createElement)(c.Fragment,null,(0,o.createElement)("img",{alt:t,"aria-label":e,"data-height":n,"data-id":a,"data-link":g,"data-url":y,"data-width":C,onClick:this.onImageClick,onKeyDown:this.onImageKeyDown,ref:this.img,src:S?void 0:_,srcSet:S?void 0:w,tabIndex:"0",style:S?{backgroundImage:`url(${y})`}:void 0}),S&&(0,o.createElement)(i.Spinner,null));return(0,o.createElement)("figure",{className:m()("tiled-gallery__item",{"is-selected":p,"is-transient":S,[`filter__${l}`]:!!l})},E&&(0,o.createElement)("div",{className:"tiled-gallery__item__move-menu"},(0,o.createElement)(i.Button,{icon:1===r?h.WO:h.KT,onClick:u?void 0:b,className:"tiled-gallery__item__move-backward",label:__("Move image backward","jetpack"),"aria-disabled":u,disabled:!p}),(0,o.createElement)(i.Button,{icon:1===r?h.xf:h.zz,onClick:d?void 0:v,className:"tiled-gallery__item__move-forward",label:__("Move image forward","jetpack"),"aria-disabled":d,disabled:!p})),(0,o.createElement)("div",{className:"tiled-gallery__item__inline-menu"},(0,o.createElement)(i.Button,{icon:h.xv,onClick:k,className:"tiled-gallery__item__remove",label:__("Remove image","jetpack"),disabled:!p})),j?(0,o.createElement)("a",null,x):x)}}const f=(0,l.withSelect)(((e,t)=>{const{getMedia:r}=e("core"),{id:n}=t;return{image:n?r(n):null}}))(g)},81921:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(11313),o=r(65235),s=r.n(o);function i(e){const{alt:t,imageFilter:r,height:o,id:i,link:l,linkTo:c,origUrl:u,url:d,width:p}=e;if((0,a.isBlobURL)(u))return null;let m;switch(c){case"media":m=u;break;case"attachment":m=l}const h=(0,n.createElement)("img",{alt:t,"data-height":o,"data-id":i,"data-link":l,"data-url":u,"data-width":p,src:d,"data-amp-layout":"responsive"});return(0,n.createElement)("figure",{className:s()("tiled-gallery__item",{[`filter__${r}`]:!!r})},m?(0,n.createElement)("a",{href:m},h):h)}},62051:(e,t,r)=>{"use strict";r.d(t,{KT:()=>o,WO:()=>l,xf:()=>i,xv:()=>c,zz:()=>s});var n=r(51806),a=r(55609);const o=(0,n.createElement)(a.SVG,{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(a.Path,{d:"M5 8.70002L10.6 14.4L12 12.9L7.8 8.70002L12 4.50002L10.6 3.00002L5 8.70002Z"})),s=(0,n.createElement)(a.SVG,{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(a.Path,{d:"M13 8.7L7.4 3L6 4.5L10.2 8.7L6 12.9L7.4 14.4L13 8.7Z"})),i=(0,n.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(a.Path,{d:"M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"})),l=(0,n.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(a.Path,{d:"M12,8l-6,6l1.41,1.41L12,10.83l4.59,4.58L18,14L12,8z"})),c=(0,n.createElement)(a.SVG,{width:"18",height:"18",viewBox:"-2 -2 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(a.Path,{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},99602:(e,t,r)=>{"use strict";r.d(t,{Xd:()=>P,qv:()=>x,u2:()=>S});var n=r(51806),a=r(13419),o=r(4981),s=r(55609),i=r(65736),l=r(92819),c=r(70355),u=r(5820),d=r(3740),p=r(73463),m=r(15078),h=r(10745),g=r(96606),f=r(85472),b=r(79009),v=r(10742),k=r(52642),y=r(41145);const __=i.__,_x=i._x,E={[d.EU]:_x("Tiled mosaic","Tiled gallery layout","jetpack"),[d.xJ]:_x("Circles","Tiled gallery layout","jetpack"),[d.sw]:_x("Tiled columns","Tiled gallery layout","jetpack"),[d.yw]:_x("Square tiles","Tiled gallery layout","jetpack")},w=d.P0.map((e=>({...e,label:E[e.name]})));function _(e){return(0,l.filter)(e,(e=>{let{id:t,url:r}=e;return t&&r}))}const C={align:{default:"center",type:"string"},className:{default:`is-style-${d.EU}`,type:"string"},columns:{type:"number"},columnWidths:{default:[],type:"array"},ids:{default:[],type:"array"},imageFilter:{type:"string"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},height:{attribute:"data-height",selector:"img",source:"attribute",type:"number"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},imageCrop:{type:"boolean",default:!0},linkTo:{default:"none",type:"string"},roundedCorners:{type:"integer",default:0}},j={align:"center",className:"is-style-rectangular",images:[{alt:"",link:"",url:g,width:160,height:95},{alt:"",link:"",url:f,width:160,height:107},{alt:"",link:"",url:b,width:304,height:203},{alt:"",link:"",url:v,width:312,height:207},{alt:"",link:"",url:k,width:152,height:101},{alt:"",link:"",url:y,width:152,height:105}],linkTo:"none"},S="tiled-gallery",x=(0,n.createElement)(s.SVG,{viewBox:"0 0 24 24",width:24,height:24},(0,n.createElement)(s.Path,{d:"M19 5v2h-4V5h4M9 5v6H5V5h4m10 8v6h-4v-6h4M9 17v2H5v-2h4M21 3h-8v6h8V3zM11 3H3v10h8V3zm10 8h-8v10h8V11zm-10 4H3v6h8v-6z"})),P={attributes:C,category:(0,u.Z)("media","layout"),description:__("Display multiple images in an elegantly organized tiled layout.","jetpack")+((0,a.Wp)()?"":" "+__("Serves images using Jetpack's fast global network of servers.","jetpack")),icon:{src:x,foreground:(0,c.m)()},keywords:[_x("columns","block search term","jetpack"),_x("images","block search term","jetpack"),_x("photos","block search term","jetpack"),_x("pictures","block search term","jetpack"),_x("square","block search term","jetpack"),_x("circle","block search term","jetpack"),_x("mosaic","block search term","jetpack")],styles:w,supports:{align:["center","wide","full"],color:{gradients:!0,text:!1},customClassName:!1,html:!1,spacing:{margin:!0,padding:!0},__experimentalHideChildBlockControls:!0},title:__("Tiled Gallery","jetpack"),transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],isMatch:e=>_(e).length>0,transform:e=>{const t=_(e);return(0,o.createBlock)(`jetpack/${S}`,{images:t.map((e=>{let{id:t,url:r,link:n,alt:a}=e;return{id:t,url:r,link:n,alt:a}})),ids:t.map((e=>{let{id:t}=e;return t}))})}},{type:"block",blocks:["core/gallery","jetpack/slideshow"],transform:e=>{let{images:t}=e;const r=_(t);return r.length>0?(0,o.createBlock)(`jetpack/${S}`,{images:r.map((e=>{let{id:t,url:r,link:n,alt:a}=e;return{id:t,url:r,link:n,alt:a}})),ids:r.map((e=>{let{id:t}=e;return t}))}):(0,o.createBlock)(`jetpack/${S}`)}}],to:[{type:"block",blocks:["core/gallery"],transform:e=>{let{images:t,ids:r,columns:n,linkTo:a}=e;return(0,o.createBlock)("core/gallery",{images:t,ids:r,columns:n,imageCrop:!0,linkTo:a})}},{type:"block",blocks:["core/image"],transform:e=>{let{align:t,images:r}=e;return r.length>0?r.map((e=>{let{id:r,url:n,alt:a}=e;return(0,o.createBlock)("core/image",{align:t,id:r,url:n,alt:a})})):(0,o.createBlock)("core/image")}}]},edit:m.ZP,save:h.Z,providesContext:{imageCrop:"imageCrop"},deprecated:p.Z,example:{attributes:j}}},24639:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(51806);function a(e){let{children:t,width:r}=e;const a=r?{flexBasis:`${r}%`}:void 0;return(0,n.createElement)("div",{className:"tiled-gallery__col",style:a},t)}},75084:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(51806);function a(e){let{children:t,galleryRef:r}=e;return(0,n.createElement)("div",{className:"tiled-gallery__gallery",ref:r},t)}},21340:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h});var n=r(51806),a=r(69307),o=r(65736),s=r(65235),i=r.n(s),l=r(3740),c=r(57773),u=r(81921),d=r(13369),p=r(46438),m=r(70216);const __=o.__;class h extends a.Component{renderImage(e,t){const{columns:r,imageFilter:a,images:s,isSave:i,linkTo:l,layoutStyle:p,onMoveBackward:m,onMoveForward:h,onRemoveImage:g,onSelectImage:f,selectedImage:b,setImageAttributes:v}=this.props,k=(0,o.sprintf)(/* translators: %1$d is the order number of the image, %2$d is the total number of images. */
__("image %1$d of %2$d in gallery","jetpack"),t+1,s.length),y=i?u.Z:c.Z,{src:E,srcSet:w}=(0,d.z)(e,{layoutStyle:p});return(0,n.createElement)(y,{alt:e.alt,"aria-label":k,columns:r,height:e.height,id:e.id,imageFilter:a,isFirstItem:0===t,isLastItem:t+1===s.length,isSelected:b===t,key:t,link:e.link,linkTo:l,onMoveBackward:i?void 0:m(t),onMoveForward:i?void 0:h(t),onRemove:i?void 0:g(t),onSelect:i?void 0:f(t),origUrl:e.url,setAttributes:i?void 0:v(t),showMovers:s.length>1,srcSet:w,url:E,width:e.width})}render(){const{align:e,children:t,className:r,columns:a,images:o,layoutStyle:s,roundedCorners:c,onResize:u,style:h,isSave:g,columnWidths:f}=this.props,b=(0,d.v)(s)?m.Z:p.Z,v=this.props.images.map(this.renderImage,this),k=s!==l.xJ?Math.min(c,l.Z5):0;return(0,n.createElement)("div",{style:h,className:i()(r,{[`has-rounded-corners-${k}`]:k>0})},(0,n.createElement)(b,{align:e,columns:a,columnWidths:g?f:void 0,images:o,layoutStyle:s,renderedImages:v,onResize:g?void 0:u}),t)}}},46438:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(90017),a=r.n(n),o=r(51806),s=r(69307),i=r(6209),l=r(24639),c=r(75084),u=r(51309),d=r(96001),p=r(99856);class m extends s.Component{constructor(){super(...arguments),a()(this,"gallery",(0,s.createRef)()),a()(this,"pendingRaf",null),a()(this,"ro",null),a()(this,"handleGalleryResize",(e=>{this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null),this.pendingRaf=requestAnimationFrame((()=>{for(const{contentRect:t,target:r}of e){const{width:e}=t,n=[];(0,p.W)(r).forEach((t=>{n.push((0,p.i)(t,e))})),void 0!==this.props.onResize&&this.props.onResize(n)}}))}))}componentDidMount(){this.observeResize()}componentWillUnmount(){this.unobserveResize()}componentDidUpdate(e){(e.images!==this.props.images||e.align!==this.props.align||"columns"===this.props.layoutStyle&&e.columns!==this.props.columns)&&this.triggerResize()}triggerResize(){this.gallery.current&&this.handleGalleryResize([{target:this.gallery.current,contentRect:{width:this.gallery.current.clientWidth}}])}observeResize(){this.triggerResize(),this.ro=new i.Z(this.handleGalleryResize),this.gallery.current&&this.ro.observe(this.gallery.current)}unobserveResize(){this.ro&&(this.ro.disconnect(),this.ro=null),this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null)}getColumnWidths(e,t,r){let n=0;return e.map((e=>e.map((e=>{const r=t.slice(n,n+e);return n+=e,r})))).map((e=>(0,p.i)(e,r)))}render(){const{align:e,columns:t,images:r,layoutStyle:n,renderedImages:a}=this.props,i=(0,d.h9)(r),p="columns"===n?(0,d.sv)(i,t):(0,d.T9)(i,{isWide:["full","wide"].includes(e)}),m=s.Platform.select({web:()=>this.props.columnWidths,native:()=>this.getColumnWidths(p,a,1e3)})();let h=0;return(0,o.createElement)(c.Z,{galleryRef:this.gallery},p.map(((e,t)=>(0,o.createElement)(u.Z,{key:t},e.map(((e,r)=>{const n=a.slice(h,h+e);return h+=e,(0,o.createElement)(l.Z,{key:r,width:m?.[t]?.[r]},n)}))))))}}},96001:(e,t,r)=>{"use strict";r.d(t,{T9:()=>j,h9:()=>a,sv:()=>s});var n=r(92819);function a(e){return(0,n.map)(e,o)}function o(e){let{height:t,width:r}=e;return t&&r?r/t:1}function s(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const r=(0,n.sum)(e)/t,a=[];let o=e,s=0;for(let e=0;e<t-1;e++){const t=(0,n.takeWhile)(o,(t=>{const n=s<=(e+1)*r;return n&&(s+=t),n})).length;a.push(t),o=(0,n.drop)(o,t)}return a.push(o.length),[a]}const i=S([2,1,2],5),l=x([P,P,T,P,P]),c=x([P,P,P,T,P,P,P]),u=S([3,1,3],5),d=x([T,P,P,T]),p=S([1,2,1],5),m=x([T,P,P,P]),h=S([1,3],3),g=x([P,P,P,T]),f=S([3,1],3),b=x([N(1.6),(0,n.overEvery)(L(.9),N(2)),(0,n.overEvery)(L(.9),N(2))]),v=S([1,2],3),k=S([1,1,1,1,1],1),y=S([1,1,1,1],1),E=S([1,1,1],3),w=x([(0,n.overEvery)(L(.9),N(2)),(0,n.overEvery)(L(.9),N(2)),N(1.6)]),_=S([2,1],3),C=x([function(e){return e>=2}]);function j(e){let{isWide:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=(e,a)=>{if(!a.length)return e;let o;o=a.length>15&&l(a)&&i(e)?[2,1,2]:a.length>15&&c(a)&&u(e)?[3,1,3]:5!==a.length&&d(a)&&p(e)?[1,2,1]:m(a)&&h(e)?[1,3]:g(a)&&f(e)?[3,1]:b(a)&&v(e)?[1,2]:t&&(5===a.length||10!==a.length&&a.length>6)&&k(e)&&(0,n.sum)((0,n.take)(a,5))<5?[1,1,1,1,1]:function(e,t){const r=(0,n.sum)((0,n.take)(t,4));return y(e)&&r<3.5&&t.length>5||r<7&&4===t.length}(e,a)?[1,1,1,1]:function(e,t,r){const a=(0,n.sum)((0,n.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&E(e)&&(a<2.5||a<5&&t.length>=3&&t[0]===t[2]||r)}(e,a,t)?[1,1,1]:w(a)&&_(e)?[2,1]:C(a)?[1]:a.length>3?[1,1]:Array(a.length).fill(1);const s=e.concat([o]),j=(0,n.sum)(o),S=a.slice(j);return r(s,S)};return r([],e)}function S(e,t){return r=>!(0,n.some)((0,n.takeRight)(r,t),(t=>(0,n.isEqual)(t,e)))}function x(e){return t=>t.length>=e.length&&(0,n.every)((0,n.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function P(e){return e>=1&&e<2}function T(e){return e<1}function L(e){return t=>t>=e}function N(e){return t=>t<e}},99856:(e,t,r)=>{"use strict";r.d(t,{W:()=>s,i:()=>o});var n=r(3740);function a(e,t){const r=(t-e.reduce(((e,t)=>e+t),0))/e.length;return e.map((e=>e+r))}function o(e,t){return function(e,t,r){let[o,s]=t;const d=1/o*(r-n.q3*(e.childElementCount-1)-s);return function(e,t){let{rawHeight:r,rowWidth:o}=t;const s=i(e),d=s.map((e=>(r-n.q3*(e.childElementCount-1))*c(e)[0])),p=a(d,o);s.forEach(((e,t)=>{const o=d[t],s=p[t];!function(e,t){let{colHeight:r,width:n,rawWidth:o}=t;const s=l(e).map((e=>o/u(e))),i=a(s,r);Array.from(e.children).forEach(((e,t)=>{const r=i[t];e.setAttribute("style",`height:${r}px;width:${n}px;`)}))}(e,{colHeight:r-n.q3*(e.childElementCount-1),width:s,rawWidth:o})}));return p.map((e=>parseFloat(e/o*100).toFixed(5)))}(e,{rawHeight:d,rowWidth:r-n.q3*(e.childElementCount-1)})}(e,function(e){const t=i(e).map(c).reduce(((e,t)=>{let[r,n]=e,[a,o]=t;return[r+a,n+o]}),[0,0]);return t}(e),t)}function s(e){return Array.from(e.querySelectorAll(".tiled-gallery__row"))}function i(e){return Array.from(e.querySelectorAll(".tiled-gallery__col"))}function l(e){return Array.from(e.querySelectorAll(".tiled-gallery__item > img, .tiled-gallery__item > a > img"))}function c(e){const t=l(e),r=t.length,n=1/t.map(u).reduce(((e,t)=>e+1/t),0);return[n,n*r||1]}function u(e){const t=parseInt(e.dataset.width,10),r=parseInt(e.dataset.height,10);return t&&!Number.isNaN(t)&&r&&!Number.isNaN(r)?t/r:1}},51309:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(65235),o=r.n(a);function s(e){let{children:t,className:r}=e;return(0,n.createElement)("div",{className:o()("tiled-gallery__row",r)},t)}},70216:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(92819),o=r(3740),s=r(24639),i=r(75084),l=r(51309);function c(e){let{columns:t,renderedImages:r}=e;const c=Math.min(o.hI,t),u=r.length%c;return(0,n.createElement)(i.Z,null,[...u?[(0,a.take)(r,u)]:[],...(0,a.chunk)((0,a.drop)(r,u),c)].map(((e,t)=>(0,n.createElement)(l.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,n.createElement)(s.Z,{key:t},e)))))))}},10745:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(81518),o=r(3740),s=r(15078),i=r(21340);function l(e){let{attributes:t}=e;const{imageFilter:r,images:l}=t;if(!l.length)return null;const{align:c,className:u,columns:d=(0,s.F)(t),linkTo:p,roundedCorners:m,columnWidths:h}=t;return(0,n.createElement)(i.Z,{align:c,className:u,columns:d,imageFilter:r,images:l,isSave:!0,layoutStyle:(0,a.t)(o.P0,u),linkTo:p,roundedCorners:m,columnWidths:h})}},13369:(e,t,r)=>{"use strict";r.d(t,{v:()=>c,z:()=>u});var n=r(13419),a=r(11313),o=r(92819),s=r(69424),i=r(99621),l=r(3740);function c(e){return["circle","square"].includes(e)}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.height||!e.width)return e.url?{src:e.url}:{};if((0,i.Z)())return{src:e.url};if((0,a.isBlobURL)(e.url)||/^https?:\/\/localhost/.test(e.url)||/^https?:\/\/.*\.local\//.test(e.url)||(0,n.Ug)()&&(0,n.M6)())return{src:e.url};const r=e.url.split("?",1)[0],{height:u,width:p}=e,{layoutStyle:m}=t,h=function(e){const{host:t}=new URL(e,window.location.href);return/\.files\.wordpress\.com$/.test(t)}(r)||!0===function(){if("undefined"!=typeof jetpack_plan&&"vip"===jetpack_plan.data)return!0}()?d:s.Z;let g;if(c(m)&&p&&u){const e=Math.min(l.GP,p,u);g=h(r,{resize:`${e},${e}`})}else g=h(r);let f;if(c(m)){const e=Math.min(600,p,u),t=Math.min(l.GP,p,u);f=(0,o.range)(e,t,300).map((e=>{const t=h(r,{resize:`${e},${e}`,strip:"info"});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}else{const e=Math.min(600,p),t=Math.min(l.GP,p);f=(0,o.range)(e,t,300).map((e=>{const t=h(r,{strip:"info",width:e});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}return Object.assign({src:g},f&&{srcSet:f})}function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},n=Object.assign(new URL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,a]of Object.entries(t))n.searchParams.set(r.hasOwnProperty(e)?r[e]:e,a);return n.toString()}},97587:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={url:{type:"string"}}},44814:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(51806),a=r(52175),o=r(55609),s=r(69307),i=r(65736),l=r(75365),c=r(39630);const __=i.__,u=e=>{let{tockUrl:t,setEditedUrl:r,setUrl:a,cancel:i}=e;const u=(0,s.useRef)(!0),d=(0,s.useRef)(!1),p=e=>{a(),d.current=!0,e()};return(0,n.createElement)(o.ToolbarGroup,null,(0,n.createElement)(o.Dropdown,{popoverProps:{variant:"toolbar"},onClose:()=>d.current?d.current=!1:i(),placement:"bottom-start",renderToggle:e=>{let{isOpen:r,onToggle:a}=e;return!u.current||r||t||(u.current=!1,a()),(0,n.createElement)(o.ToolbarButton,{className:"components-toolbar__control",label:__("Edit Tock business name","jetpack"),onClick:()=>{a(),r&&i()}},__("Edit","jetpack"))},renderContent:e=>{let{onClose:a}=e;return(0,n.createElement)(o.BaseControl,{className:"jetpack-tock-url-settings",help:(0,s.createInterpolateElement)(__("The Tock business can be found in the URL of your public Tock page. For example: www.exploretock.com/<b>myname</b>","jetpack"),{b:(0,n.createElement)("strong",null)})},(0,n.createElement)("div",{className:"jetpack-tock-url-input-wrapper"},(0,n.createElement)(o.TextControl,{placeholder:__("Add Tock business name","jetpack"),onChange:r,value:t,onKeyDownCapture:e=>((e,r)=>{const{keyCode:n}=e;n===c.ENTER&&""!==t&&(e.preventDefault(),p(r)),n===c.ESCAPE&&(e.preventDefault(),i(),r())})(e,a),className:"jetpack-tock-url-input"}),(0,n.createElement)("div",{className:"jetpack-tock-url-input-action"},(0,n.createElement)(o.Button,{type:"submit",label:__("Submit","jetpack"),icon:l.Z,className:"jetpack-tock-url-input-submit",onClick:()=>p(a)}))))}}))},d=e=>{let{url:t,popoverAnchor:r}=e;const a=`\n\t\t<div id="Tock_widget_container" data-tock-display-mode="Button" data-tock-color-mode="Blue" data-tock-locale="en-us" data-tock-timezone="America/New_York" style="display:inline-block;"></div>\n\t\t<script src="https://www.exploretock.com/tock.js" async><\/script>\n\t\t<script>\n\t\t\t!function(t,o){if(!t.tock){var e=t.tock=function(){e.callMethod?\n\t\t\t  e.callMethod.apply(e,arguments):e.queue.push(arguments)};t._tock||(t._tock=e),\n\t\t\t  e.push=e,e.loaded=!0,e.version='1.0',e.queue=[];}}(window,document);\n\t\t\ttock('init', '${t}');\n\t\t<\/script>\n\t`;return(0,n.createElement)("div",{ref:r},(0,n.createElement)(o.SandBox,{html:a,key:`tock-${t}`}),(0,n.createElement)("div",{className:"block-library-embed__interactive-overlay"}))};function p(e){var t;let{attributes:r,setAttributes:o,isSelected:i}=e;const l=null!==(t=r.url)&&void 0!==t?t:"",[c,p]=(0,s.useState)(l),m=(0,s.useCallback)((()=>{p(l)}),[l]);return(0,s.useEffect)((()=>{i||m()}),[i,m]),(0,n.createElement)("div",(0,a.useBlockProps)(),(0,n.createElement)(a.BlockControls,null,(0,n.createElement)(u,{tockUrl:c,setEditedUrl:p,setUrl:()=>{const e=c.replace(/.*exploretock.com\//,"");p(e),o({url:e})},cancel:m})),(0,n.createElement)(d,{url:l}))}},14035:(e,t,r)=>{"use strict";var n=r(31985),a=r(60766);(0,n.Z)(a.u2,a.Xd)},81602:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(55609);const o=(0,n.createElement)(a.SVG,{viewBox:"0 0 24 24",width:"32",height:"32",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(a.Path,{d:"M10 15.619C6.84915 15.619 4.28572 13.0542 4.28572 9.90176C4.28572 7.24269 6.10957 5.00183 8.57143 4.36551V0C3.72557 0.693782 0 4.86162 0 9.90176C0 15.4274 4.47715 19.9069 10 19.9069C12.2461 19.9069 14.3193 19.1658 15.9887 17.9148L12.9003 14.825C12.0494 15.3287 11.0581 15.619 10 15.619 M15.7135 9.90176C15.7135 10.9604 15.4233 11.9522 14.9199 12.8035L18.0082 15.8935C19.2585 14.2232 19.9992 12.149 19.9992 9.90176C19.9992 4.86162 16.2736 0.693782 11.4277 0V4.36551C13.8896 5.00183 15.7135 7.24269 15.7135 9.90176"}))},60766:(e,t,r)=>{"use strict";r.d(t,{Xd:()=>u,u2:()=>c});var n=r(51806),a=r(65736),o=r(70355),s=r(97587),i=r(44814),l=r(81602);const __=a.__,_x=a._x,c="tock",u={apiVersion:2,title:__("Tock","jetpack"),description:__("Allow visitors to reserve a table at your restaurant with Tock.","jetpack"),icon:{src:l.Z,foreground:(0,o.m)()},category:"earn",keywords:[_x("booking","block search term","jetpack"),_x("reservation","block search term","jetpack"),_x("restaurant","block search term","jetpack")],supports:{align:!0,html:!1,multiple:!1},edit:i.Z,save:()=>(0,n.createElement)("div",{id:"Tock_widget_container","data-tock-display-mode":"Button","data-tock-color-mode":"Blue","data-tock-locale":"en-us","data-tock-timezone":"America/New_York"}),attributes:s.Z,example:{attributes:{url:"roister"},viewportWidth:250}}},10723:(e,t,r)=>{"use strict";r.d(t,{H:()=>o,Z:()=>s});var n=r(51806),a=r(69307);const o=(0,a.createContext)(),s=e=>{let{onFilesSelected:t,onMediaItemSelected:r,onUploadFinished:a,children:s}=e;return(0,n.createElement)(o.Provider,{value:{onFilesSelected:t,onMediaItemSelected:r,onUploadFinished:a},children:s})}},90879:(e,t,r)=>{"use strict";r.d(t,{s:()=>n,v:()=>a});const n=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.77",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}],a={PUBLIC:0,PRIVATE:1,SITE_DEFAULT:2}},29899:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={attributes:{autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},muted:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},src:{type:"string"}},support:{reusable:!1},save:r(4900).Z,isDeprecation:!0}},4900:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(52175);function o(e){let{attributes:t}=e;const{caption:r,guid:o}=t;if(!o)return null;const s=`https://videopress.com/v/${o}`;return(0,n.createElement)("figure",{className:"wp-block-embed is-type-video is-provider-videopress"},(0,n.createElement)("div",{className:"wp-block-embed__wrapper"},`\n${s}\n`),!a.RichText.isEmpty(r)&&(0,n.createElement)(a.RichText.Content,{tagName:"figcaption",value:r}))}},97504:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(30454),a=r(93512);const o={attributes:{autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},muted:{type:"boolean"},playsInline:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},src:{type:"string"},videoPressClassNames:{type:"string"},align:{type:"wide"}},support:{reusable:!1},isEligible:e=>{let{videoPressClassNames:t,guid:r}=e;return r&&void 0===t},migrate:e=>{const{className:t,videoPressClassNames:r}=e;return{...e,...(0,a.a)(t,r)}},save:n.Z,isDeprecation:!0}},30454:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(52175),o=r(92490);function s(e){const{attributes:{autoplay:t,caption:r,controls:s,guid:i,loop:l,muted:c,poster:u,preload:d,videoPressClassNames:p}={}}=e;if(!i)return null;const m=(0,o.p)(i,{autoplay:t,controls:s,loop:l,muted:c,poster:u,preload:d});return(0,n.createElement)("figure",{className:p},(0,n.createElement)("div",{className:"wp-block-embed__wrapper"},`\n${m}\n`),!a.RichText.isEmpty(r)&&(0,n.createElement)(a.RichText.Content,{tagName:"figcaption",value:r}))}},92490:(e,t,r)=>{"use strict";r.d(t,{p:()=>a});var n=r(96483);const a=(e,t)=>{let{autoplay:r,controls:a,loop:o,muted:s,poster:i,preload:l}=t;if(!e)return null;const c={...r&&{autoPlay:!0},...!a&&{controls:!1},...o&&{loop:!0},...s&&{muted:!0,persistVolume:!1},...i&&{posterUrl:i},..."none"!==l&&{preloadContent:l}};return(0,n.addQueryArgs)(`https://videopress.com/v/${e}`,c)}},93512:(e,t,r)=>{"use strict";r.d(t,{a:()=>l});var n=r(29512),a=r.n(n),o=r(73320),s=r.n(o);const i=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.77",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}],l=(e,t)=>{const r=i.reduce(((e,t)=>{let{className:r}=t;return e[r]=!1,e}),{"wp-has-aspect-ratio":!1}),n=s()(e,{...r,"wp-block-embed":!1,"is-type-video":!1,"is-provider-videopress":!1}),o=new(a())(n);let l=s()(e,t);return o.forEach((e=>{l=l.replace(e,"")})),{className:n,videoPressClassNames:l.trim()}}},34284:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={attributes:{autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},muted:{type:"boolean"},playsinline:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},seekbarPlayedColor:{type:"string",default:""},seekbarLoadingColor:{type:"string",default:""},seekbarColor:{type:"string",default:""},src:{type:"string"},videoPressClassNames:{type:"string"}},support:{reusable:!1},isEligible:e=>e.guid,save:r(46721).Z,isDeprecation:!0}},46721:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(52175),o=r(65235),s=r.n(o),i=r(96931);function l(e){const{attributes:{autoplay:t,caption:r,controls:o,guid:l,loop:c,muted:u,playsinline:d,poster:p,preload:m,videoPressClassNames:h,className:g,align:f,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:k}={}}=e,y=a.useBlockProps.save({className:s()("wp-block-video",g,h,{[`align${f}`]:f})}),E=(0,i.p)(l,{autoplay:t,controls:o,loop:c,muted:u,playsinline:d,poster:p,preload:m,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:k});return(0,n.createElement)("figure",y,(0,n.createElement)("div",{className:"wp-block-embed__wrapper"},`\n${E}\n`),!a.RichText.isEmpty(r)&&(0,n.createElement)(a.RichText.Content,{tagName:"figcaption",value:r}))}},96931:(e,t,r)=>{"use strict";r.d(t,{p:()=>a});var n=r(96483);const a=(e,t)=>{let{autoplay:r,controls:a,loop:o,muted:s,playsinline:i,poster:l,preload:c,seekbarColor:u,seekbarPlayedColor:d,seekbarLoadingColor:p}=t;if(!e)return null;const m={resizeToParent:!0,...r&&{autoPlay:!0},...!a&&{controls:!1},...o&&{loop:!0},...s&&{muted:!0,persistVolume:!1},...i&&{playsinline:!0},...l&&{posterUrl:l},..."none"!==c&&{preloadContent:c},...""!==u&&{sbc:u},...""!==d&&{sbpc:d},...""!==p&&{sblc:p}};return(0,n.addQueryArgs)(`https://videopress.com/v/${e}`,m)}},58351:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={attributes:{autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},maxWidth:{type:"string",default:"100%"},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},isVideoPressExample:{type:"boolean",default:!1},muted:{type:"boolean"},playsinline:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},seekbarPlayedColor:{type:"string",default:""},seekbarLoadingColor:{type:"string",default:""},seekbarColor:{type:"string",default:""},src:{type:"string"},videoPressTracks:{type:"array",items:{type:"object"},default:[]},videoPressClassNames:{type:"string"}},support:{reusable:!1},isEligible:e=>e.guid,migrate:e=>({...e,useAverageColor:!1}),save:r(83619).Z,isDeprecation:!0}},83619:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(52175),o=r(65235),s=r.n(o),i=r(67502);function l(e){const{attributes:{autoplay:t,caption:r,controls:o,guid:l,loop:c,muted:u,playsinline:d,poster:p,preload:m,videoPressClassNames:h,className:g,align:f,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:k,maxWidth:y}={}}=e,E=a.useBlockProps.save({className:s()("wp-block-video",g,h,{[`align${f}`]:f})}),w=(0,i.p)(l,{autoplay:t,controls:o,loop:c,muted:u,playsinline:d,poster:p,preload:m,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:k});let _={};return y&&y.length>0&&"100%"!==y&&(_={maxWidth:y,margin:"auto"}),(0,n.createElement)("figure",E,(0,n.createElement)("div",{className:"wp-block-embed__wrapper",style:_},`\n${w}\n`),!a.RichText.isEmpty(r)&&(0,n.createElement)(a.RichText.Content,{tagName:"figcaption",value:r}))}},67502:(e,t,r)=>{"use strict";r.d(t,{p:()=>a});var n=r(96483);const a=(e,t)=>{let{autoplay:r,controls:a,loop:o,muted:s,playsinline:i,poster:l,preload:c,seekbarColor:u,seekbarPlayedColor:d,seekbarLoadingColor:p}=t;if(!e)return null;const m={resizeToParent:!0,cover:!0,...r&&{autoPlay:!0},...!a&&{controls:!1},...o&&{loop:!0},...s&&{muted:!0,persistVolume:!1},...i&&{playsinline:!0},...l&&{posterUrl:l},..."none"!==c&&{preloadContent:c},...""!==u&&{sbc:u},...""!==d&&{sbpc:d},...""!==p&&{sblc:p}};return(0,n.addQueryArgs)(`https://videopress.com/v/${e}`,m)}},30053:(e,t,r)=>{"use strict";r.d(t,{Z:()=>Z});var n=r(82674),a=r.n(n),o=r(90017),s=r.n(o),i=r(51806),l=r(86989),c=r.n(l),u=r(11313),d=r(52175),p=r(55609),m=r(94333),h=r(9818),g=r(69307),f=r(81975),b=r(65736),v=r(61074),k=r(65235),y=r.n(k),E=r(92819),w=r(99196),_=r(81427),C=r(10723),j=r(90879),S=r(31302),x=r(43774),P=r(75880),T=r(22081),L=r(32478),N=r(90953),A=r(77290);const __=b.__,_x=b._x,R=["image"],I=e=>{const t=(0,d.useBlockProps)({className:"resumable-upload"}),{onChangeTitle:r,title:n,filename:a,onSelectPoster:o,onRemovePoster:s,videoPosterImageData:l,fileForUpload:c,isUploadComplete:u,onDismissEditor:f,onSave:b,onVideoFrameSelected:k}=e,y=(0,h.useSelect)((e=>e("core/editor").isSavingPost()),[]),E=(0,m.usePrevious)(y);return(0,w.useEffect)((()=>{y&&!E&&b()}),[y,E,b]),(0,i.createElement)(C.Z,{onUploadFinished:e.uploadFinished},(0,i.createElement)(g.Fragment,null,e.blockSettings,(0,i.createElement)("div",t,(0,i.createElement)("div",{className:"uploader-block__logo"},(0,i.createElement)(v.Z,{icon:_.ll}),(0,i.createElement)("div",{className:"uploader-block__logo-text"},__("VideoPress","jetpack"))),(0,i.createElement)(L.$,{file:c,filename:a,title:n,onChangeTitle:r,onSelectPoster:o,onRemovePoster:s,videoPosterImageData:l,onVideoFrameSelected:k}),!u&&(0,i.createElement)(x.Z,{file:c}),u&&(0,i.createElement)("div",{className:"uploader-block__upload-complete"},(0,i.createElement)("span",null,__("Upload Complete!","jetpack")," 🎉"),(0,i.createElement)(p.Button,{variant:"primary",onClick:f},__("Done","jetpack"))))))},M=e=>{let{scripts:t}=e;const{html:r,interactive:n,caption:a,isSelected:o,hideOverlay:s,attributes:l,setAttributes:c}=e,{align:u,className:m,videoPressClassNames:h,maxWidth:g}=l,f=(0,d.useBlockProps)({className:y()("wp-block-video",m,h,{[`align${u}`]:u})});if("object"!=typeof t&&(t=[]),window.videopressAjax){const e=new Blob([`var videopressAjax = ${JSON.stringify(window.videopressAjax)};`],{type:"text/javascript"});t.push(URL.createObjectURL(e),window.videopressAjax.bridgeUrl)}return(0,i.createElement)("figure",f,(0,i.createElement)("div",{className:"wp-block-embed__wrapper"},(0,i.createElement)(p.ResizableBox,{enable:{top:!1,bottom:!1,left:!0,right:!0},maxWidth:"100%",size:{width:g},style:{margin:"auto"},onResizeStop:(e,t,r)=>{let n=getComputedStyle(r).width;if(null!==r.parentElement){n===getComputedStyle(r.parentElement).width&&(n="100%")}c({maxWidth:n})}},(0,i.createElement)(p.SandBox,{html:r,scripts:t,type:h}))),!n&&(0,i.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:s}),(!d.RichText.isEmpty(a)||o)&&(0,i.createElement)(d.RichText,{tagName:"figcaption",placeholder:__("Write caption…","jetpack"),value:a,onChange:e=>c({caption:e}),inlineToolbar:!0}))},Z=(0,m.createHigherOrderComponent)((0,m.compose)([(0,h.withSelect)(((e,t)=>{const{autoplay:r,controls:n,fileForImmediateUpload:a,guid:o,loop:s,muted:i,playsinline:l,poster:c,preload:d,seekbarColor:p,seekbarLoadingColor:m,seekbarPlayedColor:h,src:g,useAverageColor:f}=t.attributes,{getEmbedPreview:b,isRequestingEmbedPreview:v}=e("core"),k=(0,N.p)(o,{autoplay:r,controls:n,loop:s,muted:i,playsinline:l,poster:c,preload:d,seekbarColor:p,seekbarLoadingColor:m,seekbarPlayedColor:h,useAverageColor:f}),y=!!k&&b(k),E=!!k&&v(k),w=!!window.videoPressResumableEnabled;return{fileForImmediateUpload:a,isFetchingPreview:E,isUploading:!w&&(0,u.isBlobURL)(g),preview:y,resumableUploadEnabled:w,url:k}})),(0,h.withDispatch)((e=>({invalidateCachedEmbedPreview:t=>{e("core/data").invalidateResolution("core","getEmbedPreview",[t])}}))),m.withInstanceId,e=>class extends g.Component{constructor(e){super(...arguments),s()(this,"hideOverlay",(()=>{this.setState({interactive:!0})})),s()(this,"setRatingAndAllowDownload",(async()=>{const e=(0,E.get)(this.props,"attributes.id"),t=await this.requestMedia(e);let r=(0,E.get)(t,"jetpack_videopress.rating");const n=(0,E.get)(t,"jetpack_videopress.allow_download"),a=(0,E.get)(t,"jetpack_videopress.privacy_setting",j.v.SITE_DEFAULT);r&&("X-18"===r&&(r="R-17"),this.setState({rating:r})),void 0!==n&&this.setState({allowDownload:!!n}),void 0!==a&&this.setState({privacySetting:a})})),s()(this,"schedulePreviewCacheReload",(()=>{const{invalidateCachedEmbedPreview:e,url:t}=this.props;null===this.previewCacheReloadTimer&&this.previewFailuresCount<5&&(this.previewFailuresCount++,this.previewCacheReloadTimer=setTimeout((()=>{e(t),this.previewCacheReloadTimer=null}),2e3*this.previewFailuresCount))})),s()(this,"fallbackToCore",(()=>{this.props.setAttributes({guid:void 0}),this.setState({fallback:!0})})),s()(this,"setGuid",(async()=>{const{attributes:e,setAttributes:t}=this.props,{id:r}=e;if(r)try{const e=await this.requestMedia(r);if(null===e)return;const n=(0,E.get)(e,"jetpack_videopress.guid");n?(t({guid:n}),this.setTracks(n)):this.fallbackToCore()}catch(e){this.setState({isFetchingMedia:!1}),this.fallbackToCore()}else t({guid:void 0})})),s()(this,"requestMedia",(async e=>{if(!e)return null;if(null!==this.state.media&&this.state.lastRequestedMediaId===e)return this.state.media;this.setState({isFetchingMedia:!0});const t=await c()({path:`/wp/v2/media/${e}`}).catch((()=>(this.setState({fallback:!0}),null))).finally((()=>{this.setState({isFetchingMedia:!1})})),{id:r}=this.props.attributes;return e!==r?null:(this.setState({media:t,lastRequestedMediaId:e}),t)})),s()(this,"setTracks",(e=>{const{setAttributes:t}=this.props;e&&c()({url:`https://public-api.wordpress.com/rest/v1.1/videos/${e}`,credentials:"omit",global:!0}).then((e=>{const r=[];Object.keys(e.tracks).forEach((t=>{for(const n in e.tracks[t]){const a=e.tracks[t][n];r.push({src:a.src,kind:t,srcLang:n,label:a.label})}})),t({videoPressTracks:r})}))})),s()(this,"switchToEditing",(()=>{this.props.setAttributes({id:void 0,guid:void 0,src:void 0})})),s()(this,"onSelectPoster",(e=>{const{setAttributes:t}=this.props;t({poster:e.url}),this.setState({videoPosterImageData:e})})),s()(this,"onRemovePoster",(()=>{const{setAttributes:e}=this.props;e({poster:""}),this.setState({videoPosterImageData:null}),this.posterImageButton.current.focus()})),s()(this,"toggleAttribute",(e=>t=>{this.props.setAttributes({[e]:t})})),s()(this,"getAutoplayHelp",(e=>e?__("Note: Autoplaying videos may cause usability issues for some visitors.","jetpack"):null)),s()(this,"getPrivacySettingHelp",(e=>{const t=parseInt(e,10);return j.v.PRIVATE===t?__("Restrict views to members of this site","jetpack"):j.v.PUBLIC===t?__("Video can be viewed by anyone","jetpack"):__("Follow the site privacy setting","jetpack")})),s()(this,"onChangeRating",(e=>{const t=this.state.rating;"X-18"===e&&(e="R-17"),-1!==(0,E.indexOf)(["G","PG-13","R-17"],e)&&this.updateMetaApiCall({rating:e},(()=>this.setState({isUpdatingRating:!0,rating:e})),(()=>this.setState({rating:t})),(()=>this.setState({isUpdatingRating:!1})))})),s()(this,"onChangeAllowDownload",(e=>{const t=this.state.allowDownload;this.updateMetaApiCall({allow_download:e?1:0},(()=>this.setState({isUpdatingAllowDownload:!0,allowDownload:e})),(()=>this.setState({allowDownload:t})),(()=>this.setState({isUpdatingAllowDownload:!1})))})),s()(this,"onChangePrivacySetting",(e=>{const t=this.state.privacySetting;this.updateMetaApiCall({privacy_setting:e},(()=>this.setState({isUpdatingPrivacySetting:!0,privacySetting:e})),(()=>this.setState({privacySetting:t})),(()=>this.setState({isUpdatingPrivacySetting:!1})))})),s()(this,"updateMetaApiCall",((e,t,r,n)=>{const{invalidateCachedEmbedPreview:a,url:o}=this.props,{id:s}=this.props.attributes;if(!s)return;t();const i={id:s};Object.assign(i,e),c()({path:"/wpcom/v2/videopress/meta",method:"POST",data:i}).then((e=>{status in e&&200!==e.status&&r()})).catch((()=>r())).finally((()=>{n(),a(o)}))})),this.state={media:null,isFetchingMedia:!1,fallback:!1,interactive:!1,rating:null,lastRequestedMediaId:null,isUpdatingRating:!1,allowDownload:null,privacySetting:j.v.SITE_DEFAULT,isUpdatingAllowDownload:!1,fileForUpload:e.fileForImmediateUpload,isUpdatingIsPrivate:!1,isEditingWhileUploading:!1,isUploadComplete:!1,lastPosterValueSource:""},this.posterImageButton=(0,g.createRef)(),this.previewCacheReloadTimer=null,this.previewFailuresCount=0}static getDerivedStateFromProps(e,t){const r={};if(!e.isSelected&&t.interactive&&(r.interactive=!1),t.fileForUpload&&!t.isEditingWhileUploading){null!==t.fileForUpload&&t.fileForUpload instanceof File&&(r.isEditingWhileUploading=!0)}return Object.keys(r).length?r:null}async componentDidMount(){const{guid:e}=this.props.attributes;e?this.setTracks(e):await this.setGuid(),this.setRatingAndAllowDownload()}async componentDidUpdate(e){const{attributes:t,invalidateCachedEmbedPreview:r,preview:n,setAttributes:a,url:o,isFetchingPreview:s}=this.props;t.id!==e.attributes.id&&(await this.setGuid(),this.setRatingAndAllowDownload());let i=!1;if(o&&o!==e.url&&(r(o),i=!0),n){const e=(0,A.f6)(n.html,y()("wp-block-embed","is-type-video","is-provider-videopress"),!1);this.previewFailuresCount=0,a({videoPressClassNames:e})}else s||i||!this.props.attributes.guid||this.schedulePreviewCacheReload()}getPreloadHelp(){const{attributes:e}=this.props;return"auto"===e.preload?__("Note: Automatically downloading videos may cause issues if there are many videos displayed on the same page.","jetpack"):null}renderControlLabelWithTooltip(e,t){return(0,i.createElement)(p.Tooltip,{text:t,position:"top"},(0,i.createElement)("span",null,e))}render(){const{attributes:t,instanceId:r,isFetchingPreview:n,isUploading:o,preview:s,resumableUploadEnabled:l,setAttributes:u}=this.props,{fallback:m,fileForUpload:h,isFetchingMedia:v,isUpdatingRating:k,interactive:y,rating:E,allowDownload:w,privacySetting:_,isUpdatingAllowDownload:x,isUpdatingPrivacySetting:L,videoPosterImageData:N}=this.state,{autoplay:Z,caption:B,controls:D,guid:F,loop:z,muted:O,playsinline:U,poster:H,preload:V,useAverageColor:G,videoPressTracks:q,isVideoPressExample:$,src:W}=t;if($&&W)return(0,i.createElement)("img",{src:W,alt:B});const X=`video-block__poster-image-description-${r}`,J=!(!H&&!N),K=(0,i.createElement)(g.Fragment,null,(0,i.createElement)(d.BlockControls,{group:"block"},(0,i.createElement)(T.Z,{tracks:q,onChange:e=>{u({videoPressTracks:e})},guid:F})),(0,i.createElement)(d.BlockControls,null,(0,i.createElement)(p.ToolbarGroup,null,(0,i.createElement)(p.ToolbarButton,{className:"components-icon-button components-toolbar__control",text:__("Replace","jetpack"),onClick:this.switchToEditing}))),(0,i.createElement)(d.InspectorControls,null,(0,i.createElement)(p.PanelBody,{title:__("Video Settings","jetpack")},(0,i.createElement)(p.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Autoplay","jetpack"),/* translators: Tooltip describing the "autoplay" option for the VideoPress player */
__("Start playing the video as soon as the page loads","jetpack")),onChange:this.toggleAttribute("autoplay"),checked:Z,help:this.getAutoplayHelp}),(0,i.createElement)(p.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Loop","jetpack"),/* translators: Tooltip describing the "loop" option for the VideoPress player */
__("Restarts the video when it reaches the end","jetpack")),onChange:this.toggleAttribute("loop"),checked:z}),(0,i.createElement)(p.ToggleControl,{label:__("Muted","jetpack"),onChange:this.toggleAttribute("muted"),checked:O}),(0,i.createElement)(p.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Playback Controls","jetpack"),/* translators: Tooltip describing the "controls" option for the VideoPress player */
__("Display the video playback controls","jetpack")),onChange:this.toggleAttribute("controls"),checked:D}),(0,i.createElement)(p.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Play Inline","jetpack"),/* translators: Tooltip describing the "playsinline" option for the VideoPress player */
__("Play the video inline instead of full-screen on mobile devices","jetpack")),onChange:this.toggleAttribute("playsinline"),checked:U}),(0,i.createElement)(p.SelectControl,{label:this.renderControlLabelWithTooltip(__("Preload","jetpack"),/* translators: Tooltip describing the "preload" option for the VideoPress player */
__("Content to dowload before the video is played","jetpack")),value:null!=V?V:"",onChange:e=>u({preload:e}),options:[{value:"auto",label:_x("Auto","VideoPress preload setting","jetpack")},{value:"metadata",label:_x("Metadata","VideoPress preload setting","jetpack")},{value:"none",label:_x("None","VideoPress preload setting","jetpack")}],help:this.getPreloadHelp()}),(0,i.createElement)(d.MediaUploadCheck,null,(0,i.createElement)(p.BaseControl,{className:"editor-video-poster-control",label:__("Poster Image","jetpack")},(0,i.createElement)(d.MediaUpload,{title:__("Select Poster Image","jetpack"),onSelect:this.onSelectPoster,allowedTypes:R,render:e=>{let{open:t}=e;return(0,i.createElement)(p.Button,{variant:"secondary",onClick:t,ref:this.posterImageButton,"aria-describedby":X},J?__("Replace image","jetpack",0):__("Select Poster Image","jetpack"))}}),(0,i.createElement)("p",{id:X,hidden:!0},J?(0,b.sprintf)(/* translators: Placeholder is an image URL. */
__("The current poster image url is %s","jetpack"),null!=H?H:N):__("There is no poster image currently selected","jetpack")),J&&(0,i.createElement)(p.Button,{onClick:this.onRemovePoster,variant:"link",isDestructive:!0},__("Remove Poster Image","jetpack")))),(0,g.createInterpolateElement)(__("Send us your <a>VideoPress feedback</a>","jetpack"),{a:(0,i.createElement)(p.ExternalLink,{href:"https://automattic.survey.fm/videopress-feedback"})})),(0,i.createElement)(P.Z,{attributes:t,setAttributes:u,useAverageColor:G,toggleAttribute:this.toggleAttribute}),(0,i.createElement)(p.PanelBody,{title:__("Video File Settings","jetpack")},(0,i.createElement)(p.SelectControl,{label:_x("Rating","The age rating for this video.","jetpack"),value:null!=E?E:"",disabled:v||k,options:[{label:_x("G",'Video rating for "General Audiences".',"jetpack"),value:"G"},{label:_x("PG-13",'Video rating for "Parental Guidance", unsuitable for children under 13.',"jetpack"),value:"PG-13"},{label:_x("R",'Video rating for "Restricted", not recommended for children under 17.',"jetpack"),value:"R-17"}],onChange:this.onChangeRating}),(0,i.createElement)(p.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Allow download","jetpack"),/* translators: Tooltip describing the "allow download" option for the VideoPress player */
__("Display download option and allow viewers to download this video","jetpack")),onChange:this.onChangeAllowDownload,checked:w,disabled:v||x}),(0,i.createElement)(p.SelectControl,{label:__("Video Privacy","jetpack"),help:this.getPrivacySettingHelp(_),onChange:this.onChangePrivacySetting,value:null!=_?_:"",options:[{value:j.v.SITE_DEFAULT,label:_x("Site Default","VideoPress privacy setting","jetpack")},{value:j.v.PUBLIC,label:_x("Public","VideoPress privacy setting","jetpack")},{value:j.v.PRIVATE,label:_x("Private","VideoPress privacy setting","jetpack")}],disabled:v||L})))),Y=e=>{this.setState({fileForUpload:e[0]})},Q=e=>{e&&e.url?(this.props.setAttributes({src:e.url,id:e.id,poster:e.image?.src!==e.icon?e.image?.src:void 0}),e.videopress_guid&&this.props.setAttributes({guid:e.videopress_guid})):u({src:void 0,id:void 0,poster:void 0})},ee=()=>"videoPressUploadPoster"in window,te=(0,f.escapeHTML)(h?(0,A.K8)(h.name):""),re=e=>{var t;let{mediaId:r,guid:n,src:a}=e;this.setState({title:null!==(t=this.state.title)&&void 0!==t?t:te,fileForUpload:null,isUploadComplete:!!r,isEditingWhileUploading:!!r&&this.state.isEditingWhileUploading}),r&&n&&a&&u({id:r,guid:n,src:a})},ne=e=>{this.setState({title:e})},ae=e=>{this.setState({videoFrameSelectedInMillis:e,videoPosterImageData:null})},oe=()=>{const e=this.state.title;this.updateMetaApiCall({title:e},(()=>this.setState({isUpdatingTitle:!0,title:e})),(()=>this.setState({title:e})),(()=>this.setState({isUpdatingTitle:!1})))},se=()=>de({at_time:this.state.videoFrameSelectedInMillis,is_millisec:!0}),ie=()=>de({poster_attachment_id:this.state.videoPosterImageData.id}),le=e=>{e.generating?ce():ue(e.poster)},ce=()=>{setTimeout((()=>{(ee()?window.videoPressGetPoster(F):c()({path:`/videos/${F}/poster`,apiNamespace:"rest/v1.1",global:!0,method:"GET"})).then((e=>le(e)))}),2e3)},ue=e=>{e&&u({poster:e})},de=e=>{if(ee())return window.videoPressUploadPoster(F,e).then((e=>le(e)));c()({path:`/videos/${F}/poster`,apiNamespace:"rest/v1.1",method:"POST",global:!0,data:e}).catch((e=>e))},pe=()=>{const{title:e,videoFrameSelectedInMillis:t}=this.state;e&&oe(),N?ie():null!=t&&se()},me=()=>{this.setState({isEditingWhileUploading:!1}),pe()};if(null!=h&&h.name||this.state.isEditingWhileUploading){var he;const e=null!==(he=this.state.title)&&void 0!==he?he:te;return(0,i.createElement)(I,{fileForUpload:h,filename:te,uploadFinished:re,blockSettings:K,onDismissEditor:me,isUploadComplete:this.state.isUploadComplete,onSelectPoster:this.onSelectPoster,onRemovePoster:this.onRemovePoster,onChangeTitle:ne,title:e,videoPosterImageData:this.state.videoPosterImageData,onVideoFrameSelected:ae,onSave:pe})}const ge=v||n,fe=m||o||!F,be=fe&&!o&&!ge,ve=(0,i.createElement)(g.Fragment,null,(0,i.createElement)("div",{className:o||ge?"":"videopress-block-hide"},(0,i.createElement)(S.Z,{text:o?__("Uploading…","jetpack"):__("Generating preview…","jetpack",0)})),(0,i.createElement)("div",{className:be?"":"videopress-block-hide"},(0,i.createElement)(e,this.props)));if(fe)return l?(0,i.createElement)(C.Z,{onFilesSelected:Y,onMediaItemSelected:Q},ve):(0,i.createElement)(g.Fragment,null,ve);const{html:ke,scripts:ye}=s||{html:null,scripts:null},Ee=ge||!s;return(0,i.createElement)(g.Fragment,null,K,Ee&&(0,i.createElement)(S.Z,{text:__("Generating preview…","jetpack")}),!Ee&&(0,i.createElement)(M,a()({},this.props,{hideOverlay:this.hideOverlay,html:ke,scripts:ye,interactive:y,caption:B})))}}]),"withVideoPressEdit")},37549:(e,t,r)=>{"use strict";var n=r(82674),a=r.n(n),o=r(51806),s=r(6975),i=r(13419),l=r(11313),c=r(52175),u=r(65391),d=r(4981),p=r(55609),m=r(94333),h=r(9818),g=r(12238),f=r(69307),b=r(92694),v=r(65736),k=r(92819),y=r(10723),E=r(29899),w=r(97504),_=r(34284),C=r(58351),j=r(30053),S=r(23096),x=r(77290),P=r(23062),T=r(84676),L=r(41194);const __=v.__,N=(0,m.createHigherOrderComponent)((e=>t=>{const{name:r}=(0,c.useBlockEditContext)();return"core/video"!==r?(0,o.createElement)(e,t):(0,o.createElement)(e,a()({},t,{disableDropZone:!0,className:"no-videopress-media-placeholder"}),(0,o.createElement)(p.Button,{disabled:!0,className:"components-button no-videopress-disabled-button",variant:"secondary"},__("Media Library","jetpack")),(0,o.createElement)(p.Button,{disabled:!0,className:"components-button no-videopress-disabled-button",variant:"secondary"},__("Upload","jetpack")))}),"videoPressNoPlanMediaPlaceholder"),A=(0,m.createHigherOrderComponent)((e=>t=>{const{name:r}=(0,c.useBlockEditContext)();if("core/video"!==r)return(0,o.createElement)(e,t);const{onFilesSelected:n,onMediaItemSelected:s}=(0,f.useContext)(y.H),i={...t,handleUpload:!1,disableDropZone:!0,onSelect:e=>{void 0!==e.length?n(e):s(e)}};return(0,o.createElement)(e,a()({},i,{className:"videopress-media-placeholder"}))}),"videoPressMediaPlaceholder"),R=(e,t,r)=>("core/video"!==t.name||!r.guid||r.className?.indexOf("wp-block-video")>=0||r.videoPressClassNames||(e.className=e.className.replace("wp-block-video","").trim()),e);(0,b.addFilter)("blocks.registerBlockType","jetpack/videopress",((e,t)=>{if("core/embed"===t)return(e=>{if(!("variations"in e)||"object"!=typeof e.variations)return;const{available:t}=(0,i.OZ)("videopress");e.variations.some((e=>"videopress"===e.name&&(t&&(e.scope=[]),e.patterns.push(/^https?:\/\/v\.wordpress\.com\/([a-zA-Z\d]{8})(.+)?$/i),!0)))})(e),e;if("core/video"!==t||e.isDeprecation)return e;const{deprecated:r,edit:n,save:a,supports:o,transforms:s}=e,{available:c,unavailableReason:u}=(0,i.OZ)("videopress"),p=((0,i.Wp)()||(0,i.Ug)())&&["missing_plan","unknown"].includes(u),m=!!window.videoPressResumableEnabled;if(p?((0,b.addFilter)("editor.MediaPlaceholder","jetpack/videopress",N),(0,b.addFilter)("editor.BlockListBlock","jetpack/videopress-with-has-warning-is-interactive-class-names",(0,i.T)("core/video"))):c&&(m&&(0,b.addFilter)("editor.MediaPlaceholder","jetpack/videopress",A),e.description=__("Embed a video from your media library or upload a new one with VideoPress.","jetpack"),e.example.attributes={caption:"",isVideoPressExample:!0,src:L}),(0,b.addFilter)("blocks.getSaveContent.extraProps","jetpack/videopress",R,20),c||["missing_plan","missing_module","unknown"].includes(u)){const t={autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},maxWidth:{type:"string",default:"100%"},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},isVideoPressExample:{type:"boolean",default:!1},muted:{type:"boolean"},playsinline:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},seekbarPlayedColor:{type:"string",default:""},seekbarLoadingColor:{type:"string",default:""},seekbarColor:{type:"string",default:""},src:{type:"string",source:"attribute",selector:"video",attribute:"src"},useAverageColor:{type:"boolean",default:!0},videoPressTracks:{type:"array",items:{type:"object"},default:[]},videoPressClassNames:{type:"string"},fileForImmediateUpload:{type:"object",default:null}},i=/https?:\/\/v\.wordpress\.com\/([a-zA-Z\d]{8})(.+)?/i;return{...e,attributes:{...e.attributes,...t},transforms:{...s,from:[{type:"files",isMatch:e=>(0,k.every)(e,(e=>0===e.type.indexOf("video/"))),priority:9,transform:(e,t)=>{const r=[];return e.forEach((e=>{if(c&&m){const t=(0,d.createBlock)("core/video",{fileForImmediateUpload:e});r.push(t)}else{const n=(0,d.createBlock)("core/video",{src:(0,l.createBlobURL)(e)});(0,g.mediaUpload)({filesList:[e],onFileChange:e=>{let[{id:r,url:a}]=e;t(n.clientId,{id:r,src:a})},allowedTypes:["video"]}),r.push(n)}})),r}},{type:"raw",isMatch:e=>"P"===e.nodeName&&i.test(e.innerHTML),transform:e=>{const t=i.exec(e.innerHTML);return(0,d.createBlock)("core/embed",{url:"https://videopress.com/v/"+t[1].trim()})}}]},supports:{...o,reusable:!1},edit:(0,j.Z)(n),save:(0,S.Z)(a),deprecated:[...r||[],C.Z,_.Z,{attributes:t,isEligible:e=>!e.guid,save:a,supports:o,isDeprecation:!0},w.Z,E.Z]}}return e}),5),(0,b.addFilter)("blocks.registerBlockType","videopress/add-wp-chapters-support",T.Z),(0,b.addFilter)("blocks.registerBlockType","videopress/add-v6-transform-support",P.Z),(0,b.addFilter)("blocks.registerBlockType","videopress/add-core-video-transform",(function(e,t){if("videopress/video"!==t)return e;const r=(0,d.getBlockType)("videopress/video"),{available:n}=(0,i.OZ)("videopress/video");return r&&n?{...e,transforms:{from:[...e.transforms?.from||[],{type:"block",blocks:["core/video"],isMatch:e=>{const{src:t,guid:r}=e,n=(0,x.Zx)(t);return r||n},transform:e=>{const t=(0,h.select)(g.store).getCurrentPostId();return s.Z?.tracks?.recordEvent("jetpack_editor_videopress_block_manual_transform_click",{post_id:t}),(0,d.createBlock)("videopress/video",e)}}],to:[...e.transforms?.to||[],{type:"block",blocks:["core/video"],transform:e=>(0,d.createBlock)("core/video",e)}]}}:e}));const I=(0,m.createHigherOrderComponent)((e=>t=>{const{block:r}=t,{name:n,attributes:a,clientId:s,__unstableBlockSource:l}=r,{replaceBlock:u}=(0,h.useDispatch)(c.store),{url:p,guid:m,providerNameSlug:g}=a,{available:b}=((0,x.Kp)(a),(0,d.getBlockType)("videopress/video"),(0,i.OZ)("videopress/video")),v="core/embed"===n,k=(0,x.Zx)(p),y=v&&k?k:m;(0,i.Wp)();return(0,f.useEffect)((()=>{}),[s,false,a,l,u,y]),(0,o.createElement)(e,t)}),"convertVideoBlockToVideoPressVideoBlock");(0,b.addFilter)("editor.BlockListBlock","videopress/jetpack-convert-to-videopress-video-block",I);const M=(0,m.createHigherOrderComponent)((e=>t=>{const{block:r}=t,{name:n,attributes:a,clientId:s}=r,{replaceBlock:i}=(0,h.useDispatch)(c.store);return(0,f.useEffect)((()=>{if("core/missing"===n&&"videopress/video"===a?.originalName)try{const e=(0,u.parse)(a.originalContent),t=e?.[0];if(!t)return;const{attrs:r}=t;i(s,(0,d.createBlock)("core/video",function(e){const t={...e};return e?.tracks&&(t.videoPressTracks=e.tracks,delete t.tracks),e?.isExample&&(t.isVideoPressExample=e.isExample,delete t.isExample),e?.classNames&&(t.videoPressClassNames=e.classNames,delete t.classNames),delete t.title,delete t.description,delete t.cacheHtml,delete t.videoRatio,delete t.privacySetting,delete t.allowDownload,delete t.displayEmbed,delete t.rating,delete t.isPrivate,t}(r)))}catch(e){console.error("Error converting VideoPress block to core/video",e)}}),[n,s,a,i]),(0,o.createElement)(e,t)}),"convertV6toV5");(0,b.addFilter)("editor.BlockListBlock","videopress/jetpack-convert-from-v6-to-v5",M)},31302:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(55609);const o=e=>{let{text:t}=e;return(0,n.createElement)("div",{className:"wp-block-embed is-loading"},(0,n.createElement)(a.Spinner,null),(0,n.createElement)("p",null,t))}},43774:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(51806),a=r(55609),o=r(69307),s=r(65736),i=r(90861),l=r.n(i),c=r(10723),u=r(5482);const __=s.__;function d(e){let{file:t}=e;const[r,i]=(0,o.useState)(0),[d,p]=(0,o.useState)(!1),[m,h]=(0,o.useState)(null),[g,f]=(0,o.useState)(null),[b,v]=(0,o.useState)(null),{onUploadFinished:k}=(0,o.useContext)(c.H),y=(0,o.useRef)(null);y.current=m;const E=(0,o.useCallback)((()=>{const e=(0,u.J)({onError:e=>{f(e)},onProgress:(e,t)=>{i(e/t*100)},onSuccess:e=>{k(e)},onUploadUuidRetrieved:e=>{null===b&&v(e)}});(0,u.v)().then((r=>{const n=e(t,r);h(n)})).catch((e=>{f(e)}))}),[t,k,b]);(0,o.useEffect)((()=>(E(),()=>{null!==y.current&&y.current.abort()})),[]);const w=Math.round(r),_={width:`${w}%`},C=l()(t.size);return(0,n.createElement)(n.Fragment,null,null!==g?(0,n.createElement)("div",{className:"resumable-upload__error"},(0,n.createElement)("div",{className:"resumable-upload__error-text"},(()=>{let e=__("An error was encountered during the upload. Check your network connection.","jetpack");if("object"==typeof g){const t=g.toString().match(/message":"([^"]+)"/);if(t&&"object"==typeof t&&2===t.length){const r=t[1];if("Invalid Mime"!==r)return r;e=(0,n.createElement)(n.Fragment,null,__("The format of the video you uploaded is not supported.","jetpack")," ",(0,n.createElement)(a.ExternalLink,{href:"https://wordpress.com/support/videopress/recommended-video-settings/",target:"_blank",rel:"noreferrer"},__("Check the recommended video settings.","jetpack")))}}return e})()),(0,n.createElement)(a.Button,{variant:"primary",onClick:()=>(f(null),void E())},__("Try again","jetpack")),(0,n.createElement)(a.Button,{variant:"secondary",onClick:()=>k({mediaId:null}),className:"resumable-upload__error-cancel"},__("Cancel","jetpack"))):(0,n.createElement)("div",{className:"resumable-upload__status"},(0,n.createElement)("div",{className:"resumable-upload__progress"},(0,n.createElement)("div",{className:"resumable-upload__progress-loaded",style:_})),(0,n.createElement)("div",{className:"resumable-upload__file-info"},(0,n.createElement)("div",null,d?(0,s.sprintf)(/* translators: Placeholder is an upload progress percenatage number, from 0-100. */
__("Paused (%s%%)","jetpack"),w):(0,s.sprintf)(/* translators: Placeholder is an upload progress percenatage number, from 0-100. */
__("Uploading (%s%%)","jetpack"),w)),(0,n.createElement)("div",{className:"resumable-upload__file-size"},C)),(0,n.createElement)("div",{className:"resumable-upload__actions"},(0,n.createElement)(a.Button,{variant:"link",onClick:()=>{m&&(d?m.start():m.abort(),p(!d))}},d?"Resume":"Pause"))))}},5482:(e,t,r)=>{"use strict";r.d(t,{J:()=>s,v:()=>a});var n=r(99537);const a=function(e){return new Promise((function(t,r){const n=e?{data:{key:e}}:{};wp.media.ajax("videopress-get-upload-jwt",{async:!0,...n}).done((function(e){t({token:e.upload_token,blogId:e.upload_blog_id,url:e.upload_action_url})})).fail((function(e){r(e)}))}))},o={},s=e=>{let{onUploadUuidRetrieved:t,onError:r,onProgress:s,onSuccess:i}=e;return(e,l)=>{const c=new n.gq(e,{onError:r,onProgress:s,endpoint:l.url,removeFingerprintOnSuccess:!0,withCredentials:!1,autoRetry:!0,overridePatchMethod:!1,chunkSize:1e7,allowedFileTypes:["video/*"],metadata:{filename:e.name,filetype:e.type},retryDelays:[0,1e3,3e3,5e3,1e4],onAfterResponse:function(e,r){if(r.getStatus()>=400)return;const n=r.getHeader("x-videopress-upload-guid"),a=r.getHeader("x-videopress-upload-media-id"),s=r.getHeader("x-videopress-upload-src-url");if(n&&a&&s)return void(i&&i({mediaId:Number(a),guid:n,src:s}));const l={"x-videopress-upload-key-token":"token","x-videopress-upload-key":"key"},c={};Object.keys(l).forEach((function(e){const t=r.getHeader(e);t&&(c[l[e]]=t)})),c.key&&c.token&&(o[c.key]=c.token),c.key&&t(c.key)},onBeforeRequest:function(e){const t=e._method;if(["HEAD","OPTIONS"].indexOf(t)>=0&&(e._method="GET",e.setHeader("X-HTTP-Method-Override",t)),["DELETE","PUT","PATCH"].indexOf(t)>=0&&(e._method="POST",e.setHeader("X-HTTP-Method-Override",t)),e._xhr.open(e._method,e._url,!0),Object.keys(e._headers).map((function(t){e.setHeader(t,e._headers[t])})),"POST"===t){if(!!!l.token)throw"should never happen";e.setHeader("x-videopress-upload-token",l.token)}if(["OPTIONS","GET","HEAD","DELETE","PUT","PATCH"].indexOf(t)>=0){const r=new URL(e._url).pathname.split("/"),n=r[r.length-1];if(o[n])e.setHeader("x-videopress-upload-token",o[n]);else if("HEAD"===t)return a(n).then((t=>(o[n]=t.token,e.setHeader("x-videopress-upload-token",t.token),e)))}return Promise.resolve(e)}});return c.findPreviousUploads().then((function(e){e.length&&c.resumeFromPreviousUpload(e[0]),c.start()})),c}}},23096:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(52175),o=r(94333),s=r(65235),i=r.n(s),l=r(90953);const c=(0,o.createHigherOrderComponent)((e=>t=>{const{attributes:{autoplay:r,caption:o,controls:s,guid:c,loop:u,muted:d,playsinline:p,poster:m,preload:h,videoPressClassNames:g,className:f,align:b,seekbarColor:v,seekbarPlayedColor:k,seekbarLoadingColor:y,useAverageColor:E,maxWidth:w}={}}=t,_=a.useBlockProps.save({className:i()("wp-block-video",f,g,{[`align${b}`]:b})});if(!c)return e(t);const C=(0,l.p)(c,{autoplay:r,controls:s,loop:u,muted:d,playsinline:p,poster:m,preload:h,seekbarColor:v,seekbarPlayedColor:k,seekbarLoadingColor:y,useAverageColor:E});let j={};return w&&w.length>0&&"100%"!==w&&(j={maxWidth:w,margin:"auto"}),(0,n.createElement)("figure",_,(0,n.createElement)("div",{className:"wp-block-embed__wrapper",style:j},`\n${C}\n`),!a.RichText.isEmpty(o)&&(0,n.createElement)(a.RichText.Content,{tagName:"figcaption",value:o}))}),"withVideoPressSave")},75880:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(90017),a=r.n(n),o=r(51806),s=r(52175),i=r(55609),l=r(69307),c=r(65736);r(99196);const __=c.__;class u extends l.Component{constructor(){super(...arguments),a()(this,"handleChangeSeekbarColor",(e=>{this.setState({seekbarColor:e})})),a()(this,"handleChangeSeekbarLoadingColor",(e=>{this.setState({seekbarLoadingColor:e})})),a()(this,"handleChangeSeekbarPlayedColor",(e=>{this.setState({seekbarPlayedColor:e})})),a()(this,"saveColors",(()=>{const{seekbarColor:e,seekbarLoadingColor:t,seekbarPlayedColor:r}=this.state,{setAttributes:n}=this.props;n({seekbarColor:e,seekbarLoadingColor:t,seekbarPlayedColor:r})}));const{seekbarColor:e,seekbarPlayedColor:t,seekbarLoadingColor:r}=this.props.attributes;this.state={seekbarColor:e,seekbarPlayedColor:t,seekbarLoadingColor:r}}render(){const{seekbarColor:e,seekbarPlayedColor:t,seekbarLoadingColor:r}=this.state,{toggleAttribute:n,useAverageColor:a}=this.props,l=!0;return(0,o.createElement)(i.PanelBody,{className:"seekbar-color-settings__panel",title:__("Progress Bar Colors","jetpack"),initialOpen:!1},(0,o.createElement)(i.ToggleControl,{label:__("Match video","jetpack"),help:__("Colors adapt to the video as it plays","jetpack"),onChange:n("useAverageColor"),checked:a}),(0,o.createElement)(s.PanelColorSettings,{opened:!a,showTitle:!1,colorSettings:[{value:e,onChange:this.handleChangeSeekbarColor,label:__("Main","jetpack"),showTitle:l},{value:r,onChange:this.handleChangeSeekbarLoadingColor,label:__("Loaded","jetpack"),showTitle:l},{value:t,onChange:this.handleChangeSeekbarPlayedColor,label:__("Progress","jetpack"),showTitle:l}]},(0,o.createElement)(i.Button,{variant:"secondary",onClick:this.saveColors},__("Save colors","jetpack"))))}}const d=u},22081:(e,t,r)=>{"use strict";r.d(t,{Z:()=>E,n:()=>b});var n=r(51806),a=r(86989),o=r.n(a),s=r(52175),i=r(55609),l=r(9818),c=r(69307),u=r(65736),d=r(47659);const __=u.__,p="subtitles",m=".vtt,text/vtt",h=[{label:__("Subtitles","jetpack"),value:"subtitles"},{label:__("Captions","jetpack"),value:"captions"},{label:__("Descriptions","jetpack"),value:"descriptions"},{label:__("Chapters","jetpack"),value:"chapters"},{label:__("Metadata","jetpack"),value:"metadata"}],g=(0,n.createElement)(i.SVG,{width:"18",height:"14",viewBox:"0 0 18 14",role:"img",fill:"none"},(0,n.createElement)(i.Rect,{x:"0.75",y:"0.75",width:"16.5",height:"12.5",rx:"1.25",stroke:"black",strokeWidth:"1.5",fill:"none"}),(0,n.createElement)(i.Path,{d:"M3 7H15",stroke:"black",strokeWidth:"1.5"}),(0,n.createElement)(i.Path,{d:"M3 10L15 10",stroke:"black",strokeWidth:"1.5"})),f=()=>"videoPressUploadTrack"in window,b=(e,t)=>{if(f())return window.videoPressUploadTrack(t,e.kind,e.srcLang,e.label,e.tmpFile);const r={method:"POST",path:`/videos/${t}/tracks`,apiNamespace:"rest/v1.1",global:!0,parse:!1,formData:[["kind",e.kind],["srclang",e.srcLang],["label",e.label],["vtt",e.tmpFile]]};return o()(r)},v=(e,t)=>{if(f())return window.videoPressDeleteTrack(t,e.kind,e.srcLang);const r={method:"POST",path:`/videos/${t}/tracks/delete`,apiNamespace:"rest/v1.1",global:!0,parse:!1,formData:[["kind",e.kind],["srclang",e.srcLang]]};return o()(r)};function k(e){let{tracks:t,onChange:r,guid:a}=e;const[o=-1,s]=(0,c.useState)();let l;return l=0===t.length?(0,n.createElement)("p",{className:"videopress-block-tracks-editor__tracks-informative-message"},__("Tracks can be subtitles, captions, chapters, or descriptions. They help make your content more accessible to a wider range of users.","jetpack")):t.map(((e,l)=>(0,n.createElement)("div",{key:l,className:"videopress-block-tracks-editor__track-list-track"},(0,n.createElement)("span",null,e.label),(0,n.createElement)("div",{className:"videopress-block-tracks-editor__track-list-track-delete"},(0,n.createElement)(i.Button,{variant:"link",isDestructive:!0,onClick:()=>{(e=>{const n=t[e];s(e),v(n,a).finally((()=>{r(t.filter(((t,r)=>r!==e))),s(-1)}))})(l)},"aria-label":(0,u.sprintf)(/* translators: %s: Label of the video text track e.g: "French subtitles" */
__("Delete %s","jetpack"),e.label),disabled:o===l},o===l?__("Deleting","jetpack"):__("Delete","jetpack",0)))))),(0,n.createElement)(i.MenuGroup,{label:__("Text tracks","jetpack"),className:"videopress-block-tracks-editor__track-list"},l)}function y(e){let{track:t,guid:r,onChange:a,onClose:o,onCancel:d,trackExists:g}=e;const[f,v]=(0,c.useState)(),[k=!1,y]=(0,c.useState)(),{label:E="",srcLang:w="",kind:_=p}=t,C=t.tmpFile?t.tmpFile.name:"";if(!(0,l.useSelect)((e=>e(s.store).getSettings().mediaUpload),[]))return null;return(0,n.createElement)(i.NavigableMenu,null,(0,n.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor"},(0,n.createElement)("span",{className:"videopress-block-tracks-editor__single-track-editor-label"},__("Edit track","jetpack")),(0,n.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file"},(0,n.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-label"},(0,n.createElement)("span",null,__("File","jetpack"),":"),""!==C&&(0,n.createElement)("span",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-label-name"},(0,n.createElement)("strong",null,C)),(0,n.createElement)(s.MediaUploadCheck,null,(0,n.createElement)(i.FormFileUpload,{onChange:e=>{const r=e.target.files;!r.length>0||(t.tmpFile=r[0],a(t))},accept:m,render:e=>{let{openFileDialog:t}=e;return(0,n.createElement)(i.Button,{variant:"link",onClick:()=>{t()}},""===C?__("Select track","jetpack"):__("Change track","jetpack",0))},disabled:k}))),(0,n.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-help"},/* translators: %s: The allowed file types to be uploaded as a video text track." */
(0,u.sprintf)(__("Allowed formats: %s","jetpack"),m))),(0,n.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-label-language"},(0,n.createElement)(i.TextControl,{onChange:e=>a({...t,label:e}),label:__("Label","jetpack"),value:E,help:__("Title of track","jetpack"),disabled:k}),(0,n.createElement)(i.TextControl,{onChange:e=>a({...t,srcLang:e}),label:__("Source language","jetpack"),value:w,help:__("Language tag (en, fr, etc.)","jetpack"),disabled:k})),(0,n.createElement)(i.SelectControl,{className:"videopress-block-tracks-editor__single-track-editor-kind-select",options:h,value:_,label:/* translators: %s: The kind of video text track e.g: "Subtitles, Captions" */
__("Kind","jetpack"),onChange:e=>{a({...t,kind:e})},disabled:k}),(0,n.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-buttons-container"},k?(0,n.createElement)(i.Spinner,null):(0,n.createElement)(i.Button,{variant:"secondary",disabled:!t.tmpFile,onClick:()=>{v(null),""===E&&(t.label=__("English","jetpack")),""===w&&(t.srcLang="en"),void 0===t.kind&&(t.kind=p),g(t)?v(__("A track already exists for that language and kind.","jetpack")):(y(!0),b(t,r).then((()=>{a(t),v(null),o()})).catch((e=>{e.message&&v(e.message)})).finally((()=>{y(!1)})))}},__("Save","jetpack")),(0,n.createElement)(i.Button,{variant:"link",onClick:d},__("Close","jetpack"))),f&&(0,n.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-error"},/* translators: %s: An error message returned after a failed video track file upload." */
(0,u.sprintf)(__("Error: %s","jetpack"),f))))}function E(e){let{tracks:t=[],onChange:r,guid:a}=e;const[o,s]=(0,c.useState)(null);return(0,n.createElement)(i.Dropdown,{contentClassName:"videopress-block-tracks-editor",renderToggle:e=>{let{isOpen:t,onToggle:r}=e;return(0,n.createElement)(i.ToolbarButton,{label:__("Text tracks","jetpack"),showTooltip:!0,"aria-expanded":t,"aria-haspopup":"true",onClick:r,icon:g})},renderContent:()=>null!==o?(0,n.createElement)(y,{track:t[o],guid:a,onChange:e=>{const n=[...t];n[o]=e,r(n)},onClose:()=>s(null),onCancel:()=>{r(t.filter(((e,t)=>t!==o))),s(null)},trackExists:e=>-1!==t.filter(((e,t)=>t!==o)).findIndex((t=>t.kind===e.kind&&t.srcLang===e.srcLang))}):(0,n.createElement)(n.Fragment,null,(0,n.createElement)(i.NavigableMenu,null,(0,n.createElement)(k,{tracks:t,onChange:r,guid:a}),(0,n.createElement)(i.MenuGroup,{className:"videopress-block-tracks-editor__add-tracks-container",label:__("Add tracks","jetpack")},(0,n.createElement)(i.MenuItem,{icon:d.Z,onClick:()=>{(()=>{const e=t.length,n=[...t];n[e]||(n[e]={}),n[e]={...t[e]},r(n),s(e)})()}},__("Upload track","jetpack")))))})}},32478:(e,t,r)=>{"use strict";r.d(t,{$:()=>g});var n=r(51806),a=r(52175),o=r(55609),s=r(69307),i=r(65736),l=r(61074),c=r(65235),u=r.n(c),d=r(81427);const __=i.__,p=["image"],m=e=>{const{videoPosterImageUrl:t}=e;return(0,n.createElement)("div",{className:"resumable-upload__editor-thumb-placeholder"},t?(0,n.createElement)(n.Fragment,null,(0,n.createElement)("img",{src:t,alt:"Poster"}),(0,n.createElement)(l.Z,{className:"uploading-editor__play-icon",icon:d.o1})):(0,n.createElement)("span",null,"No Poster Selected"))},h=e=>{const{onSelectPoster:t,onRemovePoster:r}=e;return(0,n.createElement)(o.BaseControl,{className:u()(e.className,"editor-video-poster-control")},(0,n.createElement)(m,e),(0,n.createElement)(a.MediaUpload,{title:__("Select Poster Image","jetpack"),onSelect:t,allowedTypes:p,render:e=>{let{open:t}=e;return(0,n.createElement)("div",{className:"poster-selector__buttons"},(0,n.createElement)(o.Button,{onClick:r,variant:"link",isDestructive:!0},__("Remove Poster Image","jetpack")),(0,n.createElement)(o.Button,{variant:"secondary",onClick:t},__("Select Poster Image","jetpack")))}}))},g=e=>{const{file:t,onSelectPoster:r,onRemovePoster:i,videoPosterImageData:c,title:u,onChangeTitle:m,onVideoFrameSelected:g}=e,[f,b]=(0,s.useState)(0),[v,k]=(0,s.useState)(!0),y=(0,s.useRef)(null),E=(0,s.useRef)(null),w=()=>{k(!1)};(0,s.useEffect)((()=>{null!==t&&y&&(y.current.src=URL.createObjectURL(t))}),[t,y]);const _={};return c&&(_.display="none"),(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:"uploading-editor"},(0,n.createElement)("div",{className:"uploading-editor__summary"}),(0,n.createElement)("div",{className:"uploading-editor__fields"},(0,n.createElement)(o.TextControl,{label:__("Video title","jetpack"),className:"uploading-editor__title",onChange:m,value:u}),(0,n.createElement)("div",{className:"uploading-editor__content"},(0,n.createElement)(o.BaseControl,{label:__("Video poster (optional)","jetpack")},v?(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:"uploading-editor__video-container"},(0,n.createElement)("div",{className:"uploading-editor__video-poster-wrapper"},c&&(0,n.createElement)(h,{onSelectPoster:r,onRemovePoster:i,videoPosterImageUrl:c.url}),(0,n.createElement)("video",{ref:y,muted:!0,className:"uploading-editor__video",onDurationChange:e=>{const t=e.target.duration;b(t),y.current&&(y.current.currentTime=t/2)},onError:w,onLoadedMetadata:e=>{e.target.videoHeight||w()},style:_})),!c&&(0,n.createElement)(l.Z,{className:"uploading-editor__play-icon",icon:d.o1})),(0,n.createElement)("span",{style:_},(0,n.createElement)(o.RangeControl,{className:"uploading-editor__range",min:"0",step:"0.1",max:f,showTooltip:!1,withInputField:!1,onChange:e=>{g(1e3*e),y.current&&(y.current.currentTime=e)}})),(0,n.createElement)("span",{className:"uploading-editor__scrubber-help",style:_},(0,s.createInterpolateElement)(__("This is how the video will look. Use the slider to choose a poster or <a>select a custom one</a>.","jetpack"),{a:(0,n.createElement)(a.MediaUpload,{title:__("Select Poster Image","jetpack"),onSelect:r,allowedTypes:p,render:e=>{let{open:t}=e;return(0,n.createElement)("a",{className:"uploading-editor__upload-link",onClick:t,onKeyDown:t,ref:E,role:"button",tabIndex:0},__("select a custom one","jetpack"))}})}))):(0,n.createElement)(h,{onSelectPoster:r,videoPosterImageUrl:c?c.url:null}))))))}},90953:(e,t,r)=>{"use strict";r.d(t,{p:()=>a});var n=r(96483);const a=(e,t)=>{let{autoplay:r,controls:a,loop:o,muted:s,playsinline:i,poster:l,preload:c,seekbarColor:u,seekbarPlayedColor:d,seekbarLoadingColor:p,useAverageColor:m}=t;if(!e)return null;const h={resizeToParent:!0,cover:!0,...r&&{autoPlay:!0},...!a&&{controls:!1},...o&&{loop:!0},...s&&{muted:!0,persistVolume:!1},...i&&{playsinline:!0},...l&&{posterUrl:l},...""!==c&&{preloadContent:c},...""!==u&&{sbc:u},...""!==d&&{sbpc:d},...""!==p&&{sblc:p},...m&&{useAverageColor:!0}};return(0,n.addQueryArgs)(`https://videopress.com/v/${e}`,h)}},77290:(e,t,r)=>{"use strict";r.d(t,{K8:()=>l,Kp:()=>u,Zx:()=>c,f6:()=>i});var n=r(65235),a=r.n(n),o=r(90879);const s=e=>{const t=o.s.reduce(((e,t)=>{let{className:r}=t;return e[r]=!1,e}),{"wp-has-aspect-ratio":!1});return a()(e,t)};function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!(!(arguments.length>2&&void 0!==arguments[2])||arguments[2]))return s(t);const r=document.implementation.createHTMLDocument("");r.body.innerHTML=e;const n=r.body.querySelector("iframe");if(n&&n.height&&n.width){const e=(n.width/n.height).toFixed(2);for(let r=0;r<o.s.length;r++){const n=o.s[r];if(e>=n.ratio)return a()(s(t),n.className,"wp-has-aspect-ratio")}}return t}const l=e=>e.replace(/\.[^/.]+$/,""),c=e=>{if(!e||"string"!=typeof e)return null;const t=e.match(/^https?:\/\/(?<host>video(?:\.word|s\.files\.word)?press\.com)(?:\/v|\/embed)?\/(?<guid>[a-zA-Z\d]{8})/);return t?.groups?.guid?t.groups.guid:null},u=e=>{const{guid:t,videoPressTracks:r,isVideoPressExample:n}=e;if(!t?.length)return!1;if(!Array.isArray(r))return!1;return!(!Object.keys(e).includes("isVideoPressExample")||"boolean"!=typeof n)}},65192:(e,t,r)=>{"use strict";r.d(t,{Z:()=>g});var n=r(51806),a=r(13419),o=r(52175),s=r(4981),i=r(55609),l=r(9818),c=r(12238),u=r(65736),d=(r(99196),r(77290)),p=r(5743);const __=u.__,m={instances:[]},h=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(m.instances=[]),e.forEach((e=>{if(e.innerBlocks.length)return void h(e.innerBlocks,!1,t+1);const{clientId:r,name:n,attributes:a}=e;"core/video"===n&&(0,d.Kp)(a)&&m.instances.push({clientId:r,name:n,attributes:a})})),0===t)return m.instances};function g(e){let{clientId:t,attributes:r}=e;const u=(0,l.useSelect)((e=>e(c.store).getCurrentPostId())),{getBlocks:m}=(0,l.useSelect)(o.store),{replaceBlock:g}=(0,l.useDispatch)(o.store),{tracks:f}=(0,a.z$)();return(0,n.createElement)("div",{className:p.Z.wrapper},(0,n.createElement)(i.Notice,{status:"info",isDismissible:!1,className:p.Z["conversion-notice"]},__("You can transform this post's video blocks to the new VideoPress block to take advantage of new features, such as adding chapters directly in the description or hiding the video's share menu.","jetpack")),(0,n.createElement)(i.Button,{variant:"primary",onClick:()=>{const e=h(m(),!0);e?.length&&(e.find((e=>e.clientId===t))||e.push({clientId:t,name:"core/video",currentBlockAttributes:r}),e.forEach((e=>{const{clientId:t,name:r,attributes:n}=e;"core/video"===r&&(0,d.Kp)(n)&&(g(t,(0,s.createBlock)("videopress/video",n)),f.recordEvent("jetpack_editor_videopress_block_manual_conversion_click",{post_id:u}))})))}},__("Transform blocks to VideoPress","jetpack")))}},68938:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(52175),o=r(94333),s=r(77290),i=r(65192);const l=(0,o.createHigherOrderComponent)((e=>t=>(0,s.Kp)(t.attributes)?(0,n.createElement)(n.Fragment,null,(0,n.createElement)(a.InspectorControls,null,(0,n.createElement)(i.Z,{clientId:t.clientId,attributes:t.attributes})),(0,n.createElement)(e,t)):(0,n.createElement)(e,t)))},23062:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(13419),a=r(68938);const o="videopress/video";function s(e,t){if("core/video"!==t)return e;const{available:r}=(0,n.OZ)(o);return r?{...e,edit:(0,a.Z)(e.edit)}:e}},73859:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(51806),a=r(55609),o=r(65736),s=r(78680),i=r(75255);const __=o.__,l="videopress/video-chapters",c=!!window?.Jetpack_Editor_Initial_State?.available_blocks[l],u=31;function d(e){let{isRequestingVideoItem:t}=e;const{attributes:r,setAttributes:o}=(0,i.Z)(),{title:d,description:p}=r,m=(0,s.L)(l),h=p?.length?p.split("\n").map((e=>Math.ceil(e.length/u)||1)).reduce(((e,t)=>e+t),0):4,g=Math.min(12,Math.max(h,4));if(!c)return null;return(0,n.createElement)(a.PanelBody,{title:__("Details","jetpack"),className:m?"is-beta":""},(0,n.createElement)(a.TextControl,{label:__("Title","jetpack"),value:d,placeholder:__("Video title","jetpack"),onChange:e=>{o({title:e})},disabled:t}),(0,n.createElement)(a.TextareaControl,{label:__("Description","jetpack"),value:p,placeholder:__("Video description","jetpack"),onChange:e=>{o({description:e})},disabled:t,rows:g}))}},24288:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(51806),a=r(52175),o=r(94333),s=r(69307),i=r(73859),l=r(67203),c=r(49664),u=r(84676);const d=(0,o.createHigherOrderComponent)((e=>t=>{const{attributes:r,setAttributes:o}=t,[d,p]=(0,l.Z)(r?.id),[m]=(0,c.v)(r);return(0,s.useEffect)((()=>{if(!d)return;const e={};d?.title&&(e.title=d.title),d?.description&&(e.description=d.description),Object.keys(e).length&&(o(e),m(e))}),[d,o,m]),u.d&&"core/video"!==!t.name&&t.attributes?.guid?(0,n.createElement)(n.Fragment,null,(0,n.createElement)(a.InspectorControls,null,(0,n.createElement)(i.Z,{isRequestingVideoItem:p})),(0,n.createElement)(e,t)):(0,n.createElement)(e,t)}))},75255:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(52175),a=r(9818);function o(){const{clientId:e,attributes:t}=(0,a.useSelect)((e=>{const t=e(n.store).getSelectedBlockClientId();return{clientId:t,attributes:t?e("core/block-editor").getBlockAttributes(t):void 0}})),{updateBlockAttributes:r}=(0,a.useDispatch)(n.store);return{clientId:e,attributes:t,setAttributes:t=>r(e,t)}}},49664:(e,t,r)=>{"use strict";r.d(t,{v:()=>g});var n=r(86989),a=r.n(n),o=r(94333),s=r(37798),i=r(9818),l=r(12238),c=r(69307),u=r(65736),d=r(22081),p=r(90953),m=r(6268),h=r(38871);const __=u.__;function g(e){const{id:t,title:r,description:n,guid:u}=e,g=(0,i.useSelect)((e=>e(l.store).isSavingPost()),[]),f=(0,o.usePrevious)(g),b=(0,i.useDispatch)(s.store).invalidateResolution,[v,k]=(0,c.useState)(),y=(0,c.useCallback)((e=>{k((t=>({...t,...e})))}),[]);(0,c.useEffect)((()=>{k({title:r,description:n})}),[]);const E=function(e){return t=>new Promise(((r,n)=>{a()({path:"/wpcom/v2/videopress/meta",method:"POST",data:{id:e,...t}}).then((e=>{if(200!==e?.data)return n(e);r(e)})).catch(n)}))}(t);return(0,c.useEffect)((()=>{if(!g||f)return;if(!t)return;const a={};if(v?.title!==r&&(a.title=r),v?.description!==n&&(a.description=n),!Object.keys(a).length)return;if(E(a).then((()=>y({title:r,description:n}))),!a?.description?.length)return;const o=(0,m.ZP)(a.description);if(!o?.length)return;const s={label:__("English","jetpack"),srcLang:"en",kind:"chapters",tmpFile:(0,h.ZP)(a.description)};(0,d.n)(s,u).then((()=>{const t=(0,p.p)(u,e);b("getEmbedPreview",[t])}))}),[g,f,r,v?.title,v?.description,n,E,y,e,b,t,u]),[y]}},67203:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(86989),a=r.n(n),o=r(69307);function s(e){const[t,r]=(0,o.useState)({}),[n,s]=(0,o.useState)(!1);return(0,o.useEffect)((()=>{e&&(s(!0),async function(){try{const t=await a()({path:`/wp/v2/media/${e}`});r(t?.jetpack_videopress||{}),s(!1)}catch(e){throw s(!1),new Error(e)}}())}),[e]),[t,n]}},84676:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o,d:()=>a});var n=r(24288);const a=!!window?.Jetpack_Editor_Initial_State?.available_blocks["videopress/video-chapters"];function o(e,t){if(!a)return e;if("core/video"!==t)return e;const r={...e.attributes,title:{type:"string"},description:{type:"string"}};return{...e,attributes:r,edit:(0,n.Z)(e.edit)}}},6268:(e,t,r)=>{"use strict";function n(e){return e.split("\n").map((e=>function(e){const t=/(?<timeBlock>\(?(?<time>\d{1,2}:\d{2}:\d{2}|\d{1,2}:\d{2})\)?)/.exec(e);if(null==t||null==t.groups)return null;const{groups:{timeBlock:r,time:n}}=t,a=e.indexOf(r),o=(a<(e.length-r.length)/2?e.substring(a+r.length,e.length):e.substring(0,a)).trim().replace(/(\s-$)|(^-\s)/,""),s=n.split(":");return 1===s[0].length&&(s[0]=`0${s[0]}`),2===s.length&&s.unshift("00"),{startAt:s.join(":"),title:o}}(e))).filter((e=>null!==e)).sort(((e,t)=>e.startAt.localeCompare(t.startAt)))}r.d(t,{Tn:()=>n,ZP:()=>n})},38871:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>o});var n=r(6268);function a(e){const t=Math.floor(e/36e5);let r=e-36e5*t;const n=Math.floor(r/6e4);r-=6e4*n;return[t,n,Math.floor(r/1e3)].map((e=>e<10?`0${e}`:e)).join(":")}function o(e,t){const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:359999e3;const r=(0,n.Tn)(e);if(0===r.length)return null;let o="WEBVTT\n",s=1;for(const[e,n]of r.entries()){const i=0===e?"000":"001",l=e<r.length-1?r[e+1].startAt:a(t);o+=`\n${s++}\n${n.startAt}.${i} --\x3e ${l}.000\n${n.title}\n`}return o}(e,t);return r?new File([r],"chapters.vtt",{type:"text/vtt"}):null}},50354:(e,t,r)=>{"use strict";r.d(t,{U:()=>s,m:()=>i});var n=r(51806),a=r(55609),o=r(65736);const __=o.__,s="mrec",i=[{height:250,icon:(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,n.createElement)(a.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-7-2h2V7h-4v2h2z"})),name:__("Rectangle 300x250","jetpack"),tag:s,width:300,editorPadding:30},{height:90,icon:(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,n.createElement)(a.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-4-4h-4v-2h2c1.1 0 2-.89 2-2V9c0-1.11-.9-2-2-2H9v2h4v2h-2c-1.1 0-2 .89-2 2v4h6v-2z"})),name:__("Leaderboard 728x90","jetpack"),tag:"leaderboard",width:728,editorPadding:60},{height:50,icon:(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,n.createElement)(a.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-4-4v-1.5c0-.83-.67-1.5-1.5-1.5.83 0 1.5-.67 1.5-1.5V9c0-1.11-.9-2-2-2H9v2h4v2h-2v2h2v2H9v2h4c1.1 0 2-.89 2-2z"})),name:__("Mobile Leaderboard 320x50","jetpack"),tag:"mobile_leaderboard",width:320,editorPadding:100},{height:600,icon:(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{fill:"none",d:"M.04 0h24v24h-24V0z"}),(0,n.createElement)(a.Path,{d:"M19.04 3h-14c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16h-14V5h14v14zm-6-2h2V7h-2v4h-2V7h-2v6h4z"})),name:__("Wide Skyscraper 160x600","jetpack"),tag:"wideskyscraper",width:160,editorPadding:30}]},56565:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(52175),o=r(55609),s=r(65736),i=r(1020);const __=s.__,l=e=>{let{value:t,onChange:r}=e;return(0,n.createElement)(o.PanelBody,{title:__("Visibility","jetpack")},(0,n.createElement)(o.ToggleControl,{className:"jetpack-wordads__mobile-visibility",checked:!!t,label:__("Hide on mobile","jetpack"),help:__("Hides this block for site visitors on mobile devices.","jetpack"),onChange:r}))},c=e=>{let{attributes:{format:t,hideMobile:r},setAttributes:o}=e;return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(a.BlockControls,null,(0,n.createElement)(i.Z,{value:t,onChange:e=>o({format:e})})),(0,n.createElement)(a.InspectorControls,null,(0,n.createElement)(l,{value:r,onChange:e=>o({hideMobile:!!e})})))}},53193:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(51806),a=r(50354),o=r(56565),s=r(80405),i=r(72473),l=r(38511),c=r(52203);const u=e=>{let{attributes:t,setAttributes:r}=e;const{format:u}=t,d=a.m.find((e=>{let{tag:t}=e;return t===u}));return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(o.Z,{attributes:t,setAttributes:r}),(0,n.createElement)("div",{className:`wp-block-jetpack-wordads jetpack-wordads-${u}`},(0,n.createElement)("div",{className:"jetpack-wordads__ad",style:{width:d.width,height:d.height,backgroundImage:`url( ${(e=>{switch(e){case"leaderboard":return c;case"mobile_leaderboard":return l;case"wideskyscraper":return s;default:return i}})(u)} )`,backgroundSize:"cover"}})))}},3432:(e,t,r)=>{"use strict";var n=r(31985),a=r(57795);(0,n.Z)(a.u2,a.Xd)},1020:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(55609),o=r(65736),s=r(50354);const i=(0,o.__)("Pick an ad format","jetpack");function l(e){let{value:t,onChange:r}=e;return(0,n.createElement)(a.Dropdown,{placement:"bottom-start",renderToggle:e=>{let{onToggle:t,isOpen:r}=e;return(0,n.createElement)(a.ToolbarGroup,{controls:[{icon:(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,n.createElement)(a.Path,{d:"M1 9h2V7H1v2zm0 4h2v-2H1v2zm0-8h2V3c-1.1 0-2 .9-2 2zm8 16h2v-2H9v2zm-8-4h2v-2H1v2zm2 4v-2H1c0 1.1.9 2 2 2zM21 3h-8v6h10V5c0-1.1-.9-2-2-2zm0 14h2v-2h-2v2zM9 5h2V3H9v2zM5 21h2v-2H5v2zM5 5h2V3H5v2zm16 16c1.1 0 2-.9 2-2h-2v2zm0-8h2v-2h-2v2zm-8 8h2v-2h-2v2zm4 0h2v-2h-2v2z"})),title:i,onClick:t,extraProps:{"aria-expanded":r},className:"wp-block-jetpack-wordads__format-picker-icon"}]})},renderContent:e=>{let{onClose:o}=e;return(0,n.createElement)(a.NavigableMenu,{className:"wp-block-jetpack-wordads__format-picker"},s.m.map((e=>{let{tag:s,name:i,icon:l}=e;return(0,n.createElement)(a.MenuItem,{className:s===t?"is-active":void 0,icon:l,isSelected:s===t,key:s,onClick:()=>{r(s),o()},role:"menuitemcheckbox"},i)})))}})}},57795:(e,t,r)=>{"use strict";r.d(t,{Xd:()=>m,u2:()=>u});var n=r(51806),a=r(55609),o=r(69307),s=r(65736),i=r(70355),l=r(50354),c=r(53193);const __=s.__,_x=s._x,u="wordads",d=__("Ad","jetpack"),p=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,n.createElement)(a.Path,{fill:"currentColor",d:"M12,8H4A2,2 0 0,0 2,10V14A2,2 0 0,0 4,16H5V20A1,1 0 0,0 6,21H8A1,1 0 0,0 9,20V16H12L17,20V4L12,8M15,15.6L13,14H4V10H13L15,8.4V15.6M21.5,12C21.5,13.71 20.54,15.26 19,16V8C20.53,8.75 21.5,10.3 21.5,12Z"})),m={title:d,description:(0,n.createElement)(o.Fragment,null,(0,n.createElement)("p",null,__("Earn income by adding high quality ads to your post","jetpack")),(0,n.createElement)(a.ExternalLink,{href:"https://wordads.co/"},__("Learn all about WordAds","jetpack"))),icon:{src:p,foreground:(0,i.m)()},attributes:{align:{type:"string",default:"center"},format:{type:"string",default:l.U},hideMobile:{type:"boolean",default:!1}},example:{attributes:{}},category:"earn",keywords:[_x("ads","block search term","jetpack"),"WordAds",_x("advertisement","block search term","jetpack")],supports:{align:["left","center","right"],alignWide:!1,className:!1,customClassName:!1,html:!1,reusable:!1},edit:c.Z,save:()=>null}},78680:(e,t,r)=>{"use strict";r.d(t,{L:()=>d});var n=r(82674),a=r.n(n),o=r(51806),s=r(86989),i=r.n(s),l=r(94333),c=r(92694),u=(r(80425),r(85921),r(63066),r(92713),r(54414),r(36215),r(31657),r(23984),r(14688),r(7652),r(1949));function d(e){if(!u)return!1;const t=u.beta||[],r=e.replace(/jetpack\//,"");return t.includes(e)||t.includes(r)}i().use(((e,t)=>{if("cors"===e.mode)return t(e);if(e.url)try{const r=new URL(e.url,location.href);if(r.protocol!==location.protocol||r.hostname!==location.hostname||r.port!==location.port)return t(e)}catch{return t(e)}return e.headers||(e.headers={}),e.headers["x-wp-api-fetch-from-editor"]="true",t(e)})),(0,c.addFilter)("blocks.registerBlockType","jetpack/label-beta-blocks-title",(function(e,t){return d(t)?{...e,title:`${e.title} (beta)`,kewords:[...e.keywords,"beta"]}:e}));const p=(0,l.createHigherOrderComponent)((e=>t=>{if(t?.clientRootId)return(0,o.createElement)(e,t);const{name:r}=t;return d(r)?(0,o.createElement)(e,a()({},t,{className:"is-beta-extension"})):(0,o.createElement)(e,t)}),"withBetaClassName");(0,c.addFilter)("editor.BlockListBlock","jetpack/label-beta-extensions",p)},6460:(e,t,r)=>{"use strict";var n=r(4981),a=r(65736),o=r(81427);const __=a.__,s={name:"descript",title:"Descript",icon:o.h,keywords:[__("descript","jetpack")],description:__("Embed a Descript Item.","jetpack"),patterns:[/^https:\/\/share.descript.com\/(view|embed)\/\w+/i],attributes:{providerNameSlug:"descript",responsive:!0}};(0,n.registerBlockVariation)("core/embed",s)},5166:(e,t,r)=>{"use strict";var n=r(92694),a=r(65736),o=r(70355);const __=a.__,_x=a._x,s={name:"facebook",title:"Facebook",icon:{src:"facebook",foreground:(0,o.m)()},keywords:[_x("social","block search term","jetpack")],description:__("Embed a Facebook post.","jetpack"),patterns:[/^https?:\/\/www\.facebook.com\/.+/i],attributes:{providerNameSlug:"facebook",previewable:!1,responsive:!0}};(0,n.addFilter)("blocks.registerBlockType","reactivateFacebookEmbedBlockVariation",(function(e,t){if("core/embed"!==t||!e.variations)return e;const r=e.variations.filter((e=>e.name!==s.name));return e.variations=[...r,s],e}))},36215:(e,t,r)=>{"use strict";r(5166),r(20970),r(25467),r(91128),r(6460)},20970:(e,t,r)=>{"use strict";var n=r(92694),a=r(65736),o=r(70355),s=r(12923);const __=a.__,_x=a._x,i={name:"instagram",title:"Instagram",icon:{src:"instagram",foreground:(0,o.m)()},keywords:[_x("image","block search term","jetpack"),_x("social","block search term","jetpack")],description:__("Embed an Instagram post.","jetpack"),patterns:[/^https?:\/\/(www\.)?instagr(\.am|am\.com)\/.+/i],attributes:{providerNameSlug:"instagram",responsive:!0}};(0,n.addFilter)("blocks.registerBlockType","reactivateInstagramEmbedBlockVariation",(function(e,t){if("core/embed"!==t||!e.variations||!(0,s.Z)())return e;const r=e.variations.filter((e=>e.name!==i.name));return e.variations=[...r,i],e}))},25467:(e,t,r)=>{"use strict";var n=r(4981),a=r(65736),o=r(81427);const __=a.__,s={name:"loom",title:"Loom",icon:o.zf,keywords:[__("video","jetpack")],description:__("Embed a Loom video.","jetpack"),patterns:[/^https?:\/\/(www\.)?loom\.com\/share\/.+/i],attributes:{providerNameSlug:"loom",responsive:!0}};(0,n.registerBlockVariation)("core/embed",s)},91128:(e,t,r)=>{"use strict";var n=r(4981),a=r(65736),o=r(81427);const __=a.__,s={name:"smartframe",title:"SmartFrame",icon:o.Ae,keywords:[__("smartframe","jetpack")],description:__("Embed a SmartFrame Image.","jetpack"),patterns:[/^https?:\/\/(.*?).smartframe.(io|net)\/.*/i],attributes:{providerNameSlug:"smartframe",responsive:!0}};(0,n.registerBlockVariation)("core/embed",s)},31657:(e,t,r)=>{"use strict";var n=r(4981),a=r(92694),o=r(6512);const s={from:[{type:"block",isMultiBlock:!1,blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:r}=e;return!!r?.raw&&"jetpack_widget_social_icons"===t},transform:e=>{let{instance:t}=e,r=[];return t.raw.icons.forEach((e=>{const t=new URL(e.url.includes(":")?e.url:"https://"+e.url),a=t.hostname?t.hostname:t.protocol,s=o.Z.find((e=>a.includes(e.url)||e.url.includes(a))),i=(0,n.createBlock)("core/social-link",{service:s?s.name:"chain",url:e.url});r=[...r,i]})),(0,n.createBlock)("core/social-links",{},r)}}]};(0,a.addFilter)("blocks.registerBlockType","addTransformToSocialLinksWidget",(function(e,t){return"core/social-links"!==t||(e.transforms=s),e}))},6512:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=[{name:"wordpress",url:["wordpress."]},{name:"fivehundredpx",url:["500px.com"]},{name:"amazon",url:["amazon."]},{name:"bandcamp",url:["bandcamp.com"]},{name:"behance",url:["behance.net"]},{name:"codepen",url:["codepen.io"]},{name:"deviantart",url:["deviantart.com"]},{name:"dribbble",url:["dribbble.com"]},{name:"dropbox",url:["dropbox.com"]},{name:"etsy",url:["etsy.com"]},{name:"facebook",url:["facebook.com"]},{name:"flickr",url:["flickr.com"]},{name:"foursquare",url:["foursquare.com"]},{name:"goodreads",url:["goodreads.com"]},{name:"google",url:["google."]},{name:"github",url:["github.com"]},{name:"instagram",url:["instagram.com"]},{name:"lastfm",url:["last.fm"]},{name:"linkedin",url:["linkedin.com"]},{name:"mail",url:["mailto:"]},{name:"linkedin",url:["linkedin.com"]},{name:"mastodon",url:["mastodon.social"]},{name:"meetup",url:["meetup.com"]},{name:"medium",url:["medium.com"]},{name:"patreon",url:["patreon.com"]},{name:"pinterest",url:["pinterest."]},{name:"pocket",url:["getpocket.com"]},{name:"reddit",url:["reddit.com"]},{name:"skype",url:["skype.com","skype:"]},{name:"snapchat",url:["snapchat.com"]},{name:"soundcloud",url:["soundcloud.com"]},{name:"spotify",url:["spotify.com"]},{name:"telegram",url:["telegram.me","t.me"]},{name:"tiktok",url:["tiktok.com"]},{name:"tumblr",url:["tumblr.com"]},{name:"twitch",url:["twitch.tv"]},{name:"twitter",url:["twitter.com"]},{name:"vimeo",url:["vimeo.com"]},{name:"vk",url:["vk.com"]},{name:"yelp",url:["yelp.com"]},{name:"youtube",url:["youtube.com"]}]},87950:(e,t,r)=>{"use strict";r.d(t,{L:()=>s,x:()=>o});var n=r(51806),a=r(69307);const o=(0,a.createContext)(),s=e=>{let{onBannerVisibilityChange:t,hasParentBanner:r,children:a}=e;return(0,n.createElement)(o.Provider,{value:{onBannerVisibilityChange:t,hasParentBanner:r},children:a})}},23984:(e,t,r)=>{"use strict";var n=r(13419),a=r(47701),o=r.n(a),s=r(92694),i=r(65736),l=r(92819),c=r(30371),u=r(7832),d=r(42770),p=r(27003);const __=i.__,m=[];(0,s.addFilter)("blocks.registerBlockType","jetpack/paid-block",((e,t)=>((0,n.X1)(t)&&(m.includes(t)||m.push(t),e.keywords=(0,l.uniq)([...e.keywords,"premium",__("premium","jetpack")]),(0,n.HD)(t)||(e.icon=(0,d.Z)(e.icon)),e.attributes.shouldDisplayFrontendBanner||(e.attributes.shouldDisplayFrontendBanner={type:"boolean",default:!0}),"core/cover"!==t&&(e.supports={...e.supports,__experimentalExposeControlsToChildren:!0})),e))),(0,s.addFilter)("editor.BlockEdit","jetpack/paid-block-with-warning",p.Z),(0,s.addFilter)("editor.MediaPlaceholder","jetpack/paid-block-media-placeholder",c.Z),(0,s.addFilter)("editor.MediaReplaceFlow","jetpack/paid-block-media-placeholder",u.Z),o()((function(){(0,n.FK)()&&document.body.classList.add("jetpack-enable-upgrade-nudge")}))},30371:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(82674),a=r.n(n),o=r(51806),s=r(13419),i=r(52175),l=r(94333),c=r(69307),u=r(11317),d=r(87950);const p=(0,l.createHigherOrderComponent)((e=>t=>{const{name:r}=(0,i.useBlockEditContext)(),n=(0,s.m3)(r);if(!n?.mediaPlaceholder||!(0,s.X1)(r))return(0,o.createElement)(e,t);const{fileType:l}=n,{onError:p}=t,{onBannerVisibilityChange:m}=(0,c.useContext)(d.x),h=(0,c.useCallback)((e=>m(e?.length&&(0,u.Qu)(e[0],l))),[l,m]),g=(0,c.useCallback)((e=>{const t=e?.[0]?.props?.children;return(0,u.Qu)(t,l)?h([t]):p(e)}),[h,l,p]);return(0,o.createElement)("div",{className:"paid-block-media-placeholder"},(0,o.createElement)(e,a()({},t,{onFilesPreUpload:h,onError:g})))}),"withMediaPlaceholderUpgradable")},7832:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(82674),a=r.n(n),o=r(51806),s=r(13419),i=r(52175),l=r(94333),c=r(69307),u=r(11317),d=r(87950);const p=(0,l.createHigherOrderComponent)((e=>t=>{const{name:r}=(0,i.useBlockEditContext)(),n=(0,s.m3)(r),l=(0,c.useRef)();if(!n?.mediaReplaceFlow||!(0,s.X1)(r))return(0,o.createElement)(e,t);const{fileType:p}=n,{onBannerVisibilityChange:m}=(0,c.useContext)(d.x);return(0,o.createElement)(e,a()({},t,{onFilesUpload:e=>{l.current=e?.length?e[0]:null,m(e?.length&&(0,u.Qu)(e[0],p))},createNotice:(e,r,n)=>{if((0,u.Qu)(l.current,p))return l.current=null,null;t.createNotice(e,r,n)}}))}),"withMediaReplaceFlowUpgradable")},95796:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(55609);const o=e=>{let{cx:t=23,cy:r=3,r:o=4,fill:s="#e34c84",stroke:i="#ffffff",strokeWidth:l="2"}=e;return(0,n.createElement)(a.Circle,{className:"jetpack-paid-block-symbol",cx:t,cy:r,r:o,fill:s,stroke:i,strokeWidth:l})}},42770:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l,p:()=>c});var n=r(51806),a=r(13419),o=r(69307),s=r(95796);const i=e=>(e?.src?e={...e,src:(0,o.cloneElement)(e.src,{children:[e.src.props.children,(0,n.createElement)(s.Z,{key:"paid-symbol"})]})}:e?.props?.children&&(e=(0,o.cloneElement)(e,{children:[e.props.children,(0,n.createElement)(s.Z,{key:"paid-symbol"})]})),e),l=i;function c(e,t){return(0,a.X1)(e)?i(t):t}},66316:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>d});var n=r(51806),a=r(9818),o=r(65736),s=r(26546),i=r(78798);const __=o.__,_x=o._x,l=__("Premium Block","jetpack"),/** translators: %s: name of the plan. */
c=__("Upgrade to %s to use this premium block","jetpack"),u=(__("Upgrade your plan to use this premium block","jetpack"),_x("Upgrade","Call to action to buy a new plan","jetpack")),d=e=>{let{onRedirect:t,align:r,className:d,title:p=l,description:m=null,buttonText:h=u,visible:g=!0,requiredPlan:f,context:b}=e;const[v,k,y]=(0,i.Z)(f,t),E=(0,a.useSelect)((e=>{if(m)return m;const t=e("wordpress-com/plans"),r=t&&t.getPlan(f);return r?(0,o.sprintf)(c,r.product_name_short):null}),[m]);return E&&(0,n.createElement)(s.p,{align:r,buttonText:h,checkoutUrl:v,className:d,context:b,description:E,goToCheckoutPage:k,isRedirecting:y,title:p,visible:g})}},38140:(e,t,r)=>{"use strict";r.d(t,{W:()=>a,v:()=>n});const n=e=>{let{plan:t,blockName:r,context:n,tracks:a}=e;a.recordEvent("jetpack_editor_block_upgrade_click",{plan:t,block:r,context:n})},a=e=>{let{plan:t,blockName:r,context:n,tracks:a}=e;a.recordEvent("jetpack_editor_block_upgrade_banner_impression",{plan:t,block:r,context:n})}},27003:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(51806),a=r(13419),o=r(52175),s=r(94333),i=r(9818),l=r(69307),c=r(87950),u=r(66316),d=r(38140);const p=(0,s.createHigherOrderComponent)((e=>t=>{const{name:r,clientId:s,isSelected:p,attributes:m,setAttributes:h}=t||{},{hasParentBanner:g}=(0,l.useContext)(c.x)||{},{tracks:f}=(0,a.z$)(),b=(0,a.Rl)(r);if(!b)return(0,n.createElement)(e,t);const v=(0,a.HD)(r),k=(0,a.m3)(r),[y,E]=(0,l.useState)(!v),[w,_]=(0,l.useState)(!1),C="editor-canvas",j=(0,i.useSelect)((e=>e("core/block-editor").hasSelectedInnerBlock(s,!0)),[]),S=(p||j)&&y&&!g,x=(0,l.useMemo)((()=>({plan:b,blockName:r,context:C,tracks:f})),[b,r,f]);(0,l.useEffect)((()=>{S&&_(!0)}),[S,_]),(0,l.useEffect)((()=>{!w&&S&&(0,d.W)(x)}),[w,x,S]),(0,l.useEffect)((()=>E(!v)),[m,E,v]),(0,l.useEffect)((()=>{h({shouldDisplayFrontendBanner:!g})}),[h,g]);const P=(0,o.useBlockProps)();return(0,n.createElement)(c.L,{onBannerVisibilityChange:E,hasParentBanner:S},(0,n.createElement)("div",{ref:P.ref},(0,n.createElement)(u.ZP,{className:`is-${r.replace(/\//,"-")}-paid-block`,title:null,align:m?.align,visible:S,description:k?.description,requiredPlan:b,context:C,onRedirect:()=>(0,d.v)(x)}),(0,n.createElement)(e,t)))}),"withUpgradeBanner")},90607:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h});var n=r(51806),a=r(13419),o=r(55609),s=r(72067),i=r(69307),l=r(65736),c=r(63206),u=r(18135),d=r(34613),p=r(75317);const __=l.__,m=e=>{let{onClick:t,type:r}=e;const{tracks:s}=(0,a.z$)(),l=(0,i.useCallback)((e=>{s.recordEvent("jetpack_ai_get_feedback_upgrade_click"),t?.(e)}),[t,s]),c=(0,i.createInterpolateElement)(__("You've reached the Jetpack AI rate limit. <strong>Please reach out to your VIP account team.</strong>","jetpack"),{strong:(0,n.createElement)("strong",null)}),u=(0,i.createInterpolateElement)(__("You have reached the limit of 20 free requests. <button>Upgrade to continue generating feedback.</button>","jetpack"),{button:(0,n.createElement)(o.Button,{variant:"link",onClick:l})});return(0,n.createElement)("div",null,"vip"===r?c:u)};function h(){const{requireUpgrade:e,upgradeType:t}=(0,u.ZP)(),{autosaveAndRedirect:r,isRedirecting:i}=(0,c.Z)(),l=__("AI Assistant","jetpack");return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(d.Z,null,(0,n.createElement)(o.PanelBody,{title:l,initialOpen:!1},(0,n.createElement)(o.PanelRow,null,(0,n.createElement)(p.Z,{busy:i,disabled:e})),e&&(0,n.createElement)(o.PanelRow,null,(0,n.createElement)(m,{onClick:r,type:t})))),(0,n.createElement)(s.PluginPrePublishPanel,{title:l,icon:(0,n.createElement)(a.Pm,null),initialOpen:!1},(0,n.createElement)(p.Z,{busy:i,disabled:e}),e&&(0,n.createElement)(m,{onClick:r,type:t})))}},75317:(e,t,r)=>{"use strict";r.d(t,{Z:()=>b});var n=r(51806),a=r(36222),o=r(13419),s=r(4981),i=r(55609),l=r(9818),c=r(69307),u=r(65736),d=r(39517),p=r(92213),m=r(63634);const __=u.__,h=new p.Z,g=()=>{const e=(0,l.useSelect)((e=>e("core/block-editor").getBlocks()),[]);return e?.length?h.turndown((0,s.serialize)(e)):""},f=e=>{let{requestingState:t,onClose:r}=e;return(0,n.createElement)("div",{className:"ai-assistant-post-feedback__modal-header"},(0,n.createElement)("div",{className:"ai-assistant-post-feedback__modal-title-wrapper"},(0,n.createElement)(a.rp,{state:t}),(0,n.createElement)("h1",{className:"ai-assistant-post-feedback__modal-title"},__("AI Assistant","jetpack"))),(0,n.createElement)(i.Button,{icon:d.Z,label:__("Close","jetpack"),onClick:r}))};function b(e){let{disabled:t=!1,busy:r=!1}=e;const[s,u]=(0,c.useState)(!1),[d,p]=(0,c.useState)(null),{tracks:h}=(0,o.z$)(),b=(0,l.useSelect)((e=>e("core/editor").getCurrentPostId()),[]),v=g(),k=()=>{u(!s)},{request:y,requestingState:E}=(0,a.pw)({askQuestionOptions:{postId:b},onSuggestion:e=>{const t=e.split("\n").map(((e,t)=>e?.length?(0,n.createElement)("p",{key:`line-${t}`},e):null));p(t)},onDone:()=>{},onError:()=>{}});return(0,n.createElement)("div",null,s&&(0,n.createElement)(i.Modal,{__experimentalHideHeader:!0},(0,n.createElement)("div",{className:"ai-assistant-post-feedback__modal-content"},(0,n.createElement)(f,{requestingState:E,onClose:k}),(0,n.createElement)("hr",{className:"ai-assistant-post-feedback__modal-divider"}),(0,n.createElement)("div",{className:"ai-assistant-post-feedback__suggestion"},d))),(0,n.createElement)("p",null,__("Check for mistakes and verify the tone of your post before publishing.","jetpack")),(0,n.createElement)(i.Button,{onClick:()=>{const e=[(0,m.t4)({context:"You are an advanced polyglot ghostwriter. Your task is to review blog content and provide reasonable actions and feedback about the content, without suggesting to rewrite it. This functionality is integrated into the Jetpack product developed by Automattic. Users interact with you through a Gutenberg sidebar. You are inside the WordPress editor",rules:["Format your response in plain text only including line breaks","Focus on feedback and do not summarize the content","Be concise and direct, don't repeat the content and avoid repeating the request. Ex. 'The content delimited ...'","Do not ask to assist with anything else","Answer in the same language as the content"],useGutenbergSyntax:!1,useMarkdown:!1})];e.push({role:"user",content:`Provide a short feedback about the post content delimited with ${m._W}. If it could be improved, provide a list of actions on how to do it. ${(0,m._r)(v)}`}),y(e),k(),h.recordEvent("jetpack_ai_get_feedback",{post_id:b})},variant:"secondary",disabled:!v||t,isBusy:r},__("Generate feedback","jetpack")))}},44359:(e,t,r)=>{"use strict";var n=r(13419),a=r(94746);(0,n.o_)(a.u,a.X)},94746:(e,t,r)=>{"use strict";r.d(t,{X:()=>o,u:()=>a});var n=r(90607);const a="ai-assistant-plugin",o={render:n.Z}},96564:(e,t,r)=>{"use strict";var n=r(13419),a=r(29719);(0,n.o_)(a.u,a.X)},29719:(e,t,r)=>{"use strict";r.d(t,{X:()=>m,u:()=>p});var n=r(51806),a=r(6895),o=r(13419),s=r(55609),i=r(9818),l=r(72067),c=r(12238),u=r(65736),d=r(64967);const __=u.__,p="payments",m={render:()=>{const{tracks:e}=(0,o.z$)(),t=(0,a.Z)("wpcom-payments-donations");return"page"!==(0,i.useSelect)((e=>e(c.store).getCurrentPostType()),[])?null:(0,n.createElement)(l.PluginPostPublishPanel,{className:"jetpack-payments-post-publish-panel",title:__("Start accepting payments","jetpack"),initialOpen:!0,icon:d.Z},(0,n.createElement)("p",null,__("Insert the Payment Button or the Donations Form — no plugin required.","jetpack")),(0,n.createElement)("p",null,(0,n.createElement)(s.ExternalLink,{href:t,onClick:()=>{e.recordEvent("jetpack_editor_payments_post_publish_click")}},__("Learn more about these blocks","jetpack"))))}}},69683:(e,t,r)=>{"use strict";r.d(t,{D:()=>m});var n=r(51806),a=r(49777),o=r(55609),s=r(9818),i=r(12238),l=r(69307),c=r(65736),u=r(81427),d=r(41141);const __=c.__;function p(){const e=(0,l.useRef)(),[t,r]=(0,l.useState)();(0,l.useEffect)((()=>{if(!e?.current)return;const t=e.current.querySelector("svg");if(!t)return;const n=(new XMLSerializer).serializeToString(t);r(`data:image/svg+xml;base64,${window.btoa(n)}`)}),[e]);const o=(0,s.useSelect)((e=>e(i.store).getPermalink()),[]),{dataUrl:c}=(0,d.Z)({generateDataUrl:!0}),p=c||t;return(0,n.createElement)("div",{ref:e},(0,n.createElement)(a.Z,{value:o,size:300,imageSettings:p&&{src:p,width:64,height:64},renderAs:"canvas",level:"H"}),(0,n.createElement)(u.IM,{className:"qr-post-jetpack-logo",size:48,border:2}))}function m(){const e=(0,l.useRef)(),[t,r]=(0,l.useState)(!1);return(0,n.createElement)("div",{className:"qr-post-button"},(0,n.createElement)(o.Button,{variant:"secondary",onClick:()=>r((e=>!e))},__("Get QR code","jetpack")),t&&(0,n.createElement)(o.Modal,{title:__("QR Post code","jetpack"),onRequestClose:()=>r(!1),className:"qr-post-modal"},(0,n.createElement)("div",{className:"qr-post-modal__qr-code",ref:e},(0,n.createElement)(p,null))))}},71664:(e,t,r)=>{"use strict";var n=r(13419),a=r(30730);(0,n.o_)(a.u,a.X)},41141:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(37798),a=r(9818),o=r(69307),s=r(92694);function i(){let{generateDataUrl:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[t,r]=(0,o.useState)(),{id:i,mediaItemData:l}=(0,a.useSelect)((e=>{const{canUser:t,getEntityRecord:r,getEditedEntityRecord:a}=e(n.store),o=a("root","site"),s=r("root","__unstableBase"),i=o?.site_logo,l=s?.site_logo,c=t("update","settings")?i:l,u=c&&e(n.store).getMedia(c,{context:"view"});return{id:c,mediaItemData:u&&{mediaId:u.id,url:u.source_url,alt:u.alt_text}}}),[]);if(!i||!l?.url)return{};if(!e)return{id:i,...l};const c=new Image,u=(0,s.applyFilters)("media.crossOrigin",void 0,l.url);return"string"==typeof u&&(c.crossOrigin=u),c.onload=function(){const e=document.createElement("canvas"),t=e.getContext("2d");e.height=this.naturalHeight,e.width=this.naturalWidth,t.fillStyle="white",t.lineJoin="round",t.fillRect(0,0,e.width,e.height);const n=.08*e.width;t.drawImage(this,n,n,e.width-2*n,e.height-2*n);try{r(e.toDataURL("image/png"))}catch(e){console.warn("Error generating QR code extensions post-publish-qr-post-panel: ",e),console.warn("In case it's a cross-origin issue, take a look at https://developer.wordpress.org/block-editor/reference-guides/filters/editor-filters/#media-crossorigin"),r(null)}},c.src=l.url,{id:i,...l,dataUrl:t}}},30730:(e,t,r)=>{"use strict";r.d(t,{X:()=>g,u:()=>h});var n=r(82674),a=r.n(n),o=r(51806),s=r(13419),i=r(55609),l=r(9818),c=r(72067),u=r(12238),d=r(65736),p=r(34613),m=r(69683);const __=d.__,h="post-publish-qr-post-panel",g={render:function(){const e={name:"post-publish-qr-post-panel",title:__("QR Code","jetpack"),className:"post-publish-qr-post-panel",initialOpen:!1},t=(0,l.useSelect)((e=>e(u.store).isCurrentPostPublished()),[]);function r(){return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(i.PanelRow,null,(0,o.createElement)("p",null,__("Take advantage of the QR code to open the post from different devices.","jetpack"))),(0,o.createElement)(m.D,null))}return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(c.PluginPostPublishPanel,a()({},e,{icon:(0,o.createElement)(s.Pm,null)}),(0,o.createElement)(r,null)),t&&(0,o.createElement)(p.Z,null,(0,o.createElement)(i.PanelBody,e,(0,o.createElement)(r,null))))}}},18374:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h});var n=r(51806),a=r(74356),o=r(13419),s=r(55609),i=r(9818),l=r(12238),c=r(65736),u=r(15381),d=r(65235),p=r.n(d),m=r(78798);const __=c.__;function h(){const{isRePublicizeUpgradableViaUpsell:e,isRePublicizeFeatureAvailable:t,isPublicizeEnabled:r}=(0,a.Nh)(),d=(0,o.Rl)("republicize"),[h,g,f,b]=(0,m.Z)(d),{hasConnections:v,hasEnabledConnections:k}=(0,a.oL)(),y=r&&!e,E=(0,i.useSelect)((e=>e(l.store).isCurrentPostPublished()),[]);if(!E||E&&t)return(0,n.createElement)("div",{className:"jetpack-publicize__upsell"},function(e,t,r,n){const a=__("Start sharing your posts by connecting your social media accounts.","jetpack"),o=__("This post will be shared on all your enabled social media accounts the moment you publish the post.","jetpack");return r?e&&t&&!n?__("Enable a connection to share this post by clicking on the share post button.","jetpack"):t&&n?t&&n&&!e?o:__("Share this post on all your enabled social media accounts by clicking on the share post button.","jetpack"):__("Use this tool to share your post on all your social media accounts.","jetpack"):a}(E,y,v,k));const w=b?.product_name||__("paid","jetpack"),_=!(0,o.Ug)()&&!(0,o.Wp)(),C=_?__("Re-sharing your content","jetpack"):__("Share Your Content Again","jetpack",0),j=_?"https://jetpack.com/support/jetpack-social/#re-sharing-your-content":"https://wordpress.com/support/jetpack-social/#share-your-content-again",S=__("Upgrade now","jetpack");return t||e?(0,n.createElement)("div",{className:"jetpack-publicize__upsell"},(0,n.createElement)("div",{className:"jetpack-publicize__upsell-description"},(0,c.sprintf)(/* translators: placeholder is the product name of the plan. */
__("To re-share a post, you need to upgrade to the %s plan","jetpack"),w)),(0,n.createElement)(s.Button,{href:f?null:h,onClick:g,target:"_top",icon:u.Z,className:p()("jetpack-publicize__upsell-button is-primary",{"jetpack-upgrade-plan__hidden":!h}),isBusy:f},f?__("Redirecting…","jetpack"):S)):(0,n.createElement)("div",{className:"jetpack-publicize__upsell"},(0,n.createElement)("strong",null,C),(0,n.createElement)("br",null),(0,c.sprintf)(/* translators: placeholder is the product name of the plan. */
__("This feature is for sites with a %s plan.","jetpack"),w),(0,n.createElement)("br",null),(0,n.createElement)(s.ExternalLink,{href:j},__("More information.","jetpack")))}},55802:(e,t,r)=>{"use strict";var n=r(13419),a=r(71259);(0,n.o_)(a.u,a.X)},71259:(e,t,r)=>{"use strict";r.d(t,{X:()=>p,u:()=>d});var n=r(51806),a=r(74356),o=r(13419),s=r(72067),i=r(12238),l=r(65736),c=r(34613),u=r(18374);const __=l.__,d="publicize",p={render:()=>{const{hasEnabledConnections:e}=(0,a.oL)(),{isSocialImageGeneratorAvailable:t}=(0,a.Nh)();return(0,n.createElement)(i.PostTypeSupportCheck,{supportKeys:"publicize"},(0,n.createElement)(a.iS,null),(0,n.createElement)(c.Z,null,(0,n.createElement)(a.$S,{enableTweetStorm:!0},(0,n.createElement)(u.Z,null)),t&&(0,n.createElement)(a.i$,null)),(0,n.createElement)(s.PluginPrePublishPanel,{initialOpen:e,id:"publicize-title",title:(0,n.createElement)("span",{id:"publicize-defaults",key:"publicize-title-span"},__("Share this post","jetpack")),icon:(0,n.createElement)(o.Pm,null)},(0,n.createElement)(a.$S,{prePublish:!0,enableTweetStorm:!0},(0,n.createElement)(u.Z,null))),t&&(0,n.createElement)(s.PluginPrePublishPanel,{initialOpen:!0,title:__("Social Image Generator","jetpack"),icon:(0,n.createElement)(o.Pm,null)},(0,n.createElement)(a.i$,{prePublish:!0})),(0,n.createElement)(a.$R,null))}}},14166:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(51806),a=r(55609),o=r(9818),s=r(12238),i=r(65736),l=r(8264);const __=i.__;function c(e){let{checked:t,onChange:r}=e;return(0,n.createElement)(a.ToggleControl,{label:__("Show sharing buttons","jetpack"),checked:t,onChange:e=>{r({jetpack_sharing_enabled:e})}})}function u(){const e=(0,o.useSelect)((e=>e(s.store).getEditedPostAttribute("jetpack_sharing_enabled")),[]),{editPost:t}=(0,o.useDispatch)(s.store);return(0,n.createElement)(s.PostTypeSupportCheck,{supportKeys:"jetpack-sharing-buttons"},(0,n.createElement)(l.Z,null,(0,n.createElement)(c,{checked:e,onChange:t})))}},27425:(e,t,r)=>{"use strict";var n=r(13419),a=r(3378);(0,n.o_)(a.u,a.X)},3378:(e,t,r)=>{"use strict";r.d(t,{X:()=>o,u:()=>a});var n=r(14166);const a="sharing",o={render:n.Z}},21964:(e,t,r)=>{"use strict";var n=r(13419),a=r(9460);(0,n.o_)(a.u,a.X)},9460:(e,t,r)=>{"use strict";r.d(t,{X:()=>i,u:()=>s});var n=r(9818),a=r(69307),o=r(65736);const __=o.__,s="site-editor-snackbars",i={render:()=>{const[e,t]=(0,a.useState)(),{createInfoNotice:r,removeNotice:s}=(0,n.useDispatch)("core/notices"),{entityTitle:i,entityType:l,isSiteEditor:c}=(0,n.useSelect)((e=>{var t,r;if(!e("core/edit-site"))return{isSiteEditor:!1};const{getEditedPostType:n,getEditedPostId:a}=e("core/edit-site"),{getEntityRecord:o,getPostType:s}=e("core"),i=o("postType",n(),a()),l=s(n());return{isSiteEditor:!0,entityTitle:null!==(t=i?.title?.raw)&&void 0!==t?t:"",entityType:null!==(r=l?.labels?.singular_name)&&void 0!==r?r:""}}));return(0,a.useEffect)((()=>{if(!c)return;const e=(0,n.subscribe)((()=>{setTimeout((()=>{const r=new URLSearchParams(window.location.search);if(!r.has("canvas"))return e();t(r.get("canvas"))}),0)}),"core/edit-site");return()=>e()}),[c]),(0,a.useEffect)((()=>{const t="jetpack/site-editor/snackbars";if(s(t),!c||"edit"!==e||!i||!l)return;const n=(0,o.sprintf)(/* translators: %1$s and %2$s are the title and type, respectively, of the entity being edited (e.g. "Editing the Index template", or "Editing the Header template part").*/
__("Editing the %1$s %2$s","jetpack"),i,l.toLowerCase());r(n,{id:t,type:"snackbar"})}),[c,e,r,s,i,l]),null}}},43718:(e,t,r)=>{"use strict";r.d(t,{K:()=>a});var n=r(55609);const a=(0,n.withFallbackStyles)(((e,t)=>{const{textColor:r,backgroundColor:n}=t,a=n&&n.color,o=r&&r.color;return{fallbackBackgroundColor:a||!e?void 0:getComputedStyle(e).backgroundColor,fallbackTextColor:o||!e?void 0:getComputedStyle(e).color}}))},85921:(e,t,r)=>{"use strict";var n=r(51806),a=r(13419),o=r(4981),s=r(65736),i=r(81427);const __=s.__;(0,a.Wp)()||(0,a.Ug)()||(0,o.registerBlockCollection)("jetpack",{title:"Jetpack",icon:(0,n.createElement)(i.IM,null)}),(0,o.setCategories)([...(0,o.getCategories)().filter((e=>{let{slug:t}=e;return"contact-form"!==t})),{slug:"contact-form",title:__("Forms","jetpack"),icon:(0,n.createElement)(i.IM,null)}]),(0,o.setCategories)([...(0,o.getCategories)().filter((e=>{let{slug:t}=e;return"earn"!==t})),{slug:"earn",title:__("Earn","jetpack"),icon:(0,n.createElement)(i.IM,null)}]),(0,o.setCategories)([...(0,o.getCategories)().filter((e=>{let{slug:t}=e;return"grow"!==t})),{slug:"grow",title:__("Grow","jetpack"),icon:(0,n.createElement)(i.IM,null)}])},85007:(e,t,r)=>{"use strict";function n(e){const t=e.ownerDocument;return{currentDoc:t,currentWindow:t.defaultView||t.parentWindow}}function a(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=[];if(!t||!e&&!e.length||!function(e){const{currentWindow:t}=n(e);return"editor-canvas"===t.name&&t.self!==t.top}(t))return a;const{currentDoc:o,currentWindow:s}=n(t);if(!function(e){try{return!!e?.parent?.location.href}catch(e){return!1}}(s))return a;const i=s?.parent?.document;return o&&i?(a=e.filter((e=>{const t=i.querySelector(e),n=!!o.querySelector(e);return!(!t||n)&&(o.head.appendChild(t.cloneNode()),r&&t.remove(),!0)})),a):a}function o(e,t,r){const a=`${window.Jetpack_Block_Assets_Base_Url.url}editor-assets`,{currentDoc:o}=n(r),s=o.getElementsByTagName("head")[0];e.forEach((e=>{const[r,n]=e.file.split("/").pop().split(".");if("css"===n){if(o.getElementById(e.id))return;const t=o.createElement("link");t.id=e.id,t.rel="stylesheet",t.href=`${a}/${r}-${e.version}.${n}`,s.appendChild(t)}if("js"===n){const i=t[e.id]?t[e.id]:null;if(o.getElementById(e.id))return i();const l=o.createElement("script");l.id=e.id,l.type="text/javascript",l.src=`${a}/${r}-${e.version}.${n}`,l.onload=i,s.appendChild(l)}}))}function s(e,t){return new Promise((r=>{const n=()=>{e[t]?r(e[t]):e.requestAnimationFrame(n)};n()}))}r.d(t,{DT:()=>a,Dz:()=>s,Pp:()=>o,bL:()=>n})},70355:(e,t,r)=>{"use strict";r.d(t,{m:()=>s});var n=r(80550),a=r(13419);const o=n.O["Jetpack Green 40"];function s(){return(0,a.Ug)()||(0,a.Wp)()?null:o}},81518:(e,t,r)=>{"use strict";r.d(t,{t:()=>s});var n=r(29512),a=r.n(n),o=r(92819);function s(e,t){const r=function(e,t){for(const r of new(a())(t).values()){if(-1===r.indexOf("is-style-"))continue;const t=r.substring(9),n=(0,o.find)(e,{name:t});if(n)return n}return(0,o.find)(e,"isDefault")}(e,t);return r?r.name:null}},26788:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(90017),a=r.n(n),o=r(51806),s=r(55609),i=r(69307),l=r(65736);const __=l.__,_x=l._x;class c extends i.Component{constructor(){super(...arguments),a()(this,"state",{hasCopied:!1}),a()(this,"onCopy",(()=>this.setState({hasCopied:!0}))),a()(this,"onFinishCopy",(()=>this.setState({hasCopied:!1}))),a()(this,"onFocus",(e=>e.target.select()))}render(){const{link:e}=this.props,{hasCopied:t}=this.state;return e?(0,o.createElement)("div",{className:"jetpack-clipboard-input"},(0,o.createElement)(s.TextControl,{readOnly:!0,onFocus:this.onFocus,value:e}),(0,o.createElement)(s.ClipboardButton,{variant:"secondary",onCopy:this.onCopy,onFinishCopy:this.onFinishCopy,text:e},t?__("Copied!","jetpack"):_x("Copy","verb","jetpack"))):null}}const u=c},24381:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});const n=/^#?[A-Fa-f0-9]{6}$/;function a(e){return n.test(e)}},72752:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(51806),a=r(25158),o=r(69307),s=r(65736),i=r(92819),l=r(97115);const __=s.__,c="undefined"!=typeof _wpmejsSettings?_wpmejsSettings:{};function u(e,t,r){const n=document.createElement("div");n.className=e;const a=document.createElement("button");return a.innerText=t,a.addEventListener("click",r),a.setAttribute("aria-label",t),a.setAttribute("title",t),n.appendChild(a),n}const d=function(e){let{trackSource:t,onPlay:r,onPause:s,onError:d,onTimeChange:p,onSkipForward:m,onJumpBack:h,currentTime:g,playStatus:f=l._5,onMetadataLoaded:b,loadWhenReady:v=!1,preload:k="metadata"}=e;const y=(0,o.useRef)(),E=()=>{y.current.play().catch((()=>{}))},w=()=>{y.current.pause(),(0,a.speak)(__("Paused","jetpack"),"assertive")};return(0,o.useEffect)((()=>{MediaElementPlayer.prototype._setResponsiveMode||(MediaElementPlayer.prototype._setResponsiveMode=MediaElementPlayer.prototype.setResponsiveMode,MediaElementPlayer.prototype.setResponsiveMode=function(){const e=this;e.getElement(e.container).parentNode&&e._setResponsiveMode()})}),[]),(0,o.useEffect)((()=>{const e=y.current;e.preload=k;const t=new MediaElementPlayer(e,{...c,success:()=>v&&e?.load()});if(h||m){const e=`${t.options.classPrefix}button ${t.options.classPrefix}jump-button`;if(h){const r=`${e} ${t.options.classPrefix}jump-backward-button`;t.addControlElement(u(r,__("Jump Back","jetpack"),h),"jumpBackwardButton")}if(m){const r=`${e} ${t.options.classPrefix}skip-forward-button`;t.addControlElement(u(r,__("Skip Forward","jetpack"),m),"skipForwardButton")}}return r&&e.addEventListener("play",r),s&&e.addEventListener("pause",s),d&&e.addEventListener("error",d),b&&e.addEventListener("loadedmetadata",b),()=>{t.remove(),r&&e.removeEventListener("play",r),s&&e.removeEventListener("pause",s),d&&e.removeEventListener("error",d),b&&e.removeEventListener("loadedmetadata",b)}}),[r,s,d,h,m,b,v,k]),(0,o.useEffect)((()=>{const[e,t]=!1===y.current?.paused?[l.Wp,w]:[l._5,E],r=(0,i.debounce)(t,100);return l.Vy!==f&&e!==f&&r(),()=>{r.cancel()}}),[y,f,t]),(0,o.useEffect)((()=>{if(!p)return;const e=y.current,t=(0,i.throttle)((e=>p(e)),1e3,{leading:!0,trailing:!1}),r=e=>t(e.target.currentTime);return p&&e?.addEventListener("timeupdate",r),()=>{t.cancel(),e?.removeEventListener("timeupdate",r)}}),[y,p]),(0,o.useEffect)((()=>{const e=y.current;g&&e&&Math.abs(Math.floor(g-e.currentTime))>1&&(e.currentTime=g)}),[y,g]),(0,n.createElement)("div",{className:"jetpack-audio-player"},(0,n.createElement)("audio",{src:t,ref:y}))}},44738:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(51806),a=r(52175),o=r(55609),s=r(65736),i=r(65235),l=r.n(i),c=r(46867);const __=s.__;function u(e){let{blockName:t,buttonLabel:r,className:s,href:i,icon:u,onClick:d,readMoreUrl:p,subtitle:m,title:h}=e;const{autosaveAndRedirect:g}=(0,c.Z)(i);return(0,n.createElement)(a.Warning,{actions:i&&[(0,n.createElement)(o.Button,{href:i,onClick:e=>{e.preventDefault(),d(t),g(e)},target:"_top",variant:"secondary",className:"jetpack-stripe-nudge__link"},r)],className:l()(s,"jetpack-block-nudge wp-block")},(0,n.createElement)("span",{className:"jetpack-block-nudge__info"},u,(0,n.createElement)("span",{className:"jetpack-block-nudge__text-container"},(0,n.createElement)("span",{className:"jetpack-block-nudge__title"},h),m&&(0,n.createElement)("span",{className:"jetpack-block-nudge__message"},m,p&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)("br",null),(0,n.createElement)(o.ExternalLink,{href:p},__("Learn more about the block and fees","jetpack")))))))}},57538:(e,t,r)=>{"use strict";r.d(t,{Z:()=>f});var n=r(51806),a=r(52175),o=r(4981),s=r(55609),i=r(9818),l=r(69307),c=r(65736),u=r(39630),d=r(65235),p=r.n(d),m=r(92819);const __=c.__,h=e=>{let{attributes:t,styleOption:r,viewportWidth:s,blockName:i}=e;const l=(0,o.getBlockType)(i);return(0,n.createElement)(a.BlockPreview,{viewportWidth:s,blocks:(c=l.example?(0,o.getBlockFromExample)(i,{attributes:{...l.example.attributes,style:r.value},innerBlocks:l.example.innerBlocks}):(0,o.createBlock)(i,t),{...c,attributes:{...c.attributes,__isBlockPreview:!0}})});var c},g=l.memo?(0,l.memo)(h,((e,t)=>(0,m.isEqual)(e,t))):h;function f(e){let t,{attributes:r,clientId:o,styleOptions:l,onSelectStyle:c,activeStyle:d,viewportWidth:m,title:h}=e;return i.useSelect&&(t=(0,i.useSelect)((e=>{const{getBlock:t}=e("core/block-editor");return t(o)}))),(0,n.createElement)(n.Fragment,null,(0,n.createElement)(a.BlockControls,null,(0,n.createElement)(s.ToolbarGroup,{isCollapsed:!0,icon:"admin-appearance",label:__("Style","jetpack"),controls:l.map((e=>({title:e.label,isActive:e.value===d,onClick:()=>c({style:e.value})}))),popoverProps:{className:"jetpack-block-styles-selector-toolbar"}})),(0,n.createElement)(a.InspectorControls,null,(0,n.createElement)(s.PanelBody,{title:h||__("Styles","jetpack")},(0,n.createElement)("div",{className:"block-editor-block-styles jetpack-block-styles-selector"},l.map((e=>{const a={...r,style:e.value};return(0,n.createElement)("div",{key:e.value,className:p()("block-editor-block-styles__item",{"is-active":e.value===d}),onClick:()=>{c({style:e.value})},onKeyDown:t=>{u.ENTER!==t.keyCode&&u.SPACE!==t.keyCode||(t.preventDefault(),c({style:e.value}))},role:"button",tabIndex:"0","aria-label":e.label},(0,n.createElement)("div",{className:"block-editor-block-styles__item-preview"},e.preview?e.preview:i.useSelect&&t&&(0,n.createElement)(g,{blockName:t.name,styleOption:e,attributes:a,viewportWidth:m})),(0,n.createElement)("div",{className:"block-editor-block-styles__item-label"},e.label))}))))))}},34904:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(51806);function a(e){let{children:t,spanClass:r}=e;return(0,n.createElement)("div",{className:"jetpack-inspector-notice"},(0,n.createElement)("span",{className:r},t))}},20769:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(82674),a=r.n(n),o=r(51806),s=r(55609);const i=s.NumberControl||s.__experimentalNumberControl||function(e){return(0,o.createElement)(s.TextControl,a()({type:"number",inputMode:"numeric"},e))}},14436:(e,t,r)=>{"use strict";r.d(t,{Bn:()=>o,DM:()=>s,DW:()=>a,mj:()=>n});const n=0,a=1,o="payment-plan",s="subscription"},68880:(e,t,r)=>{"use strict";r.d(t,{Q:()=>s,a:()=>o});var n=r(69307),a=r(14436);const o=(0,n.createContext)({blockName:void 0,clientId:void 0,products:[],productType:a.Bn,selectedProductId:0,setSelectedProductId:()=>{}}),s=()=>(0,n.useContext)(o)},60386:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(51806),a=r(52175),o=r(9818),s=r(7652),i=r(2327),l=r(14436),c=r(68880),u=r(51310),d=r(21200),p=r(16842);function m(e){let{blockName:t,clientId:r,productType:m=l.Bn,selectedProductId:h=0,setSelectedProductId:g=(()=>{})}=e;const f=(0,o.useSelect)((e=>e(s.h)?.getProducts().filter((e=>!e.subscribe_as_site_subscriber)))),{connectUrl:b,isApiConnected:v,isSelectedProductInvalid:k}=(0,o.useSelect)((e=>{const{getConnectUrl:t,isApiStateConnected:r,isInvalidProduct:n}=e(s.h);return{connectUrl:t(),isApiConnected:r(),isSelectedProductInvalid:n(h)}}));if(!v)return null;const y={blockName:t,clientId:r,products:f,productType:m,selectedProductId:h,setSelectedProductId:g};return(0,n.createElement)(c.a.Provider,{value:y},!v&&!!b&&(0,n.createElement)(a.BlockControls,{__experimentalShareWithChildBlocks:!0,group:"block"},(0,n.createElement)(i.Z,{blockName:t,connectUrl:b})),v&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(u.Z,null),(0,n.createElement)(p.Z,null)),v&&k&&(0,n.createElement)(d.Z,null))}},51310:(e,t,r)=>{"use strict";r.d(t,{Z:()=>E});var n=r(51806),a=r(52175),o=r(55609),s=r(9818),i=r(69307),l=r(65736),c=r(1078),u=r(99196),d=r(7652),p=r(79162),m=r(14436),h=r(68880),g=r(51585);const __=l.__,f="USD",b=5,v="1 month",k=!1,y=!1;function E(){const{productType:e,setSelectedProductId:t}=(0,h.Q)(),{shouldUpgrade:r,siteSlug:l}=(0,s.useSelect)((e=>{const{getSiteSlug:t}=e(d.h);return{siteSlug:t()}})),{saveProduct:E}=(0,s.useDispatch)(d.h),[w,_]=(0,i.useState)(m.mj),[C,j]=(0,i.useState)((0,g.l)("default new product title",e)),[S,x]=(0,i.useState)(!1),[P,T]=(0,i.useState)(f),[L,N]=(0,i.useState)(b),[A,R]=(0,i.useState)(v),[I,M]=(0,i.useState)(k),[Z,B]=(0,i.useState)(y),D=[{label:__("Month","jetpack"),value:"1 month"},{label:__("Year","jetpack"),value:"1 year"},{label:__("One-Time Payment","jetpack"),value:"one-time"}];return(0,u.useEffect)((()=>{S||(j((0,g._)(I,A)),x(!1))}),[A,I,S]),(0,n.createElement)(a.InspectorControls,null,l&&(0,n.createElement)(o.PanelBody,null,(0,n.createElement)(o.ExternalLink,{href:`https://wordpress.com/earn/payments/${l}`},(0,g.l)("manage your products",e))),!r&&(0,n.createElement)(o.PanelBody,{title:(0,g.l)("add a new product",e),initialOpen:!0,className:"product-management-control-inspector__add-plan"},w===m.DW&&(0,n.createElement)(o.Placeholder,{icon:c.Z,label:(0,g.l)("saving product",e)},(0,n.createElement)(o.Spinner,null)),w===m.mj&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(o.PanelRow,{className:"product-management-control-inspector__product-title"},(0,n.createElement)(o.TextControl,{id:"new-product-title",label:__("Name","jetpack"),onChange:e=>{j(e),x(!0)},value:C})),(0,n.createElement)(o.PanelRow,{className:"product-management-control-inspector__product-price"},(0,n.createElement)(o.SelectControl,{label:__("Currency","jetpack"),onChange:e=>T(e),options:p.Xy,value:P}),(0,n.createElement)(o.TextControl,{label:__("Price","jetpack"),onChange:e=>N(e),type:"number",value:L})),(0,n.createElement)(o.PanelRow,{className:"plan-interval"},(0,n.createElement)(o.SelectControl,{label:__("Interval","jetpack"),onChange:e=>R(e),options:D,value:A})),(0,n.createElement)(o.PanelRow,{className:"donation-subscription"},(0,n.createElement)(o.ToggleControl,{label:(0,g.l)("mark this product as a donation",e),onChange:e=>M(e),checked:I})),(0,n.createElement)(o.PanelRow,{className:"custom-amount"},(0,n.createElement)(o.ToggleControl,{label:__("Enable customers to pick their own amount","jetpack"),onChange:e=>B(e),checked:Z})),(0,n.createElement)(o.PanelRow,null,(0,n.createElement)(o.ExternalLink,{href:"https://wordpress.com/support/wordpress-editor/blocks/payments/#related-fees"},__("Read more about Payments and related fees.","jetpack"))),(0,n.createElement)(o.PanelRow,null,(0,n.createElement)(o.Button,{onClick:r=>{r.preventDefault(),_(m.DW),E({title:C,currency:P,price:L,interval:A,type:I?"donation":null,buyer_can_change_amount:Z,is_editable:!0},e,t,(e=>{_(m.mj),e&&(N(b),x(!1),R(v),M(k),B(y),T(f))}))},variant:"secondary"},(0,g.l)("add product",e))))))}},21200:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(52175),o=r(61074),s=r(30797),i=r(68880),l=r(51585);function c(){const{productType:e}=(0,i.Q)();return(0,n.createElement)(a.Warning,{className:"product-management-control-nudge"},(0,n.createElement)("span",{className:"product-management-control-nudge__info"},(0,n.createElement)(o.Z,{icon:s.Z}),(0,n.createElement)("span",{className:"product-management-control-nudge__text-container"},(0,n.createElement)("span",{className:"product-management-control-nudge__title"},(0,l.l)("invalid product configured for this block",e)),(0,n.createElement)("span",{className:"product-management-control-nudge__message"},(0,l.l)("the button will be hidden from your visitors until you select a valid product",e)))))}},16842:(e,t,r)=>{"use strict";r.d(t,{Z:()=>y});var n=r(51806),a=r(25607),o=r(52175),s=r(55609),i=r(9818),l=r(65736),c=r(79201),u=r(48381),d=r(30797),p=r(7652),m=r(99307),h=r(68880),g=r(60510),f=r(51585);const __=l.__;function b(e){const{currency:t,interval:r,price:n}=e,o=(0,a.ZP)(parseFloat(n),t);switch(r){case"1 month":return(0,l.sprintf)(
// translators: %s: amount
__("%s / month","jetpack"),o);case"1 year":return(0,l.sprintf)(
// translators: %s: amount
__("%s / year","jetpack"),o);case"one-time":return o}return(0,l.sprintf)(
// translators: %s: amount, plan interval
__("%1$s / %2$s","jetpack"),o,r)}function v(e){let{onClose:t,product:r}=e;const{selectedProductId:a,setSelectedProductId:o}=(0,h.Q)(),{id:i,title:l}=r,u=a&&a===i,d=u?c.Z:void 0,p=r?" "+b(r):null;return(0,n.createElement)(s.MenuItem,{icon:d,onClick:e=>{e.preventDefault(),o(i),t()},selected:u,value:i},l," : ",p)}function k(e){let{onClose:t}=e;const{clientId:r,productType:a}=(0,h.Q)(),o=(0,i.useSelect)((e=>e(p.h).getSiteSlug())),l=(0,g.Z)(r);if(m.BM===(0,m.j3)())return(0,n.createElement)(s.MenuItem,null,o&&(0,n.createElement)(s.ExternalLink,{href:`https://wordpress.com/earn/payments-plans/${o}#add-new-payment-plan`},(0,f.l)("add a new product",a)));return(0,n.createElement)(s.MenuItem,{onClick:e=>{e.preventDefault(),l(),setTimeout((()=>{const e=document.getElementById("new-product-title");null!==e&&e.focus()}),100),t()}},(0,f.l)("add a new product",a))}function y(){const{products:e,productType:t,selectedProductId:r}=(0,h.Q)(),{selectedProduct:a}=(0,i.useSelect)((e=>{const{getProduct:t}=e(p.h);return{selectedProduct:t(r)}}));let l=null,c=u.Z;return a&&(l=b(a)),r&&!a&&(l=(0,f.l)("product not found",t),c=d.Z),(0,n.createElement)(o.BlockControls,{__experimentalShareWithChildBlocks:!0,group:"block"},(0,n.createElement)(s.ToolbarDropdownMenu,{className:"product-management-control-toolbar__dropdown-button",icon:c,label:(0,f.l)("select a product",t),text:l},(t=>{let{onClose:r}=t;return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(s.MenuGroup,null,e.map((e=>(0,n.createElement)(v,{key:e.id,onClose:r,product:e})))),(0,n.createElement)(s.MenuGroup,null,(0,n.createElement)(k,{onClose:r})))})))}},60510:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(52175),a=r(9818),o=r(72067),s=r(99307);function i(e){const t=(0,s.j3)(),{selectBlock:r}=(0,a.useDispatch)(n.store),{enableComplementaryArea:i}=(0,a.useDispatch)("core/interface"),{closePublishSidebar:l}=(0,a.useDispatch)(o.store);return()=>{switch(e&&r(e),t){case s.fH:return i("core/edit-site","edit-site/block-inspector");case s.CG:return i("core/edit-widgets","edit-widgets/block-inspector");default:l(),i("core/edit-post","edit-post/block")}}}},51585:(e,t,r)=>{"use strict";r.d(t,{_:()=>l,l:()=>s});var n=r(65736),a=r(14436);const __=n.__,o={"add a new product":{[a.Bn]:__("Add a new payment plan","jetpack"),[a.DM]:__("Add a new subscription","jetpack")},"product not found":{[a.Bn]:__("Payment plan not found","jetpack"),[a.DM]:__("Subscription not found","jetpack")},"select a product":{[a.Bn]:__("Select a payment plan","jetpack"),[a.DM]:__("Select a subscription","jetpack")},"default new product title":{[a.Bn]:__("Monthly Subscription","jetpack"),[a.DM]:__("Monthly Subscription","jetpack")},"manage your products":{[a.Bn]:__("Manage your payment plans.","jetpack"),[a.DM]:__("Manage your subscriptions.","jetpack")},"saving product":{[a.Bn]:__("Saving payment plan…","jetpack"),[a.DM]:__("Saving subscription…","jetpack")},"add product":{[a.Bn]:__("Add payment plan","jetpack"),[a.DM]:__("Add subscription","jetpack")},"product requires a name":{[a.Bn]:__("Payment plan requires a name","jetpack"),[a.DM]:__("Subscription requires a name","jetpack")},"product requires a valid price":{[a.Bn]:__("Payment plan requires a valid price","jetpack"),[a.DM]:__("Subscription requires a valid price","jetpack")},"successfully created product":{[a.Bn]:__("Successfully created payment plan","jetpack"),[a.DM]:__("Successfully created subscription","jetpack")},"there was an error when adding the product":{[a.Bn]:__("There was an error when adding the payment plan.","jetpack"),[a.DM]:__("There was an error when adding the subscription.","jetpack")},"invalid product configured for this block":{[a.Bn]:__("Invalid payment plan configured for this block.","jetpack"),[a.DM]:__("Invalid subscription configured for this block.","jetpack")},"the button will be hidden from your visitors until you select a valid product":{[a.Bn]:__("The button will be hidden from your visitors until you select a valid payment plan.","jetpack"),[a.DM]:__("The subscribe button will be hidden from your visitors until you select a valid subscription.","jetpack")},"mark this product as a donation":{[a.Bn]:__("Mark this payment plan as a donation","jetpack"),[a.DM]:__("Mark this subscription as a donation","jetpack")}};function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.Bn;return o?.[e]?.[t]||null}const i={"false,1 month":__("Monthly Subscription","jetpack"),"true,1 month":__("Monthly Donation","jetpack"),"false,1 year":__("Yearly Subscription","jetpack"),"true,1 year":__("Yearly Donation","jetpack"),"false,one-time":__("Subscription","jetpack"),"true,one-time":__("Donation","jetpack")};function l(e,t){var r;return null!==(r=i[[e,t]])&&void 0!==r?r:""}},2327:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(13419),o=r(55609),s=r(65736),i=r(81427),l=r(46867);const __=s.__;function c(e){let{blockName:t,connectUrl:r}=e;const{autosaveAndRedirect:s}=(0,l.Z)(r),{tracks:c}=(0,a.z$)();return(0,n.createElement)(o.ToolbarButton,{className:"connect-stripe components-tab-button",icon:i.Pw,onClick:e=>{e.preventDefault(),c.recordEvent("jetpack_editor_block_stripe_connect_click",{block:t}),s(e)}},__("Connect Stripe","jetpack"))}},16367:(e,t,r)=>{"use strict";r.d(t,{U:()=>d});var n=r(51806),a=r(6895),o=r(13419),s=r(9818),i=r(65736),l=r(89933),c=r(7652),u=r(44738);const __=i.__,d=e=>{let{blockName:t}=e;const r=(0,s.select)(c.h).getConnectUrl(),{tracks:i}=(0,o.z$)(),d=(0,o.Ug)()||(0,o.Wp)();if(!r)return null;let p;switch(t){case"payment-buttons":p=d?(0,a.Z)("wpcom-support-wordpress-editor-blocks-payments-block"):(0,a.Z)("jetpack-support-jetpack-blocks-payments-block");break;case"donations":p=d?(0,a.Z)("wpcom-support-wordpress-editor-blocks-donations-block"):(0,a.Z)("jetpack-support-jetpack-blocks-donations-block");break;case"premium-content":p=d?(0,a.Z)("wpcom-support-wordpress-editor-blocks-premium-content-block"):(0,a.Z)("jetpack-support-jetpack-blocks-premium-content-block");break;default:p=d?(0,a.Z)("wpcom-support-payments-button-block"):(0,a.Z)("jetpack-support-jetpack-blocks-payments-block")}return(0,n.createElement)(u.Z,{className:"jetpack-stripe-nudge__banner",buttonLabel:__("Connect","jetpack"),icon:(0,n.createElement)(l.Z,{className:"jetpack-stripe-nudge__icon",size:18,"aria-hidden":"true",role:"img",focusable:"false"}),href:r,readMoreUrl:p,onClick:()=>i.recordEvent("jetpack_editor_block_stripe_connect_click",{block:t}),title:__("Connect to Stripe to use this block on your site","jetpack"),subtitle:__("This block will be hidden from your visitors until you connect to Stripe.","jetpack")})}},26546:(e,t,r)=>{"use strict";r.d(t,{p:()=>l});var n=r(51806),a=r(55609),o=r(65736),s=r(65235),i=r.n(s);const __=o.__,l=e=>{let{align:t,className:r,title:o,description:s,buttonText:l,visible:c=!0,context:u,checkoutUrl:d,goToCheckoutPage:p,isRedirecting:m=!1}=e;const h=i()(r,"jetpack-upgrade-plan-banner",{"wp-block":"editor-canvas"===u,"block-editor-block-list__block":"editor-canvas"===u,"jetpack-upgrade-plan__hidden":!c}),g=__("Redirecting…","jetpack");return(0,n.createElement)("div",{className:h,"data-align":t},(0,n.createElement)("div",{className:"jetpack-upgrade-plan-banner__wrapper"},o&&(0,n.createElement)("strong",{className:i()("banner-title",{[`${r}__title`]:r})},o),s&&(0,n.createElement)("span",{className:`${r}__description banner-description`},s),(0,n.createElement)(a.Button,{href:m?null:d,onClick:p,target:"_top",className:i()("is-primary",{"jetpack-upgrade-plan__hidden":!d}),isBusy:m},m?g:l)))}},87553:(e,t,r)=>{"use strict";var n=r(9818);const a={setPlans:e=>({type:"SET_PLANS",plans:e}),fetchFromAPI:e=>({type:"FETCH_FROM_API",url:e})};(0,n.registerStore)("wordpress-com/plans",{reducer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return"SET_PLANS"===t.type?t.plans:e},actions:a,selectors:{getPlan:(e,t)=>e.find((e=>e.product_slug===t))},controls:{FETCH_FROM_API(e){let{url:t}=e;return fetch(t).then((e=>e.json()))}},resolvers:{*getPlan(){const e=yield a.fetchFromAPI("https://public-api.wordpress.com/rest/v1.5/plans");return a.setPlans(e)}}})},79162:(e,t,r)=>{"use strict";r.d(t,{Vm:()=>c,Xy:()=>o,ck:()=>a,hj:()=>s,li:()=>i,vs:()=>l});var n=r(43317);const a={USD:.5,AUD:.5,BRL:.5,CAD:.5,CHF:.5,DKK:2.5,EUR:.5,GBP:.3,HKD:4,INR:.5,JPY:50,MXN:10,NOK:3,NZD:.5,PLN:2,SEK:3,SGD:.5},o=Object.keys(a).map((e=>{const{symbol:t}=(0,n.X)(e);var r;return{value:e,label:t===e?e:`${e} ${r=t,String(r||"").replace(/\.+$/,"")}`}}));function s(e){return a[e]}function i(e){const t=s(e);return[10*t,30*t,200*t]}function l(e,t){return!isNaN(t)&&t>=s(e)}function c(e,t){return e?"number"==typeof e?e:(e=parseFloat(e.replace(new RegExp("\\"+n.M[t].grouping,"g"),"").replace(new RegExp("\\"+n.M[t].decimal,"g"),".")),isNaN(e)?null:e):null}},94545:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(55609);const o=e=>{let{label:t,onClick:r}=e;return(0,n.createElement)(a.Button,{className:"components-toolbar__control",label:t,icon:"edit",onClick:r})}},73905:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});const n=new Map,a=e=>n.has(e),o={acquire:e=>{if(a(e))return null;const t=Math.random();return n.set(e,t),[e,t]},blockExecution:async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;for(;a(e);)await new Promise((e=>setTimeout(e,t)))},clearAll:()=>n.clear(),isLocked:a,release:e=>{const[t,r]=e;return!(!a(t)||n.get(t)!==r)&&(n.delete(t),!0)}}},20982:(e,t,r)=>{"use strict";r.d(t,{Bb:()=>b,CY:()=>h,Eh:()=>i,En:()=>v,OG:()=>d,QU:()=>y,Qh:()=>f,Tu:()=>u,Wm:()=>g,h9:()=>m,iT:()=>s,l5:()=>w,oI:()=>c,tY:()=>p,wk:()=>l,yD:()=>k,zs:()=>E});var n=r(69771),a=r(65736),o=r(92819);const __=a.__,s="google_photos",i="openverse",l="pexels",c="recent",u="/",d=[{value:c,label:__("Photos","jetpack")},{value:u,label:__("Albums","jetpack")}],p=[{value:"",
/* translators: category of images */
label:__("All categories","jetpack")},{value:"animals",
/* translators: category of images */
label:__("Animals","jetpack")},{value:"arts",
/* translators: category of images */
label:__("Arts","jetpack")},{value:"birthdays",
/* translators: category of images */
label:__("Birthdays","jetpack")},{value:"cityscapes",
/* translators: category of images */
label:__("Cityscapes","jetpack")},{value:"crafts",
/* translators: category of images */
label:__("Crafts","jetpack")},{value:"fashion",
/* translators: category of images */
label:__("Fashion","jetpack")},{value:"food",
/* translators: category of images */
label:__("Food","jetpack")},{value:"flowers",
/* translators: category of images */
label:__("Flowers","jetpack")},{value:"gardens",
/* translators: category of images */
label:__("Gardens","jetpack")},{value:"holidays",
/* translators: category of images */
label:__("Holidays","jetpack")},{value:"houses",
/* translators: category of images */
label:__("Houses","jetpack")},{value:"landmarks",
/* translators: category of images */
label:__("Landmarks","jetpack")},{value:"landscapes",
/* translators: category of images */
label:__("Landscapes","jetpack")},{value:"night",
/* translators: category of images */
label:__("Night","jetpack")},{value:"people",
/* translators: category of images */
label:__("People","jetpack")},{value:"pets",
/* translators: category of images */
label:__("Pets","jetpack")},{value:"selfies",
/* translators: category of images */
label:__("Selfies","jetpack")},{value:"sport",
/* translators: category of images */
label:__("Sport","jetpack")},{value:"travel",
/* translators: category of images */
label:__("Travel","jetpack")},{value:"weddings",
/* translators: category of images */
label:__("Weddings","jetpack")}],m=["mountain","ocean","river","clouds","pattern","abstract","sky"],h="ANY",g="LAST_7_DAYS",f="LAST_30_DAYS",b="LAST_6_MONTHS",v="LAST_12_MONTHS",k="CUSTOM",y=[{value:h,label:__("Any time","jetpack")},{value:g,label:__("Last 7 days","jetpack")},{value:f,label:__("Last 30 days","jetpack")},{value:b,label:__("Last 6 months","jetpack")},{value:v,label:__("Last 12 months","jetpack")},{value:k,label:__("Specific Month/Year","jetpack")}],E=(new Date).getFullYear(),w=[{label:__("Any Month","jetpack"),value:-1},...(0,o.map)((0,o.range)(0,12),(e=>({label:(0,n.dateI18n)("F",new Date(0,e)),value:e})))]},54414:(e,t,r)=>{"use strict";var n=r(82674),a=r.n(n),o=r(51806),s=r(13419),i=r(52175),l=r(92694),c=r(10892),u=r(1285),d=r(38457);if((0,s.Dp)()&&"function"==typeof i.useBlockEditContext){(0,u.HO)(),(0,u.on)();const e=e=>e.unstableFeaturedImageFlow||e.modalClass&&e.modalClass.indexOf("featured-image")>-1,t=(e,t)=>["core/cover","core/image","core/gallery","core/media-text","jetpack/image-compare","jetpack/slideshow","jetpack/story","jetpack/tiled-gallery","videopress/video"].indexOf(e)>-1&&-1===t.toString().indexOf("coblocks");(0,l.addFilter)("editor.MediaUpload","external-media/replace-media-upload",(r=>n=>{const{name:s}=(0,i.useBlockEditContext)();let{render:l}=n;if(t(s,l)||e(n)){const{allowedTypes:e,gallery:t=!1,value:r=[]}=n;e.indexOf("image")>-1&&!(t&&r.length>0)&&(l=e=>(0,o.createElement)(c.Z,a()({},e,{mediaProps:n})))}return(0,o.createElement)(r,a()({},n,{render:l}))}),100),(0,l.addFilter)("blocks.registerBlockType","external-media/individual-blocks",(function(e,t){return"core/image"!==t?e:{...e,keywords:[...e.keywords,...d.Dv.map((e=>e.keyword))]}}))}},11583:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h});var n=r(51806),a=r(55609),o=r(69307),s=r(65736),i=r(39630),l=r(65235),c=r.n(l),u=r(92819),d=r(46406),p=r(9827);const __=s.__,m=(0,o.memo)((()=>(0,n.createElement)("div",{className:"jetpack-external-media-browser__empty"},(0,n.createElement)("p",null,__("Sorry, but nothing matched your search criteria.","jetpack")))));const h=function(e){const{media:t,isCopying:r,isLoading:s,pageHandle:l,className:h,multiple:g,setPath:f,nextPage:b,onCopy:v}=e,[k,y]=(0,o.useState)([]),[E,w]=(0,o.useState)(-1),_=(0,o.useRef)(-1),C=(0,o.useRef)(null),j=(0,o.useCallback)((e=>{let t=[e];"folder"===e.type?f(e.ID):g?(t=k.slice(0,9).concat(e),k.find((t=>e.ID===t.ID))&&(t=k.filter((t=>t.ID!==e.ID)))):1===k.length&&e.ID===k[0].ID&&(t=[]),y(t)}),[k,g,f]),S=(0,o.useCallback)((()=>{v(k)}),[k,v]),x=t.filter((e=>"folder"!==e.type)).length>0,P=c()({"jetpack-external-media-browser__media":!0,"jetpack-external-media-browser__media__loading":s}),T=c()({"jetpack-external-media-browser":!0,[h]:!0}),L=()=>{let e=1;const t=C.current.children;if(t.length>0){const r=t[0].offsetTop;for(;e<t.length&&t[e].offsetTop===r;)++e}_.current=e},N=(0,u.debounce)(L,400);(0,o.useEffect)((()=>(window.addEventListener("resize",N),()=>{window.removeEventListener("resize",N)})),[]),(0,o.useEffect)((()=>{t.length&&-1===_.current&&L()}),[t]);const A=(e,t)=>{let{item:r}=t;j(r)},R=(e,r)=>{let{item:n,index:a}=r;[i.LEFT,i.RIGHT,i.UP,i.DOWN].includes(e.keyCode)?((e,r)=>{switch(e){case i.LEFT:r>=1&&w(r-1);break;case i.RIGHT:r<t.length&&w(r+1);break;case i.UP:r>=_.current&&w(r-_.current);break;case i.DOWN:r<t.length-_.current&&w(r+_.current)}})(e.keyCode,a):i.SPACE===e.keyCode?(j(n),e.preventDefault()):i.ENTER===e.keyCode&&j(n),[i.LEFT,i.RIGHT,i.UP,i.DOWN,i.SPACE,i.ENTER].includes(e.keyCode)&&e.stopPropagation()};return(0,n.createElement)("div",{className:T},(0,n.createElement)("ul",{ref:C,className:P},t.map(((e,t)=>(0,n.createElement)(d.Z,{item:e,index:t,key:e.ID,onClick:A,onKeyDown:R,focus:t===E,isSelected:k.find((t=>t.ID===e.ID)),isCopying:r}))),0===t.length&&!s&&(0,n.createElement)(m,null),s&&(0,n.createElement)(p.Z,null),l&&!s&&(0,n.createElement)(a.Button,{variant:"secondary",className:"jetpack-external-media-browser__loadmore",disabled:s||r,onClick:()=>{t.length&&w(t.length),b()}},__("Load More","jetpack"))),x&&(0,n.createElement)((()=>{const e=0===k.length||r,t=r?__("Inserting…","jetpack"):__("Select","jetpack",0);return(0,n.createElement)("div",{className:"jetpack-external-media-browser__media__toolbar"},(0,n.createElement)(a.Button,{variant:"primary",isBusy:r,disabled:e,onClick:S},t))}),null))}},46406:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(55609),o=r(69307),s=r(65736),i=r(65235),l=r.n(i);const __=s.__;const c=function(e){const{item:t,focus:r,isSelected:s,isCopying:i=!1}=e,{thumbnails:c,caption:u,name:d,title:p,type:m,children:h=0}=t,{medium:g=null,fmt_hd:f=null,thumbnail:b=null}=c,v=p||u||d,k=l()({"jetpack-external-media-browser__media__item":!0,"jetpack-external-media-browser__media__item__selected":s,"jetpack-external-media-browser__media__folder":"folder"===m,"is-transient":i}),y=(0,o.useRef)(null);return(0,o.useEffect)((()=>{r&&y.current.focus()}),[r]),(0,n.createElement)("li",{ref:y,className:k,onClick:i?void 0:t=>{const{item:r,index:n}=e;e.onClick&&e.onClick(t,{item:r,index:n})},onKeyDown:i?void 0:t=>{const{item:r,index:n}=e;e.onKeyDown&&e.onKeyDown(t,{item:r,index:n})},role:"checkbox",tabIndex:"0","aria-checked":!!s,"aria-disabled":!!i},s&&i&&(0,n.createElement)("div",{className:"jetpack-external-media-browser__media__copying_indicator"},(0,n.createElement)(a.Spinner,null),(0,n.createElement)("div",{className:"jetpack-external-media-browser__media__copying_indicator__label"},__("Inserting Image…","jetpack"))),(0,n.createElement)("img",{src:g||f||b,alt:v}),"folder"===m&&(0,n.createElement)("div",{className:"jetpack-external-media-browser__media__info"},(0,n.createElement)("div",{className:"jetpack-external-media-browser__media__name"},d),(0,n.createElement)("div",{className:"jetpack-external-media-browser__media__count"},h)))}},9827:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(69307);const o=(0,a.memo)((function(){const e="jetpack-external-media-browser__media__item jetpack-external-media-browser__media__placeholder";return(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:e}),(0,n.createElement)("div",{className:e}),(0,n.createElement)("div",{className:e}))}))},10892:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(82674),a=r.n(n),o=r(51806),s=r(69307),i=r(38457),l=r(95833);const c=e=>e.unstableFeaturedImageFlow||e.modalClass&&-1!==e.modalClass.indexOf("featured-image"),u=e=>void 0===e.multiple&&!c(e);const d=function(e){const{mediaProps:t}=e,[r,n]=(0,s.useState)(null),d=(0,i.ZR)(r);return(0,o.createElement)("div",{onClick:e=>e.stopPropagation()},(0,o.createElement)(l.Z,a()({},e,{setSelectedSource:n,isReplace:u(t),isFeatured:c(t),hasImage:t.value>0})),d&&(0,o.createElement)(d,a()({},t,{onClose:e=>{e&&(e.stopPropagation(),e.target.closest(".jetpack-external-media-header__dropdown"))||(n(null),t.onClose?.())}})))}},95833:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(55609),o=r(65736),s=r(61074),i=r(20843),l=r(13959);const __=o.__;const c=function(e){const{mediaProps:t,open:r,setSelectedSource:o,isFeatured:c,isReplace:u,hasImage:d}=e,p=t.render;let m="tertiary";if(u)return(0,n.createElement)(l.Z,{originalButton:p,open:r,setSource:o});let h=__("Select Image","jetpack");return t.multiple&&(h=__("Select Images","jetpack")),t.allowedTypes.length>1&&(h=__("Select Media","jetpack")),c&&(h=__("Replace Image","jetpack"),m="secondary"),(0,n.createElement)(n.Fragment,null,(0,n.createElement)(a.Dropdown,{placement:"bottom-start",className:"jetpack-external-media-button-menu__dropdown",contentClassName:"jetpack-external-media-button-menu__options",renderToggle:e=>{let{isOpen:t,onToggle:r}=e;const o=p&&p({open:r});return c&&d||o&&"string"!=typeof o.props.children?o:(0,n.createElement)(a.Button,{variant:m,className:"jetpack-external-media-button-menu","aria-haspopup":"true","aria-expanded":t,onClick:r},(0,n.createElement)("div",{className:"jetpack-external-media-button-menu__label"},h),(0,n.createElement)(s.Z,{icon:i.Z}))},renderContent:e=>{let{onClose:t}=e;return(0,n.createElement)(a.NavigableMenu,{"aria-label":h},(0,n.createElement)(a.MenuGroup,null,(0,n.createElement)(a.MenuItem,{icon:i.Z,onClick:()=>{t(),r()}},__("Media Library","jetpack")),(0,n.createElement)(l.Z,{open:r,setSource:o,onClick:t})))}}))}},13959:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(55609),o=r(69307),s=r(38457);const i=function(e){let{originalButton:t=null,onClick:r=(()=>{}),open:i,setSource:l}=e;return(0,n.createElement)(o.Fragment,null,t&&t({open:i}),s.Dv.map((e=>{let{icon:t,id:o,label:s}=e;return(0,n.createElement)(a.MenuItem,{icon:t,key:o,onClick:()=>{r(),l(o)}},s)})))}},1285:(e,t,r)=>{"use strict";r.d(t,{HO:()=>P,on:()=>x,uk:()=>T});var n=r(6975),a=r(86989),o=r.n(a),s=r(9818),i=r(65736),l=r(96483),c=r(67194),u=r(94841),d=r(29755);const __=i.__,p=__("Pexels Free Photos","jetpack"),m=__("Search Pexels Free Photos","jetpack"),h={per_page:10,search:"mountain"},g=__("Google Photos","jetpack"),f=__("Search Google Photos","jetpack"),b={per_page:25,search:""};var v=function(e){return e.List="/wpcom/v2/external-media/list/",e}(v||{}),k=function(e){return e.Image="image",e.Video="video",e}(k||{});const y=(e,t)=>(0,l.addQueryArgs)(`${v.List}${e}`,{...t.search&&{search:t.search},number:t.per_page||25,path:"recent"}),E=e=>{var t,r,n;return{caption:null!==(t=e?.caption)&&void 0!==t?t:"",previewUrl:e.thumbnails.thumbnail,title:null!==(r=null!==(n=e?.title)&&void 0!==n?n:e?.name)&&void 0!==r?r:e.file,url:e.URL}},w=(e,t,r,a,s)=>({name:e,labels:{name:t,search_items:r},mediaType:"image",fetch:async e=>await o()({path:y(a,{per_page:s.per_page,search:""===e?.search?s.search:e.search}),method:"GET"}).then((t=>{const r=t.media.filter((e=>e.type===k.Image)).map(E);return n.Z.tracks.recordEvent("jetpack_editor_media_inserter_external_source",{mediaSource:a.toString(),results:r.length,search:""===e?.search?s.search:e.search}),r})).catch((()=>[])),getReportUrl:null,isExternalResource:!0}),_=()=>w("google_photos",g,f,d.Y.GooglePhotos,b),C=()=>(0,s.select)("core/edit-post")?.isInserterOpened()||(0,s.select)("core/edit-site")?.isInserterOpened()||(0,s.select)("core/edit-widgets")?.isInserterOpened?.(),j=e=>(0,s.dispatch)("core/block-editor")?.registerInserterMediaCategory?.(e()),S=()=>w("pexels",p,m,d.Y.Pexels,h),x=async()=>{const e=await(async e=>o()({path:y(e,h),method:"GET"}).then((e=>e)).catch((()=>!1)))(d.Y.GooglePhotos);(0,c.X)(C).then((()=>{e?j(_):(0,c.X)((()=>{return e=d.Y.GooglePhotos,!!(0,s.select)(u.j).isAuthenticated(e);var e})).then((()=>j(_)))}))},P=()=>{(0,c.X)(C).then((()=>j(S)))},T=(e,t)=>{(0,s.dispatch)(u.j).setAuthenticated(e,t)}},29755:(e,t,r)=>{"use strict";r.d(t,{Y:()=>n});let n=function(e){return e.Pexels="pexels",e.GooglePhotos="google_photos",e.Openverse="openverse",e.Unknown="unknown",e}({})},47285:(e,t,r)=>{"use strict";r.d(t,{k:()=>s});var n=r(13419),a=r(96483);const o={list:"/wpcom/v2/external-media/list/",copy:(0,n.Wp)()?"/rest/v1.1/external-media-upload?service=":"/wpcom/v2/external-media/copy/",connection:"/wpcom/v2/external-media/connection/"};function s(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return o[e]?(0,a.addQueryArgs)(o[e]+t,r):null}},53463:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(69307),o=r(65736),s=r(81427);const __=o.__;const i=(0,a.memo)((function(){return(0,n.createElement)(a.Fragment,null,(0,n.createElement)(s.JO,null),(0,n.createElement)("p",null,__("To get started, connect your site to your Google Photos library.","jetpack")),(0,n.createElement)("p",null,__("You can remove the connection in either of these places:","jetpack")),(0,n.createElement)("ul",null,(0,n.createElement)("li",null,(0,n.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://myaccount.google.com/security"},__("Google Security page","jetpack"))),(0,n.createElement)("li",null,(0,n.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://wordpress.com/marketing/connections/"},__("WordPress.com Connections","jetpack")))))}))},5890:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(69307),o=r(65736);const __=o.__;const s=(0,a.memo)((function(){return(0,n.createElement)("p",null,__("Awaiting authorization","jetpack"))}))},86167:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(55609),o=r(69307),s=r(65736),i=r(20982);const __=s.__;const l=(0,o.memo)((function(e){let{path:t,setPath:r}=e;return(0,n.createElement)(o.Fragment,null,(0,n.createElement)(a.Button,{variant:"tertiary",onClick:()=>r(i.Tu)},__("Albums","jetpack")),"→   ",t.name)}))},4819:(e,t,r)=>{"use strict";r.d(t,{Z:()=>g});var n=r(51806),a=r(55609),o=r(69307),s=r(65736),i=r(92819),l=r(20769),c=r(20982);const __=s.__;function u(e){let{value:t,updateFilter:r}=e;return(0,n.createElement)(a.SelectControl,{label:__("Category","jetpack"),value:t,options:c.tY,onChange:r})}function d(e){let{value:t,updateFilter:r}=e;const s=t?.range||c.CY,[i,u]=(0,o.useState)(-1),[d,p]=(0,o.useState)(c.zs);return(0,n.createElement)("div",{className:"jetpack-external-media-date-filter"},(0,n.createElement)(a.SelectControl,{label:__("Filter by time period","jetpack"),value:s,options:c.QU,onChange:e=>r({range:e})}),s===c.yD&&(0,n.createElement)(o.Fragment,null,(0,n.createElement)(a.SelectControl,{label:__("Month","jetpack"),value:i,options:c.l5,onChange:u}),(0,n.createElement)(l.Z,{className:"components-base-control",label:__("Year","jetpack"),value:d,min:1970,onChange:p}),(0,n.createElement)(a.Button,{variant:"secondary",disabled:t?.month===i&&t?.year===d,onClick:()=>{r({range:s,month:i,year:d})}},__("Apply","jetpack"))))}function p(){return(0,n.createElement)("span",null,__("Favorites","jetpack"))}function m(e){let{value:t,updateFilter:r}=e;const o=[{label:__("All","jetpack"),value:""},{label:__("Images","jetpack"),value:"photo"},{label:__("Videos","jetpack"),value:"video"}];return(0,n.createElement)(a.SelectControl,{label:__("Type","jetpack"),value:t,options:o,onChange:r})}function h(e){let{children:t,removeFilter:r,isRemovable:o=!1}=e;return(0,n.createElement)("div",{className:"jetpack-external-media-googlephotos-filter"},t,!!o&&(0,n.createElement)(a.Button,{onClick:r,isSmall:!0},__("Remove Filter","jetpack")))}const g=function(e){let{filters:t,setFilters:r,canChangeMedia:a}=e;const o=Object.keys(t).filter((e=>a||"mediaType"!==e)).map((e=>{return(0,n.createElement)(h,{key:e,removeFilter:()=>r((0,i.omit)(t,e))},(a=e,o=t[e],s=n=>r(function(e,t,r){const n={...e,[t]:r};return"mediaType"===t&&"video"===r?delete n.category:"category"===t&&"video"===n.mediaType&&delete n.mediaType,n}(t,e,n)),"category"===a?(0,n.createElement)(u,{value:o,updateFilter:s}):"date"===a?(0,n.createElement)(d,{value:o,updateFilter:s}):"favorite"===a?(0,n.createElement)(p,{value:o}):"mediaType"===a?(0,n.createElement)(m,{value:o,updateFilter:s}):null));var a,o,s}));return 0===o.length?null:o}},58912:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(76292),a=r.n(n),o=r(20982);const s=a()();function i(e){const{mediaType:t,category:r,favorite:n,date:i}=e,l=[];if(t&&l.push("mediaType="+t),r&&"video"!==t&&l.push("categoryInclude="+r),void 0!==n&&l.push("feature=favorite"),i){let e=null,t=null;switch(i.range){case o.Wm:e=a()(s).subtract(7,"days"),t=s;break;case o.Qh:e=a()(s).subtract(30,"days"),t=s;break;case o.Bb:e=a()(s).subtract(6,"months"),t=s;break;case o.En:e=a()(s).subtract(1,"year"),t=s;break;case o.yD:const r=parseInt(i.month),n=parseInt(i.year);isNaN(r)||isNaN(n)||(-1===r?(e=a()([n,0]),t=a()(e).endOf("year")):(e=a()([n,r]),t=a()(e).endOf("month")))}const r=e?e.format("YYYY-MM-DD"):"0000-00-00",n=t?t.format("YYYY-MM-DD"):"0000-00-00";l.push(`dateRange=${r}:${n}`)}return l.length>0?l:null}},53800:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(51806),a=r(55609),o=r(69307),s=r(65736);const __=s.__,i=[{label:__("Category","jetpack"),value:"category"},{label:__("Date","jetpack"),value:"date"},{label:__("Favorites","jetpack"),value:"favorite"},{label:__("Media Type","jetpack"),value:"mediaType"}];function l(e){return i.filter((t=>void 0===e[t.value]))}function c(e){const t=l(e);return t.length>0?t[0].value:""}const u=function(e){const[t,r]=(0,o.useState)(c([])),{isLoading:s,isCopying:i,filters:u,canChangeMedia:d}=e,p=function(e,t){return t?e:e.filter((e=>"mediaType"!==e.value))}(l(u),d);return 0===p.length?null:(0,n.createElement)(o.Fragment,null,(0,n.createElement)(a.SelectControl,{label:__("Filters","jetpack"),value:t,disabled:s||i,options:p,onChange:r}),(0,n.createElement)(a.Button,{disabled:s||i,variant:"secondary",isSmall:!0,onClick:()=>{const n=(a=u,o=t,{...a,[o]:"favorite"===o||""});var a,o;e.setFilters(n),r(c(n))}},__("Add Filter","jetpack")))}},64034:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(2772);const o=e=>{let{account:t,setAuthenticated:r}=e;const{image:o,name:s}=t||{};return(0,n.createElement)("div",{className:"jetpack-external-media-header__account"},(0,n.createElement)("div",{className:"jetpack-external-media-header__account-info"},o&&(0,n.createElement)("img",{className:"jetpack-external-media-header__account-image",src:o,alt:"",height:"18",width:"18"}),s&&(0,n.createElement)("div",{className:"jetpack-external-media-header__account-name"},s)),(0,n.createElement)(a.Z,{setAuthenticated:r}))}},62494:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h});var n=r(51806),a=r(39229),o=r(86989),s=r.n(o),i=r(55609),l=r(69307),c=r(65736),u=r(20982),d=r(47285),p=r(53463),m=r(5890);const __=c.__;const h=function(e){const{setAuthenticated:t}=e,[r,o]=(0,l.useState)(!1),c=(0,l.useCallback)((()=>{o(!0),s()({path:(0,d.k)("connection",u.iT)}).then((e=>{if(e.error)throw e.message;(0,a.Z)(e.connect_URL,(()=>{o(!1),t(!0)}))})).catch((()=>{o(!1)}))}),[t]);return(0,n.createElement)("div",{className:"jetpack-external-media-auth"},r?(0,n.createElement)(m.Z,null):(0,n.createElement)(p.Z,null),(0,n.createElement)(i.Button,{variant:"primary",disabled:r,onClick:c},__("Connect to Google Photos","jetpack")))}},2772:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(51806),a=r(86989),o=r.n(a),s=r(55609),i=r(69307),l=r(65736),c=r(20982),u=r(47285);const __=l.__,d=e=>{let{setAuthenticated:t}=e;const[r,a]=(0,i.useState)(!1),l=(0,i.useCallback)((()=>{a(!0),o()({method:"DELETE",path:(0,u.k)("connection",c.iT)}).then((()=>t(!1))).catch((()=>a(!1)))}),[t]);return(0,n.createElement)(s.Button,{variant:"secondary",className:"jetpack-external-media-browser__disconnect",onClick:l,disabled:r,isBusy:r},__("Disconnect from Google Photos","jetpack"))}},20107:(e,t,r)=>{"use strict";r.d(t,{Z:()=>g});var n=r(51806),a=r(55609),o=r(69307),s=r(65736),i=r(20982),l=r(11583),c=r(47285),u=r(86167),d=r(4819),p=r(58912),m=r(53800),h=r(64034);const __=s.__;const g=function(e){const{account:t,allowedTypes:r,copyMedia:s,getMedia:g,isCopying:f,isLoading:b,media:v,multiple:k,onChangePath:y,pageHandle:E,path:w,setAuthenticated:_,showAdditionalFilters:C=!1}=e,j=(S=r)&&1===S.length&&"image"===S[0];var S;const[x,P]=(0,o.useState)(j?{mediaType:"photo",date:{range:i.CY}}:{date:{range:i.CY}}),T=(0,o.useRef)(""),L=(0,o.useRef)(""),N=w.ID===i.oI?(0,p.Z)(x):null,A={number:20,path:w.ID};N&&(A.filter=N);const R=(0,c.k)("list",i.iT,A),I=(0,o.useCallback)((function(e){g(R,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}),[g,R]),M=(0,o.useCallback)((e=>{const t=v.find((t=>t.ID===e));L.current=w,y(t||{ID:e})}),[v,y,L,w]),Z=(0,o.useCallback)((e=>{s(e,(0,c.k)("copy",i.iT),i.iT)}),[s]);return(0,o.useEffect)((()=>{T!==R&&(T.current=R,I({},w!==L.current))}),[T,R,I,w]),(0,n.createElement)("div",{className:"jetpack-external-media-wrapper__google"},(0,n.createElement)("div",{className:"jetpack-external-media-header__view"},(0,n.createElement)(a.SelectControl,{className:"jetpack-external-media-header__select",label:__("View","jetpack"),value:w.ID!==i.oI?i.Tu:i.oI,disabled:b||f,options:i.OG,onChange:M}),C&&w.ID===i.oI&&(0,n.createElement)(m.Z,{filters:x,isLoading:b,setFilters:P,canChangeMedia:!j}),(0,n.createElement)("div",{className:"jetpack-external-media-header__filter"},w.ID===i.oI&&(0,n.createElement)(d.Z,{filters:x,isLoading:b,setFilters:P,canChangeMedia:!j}),w.ID!==i.oI&&w.ID!==i.Tu&&(0,n.createElement)(u.Z,{path:w,setPath:M})),(!b||v.length>0)&&(0,n.createElement)(h.Z,{account:t,setAuthenticated:_})),(0,n.createElement)(l.Z,{className:"jetpack-external-media-browser__google",key:R,media:v,isCopying:f,isLoading:b,nextPage:I,onCopy:Z,pageHandle:E,multiple:k,setPath:M}))}},77453:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(29755),o=r(97893),s=r(62494),i=r(20107);const l=(0,o.Z)(a.Y.GooglePhotos)((function(e){return e.isAuthenticated?(0,n.createElement)(i.Z,e):(0,n.createElement)(s.Z,e)}))},38457:(e,t,r)=>{"use strict";r.d(t,{Dv:()=>u,ZR:()=>d});var n=r(51806),a=r(65736),o=r(81427),s=r(20982),i=r(77453),l=r(41214),c=r(12533);const __=a.__,u=[{id:s.iT,label:__("Google Photos","jetpack"),icon:(0,n.createElement)(o.He,{className:"components-menu-items__item-icon"}),keyword:"google photos"},{id:s.wk,label:__("Pexels Free Photos","jetpack"),icon:(0,n.createElement)(o.yk,{className:"components-menu-items__item-icon"}),keyword:"pexels"},{id:s.Eh,label:__("Openverse","jetpack"),icon:(0,n.createElement)(o.FG,{className:"components-menu-items__item-icon"}),keyword:"openverse"}];function d(e){return e===s.wk?c.Z:e===s.iT?i.Z:e===s.Eh?l.Z:null}},41214:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(51806),a=r(55609),o=r(69307),s=r(65736),i=r(92819),l=r(20982),c=r(11583),u=r(29755),d=r(47285),p=r(97893);const __=s.__;const m=(0,p.Z)(u.Y.Openverse)((function(e){const{media:t,isCopying:r,isLoading:s,pageHandle:u,multiple:p,copyMedia:m,getMedia:h}=e,[g,f]=(0,o.useState)((0,i.sample)(l.h9)),[b,v]=(0,o.useState)(""),k=(0,o.useCallback)((e=>{m(e,(0,d.k)("copy",l.Eh),l.Eh)}),[m]),y=(0,o.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];g&&h((0,d.k)("list",l.Eh,{number:20,search:g}),t)}),[h,g]),E=(0,o.useRef)(),w=(0,o.useCallback)((e=>{e.preventDefault(),v(g),y(e,!0),E.current=g}),[y,g]);(0,o.useEffect)(y,[]);const _=(0,o.useRef)(null);return(0,o.useEffect)((()=>{if(!_?.current)return;const e=_.current.querySelector("input[type='search']");e&&(e.focus(),e.select())}),[]),(0,n.createElement)("div",{className:"jetpack-external-media-wrapper__openverse"},(0,n.createElement)("form",{ref:_,className:"jetpack-external-media-header__openverse",onSubmit:w},(0,n.createElement)(a.TextControl,{"aria-label":__("Search","jetpack"),type:"search",value:g,onChange:f,disabled:!!r}),(0,n.createElement)(a.Button,{isPrimary:!0,onClick:w,type:"submit",disabled:!g.length||g===E.current||r},__("Search","jetpack"))),(0,n.createElement)(c.Z,{key:b,className:"jetpack-external-media-browser__openverse",media:t,isCopying:r,isLoading:s,nextPage:y,onCopy:k,pageHandle:u,multiple:p}))}))},12533:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(51806),a=r(55609),o=r(69307),s=r(65736),i=r(92819),l=r(20982),c=r(11583),u=r(29755),d=r(47285),p=r(97893);const __=s.__;const m=(0,p.Z)(u.Y.Pexels)((function(e){const{media:t,isCopying:r,isLoading:s,pageHandle:u,multiple:p,copyMedia:m,getMedia:h}=e,[g,f]=(0,o.useState)((0,i.sample)(l.h9)),[b,v]=(0,o.useState)(""),k=(0,o.useCallback)((e=>{m(e,(0,d.k)("copy",l.wk),l.wk)}),[m]),y=(0,o.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];g&&h((0,d.k)("list",l.wk,{number:20,path:"recent",search:g}),t)}),[h,g]),E=(0,o.useRef)(),w=(0,o.useCallback)((e=>{e.preventDefault(),v(g),y(e,!0),E.current=g}),[y,g]);(0,o.useEffect)(y,[]);const _=(0,o.useRef)(null);return(0,o.useEffect)((()=>{if(!_.current)return;const e=Array.from(_.current.elements).find((e=>"search"===e.type));e&&(e.focus(),e.select())}),[]),(0,n.createElement)("div",{className:"jetpack-external-media-wrapper__pexels"},(0,n.createElement)("form",{ref:_,className:"jetpack-external-media-header__pexels",onSubmit:w},(0,n.createElement)(a.TextControl,{"aria-label":__("Search","jetpack"),type:"search",value:g,onChange:f,disabled:!!r}),(0,n.createElement)(a.Button,{variant:"primary",onClick:w,type:"submit",disabled:!g.length||g===E.current||r},__("Search","jetpack"))),(0,n.createElement)(c.Z,{key:b,className:"jetpack-external-media-browser__pexels",media:t,isCopying:r,isLoading:s,nextPage:y,onCopy:k,pageHandle:u,multiple:p}))}))},97893:(e,t,r)=>{"use strict";r.d(t,{Z:()=>y});var n=r(90017),a=r.n(n),o=r(51806),s=r(86989),i=r.n(s),l=r(55609),c=r(94333),u=r(9818),d=r(69307),p=r(65736),m=r(39630),h=r(65235),g=r.n(h),f=r(92819),b=r(20982),v=r(1285),k=r(29755);const __=p.__;function y(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:k.Y.Unknown;return(0,c.createHigherOrderComponent)((t=>{class r extends d.Component{constructor(t){var r;super(t),r=this,a()(this,"contentRef",(e=>{e?(this.contentElement=e,this.modalElement=e.closest(".jetpack-external-media-browser"),this.modalElement&&this.modalElement.addEventListener("keydown",this.stopArrowKeysPropagation)):this.modalElement&&(this.modalElement.removeEventListener("keydown",this.stopArrowKeysPropagation),this.modalElement=null,this.contentElement=null)})),a()(this,"stopArrowKeysPropagation",(e=>{[m.UP,m.DOWN,m.LEFT,m.RIGHT].includes(e.keyCode)&&!e.target.classList.contains("jetpack-external-media-browser__media__item")&&e.stopPropagation()})),a()(this,"setAuthenticated",(t=>{this.setState({isAuthenticated:t}),(0,v.uk)(e,t)})),a()(this,"getMedia",(function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r.state.isLoading||(t&&r.props.noticeOperations.removeAllNotices(),r.setState({account:t?r.defaultAccount:r.state.account,isLoading:!0,media:t?[]:r.state.media,nextHandle:!t&&r.state.nextHandle},(()=>r.getMediaRequest(e))))})),a()(this,"handleApiError",(e=>{if("authorization_required"===e.code)return this.setAuthenticated(!1),void this.setState({isLoading:!1,isCopying:!1});e.errors?.length&&(e={code:e.errors[0].error,message:e.errors[0].message});const{noticeOperations:t}=this.props;t.createErrorNotice("internal_server_error"===e.code?"Internal server error":e.message),this.setState({isLoading:!1,isCopying:!1})})),a()(this,"getMediaRequest",(e=>{const{nextHandle:t,media:r}=this.state;if(!1===t&&r.length>0)return void this.setState({isLoading:!1});const n=this.getRequestUrl(e);i()({path:n,method:"GET",parse:void 0===window.wpcomFetch}).then((e=>{this.setState({account:e.meta.account,media:this.mergeMedia(r,e.media),nextHandle:e.meta.next_page,isLoading:!1}),this.setAuthenticated(!0)})).catch(this.handleApiError)})),a()(this,"copyMedia",((e,t,r)=>{var n;this.setState({isCopying:e}),this.props.noticeOperations.removeAllNotices(),this.modalElement&&this.modalElement.focus(),i()({path:t,method:"POST",data:{external_ids:e.map((e=>e.guid)),media:e.map((e=>({guid:e.guid,caption:e.caption,title:e.title}))),service:r,post_id:null!==(n=this.props.postId)&&void 0!==n?n:0}}).then((e=>{e.media&&(e=e.media.map((e=>({alt:e.alt,caption:e.caption,id:e.ID,type:"image",url:e.URL}))));const{value:t,addToGallery:r,multiple:n}=this.props,a=n?e:e[0],o=e.find((e=>e.errors));if(o){const{errors:e}=o,t=Object.keys(e)[0];this.handleApiError({code:t,message:e[t]})}else this.props.onClose(),this.props.onSelect(r?t.concat(e):a)})).catch(this.handleApiError)})),a()(this,"onChangePath",((e,t)=>{this.setState({path:e},t)})),this.defaultAccount={image:"",name:""},this.state={account:this.defaultAccount,media:[],nextHandle:!1,isLoading:!1,isCopying:null,isAuthenticated:!0,path:{ID:b.oI}}}mergeMedia(e,t){return(0,f.uniqBy)(e.concat(t),"ID")}getRequestUrl(e){const{nextHandle:t}=this.state;return t?e+"&page_handle="+encodeURIComponent(t):e}render(){const{account:e,isAuthenticated:r,isCopying:n,isLoading:a,media:s,nextHandle:i,path:c}=this.state,{allowedTypes:u,multiple:d=!1,noticeUI:p,onClose:m}=this.props,h=n?__("Inserting media","jetpack"):__("Select media","jetpack",0),f=n?__("When the media is finished copying and inserting, you will be returned to the editor.","jetpack"):__("Select the media you would like to insert into the editor.","jetpack",0),b="jetpack-external-media-browser__description",v=g()({"jetpack-external-media-browser":!0,"jetpack-external-media-browser--is-copying":n});return(0,o.createElement)(l.Modal,{onRequestClose:m,title:h,aria:{describedby:b},className:v},(0,o.createElement)("div",{ref:this.contentRef},p,(0,o.createElement)("p",{id:b,className:"jetpack-external-media-browser--visually-hidden"},f),(0,o.createElement)(t,{account:e,getMedia:this.getMedia,copyMedia:this.copyMedia,isCopying:n,isLoading:a,media:s,pageHandle:i,allowedTypes:u,isAuthenticated:r,setAuthenticated:this.setAuthenticated,multiple:d,path:c,onChangePath:this.onChangePath})))}}return(0,u.withSelect)((e=>({postId:e("core/editor").getCurrentPostId()})))((0,l.withNotices)(r))}))}},42232:(e,t,r)=>{"use strict";r.d(t,{A:()=>n,Z:()=>a});const n="SET_AUTHENTICATED",a={setAuthenticated:(e,t)=>({type:n,payload:{isAuthenticated:t,mediaSource:e}})}},94841:(e,t,r)=>{"use strict";r.d(t,{j:()=>i});var n=r(9818),a=r(42232),o=r(57805),s=r(38972);const i="jetpack-media",l={actions:a.Z,reducer:o.Z,selectors:s.Z},c=(0,n.createReduxStore)(i,l);(0,n.register)(c)},57805:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(42232),a=r(2790);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.F,t=arguments.length>1?arguments[1]:void 0;return t.type===n.A?{...e,mediaSourceIsAuthenticated:e.mediaSourceIsAuthenticated.set(t.payload.mediaSource,t.payload.isAuthenticated)}:e}},38972:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={isAuthenticated:(e,t)=>{var r;return null!==(r=e.mediaSourceIsAuthenticated.get(t))&&void 0!==r&&r}}},2790:(e,t,r)=>{"use strict";r.d(t,{F:()=>a});var n=r(29755);const a={mediaSourceIsAuthenticated:new Map([[n.Y.Pexels,!1],[n.Y.GooglePhotos,!1],[n.Y.Openverse,!1],[n.Y.Unknown,!1]])}},11317:(e,t,r)=>{"use strict";r.d(t,{Qu:()=>s});var n=r(13419),a=r(92819);function o(){return(0,a.get)((0,n.Pb)(),["allowedMimeTypes"],[])}function s(e,t){if(!e||!t)return!1;if(!o())return!1;const r=(n=t)?(0,a.pickBy)(o(),(e=>(0,a.startsWith)(e,`${n}/`))):{};var n;const s=(i=r)?(0,a.flatten)((0,a.map)((0,a.keys)(i),(e=>e.split("|")))):[];var i;if("string"==typeof e){const t=e.split(".").pop();return t&&s.includes(t)}return"object"==typeof e&&(e.type&&(0,a.values)(r).includes(e.type))}},5820:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(4981);function a(){const e=(0,n.getCategories)();for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];for(const t of r)if(e.some((e=>{let{slug:r}=e;return r===t})))return t;throw new Error(`Could not find a category from the provided list: ${r.join(",")}`)}},74251:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(96483);function a(e,t){if(!(0,n.isURL)(t))return null;let r=t;try{const a=(0,n.getQueryArg)(t,"state"),o=JSON.parse(atob(a));if(e)o.from_editor_post_id=e;else{const e=new URLSearchParams(window.location.search);o.from_site_editor_post_id=e.get("postId"),o.from_site_editor_post_type=e.get("postType")}r=(0,n.addQueryArgs)(t,{state:btoa(JSON.stringify(o))})}catch(e){0}return r}},99307:(e,t,r)=>{"use strict";r.d(t,{BM:()=>i,CG:()=>o,fH:()=>a,j3:()=>l,yn:()=>s});var n=r(9818);const a="site",o="widget",s="post",i="customizer",l=()=>(0,n.select)("core/edit-site")?a:(0,n.select)("core/edit-widgets")?o:(0,n.select)("core/customize-widgets")?i:(0,n.select)("core/edit-navigation")?"navigation":(0,n.select)("core/edit-post")?s:"unknown"},4554:(e,t,r)=>{"use strict";r.d(t,{S:()=>a});var n=r(92819);const a=(e,t)=>(0,n.reduce)(t,((t,r,n)=>{if(void 0===e[n])return t;const{type:a,validator:o,validValues:s,default:i}=e[n];return t[n]="boolean"===a?"false"!==r&&!!r:o?o(r)?r:i:s?s.includes(r)?r:i:r,t}),{})},59809:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(82674),a=r.n(n),o=r(51806),s=r(65235),i=r.n(s),l=r(73139);const c=e=>{let{children:t=null,isError:r=!1,...n}=e;const s=i()("help-message",{"help-message-is-error":r});return t&&(0,o.createElement)("div",a()({className:s},n),r&&(0,o.createElement)(l.Z,{size:"24","aria-hidden":"true",role:"img",focusable:"false"}),(0,o.createElement)("span",null,t))}},81427:(e,t,r)=>{"use strict";r.d(t,{Ae:()=>v,FG:()=>m,He:()=>p,IM:()=>f,JO:()=>g,K9:()=>y,Pw:()=>E,h:()=>k,ll:()=>w,o1:()=>_,yk:()=>h,zf:()=>b});var n=r(82674),a=r.n(n),o=r(51806),s=r(80550),i=r(55609),l=r(65235),c=r.n(l),u=r(70355);const d=s.O["Jetpack Green 40"],p=e=>(0,o.createElement)(i.SVG,a()({height:"24",width:"24",viewBox:"1.2 10.8 169.6 169.6",xmlns:"http://www.w3.org/2000/svg"},e),(0,o.createElement)(i.Path,{d:"m43.6 49.4c23.4 0 42.4 19 42.4 42.4v3.9h-80.9c-2.1 0-3.8-1.7-3.9-3.9 0-23.4 19-42.4 42.4-42.4z",fill:"#f6bc04"}),(0,o.createElement)(i.Path,{d:"m132.2 53.2c0 23.4-19 42.4-42.4 42.4h-3.8v-80.9c0-2.1 1.7-3.9 3.8-3.9 23.5 0 42.4 19 42.4 42.4z",fill:"#ea4335"}),(0,o.createElement)(i.Path,{d:"m128.4 141.9c-23.4 0-42.4-19-42.4-42.4v-3.9h80.9c2.1 0 3.9 1.7 3.9 3.8 0 23.5-19 42.5-42.4 42.5z",fill:"#4285f4"}),(0,o.createElement)(i.Path,{d:"m39.8 138c0-23.4 19-42.4 42.4-42.4h3.8v80.9c0 2.1-1.7 3.8-3.9 3.9-23.4 0-42.3-19-42.3-42.4z",fill:"#34a853"})),m=e=>(0,o.createElement)(i.SVG,a()({style:{fill:"#30272e",background:"#ffe033",padding:"3px",width:"22px",height:"24px"},width:"46",height:"42",viewBox:"0 0 46 42",xmlns:"http://www.w3.org/2000/svg"},e),(0,o.createElement)(i.G,null,(0,o.createElement)(i.Path,{d:"M0 9.3975C0 14.5687 4.1722 18.795 9.3353 18.795V0C4.1722 0 0 4.2 0 9.3975Z"}),(0,o.createElement)(i.Path,{d:"M13.6118 9.3975C13.6118 14.5687 17.784 18.795 22.9471 18.795V0C17.8101 0 13.6118 4.2 13.6118 9.3975Z"}),(0,o.createElement)(i.Path,{d:"M36.5589 18.795C41.7147 18.795 45.8942 14.5876 45.8942 9.3975C45.8942 4.2074 41.7147 0 36.5589 0C31.4032 0 27.2236 4.2074 27.2236 9.3975C27.2236 14.5876 31.4032 18.795 36.5589 18.795Z"}),(0,o.createElement)(i.Path,{d:"M0 32.6025C0 37.8 4.1722 42 9.3353 42V23.2312C4.1722 23.2312 0 27.4312 0 32.6025Z"}),(0,o.createElement)(i.Path,{d:"M13.6118 32.5238C13.6118 37.695 17.784 41.9213 22.9471 41.9213V23.1525C17.8101 23.1525 13.6118 27.3525 13.6118 32.5238Z"}),(0,o.createElement)(i.Path,{d:"M36.5589 41.9212C41.7147 41.9212 45.8942 37.7138 45.8942 32.5238C45.8942 27.3337 41.7147 23.1263 36.5589 23.1263C31.4032 23.1263 27.2236 27.3337 27.2236 32.5238C27.2236 37.7138 31.4032 41.9212 36.5589 41.9212Z"}))),h=e=>(0,o.createElement)(i.SVG,a()({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),(0,o.createElement)(i.Path,{d:"M14 7H9v10h3.9v-3.8H14c1.7 0 3.1-1.4 3.1-3.1C17.2 8.4 15.8 7 14 7z"}),(0,o.createElement)(i.Path,{d:"M20.5 2h-17C2.7 2 2 2.7 2 3.5v17c0 .8.7 1.5 1.5 1.5h17c.8 0 1.5-.7 1.5-1.5v-17c0-.8-.7-1.5-1.5-1.5zm-5.6 13.2V19H7V5h7c2.8 0 5.1 2.3 5.1 5.1.1 2.5-1.8 4.7-4.2 5.1z"})),g=()=>{const e="#757575";return(0,o.createElement)(i.SVG,{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/SVG",x:"0px",y:"0px",viewBox:"0 0 1292 448",style:{enableBackground:"new 0 0 1292 448"}},(0,o.createElement)(i.G,{id:"Icon"},(0,o.createElement)(i.Path,{class:"st0",fill:"#F6B704",d:"M171.6,177.4c23.4,0,42.4,19,42.4,42.4v3.9h-80.9c-2.1,0-3.8-1.7-3.9-3.9C129.2,196.4,148.2,177.4,171.6,177.4 C171.6,177.4,171.6,177.4,171.6,177.4z"}),(0,o.createElement)(i.Path,{class:"st1",fill:"#E54335",d:"M260.2,181.2c0,23.4-19,42.4-42.4,42.4H214v-80.9c0-2.1,1.7-3.9,3.8-3.9h0 C241.3,138.8,260.2,157.8,260.2,181.2C260.2,181.2,260.2,181.2,260.2,181.2z"}),(0,o.createElement)(i.Path,{class:"st2",fill:"#4280EF",d:"M256.4,269.9c-23.4,0-42.4-19-42.4-42.4v-3.9h80.9c2.1,0,3.9,1.7,3.9,3.8v0 C298.8,250.9,279.8,269.9,256.4,269.9C256.4,269.9,256.4,269.9,256.4,269.9z"}),(0,o.createElement)(i.Path,{class:"st3",fill:"#34A353",d:"M167.8,266c0-23.4,19-42.4,42.4-42.4c0,0,0,0,0,0h3.9v80.9c0,2.1-1.7,3.8-3.9,3.9 C186.7,308.4,167.8,289.4,167.8,266z"})),(0,o.createElement)(i.G,{id:"Photos"},(0,o.createElement)(i.Path,{class:"st4",fill:e,d:"M796,272v-91.6h31.2c15.2,0,28.7,11.3,28.7,27.3s-13.4,27.3-28.7,27.3h-19.4V272H796z M827.5,223.6 c8.8,0,16-7.2,16-16s-7.2-16-16-16h-19.7v32H827.5z"}),(0,o.createElement)(i.Path,{class:"st4",fill:e,d:"M875.8,209.3l-0.5,8.7h0.5c3.3-5.8,11.3-10.8,19.8-10.8c16,0,23.9,10.9,23.9,26.4V272h-11.8v-36.6 c0-13-6.5-17.4-15.5-17.4c-10.2,0-16.5,9.7-16.5,19.3V272H864v-91.6h11.8V209.3z"}),(0,o.createElement)(i.Path,{class:"st4",fill:e,d:"M993.8,240.6c0,19.1-13.4,33.4-32.2,33.4s-32.2-14.3-32.2-33.4s13.4-33.4,32.2-33.4S993.8,221.6,993.8,240.6z M982,240.6c0-14.3-10-22.6-20.5-22.6s-20.5,8.3-20.5,22.6s10,22.7,20.5,22.7S982,255,982,240.6L982,240.6z"}),(0,o.createElement)(i.Path,{class:"st4",fill:e,d:"M1008,252.9V220h-11v-10.7h11v-19.2h11.8v19.2h15.3V220h-15.3v32c0,7,2.9,10.2,8.4,10.2c1.8,0.1,3.7-0.3,5.4-1 l4.1,10.1c-3,1.2-6.2,1.8-9.5,1.7C1015,273,1008,265.7,1008,252.9z"}),(0,o.createElement)(i.Path,{class:"st4",fill:e,d:"M1105.8,240.6c0,19.1-13.4,33.4-32.2,33.4s-32.2-14.3-32.2-33.4s13.4-33.4,32.2-33.4 S1105.8,221.6,1105.8,240.6z M1094,240.6c0-14.3-10-22.6-20.5-22.6s-20.5,8.3-20.5,22.6s10,22.7,20.5,22.7S1094,255,1094,240.6 L1094,240.6z"}),(0,o.createElement)(i.Path,{class:"st4",fill:e,d:"M1111,256.1l10.5-4.4c3.3,7.9,9.5,11.8,17,11.8c7.3,0,12.5-3.6,12.5-8.8c0-3.2-1.9-6.6-8.6-8.3l-12.7-3.1 c-5.8-1.4-16.8-6.4-16.8-17.4c0-11.4,11.8-18.7,24.8-18.7c10.9,0,20.3,5,24.2,14.6l-10.2,4.2c-2.4-5.9-8.2-8.3-14.3-8.3 c-6.7,0-12.4,3-12.4,8.1c0,4,3.3,6.1,8.3,7.3l12.4,2.9c12.4,2.9,17.3,10.6,17.3,18.3c0,11.1-10,19.7-24.7,19.7 C1123.2,274,1114.7,265.1,1111,256.1z"})),(0,o.createElement)(i.G,{id:"Google"},(0,o.createElement)(i.Path,{class:"st4",fill:e,d:"M348.7,221.6c0-28.9,24.3-52.5,53.2-52.5c13.5-0.2,26.4,5,36,14.5l-10.1,10.1c-6.9-6.7-16.2-10.4-25.9-10.2 c-21.1,0-37.6,17-37.6,38.2s16.5,38.1,37.6,38.1c13.7,0,21.5-5.5,26.5-10.5c4.1-4.1,6.8-10,7.8-18H402v-14.4h48.3 c0.5,3,0.8,6,0.8,9c0,10.8-2.9,24.1-12.4,33.5c-9.2,9.6-21,14.7-36.6,14.7C373,274,348.7,250.5,348.7,221.6z"}),(0,o.createElement)(i.Path,{class:"st4",fill:e,d:"M490,206.5c-18.7,0-33.9,14.2-33.9,33.8S471.3,274,490,274s33.9-14.3,33.9-33.8S508.7,206.5,490,206.5z M490,260.7c-10.2,0-19.1-8.4-19.1-20.5s8.8-20.5,19.1-20.5s19.1,8.3,19.1,20.5S500.2,260.7,490,260.7z"}),(0,o.createElement)(i.Path,{class:"st4",fill:e,d:"M564,206.5c-18.7,0-33.9,14.2-33.9,33.8S545.3,274,564,274s33.9-14.3,33.9-33.8S582.7,206.5,564,206.5z M564,260.7c-10.2,0-19.1-8.4-19.1-20.5s8.8-20.5,19.1-20.5s19.1,8.3,19.1,20.5S574.2,260.7,564,260.7z"}),(0,o.createElement)(i.Path,{class:"st4",fill:e,d:"M654.8,208.5v5.5h-0.5c-3.3-4-9.7-7.6-17.8-7.6c-16.9,0-32.4,14.9-32.4,33.9s15.5,33.7,32.4,33.7 c8.1,0,14.5-3.6,17.8-7.7h0.5v4.9c0,12.9-6.9,19.8-18,19.8c-9.1,0-14.7-6.5-17-12l-12.9,5.4c5,12.1,16.8,20.1,30,20 c17.4,0,32.1-10.2,32.1-35.2v-60.7H654.8z M637.8,260.7c-10.2,0-18.8-8.6-18.8-20.4s8.6-20.6,18.8-20.6s18,8.7,18,20.6 S647.9,260.7,637.8,260.7L637.8,260.7z"}),(0,o.createElement)(i.Rect,{x:"679.2",y:"172.7",class:"st4",fill:e,width:"14.8",height:"99.3"}),(0,o.createElement)(i.Path,{class:"st4",fill:e,d:"M734.7,260.7c-7.6,0-12.9-3.5-16.4-10.2l45.2-18.7L762,228c-2.8-7.6-11.4-21.5-28.9-21.5s-31.9,13.7-31.9,33.8 c0,19,14.3,33.8,33.5,33.8c11.3,0.1,21.9-5.6,28.2-15l-11.5-7.7C747.5,257,742.3,260.7,734.7,260.7z M733.6,219.5 c5.9,0,10.9,2.9,12.5,7.2l-30.2,12.5C715.5,226.2,726,219.5,733.6,219.5L733.6,219.5z"})))},f=e=>{let{size:t=24,border:r=0,className:n,color:a=d}=e;const s=r?-r/t*32:0;return(0,o.createElement)(i.SVG,{className:c()("jetpack-logo",n),width:t,height:t,viewBox:`${s} ${s} ${32-2*s} ${32-2*s}`},(0,o.createElement)(i.Path,{className:"jetpack-logo__icon-circle",fill:a,stroke:r?"#fff":"transparent",strokeWidth:r,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z"}),(0,o.createElement)(i.Polygon,{className:"jetpack-logo__icon-triangle",fill:"#fff",points:`15,19 ${7-.5*s},19 15,${3-s}`}),(0,o.createElement)(i.Polygon,{className:"jetpack-logo__icon-triangle",fill:"#fff",points:`17,${29+s} 17,13 ${25+.5*s},13`}))},b={foreground:(0,u.m)(),src:(0,o.createElement)(i.SVG,{viewBox:"0 0 100 100"},(0,o.createElement)(i.Path,{d:"M100,44H72.4l23.9-13.8l-6-10.4L66.4,33.6L80.2,9.7l-10.4-6L56,27.59V0H44v27.6L30.2,3.7l-10.4,6l13.8,23.9 L9.7,19.8l-6,10.4L27.6,44H0V56h27.6L3.7,69.8l6,10.4l23.9-13.8L19.8,90.3l10.4,6L44,72.4V100H56V72.41l13.8,23.9l10.4-6L66.4,66.4 l23.9,13.8l6-10.4L72.4,56H100V44z M50,65.23c-8.41,0-15.23-6.82-15.23-15.23c0-8.41,6.82-15.23,15.23-15.23S65.23,41.59,65.23,50 C65.23,58.41,58.41,65.23,50,65.23z"}))},v={foreground:(0,u.m)(),src:(0,o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20.7 17",xmlSpace:"preserve"},(0,o.createElement)(i.Path,{d:"m20.7 12.9-.9-11c0-.5-.2-.9-.5-1.3-.3-.3-.8-.5-1.3-.5L1.9 0h-.1c-.2 0-.5 0-.7.1C.9.2.7.4.5.5.4.7.2.9.1 1.1c-.1.2-.1.5-.1.7v.1l.9 13.4c0 .5.2.9.5 1.3.3.2.8.4 1.3.4H3l16.1-2c.4 0 .9-.3 1.1-.6.3-.3.5-.8.5-1.2v-.3zm-3.1.8L4.2 15.3H4c-.4 0-.8-.1-1-.4-.3-.3-.4-.6-.5-1L1.7 3.2v-.1c0-.4.2-.8.5-1 .3-.3.7-.4 1-.4h.1l13.5.1c.4 0 .8.1 1 .4.3.3.4.6.5 1L19 12v.3c0 .4-.2.7-.4 1-.3.2-.6.4-1 .4z"}))},k={foreground:(0,u.m)(),src:(0,o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43",xmlSpace:"preserve"},(0,o.createElement)(i.Path,{transform:"translate(-25)",fillRule:"evenodd",d:"M37 31.908c0 1.376.893 2.268 2.27 2.268H45.9c3.956 0 7.192-1.337 9.392-3.68H37v1.412zM45.901 9H39.27C37.893 9 37 9.893 37 11.269v1.411h18.294C53.093 10.338 49.857 9 45.9 9zm5.787 16.176c0 1.113.726 1.835 1.845 1.835h3.973c.45-1.117.753-2.345.894-3.671h-4.867c-1.119 0-1.845.722-1.845 1.836zm-5.507-7.166c0 1.113.725 1.836 1.844 1.836H58.4a13.644 13.644 0 00-.894-3.672h-9.481c-1.119 0-1.844.723-1.844 1.836zm1.843 7.166c0-1.114-.726-1.836-1.845-1.836H37v3.671h9.18c1.118 0 1.843-.722 1.843-1.835zm-5.508-7.166c0-1.113-.726-1.836-1.844-1.836H37v3.672h3.672c1.118 0 1.844-.723 1.844-1.836zM83.667 21.209c.296-1.437",clipRule:"evenodd"}))},y={foreground:(0,u.m)(),src:(0,o.createElement)(i.SVG,{viewBox:"0 0 24 24"},(0,o.createElement)(i.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,o.createElement)(i.G,null,(0,o.createElement)(i.Path,{d:"M16.5 4.5c2.206 0 4 1.794 4 4 0 4.67-5.543 8.94-8.5 11.023C9.043 17.44 3.5 13.17 3.5 8.5c0-2.206 1.794-4 4-4 1.298 0 2.522.638 3.273 1.706L12 7.953l1.227-1.746c.75-1.07 1.975-1.707 3.273-1.707m0-1.5c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 5.72 6.5 10.438 10 12.85 3.5-2.412 10-7.13 10-12.85C22 5.462 19.538 3 16.5 3z"})))},E=((0,u.m)(),(0,o.createElement)(i.SVG,{viewBox:"0 0 24 24"},(0,o.createElement)(i.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,o.createElement)(i.G,null,(0,o.createElement)(i.Path,{d:"M15.9216 2H2.98533C2.43803 2 1.99023 2.45 1.99023 3V17L5.97062 13H15.9216C16.4689 13 16.9167 12.55 16.9167 12V3C16.9167 2.45 16.4689 2 15.9216 2ZM14.9265 4V11H5.14469L3.98043 12.17V4H14.9265ZM18.9069 6H20.8971C21.4444 6 21.8922 6.45 21.8922 7V22L17.9118 18H6.96572C6.41842 18 5.97062 17.55 5.97062 17V15H18.9069V6Z"}))),(0,u.m)(),(0,o.createElement)(i.SVG,{viewBox:"0 0 24 24"},(0,o.createElement)(i.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,o.createElement)(i.G,null,(0,o.createElement)(i.Path,{d:"M3.98042 2H19.9019C20.9965 2 21.8921 2.9 21.8921 4V16C21.8921 17.1 20.9965 18 19.9019 18H5.97061L1.99023 22V4C1.99023 2.9 2.88582 2 3.98042 2ZM5.97061 16H19.9019V4H3.98042V18L5.97061 16Z"}))),(0,u.m)(),(0,o.createElement)(i.SVG,{viewBox:"0 0 24 24"},(0,o.createElement)(i.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,o.createElement)(i.G,null,(0,o.createElement)(i.Path,{d:"M11.1114 8H20.0002M11.1113 15H20.0002",stroke:(0,u.m)(),strokeWidth:"1.5"}),(0,o.createElement)(i.Path,{d:"M4 10V6L8 8L4 10Z",fill:(0,u.m)()}),(0,o.createElement)(i.Path,{d:"M4 17V13L8 15L4 17Z",fill:(0,u.m)()}))),(0,u.m)(),(0,o.createElement)(i.SVG,{viewBox:"0 0 24 24"},(0,o.createElement)(i.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,o.createElement)(i.G,null,(0,o.createElement)(i.Path,{d:"M4 12V4L11 8L4 12Z"}),(0,o.createElement)(i.Path,{d:"M4 14.5H20V16H4V14.5Z"}),(0,o.createElement)(i.Path,{d:"M4 18.5H13V20H4V18.5Z"}))),(0,o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(i.Path,{d:"M2.5 7.5V4.5H15.5V7.5H10.5V19.5H7.5V7.5H2.5ZM12.5 9.5H21.5V12.5H18.5V19.5H15.5V12.5H12.5V9.5Z"})),(0,o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(i.Path,{d:"M12.7049 2V6C8.30658 6 4.74414 9.58 4.74414 14C4.74414 18.42 8.30658 22 12.7049 22C17.1032 22 20.6656 18.42 20.6656 14H18.6755C18.6755 17.31 15.9987 20 12.7049 20C9.41113 20 6.73433 17.31 6.73433 14C6.73433 10.69 9.41113 8 12.7049 8V12L17.6804 7L12.7049 2ZM11.6501 12.73L11.4013 14.9L12.068 15.06C12.0753 15.0526 12.0827 15.0447 12.0901 15.0366C12.1131 15.0116 12.1375 14.9851 12.1675 14.97C12.1874 14.96 12.2073 14.9475 12.2272 14.935C12.2471 14.9225 12.2671 14.91 12.287 14.9C12.3268 14.88 12.3865 14.86 12.4362 14.85C12.486 14.84 12.5556 14.83 12.6352 14.83C12.7447 14.83 12.8542 14.85 12.9338 14.88C13.0134 14.91 13.083 14.96 13.1427 15.03C13.2024 15.1 13.2422 15.17 13.2721 15.27C13.302 15.37 13.3119 15.47 13.3119 15.58V15.58C13.3119 15.69 13.3119 15.79 13.2821 15.89C13.2522 15.99 13.2124 16.07 13.1726 16.14C13.1328 16.21 13.0631 16.27 12.9935 16.31C12.9238 16.35 12.8343 16.37 12.7248 16.37C12.5556 16.37 12.4163 16.31 12.3069 16.22C12.1974 16.13 12.1377 15.99 12.1178 15.81H11.2819C11.2819 16.01 11.3317 16.19 11.4113 16.34C11.4909 16.49 11.5904 16.63 11.7297 16.73C11.869 16.83 12.0183 16.92 12.1874 16.97C12.3566 17.02 12.5357 17.05 12.7148 17.05C12.9636 17.05 13.1726 17 13.3517 16.93C13.5308 16.86 13.6801 16.75 13.7995 16.62C13.9189 16.49 14.0085 16.34 14.0682 16.17C14.1279 16 14.1577 15.82 14.1577 15.63C14.1577 15.41 14.1179 15.21 14.0682 15.03C14.0184 14.85 13.9289 14.7 13.8194 14.58C13.7099 14.46 13.5706 14.37 13.4114 14.3C13.2522 14.23 13.0731 14.2 12.8641 14.2C12.7945 14.2 12.7248 14.21 12.6651 14.22C12.6352 14.225 12.6054 14.2325 12.5755 14.24C12.5457 14.2475 12.5158 14.255 12.486 14.26C12.4263 14.27 12.3765 14.29 12.3367 14.31C12.3201 14.3183 12.3035 14.325 12.2876 14.3313C12.2654 14.3401 12.2446 14.3483 12.2272 14.36L12.3367 13.44H14.0284V12.73H11.6501Z"})),(0,o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(i.Path,{d:"M11.9412 2V6C16.3395 6 19.902 9.58 19.902 14C19.902 18.42 16.3395 22 11.9412 22C7.54291 22 3.98047 18.42 3.98047 14H5.97066C5.97066 17.31 8.64746 20 11.9412 20C15.235 20 17.9118 17.31 17.9118 14C17.9118 10.69 15.235 8 11.9412 8V12L6.96575 7L11.9412 2ZM10.8864 12.73L10.6376 14.9L11.3044 15.06C11.3117 15.0526 11.319 15.0447 11.3264 15.0366C11.3494 15.0116 11.3738 14.9851 11.4039 14.97C11.4238 14.96 11.4437 14.9475 11.4636 14.935C11.4835 14.9225 11.5034 14.91 11.5233 14.9C11.5631 14.88 11.6228 14.86 11.6725 14.85C11.7223 14.84 11.792 14.83 11.8716 14.83C11.981 14.83 12.0905 14.85 12.1701 14.88C12.2497 14.91 12.3194 14.96 12.3791 15.03C12.4388 15.1 12.4786 15.17 12.5084 15.27C12.5383 15.37 12.5482 15.47 12.5482 15.58V15.58C12.5482 15.69 12.5482 15.79 12.5184 15.89C12.4885 15.99 12.4487 16.07 12.4089 16.14C12.3691 16.21 12.2995 16.27 12.2298 16.31C12.1601 16.35 12.0706 16.37 11.9611 16.37C11.792 16.37 11.6526 16.31 11.5432 16.22C11.4337 16.13 11.374 15.99 11.3541 15.81H10.5182C10.5182 16.01 10.568 16.19 10.6476 16.34C10.7272 16.49 10.8267 16.63 10.966 16.73C11.1053 16.83 11.2546 16.92 11.4238 16.97C11.5929 17.02 11.7721 17.05 11.9512 17.05C12.1999 17.05 12.4089 17 12.588 16.93C12.7672 16.86 12.9164 16.75 13.0358 16.62C13.1552 16.49 13.2448 16.34 13.3045 16.17C13.3642 16 13.3941 15.82 13.3941 15.63C13.3941 15.41 13.3543 15.21 13.3045 15.03C13.2547 14.85 13.1652 14.7 13.0557 14.58C12.9463 14.46 12.807 14.37 12.6477 14.3C12.4885 14.23 12.3094 14.2 12.1004 14.2C12.0308 14.2 11.9611 14.21 11.9014 14.22C11.8716 14.225 11.8417 14.2325 11.8119 14.24C11.782 14.2475 11.7522 14.255 11.7223 14.26C11.6626 14.27 11.6128 14.29 11.573 14.31C11.5564 14.3183 11.5398 14.325 11.5239 14.3313C11.5017 14.3401 11.481 14.3483 11.4636 14.36L11.573 13.44H13.2647V12.73H10.8864Z"})),(0,o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(i.Path,{d:"M0 0h24v24H0z",fill:"none"}),(0,o.createElement)(i.Path,{d:"M7 2v11h3v9l7-12h-4l4-8z",fill:"currentColor"}))),w=(0,o.createElement)(i.SVG,{width:"29",height:"21",viewBox:"0 0 29 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(i.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M2.79037 0.59375C4.0363 0.59375 5.13102 1.41658 5.47215 2.60947L8.8452 14.4044C8.8486 14.4164 8.85411 14.4273 8.86124 14.4368L12.8572 0.59375H15.0927H21.2721C25.6033 0.59375 28.5066 3.39892 28.5066 7.64565C28.5066 11.9411 25.5272 14.6196 21.0818 14.6196H18.1499H14.3719L13.6379 16.8813C12.9796 18.9095 11.0827 20.2839 8.94152 20.2839C6.80035 20.2839 4.90341 18.9095 4.24517 16.8813L0.137069 4.22276C-0.444671 2.43022 0.898038 0.59375 2.79037 0.59375ZM15.7374 10.4119H20.0156C21.8718 10.4119 22.9856 9.35018 22.9856 7.64565C22.9856 5.93137 21.8718 4.91839 20.0156 4.91839H17.5202L15.7374 10.4119Z",fill:"#000000"})),_=(0,o.createElement)(i.SVG,{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(i.Path,{d:"M4.75725 2.075C4.60279 1.97745 4.41041 1.97489 4.25365 2.06832C4.09689 2.16174 4 2.3367 4 2.52632V21.4737C4 21.6633 4.09689 21.8383 4.25365 21.9317C4.41041 22.0251 4.60279 22.0226 4.75725 21.925L19.7573 12.4513C19.9079 12.3562 20 12.1849 20 12C20 11.8151 19.9079 11.6438 19.7573 11.5487L4.75725 2.075Z",fill:"white"}));(0,o.createElement)(i.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",style:{fill:"none"}},(0,o.createElement)(i.Path,{d:"M13.9 16.55L13.75 16.75V17V19C13.75 19.1381 13.6381 19.25 13.5 19.25H10.5C10.3619 19.25 10.25 19.1381 10.25 19V17V16.75L10.1 16.55L7.25 12.75V9C7.25 8.86193 7.36193 8.75 7.5 8.75H16.5C16.6381 8.75 16.75 8.86193 16.75 9V12.75L13.9 16.55Z",stroke:"currentColor",strokeWidth:"1.5"}),(0,o.createElement)("line",{x1:"9.75",y1:"9",x2:"9.75",y2:"4",stroke:"currentColor",strokeWidth:"1.5"}),(0,o.createElement)("line",{x1:"14.25",y1:"9",x2:"14.25",y2:"4",stroke:"currentColor",strokeWidth:"1.5"})),(0,o.createElement)(i.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(i.Path,{d:"M18 6.75H6C5.30964 6.75 4.75 7.30964 4.75 8V16C4.75 16.6904 5.30964 17.25 6 17.25H18C18.6904 17.25 19.25 16.6904 19.25 16V8C19.25 7.30964 18.6904 6.75 18 6.75Z",stroke:"currentColor",strokeWidth:"1.5"}),(0,o.createElement)(i.Path,{d:"M5 7L12 13L19 7",stroke:"currentColor",strokeWidth:"1.5"})),(0,o.createElement)(i.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(i.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M7 2.75H6.25V3.5V8.25H5.5C4.25736 8.25 3.25 9.25736 3.25 10.5V18.5C3.25 19.7426 4.25736 20.75 5.5 20.75H18C19.2426 20.75 20.25 19.7426 20.25 18.5V10.5C20.25 9.25736 19.2426 8.25 18 8.25H9.5V9.75H18C18.4142 9.75 18.75 10.0858 18.75 10.5V18.5C18.75 18.9142 18.4142 19.25 18 19.25H5.5C5.08579 19.25 4.75 18.9142 4.75 18.5V10.5C4.75 10.0858 5.08579 9.75 5.5 9.75H6.25V10H7.75V6.5H7.75229H7.75464H7.75699H7.75934H7.76169H7.76405H7.7664H7.76875H7.77111H7.77346H7.77582H7.77817H7.78053H7.78289H7.78524H7.7876H7.78996H7.79232H7.79468H7.79704H7.7994H7.80176H7.80412H7.80648H7.80884H7.8112H7.81357H7.81593H7.81829H7.82065H7.82302H7.82538H7.82774H7.83011H7.83247H7.83484H7.8372H7.83956H7.84193H7.84429H7.84666H7.84902H7.85139H7.85375H7.85612H7.85848H7.86085H7.86322H7.86558H7.86795H7.87031H7.87268H7.87504H7.87741H7.87977H7.88214H7.8845H7.88687H7.88923H7.8916H7.89396H7.89633H7.89869H7.90106H7.90342H7.90578H7.90815H7.91051H7.91287H7.91524H7.9176H7.91996H7.92232H7.92468H7.92704H7.9294H7.93177H7.93412H7.93648H7.93884H7.9412H7.94356H7.94592H7.94828H7.95063H7.95299H7.95535H7.9577H7.96006H7.96241H7.96477H7.96712H7.96947H7.97182H7.97418H7.97653H7.97888H7.98123H7.98358H7.98592H7.98827H7.99062H7.99297H7.99531H7.99766H8H13.5V5.5V5V4.25V4V2.75H7Z",fill:"currentColor"})),(0,o.createElement)(i.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(i.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15.6416 9.51049L16.3128 10.701L17.5605 10.1432C17.8568 10.0108 18.1778 9.94237 18.5024 9.94253H18.5032C19.7889 9.94253 20.8543 10.9979 20.8543 12.3265C20.8543 13.655 19.7889 14.7104 18.5032 14.7104C18.3449 14.7104 18.1896 14.6946 18.0348 14.6638L16.9668 14.4513L16.434 15.401C16.2045 15.81 15.7702 16.0783 15.2884 16.0783L15.2855 16.0783C15.0869 16.0787 14.8909 16.0337 14.7125 15.9467L13.2933 15.2546L12.6749 16.7074C12.4124 17.3238 11.8034 17.75 11.1027 17.75C10.3678 17.75 9.74128 17.289 9.49859 16.6313L9.04988 15.4152L7.78159 15.6829C7.68225 15.7039 7.58099 15.7144 7.47947 15.7143H7.47856C6.67732 15.7143 6 15.0516 6 14.203C6 13.6392 6.30098 13.1495 6.75148 12.8837L7.89299 12.2103L7.36523 10.9945C7.25853 10.7487 7.20361 10.4836 7.20389 10.2156V10.2141C7.20389 9.13045 8.08351 8.25 9.17451 8.25C9.69379 8.25 10.1669 8.451 10.5168 8.77912L10.5156 8.78033L10.5156 8.78034L10.5156 8.78036L10.5156 8.78039L10.5157 8.78042L10.5157 8.78047L10.5158 8.78051L10.5158 8.7806L10.5159 8.78065L10.516 8.78075L10.5161 8.78081L10.5162 8.78095L10.5163 8.78102L10.5164 8.78118L10.5165 8.78126L10.5167 8.78145L10.5168 8.78153L10.517 8.78176L10.5171 8.78184L10.5173 8.7821L10.5174 8.78219L10.5177 8.78248L10.5178 8.78257L10.5181 8.7829L10.5182 8.78299L10.5186 8.78336L10.5187 8.78344L10.5191 8.78385L10.5192 8.78392L10.5196 8.78438L10.5197 8.78444L10.5202 8.78495L10.5202 8.78499L10.5208 8.78556L10.5208 8.78558L10.5214 8.7862L10.5214 8.78621L10.5221 8.78686L10.5221 8.7869L10.5228 8.78755L10.5229 8.78762L10.5235 8.78827L10.5236 8.78839L10.5243 8.78903L10.5244 8.78919L10.5251 8.78982L10.5253 8.79003L10.5259 8.79065L10.5261 8.79091L10.5267 8.7915L10.5271 8.79183L10.5276 8.79239L10.528 8.79279L10.5286 8.79332L10.529 8.79379L10.5295 8.79427L10.5301 8.79483L10.5305 8.79526L10.5311 8.79591L10.5315 8.79629L10.5323 8.79702L10.5326 8.79734L10.5334 8.79818L10.5337 8.79843L10.5346 8.79938L10.5348 8.79955L10.5359 8.80062L10.5359 8.8007L10.5371 8.80188L10.5371 8.8019L10.5383 8.80309L10.5385 8.80322L10.5396 8.80434L10.5398 8.80458L10.5409 8.80562L10.5412 8.80598L10.5422 8.80693L10.5427 8.80743L10.5435 8.80827L10.5441 8.80891L10.5449 8.80964L10.5457 8.81043L10.5463 8.81105L10.5472 8.812L10.5477 8.81248L10.5488 8.81361L10.5492 8.81395L10.5505 8.81526L10.5507 8.81544L10.5522 8.81695L10.5522 8.81697L10.5538 8.81853L10.5539 8.81868L10.5554 8.82011L10.5557 8.82046L10.557 8.82173L10.5575 8.82227L10.5586 8.82338L10.5594 8.82413L10.5603 8.82506L10.5613 8.82603L10.562 8.82676L10.5632 8.82798L10.5637 8.8285L10.5652 8.82996L10.5655 8.83027L10.5672 8.83199L10.5673 8.83206L10.5691 8.83389L10.5693 8.83406L10.571 8.83574L10.5714 8.83618L10.5729 8.83763L10.5736 8.83834L10.5748 8.83954L10.5758 8.84054L10.5767 8.84148L10.578 8.84278L10.5787 8.84345L10.5803 8.84507L10.5807 8.84545L10.5826 8.8474L10.5827 8.84748L10.5848 8.84954L10.585 8.84978L10.5869 8.85162L10.5874 8.8522L10.589 8.85373L10.5899 8.85466L10.5911 8.85587L10.5924 8.85717L10.5933 8.85804L10.595 8.85972L10.5955 8.86023L10.5976 8.86231L10.5977 8.86246L10.5999 8.86471L10.6002 8.86495L10.6022 8.86699L10.6029 8.86764L10.6045 8.86929L10.6056 8.87037L10.6069 8.87162L10.6084 8.87314L10.6092 8.87398L10.6112 8.87596L10.6116 8.87637L10.614 8.87878L10.6141 8.87883L10.6165 8.88122L10.617 8.88174L10.6189 8.88369L10.6199 8.88469L10.6214 8.88618L10.6229 8.88769L10.6239 8.8887L10.626 8.89074L10.6265 8.89124L10.629 8.89381L10.6291 8.89383L10.6316 8.89641L10.6322 8.89697L10.6324 8.89712C10.6683 8.93709 10.7026 8.97856 10.7351 9.02142L10.7474 9.01213L10.7482 9.01292L10.7483 9.01306L10.7517 9.01642L10.7529 9.01768L10.7552 9.01995L10.7576 9.02236L10.7587 9.02349L10.7623 9.02706L10.7623 9.02708L10.7659 9.03064L10.7671 9.03185L10.7695 9.03425L10.7719 9.03667L10.7731 9.03787L10.7768 9.04152L10.7768 9.04155L10.7804 9.04519L10.7817 9.04647L10.7841 9.04887L10.7867 9.05144L10.7878 9.05258L10.7915 9.0563L10.7917 9.05647L10.7953 9.06005L10.7968 9.06155L10.799 9.06381L10.8019 9.06667L10.8028 9.06759L10.8066 9.0714L10.8071 9.07185L10.8105 9.07522L10.8123 9.07708L10.8143 9.07906L10.8176 9.08236L10.8182 9.08291L10.822 9.08679L10.8229 9.08769L10.8259 9.09068L10.8283 9.09308L10.8298 9.0946L10.8338 9.09852L10.8338 9.09853L10.8377 9.10248L10.8392 9.104L10.8417 9.10644L10.8457 9.11043L10.8497 9.11443L10.8537 9.11845L10.8577 9.12249L10.8618 9.12654L10.8659 9.13061L10.8699 9.1347L10.874 9.13881L10.8782 9.14293L10.8823 9.14707L10.8865 9.15122L10.8906 9.15539L10.8948 9.15958L10.899 9.16378L10.9032 9.168L10.9075 9.17224L10.9117 9.17649L10.916 9.18076L10.9203 9.18504L10.9246 9.18934L10.9289 9.19365L10.9332 9.19798L10.9376 9.20232L10.9419 9.20668L10.9463 9.21105L10.9507 9.21544L10.9551 9.21984L10.9595 9.22425L10.9639 9.22868L10.9684 9.23313L10.9728 9.23758L10.9773 9.24205L10.9818 9.24654L10.9863 9.25104L10.9908 9.25555L10.9953 9.26008L10.9999 9.26462L11.0044 9.26917L11.009 9.27373L11.0135 9.27831L11.0181 9.2829L11.0227 9.2875L11.0274 9.29212L11.032 9.29674L11.0366 9.30138L11.0413 9.30604L11.0459 9.3107L11.0506 9.31537L11.0553 9.32006L11.06 9.32476L11.0647 9.32947L11.0694 9.33419L11.0742 9.33892L11.0789 9.34367L11.0837 9.34842L11.0884 9.35319L11.0932 9.35796L11.098 9.36275L11.1028 9.36755L11.1076 9.37235L11.1124 9.37717L11.1172 9.382L11.1221 9.38683L11.1269 9.39168L11.1318 9.39654L11.1366 9.4014L11.1415 9.40628L11.1464 9.41116L11.1513 9.41606L11.1562 9.42096L11.1611 9.42587L11.166 9.43079L11.171 9.43572L11.1759 9.44066L11.1808 9.4456L11.1858 9.45056L11.1908 9.45552L11.1957 9.46049L11.2007 9.46547L11.2057 9.47046L11.2107 9.47545L11.2157 9.48045L11.2207 9.48546L11.2257 9.49048L11.2307 9.4955L11.2358 9.50053L11.2408 9.50557L11.2458 9.51061L11.2509 9.51566L11.256 9.52072L11.261 9.52578L11.2661 9.53085L11.2712 9.53592L11.2762 9.54101L11.2813 9.54609L11.2864 9.55119L11.2915 9.55628L11.2966 9.56139L11.3017 9.5665L11.3069 9.57161L11.312 9.57673L11.3171 9.58186L11.3222 9.58699L11.3274 9.59212L11.3325 9.59726L11.3376 9.6024L11.3428 9.60755L11.3479 9.6127L11.3531 9.61786L11.3583 9.62302L11.3634 9.62818L11.3686 9.63335L11.3738 9.63852L11.3789 9.6437L11.3841 9.64887L11.3893 9.65406L11.3945 9.65924L11.3997 9.66443L11.4049 9.66962L11.41 9.67481L11.4152 9.68001L11.4204 9.6852L11.4256 9.6904L11.4308 9.69561L11.436 9.70081L11.4413 9.70602L11.4465 9.71122L11.4517 9.71643L11.4569 9.72165L11.4621 9.72686L11.4673 9.73207L11.4725 9.73729L11.4777 9.7425L11.483 9.74772L11.4882 9.75294L11.4934 9.75816L11.4986 9.76338L11.5038 9.7686L11.5091 9.77382L11.5143 9.77904L11.5195 9.78426L11.5247 9.78948L11.5299 9.7947L11.5352 9.79992L11.5404 9.80514L11.5456 9.81036L11.5508 9.81558L11.556 9.82079L11.5612 9.82601L11.5665 9.83123L11.5717 9.83644L11.5769 9.84165L11.5821 9.84686L11.5873 9.85207L11.5925 9.85728L11.5977 9.86249L11.6029 9.86769L11.6081 9.87289L11.6133 9.87809L11.6185 9.88329L11.6237 9.88849L11.6289 9.89368L11.6341 9.89887L11.6393 9.90406L11.6445 9.90924L11.6497 9.91442L11.6548 9.9196L11.66 9.92477L11.6652 9.92994L11.6703 9.93511L11.6755 9.94027L11.6807 9.94543L11.6858 9.95059L11.691 9.95574L11.6961 9.96089L11.7013 9.96603L11.7064 9.97117L11.7115 9.9763L11.7167 9.98143L11.7218 9.98656L11.7269 9.99167L11.732 9.99679L11.7371 10.0019L11.7422 10.007L11.7473 10.0121L11.7524 10.0172L11.7575 10.0223L11.7626 10.0274L11.7677 10.0324L11.7727 10.0375L11.7778 10.0426L11.7829 10.0476L11.7879 10.0527L11.793 10.0577L11.798 10.0627L11.803 10.0678L11.808 10.0728L11.8131 10.0778L11.8181 10.0828L11.8231 10.0878L11.8281 10.0928L11.833 10.0978L11.838 10.1028L11.843 10.1077L11.8479 10.1127L11.8529 10.1177L11.8578 10.1226L11.8628 10.1275L11.8677 10.1325L11.8726 10.1374L11.8775 10.1423L11.8824 10.1472L11.8873 10.1521L11.8922 10.157L11.8971 10.1619L11.902 10.1667L11.9068 10.1716L11.9117 10.1764L11.9165 10.1813L11.9213 10.1861L11.9261 10.1909L11.9309 10.1957L11.9357 10.2005L11.9405 10.2053L11.9453 10.2101L11.9501 10.2148L11.9548 10.2196L11.9596 10.2243L11.9643 10.2291L11.969 10.2338L11.9737 10.2385L11.9784 10.2432L11.9831 10.2479L11.9878 10.2525L11.9924 10.2572L11.9971 10.2619L12.0017 10.2665L12.0064 10.2711L12.011 10.2757L12.0156 10.2803L13.0762 9.21967L13.0716 9.21507L13.067 9.21045L13.0624 9.20583L13.0577 9.20119L13.0531 9.19654L13.0484 9.19188L13.0438 9.1872L13.0391 9.18252L13.0344 9.17782L13.0297 9.17311L13.025 9.16839L13.0202 9.16366L13.0155 9.15892L13.0107 9.15417L13.006 9.1494L13.0012 9.14463L12.9964 9.13984L12.9916 9.13505L12.9868 9.13024L12.982 9.12542L12.9772 9.1206L12.9723 9.11576L12.9675 9.11092L12.9626 9.10606L12.9578 9.1012L12.9529 9.09632L12.948 9.09144L12.9431 9.08655L12.9382 9.08164L12.9333 9.07673L12.9284 9.07181L12.9234 9.06689L12.9185 9.06195L12.9136 9.057L12.9086 9.05205L12.9048 9.04829L13.0111 9.15036C13.3196 8.82924 13.7369 8.64023 14.1928 8.64023C14.7957 8.64023 15.3379 8.97179 15.6416 9.51049ZM11.9483 8.0917C12.1799 7.85456 12.4472 7.65398 12.7412 7.49903C13.1764 7.26964 13.67 7.14023 14.1928 7.14023C15.3737 7.14023 16.3972 7.7963 16.9483 8.77385C17.4375 8.55516 17.9673 8.44226 18.5032 8.44253C20.6289 8.44253 22.3543 10.1811 22.3543 12.3265C22.3543 14.4718 20.6289 16.2104 18.5032 16.2104C18.2434 16.2104 17.9901 16.1843 17.7421 16.135C17.2599 16.9944 16.3382 17.5783 15.2884 17.5783C14.957 17.579 14.6288 17.5208 14.319 17.4073C14.2294 17.3744 14.1412 17.337 14.055 17.2949C14.0121 17.3958 13.9641 17.4941 13.9114 17.5894C13.3647 18.5786 12.3115 19.25 11.1027 19.25C9.71839 19.25 8.54402 18.3774 8.09134 17.1506C7.88985 17.1931 7.68448 17.2145 7.47856 17.2143C5.83183 17.2143 4.5 15.8628 4.5 14.203C4.5 13.0877 5.09965 12.1167 5.98928 11.5918C5.80055 11.157 5.7034 10.688 5.70389 10.2141C5.70389 8.29833 7.25878 6.75 9.17451 6.75C9.91511 6.75 10.6042 6.98301 11.1683 7.38015C11.3677 7.52056 11.5515 7.68148 11.7164 7.85987L11.7168 7.86025L11.7196 7.86308L11.7197 7.86309L11.7225 7.86597L11.7232 7.86663L11.7254 7.86886L11.7268 7.87024L11.7283 7.87178L11.7304 7.87389L11.7313 7.87472L11.7341 7.87759L11.7343 7.87769L11.7372 7.88068L11.7379 7.88133L11.7403 7.8837L11.7417 7.88513L11.7433 7.88674L11.7455 7.88897L11.7464 7.8898L11.7494 7.89286L11.7494 7.89288L11.7526 7.89599L11.7534 7.89679L11.7557 7.89912L11.7573 7.90078L11.7588 7.90228L11.7614 7.90481L11.762 7.90546L11.7652 7.90866L11.7655 7.90889L11.7684 7.91188L11.7696 7.91302L11.7717 7.91512L11.7738 7.9172L11.7749 7.91839L11.778 7.92143L11.7782 7.92168L11.7815 7.92499L11.7823 7.92571L11.7849 7.92832L11.7866 7.93003L11.7882 7.93168L11.791 7.93441L11.7916 7.93505L11.795 7.93845L11.7954 7.93883L11.7984 7.94187L11.7999 7.9433L11.8019 7.94531L11.8044 7.94783L11.8053 7.94877L11.8088 7.95226L11.809 7.9524L11.8123 7.95576L11.8136 7.95702L11.8158 7.95929L11.8183 7.9617L11.8194 7.96283L11.823 7.9664L11.823 7.96642L11.8265 7.96998L11.8277 7.97119L11.8301 7.97359L11.8326 7.97601L11.8338 7.97721L11.8374 7.98086L11.8374 7.98089L11.8411 7.98453L11.8424 7.98581L11.8448 7.98821L11.8473 7.99078L11.8485 7.99192L11.8522 7.99564L11.8524 7.99581L11.8559 7.99939L11.8574 8.00089L11.8597 8.00315L11.8626 8.00601L11.8635 8.00693L11.8673 8.01074L11.8677 8.01119L11.8711 8.01456L11.873 8.01642L11.875 8.0184L11.8783 8.0217L11.8788 8.02225L11.8827 8.02613L11.8836 8.02703L11.8866 8.03002L11.889 8.03242L11.8905 8.03394L11.8944 8.03785L11.8944 8.03787L11.8984 8.04182L11.8999 8.04334L11.9023 8.04578L11.9063 8.04977L11.9103 8.05377L11.9143 8.05779L11.9184 8.06183L11.9224 8.06588L11.9265 8.06995L11.9306 8.07404L11.9347 8.07815L11.9388 8.08227L11.943 8.08641L11.9471 8.09056L11.9483 8.0917Z",fill:"currentColor"}))},12923:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(13419),a=r(92819);function o(){return(0,a.get)((0,n.Pb)(),["jetpack","is_active"],!1)}},99621:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(13419),a=r(92819);function o(){return(0,a.get)((0,n.Pb)(),["jetpack","is_offline_mode"],!1)}},8264:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(55609),o=r(65736),s=r(98817),i=r(34613);const __=o.__,{Fill:l,Slot:c}=(0,a.createSlotFill)("JetpackLikesAndSharingPanel");(0,s.registerPlugin)("jetpack-likes-and-sharing-panel",{render:()=>(0,n.createElement)(c,null,(e=>e.length?(0,n.createElement)(i.Z,null,(0,n.createElement)(a.PanelBody,{title:__("Likes and Sharing","jetpack"),initialOpen:!1},e)):null))})},34613:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(51806),a=r(55609),o=r(9818),s=r(47701),i=r.n(s),l=r(72067),c=r(69307),u=r(98817),d=r(96483),p=r(81427);const{Fill:m,Slot:h}=(0,a.createSlotFill)("JetpackPluginSidebar");i()((function(){"true"===(0,d.getQueryArg)(window.location.search,"jetpackSidebarIsOpen")&&(0,o.dispatch)("core/interface").enableComplementaryArea("core/edit-post","jetpack-sidebar/jetpack")})),(0,u.registerPlugin)("jetpack-sidebar",{render:()=>(0,n.createElement)(h,null,(e=>e.length?(0,n.createElement)(c.Fragment,null,(0,n.createElement)(l.PluginSidebarMoreMenuItem,{target:"jetpack",icon:(0,n.createElement)(p.IM,null)},"Jetpack"),(0,n.createElement)(l.PluginSidebar,{name:"jetpack",title:"Jetpack",icon:(0,n.createElement)(p.IM,null)},e)):null))})},40083:(e,t,r)=>{"use strict";r.d(t,{S:()=>o,l:()=>a});var n=r(65736);const __=n.__,a="_jetpack_newsletter_access",o={everybody:{key:"everybody",label:__("Everyone","jetpack"),panelHeading:__("Everyone","jetpack")},subscribers:{key:"subscribers",label:__("Anyone subscribed","jetpack"),panelHeading:__("All subscribers","jetpack")},paid_subscribers:{key:"paid_subscribers",label:__("Paid subscribers only","jetpack"),panelHeading:__("Paid subscribers","jetpack")}}},19617:(e,t,r)=>{"use strict";r.d(t,{M:()=>i,_:()=>s});var n=r(13419),a=r(37798),o=r(40083);const s=e=>{var t;const[r=[]]=(0,a.useEntityProp)("postType",e,"meta");let n=null!==(t=r[o.l])&&void 0!==t?t:o.S.everybody.key;return n||(n=o.S.everybody.key),n},i=()=>{var e;return null!==(e=(0,n.Pb)()?.jetpack?.is_newsletter_feature_enabled)&&void 0!==e&&e}},52143:(e,t,r)=>{"use strict";r.d(t,{IO:()=>y,Y6:()=>g,al:()=>k,rU:()=>h});var n=r(51806),a=r(6895),o=r(55609),s=r(94333),i=r(9818),l=r(12238),c=r(69307),u=r(65736),d=r(7652),p=r(40083),m=r(88966);const __=u.__;function h(e){let{href:t,children:r}=e;return(0,n.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:t,className:"jetpack-newsletter-link"},r)}function g(e,t,r){switch(p.S[e].key){case p.S.everybody.key:case p.S.subscribers.key:return t||0;case p.S.paid_subscribers.key:return r||0;default:return 0}}function f(e){let{accessLevel:t,paywallBlockSettings:r=!1}=e;const{hasPostBeenPublished:s,hasPostBeenScheduled:f}=(0,i.useSelect)((e=>{const{isCurrentPostPublished:t,isCurrentPostScheduled:r}=e(l.store);return{hasPostBeenPublished:t(),hasPostBeenScheduled:r()}})),{emailSubscribers:b,paidSubscribers:v}=(0,i.useSelect)((e=>e(d.h).getSubscriberCounts())),k=(0,i.useSelect)((e=>e(l.store).getEditedPostVisibility()));if((0,m.hc)(k,t))return;const y=g(t,b,v);if(0===y)return(0,n.createElement)(o.FlexBlock,null,(0,n.createElement)(o.Notice,{status:"info",isDismissible:!1,className:"edit-post-post-visibility__notice"},(0,c.createInterpolateElement)(__("You don’t have any subscribers yet. How about <importingLink>importing</importingLink> some? Or check out <thisGuideLink>this guide</thisGuideLink> on how to grow your audience.","jetpack"),{importingLink:(0,n.createElement)(h,{href:(0,a.Z)("paid-newsletter-import-subscribers")}),thisGuideLink:(0,n.createElement)(h,{href:(0,a.Z)("paid-newsletter-guide-grow-audience")})})));if(r)return;let E=__("subscribers","jetpack");t===p.S.paid_subscribers.key&&(E=__("paid subscribers","jetpack"));let w=(0,u.sprintf)(/* translators: %1s is the number of subscribers in numerical format, %2s options are paid subscribers or subscribers */
__("This will also be sent to <br/><strong>%1$s %2$s</strong>.","jetpack"),y,E);return s&&!f&&(w=(0,u.sprintf)(/* translators: %1s is the number of subscribers in numerical format, %2s options are paid subscribers or subscribers */
__("This was sent to <strong>%1$s %2$s</strong>.","jetpack"),y,E)),(0,n.createElement)(o.FlexBlock,null,(0,n.createElement)(o.Notice,{status:"info",isDismissible:!1,className:"edit-post-post-visibility__notice"},(0,c.createInterpolateElement)(w,{br:(0,n.createElement)("br",null),strong:(0,n.createElement)("strong",null)})))}function b(e){let{stripeConnectUrl:t,isStripeConnected:r,hasNewsletterPlans:a}=e;const o=(0,m.nZ)(a);return a||r?a?r?void 0:(0,n.createElement)("div",{className:"editor-post-visibility__info"},(0,c.createInterpolateElement)(__("<stripeAccountLink>Connect to Stripe</stripeAccountLink> to enable paid subscriptions.","jetpack"),{stripeAccountLink:(0,n.createElement)(h,{href:t})})):(0,n.createElement)("div",{className:"editor-post-visibility__info"},(0,c.createInterpolateElement)(__("<paidPlanLink>Set up a paid subscription plan</paidPlanLink> to enable this option.","jetpack"),{paidPlanLink:(0,n.createElement)(h,{href:o})})):(0,n.createElement)("div",{className:"editor-post-visibility__info"},(0,c.createInterpolateElement)(__("You'll need to connect <stripeAccountLink>Stripe</stripeAccountLink> and add a <paidPlanLink>paid plan</paidPlanLink> to collect payments.","jetpack"),{stripeAccountLink:(0,n.createElement)(h,{href:t}),paidPlanLink:(0,n.createElement)(h,{href:o})}))}function v(e){let{onChange:t,accessLevel:r,hasNewsletterPlans:a,stripeConnectUrl:i,isEditorPanel:l=!1,hasPaywallBlock:c=!1,paywallBlockSettings:u=!1}=e;const d=null===i,m=(0,s.useInstanceId)(v);return(0,n.createElement)("fieldset",{className:"editor-post-visibility__fieldset"},(0,n.createElement)(o.VisuallyHidden,{as:"legend"},__("Audience","jetpack")," "),Object.keys(p.S).map((e=>(!u||e!==p.S.everybody.key)&&(0,n.createElement)("div",{className:"editor-post-visibility__choice",key:e},(0,n.createElement)("input",{value:e,type:"radio",checked:e===r,className:"editor-post-visibility__radio",id:`editor-post-${e}-${m}`,name:`editor-newsletter-access__setting-${m}`,"aria-describedby":`editor-post-${e}-${m}-description`,disabled:e===p.S.paid_subscribers.key&&(!d||!a)||e===p.S.everybody.key&&c,onChange:e=>{const r={};return r[p.l]=e?.target?.value,t&&t(r)}}),(0,n.createElement)("label",{htmlFor:`editor-post-${e}-${m}`,className:"editor-post-visibility__label"},p.S[e].label),e===r&&e!==p.S.everybody.key&&(0,n.createElement)("p",{className:"editor-post-visibility__notice"},(0,n.createElement)(f,{accessLevel:r,paywallBlockSettings:u}))))),l&&(0,n.createElement)(b,{stripeConnectUrl:i,isStripeConnected:d,hasNewsletterPlans:a}))}function k(e){let{accessLevel:t,setPostMeta:r}=e;const{hasNewsletterPlans:a,stripeConnectUrl:s,isLoading:c,hasPaywallBlock:u}=(0,i.useSelect)((e=>{const{getNewsletterProducts:t,getConnectUrl:r,isApiStateLoading:n}=e("jetpack/membership-products"),{getBlocks:a}=e("core/block-editor");return{isLoading:n(),stripeConnectUrl:r(),hasNewsletterPlans:0!==t()?.length,hasPaywallBlock:a().some((e=>"jetpack/paywall"===e.name))}})),d=(0,i.useSelect)((e=>e(l.store).getEditedPostVisibility()));if(c)return(0,n.createElement)(o.Flex,{direction:"column",align:"center"},(0,n.createElement)(o.Spinner,null));const h=null!=t?t:p.S.everybody.key,g=p.S[h]?.label,f=(0,m.hc)(d,t);return(0,n.createElement)(l.PostVisibilityCheck,{render:e=>{let{canEdit:t}=e;return(0,n.createElement)(o.PanelRow,{className:"edit-post-post-visibility"},(0,n.createElement)(o.Flex,{direction:"column"},f&&(0,n.createElement)(m.$P,null),(0,n.createElement)(o.FlexBlock,{direction:"row",justify:"flex-start"},t&&(0,n.createElement)("div",{className:"editor-post-visibility"},(0,n.createElement)(v,{isEditorPanel:!0,onChange:r,accessLevel:h,stripeConnectUrl:s,hasNewsletterPlans:a,hasPaywallBlock:u})),!t&&(0,n.createElement)("span",null,g)),u&&(0,n.createElement)(o.Tip,null,__("The content below the paywall block is exclusive to the selected audience.","jetpack"))))}})}function y(e){let{accessLevel:t,setPostMeta:r}=e;const{hasNewsletterPlans:a,stripeConnectUrl:s,isLoading:c,hasPaywallBlock:u}=(0,i.useSelect)((e=>{const{getNewsletterProducts:t,getConnectUrl:r,isApiStateLoading:n}=e("jetpack/membership-products"),{getBlocks:a}=e("core/block-editor");return{isLoading:n(),stripeConnectUrl:r(),hasNewsletterPlans:0!==t()?.length,hasPaywallBlock:a().some((e=>"jetpack/paywall"===e.name))}})),d=(0,i.useSelect)((e=>e(l.store).getEditedPostVisibility()));if(c)return(0,n.createElement)(o.Flex,{direction:"column",align:"center"},(0,n.createElement)(o.Spinner,null));const h=null!=t?t:p.S.everybody.key,g=p.S[h]?.label,f=(0,m.hc)(d,t);return(0,n.createElement)(l.PostVisibilityCheck,{render:e=>{let{canEdit:t}=e;return(0,n.createElement)(o.PanelRow,{className:"edit-post-post-visibility"},(0,n.createElement)(o.Flex,{direction:"column"},f&&(0,n.createElement)(m.$P,null),t&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(o.FlexBlock,null,(0,n.createElement)(v,{onChange:r,accessLevel:h,stripeConnectUrl:s,hasNewsletterPlans:a,showMisconfigurationWarning:f,hasPaywallBlock:u}))),!t&&(0,n.createElement)("span",null,g)))}})}},88966:(e,t,r)=>{"use strict";r.d(t,{$P:()=>u,ZP:()=>d,hc:()=>c,nZ:()=>l});var n=r(51806),a=r(55609),o=r(69307),s=r(65736),i=r(40083);const _x=s._x,__=s.__,l=e=>{const t="https://wordpress.com/earn/payments-plans/"+location.hostname;return e?t:t+"#add-newsletter-payment-plan"},c=(e,t)=>"public"!==e&&t!==i.S.everybody.key,u=()=>(0,n.createElement)(a.Notice,{status:"warning",isDismissible:!1,className:"edit-post-post-misconfiguration__warning"},(0,o.createInterpolateElement)(__("You’ll need to change the post’s access to Everybody or visibility to Public.<br/><br/>Subscribers aren’t able to view private or password-protected posts.","jetpack"),{br:(0,n.createElement)("br",null)}));function d(e){let{context:t="other",hasNewsletterPlans:r}=e;const o=r?_x("Manage plans","unused context to distinguish translations","jetpack"):__("Set up a paid plan","jetpack");return"toolbar"===t?(0,n.createElement)(a.ToolbarButton,{href:l(r),target:"_blank"},o):(0,n.createElement)(a.Button,{variant:"primary",href:l(r),target:"_blank"},o)}},63066:(e,t,r)=>{"use strict";var n=r(13419),a=r(86989),o=r.n(a),s=r(9818),i=r(65736);r(53961);const __=i.__;function l(){const e=(0,n.lQ)();return void 0!==typeof window&&window.location&&e?(0,n.Wp)()||(0,n.Ug)()?`https://wordpress.com/plans/my-plan/${e}`:`${window.location.protocol}//${e.replace("::","/")}/wp-admin/admin.php?page=jetpack#/my-plan`:null}(async()=>{if(void 0!==typeof window&&window.location){if(new URLSearchParams(window.location.search).get("plan_upgraded")){let e=null;e:try{if((0,n.Wp)())break e;const t=await o()({path:"/jetpack/v4/site"});e=JSON.parse(t.data).plan.product_name}finally{const t=l();(0,s.dispatch)("core/notices").createNotice("success",e?(0,i.sprintf)(/* translators: %s is the plan name, such as Jetpack Premium. */
__("Congratulations! Your site is now on the %s plan.","jetpack"),e):__("Congratulations! Your site is now on a paid plan.","jetpack"),{isDismissible:!0,...t&&{actions:[{url:l(),label:__("View my plan","jetpack")}]}})}}}})()},80425:(e,t,r)=>{"object"==typeof window&&window.Jetpack_Block_Assets_Base_Url&&window.Jetpack_Block_Assets_Base_Url.url&&(r.p=window.Jetpack_Block_Assets_Base_Url.url)},31985:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(13419),a=r(4981),o=r(92694);function s(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const{available:i,details:l,unavailableReason:c}=(0,n.OZ)(e),u=(0,n._D)(c,l),d=s?"jetpack/":"";if(!i&&!u)return!1;const p=(0,a.registerBlockType)(d+e,t);return u&&(0,o.addFilter)("editor.BlockListBlock",`${d+e}-with-has-warning-is-interactive-class-names`,(0,n.T)(d+e)),r.forEach((e=>(0,a.registerBlockType)(d+e.name,e.settings))),p}},36598:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(70444);const o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:24,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"0 0 24 24";return(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:t,height:r,viewBox:o},(0,n.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0V0z",className:"icon-filler"}),e)}},66425:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(52175);const o=(e,t,r,o,s)=>{const{isSelected:i}=t,l=t.attributes[e];return(0,n.createElement)("div",{className:i?`jetpack-${e}-block is-selected`:`jetpack-${e}-block`},!i&&""!==l&&o(t),(i||""===l)&&(0,n.createElement)(a.PlainText,{value:l,placeholder:r,"aria-label":r,onChange:s}))}},92713:(e,t,r)=>{"use strict";var n=r(9818),a=r(65736);r(53961);const __=a.__;if("undefined"!=typeof window&&window.location){const e=new URLSearchParams(window.location.search);e.get("stripe_connect_success")?(0,n.dispatch)("core/notices").createNotice("success",__("Congrats! Your site is now connected to Stripe. You can now start accepting funds!","jetpack")):e.get("stripe_connect_cancelled")&&(0,n.dispatch)("core/notices").createNotice("error",__("You cancelled connecting your site to Stripe.","jetpack"))}},23621:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(86989),a=r.n(n),o=r(92819);function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.noop;return t(!0),new Promise(((r,n)=>{a()({path:`/wpcom/v2/resolve-redirect/?url=${encodeURIComponent(e)}`}).then((a=>{t(!1);const o=a.status?parseInt(a.status,10):null;o&&o>=400?n():r(a.url||e)}),(()=>{t(!1),n()}))}))}},46867:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(9818),a=r(69307),o=r(92819);function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.noop;const[r,s]=(0,a.useState)(!1),{isAutosaveablePost:i,isDirtyPost:l,currentPost:c}=(0,n.useSelect)((e=>{const t=e("core/editor");return{isAutosaveablePost:t.isEditedPostAutosaveable(),isDirtyPost:t.isEditedPostDirty(),currentPost:t.getCurrentPost()}}),[]),u=Object.keys(c).length>0,d=(0,n.useSelect)((e=>!!window.wp?.customize||!!e("core/edit-widgets"))),p=(0,n.dispatch)("core/editor").savePost,m=(0,n.useSelect)((e=>e("core").__experimentalGetDirtyEntityRecords())),h=async e=>{e.preventDefault(),u?l&&i&&await p(e):await(async()=>{for(let e=0;e<m.length;e++)await(0,n.dispatch)("core").saveEditedEntityRecord(m[e].kind,m[e].name,m[e].key)})()};return{autosave:h,autosaveAndRedirect:async n=>{n.preventDefault(),r||(s(!0),h(n).then((()=>{!function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t&&t(e),r?window.open(e,"_blank"):window.top.location.href=e}(e,t,d)})))},isRedirecting:r}}},78798:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(13419),a=r(9818),o=r(92694),s=r(92819),i=(r(87553),r(46867));const l="a8c.wpcom-block-editor.openCheckoutModal";function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.noop;const{checkoutUrl:r,planData:c}=(0,a.useSelect)((t=>{const r=t("core/editor"),a=t("wordpress-com/plans"),{id:o,type:s}=r.getCurrentPost(),i=a&&a.getPlan(e);return{checkoutUrl:(0,n.Qq)({plan:i,planSlug:e,postId:o,postType:s}),planData:i}}),[]),{autosave:u,autosaveAndRedirect:d,isRedirecting:p}=(0,i.Z)(r,t);return[r,async e=>{if(e.preventDefault(),(0,o.hasAction)(l))return e.preventDefault(),u(e),void(0,o.doAction)(l,{products:[c]});d(e)},p,c]}},81673:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(69307);const a=e=>{const t=(0,n.useRef)();return(0,n.useEffect)((()=>{t.current=e}),[e]),t.current};function o(e){let{attributes:t,disableEffects:r=!1,setAttributes:o}=e;const{align:s,width:i}=t,l=a(s);(0,n.useEffect)((()=>{if(r)return;l!==s&&("left"===s||"right"===s)&&i?.includes("%")&&o({width:void 0})}),[s,r,l,o,i])}},46185:(e,t,r)=>{"use strict";r.d(t,{U:()=>a});var n=r(9818);const a=async()=>new Promise((e=>{const t=(0,n.subscribe)((()=>{(0,n.select)("core/editor").isCleanNewPost()&&(t(),e());(0,n.select)("core/block-editor").getBlocks().length>0&&(t(),e())}))}))},67194:(e,t,r)=>{"use strict";r.d(t,{X:()=>a});var n=r(9818);const a=async e=>new Promise((t=>{const r=(0,n.subscribe)((()=>{e()&&(r(),t())}))}))},30429:(e,t,r)=>{"use strict";r.d(t,{G:()=>h,g:()=>g});var n=r(82674),a=r.n(n),o=r(51806),s=r(55609),i=r(69307),l=r(65736),c=r(65235),u=r.n(c);const __=l.__,d=[{value:"%",label:"%",default:100},{value:"px",label:"px",default:150},{value:"em",label:"em",default:10}],p=[{value:"px",label:"px",default:150},{value:"em",label:"em",default:10}],m=["25%","50%","75%","100%"];function h(e){return(0,o.createElement)(s.PanelBody,{title:__("Width settings","jetpack")},(0,o.createElement)(g,a()({showLabel:!1},e)))}function g(e){let{align:t,width:r,onChange:n,showLabel:a=!0}=e;const[l,c]=(0,i.useState)("%");(0,i.useEffect)((()=>{void 0===r&&c("px")}),[r]);const h="left"===t||"right"===t;return(0,o.createElement)(s.BaseControl,{label:a&&__("Width","jetpack")},(0,o.createElement)("div",{className:u()("jetpack-block-width-controls",{"is-aligned":h})},!h&&(0,o.createElement)(s.ButtonGroup,{"aria-label":__("Percentage Width","jetpack")},m.map((e=>(0,o.createElement)(s.Button,{key:e,isSmall:!0,variant:e===r?"primary":void 0,onClick:()=>function(e){const t=r===e?void 0:e;c("%"),n(t)}(e)},e)))),(0,o.createElement)(s.__experimentalUnitControl,{isResetValueOnUnitChange:!0,max:"%"===l||r?.includes("%")?100:void 0,min:0,onChange:e=>n(e),onUnitChange:e=>c(e),size:"small",units:h?p:d,value:r})))}},97115:(e,t,r)=>{"use strict";r.d(t,{Vy:()=>o,Wp:()=>a,_5:()=>s,tT:()=>n});const n="jetpack/media-source",a="is-playing",o="is-error",s="is-paused"},14688:(e,t,r)=>{"use strict";var n=r(9818),a=r(97115),o=r(66858);if(void 0!==n.createReduxStore){const e=(0,n.createReduxStore)(a.tT,o.Z);(0,n.register)(e)}else(0,n.registerStore)(a.tT,o.Z)},66858:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(97115);const a={sources:{},default:null},o={getDefaultMediaSource(e){let t=null;const r=Object.keys(e.sources);if(e.default?t=e.default:r?.length&&(t=e.sources[r[0]].id),t)return e.sources[t]},getMediaPlayerState(e,t){const r=t?e.sources?.[t]:o.getDefaultMediaSource(e);return r?.state},getMediaSourceCurrentTime(e,t){const r=t?e.sources?.[t]:o.getDefaultMediaSource(e);return r?.currentTime},getMediaSourceDuration(e,t){if(!t){const t=o.getDefaultMediaSource(e);return t?.duration}return e.sources?.[t]?.duration},getMediaSourceDomReference(e,t){const r=t?e.sources?.[t]:o.getDefaultMediaSource(e);if(!r)return;const n=r?.domId;return n?document.getElementById(n):void 0}},s={reducer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,t=arguments.length>1?arguments[1]:void 0;const r=t.id||e.default||Object.keys(e.sources)?.[0];switch(t.type){case"REGISTER_MEDIA_SOURCE":return{...e,sources:{...e.sources,[t.id]:{id:t.id,...t.mediaSourceState}}};case"UPDATE_MEDIA_SOURCE_DATA":return{...e,sources:{...e.sources,[t.id]:{...e.sources[t.id],...t.data}}};case"UNREGISTER_MEDIA_SOURCE":{const r=Object.assign({},e);return r.sources[t.id]&&delete r.sources[t.id],t.id===e.default&&(r.default=Object.keys(e.sources)?.[0]),r}case"SET_DEFAULT_MEDIA_SOURCE":return{...e,default:t.id};case"SET_MEDIA_PLAYER_STATE":return{...e,sources:{...e.sources,[r]:{...e.sources[r],state:t.state}}};case"TOGGLE_MEDIA_PLAYER_STATE":return{...e,sources:{...e.sources,[r]:{...e.sources[r],state:e.sources[r].state===n.Wp?n._5:n.Wp}}};case"SET_MEDIA_PLAYER_CURRENT_TIME":return{...e,sources:{...e.sources,[r]:{...e.sources[r],currentTime:t.currentTime}}}}return e},actions:{registerMediaSource:(e,t)=>({type:"REGISTER_MEDIA_SOURCE",id:e,mediaSourceState:t}),updateMediaSourceData:(e,t)=>({type:"UPDATE_MEDIA_SOURCE_DATA",id:e,data:t}),unregisterMediaSource:e=>({type:"UNREGISTER_MEDIA_SOURCE",id:e}),setDefaultMediaSource:e=>({type:"SET_DEFAULT_MEDIA_SOURCE",id:e}),playMediaSource:e=>({type:"SET_MEDIA_PLAYER_STATE",id:e,state:n.Wp}),toggleMediaSource:e=>({type:"TOGGLE_MEDIA_PLAYER_STATE",id:e}),pauseMediaSource:e=>({type:"SET_MEDIA_PLAYER_STATE",id:e,state:n._5}),errorMediaSource:e=>({type:"SET_MEDIA_PLAYER_STATE",id:e,state:n.Vy}),setMediaSourceCurrentTime:(e,t)=>({type:"SET_MEDIA_PLAYER_CURRENT_TIME",id:e,currentTime:t})},selectors:o}},6247:(e,t,r)=>{"use strict";r.r(t),r.d(t,{saveProduct:()=>b,setApiState:()=>g,setConnectUrl:()=>m,setConnectedAccountDefaultCurrency:()=>h,setProducts:()=>p,setSiteSlug:()=>f,setSubscriberCounts:()=>v});var n=r(25607),a=r(86989),o=r.n(a),s=r(65736),i=r(14436),l=r(51585),c=r(79162),u=r(23267),d=r(46529);const __=s.__,p=e=>({type:"SET_PRODUCTS",products:e}),m=e=>({type:"SET_CONNECT_URL",connectUrl:e}),h=e=>({type:"SET_CONNECTED_ACCOUNT_DEFAULT_CURRENCY",connectedAccountDefaultCurrency:e}),g=e=>({type:"SET_API_STATE",apiState:e}),f=e=>({type:"SET_SITE_SLUG",siteSlug:e}),b=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.Bn,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:()=>{},m=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return async i=>{let{dispatch:h,registry:g}=i;const{title:f,price:b,currency:v}=e;if(!f||0===f.length)return(0,d.q)((0,l.l)("product requires a name",t),g),void a(!1);const k=parseFloat(b),y=(0,c.hj)(v);if(k<y)return(0,d.q)((0,s.sprintf)(
// translators: %s: Price
__("Minimum allowed price is %s.","jetpack"),(0,n.ZP)(y,v)),g),void a(!1);if(!(0,c.vs)(v,k))return(0,d.q)((0,l.l)("product requires a valid price",t),g),void a(!1);try{const n=await o()({path:"/wpcom/v2/memberships/product",method:"POST",data:e}),s={id:n.id,title:n.title,interval:n.interval,price:n.price,currency:n.currency},i=g.select(u.G4).getProducts();h(p(i.concat([s]))),r(s.id),m&&(0,d.w)((0,l.l)("successfully created product",t),g),a(!0)}catch(e){(0,d.q)((0,l.l)("there was an error when adding the product",t),g),a(!1)}}},v=e=>({type:"SET_SUBSCRIBER_COUNTS",subscriberCounts:e})},23267:(e,t,r)=>{"use strict";r.d(t,{G4:()=>n,P:()=>s,cH:()=>o,lp:()=>a});const n="jetpack/membership-products",a=0,o=1,s=2},7652:(e,t,r)=>{"use strict";r.d(t,{h:()=>c});var n=r(9818),a=r(6247),o=r(23267),s=r(93100),i=r(20360),l=r(93245);const c=(0,n.createReduxStore)(o.G4,{actions:a,reducer:s.Z,resolvers:i,selectors:l,__experimentalUseThunks:!0});(0,n.register)(c)},93100:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});const n={products:[],apiState:r(23267).lp,connectUrl:null,siteSlug:"",connectedAccountDefaultCurrency:"",subscriberCounts:{socialFollowers:null,emailSubscribers:null,paidSubscribers:null}};function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_PRODUCTS":return{...e,products:t.products};case"SET_CONNECT_URL":return{...e,connectUrl:t.connectUrl};case"SET_API_STATE":return{...e,apiState:t.apiState};case"SET_SITE_SLUG":return{...e,siteSlug:t.siteSlug};case"SET_CONNECTED_ACCOUNT_DEFAULT_CURRENCY":return{...e,connectedAccountDefaultCurrency:t.connectedAccountDefaultCurrency};case"SET_SUBSCRIBER_COUNTS":return{...e,subscriberCounts:t.subscriberCounts}}return e}},20360:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getNewsletterProducts:()=>v,getProducts:()=>k,getSubscriberCounts:()=>y});var n=r(86989),a=r.n(n),o=r(12238),s=r(96483),i=r(14436),l=r(51585),c=r(73905),u=r(74251),d=r(6247),p=r(23267),m=r(46529);const h="membership-products-resolver-getProducts",g="membership-products-resolver-getSubscriberCounts";let f=!1;const b=(e,t,r)=>{if(e)return;const n=r.getProductsNoResolver()[0]?.id;n&&t(n)},v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.Bn;return k(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{},!1)},k=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.Bn,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{},n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return async i=>{let{dispatch:g,registry:v,select:k}=i;if(await c.Z.blockExecution(h),f)return void b(t,r,k);const y=c.Z.acquire(h);try{const i=await(async()=>{const e=(0,s.getQueryArg)(window.location.href,"origin"),t=(0,s.addQueryArgs)("/wpcom/v2/memberships/status",{source:"https://wordpress.com"===e?"gutenberg-wpcom":"gutenberg",type:"all",is_editable:!0}),r=await a()({path:t,method:"GET"});if(!r&&"object"!=typeof r)throw new Error("Unexpected API response");const n=r?.errors&&Object.values(r.errors)?.[0]?.[0];if(n)throw new Error(n);return r})();((e,t,r)=>{const n=t.select(o.store).getCurrentPostId();r((0,d.setConnectUrl)((0,u.Z)(n,e.connect_url))),r((0,d.setSiteSlug)(e.site_slug)),r((0,d.setProducts)(e.products)),r((0,d.setConnectedAccountDefaultCurrency)(e.connected_account_default_currency)),r((0,d.setApiState)(e.connected_account_id?p.cH:p.P))})(i,v,g),(e=>!e.products.length&&e.connected_account_id)(i)&&await(async(e,t,r,n)=>{await r((0,d.saveProduct)({title:(0,l.l)("default new product title",e),currency:"USD",price:5,interval:"1 month"},e,t,(()=>{}),n))})(e,r,g,n),b(t,r,k),f=!0}catch(e){g((0,d.setConnectUrl)(null)),g((0,d.setApiState)(p.P)),(0,m.q)(e.message,v)}c.Z.release(y)}},y=()=>async e=>{let{dispatch:t,registry:r}=e;await c.Z.blockExecution(g);const n=c.Z.acquire(g);try{const e=await(async()=>{const e=await a()({path:"/wpcom/v2/subscribers/counts"});if(!e||"object"!=typeof e)throw new Error("Unexpected API response");const t=e?.errors&&Object.values(e.errors)?.[0]?.[0];if(t)throw new Error(t);return e})();t((0,d.setSubscriberCounts)({socialFollowers:e.counts.social_followers,emailSubscribers:e.counts.email_subscribers,paidSubscribers:e.counts.paid_subscribers}))}catch(e){t((0,d.setApiState)(p.P)),(0,m.q)(e.message,r)}c.Z.release(n)}},93245:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getApiState:()=>a,getConnectUrl:()=>o,getConnectedAccountDefaultCurrency:()=>s,getNewsletterProducts:()=>u,getProduct:()=>c,getProducts:()=>i,getProductsNoResolver:()=>l,getSiteSlug:()=>d,getSubscriberCounts:()=>g,isApiStateConnected:()=>p,isApiStateLoading:()=>m,isInvalidProduct:()=>h});var n=r(23267);const a=e=>e.apiState,o=e=>e.connectUrl,s=e=>e.connectedAccountDefaultCurrency,i=e=>e.products,l=e=>i(e),c=(e,t)=>i(e).find((e=>e.id===t)),u=e=>e.products.filter((e=>e.subscribe_as_site_subscriber)),d=e=>e.siteSlug,p=e=>e.apiState===n.cH,m=e=>e.apiState===n.lp,h=(e,t)=>!!t&&!c(e,t),g=e=>e.subscriberCounts},46529:(e,t,r)=>{"use strict";r.d(t,{q:()=>a,w:()=>o});var n=r(53961);const a=(e,t)=>t.dispatch(n.store).createErrorNotice(e,{type:"snackbar"}),o=(e,t)=>t.dispatch(n.store).createSuccessNotice(e,{type:"snackbar"})},43317:(e,t,r)=>{"use strict";r.d(t,{M:()=>n,X:()=>a});const n={AED:{symbol:"د.إ.‏",grouping:",",decimal:".",precision:2},AFN:{symbol:"؋",grouping:",",decimal:".",precision:2},ALL:{symbol:"Lek",grouping:".",decimal:",",precision:2},AMD:{symbol:"֏",grouping:",",decimal:".",precision:2},ANG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AOA:{symbol:"Kz",grouping:",",decimal:".",precision:2},ARS:{symbol:"$",grouping:".",decimal:",",precision:2},AUD:{symbol:"A$",grouping:",",decimal:".",precision:2},AWG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AZN:{symbol:"₼",grouping:" ",decimal:",",precision:2},BAM:{symbol:"КМ",grouping:".",decimal:",",precision:2},BBD:{symbol:"Bds$",grouping:",",decimal:".",precision:2},BDT:{symbol:"৳",grouping:",",decimal:".",precision:0},BGN:{symbol:"лв.",grouping:" ",decimal:",",precision:2},BHD:{symbol:"د.ب.‏",grouping:",",decimal:".",precision:3},BIF:{symbol:"FBu",grouping:",",decimal:".",precision:0},BMD:{symbol:"$",grouping:",",decimal:".",precision:2},BND:{symbol:"$",grouping:".",decimal:",",precision:0},BOB:{symbol:"Bs",grouping:".",decimal:",",precision:2},BRL:{symbol:"R$",grouping:".",decimal:",",precision:2},BSD:{symbol:"$",grouping:",",decimal:".",precision:2},BTC:{symbol:"Ƀ",grouping:",",decimal:".",precision:2},BTN:{symbol:"Nu.",grouping:",",decimal:".",precision:1},BWP:{symbol:"P",grouping:",",decimal:".",precision:2},BYR:{symbol:"р.",grouping:" ",decimal:",",precision:2},BZD:{symbol:"BZ$",grouping:",",decimal:".",precision:2},CAD:{symbol:"C$",grouping:",",decimal:".",precision:2},CDF:{symbol:"FC",grouping:",",decimal:".",precision:2},CHF:{symbol:"CHF",grouping:"'",decimal:".",precision:2},CLP:{symbol:"$",grouping:".",decimal:",",precision:2},CNY:{symbol:"¥",grouping:",",decimal:".",precision:2},COP:{symbol:"$",grouping:".",decimal:",",precision:2},CRC:{symbol:"₡",grouping:".",decimal:",",precision:2},CUC:{symbol:"CUC",grouping:",",decimal:".",precision:2},CUP:{symbol:"$MN",grouping:",",decimal:".",precision:2},CVE:{symbol:"$",grouping:",",decimal:".",precision:2},CZK:{symbol:"Kč",grouping:" ",decimal:",",precision:2},DJF:{symbol:"Fdj",grouping:",",decimal:".",precision:0},DKK:{symbol:"kr.",grouping:"",decimal:",",precision:2},DOP:{symbol:"RD$",grouping:",",decimal:".",precision:2},DZD:{symbol:"د.ج.‏",grouping:",",decimal:".",precision:2},EGP:{symbol:"ج.م.‏",grouping:",",decimal:".",precision:2},ERN:{symbol:"Nfk",grouping:",",decimal:".",precision:2},ETB:{symbol:"ETB",grouping:",",decimal:".",precision:2},EUR:{symbol:"€",grouping:".",decimal:",",precision:2},FJD:{symbol:"FJ$",grouping:",",decimal:".",precision:2},FKP:{symbol:"£",grouping:",",decimal:".",precision:2},GBP:{symbol:"£",grouping:",",decimal:".",precision:2},GEL:{symbol:"Lari",grouping:" ",decimal:",",precision:2},GHS:{symbol:"₵",grouping:",",decimal:".",precision:2},GIP:{symbol:"£",grouping:",",decimal:".",precision:2},GMD:{symbol:"D",grouping:",",decimal:".",precision:2},GNF:{symbol:"FG",grouping:",",decimal:".",precision:0},GTQ:{symbol:"Q",grouping:",",decimal:".",precision:2},GYD:{symbol:"G$",grouping:",",decimal:".",precision:2},HKD:{symbol:"HK$",grouping:",",decimal:".",precision:2},HNL:{symbol:"L.",grouping:",",decimal:".",precision:2},HRK:{symbol:"kn",grouping:".",decimal:",",precision:2},HTG:{symbol:"G",grouping:",",decimal:".",precision:2},HUF:{symbol:"Ft",grouping:".",decimal:",",precision:0},IDR:{symbol:"Rp",grouping:".",decimal:",",precision:0},ILS:{symbol:"₪",grouping:",",decimal:".",precision:2},INR:{symbol:"₹",grouping:",",decimal:".",precision:2},IQD:{symbol:"د.ع.‏",grouping:",",decimal:".",precision:2},IRR:{symbol:"﷼",grouping:",",decimal:"/",precision:2},ISK:{symbol:"kr.",grouping:".",decimal:",",precision:0},JMD:{symbol:"J$",grouping:",",decimal:".",precision:2},JOD:{symbol:"د.ا.‏",grouping:",",decimal:".",precision:3},JPY:{symbol:"¥",grouping:",",decimal:".",precision:0},KES:{symbol:"S",grouping:",",decimal:".",precision:2},KGS:{symbol:"сом",grouping:" ",decimal:"-",precision:2},KHR:{symbol:"៛",grouping:",",decimal:".",precision:0},KMF:{symbol:"CF",grouping:",",decimal:".",precision:2},KPW:{symbol:"₩",grouping:",",decimal:".",precision:0},KRW:{symbol:"₩",grouping:",",decimal:".",precision:0},KWD:{symbol:"د.ك.‏",grouping:",",decimal:".",precision:3},KYD:{symbol:"$",grouping:",",decimal:".",precision:2},KZT:{symbol:"₸",grouping:" ",decimal:"-",precision:2},LAK:{symbol:"₭",grouping:",",decimal:".",precision:0},LBP:{symbol:"ل.ل.‏",grouping:",",decimal:".",precision:2},LKR:{symbol:"₨",grouping:",",decimal:".",precision:0},LRD:{symbol:"L$",grouping:",",decimal:".",precision:2},LSL:{symbol:"M",grouping:",",decimal:".",precision:2},LYD:{symbol:"د.ل.‏",grouping:",",decimal:".",precision:3},MAD:{symbol:"د.م.‏",grouping:",",decimal:".",precision:2},MDL:{symbol:"lei",grouping:",",decimal:".",precision:2},MGA:{symbol:"Ar",grouping:",",decimal:".",precision:0},MKD:{symbol:"ден.",grouping:".",decimal:",",precision:2},MMK:{symbol:"K",grouping:",",decimal:".",precision:2},MNT:{symbol:"₮",grouping:" ",decimal:",",precision:2},MOP:{symbol:"MOP$",grouping:",",decimal:".",precision:2},MRO:{symbol:"UM",grouping:",",decimal:".",precision:2},MTL:{symbol:"₤",grouping:",",decimal:".",precision:2},MUR:{symbol:"₨",grouping:",",decimal:".",precision:2},MVR:{symbol:"MVR",grouping:",",decimal:".",precision:1},MWK:{symbol:"MK",grouping:",",decimal:".",precision:2},MXN:{symbol:"MX$",grouping:",",decimal:".",precision:2},MYR:{symbol:"RM",grouping:",",decimal:".",precision:2},MZN:{symbol:"MT",grouping:",",decimal:".",precision:0},NAD:{symbol:"N$",grouping:",",decimal:".",precision:2},NGN:{symbol:"₦",grouping:",",decimal:".",precision:2},NIO:{symbol:"C$",grouping:",",decimal:".",precision:2},NOK:{symbol:"kr",grouping:" ",decimal:",",precision:2},NPR:{symbol:"₨",grouping:",",decimal:".",precision:2},NZD:{symbol:"NZ$",grouping:",",decimal:".",precision:2},OMR:{symbol:"﷼",grouping:",",decimal:".",precision:3},PAB:{symbol:"B/.",grouping:",",decimal:".",precision:2},PEN:{symbol:"S/.",grouping:",",decimal:".",precision:2},PGK:{symbol:"K",grouping:",",decimal:".",precision:2},PHP:{symbol:"₱",grouping:",",decimal:".",precision:2},PKR:{symbol:"₨",grouping:",",decimal:".",precision:2},PLN:{symbol:"zł",grouping:" ",decimal:",",precision:2},PYG:{symbol:"₲",grouping:".",decimal:",",precision:2},QAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},RON:{symbol:"lei",grouping:".",decimal:",",precision:2},RSD:{symbol:"Дин.",grouping:".",decimal:",",precision:2},RUB:{symbol:"₽",grouping:" ",decimal:",",precision:2},RWF:{symbol:"RWF",grouping:" ",decimal:",",precision:2},SAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},SBD:{symbol:"S$",grouping:",",decimal:".",precision:2},SCR:{symbol:"₨",grouping:",",decimal:".",precision:2},SDD:{symbol:"LSd",grouping:",",decimal:".",precision:2},SDG:{symbol:"£‏",grouping:",",decimal:".",precision:2},SEK:{symbol:"kr",grouping:",",decimal:".",precision:2},SGD:{symbol:"S$",grouping:",",decimal:".",precision:2},SHP:{symbol:"£",grouping:",",decimal:".",precision:2},SLL:{symbol:"Le",grouping:",",decimal:".",precision:2},SOS:{symbol:"S",grouping:",",decimal:".",precision:2},SRD:{symbol:"$",grouping:",",decimal:".",precision:2},STD:{symbol:"Db",grouping:",",decimal:".",precision:2},SVC:{symbol:"₡",grouping:",",decimal:".",precision:2},SYP:{symbol:"£",grouping:",",decimal:".",precision:2},SZL:{symbol:"E",grouping:",",decimal:".",precision:2},THB:{symbol:"฿",grouping:",",decimal:".",precision:2},TJS:{symbol:"TJS",grouping:" ",decimal:";",precision:2},TMT:{symbol:"m",grouping:" ",decimal:",",precision:0},TND:{symbol:"د.ت.‏",grouping:",",decimal:".",precision:3},TOP:{symbol:"T$",grouping:",",decimal:".",precision:2},TRY:{symbol:"TL",grouping:".",decimal:",",precision:2},TTD:{symbol:"TT$",grouping:",",decimal:".",precision:2},TVD:{symbol:"$T",grouping:",",decimal:".",precision:2},TWD:{symbol:"NT$",grouping:",",decimal:".",precision:2},TZS:{symbol:"TSh",grouping:",",decimal:".",precision:2},UAH:{symbol:"₴",grouping:" ",decimal:",",precision:2},UGX:{symbol:"USh",grouping:",",decimal:".",precision:2},USD:{symbol:"$",grouping:",",decimal:".",precision:2},UYU:{symbol:"$U",grouping:".",decimal:",",precision:2},UZS:{symbol:"сўм",grouping:" ",decimal:",",precision:2},VEB:{symbol:"Bs.",grouping:",",decimal:".",precision:2},VEF:{symbol:"Bs. F.",grouping:".",decimal:",",precision:2},VND:{symbol:"₫",grouping:".",decimal:",",precision:1},VUV:{symbol:"VT",grouping:",",decimal:".",precision:0},WST:{symbol:"WS$",grouping:",",decimal:".",precision:2},XAF:{symbol:"F",grouping:",",decimal:".",precision:2},XCD:{symbol:"$",grouping:",",decimal:".",precision:2},XOF:{symbol:"F",grouping:" ",decimal:",",precision:2},XPF:{symbol:"F",grouping:",",decimal:".",precision:2},YER:{symbol:"﷼",grouping:",",decimal:".",precision:2},ZAR:{symbol:"R",grouping:" ",decimal:",",precision:2},ZMW:{symbol:"ZK",grouping:",",decimal:".",precision:2},WON:{symbol:"₩",grouping:",",decimal:".",precision:2}};function a(e){return n[e]||{symbol:"$",grouping:",",decimal:".",precision:2}}},25607:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>o});var n=r(43317),a=r(5375);function o(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o=(0,n.X)(t);if(!o||isNaN(e))return null;const{decimal:s,grouping:i,precision:l,symbol:c}={...o,...r},u=e<0?"-":"";let d=(0,a.Z)(Math.abs(e),l,s,i);return r.stripZeros&&(d=function(e,t){const r=new RegExp(`\\${t}0+$`);return e.replace(r,"")}(d,s)),`${u}${c}${d}`}},5375:(e,t,r)=>{"use strict";function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:",";const a=(e+"").replace(/[^0-9+\-Ee.]/g,""),o=isFinite(+a)?+a:0,s=isFinite(+t)?Math.abs(t):0,i=(s?function(e,t){const r=Math.pow(10,t);return""+(Math.round(e*r)/r).toFixed(t)}(o,s):""+Math.round(o)).split(".");return i[0].length>3&&(i[0]=i[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,n)),(i[1]||"").length<s&&(i[1]=i[1]||"",i[1]+=new Array(s-i[1].length+1).join("0")),i.join(r)}r.d(t,{Z:()=>n})},7211:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n,a=r(53184);function o(){this.intervals={},this.monitorInterval=null,this.windowInstance=null,this.onMessage=e=>{e.source===this.windowInstance&&this.emit("message",e.data)}}n=o.prototype,Object.assign(n,a.EventEmitter.prototype),n.emitChange=function(){this.emit("change")},n.off=n.removeListener,o.prototype.open=function(e,t,r){return t=t||Date.now(),this.windowInstance=window.open(e,t,r),this.startMonitoring(t,this.windowInstance),window.addEventListener("message",this.onMessage,!1),this},o.prototype.getScreenCenterSpecs=function(e,t){const r=void 0!==window.screenTop?window.screenTop:window.screenY,n=void 0!==window.screenLeft?window.screenLeft:window.screenX;return["width="+e,"height="+t,"top="+(r+window.innerHeight/2-t/2),"left="+(n+window.innerWidth/2-e/2)].join()},o.prototype.isOpen=function(e){let t=!1;try{t=this.intervals[e]&&this.intervals[e].closed}catch(e){}return!t},o.prototype.checkStatus=function(){for(const e in this.intervals)this.intervals.hasOwnProperty(e)&&!this.isOpen(e)&&(this.emit("close",e),delete this.intervals[e]);0===Object.keys(this.intervals).length&&(clearInterval(this.monitorInterval),delete this.monitorInterval,window.removeEventListener("message",this.onMessage))},o.prototype.startMonitoring=function(e,t){this.monitorInterval||(this.monitorInterval=setInterval(this.checkStatus.bind(this),100)),this.intervals[e]=t};const s=o},39229:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(7211);const a=function(e,t){var r,a=new n.Z;a.open(e,null,"toolbar=0,location=0,status=0,menubar=0,"+a.getScreenCenterSpecs(780,700)),a.once("close",(function(){var e={};r&&r.keyring_id&&(e.keyring_id=Number(r.keyring_id),e.id_token=r.id_token,e.user=r.user),t(e)})),a.on("message",(function(e){return r=e}))}},37580:(e,t,r)=>{"use strict";r.d(t,{FT:()=>n,HX:()=>a,Mf:()=>o});const n="article",a="landscape",o="portrait"},52208:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(30275),a=r(21987),o=r(90626);const s=e=>{let t,{text:r,url:s,forceUrlDisplay:i}=e;return(i||(0,a.ge)(r,"a"))&&(t=(0,n.jsx)("a",{className:"facebook-preview__custom-text-post-url",href:s,rel:"nofollow noopener noreferrer",target:"_blank",children:s})),(0,n.jsxs)("p",{className:"facebook-preview__custom-text",children:[(0,n.jsx)("span",{children:(0,a.u_)(r,{platform:"facebook",maxChars:o.qA})}),t]})}},90626:(e,t,r)=>{"use strict";r.d(t,{jN:()=>s,qA:()=>a,wB:()=>i,wy:()=>o});var n=r(21987);const a=440,o=e=>e.replace(/^[^/]+[/]*/,"").replace(/\/.*$/,""),s=e=>(0,n.SL)((0,n.hs)(110),(0,n.KB)(110))((0,n.ju)(e))||"",i=e=>(0,n.SL)((0,n.hs)(200),(0,n.KB)(200))((0,n.ju)(e))||""},53251:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(65736),a=r(99196),o=r(37580);const __=n.__,s=e=>{let{mode:t}=e;const[r,n]=(0,a.useState)(t),[s,i]=(0,a.useState)(!0),l=(0,a.useCallback)((e=>{let{target:t}=e;r||n(t.naturalWidth>t.naturalHeight?o.HX:o.Mf),i(!1)}),[r]),c=(0,a.useCallback)((()=>i(!1)),[]);return[r,s,{alt:__("Facebook Preview Thumbnail","jetpack"),onLoad:l,onError:c}]}},26767:(e,t,r)=>{"use strict";r.d(t,{F:()=>c});var n=r(30275),a=r(37580),o=r(52208),s=r(53251),i=r(3451),l=r(69133);const c=e=>{let{url:t,customImage:r,user:c,customText:u,imageMode:d}=e;const[p,m,h]=(0,s.Z)({mode:d}),g="is-"+(p===a.Mf?"portrait":"landscape");return(0,n.jsxs)("div",{className:"facebook-preview__post",children:[(0,n.jsx)(l.Z,{user:void 0}),(0,n.jsx)("div",{className:"facebook-preview__content",children:(0,n.jsxs)("div",{className:`facebook-preview__window ${g} ${r&&m?"is-loading":""}`,children:[(0,n.jsx)("div",{className:`facebook-preview__custom-image ${g}`,children:(0,n.jsx)("img",{src:r,...h})}),(0,n.jsx)(l.Z,{user:c,timeElapsed:!0,hideOptions:!0}),u&&(0,n.jsx)(o.Z,{text:u,url:t,forceUrlDisplay:!0})]})}),(0,n.jsx)(i.Z,{})]})}},7558:(e,t,r)=>{"use strict";r.d(t,{g:()=>p});var n=r(30275),a=r(65736),o=r(37580),s=r(52208),i=r(90626),l=r(53251),c=r(3451),u=r(69133),d=r(69094);r(59961);const __=a.__,p=e=>{let{url:t,title:r,description:a,image:p,user:m,customText:h,type:g,imageMode:f,compactDescription:b}=e;const[v,k,y]=(0,l.Z)({mode:f}),E=g===o.FT,w="is-"+(E&&!p||v===o.Mf?"portrait":"landscape");return(0,n.jsxs)("div",{className:"facebook-preview__post",children:[(0,n.jsx)(u.Z,{user:m}),(0,n.jsxs)("div",{className:"facebook-preview__content",children:[h&&(0,n.jsx)(s.Z,{text:h,url:t}),(0,n.jsxs)("div",{className:`facebook-preview__body ${w} ${p&&k?"is-loading":""}`,children:[(p||E)&&(0,n.jsx)("div",{className:`facebook-preview__image ${p?"":"is-empty"} ${w}`,children:p&&(0,n.jsx)("img",{src:p,...y})}),(0,n.jsx)("div",{className:"facebook-preview__text",children:(0,n.jsxs)("div",{className:"facebook-preview__text-wrapper",children:[(0,n.jsx)("div",{className:"facebook-preview__url",children:(0,i.wy)(t)}),(0,n.jsx)("div",{className:"facebook-preview__title",children:(0,i.jN)(r)||(0,i.wy)(t)}),(0,n.jsxs)("div",{className:"facebook-preview__description "+(b?"is-compact":""),children:[a&&(0,i.wB)(a),E&&!a&&
// translators: Default description for a Facebook post
__("Visit the post for more.","jetpack")]}),(0,n.jsx)("div",{className:"facebook-preview__info",children:(0,n.jsx)(d.Z,{name:"info"})})]})})]})]}),(0,n.jsx)(c.Z,{})]})}},34245:(e,t,r)=>{"use strict";r.d(t,{C:()=>c});var n=r(30275),a=r(37580),o=r(52208),s=r(53251),i=r(3451),l=r(69133);r(59961);const c=e=>{let{url:t,user:r,customText:c,media:u,imageMode:d}=e;const[p]=(0,s.Z)({mode:d}),m="is-"+(p===a.Mf?"portrait":"landscape");return(0,n.jsxs)("div",{className:"facebook-preview__post",children:[(0,n.jsx)(l.Z,{user:r}),(0,n.jsxs)("div",{className:"facebook-preview__content",children:[c&&(0,n.jsx)(o.Z,{text:c,url:t,forceUrlDisplay:!0}),(0,n.jsx)("div",{className:"facebook-preview__body",children:u?(0,n.jsx)("div",{className:`facebook-preview__media ${m}`,children:u.map(((e,t)=>(0,n.jsx)("div",{className:`facebook-preview__media-item ${m}`,children:e.type.startsWith("video/")?(0,n.jsx)("video",{controls:!0,children:(0,n.jsx)("source",{src:e.url,type:e.type})}):(0,n.jsx)("img",{alt:e.alt||"",src:e.url})},`facebook-preview__media-item-${t}`)))}):null})]}),(0,n.jsx)(i.Z,{})]})}},3451:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(30275),a=r(65736),o=r(69094);r(1488);const __=a.__,s=()=>(0,n.jsx)("ul",{className:"facebook-preview__post-actions",children:[{icon:"like",
// translators: Facebook "Like" action
label:__("Like","jetpack")},{icon:"comment",
// translators: Facebook "Comment" action
label:__("Comment","jetpack")},{icon:"share",
// translators: Facebook "Share" action
label:__("Share","jetpack")}].map((e=>{let{icon:t,label:r}=e;return(0,n.jsxs)("li",{children:[(0,n.jsx)(o.Z,{name:t}),(0,n.jsx)("span",{children:r})]},t)}))})},69133:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(30275),a=r(65736),o=r(99196),s=r(69094);r(56878);const __=a.__,_x=a._x,i="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IB2cksfwAADwtJREFUeJztXet2mzgX3RLg+H5NmsRt0zad6Zp5/6eYtebPvMDX20zaJm4udmwH20jfDyQQQthpgm1gsTuMWgukg7aOzjmSAPLX3/9wlCgs6L4FKLFdlAQXHCXBBUdJcMFRElxwlAQXHCXBBUdJcMFRElxwlAQXHCXBBUdJcMFRElxwlAQXHCXBBUdJcMFRElxwlAQXHCXBBUdJcMFRElxwlAQXHCXBBUdJcMFRElxwlAQXHCXBBUdJcMFh71uAbYMQsjaf82I/e1c4ggkh4JwrB8DBAQ6I/wEg4j8CQvxr5FE0wgtDMCEEjDF4ngdKKSzLQr1eQ71WxUGlAtu2QamvzYxxrFYruIsFZvMHzGZzeJ4XXEspLQzRhSF4tVrBcRwM+j30um2020049uNub7laYTy+x83tGLd3YyyXS1iWtXWZd4FcE0wI4HkchAAnJy9wfNhHvV6Lnccjw3NwNaR5dmwbg34Xg34Xs9kcP0bXuLwcgXPAsgjyrMy5Jdgnl6Fer+Ht6yHa7RYQOE0hefJcYJOzBQAc9XoN785eYtBt49PXC8xmc1gWzS3JuQyTCCFYrRh6vTb+/PDeJ5f7JPnO0lPKlA6ar+ztdgt/fniPXq+N1Ypt9MazitwRTACsPA+DXge/n7+F49hBRhocEBIqu+PY+P38LQa9Dlaet2EMyCZyR7DHOBq1Gt6fn/ne7hbr4gAopXh/foZGrQaP5W+czh3BlBK8ORvCsixwzreqVUTYdMuy8OZsGIRZeUKuCPY8htOTI3TaLZ/cHdhFOfnRabdwenIEz2NbrzNN5IZgzjmq1QMMT46BR0xBpglZ1/DkGNXqQa4mQXJBMCEEHmM4GvT2FrL4MTHF0aAHj+XHq84FwZxzVBwH/X5X/rIPKQAA/X4XFcfJjRZnnmBCCDzPQ6fdRK1W3ZntNcnBOUetVkWn3YTnebnQ4swTLAltNRuZiEMJ4MuSk5WnzBMMEYs2mnVgx86VDll3o1kHpblouuwTzDlgWzYatfgiwr7QqNVgW3Yu5qczTbA/0cDQaFQzpTGUUjQaVXDOMmE21iE7rWaCmPyvVg/2LUkMfjyMdCbAt4hsEwx/u41jO/7fMzAkShkc2/G3AmUcmScYHLDlilEmGtSXwXbsbIizAdknGBxWBodBX6bsM5wDggGSwVWcLMpkQg4IJmBZML4amNgalHXkgGCAsewt0WVRJhMyTzAhwHK5En/fv8ZIGZbLVdYjJCAPBAMErrvYtxAx+DJln+FME8w5B6UE8/k8Yx4rx3w+B6XZX3DINME+COYPLhZimM4CFssV5g9uqcFpgBDfoRlP7oE9Pw0o6x5P7sEYK21wGvAX/Blub8f7FiXA7e0YnpePbTuZJ5hzDmpZGE+mcF13bwvtcuOB67oYT6agYttu1pF5ggGAEoIH18XV6Fr8sg/N8eu8Gl3jwXVBc6C9yAvBnHPYlOJydI3Vaj/xJyH+I6qXo2vYOXp+OBcEAwChFK67xPcfI2DHzpas6/uPEVx3CZKhzQebkBtJ/UdICL79uMLkfrozWyxt7+R+im8/rsTzwvnQXuSJYB/+FtpPn//d2bZVuW1X1pmH2FdFzggGLMvC/XSOz18vdlbn568XuJ/Oc/lah9wRzDmHbVNcXv3Epy//bXUbD+fApy//4fLqJ2w7P46VitwRjOA5IQvfvl/i4+evQcOnQYBa1sfPX/Ht+6V4VPXZRe8FuX1Hh6/JNr5fjuCtPJydDXFQqQR5v2qf5TWEELiLBT5/ucDo+gaObedScyVySzAEKY5tY3Rzi+lsjuHwGC8O+wG5kpgkstV8ec7l6BoXFz8wd93ck4u8EwypyZYFd7HA/z5+wWh0jRcvBmi3mqg4ztprJamL5RLjyT0uL39iPLkHIQR2TqYiNyH3BEMbXseTKe7GE9TrNTTqdbSaddRqNRxUnMAL9jwP7mKJ+XyOyf0M09kMs9kchNDgCYoikIuiEKyCUgJCbMznLmazOX5e30TeRQlBnjz8ZT8KuwDDsQmFIxjKThBC7IhXzJi0uRApCYgtIrkoKsESOmkmX6uoxErkMg4u8XjkQoP1sEfC/JLR1GuPaX6SPFlEZglWX+wtJ/l9uxo6S7t6MZlqx315GAAOSmnmXySeKYJ1UgkhqFUPUK0eoFaronrg/91x7OCl39veWcGELIwxLJcrPDy4eHBdzOcPeHhwMX9whVOXTbIzRbD/wk+Cg4qDfq+DTqeNWu0gmILcBygAW8TPtSrQbjWDPHexwHzu4u5ujOubO7iLJThnsKzsuDbkr7//2Xt3k8/5tFtNHB0N0O92Yo20adpxV0iSw/MYrm/vcDX6ifHY3+KbhddO7E2D5TcWGGNot1oYnh6h22lHGk5dNNg3sRK6HFJG+Ra8w34Xt3djXHy7wngy2fs3IPZCsL+BzUOl4mB4eoyTFwPFM41ORGQd0Q7p/7vX7aDbaeP75U9cfPuBxWIp1pN3L99eCPY8D91uG+/OXgUvWAnnk/chUTqQsst7OT0+RK/Twscv/+LubgxKd78jZKdGgnPf3g5Pj/HHh/PIm1vzoK2PhRonV6sH+OPDOYanx2CM7VyLd6bBIpLE2zcvcfLiKPitSMTqIIRAfCIEZ6+GqFQcfP5yAQ6ys617W9fgwEkC8Nv5WUAucrc/8WlQ7/HkxRF+Oz8LfttF5946wXLi4t2bVxj0e9uuLvMY9Ht49+bVzlawtkqwHwpxvH51iqPDfqYe4d4XOICjwz5evzoFY9t/NfLWCPa/bbTCYb+L05OjrX9AIy+QH/o4PT7C4aArnrXaXstsjWDP89Co1/Dm7KXRpXjMVtdN5zxnu6x+bfSLpfG8x5SnX5+UD6EAb85eolGvbfVDH1vV4LPXQziOHeykWNeApgNy4j72ydjHlAEt1a8lsVQ9HiujKqt6PIZwx7Zx9nq41dg/dYLlE/mHgx66nbb/Makn3sBmDSJaGrk6knLtAHiwniy/Maz+eYqs6wjVO5C8pttp43DQ29obA1KPgxljcBwbL0+Phd3lACebm0y/Nx5JDI1OACI+/Ey44VW0RBg8M/8hueIkrs0xP0ZerqQx8Xn0JKKdxP0zKIDh6TFubsdbeaAuVQ2WCwiHgx6q1YNgaDYhpjE8fsjfw8ZSD6kp3DjExvJjKhzV8CQZTbKa5I2PANEeYDIR0uGqVQ9wOOiJHZ7pEpyqBnPO4TgODgc9/0bCjM3Xbvg90dEKUkM+EVWThOsjHCSVv77eJMHD+jaXyznH4aCH0c+b1F+RmJoGy+do260m6vV64BnK+/xVGyeVLGnbld58uoJy1bYmDKGb8rGG4JgMcSO/dozgSpt4jKFer6O9hc/1pKbBcttKt9sGkYOU6gnr5wf2M8FOcq2BTPnEV1GZRiC1UqR8Q5utkzGQNVa+MN2G7Fi+Tlogmzydo9dp4+bmLtUZrlQJdhwH7VYLHuPS8gg/KM5gxD+CuZuvG0HlBzsICDhnTyxfSmYaVUi8jMgNR9NY/+N6H9OHXqV88dncdrsFx3GwXC5T0+JUhmjpLDQbdf/bgozFYlEdXIYWSdqj5AWp+siJMK4y/dU4OZ4X9Zugcbjxen2UFjKqsupxduRgDBalaDbqIvpIB+nYYDEMN5uN4KPNMT/SQAARN0oMN6znxav0h2ViGp4VmZJMBDQCYz64QR71zyb5AxkVWWM9KNy64stACRrNejhxkgJSGaKl/a0eVERvDAUMmtYUi65xZJgYdjmYcfO51DoinCQ9X4YcSaEHZ6JWnuBG6fUlyEgICWSNXE7iI4Ser8ooREGtWk11D1dqBDuOIx7kUntmqB6/LjARjSTTWK2G6UblaqG5SfuUY/Pjhg70GBmDmNbgQ63zIlXZ1P3gtkVTtcPPJpiIzeG2bcG2bbEthYseCiWN3+B6yN6PSBrUSxDUI1MV6vw3YNBwKSMPZYyWv76DqDKaPDg5qqgy6vL7y4WhrIwx2LYN27awWCxAySNmADfg+RosWs6yLLGXWUR4IrZJ1jC1EeIERJwdk5PG9TIMXnBC2Yh0EHWxQS2fawSZrg/TJBlVWfXyowsdUNrRilbyDKQ0REsNlfYI4TRSopByCk9N9XLVYSx+PRMOjkx1yAV105Spv1+KiBg2WcaQgGi+lDckMd6B1eFZ/3JMKG+48MA5QAn1NTelUDilOJiDii2vXAzLsbn4RBsnPUquFxnabmKKQ3k0P8HTThpmudj6Fqb6xevLxoaJGunARYJh4/1HZaWWfLguQ04WgMg6KBGaHPFidf50J4OZblid5DAQyAVBPNnJknXpXjDhJOIFxxwaEcMHoZDuQ7BQbmLUuGgwTfTVqgQniwNmm/JEpLtcqN7TpjhUzzc5YZG8uJFOWOkLZVhj5AMZVVk2yfgL8usmKlFGRdaEfvwspL6aFOvKUoviJwcTCkQ5L3pZOM9oXC5WvJj4VGG0/JiGb7qXDeVDi8P1OwxGbs6jZan5hjZIK/6VSI9gnUiT26n+k0ftYFwDogYuScOwTsOUkmIdSHeDDWUTMTqE8+n6/XDwBCPM9fbYMELxdW33DKSowUJYlTjVzmgNJH3toOEMXqZq54wqJ3835Sd6rTJ7/XRoMIfGQ1n18iPX6566Lo8pX4sDwxmvDNpgBjG5rpC71gveANVBehI0D9c01ajLqF+upokyPmmWziwjRIdnKRriFAgWsaa3gse8qDZEWineK6P3pocx0UAr5oVi04IE0eo3jBDSA09c0E36lyIBV4dp5XxOYqFY5GoZXwepX8tqtQLzVqmFSs8mWE5yLJcrLBcrVCpOfJnGECfGvOCYm8k32FhdAw1TYUl1K6YhNBHaCUH8muAFywkaWYnRxq7RcoMPQAjBYrkSH75MZ7IjlSGaUorFYgnXdVGpVILYNxKhxCYaoPRe050oK/WJJnbdlopHjrMCcR8v3JVictJiFSSY2MQ4PrhU8dQpheu6WCyWqa0opbIeLIP0u7uJMq0olg1Fynj02IzIjrnYgvojBQtT/fAzgpSz6CFlXC+rMt2olf8LfSsUlzHc3Y0ja8rPRWpOFqUUk/t7TKdTNBqNcHdggpymmZyEEwHjCK9sC1KH2oTrk39PbkjV0fvV1TCi36NetlYvpRTT6RST+2mqL2/5Pz0W8ayv9wEYAAAAAElFTkSuQmCC",l=e=>{let{user:t,timeElapsed:r,hideOptions:a}=e;const[l,c]=(0,o.useState)(t?.avatarUrl||i),u=(0,o.useCallback)((()=>{l!==i&&c(i)}),[l]);return(0,n.jsxs)("div",{className:"facebook-preview__post-header",children:[(0,n.jsxs)("div",{className:"facebook-preview__post-header-content",children:[(0,n.jsx)("img",{className:"facebook-preview__post-header-avatar",src:l,alt:"",onError:u}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"facebook-preview__post-header-name",children:t?.displayName||
// translators: name of a fictional Facebook User
__("Anonymous User","jetpack")}),(0,n.jsxs)("div",{className:"facebook-preview__post-header-share",children:[(0,n.jsx)("span",{className:"facebook-preview__post-header-time",children:r?__(
// translators: short version of `1 hour`
"1h","jetpack"):_x(
// translators: temporal indication of when a post was published
"Just now","","jetpack")}),(0,n.jsx)("span",{className:"facebook-preview__post-header-dot","aria-hidden":"true",children:"·"}),(0,n.jsx)(s.Z,{name:"public"})]})]})]}),!a&&(0,n.jsx)("div",{className:"facebook-preview__post-header-more"})]})}},69094:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(30275);r(40888);const a=e=>{let{name:t}=e;return(0,n.jsx)("i",{className:`facebook-preview__post-icon facebook-preview__post-icon-${t}`})}},13477:(e,t,r)=>{"use strict";r.d(t,{S:()=>u});var n=r(30275),a=r(55609),o=r(65736),s=r(10263),i=r(7558),l=r(26767),c=r(34245);const __=o.__,u=e=>{let{headingLevel:t,hideLinkPreview:r,hidePostPreview:o,...u}=e;const d=!!u.media?.length,p=!!u.customImage;return(0,n.jsxs)("div",{className:"social-preview facebook-preview",children:[!o&&(0,n.jsxs)("section",{className:"social-preview__section facebook-preview__section",children:[(0,n.jsx)(s.Z,{level:t,children:
// translators: refers to a social post on Facebook
__("Your post","jetpack")}),(0,n.jsx)("p",{className:"social-preview__section-desc",children:__("This is what your social post will look like on Facebook:","jetpack")}),d?(0,n.jsx)(c.C,{...u}):(0,n.jsx)(i.g,{...u})]}),!r&&(0,n.jsxs)("section",{className:"social-preview__section facebook-preview__section",children:[(0,n.jsx)(s.Z,{level:t,children:
// translators: refers to a link to a Facebook post
__("Link preview","jetpack")}),(0,n.jsxs)("p",{className:"social-preview__section-desc",children:[__("This is what it will look like when someone shares the link to your WordPress post on Facebook.","jetpack")," ",(0,n.jsx)(a.ExternalLink,{href:"https://jetpack.com/support/jetpack-social-image-generator",children:__("Learn more about links","jetpack")})]}),p?(0,n.jsx)(l.F,{...u}):(0,n.jsx)(i.g,{...u,compactDescription:!0,customText:"",user:void 0})]})]})}},17915:(e,t,r)=>{"use strict";r.d(t,{X:()=>c});var n=r(30275),a=r(21987);r(73443);const o=160,s=e=>{const t=e.startsWith("https://")?"https://":"http://",r=t+e.replace(t,"").split("/").join(" › ");return(0,a.SL)((0,a.hs)(68),(0,a.KB)(68))(r)},i=(0,a.SL)((0,a.hs)(63),(0,a.I$)(23,73),(0,a.KB)(63)),l=(0,a.SL)((0,a.hs)(o),(0,a.I$)(80,170),(0,a.KB)(o)),c=e=>{let{description:t="",siteTitle:r,title:o="",url:c=""}=e;const u=(0,a.wy)(c);return(0,n.jsx)("div",{className:"search-preview",children:(0,n.jsxs)("div",{className:"search-preview__display",children:[(0,n.jsxs)("div",{className:"search-preview__header",children:[(0,n.jsxs)("div",{className:"search-preview__branding",children:[(0,n.jsx)("img",{className:"search-preview__icon",src:`https://www.google.com/s2/favicons?sz=128&domain_url=${u}`,alt:""}),(0,n.jsxs)("div",{className:"search-preview__site",children:[(0,n.jsx)("div",{className:"search-preview__site--title",children:r||u}),(0,n.jsx)("div",{className:"search-preview__url",children:s(c)})]})]}),(0,n.jsx)("div",{className:"search-preview__menu",children:(0,n.jsx)("svg",{focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})})})]}),(0,n.jsx)("div",{className:"search-preview__title",children:i(o)}),(0,n.jsx)("div",{className:"search-preview__description",children:l((0,a.ju)(t))})]})})}},21987:(e,t,r)=>{"use strict";r.d(t,{I$:()=>l,KB:()=>c,SL:()=>u,YW:()=>m,ge:()=>p,hs:()=>i,ju:()=>d,u_:()=>g,wy:()=>s});var n=r(30275),a=r(69307),o=r(65736);const s=e=>e.replace(/^[^/]+[/]*/,"").replace(/\/.*$/,""),i=e=>t=>t.length<=e&&t,l=(e,t)=>r=>{const n=r.slice(0,t),a=n.lastIndexOf(" ");return a>e&&a<t&&n.slice(0,a).concat("…")},c=e=>t=>t.slice(0,e).concat("…"),u=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return e=>t.find((t=>!1!==t(e)))?.(e)},d=function(e){const t=new RegExp(`(<([^${(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).join("")}>]+)>)`,"gi");return e?e.replace(t,""):""},p=(e,t)=>new RegExp(`<${t}[^>]*>`,"gi").test(e),m=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}).format,h={twitter:"https://twitter.com/hashtag/%1$s",facebook:"https://www.facebook.com/hashtag/%1$s",linkedin:"https://www.linkedin.com/feed/hashtag/?keywords=%1$s",instagram:"https://www.instagram.com/explore/tags/%1$s",mastodon:"https://%2$s/tags/%1$s"};function g(e,t){const{platform:r,maxChars:s,maxLines:i,hyperlinkHashtags:l=!0,hyperlinkUrls:c="instagram"!==r}=t;let u=d(e);if(u=u.replaceAll(/(?:\s*[\n\r]){2,}/g,"\n\n"),s&&u.length>s&&(u=u.substring(0,s)),i){const e=u.split("\n");e.length>i&&(u=e.slice(0,i).join("\n"))}const p={};if(c){(u.match(/(https?:\/\/\S+)/g)||[]).forEach(((e,t)=>{p[`Link${t}`]=(0,n.jsx)("a",{href:e,rel:"noopener noreferrer",target:"_blank",children:e}),u=u.replace(e,`<Link${t} />`)}))}if(l&&h[r]){const e=u.matchAll(/(^|\s)#(\w+)/g),a=h[r];[...e].forEach(((e,r)=>{let[s,i,l]=e;const c=(0,o.sprintf)(a,l,t.hashtagDomain);p[`Hashtag${r}`]=(0,n.jsx)("a",{href:c,rel:"noopener noreferrer",target:"_blank",children:`#${l}`}),u=u.replace(s,`${i}<Hashtag${r} />`)}))}return u=u.replace(/\n/g,"<br />"),p.br=(0,n.jsx)("br",{}),(0,a.createInterpolateElement)(u,p)}},81683:(e,t,r)=>{"use strict";r.d(t,{A:()=>n,P:()=>a});const n=120,a=2},68280:(e,t,r)=>{"use strict";r.d(t,{r:()=>a});var n=r(30275);const a=()=>(0,n.jsx)("svg",{color:"rgb(38, 38, 38)",fill:"rgb(38, 38, 38)",height:"24",role:"img",viewBox:"0 0 24 24",width:"24",children:(0,n.jsx)("polygon",{fill:"none",points:"20 21 12 13.44 4 21 4 3 20 3 20 21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})},68536:(e,t,r)=>{"use strict";r.d(t,{s:()=>a});var n=r(30275);const a=()=>(0,n.jsx)("svg",{color:"rgb(38, 38, 38)",fill:"rgb(38, 38, 38)",height:"24",role:"img",viewBox:"0 0 24 24",width:"24",children:(0,n.jsx)("path",{d:"M20.656 17.008a9.993 9.993 0 1 0-3.59 3.615L22 22Z",fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"2"})})},32854:(e,t,r)=>{"use strict";r.d(t,{q:()=>a});var n=r(30275);const a=()=>(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 340 340",width:"340",height:"340",children:(0,n.jsx)("path",{fill:"#DDD",d:"m169,.5a169,169 0 1,0 2,0zm0,86a76,76 0 1 1-2,0zM57,287q27-35 67-35h92q40,0 67,35a164,164 0 0,1-226,0"})})},15082:(e,t,r)=>{"use strict";r.d(t,{X:()=>a});var n=r(30275);const a=()=>(0,n.jsx)("svg",{color:"rgb(38, 38, 38)",fill:"rgb(38, 38, 38)",height:"24",role:"img",viewBox:"0 0 24 24",width:"24",children:(0,n.jsx)("path",{d:"M16.792 3.904A4.989 4.989 0 0 1 21.5 9.122c0 3.072-2.652 4.959-5.197 7.222-2.512 2.243-3.865 3.469-4.303 3.752-.477-.309-2.143-1.823-4.303-3.752C5.141 14.072 2.5 12.167 2.5 9.122a4.989 4.989 0 0 1 4.708-5.218 4.21 4.21 0 0 1 3.675 1.941c.84 1.175.98 1.763 1.12 1.763s.278-.588 1.11-1.766a4.17 4.17 0 0 1 3.679-1.938m0-2a6.04 6.04 0 0 0-4.797 2.127 6.052 6.052 0 0 0-4.787-2.127A6.985 6.985 0 0 0 .5 9.122c0 3.61 2.55 5.827 5.015 7.97.283.246.569.494.853.747l1.027.918a44.998 44.998 0 0 0 3.518 3.018 2 2 0 0 0 2.174 0 45.263 45.263 0 0 0 3.626-3.115l.922-.824c.293-.26.59-.519.885-.774 2.334-2.025 4.98-4.32 4.98-7.94a6.985 6.985 0 0 0-6.708-7.218Z"})})},59215:(e,t,r)=>{"use strict";r.d(t,{v:()=>a});var n=r(30275);const a=()=>(0,n.jsxs)("svg",{width:"17",height:"5",viewBox:"0 0 17 5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M2.11865 3.5C2.67094 3.5 3.11865 3.05228 3.11865 2.5C3.11865 1.94772 2.67094 1.5 2.11865 1.5C1.56637 1.5 1.11865 1.94772 1.11865 2.5C1.11865 3.05228 1.56637 3.5 2.11865 3.5Z",fill:"black",stroke:"black",strokeWidth:"2"}),(0,n.jsx)("path",{d:"M8.55933 3.5C9.11161 3.5 9.55933 3.05228 9.55933 2.5C9.55933 1.94772 9.11161 1.5 8.55933 1.5C8.00704 1.5 7.55933 1.94772 7.55933 2.5C7.55933 3.05228 8.00704 3.5 8.55933 3.5Z",fill:"black",stroke:"black",strokeWidth:"2"}),(0,n.jsx)("path",{d:"M15 3.5C15.5523 3.5 16 3.05228 16 2.5C16 1.94772 15.5523 1.5 15 1.5C14.4477 1.5 14 1.94772 14 2.5C14 3.05228 14.4477 3.5 15 3.5Z",fill:"black",stroke:"black",strokeWidth:"2"})]})},46353:(e,t,r)=>{"use strict";r.d(t,{m:()=>a});var n=r(30275);const a=()=>(0,n.jsxs)("svg",{color:"rgb(38, 38, 38)",fill:"rgb(38, 38, 38)",height:"24",role:"img",viewBox:"0 0 24 24",width:"24",children:[(0,n.jsx)("line",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"2",x1:"22",x2:"9.218",y1:"3",y2:"10.083"}),(0,n.jsx)("polygon",{fill:"none",points:"11.698 20.334 22 3.001 2 3.001 9.218 10.084 11.698 20.334",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"2"})]})},18131:(e,t,r)=>{"use strict";r.d(t,{R:()=>m});var n=r(30275),a=r(65736),o=r(21987),s=r(81683),i=r(68280),l=r(68536),c=r(32854),u=r(15082),d=r(59215),p=r(46353);r(78296);const __=a.__;function m(e){let{image:t,name:r,profileImage:a,caption:m}=e;const h=r||"username";return(0,n.jsx)("div",{className:"instagram-preview__wrapper",children:(0,n.jsxs)("section",{className:"instagram-preview__container",children:[(0,n.jsxs)("div",{className:"instagram-preview__header",children:[(0,n.jsx)("div",{className:"instagram-preview__header--avatar",children:a?(0,n.jsx)("img",{src:a,alt:""}):(0,n.jsx)(c.q,{})}),(0,n.jsxs)("div",{className:"instagram-preview__header--profile",children:[(0,n.jsx)("div",{className:"instagram-preview__header--profile-name",children:h}),(0,n.jsx)("div",{className:"instagram-preview__header--profile-menu",children:(0,n.jsx)(d.v,{})})]})]}),(0,n.jsx)("div",{className:"instagram-preview__media",children:(0,n.jsx)("img",{className:"instagram-preview__media--image",src:t,alt:""})}),(0,n.jsxs)("div",{className:"instagram-preview__content",children:[(0,n.jsxs)("section",{className:"instagram-preview__content--actions",children:[(0,n.jsxs)("div",{className:"instagram-preview__content--actions-primary",children:[(0,n.jsx)(u.X,{}),(0,n.jsx)(l.s,{}),(0,n.jsx)(p.m,{})]}),(0,n.jsx)("div",{className:"instagram-preview__content--actions-secondary",children:(0,n.jsx)(i.r,{})})]}),(0,n.jsxs)("div",{className:"instagram-preview__content--body",children:[(0,n.jsx)("div",{className:"instagram-preview__content--name",children:h})," ",m?(0,n.jsx)("div",{className:"instagram-preview__content--text",children:(0,o.u_)(m,{platform:"instagram",maxChars:s.A,maxLines:s.P})}):null]}),(0,n.jsx)("div",{className:"instagram-preview__content--footer",children:(0,n.jsx)("span",{children:__("View one comment","jetpack")})})]})]})})}},4049:(e,t,r)=>{"use strict";r.d(t,{V:()=>i});var n=r(30275),a=r(65736),o=r(10263),s=r(18131);const __=a.__,i=e=>{let{headingLevel:t,hideLinkPreview:r,hidePostPreview:a,...i}=e;return(0,n.jsx)("div",{className:"social-preview instagram-preview",children:!a&&(0,n.jsxs)("section",{className:"social-preview__section instagram-preview__section",children:[(0,n.jsx)(o.Z,{level:t,children:
// translators: refers to a social post on Instagram
__("Your post","jetpack")}),(0,n.jsx)("p",{className:"social-preview__section-desc",children:__("This is what your social post will look like on Instagram:","jetpack")}),(0,n.jsx)(s.R,{...i})]})})}},24687:(e,t,r)=>{"use strict";r.d(t,{A:()=>n,P:()=>a});const n=212,a=3},52493:(e,t,r)=>{"use strict";r.d(t,{q:()=>a});var n=r(30275);const a=()=>(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 128 128",width:"128",height:"128",children:[(0,n.jsx)("path",{fill:"#e7e2dc",d:"M0 0h128v128H0z"}),(0,n.jsx)("path",{d:"M88.41 84.67a32 32 0 10-48.82 0 66.13 66.13 0 0148.82 0z",fill:"#788fa5"}),(0,n.jsx)("path",{d:"M88.41 84.67a32 32 0 01-48.82 0A66.79 66.79 0 000 128h128a66.79 66.79 0 00-39.59-43.33z",fill:"#9db3c8"}),(0,n.jsx)("path",{d:"M64 96a31.93 31.93 0 0024.41-11.33 66.13 66.13 0 00-48.82 0A31.93 31.93 0 0064 96z",fill:"#56687a"})]})},23736:(e,t,r)=>{"use strict";r.d(t,{u:()=>o});var n=r(30275),a=r(98170);function o(e){return(0,n.jsx)(a.w,{name:"",profileImage:"",...e,description:"",media:void 0})}},98170:(e,t,r)=>{"use strict";r.d(t,{w:()=>l});var n=r(30275),a=r(65736),o=r(21987),s=r(24687),i=r(52493);r(44046);const __=a.__;function l(e){let{articleReadTime:t=5,image:r,jobTitle:l,name:c,profileImage:u,description:d,media:p,title:m,url:h}=e;const g=!!p?.length;return(0,n.jsx)("div",{className:"linkedin-preview__wrapper",children:(0,n.jsxs)("section",{className:"linkedin-preview__container "+(g?"has-media":""),children:[(0,n.jsxs)("div",{className:"linkedin-preview__header",children:[(0,n.jsx)("div",{className:"linkedin-preview__header--avatar",children:u?(0,n.jsx)("img",{src:u,alt:""}):(0,n.jsx)(i.q,{})}),(0,n.jsxs)("div",{className:"linkedin-preview__header--profile",children:[(0,n.jsxs)("div",{className:"linkedin-preview__header--profile-info",children:[(0,n.jsx)("div",{className:"linkedin-preview__header--profile-name",children:c||__("Account Name","jetpack")}),(0,n.jsx)("span",{children:"•"}),(0,n.jsx)("div",{className:"linkedin-preview__header--profile-actor",children:
// translators: refers to the actor level of the post being shared, e.g. "1st", "2nd", "3rd", etc.
__("1st","jetpack")})]}),l?(0,n.jsx)("div",{className:"linkedin-preview__header--profile-title",children:l}):null,(0,n.jsxs)("div",{className:"linkedin-preview__header--profile-meta",children:[(0,n.jsx)("span",{children:
// translators: refers to the time since the post was published, e.g. "1h"
__("1h","jetpack")}),(0,n.jsx)("span",{children:"•"}),(0,n.jsx)("svg",{viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",focusable:"false",children:(0,n.jsx)("path",{d:"M8 1a7 7 0 107 7 7 7 0 00-7-7zM3 8a5 5 0 011-3l.55.55A1.5 1.5 0 015 6.62v1.07a.75.75 0 00.22.53l.56.56a.75.75 0 00.53.22H7v.69a.75.75 0 00.22.53l.56.56a.75.75 0 01.22.53V13a5 5 0 01-5-5zm6.24 4.83l2-2.46a.75.75 0 00.09-.8l-.58-1.16A.76.76 0 0010 8H7v-.19a.51.51 0 01.28-.45l.38-.19a.74.74 0 01.68 0L9 7.5l.38-.7a1 1 0 00.12-.48v-.85a.78.78 0 01.21-.53l1.07-1.09a5 5 0 01-1.54 9z"})})]})]})]}),(0,n.jsxs)("div",{className:"linkedin-preview__content",children:[d?(0,n.jsx)("div",{className:"linkedin-preview__caption",children:(0,o.u_)(d,{platform:"linkedin",maxChars:s.A,maxLines:s.P})}):null,g?(0,n.jsx)("div",{className:"linkedin-preview__media",children:p.map(((e,t)=>(0,n.jsx)("div",{className:"linkedin-preview__media-item",children:e.type.startsWith("video/")?(0,n.jsx)("video",{controls:!0,children:(0,n.jsx)("source",{src:e.url,type:e.type})}):(0,n.jsx)("img",{alt:e.alt||"",src:e.url})},`linkedin-preview__media-item-${t}`)))}):(0,n.jsxs)("article",{children:[r?(0,n.jsx)("img",{className:"linkedin-preview__image",src:r,alt:""}):null,h?(0,n.jsxs)("div",{className:"linkedin-preview__description",children:[(0,n.jsx)("h2",{className:"linkedin-preview__description--title",children:m}),(0,n.jsxs)("div",{className:"linkedin-preview__description--meta",children:[(0,n.jsx)("span",{className:"linkedin-preview__description--url",children:(0,o.wy)(h)}),(0,n.jsx)("span",{children:"•"}),(0,n.jsx)("span",{children:(0,a.sprintf)(
// translators: %d is the number of minutes it takes to read the article
__("%d min read","jetpack"),t)})]})]}):null]})]})]})})}},93453:(e,t,r)=>{"use strict";r.d(t,{S:()=>c});var n=r(30275),a=r(55609),o=r(65736),s=r(10263),i=r(23736),l=r(98170);const __=o.__,c=e=>{let{headingLevel:t,hideLinkPreview:r,hidePostPreview:o,...c}=e;return(0,n.jsxs)("div",{className:"social-preview linkedin-preview",children:[!o&&(0,n.jsxs)("section",{className:"social-preview__section linkedin-preview__section",children:[(0,n.jsx)(s.Z,{level:t,children:
// translators: refers to a social post on LinkedIn
__("Your post","jetpack")}),(0,n.jsx)("p",{className:"social-preview__section-desc",children:__("This is what your social post will look like on LinkedIn:","jetpack")}),(0,n.jsx)(l.w,{...c})]}),!r&&(0,n.jsxs)("section",{className:"social-preview__section linkedin-preview__section",children:[(0,n.jsx)(s.Z,{level:t,children:
// translators: refers to a link to a LinkedIn post
__("Link preview","jetpack")}),(0,n.jsxs)("p",{className:"social-preview__section-desc",children:[__("This is what it will look like when someone shares the link to your WordPress post on LinkedIn.","jetpack")," ",(0,n.jsx)(a.ExternalLink,{href:"https://jetpack.com/support/jetpack-social-image-generator",children:__("Learn more about links","jetpack")})]}),(0,n.jsx)(i.u,{...c,name:"",profileImage:""})]})]})}},64011:(e,t,r)=>{"use strict";r.d(t,{q:()=>n});const n="mastodon.social"},82335:(e,t,r)=>{"use strict";r.d(t,{Eu:()=>i,WV:()=>l,eP:()=>c,tZ:()=>s});var n=r(21987),a=r(64011);const o=/^@([^@]*)@([^@]*)$/i,s=e=>(0,n.SL)((0,n.hs)(200),(0,n.KB)(200))((0,n.ju)(e))||"",i=(e,t)=>{const{instance:r,offset:a}=t;return(0,n.u_)(e,{platform:"mastodon",maxChars:470-a,hashtagDomain:r})},l=e=>(0,n.SL)((0,n.hs)(30),(0,n.KB)(30))((0,n.ju)(e))||"",c=e=>{const t=e.match(o);return{username:t?.[1]||"",instance:t?.[2]||a.q}}},16534:(e,t,r)=>{"use strict";r.d(t,{W:()=>l});var n=r(30275),a=r(93397),o=r(3440),s=r(37951),i=r(52664);r(46154);const l=e=>{const{user:t}=e;return(0,n.jsxs)("div",{className:"mastodon-preview__post",children:[(0,n.jsx)(i.Z,{user:t}),(0,n.jsx)(o.Z,{...e}),(0,n.jsx)(s.Z,{...e}),(0,n.jsx)(a.Z,{})]})}},67686:(e,t,r)=>{"use strict";r.d(t,{h:()=>l});var n=r(30275),a=r(65736),o=r(93397),s=r(3440),i=r(52664);r(46154);const __=a.__,l=e=>{const{user:t,customImage:r}=e;return(0,n.jsxs)("div",{className:"mastodon-preview__post",children:[(0,n.jsx)(i.Z,{user:t}),(0,n.jsx)(s.Z,{...e,children:r&&(0,n.jsx)("img",{className:"mastodon-preview__img",src:r,alt:__("Mastodon preview thumbnail","jetpack")})}),(0,n.jsx)(o.Z,{})]})}},93397:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(30275),a=r(65736),o=r(34525);r(7679);const __=a.__,s=()=>(0,n.jsx)("div",{className:"mastodon-preview__post-actions",children:(0,n.jsx)("ul",{children:[{icon:"reply",
// translators: "Reply" action on a Mastodon post
label:__("Reply","jetpack"),text:0},{icon:"boost",
// translators: "Boost" action on a Mastodon post
label:__("Boost","jetpack")},{icon:"like",
// translators: "Favourite" action on a Mastodon post
label:__("Favourite","jetpack")},{icon:"bookmark",
// translators: "Bookmark" action on a Mastodon post
label:__("Bookmark","jetpack")},{icon:"more",
// translators: "More" menu on a Mastodon post
label:__("More","jetpack")}].map((e=>{let{icon:t,label:r,text:a}=e;return(0,n.jsxs)("li",{"aria-label":r,children:[(0,n.jsx)("span",{className:"mastodon-preview__post-icon-wrapper",children:(0,n.jsx)(o.Z,{name:t})}),("number"==typeof a||a)&&(0,n.jsx)("span",{className:"mastodon-preview__post-icon-text",children:a})]},t)}))})})},3440:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(30275),a=r(21987),o=r(82335);r(15184);const s=e=>{const{title:t,description:r,customText:s,url:i,user:l,children:c}=e,u={instance:l?.address?(0,o.eP)(l.address).instance:"",offset:0};let d;if(s)d=(0,n.jsx)("p",{children:(0,o.Eu)(s,u)});else if(r){const e=(0,a.ju)(t);u.offset=e.length,d=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{children:e}),(0,n.jsx)("p",{children:(0,o.Eu)(r,u)})]})}else d=(0,n.jsx)("p",{children:(0,o.Eu)(t,u)});return(0,n.jsxs)("div",{className:"mastodon-preview__body",children:[d,(0,n.jsx)("a",{href:i,target:"_blank",rel:"noreferrer noopener",children:(0,o.WV)(i.replace(/^https?:\/\//,""))}),c]})}},37951:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(30275),a=r(65736),o=r(21987),s=r(82335);r(9170);const __=a.__,i=e=>{let{siteName:t,title:r,url:a,image:i,customImage:l}=e;return(0,n.jsxs)("div",{className:"mastodon-preview__card",children:[(0,n.jsx)("div",{className:"mastodon-preview__card-img",children:(i||l)&&(0,n.jsx)("img",{src:i||l,alt:__("Mastodon preview thumbnail","jetpack")})}),(0,n.jsxs)("div",{className:"mastodon-preview__card-text",children:[(0,n.jsx)("span",{className:"mastodon-preview__card-title",children:(0,s.tZ)(r)}),(0,n.jsx)("span",{className:"mastodon-preview__card-site",children:t||(0,o.wy)(a)})]})]})}},52664:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(30275),a=r(65736),o=r(64011),s=r(34525);r(32295);const __=a.__,i=e=>{let{user:t}=e;const{displayName:r,address:a,avatarUrl:i}=t||{};return(0,n.jsxs)("div",{className:"mastodon-preview__post-header",children:[(0,n.jsxs)("div",{className:"mastodon-preview__post-header-user",children:[i&&(0,n.jsx)("img",{className:"mastodon-preview__post-avatar",src:i,alt:""}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"mastodon-preview__post-header-displayname",children:r||
// translators: username of a fictional Mastodon User
__("anonymous-user","jetpack")}),(0,n.jsx)("div",{className:"mastodon-preview__post-header-username",children:a?.replace(`@${o.q}`,"")})]})]}),(0,n.jsxs)("div",{className:"mastodon-preview__post-header-audience",children:[(0,n.jsx)(s.Z,{name:"globe"}),
// translators: time elapsed since post was published (1 hour)
__("1h","jetpack")]})]})}},34525:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(30275);r(61154);const a=e=>{let{name:t}=e;return(0,n.jsx)("i",{className:`mastodon-preview__post-icon mastodon-preview__post-icon-${t}`})}},60312:(e,t,r)=>{"use strict";r.d(t,{I:()=>c});var n=r(30275),a=r(55609),o=r(65736),s=r(10263),i=r(16534),l=r(67686);const __=o.__,c=e=>{const{headingLevel:t,isSocialPost:r}=e;return(0,n.jsxs)("div",{className:"social-preview mastodon-preview",children:[(0,n.jsxs)("section",{className:"social-preview__section mastodon-preview__section",children:[(0,n.jsx)(s.O,{level:t,children:
// translators: refers to a social post on Mastodon
__("Your post","jetpack")}),(0,n.jsx)("p",{className:"social-preview__section-desc",children:__("This is what your social post will look like on Mastodon:","jetpack")}),r?(0,n.jsx)(l.h,{...e}):(0,n.jsx)(i.W,{...e})]}),(0,n.jsxs)("section",{className:"social-preview__section mastodon-preview__section",children:[(0,n.jsx)(s.O,{level:t,children:
// translators: refers to a link to a Mastodon post
__("Link preview","jetpack")}),(0,n.jsxs)("p",{className:"social-preview__section-desc",children:[__("This is what it will look like when someone shares the link to your WordPress post on Mastodon.","jetpack")," ",(0,n.jsx)(a.ExternalLink,{href:"https://jetpack.com/support/jetpack-social-image-generator",children:__("Learn more about links","jetpack")})]}),(0,n.jsx)(i.W,{...e})]})]})}},10263:(e,t,r)=>{"use strict";r.d(t,{O:()=>o,Z:()=>s});var n=r(30275);const a=[2,3,4,5,6],o=e=>{let{className:t,level:r,children:o}=e;const s=`h${r&&a.includes(r)?r:3}`;return(0,n.jsx)(s,{className:`social-preview__section-heading ${null!=t?t:""}`,children:o})},s=o},80748:(e,t,r)=>{"use strict";r.d(t,{G:()=>o,M:()=>a});var n=r(21987);const a=e=>(0,n.SL)((0,n.hs)(1e3),(0,n.KB)(1e3))((0,n.ju)(e))||"",o=e=>(0,n.SL)((0,n.hs)(400),(0,n.KB)(400))((0,n.ju)(e))||""},96492:(e,t,r)=>{"use strict";r.d(t,{H:()=>c});var n=r(30275),a=r(65736),o=r(21987),s=r(80748),i=r(91100),l=r(5536);r(5609);const __=a.__,c=e=>{let{title:t,description:r,image:a,user:c,url:u}=e;const d=c?.avatarUrl;return(0,n.jsxs)("div",{className:"tumblr-preview__post",children:[d&&(0,n.jsx)("img",{className:"tumblr-preview__avatar",src:d,alt:""}),(0,n.jsxs)("div",{className:"tumblr-preview__card",children:[(0,n.jsx)(l.Z,{user:c}),(0,n.jsxs)("div",{className:"tumblr-preview__window",children:[a&&(0,n.jsxs)("div",{className:"tumblr-preview__window-top",children:[(0,n.jsx)("div",{className:"tumblr-preview__overlay",children:(0,n.jsx)("div",{className:"tumblr-preview__title",children:(0,s.M)(t)})}),(0,n.jsx)("img",{className:"tumblr-preview__image",src:a,alt:__("Tumblr preview thumbnail","jetpack")})]}),(0,n.jsxs)("div",{className:"tumblr-preview__window-bottom "+(a?"":"is-full"),children:[!a&&(0,n.jsx)("div",{className:"tumblr-preview__title",children:(0,s.M)(t)}),r&&a&&(0,n.jsx)("div",{className:"tumblr-preview__description",children:(0,s.G)(r)}),u&&(0,n.jsx)("div",{className:"tumblr-preview__site-name",children:(0,o.wy)(u)})]})]}),(0,n.jsx)(i.Z,{})]})]})}},97450:(e,t,r)=>{"use strict";r.d(t,{x:()=>l});var n=r(30275),a=r(65736),o=r(80748),s=r(91100),i=r(5536);r(5609);const __=a.__,l=e=>{let{title:t,description:r,image:a,user:l,url:c,customText:u}=e;const d=l?.avatarUrl;return(0,n.jsxs)("div",{className:"tumblr-preview__post",children:[d&&(0,n.jsx)("img",{className:"tumblr-preview__avatar",src:d,alt:""}),(0,n.jsxs)("div",{className:"tumblr-preview__card",children:[(0,n.jsx)(i.Z,{user:l}),(0,n.jsxs)("div",{className:"tumblr-preview__body",children:[(0,n.jsx)("div",{className:"tumblr-preview__title",children:(0,o.M)(t)}),u&&(0,n.jsx)("div",{className:"tumblr-preview__custom-text",children:u}),r&&(0,n.jsx)("div",{className:"tumblr-preview__description",children:(0,o.G)(r)}),a&&(0,n.jsx)("img",{className:"tumblr-preview__image",src:a,alt:__("Tumblr preview thumbnail","jetpack")}),(0,n.jsx)("a",{className:"tumblr-preview__url",href:c,target:"_blank",rel:"noreferrer",children:__("View On WordPress","jetpack")})]}),(0,n.jsx)(s.Z,{})]})]})}},91100:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(30275),a=r(65736),o=r(22313);r(91680);const __=a.__,s=()=>(0,n.jsxs)("div",{className:"tumblr-preview__post-actions",children:[(0,n.jsxs)("div",{className:"tumblr-preview__post-manage-actions",children:[(0,n.jsxs)("div",{className:"tumblr-preview__post-actions-blaze",children:[(0,n.jsx)(o.Z,{name:"blaze"})," Blaze"]}),(0,n.jsx)("ul",{children:[{icon:"delete",
// translators: "Delete" action on a Tumblr post
label:__("Delete","jetpack")},{icon:"edit",
// translators: "Edit" action on a Tumblr post
label:__("Edit","jetpack")}].map((e=>{let{icon:t,label:r}=e;return(0,n.jsx)("li",{"aria-label":r,children:(0,n.jsx)(o.Z,{name:t})},t)}))})]}),(0,n.jsxs)("div",{className:"tumblr-preview__post-social-actions",children:[(0,n.jsx)("div",{children:
// translators: count of notes on a Tumblr post
__("0 notes","jetpack")}),(0,n.jsx)("ul",{children:[{icon:"share",
// translators: "Share" action on a Tumblr post
label:__("Share","jetpack")},{icon:"reply",
// translators: "Reply" action on a Tumblr post
label:__("Reply","jetpack")},{icon:"reblog",
// translators: "Reblog" action on a Tumblr post
label:__("Reblog","jetpack")},{icon:"like",
// translators: "Like" action on a Tumblr post
label:__("Like","jetpack")}].map((e=>{let{icon:t,label:r}=e;return(0,n.jsx)("li",{"aria-label":r,children:(0,n.jsx)(o.Z,{name:t})},t)}))})]})]})},5536:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(30275),a=r(65736),o=r(22313);r(49304);const __=a.__,s=e=>{let{user:t}=e;return(0,n.jsxs)("div",{className:"tumblr-preview__post-header",children:[(0,n.jsx)("div",{className:"tumblr-preview__post-header-username",children:t?.displayName||
// translators: username of a fictional Tumblr User
__("anonymous-user","jetpack")}),(0,n.jsx)(o.Z,{name:"ellipsis"})]})}},22313:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(30275);r(27212);const a=e=>{let t,{name:r}=e;switch(r){case"blaze":t=(0,n.jsx)("svg",{viewBox:"0 0 25 22",children:(0,n.jsx)("path",{d:"m7.5059-0.24414c-0.79843 0.057223-1.2169 0.88587-1.1635 1.6128-0.2266 2.0449-1.4898 3.8696-3.1975 4.9778-3.0182 2.414-4.2201 6.8066-2.8033 10.411 0.92417 2.4679 2.9589 4.5674 5.4768 5.3928 0.95914 0.16102 1.7233-0.94358 1.3074-1.8059-0.11578-0.51062-0.17482-0.96516-0.17845-1.487 1.0413 1.5607 2.5484 2.8986 4.341 3.4975 1.0396-0.0154 1.98-0.64458 2.8516-1.1608 3.3821-2.1786 4.9604-6.7097 3.6597-10.518-0.49144-1.4599-1.2948-2.8935-2.5028-3.8698-0.7512-0.45498-1.661 0.09677-1.9202 0.86038-0.12274 0.16822-0.70352 1.1955-0.6191 0.61976 0.25488-3.4397-1.6789-7.0066-4.8123-8.4958-0.14322-0.037843-0.292-0.049464-0.43945-0.035156zm1.0586 3.5605c1.8947 2.0016 2.2326 5.1984 0.89062 7.5879-0.38498 0.96148 0.71762 2.0063 1.6567 1.5681 1.4159-0.4624 2.6998-1.3259 3.6577-2.4665 1.6442 2.5888 1.1465 6.2819-1.0629 8.3379-0.62378 0.60782-1.3666 1.0945-2.1754 1.4179-1.9543-0.989-3.3534-3.0966-3.5625-5.3125-0.25636-1.0253-1.81-1.2013-2.2852-0.25781-0.75058 1.3054-1.1846 2.7948-1.2305 4.3008-2.2396-1.9852-2.8468-5.4435-1.4609-8.0527 0.58926-1.239 1.651-2.13 2.724-2.9329 1.2958-1.1271 2.2791-2.62 2.7682-4.2683l0.071578 0.069832z"})});break;case"delete":t=(0,n.jsxs)("svg",{viewBox:"0 0 14 17",children:[(0,n.jsx)("path",{d:"M12 5v9c.1.7-.3 1-1 1H3c-.5 0-.9-.3-1-1V5c0-.6-.4-1-1-1-.5 0-1 .4-1 1v9.5C0 16.1 1.4 17 3 17h8c1.8 0 3-.8 3-2.5V5c0-.6-.5-1-1-1-.6 0-1 .5-1 1z"}),(0,n.jsx)("path",{d:"M4 12s0 1 1 1 1-1 1-1V5c0-.5-.4-1-1-1-.5 0-1 .5-1 1v7zm4 0s0 1 1 1 1-1 1-1V5c0-.5-.4-1-1-1-.5 0-1 .5-1 1v7zm5-10c.5 0 1-.4 1-1 0-.5-.4-.9-1-1H1C.5.1 0 .5 0 1c0 .6.6 1 1.1 1H13z"})]});break;case"edit":t=(0,n.jsx)("svg",{viewBox:"0 0 17.6 17.6",children:(0,n.jsx)("path",{d:"M5.3 13.8l-2.1.7.7-2.1L10.3 6l1.4 1.4-6.4 6.4zm6.4-9.3l-1.4-1.4-1.4 1.4-6.7 6.7-.2.5-2 5.9 3.8-1.3 2.1-.7.4-.1.3-.3 7.8-7.8c.1 0-2.7-2.9-2.7-2.9zm5.6-1.4L14.5.3c-.4-.4-1-.4-1.4 0l-1.4 1.4L15.9 6l1.4-1.4c.4-.5.4-1.1 0-1.5"})});break;case"share":t=(0,n.jsx)("svg",{viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M12.6173 1.07612C12.991 0.921338 13.4211 1.00689 13.7071 1.29289L22.7071 10.2929C23.0832 10.669 23.0991 11.2736 22.7433 11.669L13.7433 21.669C13.4663 21.9767 13.0283 22.082 12.6417 21.9336C12.2552 21.7853 12 21.414 12 21V16H11.5C7.31775 16 3.92896 18.2486 2.95256 21.3044C2.80256 21.7738 2.33292 22.064 1.84598 21.9881C1.35904 21.9122 1 21.4928 1 21V18.5C1 12.3162 5.88069 7.27245 12 7.01067V2C12 1.59554 12.2436 1.2309 12.6173 1.07612ZM14 4.41421V8C14 8.55228 13.5523 9 13 9H12.5C7.64534 9 3.64117 12.6414 3.06988 17.3419C5.09636 15.2366 8.18218 14 11.5 14H13C13.5523 14 14 14.4477 14 15V18.394L20.622 11.0362L14 4.41421Z"})});break;case"reply":t=(0,n.jsx)("svg",{viewBox:"0 0 17 17",children:(0,n.jsx)("path",{d:"M8.7 0C4.1 0 .4 3.7.4 8.3c0 1.2.2 2.3.7 3.4-.2.6-.4 1.5-.7 2.5L0 15.8c-.2.7.5 1.4 1.2 1.2l1.6-.4 2.4-.7c1.1.5 2.2.7 3.4.7 4.6 0 8.3-3.7 8.3-8.3C17 3.7 13.3 0 8.7 0zM15 8.3c0 3.5-2.8 6.3-6.4 6.3-1.2 0-2.3-.3-3.2-.9l-3.2.9.9-3.2c-.5-.9-.9-2-.9-3.2.1-3.4 3-6.2 6.5-6.2S15 4.8 15 8.3z"})});break;case"reblog":t=(0,n.jsx)("svg",{viewBox:"0 0 17 18.1",children:(0,n.jsx)("path",{d:"M12.8.2c-.4-.4-.8-.2-.8.4v2H2c-2 0-2 2-2 2v5s0 1 1 1 1-1 1-1v-4c0-1 .5-1 1-1h9v2c0 .6.3.7.8.4L17 3.6 12.8.2zM4.2 17.9c.5.4.8.2.8-.3v-2h10c2 0 2-2 2-2v-5s0-1-1-1-1 1-1 1v4c0 1-.5 1-1 1H5v-2c0-.6-.3-.7-.8-.4L0 14.6l4.2 3.3z"})});break;case"like":t=(0,n.jsx)("svg",{viewBox:"0 0 20 18",children:(0,n.jsx)("path",{d:"M14.658 0c-1.625 0-3.21.767-4.463 2.156-.06.064-.127.138-.197.225-.074-.085-.137-.159-.196-.225C8.547.766 6.966 0 5.35 0 4.215 0 3.114.387 2.162 1.117c-2.773 2.13-2.611 5.89-1.017 8.5 2.158 3.535 6.556 7.18 7.416 7.875A2.3 2.3 0 0 0 9.998 18c.519 0 1.028-.18 1.436-.508.859-.695 5.257-4.34 7.416-7.875 1.595-2.616 1.765-6.376-1-8.5C16.895.387 15.792 0 14.657 0h.001zm0 2.124c.645 0 1.298.208 1.916.683 1.903 1.461 1.457 4.099.484 5.695-1.973 3.23-6.16 6.7-6.94 7.331a.191.191 0 0 1-.241 0c-.779-.631-4.966-4.101-6.94-7.332-.972-1.595-1.4-4.233.5-5.694.619-.475 1.27-.683 1.911-.683 1.064 0 2.095.574 2.898 1.461.495.549 1.658 2.082 1.753 2.203.095-.12 1.259-1.654 1.752-2.203.8-.887 1.842-1.461 2.908-1.461h-.001z"})});break;case"ellipsis":t=(0,n.jsx)("svg",{viewBox:"0 0 17.5 3.9",children:(0,n.jsx)("path",{d:"M17.5 1.9c0 1.1-.9 1.9-1.9 1.9-1.1 0-1.9-.9-1.9-1.9S14.5 0 15.6 0c1 0 1.9.9 1.9 1.9m-6.8 0c0 1.1-.9 1.9-1.9 1.9-1.1.1-2-.8-2-1.9 0-1 .9-1.9 2-1.9s1.9.9 1.9 1.9m-6.8 0c0 1.1-.9 2-2 2-1 0-1.9-.9-1.9-2S.9 0 1.9 0c1.1 0 2 .9 2 1.9"})})}return(0,n.jsx)("span",{className:`tumblr-preview__post-icon tumblr-preview__post-icon-${r}`,children:t})}},1044:(e,t,r)=>{"use strict";r.d(t,{b:()=>c});var n=r(30275),a=r(55609),o=r(65736),s=r(10263),i=r(96492),l=r(97450);const __=o.__,c=e=>{let{headingLevel:t,hideLinkPreview:r,hidePostPreview:o,...c}=e;return(0,n.jsxs)("div",{className:"social-preview tumblr-preview",children:[!o&&(0,n.jsxs)("section",{className:"social-preview__section tumblr-preview__section",children:[(0,n.jsx)(s.O,{level:t,children:
// translators: refers to a social post on Tumblr
__("Your post","jetpack")}),(0,n.jsx)("p",{className:"social-preview__section-desc",children:__("This is what your social post will look like on Tumblr:","jetpack")}),(0,n.jsx)(l.x,{...c})]}),!r&&(0,n.jsxs)("section",{className:"social-preview__section tumblr-preview__section",children:[(0,n.jsx)(s.O,{level:t,children:
// translators: refers to a link on Tumblr
__("Link preview","jetpack")}),(0,n.jsxs)("p",{className:"social-preview__section-desc",children:[__("This is what it will look like when someone shares the link to your WordPress post on Tumblr.","jetpack")," ",(0,n.jsx)(a.ExternalLink,{href:"https://jetpack.com/support/jetpack-social-image-generator",children:__("Learn more about links","jetpack")})]}),(0,n.jsx)(i.H,{...c})]})]})}},5894:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(30275),a=r(65235),o=r.n(a),s=r(21987);const i=(0,s.SL)((0,s.hs)(200),(0,s.KB)(200)),l=e=>{let{description:t,image:r,title:a,cardType:l,url:c}=e;const u=o()(`twitter-preview__card-${l}`,{"twitter-preview__card-has-image":!!r});return(0,n.jsx)("div",{className:"twitter-preview__card",children:(0,n.jsxs)("div",{className:u,children:[r&&(0,n.jsx)("img",{className:"twitter-preview__card-image",src:r,alt:""}),(0,n.jsxs)("div",{className:"twitter-preview__card-body",children:[(0,n.jsx)("div",{className:"twitter-preview__card-url",children:(0,s.wy)(c||"")}),(0,n.jsx)("div",{className:"twitter-preview__card-title",children:a}),(0,n.jsx)("div",{className:"twitter-preview__card-description",children:i((0,s.ju)(t))})]})]})})}},66370:(e,t,r)=>{"use strict";r.d(t,{$:()=>a});var n=r(30275);const a=()=>(0,n.jsxs)("div",{className:"twitter-preview__footer",children:[(0,n.jsx)("span",{className:"twitter-preview__icon-replies",children:(0,n.jsx)("svg",{viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M1.751 10c0-4.42 3.584-8 8.005-8h4.366c4.49 0 8.129 3.64 8.129 8.13 0 2.96-1.607 5.68-4.196 7.11l-8.054 4.46v-3.69h-.067c-4.49.1-8.183-3.51-8.183-8.01zm8.005-6c-3.317 0-6.005 2.69-6.005 6 0 3.37 2.77 6.08 6.138 6.01l.351-.01h1.761v2.3l5.087-2.81c1.951-1.08 3.163-3.13 3.163-5.36 0-3.39-2.744-6.13-6.129-6.13H9.756z"})})}),(0,n.jsx)("span",{className:"twitter-preview__icon-retweets",children:(0,n.jsx)("svg",{viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M4.5 3.88l4.432 4.14-1.364 1.46L5.5 7.55V16c0 1.1.896 2 2 2H13v2H7.5c-2.209 0-4-1.79-4-4V7.55L1.432 9.48.068 8.02 4.5 3.88zM16.5 6H11V4h5.5c2.209 0 4 1.79 4 4v8.45l2.068-1.93 1.364 1.46-4.432 4.14-4.432-4.14 1.364-1.46 2.068 1.93V8c0-1.1-.896-2-2-2z"})})}),(0,n.jsx)("span",{className:"twitter-preview__icon-likes",children:(0,n.jsx)("svg",{viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M16.697 5.5c-1.222-.06-2.679.51-3.89 2.16l-.805 1.09-.806-1.09C9.984 6.01 8.526 5.44 7.304 5.5c-1.243.07-2.349.78-2.91 1.91-.552 1.12-.633 2.78.479 4.82 1.074 1.97 3.257 4.27 7.129 6.61 3.87-2.34 6.052-4.64 7.126-6.61 1.111-2.04 1.03-3.7.477-4.82-.561-1.13-1.666-1.84-2.908-1.91zm4.187 7.69c-1.351 2.48-4.001 5.12-8.379 7.67l-.503.3-.504-.3c-4.379-2.55-7.029-5.19-8.382-7.67-1.36-2.5-1.41-4.86-.514-6.67.887-1.79 2.647-2.91 4.601-3.01 1.651-.09 3.368.56 4.798 2.01 1.429-1.45 3.146-2.1 4.796-2.01 1.954.1 3.714 1.22 4.601 3.01.896 1.81.846 4.17-.514 6.67z"})})}),(0,n.jsx)("span",{className:"twitter-preview__icon-analytics",children:(0,n.jsx)("svg",{viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M8.75 21V3h2v18h-2zM18 21V8.5h2V21h-2zM4 21l.004-10h2L6 21H4zm9.248 0v-7h2v7h-2z"})})}),(0,n.jsx)("span",{className:"twitter-preview__icon-share",children:(0,n.jsx)("svg",{viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M12 2.59l5.7 5.7-1.41 1.42L13 6.41V16h-2V6.41l-3.3 3.3-1.41-1.42L12 2.59zM21 15l-.02 3.51c0 1.38-1.12 2.49-2.5 2.49H5.5C4.11 21 3 19.88 3 18.5V15h2v3.5c0 .28.22.5.5.5h12.98c.28 0 .5-.22.5-.5L19 15h2z"})})})]})},78678:(e,t,r)=>{"use strict";r.d(t,{h:()=>s});var n=r(30275),a=r(65736),o=r(21987);const __=a.__,s=e=>{let{name:t,screenName:r,date:a}=e;return(0,n.jsxs)("div",{className:"twitter-preview__header",children:[(0,n.jsx)("span",{className:"twitter-preview__name",children:t||__("Account Name","jetpack")}),(0,n.jsx)("span",{className:"twitter-preview__screen-name",children:r||"@account"}),(0,n.jsx)("span",{children:"·"}),(0,n.jsx)("span",{className:"twitter-preview__date",children:(0,o.YW)(a||Date.now())})]})}},42029:(e,t,r)=>{"use strict";r.d(t,{q:()=>a});var n=r(30275);const a=()=>(0,n.jsxs)("svg",{version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:"271pt",height:"270pt",viewBox:"0 0 271 270",children:[(0,n.jsx)("rect",{width:"100%",height:"100%",fill:"#ccd5de"}),(0,n.jsxs)("g",{transform:"translate(0,270) scale(0.1,-0.1)",fill:"#647785",stroke:"none",children:[(0,n.jsx)("path",{d:"M1251 2089 c-81 -14 -178 -65 -239 -125 -64 -65 -124 -185 -149 -299 -24 -111 -24 -339 -1 -415 38 -121 108 -193 227 -231 83 -27 339 -38 449 -19 139 23 236 91 286 200 59 130 52 395 -15 577 -88 235 -301 354 -558 312z"}),(0,n.jsx)("path",{d:"M1197 795 c-358 -68 -643 -357 -721 -732 l-14 -63 890 0 890 0 -7 42 c-11 70 -64 218 -102 288 -121 224 -336 394 -573 454 -92 24 -267 29 -363 11z"})]})]})},43503:(e,t,r)=>{"use strict";r.d(t,{m:()=>o});var n=r(30275),a=r(20445);const o=e=>(0,n.jsx)(a.g,{...e,text:"",media:void 0})},51075:(e,t,r)=>{"use strict";r.d(t,{p:()=>i});var n=r(30275),a=r(65235),o=r.n(a),s=r(99196);const i=e=>{let{media:t}=e;const r=t.filter((e=>e.type.startsWith("image/")||e.type.startsWith("video/"))).filter(((e,t,r)=>0===t||!r[0].type.startsWith("video/")&&"image/gif"!==r[0].type&&(!e.type.startsWith("video/")&&"image/gif"!==e.type))).slice(0,4);if(0===r.length)return null;const a=r[0].type.startsWith("video/"),i=o()(["twitter-preview__media","twitter-preview__media-children-"+r.length]);return(0,n.jsx)("div",{className:i,children:r.map(((e,t)=>(0,n.jsx)(s.Fragment,{children:a?(0,n.jsx)("video",{controls:!0,children:(0,n.jsx)("source",{src:e.url,type:e.type})}):(0,n.jsx)("img",{alt:e.alt||"",src:e.url})},`twitter-preview__media-item-${t}`)))})}},20445:(e,t,r)=>{"use strict";r.d(t,{g:()=>d});var n=r(30275),a=r(5894),o=r(66370),s=r(78678),i=r(51075),l=r(15850),c=r(94615),u=r(98969);r(58449);const d=e=>{let{date:t,description:r,image:d,media:p,name:m,profileImage:h,screenName:g,showThreadConnector:f,text:b,title:v,tweet:k,cardType:y,url:E}=e;const w=!!p?.length;return(0,n.jsx)("div",{className:"twitter-preview__wrapper",children:(0,n.jsxs)("div",{className:"twitter-preview__container",children:[(0,n.jsx)(c.Y,{profileImage:h,showThreadConnector:f}),(0,n.jsxs)("div",{className:"twitter-preview__main",children:[(0,n.jsx)(s.h,{name:m,screenName:g,date:t}),(0,n.jsxs)("div",{className:"twitter-preview__content",children:[b?(0,n.jsx)(u.x,{text:b,url:E||"",retainUrl:w}):null,w?(0,n.jsx)(i.p,{media:p}):null,k?(0,n.jsx)(l.P,{tweet:k}):null,!w&&v&&r&&E&&(0,n.jsx)(a.Z,{description:r,image:d,title:v,cardType:y||"",url:E})]}),(0,n.jsx)(o.$,{})]})]})})}},835:(e,t,r)=>{"use strict";r.d(t,{c:()=>c});var n=r(30275),a=r(55609),o=r(65736),s=r(10263),i=r(43503),l=r(20445);const __=o.__,c=e=>{let{headingLevel:t,hideLinkPreview:r,hidePostPreview:o,tweets:c}=e;return c?.length?(0,n.jsxs)("div",{className:"social-preview twitter-preview",children:[!o&&(0,n.jsxs)("section",{className:"social-preview__section twitter-preview__section",children:[(0,n.jsx)(s.Z,{level:t,children:
// translators: refers to a social post on Twitter
__("Your post","jetpack")}),(0,n.jsx)("p",{className:"social-preview__section-desc",children:__("This is what your social post will look like on Twitter:","jetpack")}),c.map(((e,t)=>{const r=t+1===c.length;return(0,n.jsx)(l.g,{...e,showThreadConnector:!r},`twitter-preview__tweet-${t}`)}))]}),!r&&(0,n.jsxs)("section",{className:"social-preview__section twitter-preview__section",children:[(0,n.jsx)(s.Z,{level:t,children:
// translators: refers to a link to a Twitter post
__("Link preview","jetpack")}),(0,n.jsxs)("p",{className:"social-preview__section-desc",children:[__("This is what it will look like when someone shares the link to your WordPress post on Twitter.","jetpack")," ",(0,n.jsx)(a.ExternalLink,{href:"https://jetpack.com/support/jetpack-social-image-generator",children:__("Learn more about links","jetpack")})]}),(0,n.jsx)(i.m,{...c[0],name:"",profileImage:"",screenName:""})]})]}):null}},15850:(e,t,r)=>{"use strict";r.d(t,{P:()=>o});var n=r(30275),a=r(55609);const o=e=>{let{tweet:t}=e;return t?(0,n.jsxs)("div",{className:"twitter-preview__quote-tweet",children:[(0,n.jsx)(a.SandBox,{html:`<blockquote class="twitter-tweet" data-conversation="none" data-dnt="true"><a href="${t}"></a></blockquote>`,scripts:["https://platform.twitter.com/widgets.js"],title:"Embedded tweet"}),(0,n.jsx)("div",{className:"twitter-preview__quote-tweet-overlay"})]}):null}},94615:(e,t,r)=>{"use strict";r.d(t,{Y:()=>s});var n=r(30275),a=r(65736),o=r(42029);const __=a.__,s=e=>{let{profileImage:t,showThreadConnector:r}=e;return(0,n.jsxs)("div",{className:"twitter-preview__sidebar",children:[(0,n.jsx)("div",{className:"twitter-preview__profile-image",children:t?(0,n.jsx)("img",{alt:__("Twitter profile image","jetpack"),src:t}):(0,n.jsx)(o.q,{})}),r&&(0,n.jsx)("div",{className:"twitter-preview__connector"})]})}},98969:(e,t,r)=>{"use strict";r.d(t,{x:()=>o});var n=r(30275),a=r(21987);const o=e=>{let{text:t,url:r,retainUrl:o}=e;if(!t)return null;const s=r&&!o&&t.endsWith(r)?t.substring(0,t.lastIndexOf(r)):t;return(0,n.jsx)("div",{className:"twitter-preview__text",children:(0,a.u_)(s,{platform:"twitter"})})}},51128:(e,t,r)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,a=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(a=n))})),t.splice(a,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(62942)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},62942:(e,t,r)=>{e.exports=function(e){function t(e){let r,a,o,s=null;function i(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];if(!i.enabled)return;const o=i,s=Number(new Date),l=s-(r||s);o.diff=l,o.prev=r,o.curr=s,r=s,n[0]=t.coerce(n[0]),"string"!=typeof n[0]&&n.unshift("%O");let c=0;n[0]=n[0].replace(/%([a-zA-Z%])/g,((e,r)=>{if("%%"===e)return"%";c++;const a=t.formatters[r];if("function"==typeof a){const t=n[c];e=a.call(o,t),n.splice(c,1),c--}return e})),t.formatArgs.call(o,n);(o.log||t.log).apply(o,n)}return i.namespace=e,i.useColors=t.useColors(),i.color=t.selectColor(e),i.extend=n,i.destroy=t.destroy,Object.defineProperty(i,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(a!==t.namespaces&&(a=t.namespaces,o=t.enabled(e)),o),set:e=>{s=e}}),"function"==typeof t.init&&t.init(i),i}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function a(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(a),...t.skips.map(a).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),a=n.length;for(r=0;r<a;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(73171),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},99891:(e,t,r)=>{"use strict";t.Z=function(e){var t=e.size,r=void 0===t?24:t,n=e.onClick,i=(e.icon,e.className),l=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],0<=t.indexOf(r)||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,o),c=["gridicon","gridicons-fullscreen",i,!1,!1,!1].filter(Boolean).join(" ");return a.default.createElement("svg",s({className:c,height:r,width:r,onClick:n},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M21 3v6h-2V6.41l-3.29 3.3-1.42-1.42L17.59 5H15V3zM3 3v6h2V6.41l3.29 3.3 1.42-1.42L6.41 5H9V3zm18 18v-6h-2v2.59l-3.29-3.29-1.41 1.41L17.59 19H15v2zM9 21v-2H6.41l3.29-3.29-1.41-1.42L5 17.59V15H3v6z"})))};var n,a=(n=r(99196))&&n.__esModule?n:{default:n},o=["size","onClick","icon","className"];function s(){return s=Object.assign||function(e){for(var t,r=1;r<arguments.length;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},s.apply(this,arguments)}},73139:(e,t,r)=>{"use strict";t.Z=function(e){var t=e.size,r=void 0===t?24:t,n=e.onClick,i=(e.icon,e.className),l=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],0<=t.indexOf(r)||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,o),c=["gridicon","gridicons-notice-outline",i,!!function(e){return 0==e%18}(r)&&"needs-offset",!1,!1].filter(Boolean).join(" ");return a.default.createElement("svg",s({className:c,height:r,width:r,onClick:n},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M12 4c4.411 0 8 3.589 8 8s-3.589 8-8 8-8-3.589-8-8 3.589-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 13h-2v2h2v-2zm-2-2h2l.5-6h-3l.5 6z"})))};var n,a=(n=r(99196))&&n.__esModule?n:{default:n},o=["size","onClick","icon","className"];function s(){return s=Object.assign||function(e){for(var t,r=1;r<arguments.length;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},s.apply(this,arguments)}},89933:(e,t,r)=>{"use strict";t.Z=function(e){var t=e.size,r=void 0===t?24:t,n=e.onClick,i=(e.icon,e.className),l=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],0<=t.indexOf(r)||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,o),c=["gridicon","gridicons-star",i,!!function(e){return 0==e%18}(r)&&"needs-offset",!1,!1].filter(Boolean).join(" ");return a.default.createElement("svg",s({className:c,height:r,width:r,onClick:n},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.891 5.82 21l2.002-7.141L2 9.257l7.418-.304z"})))};var n,a=(n=r(99196))&&n.__esModule?n:{default:n},o=["size","onClick","icon","className"];function s(){return s=Object.assign||function(e){for(var t,r=1;r<arguments.length;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},s.apply(this,arguments)}},60300:(e,t,r)=>{"use strict";r.r(t),r.d(t,{decode:()=>b,default:()=>E,encode:()=>v,toASCII:()=>y,toUnicode:()=>k,ucs2decode:()=>m,ucs2encode:()=>h});const n=2147483647,a=36,o=/^xn--/,s=/[^\0-\x7F]/,i=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},c=Math.floor,u=String.fromCharCode;function d(e){throw new RangeError(l[e])}function p(e,t){const r=e.split("@");let n="";r.length>1&&(n=r[0]+"@",e=r[1]);const a=function(e,t){const r=[];let n=e.length;for(;n--;)r[n]=t(e[n]);return r}((e=e.replace(i,".")).split("."),t).join(".");return n+a}function m(e){const t=[];let r=0;const n=e.length;for(;r<n;){const a=e.charCodeAt(r++);if(a>=55296&&a<=56319&&r<n){const n=e.charCodeAt(r++);56320==(64512&n)?t.push(((1023&a)<<10)+(1023&n)+65536):(t.push(a),r--)}else t.push(a)}return t}const h=e=>String.fromCodePoint(...e),g=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},f=function(e,t,r){let n=0;for(e=r?c(e/700):e>>1,e+=c(e/t);e>455;n+=a)e=c(e/35);return c(n+36*e/(e+38))},b=function(e){const t=[],r=e.length;let o=0,s=128,i=72,l=e.lastIndexOf("-");l<0&&(l=0);for(let r=0;r<l;++r)e.charCodeAt(r)>=128&&d("not-basic"),t.push(e.charCodeAt(r));for(let p=l>0?l+1:0;p<r;){const l=o;for(let t=1,s=a;;s+=a){p>=r&&d("invalid-input");const l=(u=e.charCodeAt(p++))>=48&&u<58?u-48+26:u>=65&&u<91?u-65:u>=97&&u<123?u-97:a;l>=a&&d("invalid-input"),l>c((n-o)/t)&&d("overflow"),o+=l*t;const m=s<=i?1:s>=i+26?26:s-i;if(l<m)break;const h=a-m;t>c(n/h)&&d("overflow"),t*=h}const m=t.length+1;i=f(o-l,m,0==l),c(o/m)>n-s&&d("overflow"),s+=c(o/m),o%=m,t.splice(o++,0,s)}var u;return String.fromCodePoint(...t)},v=function(e){const t=[],r=(e=m(e)).length;let o=128,s=0,i=72;for(const r of e)r<128&&t.push(u(r));const l=t.length;let p=l;for(l&&t.push("-");p<r;){let r=n;for(const t of e)t>=o&&t<r&&(r=t);const m=p+1;r-o>c((n-s)/m)&&d("overflow"),s+=(r-o)*m,o=r;for(const r of e)if(r<o&&++s>n&&d("overflow"),r===o){let e=s;for(let r=a;;r+=a){const n=r<=i?1:r>=i+26?26:r-i;if(e<n)break;const o=e-n,s=a-n;t.push(u(g(n+o%s,0))),e=c(o/s)}t.push(u(g(e,0))),i=f(s,m,p===l),s=0,++p}++s,++o}return t.join("")},k=function(e){return p(e,(function(e){return o.test(e)?b(e.slice(4).toLowerCase()):e}))},y=function(e){return p(e,(function(e){return s.test(e)?"xn--"+v(e):e}))},E={version:"2.1.0",ucs2:{decode:m,encode:h},decode:b,encode:v,toASCII:y,toUnicode:k}},38697:(e,t,r)=>{"use strict";r.d(t,{pi:()=>n});var n=function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n.apply(this,arguments)};Object.create;Object.create},92213:(e,t,r)=>{"use strict";function n(e,t){return Array(t+1).join(e)}r.d(t,{Z:()=>R});var a=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function o(e){return c(e,a)}var s=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function i(e){return c(e,s)}var l=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function c(e,t){return t.indexOf(e.nodeName)>=0}function u(e,t){return e.getElementsByTagName&&t.some((function(t){return e.getElementsByTagName(t).length}))}var d={};function p(e){return e?e.replace(/(\n+\s*)+/g,"\n"):""}function m(e){for(var t in this.options=e,this._keep=[],this._remove=[],this.blankRule={replacement:e.blankReplacement},this.keepReplacement=e.keepReplacement,this.defaultRule={replacement:e.defaultReplacement},this.array=[],e.rules)this.array.push(e.rules[t])}function h(e,t,r){for(var n=0;n<e.length;n++){var a=e[n];if(g(a,t,r))return a}}function g(e,t,r){var n=e.filter;if("string"==typeof n){if(n===t.nodeName.toLowerCase())return!0}else if(Array.isArray(n)){if(n.indexOf(t.nodeName.toLowerCase())>-1)return!0}else{if("function"!=typeof n)throw new TypeError("`filter` needs to be a string, array, or function");if(n.call(e,t,r))return!0}}function f(e){var t=e.nextSibling||e.parentNode;return e.parentNode.removeChild(e),t}function b(e,t,r){return e&&e.parentNode===t||r(t)?t.nextSibling||t.parentNode:t.firstChild||t.nextSibling||t.parentNode}d.paragraph={filter:"p",replacement:function(e){return"\n\n"+e+"\n\n"}},d.lineBreak={filter:"br",replacement:function(e,t,r){return r.br+"\n"}},d.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function(e,t,r){var a=Number(t.nodeName.charAt(1));return"setext"===r.headingStyle&&a<3?"\n\n"+e+"\n"+n(1===a?"=":"-",e.length)+"\n\n":"\n\n"+n("#",a)+" "+e+"\n\n"}},d.blockquote={filter:"blockquote",replacement:function(e){return"\n\n"+(e=(e=e.replace(/^\n+|\n+$/g,"")).replace(/^/gm,"> "))+"\n\n"}},d.list={filter:["ul","ol"],replacement:function(e,t){var r=t.parentNode;return"LI"===r.nodeName&&r.lastElementChild===t?"\n"+e:"\n\n"+e+"\n\n"}},d.listItem={filter:"li",replacement:function(e,t,r){e=e.replace(/^\n+/,"").replace(/\n+$/,"\n").replace(/\n/gm,"\n    ");var n=r.bulletListMarker+"   ",a=t.parentNode;if("OL"===a.nodeName){var o=a.getAttribute("start"),s=Array.prototype.indexOf.call(a.children,t);n=(o?Number(o)+s:s+1)+".  "}return n+e+(t.nextSibling&&!/\n$/.test(e)?"\n":"")}},d.indentedCodeBlock={filter:function(e,t){return"indented"===t.codeBlockStyle&&"PRE"===e.nodeName&&e.firstChild&&"CODE"===e.firstChild.nodeName},replacement:function(e,t,r){return"\n\n    "+t.firstChild.textContent.replace(/\n/g,"\n    ")+"\n\n"}},d.fencedCodeBlock={filter:function(e,t){return"fenced"===t.codeBlockStyle&&"PRE"===e.nodeName&&e.firstChild&&"CODE"===e.firstChild.nodeName},replacement:function(e,t,r){for(var a,o=((t.firstChild.getAttribute("class")||"").match(/language-(\S+)/)||[null,""])[1],s=t.firstChild.textContent,i=r.fence.charAt(0),l=3,c=new RegExp("^"+i+"{3,}","gm");a=c.exec(s);)a[0].length>=l&&(l=a[0].length+1);var u=n(i,l);return"\n\n"+u+o+"\n"+s.replace(/\n$/,"")+"\n"+u+"\n\n"}},d.horizontalRule={filter:"hr",replacement:function(e,t,r){return"\n\n"+r.hr+"\n\n"}},d.inlineLink={filter:function(e,t){return"inlined"===t.linkStyle&&"A"===e.nodeName&&e.getAttribute("href")},replacement:function(e,t){var r=t.getAttribute("href"),n=p(t.getAttribute("title"));return n&&(n=' "'+n+'"'),"["+e+"]("+r+n+")"}},d.referenceLink={filter:function(e,t){return"referenced"===t.linkStyle&&"A"===e.nodeName&&e.getAttribute("href")},replacement:function(e,t,r){var n,a,o=t.getAttribute("href"),s=p(t.getAttribute("title"));switch(s&&(s=' "'+s+'"'),r.linkReferenceStyle){case"collapsed":n="["+e+"][]",a="["+e+"]: "+o+s;break;case"shortcut":n="["+e+"]",a="["+e+"]: "+o+s;break;default:var i=this.references.length+1;n="["+e+"]["+i+"]",a="["+i+"]: "+o+s}return this.references.push(a),n},references:[],append:function(e){var t="";return this.references.length&&(t="\n\n"+this.references.join("\n")+"\n\n",this.references=[]),t}},d.emphasis={filter:["em","i"],replacement:function(e,t,r){return e.trim()?r.emDelimiter+e+r.emDelimiter:""}},d.strong={filter:["strong","b"],replacement:function(e,t,r){return e.trim()?r.strongDelimiter+e+r.strongDelimiter:""}},d.code={filter:function(e){var t=e.previousSibling||e.nextSibling,r="PRE"===e.parentNode.nodeName&&!t;return"CODE"===e.nodeName&&!r},replacement:function(e){if(!e)return"";e=e.replace(/\r?\n|\r/g," ");for(var t=/^`|^ .*?[^ ].* $|`$/.test(e)?" ":"",r="`",n=e.match(/`+/gm)||[];-1!==n.indexOf(r);)r+="`";return r+t+e+t+r}},d.image={filter:"img",replacement:function(e,t){var r=p(t.getAttribute("alt")),n=t.getAttribute("src")||"",a=p(t.getAttribute("title"));return n?"!["+r+"]("+n+(a?' "'+a+'"':"")+")":""}},m.prototype={add:function(e,t){this.array.unshift(t)},keep:function(e){this._keep.unshift({filter:e,replacement:this.keepReplacement})},remove:function(e){this._remove.unshift({filter:e,replacement:function(){return""}})},forNode:function(e){return e.isBlank?this.blankRule:(t=h(this.array,e,this.options))||(t=h(this._keep,e,this.options))||(t=h(this._remove,e,this.options))?t:this.defaultRule;var t},forEach:function(e){for(var t=0;t<this.array.length;t++)e(this.array[t],t)}};var v="undefined"!=typeof window?window:{};var k,y,E=function(){var e=v.DOMParser,t=!1;try{(new e).parseFromString("","text/html")&&(t=!0)}catch(e){}return t}()?v.DOMParser:(k=function(){},function(){var e=!1;try{document.implementation.createHTMLDocument("").open()}catch(t){window.ActiveXObject&&(e=!0)}return e}()?k.prototype.parseFromString=function(e){var t=new window.ActiveXObject("htmlfile");return t.designMode="on",t.open(),t.write(e),t.close(),t}:k.prototype.parseFromString=function(e){var t=document.implementation.createHTMLDocument("");return t.open(),t.write(e),t.close(),t},k);function w(e,t){var r;"string"==typeof e?r=(y=y||new E).parseFromString('<x-turndown id="turndown-root">'+e+"</x-turndown>","text/html").getElementById("turndown-root"):r=e.cloneNode(!0);return function(e){var t=e.element,r=e.isBlock,n=e.isVoid,a=e.isPre||function(e){return"PRE"===e.nodeName};if(t.firstChild&&!a(t)){for(var o=null,s=!1,i=null,l=b(i,t,a);l!==t;){if(3===l.nodeType||4===l.nodeType){var c=l.data.replace(/[ \r\n\t]+/g," ");if(o&&!/ $/.test(o.data)||s||" "!==c[0]||(c=c.substr(1)),!c){l=f(l);continue}l.data=c,o=l}else{if(1!==l.nodeType){l=f(l);continue}r(l)||"BR"===l.nodeName?(o&&(o.data=o.data.replace(/ $/,"")),o=null,s=!1):n(l)||a(l)?(o=null,s=!0):o&&(s=!1)}var u=b(i,l,a);i=l,l=u}o&&(o.data=o.data.replace(/ $/,""),o.data||f(o))}}({element:r,isBlock:o,isVoid:i,isPre:t.preformattedCode?_:null}),r}function _(e){return"PRE"===e.nodeName||"CODE"===e.nodeName}function C(e,t){return e.isBlock=o(e),e.isCode="CODE"===e.nodeName||e.parentNode.isCode,e.isBlank=function(e){return!i(e)&&!function(e){return c(e,l)}(e)&&/^\s*$/i.test(e.textContent)&&!function(e){return u(e,s)}(e)&&!function(e){return u(e,l)}(e)}(e),e.flankingWhitespace=function(e,t){if(e.isBlock||t.preformattedCode&&e.isCode)return{leading:"",trailing:""};var r=(n=e.textContent,a=n.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/),{leading:a[1],leadingAscii:a[2],leadingNonAscii:a[3],trailing:a[4],trailingNonAscii:a[5],trailingAscii:a[6]});var n,a;r.leadingAscii&&j("left",e,t)&&(r.leading=r.leadingNonAscii);r.trailingAscii&&j("right",e,t)&&(r.trailing=r.trailingNonAscii);return{leading:r.leading,trailing:r.trailing}}(e,t),e}function j(e,t,r){var n,a,s;return"left"===e?(n=t.previousSibling,a=/ $/):(n=t.nextSibling,a=/^ /),n&&(3===n.nodeType?s=a.test(n.nodeValue):r.preformattedCode&&"CODE"===n.nodeName?s=!1:1!==n.nodeType||o(n)||(s=a.test(n.textContent))),s}var S=Array.prototype.reduce,x=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function P(e){if(!(this instanceof P))return new P(e);var t={rules:d,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:"  ",preformattedCode:!1,blankReplacement:function(e,t){return t.isBlock?"\n\n":""},keepReplacement:function(e,t){return t.isBlock?"\n\n"+t.outerHTML+"\n\n":t.outerHTML},defaultReplacement:function(e,t){return t.isBlock?"\n\n"+e+"\n\n":e}};this.options=function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n])}return e}({},t,e),this.rules=new m(this.options)}function T(e){var t=this;return S.call(e.childNodes,(function(e,r){var n="";return 3===(r=new C(r,t.options)).nodeType?n=r.isCode?r.nodeValue:t.escape(r.nodeValue):1===r.nodeType&&(n=N.call(t,r)),A(e,n)}),"")}function L(e){var t=this;return this.rules.forEach((function(r){"function"==typeof r.append&&(e=A(e,r.append(t.options)))})),e.replace(/^[\t\r\n]+/,"").replace(/[\t\r\n\s]+$/,"")}function N(e){var t=this.rules.forNode(e),r=T.call(this,e),n=e.flankingWhitespace;return(n.leading||n.trailing)&&(r=r.trim()),n.leading+t.replacement(r,e,this.options)+n.trailing}function A(e,t){var r=function(e){for(var t=e.length;t>0&&"\n"===e[t-1];)t--;return e.substring(0,t)}(e),n=t.replace(/^\n*/,""),a=Math.max(e.length-r.length,t.length-n.length);return r+"\n\n".substring(0,a)+n}P.prototype={turndown:function(e){if(!function(e){return null!=e&&("string"==typeof e||e.nodeType&&(1===e.nodeType||9===e.nodeType||11===e.nodeType))}(e))throw new TypeError(e+" is not a string, or an element/document/fragment node.");if(""===e)return"";var t=T.call(this,new w(e,this.options));return L.call(this,t)},use:function(e){if(Array.isArray(e))for(var t=0;t<e.length;t++)this.use(e[t]);else{if("function"!=typeof e)throw new TypeError("plugin must be a Function or an Array of Functions");e(this)}return this},addRule:function(e,t){return this.rules.add(e,t),this},keep:function(e){return this.rules.keep(e),this},remove:function(e){return this.rules.remove(e),this},escape:function(e){return x.reduce((function(e,t){return e.replace(t[0],t[1])}),e)}};const R=P},23427:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(75908),a=r(9106),o=r(85016),s=r(11662);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),e}var u=function(){function e(t){i(this,e),this._file=t,this.size=t.size}return c(e,[{key:"slice",value:function(e,t){if((0,o.Z)())return(0,s.Z)(this._file.slice(e,t));var r=this._file.slice(e,t);return Promise.resolve({value:r})}},{key:"close",value:function(){}}]),e}(),d=function(){function e(t,r){i(this,e),this._chunkSize=r,this._buffer=void 0,this._bufferOffset=0,this._reader=t,this._done=!1}return c(e,[{key:"slice",value:function(e,t){return e<this._bufferOffset?Promise.reject(new Error("Requested data is before the reader's current offset")):this._readUntilEnoughDataOrDone(e,t)}},{key:"_readUntilEnoughDataOrDone",value:function(e,t){var r=this,n=t<=this._bufferOffset+p(this._buffer);if(this._done||n){var a=this._getDataFromBuffer(e,t),o=null==a&&this._done;return Promise.resolve({value:a,done:o})}return this._reader.read().then((function(n){var a=n.value;return n.done?r._done=!0:void 0===r._buffer?r._buffer=a:r._buffer=function(e,t){if(e.concat)return e.concat(t);if(e instanceof Blob)return new Blob([e,t],{type:e.type});if(e.set){var r=new e.constructor(e.length+t.length);return r.set(e),r.set(t,e.length),r}throw new Error("Unknown data type")}(r._buffer,a),r._readUntilEnoughDataOrDone(e,t)}))}},{key:"_getDataFromBuffer",value:function(e,t){e>this._bufferOffset&&(this._buffer=this._buffer.slice(e-this._bufferOffset),this._bufferOffset=e);var r=0===p(this._buffer);return this._done&&r?null:this._buffer.slice(0,t-e)}},{key:"close",value:function(){this._reader.cancel&&this._reader.cancel()}}]),e}();function p(e){return void 0===e?0:void 0!==e.size?e.size:e.length}var m=function(){function e(){i(this,e)}return c(e,[{key:"openFile",value:function(e,t){return(0,n.Z)()&&e&&void 0!==e.uri?(0,a.Z)(e.uri).then((function(e){return new u(e)})).catch((function(e){throw new Error("tus: cannot fetch `file.uri` as Blob, make sure the uri is correct and accessible. ".concat(e))})):"function"==typeof e.slice&&void 0!==e.size?Promise.resolve(new u(e)):"function"==typeof e.read?(t=+t,isFinite(t)?Promise.resolve(new d(e,t)):Promise.reject(new Error("cannot create source for stream without a finite value for the `chunkSize` option"))):Promise.reject(new Error("source object may only be an instance of File, Blob, or Reader in this environment"))}}]),e}()},41264:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(75908);function a(e,t){return(0,n.Z)()?Promise.resolve(function(e,t){var r=e.exif?function(e){var t=0;if(0===e.length)return t;for(var r=0;r<e.length;r++){t=(t<<5)-t+e.charCodeAt(r),t&=t}return t}(JSON.stringify(e.exif)):"noexif";return["tus-rn",e.name||"noname",e.size||"nosize",r,t.endpoint].join("/")}(e,t)):Promise.resolve(["tus-br",e.name,e.type,e.size,e.lastModified,t.endpoint].join("-"))}},56940:(e,t,r)=>{"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),e}r.d(t,{Z:()=>s});var s=function(){function e(){n(this,e)}return o(e,[{key:"createRequest",value:function(e,t){return new i(e,t)}},{key:"getName",value:function(){return"XHRHttpStack"}}]),e}(),i=function(){function e(t,r){n(this,e),this._xhr=new XMLHttpRequest,this._xhr.open(t,r,!0),this._method=t,this._url=r,this._headers={}}return o(e,[{key:"getMethod",value:function(){return this._method}},{key:"getURL",value:function(){return this._url}},{key:"setHeader",value:function(e,t){this._xhr.setRequestHeader(e,t),this._headers[e]=t}},{key:"getHeader",value:function(e){return this._headers[e]}},{key:"setProgressHandler",value:function(e){"upload"in this._xhr&&(this._xhr.upload.onprogress=function(t){t.lengthComputable&&e(t.loaded)})}},{key:"send",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new Promise((function(r,n){e._xhr.onload=function(){r(new l(e._xhr))},e._xhr.onerror=function(e){n(e)},e._xhr.send(t)}))}},{key:"abort",value:function(){return this._xhr.abort(),Promise.resolve()}},{key:"getUnderlyingObject",value:function(){return this._xhr}}]),e}(),l=function(){function e(t){n(this,e),this._xhr=t}return o(e,[{key:"getStatus",value:function(){return this._xhr.status}},{key:"getHeader",value:function(e){return this._xhr.getResponseHeader(e)}},{key:"getBody",value:function(){return this._xhr.responseText}},{key:"getUnderlyingObject",value:function(){return this._xhr}}]),e}()},99537:(e,t,r)=>{"use strict";r.d(t,{gq:()=>v});var n=r(63620),a=r(85799),o=r(15866),s=r(56940),i=r(23427),l=r(41264);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d(e,t){return d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},d(e,t)}function p(e){return function(){var t,r=m(e);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()){var n=m(this).constructor;t=Reflect.construct(r,arguments,n)}else t=r.apply(this,arguments);return function(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,t)}}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){f(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var b=g({},n.Z.defaultOptions,{httpStack:new s.Z,fileReader:new i.Z,urlStorage:o.H?new o.n:new a.Z,fingerprint:l.Z}),v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(s,e);var t,r,a,o=p(s);function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),t=g({},b,{},t),o.call(this,e,t)}return t=s,a=[{key:"terminate",value:function(e,t,r){return t=g({},b,{},t),n.Z.terminate(e,t,r)}}],(r=null)&&u(t.prototype,r),a&&u(t,a),s}(n.Z),k=window,y=k.XMLHttpRequest,E=k.Blob;y&&E&&E.prototype.slice},85016:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(){return"undefined"!=typeof window&&(void 0!==window.PhoneGap||void 0!==window.Cordova||void 0!==window.cordova)}},75908:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(){return"undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase()}},11662:(e,t,r)=>{"use strict";function n(e){return new Promise((function(t,r){var n=new FileReader;n.onload=function(){var e=new Uint8Array(n.result);t({value:e})},n.onerror=function(e){r(e)},n.readAsArrayBuffer(e)}))}r.d(t,{Z:()=>n})},9106:(e,t,r)=>{"use strict";function n(e){return new Promise((function(t,r){var n=new XMLHttpRequest;n.responseType="blob",n.onload=function(){var e=n.response;t(e)},n.onerror=function(e){r(e)},n.open("GET",e),n.send()}))}r.d(t,{Z:()=>n})},15866:(e,t,r)=>{"use strict";function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}r.d(t,{H:()=>s,n:()=>i});var a=!1;try{a="localStorage"in window;var o="tusSupport";localStorage.setItem(o,localStorage.getItem(o))}catch(e){if(e.code!==e.SECURITY_ERR&&e.code!==e.QUOTA_EXCEEDED_ERR)throw e;a=!1}var s=a,i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,a;return t=e,r=[{key:"findAllUploads",value:function(){var e=this._findEntries("tus::");return Promise.resolve(e)}},{key:"findUploadsByFingerprint",value:function(e){var t=this._findEntries("tus::".concat(e,"::"));return Promise.resolve(t)}},{key:"removeUpload",value:function(e){return localStorage.removeItem(e),Promise.resolve()}},{key:"addUpload",value:function(e,t){var r=Math.round(1e12*Math.random()),n="tus::".concat(e,"::").concat(r);return localStorage.setItem(n,JSON.stringify(t)),Promise.resolve(n)}},{key:"_findEntries",value:function(e){for(var t=[],r=0;r<localStorage.length;r++){var n=localStorage.key(r);if(0===n.indexOf(e))try{var a=JSON.parse(localStorage.getItem(n));a.urlStorageKey=n,t.push(a)}catch(e){}}return t}}],r&&n(t.prototype,r),a&&n(t,a),e}()},56971:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function a(e){return function(){var t,r=c(e);if(i()){var a=c(this).constructor;t=Reflect.construct(r,arguments,a)}else t=r.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,t)}}function o(e){var t="function"==typeof Map?new Map:void 0;return o=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return s(e,arguments,c(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),l(n,e)},o(e)}function s(e,t,r){return s=i()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var a=new(Function.bind.apply(e,n));return r&&l(a,r.prototype),a},s.apply(null,arguments)}function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function l(e,t){return l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},l(e,t)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}r.d(t,{Z:()=>u});const u=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(r,e);var t=a(r);function r(e){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this,e)).originalRequest=o,n.originalResponse=s,n.causingError=a,null!=a&&(e+=", caused by ".concat(a.toString())),null!=o){var i=o.getHeader("X-Request-ID")||"n/a",l=o.getMethod(),c=o.getURL(),u=s?s.getStatus():"n/a",d=s?s.getBody()||"":"n/a";e+=", originated from request (method: ".concat(l,", url: ").concat(c,", response code: ").concat(u,", response text: ").concat(d,", request id: ").concat(i,")")}return n.message=e,n}return r}(o(Error))},51336:(e,t,r)=>{"use strict";r.d(t,{c:()=>a});var n=!1;function a(e){n&&console.log(e)}},85799:(e,t,r)=>{"use strict";function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}r.d(t,{Z:()=>a});var a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,a;return t=e,(r=[{key:"listAllUploads",value:function(){return Promise.resolve([])}},{key:"findUploadsByFingerprint",value:function(e){return Promise.resolve([])}},{key:"removeUpload",value:function(e){return Promise.resolve()}},{key:"addUpload",value:function(e,t){return Promise.resolve(null)}}])&&n(t.prototype,r),a&&n(t,a),e}()},63620:(e,t,r)=>{"use strict";r.d(t,{Z:()=>E});var n=r(84097),a=r(41294),o=r.n(a),s=r(56971),i=r(51336),l=r(98184);function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var m={endpoint:null,uploadUrl:null,metadata:{},fingerprint:null,uploadSize:null,onProgress:null,onChunkComplete:null,onSuccess:null,onError:null,_onUploadUrlAvailable:null,overridePatchMethod:!1,headers:{},addRequestId:!1,onBeforeRequest:null,onAfterResponse:null,onShouldRetry:null,chunkSize:1/0,retryDelays:[0,1e3,3e3,5e3],parallelUploads:1,storeFingerprintForResuming:!0,removeFingerprintOnSuccess:!1,uploadLengthDeferred:!1,uploadDataDuringCreation:!1,urlStorage:null,fileReader:null,httpStack:null},h=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"resume"in r&&console.log("tus: The `resume` option has been removed in tus-js-client v2. Please use the URL storage API instead."),this.options=r,this._urlStorage=this.options.urlStorage,this.file=t,this.url=null,this._req=null,this._fingerprint=null,this._urlStorageKey=null,this._offset=null,this._aborted=!1,this._size=null,this._source=null,this._retryAttempt=0,this._retryTimeout=null,this._offsetBeforeRetry=0,this._parallelUploads=null,this._parallelUploadUrls=null}var t,r,n;return t=e,r=[{key:"findPreviousUploads",value:function(){var e=this;return this.options.fingerprint(this.file,this.options).then((function(t){return e._urlStorage.findUploadsByFingerprint(t)}))}},{key:"resumeFromPreviousUpload",value:function(e){this.url=e.uploadUrl||null,this._parallelUploadUrls=e.parallelUploadUrls||null,this._urlStorageKey=e.urlStorageKey}},{key:"start",value:function(){var e=this,t=this.file;if(t)if(this.options.endpoint||this.options.uploadUrl){var r=this.options.retryDelays;null==r||"[object Array]"===Object.prototype.toString.call(r)?(this.options.parallelUploads>1&&["uploadUrl","uploadSize","uploadLengthDeferred"].forEach((function(t){e.options[t]&&e._emitError(new Error("tus: cannot use the ".concat(t," option when parallelUploads is enabled")))})),this.options.fingerprint(t,this.options).then((function(r){return null==r?(0,i.c)("No fingerprint was calculated meaning that the upload cannot be stored in the URL storage."):(0,i.c)("Calculated fingerprint: ".concat(r)),e._fingerprint=r,e._source?e._source:e.options.fileReader.openFile(t,e.options.chunkSize)})).then((function(t){e._source=t,e.options.parallelUploads>1||null!=e._parallelUploadUrls?e._startParallelUpload():e._startSingleUpload()})).catch((function(t){e._emitError(t)}))):this._emitError(new Error("tus: the `retryDelays` option must either be an array or null"))}else this._emitError(new Error("tus: neither an endpoint or an upload URL is provided"));else this._emitError(new Error("tus: no file or stream to upload provided"))}},{key:"_startParallelUpload",value:function(){var t=this,r=this._size=this._source.size,n=0;this._parallelUploads=[];var a=null!=this._parallelUploadUrls?this._parallelUploadUrls.length:this.options.parallelUploads,o=function(e,t,r){for(var n=Math.floor(e/t),a=[],o=0;o<t;o++)a.push({start:n*o,end:n*(o+1)});return a[t-1].end=e,r&&a.forEach((function(e,t){e.uploadUrl=r[t]||null})),a}(this._source.size,a,this._parallelUploadUrls);this._parallelUploadUrls=new Array(o.length);var s,l=o.map((function(a,s){var i=0;return t._source.slice(a.start,a.end).then((function(l){var c=l.value;return new Promise((function(l,d){var p=u({},t.options,{uploadUrl:a.uploadUrl||null,storeFingerprintForResuming:!1,removeFingerprintOnSuccess:!1,parallelUploads:1,metadata:{},headers:u({},t.options.headers,{"Upload-Concat":"partial"}),onSuccess:l,onError:d,onProgress:function(e){n=n-i+e,i=e,t._emitProgress(n,r)},_onUploadUrlAvailable:function(){t._parallelUploadUrls[s]=m.url,t._parallelUploadUrls.filter((function(e){return!!e})).length===o.length&&t._saveUploadInUrlStorage()}}),m=new e(c,p);m.start(),t._parallelUploads.push(m)}))}))}));Promise.all(l).then((function(){(s=t._openRequest("POST",t.options.endpoint)).setHeader("Upload-Concat","final;".concat(t._parallelUploadUrls.join(" ")));var e=g(t.options.metadata);return""!==e&&s.setHeader("Upload-Metadata",e),t._sendRequest(s,null)})).then((function(e){if(f(e.getStatus(),200)){var r=e.getHeader("Location");null!=r?(t.url=y(t.options.endpoint,r),(0,i.c)("Created upload at ".concat(t.url)),t._emitSuccess()):t._emitHttpError(s,e,"tus: invalid or missing Location header")}else t._emitHttpError(s,e,"tus: unexpected response while creating upload")})).catch((function(e){t._emitError(e)}))}},{key:"_startSingleUpload",value:function(){if(this.options.uploadLengthDeferred)this._size=null;else if(null!=this.options.uploadSize){if(this._size=+this.options.uploadSize,isNaN(this._size))return void this._emitError(new Error("tus: cannot convert `uploadSize` option into a number"))}else if(this._size=this._source.size,null==this._size)return void this._emitError(new Error("tus: cannot automatically derive upload's size from input and must be specified manually using the `uploadSize` option"));return this._aborted=!1,null!=this.url?((0,i.c)("Resuming upload from previous URL: ".concat(this.url)),void this._resumeUpload()):null!=this.options.uploadUrl?((0,i.c)("Resuming upload from provided URL: ".concat(this.options.url)),this.url=this.options.uploadUrl,void this._resumeUpload()):((0,i.c)("Creating a new upload"),void this._createUpload())}},{key:"abort",value:function(t){var r=this;if(arguments.length>1&&"function"==typeof arguments[1])throw new Error("tus: the abort function does not accept a callback since v2 anymore; please use the returned Promise instead");return null!=this._parallelUploads&&this._parallelUploads.forEach((function(e){e.abort(t)})),null!==this._req&&(this._req.abort(),this._source.close()),this._aborted=!0,null!=this._retryTimeout&&(clearTimeout(this._retryTimeout),this._retryTimeout=null),t&&null!=this.url?e.terminate(this.url,this.options).then((function(){return r._removeFromUrlStorage()})):Promise.resolve()}},{key:"_emitHttpError",value:function(e,t,r,n){this._emitError(new s.Z(r,n,e,t))}},{key:"_emitError",value:function(e){var t=this;if(!this._aborted){if(null!=this.options.retryDelays&&(null!=this._offset&&this._offset>this._offsetBeforeRetry&&(this._retryAttempt=0),k(e,this._retryAttempt,this.options))){var r=this.options.retryDelays[this._retryAttempt++];return this._offsetBeforeRetry=this._offset,void(this._retryTimeout=setTimeout((function(){t.start()}),r))}if("function"!=typeof this.options.onError)throw e;this.options.onError(e)}}},{key:"_emitSuccess",value:function(){this.options.removeFingerprintOnSuccess&&this._removeFromUrlStorage(),"function"==typeof this.options.onSuccess&&this.options.onSuccess()}},{key:"_emitProgress",value:function(e,t){"function"==typeof this.options.onProgress&&this.options.onProgress(e,t)}},{key:"_emitChunkComplete",value:function(e,t,r){"function"==typeof this.options.onChunkComplete&&this.options.onChunkComplete(e,t,r)}},{key:"_createUpload",value:function(){var e=this;if(this.options.endpoint){var t=this._openRequest("POST",this.options.endpoint);this.options.uploadLengthDeferred?t.setHeader("Upload-Defer-Length",1):t.setHeader("Upload-Length",this._size);var r,n=g(this.options.metadata);""!==n&&t.setHeader("Upload-Metadata",n),this.options.uploadDataDuringCreation&&!this.options.uploadLengthDeferred?(this._offset=0,r=this._addChunkToRequest(t)):r=this._sendRequest(t,null),r.then((function(r){if(f(r.getStatus(),200)){var n=r.getHeader("Location");if(null!=n){if(e.url=y(e.options.endpoint,n),(0,i.c)("Created upload at ".concat(e.url)),"function"==typeof e.options._onUploadUrlAvailable&&e.options._onUploadUrlAvailable(),0===e._size)return e._emitSuccess(),void e._source.close();e._saveUploadInUrlStorage(),e.options.uploadDataDuringCreation?e._handleUploadResponse(t,r):(e._offset=0,e._performUpload())}else e._emitHttpError(t,r,"tus: invalid or missing Location header")}else e._emitHttpError(t,r,"tus: unexpected response while creating upload")})).catch((function(r){e._emitHttpError(t,null,"tus: failed to create upload",r)}))}else this._emitError(new Error("tus: unable to create upload because no endpoint is provided"))}},{key:"_resumeUpload",value:function(){var e=this,t=this._openRequest("HEAD",this.url);this._sendRequest(t,null).then((function(r){var n=r.getStatus();if(!f(n,200))return f(n,400)&&e._removeFromUrlStorage(),423===n?void e._emitHttpError(t,r,"tus: upload is currently locked; retry later"):e.options.endpoint?(e.url=null,void e._createUpload()):void e._emitHttpError(t,r,"tus: unable to resume upload (new upload cannot be created without an endpoint)");var a=parseInt(r.getHeader("Upload-Offset"),10);if(isNaN(a))e._emitHttpError(t,r,"tus: invalid or missing offset value");else{var o=parseInt(r.getHeader("Upload-Length"),10);if(!isNaN(o)||e.options.uploadLengthDeferred){if("function"==typeof e.options._onUploadUrlAvailable&&e.options._onUploadUrlAvailable(),a===o)return e._emitProgress(o,o),void e._emitSuccess();e._offset=a,e._performUpload()}else e._emitHttpError(t,r,"tus: invalid or missing length value")}})).catch((function(r){e._emitHttpError(t,null,"tus: failed to resume upload",r)}))}},{key:"_performUpload",value:function(){var e,t=this;this._aborted||(this.options.overridePatchMethod?(e=this._openRequest("POST",this.url)).setHeader("X-HTTP-Method-Override","PATCH"):e=this._openRequest("PATCH",this.url),e.setHeader("Upload-Offset",this._offset),this._addChunkToRequest(e).then((function(r){f(r.getStatus(),200)?t._handleUploadResponse(e,r):t._emitHttpError(e,r,"tus: unexpected response while uploading chunk")})).catch((function(r){t._aborted||t._emitHttpError(e,null,"tus: failed to upload chunk at offset ".concat(t._offset),r)})))}},{key:"_addChunkToRequest",value:function(e){var t=this,r=this._offset,n=this._offset+this.options.chunkSize;return e.setProgressHandler((function(e){t._emitProgress(r+e,t._size)})),e.setHeader("Content-Type","application/offset+octet-stream"),(n===1/0||n>this._size)&&!this.options.uploadLengthDeferred&&(n=this._size),this._source.slice(r,n).then((function(r){var n=r.value,a=r.done;return t.options.uploadLengthDeferred&&a&&(t._size=t._offset+(n&&n.size?n.size:0),e.setHeader("Upload-Length",t._size)),null===n?t._sendRequest(e):(t._emitProgress(t._offset,t._size),t._sendRequest(e,n))}))}},{key:"_handleUploadResponse",value:function(e,t){var r=parseInt(t.getHeader("Upload-Offset"),10);if(isNaN(r))this._emitHttpError(e,t,"tus: invalid or missing offset value");else{if(this._emitProgress(r,this._size),this._emitChunkComplete(r-this._offset,r,this._size),this._offset=r,r==this._size)return this._emitSuccess(),void this._source.close();this._performUpload()}}},{key:"_openRequest",value:function(e,t){var r=b(e,t,this.options);return this._req=r,r}},{key:"_removeFromUrlStorage",value:function(){var e=this;this._urlStorageKey&&(this._urlStorage.removeUpload(this._urlStorageKey).catch((function(t){e._emitError(t)})),this._urlStorageKey=null)}},{key:"_saveUploadInUrlStorage",value:function(){var e=this;if(this.options.storeFingerprintForResuming&&this._fingerprint){var t={size:this._size,metadata:this.options.metadata,creationTime:(new Date).toString()};this._parallelUploads?t.parallelUploadUrls=this._parallelUploadUrls:t.uploadUrl=this.url,this._urlStorage.addUpload(this._fingerprint,t).then((function(t){return e._urlStorageKey=t})).catch((function(t){e._emitError(t)}))}}},{key:"_sendRequest",value:function(e){return v(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,this.options)}}],n=[{key:"terminate",value:function(t,r){if(arguments.length>1&&"function"==typeof arguments[arguments.length-1])throw new Error("tus: the terminate function does not accept a callback since v2 anymore; please use the returned Promise instead");void 0===r&&(r={});var n=b("DELETE",t,r);return v(n,null,r).then((function(e){if(204!==e.getStatus())throw new s.Z("tus: unexpected response while terminating upload",null,n,e)})).catch((function(a){if(a instanceof s.Z||(a=new s.Z("tus: failed to terminate upload",a,n,null)),!k(a,0,r))throw a;var o=r.retryDelays[0],i=r.retryDelays.slice(1),l=u({},r,{retryDelays:i});return new Promise((function(e){return setTimeout(e,o)})).then((function(){return e.terminate(t,l)}))}))}}],r&&p(t.prototype,r),n&&p(t,n),e}();function g(e){var t=[];for(var r in e)t.push("".concat(r," ").concat(n.Base64.encode(e[r])));return t.join(",")}function f(e,t){return e>=t&&e<t+100}function b(e,t,r){var n=r.httpStack.createRequest(e,t);n.setHeader("Tus-Resumable","1.0.0");var a=r.headers||{};for(var o in a)n.setHeader(o,a[o]);if(r.addRequestId){var s=(0,l.Z)();n.setHeader("X-Request-ID",s)}return n}function v(e,t,r){return("function"==typeof r.onBeforeRequest?Promise.resolve(r.onBeforeRequest(e)):Promise.resolve()).then((function(){return e.send(t).then((function(t){return("function"==typeof r.onAfterResponse?Promise.resolve(r.onAfterResponse(e,t)):Promise.resolve()).then((function(){return t}))}))}))}function k(e,t,r){if(null==r.retryDelays||t>=r.retryDelays.length||null==e.originalRequest)return!1;if(r&&"function"==typeof r.onShouldRetry)return r.onShouldRetry(e,t,r);var n,a=e.originalResponse?e.originalResponse.getStatus():0;return(!f(a,400)||409===a||423===a)&&(n=!0,"undefined"!=typeof window&&"navigator"in window&&!1===window.navigator.onLine&&(n=!1),n)}function y(e,t){return new(o())(t,e).toString()}h.defaultOptions=m;const E=h},98184:(e,t,r)=>{"use strict";function n(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}r.d(t,{Z:()=>n})},19590:e=>{e.exports=/[\0-\x1F\x7F-\x9F]/},20994:e=>{e.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},95162:e=>{e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},59939:e=>{e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},84353:(e,t,r)=>{"use strict";t.Any=r(44957),t.Cc=r(19590),t.Cf=r(20994),t.P=r(95162),t.Z=r(59939)},44957:e=>{e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},83078:(e,t,r)=>{"use strict";function n(e){return e.charAt(0).toUpperCase()+e.substr(1)}r.d(t,{l:()=>n})},48936:(e,t,r)=>{"use strict";r.d(t,{L:()=>n});function n(e){return e.toUpperCase()}},41294:(e,t,r)=>{"use strict";var n=r(82298),a=r(40142),o=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,s=/[\n\r\t]/g,i=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,l=/:\d+$/,c=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,u=/^[a-zA-Z]:/;function d(e){return(e||"").toString().replace(o,"")}var p=[["#","hash"],["?","query"],function(e,t){return g(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],m={hash:1,query:1};function h(e){var t,r=("undefined"!=typeof window||"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).location||{},n={},a=typeof(e=e||r);if("blob:"===e.protocol)n=new b(unescape(e.pathname),{});else if("string"===a)for(t in n=new b(e,{}),m)delete n[t];else if("object"===a){for(t in e)t in m||(n[t]=e[t]);void 0===n.slashes&&(n.slashes=i.test(e.href))}return n}function g(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function f(e,t){e=(e=d(e)).replace(s,""),t=t||{};var r,n=c.exec(e),a=n[1]?n[1].toLowerCase():"",o=!!n[2],i=!!n[3],l=0;return o?i?(r=n[2]+n[3]+n[4],l=n[2].length+n[3].length):(r=n[2]+n[4],l=n[2].length):i?(r=n[3]+n[4],l=n[3].length):r=n[4],"file:"===a?l>=2&&(r=r.slice(2)):g(a)?r=n[4]:a?o&&(r=r.slice(2)):l>=2&&g(t.protocol)&&(r=n[4]),{protocol:a,slashes:o||g(a),slashesCount:l,rest:r}}function b(e,t,r){if(e=(e=d(e)).replace(s,""),!(this instanceof b))return new b(e,t,r);var o,i,l,c,m,v,k=p.slice(),y=typeof t,E=this,w=0;for("object"!==y&&"string"!==y&&(r=t,t=null),r&&"function"!=typeof r&&(r=a.parse),o=!(i=f(e||"",t=h(t))).protocol&&!i.slashes,E.slashes=i.slashes||o&&t.slashes,E.protocol=i.protocol||t.protocol||"",e=i.rest,("file:"===i.protocol&&(2!==i.slashesCount||u.test(e))||!i.slashes&&(i.protocol||i.slashesCount<2||!g(E.protocol)))&&(k[3]=[/(.*)/,"pathname"]);w<k.length;w++)"function"!=typeof(c=k[w])?(l=c[0],v=c[1],l!=l?E[v]=e:"string"==typeof l?~(m="@"===l?e.lastIndexOf(l):e.indexOf(l))&&("number"==typeof c[2]?(E[v]=e.slice(0,m),e=e.slice(m+c[2])):(E[v]=e.slice(m),e=e.slice(0,m))):(m=l.exec(e))&&(E[v]=m[1],e=e.slice(0,m.index)),E[v]=E[v]||o&&c[3]&&t[v]||"",c[4]&&(E[v]=E[v].toLowerCase())):e=c(e,E);r&&(E.query=r(E.query)),o&&t.slashes&&"/"!==E.pathname.charAt(0)&&(""!==E.pathname||""!==t.pathname)&&(E.pathname=function(e,t){if(""===e)return t;for(var r=(t||"/").split("/").slice(0,-1).concat(e.split("/")),n=r.length,a=r[n-1],o=!1,s=0;n--;)"."===r[n]?r.splice(n,1):".."===r[n]?(r.splice(n,1),s++):s&&(0===n&&(o=!0),r.splice(n,1),s--);return o&&r.unshift(""),"."!==a&&".."!==a||r.push(""),r.join("/")}(E.pathname,t.pathname)),"/"!==E.pathname.charAt(0)&&g(E.protocol)&&(E.pathname="/"+E.pathname),n(E.port,E.protocol)||(E.host=E.hostname,E.port=""),E.username=E.password="",E.auth&&(~(m=E.auth.indexOf(":"))?(E.username=E.auth.slice(0,m),E.username=encodeURIComponent(decodeURIComponent(E.username)),E.password=E.auth.slice(m+1),E.password=encodeURIComponent(decodeURIComponent(E.password))):E.username=encodeURIComponent(decodeURIComponent(E.auth)),E.auth=E.password?E.username+":"+E.password:E.username),E.origin="file:"!==E.protocol&&g(E.protocol)&&E.host?E.protocol+"//"+E.host:"null",E.href=E.toString()}b.prototype={set:function(e,t,r){var o=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(r||a.parse)(t)),o[e]=t;break;case"port":o[e]=t,n(t,o.protocol)?t&&(o.host=o.hostname+":"+t):(o.host=o.hostname,o[e]="");break;case"hostname":o[e]=t,o.port&&(t+=":"+o.port),o.host=t;break;case"host":o[e]=t,l.test(t)?(t=t.split(":"),o.port=t.pop(),o.hostname=t.join(":")):(o.hostname=t,o.port="");break;case"protocol":o.protocol=t.toLowerCase(),o.slashes=!r;break;case"pathname":case"hash":if(t){var s="pathname"===e?"/":"#";o[e]=t.charAt(0)!==s?s+t:t}else o[e]=t;break;case"username":case"password":o[e]=encodeURIComponent(t);break;case"auth":var i=t.indexOf(":");~i?(o.username=t.slice(0,i),o.username=encodeURIComponent(decodeURIComponent(o.username)),o.password=t.slice(i+1),o.password=encodeURIComponent(decodeURIComponent(o.password))):o.username=encodeURIComponent(decodeURIComponent(t))}for(var c=0;c<p.length;c++){var u=p[c];u[4]&&(o[u[1]]=o[u[1]].toLowerCase())}return o.auth=o.password?o.username+":"+o.password:o.username,o.origin="file:"!==o.protocol&&g(o.protocol)&&o.host?o.protocol+"//"+o.host:"null",o.href=o.toString(),o},toString:function(e){e&&"function"==typeof e||(e=a.stringify);var t,r=this,n=r.host,o=r.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var s=o+(r.protocol&&r.slashes||g(r.protocol)?"//":"");return r.username?(s+=r.username,r.password&&(s+=":"+r.password),s+="@"):r.password?(s+=":"+r.password,s+="@"):"file:"!==r.protocol&&g(r.protocol)&&!n&&"/"!==r.pathname&&(s+="@"),(":"===n[n.length-1]||l.test(r.hostname)&&!r.port)&&(n+=":"),s+=n+r.pathname,(t="object"==typeof r.query?e(r.query):r.query)&&(s+="?"!==t.charAt(0)?"?"+t:t),r.hash&&(s+=r.hash),s}},b.extractProtocol=f,b.location=h,b.trimLeft=d,b.qs=a,e.exports=b},30253:(e,t,r)=>{"use strict";e.exports=r.p+"images/dois-66b3f018328e8f585646.jpg"},91948:(e,t,r)=>{"use strict";e.exports=r.p+"images/edge-e1adff73f2dc1c1dc64e.jpg"},5353:(e,t,r)=>{"use strict";e.exports=r.p+"images/fullscreen-21ca1ee2bafcb1c8eb55.jpg"},27956:(e,t,r)=>{"use strict";e.exports=r.p+"images/highway-205f94656e2fcc4aeb86.jpg"},19597:(e,t,r)=>{"use strict";e.exports=r.p+"images/avatar1-6287ee7ccb96c6112ed7.jpg"},65783:(e,t,r)=>{"use strict";e.exports=r.p+"images/avatar2-346c588dba138c82e44c.jpg"},43807:(e,t,r)=>{"use strict";e.exports=r.p+"images/avatar3-dce9c36819878a1bf60c.jpg"},8964:(e,t,r)=>{"use strict";e.exports=r.p+"images/eventbrite-in-page-example-c351ec80e4dd5d39433d.png"},90767:(e,t,r)=>{"use strict";e.exports=r.p+"images/img-example-after-d6db862c442c24ad1c63.png"},58632:(e,t,r)=>{"use strict";e.exports=r.p+"images/img-example-before-4592b4656108c1429614.png"},96406:(e,t,r)=>{"use strict";e.exports=r.p+"images/map-preview-97bda80ebb6981457630.jpg"},80469:(e,t,r)=>{"use strict";e.exports=r.p+"images/map-theme_black_and_white-b6ad81a7dd09d09fb34d.jpg"},7247:(e,t,r)=>{"use strict";e.exports=r.p+"images/map-theme_black_and_white_mapkit-50e9383d59f6ad6a44ed.jpg"},13925:(e,t,r)=>{"use strict";e.exports=r.p+"images/map-theme_default-b53ccdf170e5ac873ff0.jpg"},24873:(e,t,r)=>{"use strict";e.exports=r.p+"images/map-theme_default_mapkit-0ed10cab18f62edff74e.jpg"},25685:(e,t,r)=>{"use strict";e.exports=r.p+"images/map-theme_satellite-cc50c608e244f90d18dc.jpg"},81667:(e,t,r)=>{"use strict";e.exports=r.p+"images/map-theme_satellite_mapkit-6062205f7c3804fae12c.jpg"},15387:(e,t,r)=>{"use strict";e.exports=r.p+"images/map-theme_terrain-ac291441b3461820747d.jpg"},23879:(e,t,r)=>{"use strict";e.exports=r.p+"images/paypal-button-2x-62cd99bcc3acbd1ff504.png"},22323:(e,t,r)=>{"use strict";e.exports=r.p+"images/paypal-button-a51d6c3207b0a904edb7.png"},60206:(e,t,r)=>{"use strict";e.exports=r.p+"images/simple-payments_example-1-0273eeccd8d120df4984.jpg"},65784:(e,t,r)=>{"use strict";e.exports=r.p+"images/slideshow_example-1-07a3f164621235df0419.jpg"},6425:(e,t,r)=>{"use strict";e.exports=r.p+"images/slideshow_example-2-2ee401e47066229bdac5.jpg"},85983:(e,t,r)=>{"use strict";e.exports=r.p+"images/slideshow_example-3-0682afca66c485f17ff6.jpg"},15915:(e,t,r)=>{"use strict";e.exports=r.p+"images/story_example-1-716db2e4f5a074d302f7.png"},92770:(e,t,r)=>{"use strict";e.exports=r.p+"images/email-preview-illustration-dd7b9072ff61acd7f247.svg"},96606:(e,t,r)=>{"use strict";e.exports=r.p+"images/tiled-gallery_example-1-d2817eb0e669267ab3eb.jpg"},85472:(e,t,r)=>{"use strict";e.exports=r.p+"images/tiled-gallery_example-2-7d8f0cf8e262f0112691.jpg"},79009:(e,t,r)=>{"use strict";e.exports=r.p+"images/tiled-gallery_example-3-07a3f164621235df0419.jpg"},10742:(e,t,r)=>{"use strict";e.exports=r.p+"images/tiled-gallery_example-4-2ee401e47066229bdac5.jpg"},52642:(e,t,r)=>{"use strict";e.exports=r.p+"images/tiled-gallery_example-5-a1935fd9cf1181168d90.jpg"},41145:(e,t,r)=>{"use strict";e.exports=r.p+"images/tiled-gallery_example-6-9f9d39c6af0fb4b0d99c.jpg"},41194:(e,t,r)=>{"use strict";e.exports=r.p+"images/videopress-block-example-image-da9ef73787adca8896f2.jpg"},80405:(e,t,r)=>{"use strict";e.exports=r.p+"images/example_160x600-ccbc594f54431dafa70d.png"},72473:(e,t,r)=>{"use strict";e.exports=r.p+"images/example_300x250-5b93e8174f02d48c40b7.png"},38511:(e,t,r)=>{"use strict";e.exports=r.p+"images/example_320x50-7110edf045141630a222.png"},52203:(e,t,r)=>{"use strict";e.exports=r.p+"images/example_728x90-d9de384932330b92e1c3.png"},92787:e=>{"use strict";if(void 0==={consumer_slug:"jetpack"}){var t=new Error('Cannot find module \'{"consumer_slug":"jetpack"}\'');throw t.code="MODULE_NOT_FOUND",t}e.exports={consumer_slug:"jetpack"}},99196:e=>{"use strict";e.exports=window.React},91850:e=>{"use strict";e.exports=window.ReactDOM},92819:e=>{"use strict";e.exports=window.lodash},76292:e=>{"use strict";e.exports=window.moment},25158:e=>{"use strict";e.exports=window.wp.a11y},42998:e=>{"use strict";e.exports=window.wp.annotations},86989:e=>{"use strict";e.exports=window.wp.apiFetch},11313:e=>{"use strict";e.exports=window.wp.blob},52175:e=>{"use strict";e.exports=window.wp.blockEditor},65391:e=>{"use strict";e.exports=window.wp.blockSerializationDefaultParser},4981:e=>{"use strict";e.exports=window.wp.blocks},55609:e=>{"use strict";e.exports=window.wp.components},94333:e=>{"use strict";e.exports=window.wp.compose},37798:e=>{"use strict";e.exports=window.wp.coreData},9818:e=>{"use strict";e.exports=window.wp.data},69771:e=>{"use strict";e.exports=window.wp.date},47701:e=>{"use strict";e.exports=window.wp.domReady},72067:e=>{"use strict";e.exports=window.wp.editPost},12238:e=>{"use strict";e.exports=window.wp.editor},69307:e=>{"use strict";e.exports=window.wp.element},81975:e=>{"use strict";e.exports=window.wp.escapeHtml},92694:e=>{"use strict";e.exports=window.wp.hooks},22629:e=>{"use strict";e.exports=window.wp.htmlEntities},65736:e=>{"use strict";e.exports=window.wp.i18n},39630:e=>{"use strict";e.exports=window.wp.keycodes},53961:e=>{"use strict";e.exports=window.wp.notices},98817:e=>{"use strict";e.exports=window.wp.plugins},70444:e=>{"use strict";e.exports=window.wp.primitives},72629:e=>{"use strict";e.exports=window.wp.richText},29512:e=>{"use strict";e.exports=window.wp.tokenList},96483:e=>{"use strict";e.exports=window.wp.url},90162:e=>{"use strict";e.exports=window.wp.viewport},6551:e=>{"use strict";e.exports=window.wp.widgets},90017:(e,t,r)=>{var n=r(96930);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},82674:e=>{function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(this,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},25877:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},45061:(e,t,r)=>{var n=r(73522).default;e.exports=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==n(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},96930:(e,t,r)=>{var n=r(73522).default,a=r(45061);e.exports=function(e){var t=a(e,"string");return"symbol"===n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},73522:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},96524:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n={};function a(e){return[e]}function o(e,t,r){var n;if(e.length!==t.length)return!1;for(n=r;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function s(e,t){var r,s=t||a;function i(){r=new WeakMap}function l(){var t,a,i,l,c,u=arguments.length;for(l=new Array(u),i=0;i<u;i++)l[i]=arguments[i];for(t=function(e){var t,a,o,s,i,l=r,c=!0;for(t=0;t<e.length;t++){if(!(i=a=e[t])||"object"!=typeof i){c=!1;break}l.has(a)?l=l.get(a):(o=new WeakMap,l.set(a,o),l=o)}return l.has(n)||((s=function(){var e={clear:function(){e.head=null}};return e}()).isUniqueByDependants=c,l.set(n,s)),l.get(n)}(c=s.apply(null,l)),t.isUniqueByDependants||(t.lastDependants&&!o(c,t.lastDependants,0)&&t.clear(),t.lastDependants=c),a=t.head;a;){if(o(a.args,l,1))return a!==t.head&&(a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=t.head,a.prev=null,t.head.prev=a,t.head=a),a.val;a=a.next}return a={val:e.apply(null,l)},l[0]=null,a.args=l,t.head&&(t.head.prev=a,a.next=t.head),t.head=a,a.val}return l.getDependants=s,l.clear=i,i(),l}},80550:e=>{"use strict";e.exports=JSON.parse('{"O":{"White":"#fff","Black":"#000","Gray":"#646970","Gray 0":"#f6f7f7","Gray 5":"#dcdcde","Gray 10":"#c3c4c7","Gray 20":"#a7aaad","Gray 30":"#8c8f94","Gray 40":"#787c82","Gray 50":"#646970","Gray 60":"#50575e","Gray 70":"#3c434a","Gray 80":"#2c3338","Gray 90":"#1d2327","Gray 100":"#101517","Blue":"#0675c4","Blue 0":"#e9f0f5","Blue 5":"#bbe0fa","Blue 10":"#91caf2","Blue 20":"#68b3e8","Blue 30":"#399ce3","Blue 40":"#1689db","Blue 50":"#0675c4","Blue 60":"#055d9c","Blue 70":"#044b7a","Blue 80":"#02395c","Blue 90":"#01283d","Blue 100":"#001621","Purple":"#984a9c","Purple 0":"#f2e9ed","Purple 5":"#ebcee0","Purple 10":"#e3afd5","Purple 20":"#d48fc8","Purple 30":"#c475bd","Purple 40":"#b35eb1","Purple 50":"#984a9c","Purple 60":"#7c3982","Purple 70":"#662c6e","Purple 80":"#4d2054","Purple 90":"#35163b","Purple 100":"#1e0c21","Pink":"#c9356e","Pink 0":"#f5e9ed","Pink 5":"#f2ceda","Pink 10":"#f7a8c3","Pink 20":"#f283aa","Pink 30":"#eb6594","Pink 40":"#e34c84","Pink 50":"#c9356e","Pink 60":"#ab235a","Pink 70":"#8c1749","Pink 80":"#700f3b","Pink 90":"#4f092a","Pink 100":"#260415","Red":"#d63638","Red 0":"#f7ebec","Red 5":"#facfd2","Red 10":"#ffabaf","Red 20":"#ff8085","Red 30":"#f86368","Red 40":"#e65054","Red 50":"#d63638","Red 60":"#b32d2e","Red 70":"#8a2424","Red 80":"#691c1c","Red 90":"#451313","Red 100":"#240a0a","Orange":"#b26200","Orange 0":"#f5ece6","Orange 5":"#f7dcc6","Orange 10":"#ffbf86","Orange 20":"#faa754","Orange 30":"#e68b28","Orange 40":"#d67709","Orange 50":"#b26200","Orange 60":"#8a4d00","Orange 70":"#704000","Orange 80":"#543100","Orange 90":"#361f00","Orange 100":"#1f1200","Yellow":"#9d6e00","Yellow 0":"#f5f1e1","Yellow 5":"#f5e6b3","Yellow 10":"#f2d76b","Yellow 20":"#f0c930","Yellow 30":"#deb100","Yellow 40":"#c08c00","Yellow 50":"#9d6e00","Yellow 60":"#7d5600","Yellow 70":"#674600","Yellow 80":"#4f3500","Yellow 90":"#320","Yellow 100":"#1c1300","Green":"#008a20","Green 0":"#e6f2e8","Green 5":"#b8e6bf","Green 10":"#68de86","Green 20":"#1ed15a","Green 30":"#00ba37","Green 40":"#00a32a","Green 50":"#008a20","Green 60":"#007017","Green 70":"#005c12","Green 80":"#00450c","Green 90":"#003008","Green 100":"#001c05","Celadon":"#008763","Celadon 0":"#e4f2ed","Celadon 5":"#a7e8d3","Celadon 10":"#66deb9","Celadon 20":"#31cc9f","Celadon 30":"#09b585","Celadon 40":"#009e73","Celadon 50":"#008763","Celadon 60":"#007053","Celadon 70":"#005c44","Celadon 80":"#004533","Celadon 90":"#003024","Celadon 100":"#001c15","WordPress Blue":"#006088","WordPress Blue 0":"#e6f1f5","WordPress Blue 5":"#bedae6","WordPress Blue 10":"#98c6d9","WordPress Blue 20":"#6ab3d0","WordPress Blue 30":"#3895ba","WordPress Blue 40":"#187aa2","WordPress Blue 50":"#006088","WordPress Blue 60":"#004e6e","WordPress Blue 70":"#003c56","WordPress Blue 80":"#002c40","WordPress Blue 90":"#001d2d","WordPress Blue 100":"#00101c","Simplenote Blue":"#3361cc","Simplenote Blue 0":"#e9ecf5","Simplenote Blue 5":"#ced9f2","Simplenote Blue 10":"#abc1f5","Simplenote Blue 20":"#84a4f0","Simplenote Blue 30":"#618df2","Simplenote Blue 40":"#4678eb","Simplenote Blue 50":"#3361cc","Simplenote Blue 60":"#1d4fc4","Simplenote Blue 70":"#113ead","Simplenote Blue 80":"#0d2f85","Simplenote Blue 90":"#09205c","Simplenote Blue 100":"#05102e","WooCommerce Purple":"#7f54b3","WooCommerce Purple 0":"#f7edf7","WooCommerce Purple 5":"#e5cfe8","WooCommerce Purple 10":"#d6b4e0","WooCommerce Purple 20":"#c792e0","WooCommerce Purple 30":"#af7dd1","WooCommerce Purple 40":"#9a69c7","WooCommerce Purple 50":"#7f54b3","WooCommerce Purple 60":"#674399","WooCommerce Purple 70":"#533582","WooCommerce Purple 80":"#3c2861","WooCommerce Purple 90":"#271b3d","WooCommerce Purple 100":"#140e1f","Jetpack Green":"#069e08","Jetpack Green 0":"#f0f2eb","Jetpack Green 5":"#d0e6b8","Jetpack Green 10":"#9dd977","Jetpack Green 20":"#64ca43","Jetpack Green 30":"#2fb41f","Jetpack Green 40":"#069e08","Jetpack Green 50":"#008710","Jetpack Green 60":"#007117","Jetpack Green 70":"#005b18","Jetpack Green 80":"#004515","Jetpack Green 90":"#003010","Jetpack Green 100":"#001c09"}}')},84321:e=>{"use strict";e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"⁡","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"⁡","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"⁣","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"⁣","InvisibleTimes":"⁢","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"⁢","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"‎","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"​","NegativeThickSpace":"​","NegativeThinSpace":"​","NegativeVeryThinSpace":"​","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"⁠","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"‏","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"­","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":"  ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"​","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"‍","zwnj":"‌"}')},45388:e=>{"use strict";e.exports=JSON.parse('[{"id":"mapbox-gl-js","file":"node_modules/mapbox-gl/dist/mapbox-gl.js","version":"1.13.0"},{"id":"mapbox-gl-css","file":"node_modules/mapbox-gl/dist/mapbox-gl.css","version":"1.13.0"}]')},1949:e=>{"use strict";e.exports=JSON.parse('{"production":["ai-assistant","ai-assistant-plugin","blogging-prompt","business-hours","button","calendly","cookie-consent","contact-form","contact-form/salesforce-lead-form","contact-info","donations","eventbrite","gathering-tweetstorms","gif","google-calendar","image-compare","instagram-gallery","likes","mailchimp","map","markdown","opentable","payments","pinterest","podcast-player","premium-content","publicize","rating-star","recurring-payments","related-posts","repeat-visitor","send-a-message","whatsapp-button","seo","sharing","shortlinks","simple-payments","slideshow","social-previews","story","subscriptions","tiled-gallery","tock","videopress","wordads","payments-intro","post-publish-qr-post-panel","payment-buttons","site-editor-snackbars","videopress/video","ai-assistant-support","ai-assistant-form-support"],"beta":["ai-chat","amazon","author-recommendation","google-docs-embed","launchpad-save-modal","recipe","v6-video-frame-poster","videopress/video-chapters","paywall"],"experimental":["ai-image","ai-paragraph"],"no-post-editor":["ai-assistant","business-hours","button","calendly","contact-form","contact-info","donations","eventbrite","gif","google-calendar","instagram-gallery","mailchimp","map","markdown","opentable","pinterest","rating-star","related-posts","repeat-visitor","simple-payments","slideshow","tiled-gallery","tock","videopress","wordads"]}')}},i={};function l(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return s[e].call(r.exports,r,r.exports,l),r.exports}l.m=s,l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,l.t=function(r,n){if(1&n&&(r=this(r)),8&n)return r;if("object"==typeof r&&r){if(4&n&&r.__esModule)return r;if(16&n&&"function"==typeof r.then)return r}var a=Object.create(null);l.r(a);var o={};e=e||[null,t({}),t([]),t(t)];for(var s=2&n&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>o[e]=()=>r[e]));return o.default=()=>r,l.d(a,o),a},l.d=(e,t)=>{for(var r in t)l.o(t,r)&&!l.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},l.f={},l.e=e=>Promise.all(Object.keys(l.f).reduce(((t,r)=>(l.f[r](e,t),t)),[])),l.u=e=>(390===e?"swiper":e)+".js?minify=false&ver="+{147:"9a578026928393378530",390:"50369ed7d9a1019cde5e"}[e],l.miniCssF=e=>"swiper.css?minify=false&ver=250f2a70eef2093db46f",(()=>{if(!l.miniCssF)throw new Error("MiniCSSWithRTLPlugin was loaded before MiniCSSExtractPlugin");var e;l.miniCssF=(e=l.miniCssF,t=>{var r="rtl"===document.dir,n=e(t);return r?n.replace(/\.css(?:$|\?)/,".rtl$&"):n})})(),l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},n="Jetpack:",l.l=(e,t,a,o)=>{if(r[e])r[e].push(t);else{var s,i;if(void 0!==a)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==n+a){s=d;break}}s||(i=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,l.nc&&s.setAttribute("nonce",l.nc),s.setAttribute("data-webpack",n+a),s.src=e),r[e]=[t];var p=(t,n)=>{s.onerror=s.onload=null,clearTimeout(m);var a=r[e];if(delete r[e],s.parentNode&&s.parentNode.removeChild(s),a&&a.forEach((e=>e(n))),t)return t(n)},m=setTimeout(p.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=p.bind(null,s.onerror),s.onload=p.bind(null,s.onload),i&&document.head.appendChild(s)}},l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;l.g.importScripts&&(e=l.g.location+"");var t=l.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");r.length&&(e=r[r.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),l.p=e})(),a=e=>new Promise(((t,r)=>{var n=l.miniCssF(e),a=l.p+n;if(((e,t)=>{for(var r=document.getElementsByTagName("link"),n=0;n<r.length;n++){var a=(s=r[n]).getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(a===e||a===t))return s}var o=document.getElementsByTagName("style");for(n=0;n<o.length;n++){var s;if((a=(s=o[n]).getAttribute("data-href"))===e||a===t)return s}})(n,a))return t();((e,t,r,n)=>{var a=document.createElement("link");a.rel="stylesheet",a.type="text/css",a.onerror=a.onload=o=>{if(a.onerror=a.onload=null,"load"===o.type)r();else{var s=o&&("load"===o.type?"missing":o.type),i=o&&o.target&&o.target.href||t,l=new Error("Loading CSS chunk "+e+" failed.\n("+i+")");l.code="CSS_CHUNK_LOAD_FAILED",l.type=s,l.request=i,a.parentNode.removeChild(a),n(l)}},a.href=t,document.head.appendChild(a)})(e,a,t,r)})),o={189:0,486:0},l.f.miniCss=(e,t)=>{o[e]?t.push(o[e]):0!==o[e]&&{390:1}[e]&&t.push(o[e]=a(e).then((()=>{o[e]=0}),(t=>{throw delete o[e],t})))},(()=>{var e={189:0,486:0};l.f.j=(t,r)=>{var n=l.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else if(390!=t){var a=new Promise(((r,a)=>n=e[t]=[r,a]));r.push(n[2]=a);var o=l.p+l.u(t),s=new Error;l.l(o,(r=>{if(l.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var a=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+a+": "+o+")",s.name="ChunkLoadError",s.type=a,s.request=o,n[1](s)}}),"chunk-"+t,t)}else e[t]=0};var t=(t,r)=>{var n,a,o=r[0],s=r[1],i=r[2],c=0;if(o.some((t=>0!==e[t]))){for(n in s)l.o(s,n)&&(l.m[n]=s[n]);if(i)i(l)}for(t&&t(r);c<o.length;c++)a=o[c],l.o(e,a)&&e[a]&&e[a][0](),e[a]=0},r=self.webpackChunkJetpack=self.webpackChunkJetpack||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),l(78680),l(27559),l(44359),l(35681),l(60866),l(48887),l(52020),l(54271),l(82566),l(67140),l(83772),l(56071),l(63139),l(58710),l(93052),l(34575),l(57158),l(61204),l(22055),l(49702),l(92482),l(96564),l(7414),l(28345),l(85053),l(55802),l(36836),l(94315),l(89517),l(50323),l(23346),l(86254),l(27425),l(14406),l(36227),l(17013),l(91403),l(88067),l(57780),l(47158),l(14035),l(37549),l(3432),l(5477),l(71664),l(27780);l(21964)})();