PK qhYJFF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/trave494/tiktechtok.org/wp-content/plugins/jetpack/_inc/blocks/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : //home/trave494/tiktechtok.org/wp-content/plugins/jetpack/_inc/blocks/editor-no-post-editor.js

/*! For license information please see editor-no-post-editor.js.LICENSE.txt */
(()=>{var e,t,r,n,a,s,o={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 s="text/event-stream",o=1e3,i="last-event-id";function l(e,t){var{signal:r,headers:l,onopen:u,onmessage:p,onclose:d,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||S()}b.accept||(b.accept=s),h||document.addEventListener("visibilitychange",k);let y=o,w=0;function E(){document.removeEventListener("visibilitychange",k),window.clearTimeout(w),v.abort()}null==r||r.addEventListener("abort",(()=>{E(),t()}));const _=null!=g?g:window.fetch,C=null!=u?u:c;async function S(){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}),p))),null==d||d(),E(),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(w),w=window.setTimeout(S,t)}catch(e){E(),a(e)}}}S()}))}function c(e){const t=e.headers.get("content-type");if(!(null==t?void 0:t.startsWith(s)))throw new Error(`Expected content-type to be ${s}, 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(s){void 0===t?(t=s,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,s);const o=t.length;let i=0;for(;r<o;){a&&(10===t[r]&&(i=++r),a=!1);let s=-1;for(;r<o&&-1===s;++r)switch(t[r]){case 58:-1===n&&(n=r-i);break;case 13:a=!0;case 10:s=r}if(-1===s)break;e(t.subarray(i,s),n),i=r,n=-1}i===o?t=void 0:0!==i&&(t=t.subarray(i),r-=i)}}function s(e,t,r){let n=o();const a=new TextDecoder;return function(s,i){if(0===s.length)null==r||r(n),n=o();else if(i>0){const r=a.decode(s.subarray(0,i)),o=i+(32===s[i+1]?2:1),l=a.decode(s.subarray(o));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 o(){return{data:"",event:"",id:"",retry:void 0}}r.d(t,{Pw:()=>n,UM:()=>a,_U:()=>s})},84788:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(2378);let a,s,o,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 p(e){const t=function(){const e=l.exec(a);if(null===e)return["no-more-tokens"];const t=e.index,[r,n,s,o]=e,i=r.length;if(o)return["self-closed",s,t,i];if(n)return["closer",s,t,i];return["opener",s,t,i]}(),[r,u,p,h]=t,g=i.length,f=p>s?s:null;if(!e[u])return d(),!1;switch(r){case"no-more-tokens":if(0!==g){const{leadingTextStart:e,tokenStart:t}=i.pop();o.push(a.substr(e,t))}return d(),!1;case"self-closed":return 0===g?(null!==f&&o.push(a.substr(f,p-f)),o.push(e[u]),s=p+h,!0):(m(c(e[u],p,h)),s=p+h,!0);case"opener":return i.push(c(e[u],p,h,p+h,f)),s=p+h,!0;case"closer":if(1===g)return function(e){const{element:t,leadingTextStart:r,prevOffset:s,tokenStart:l,children:c}=i.pop(),u=e?a.substr(s,e-s):a.substr(s);u&&c.push(u);null!==r&&o.push(a.substr(r,l-r));o.push((0,n.cloneElement)(t,null,...c))}(p),s=p+h,!0;const t=i.pop(),r=a.substr(t.prevOffset,p-t.prevOffset);t.children.push(r),t.prevOffset=p+h;const l=c(t.element,t.tokenStart,t.tokenLength,p+h);return l.children=t.children,m(l),s=p+h,!0;default:return d(),!1}}function d(){const e=a.length-s;0!==e&&o.push(a.substr(s,e))}function m(e){const{element:t,tokenStart:r,tokenLength:s,prevOffset:o,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=o||r+s}var h=(e,t)=>{if(a=e,s=0,o=[],i=[],l.lastIndex=0,!u(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are React Elements");do{}while(p(t));return(0,n.createElement)(n.Fragment,null,...o)};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 p.default}}),Object.defineProperty(t,"createInterpolateElement",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"renderToString",{enumerable:!0,get:function(){return u.default}});var s=n(r(84788)),o=r(2378);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[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)),p=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,"PureComponent",{enumerable:!0,get:function(){return n.PureComponent}}),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,...s}=e.props;return(0,n.createElement)(t,{key:r,...s},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=P,t.renderComponent=L,t.renderElement=x,t.renderNativeComponent=j,t.renderStyle=T;var a=r(62313),s=r(28132),o=r(81975),i=r(2378),l=n(r(74745));const{Provider:c,Consumer:u}=(0,i.createContext)(void 0),p=(0,i.forwardRef)((()=>null)),d=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?T(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)),{}),w=["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)),{}),E=["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 w[t]?w[t]:y[t]?(0,s.paramCase)(y[t]):E[t]?E[t]:t}function C(e){return e.startsWith("--")?e:b(e,["ms","O","Moz","Webkit"])?"-"+(0,s.paramCase)(e):(0,s.paramCase)(e)}function S(e,t){return"number"!=typeof t||0===t||f.has(e)?t:t+"px"}function x(e,t,r={}){if(null==e||!1===e)return"";if(Array.isArray(e))return A(e,t,r);switch(typeof e){case"string":return(0,o.escapeHTML)(e);case"number":return e.toString()}const{type:n,props:a}=e;switch(n){case i.StrictMode:case i.Fragment:return A(a.children,t,r);case l.default:const{children:e,...n}=a;return j(Object.keys(n).length?"div":null,{...n,dangerouslySetInnerHTML:{__html:e}},t,r)}switch(typeof n){case"string":return j(n,a,t,r);case"function":return n.prototype&&"function"==typeof n.prototype.render?L(n,a,t,r):x(n(a,r),t,r)}switch(n&&n.$$typeof){case c.$$typeof:return A(a.children,a.value,r);case u.$$typeof:return x(a.children(t||n._currentValue),t,r);case p.$$typeof:return x(n.render(a),t,r)}return""}function j(e,t,r,n={}){let a="";if("textarea"===e&&t.hasOwnProperty("value")){a=A(t.value,r,n);const{value:e,...s}=t;t=s}else t.dangerouslySetInnerHTML&&"string"==typeof t.dangerouslySetInnerHTML.__html?a=t.dangerouslySetInnerHTML.__html:void 0!==t.children&&(a=A(t.children,r,n));if(!e)return a;const s=P(t);return m.has(e)?"<"+e+s+"/>":"<"+e+s+">"+a+"</"+e+">"}function L(e,t,r,n={}){const a=new e(t,n);"function"==typeof a.getChildContext&&Object.assign(n,a.getChildContext());return x(a.render(),r,n)}function A(e,t,r={}){let n="";e=Array.isArray(e)?e:[e];for(let a=0;a<e.length;a++){n+=x(e[a],t,r)}return n}function P(e){let t="";for(const r in e){const n=_(r);if(!(0,o.isValidAttributeName)(n))continue;let a=k(r,e[r]);if(!d.has(typeof a))continue;if(v(r))continue;const s=h.has(n);if(s&&!1===a)continue;const i=s||b(r,["data-","aria-"])||g.has(n);("boolean"!=typeof a||i)&&(t+=" "+n,s||("string"==typeof a&&(a=(0,o.escapeAttribute)(a)),t+='="'+a+'"'))}return t}function T(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)+":"+S(r,n)}return t}var N=x;t.default=N},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=(0,n.forwardRef)((function({icon:e,size:t=24,...r},a){return(0,n.cloneElement)(e,{width:t,height:t,...r,ref:a})}))},90986:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(99196),a=r(70444);const s=(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"}))},23435:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(99196),a=r(70444);const s=(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:()=>s});var n=r(99196),a=r(70444);const s=(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:()=>s});var n=r(99196),a=r(70444);const s=(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:()=>s});var n=r(99196),a=r(70444);const s=(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"}))},43618:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(99196),a=r(70444);const s=(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:()=>s});var n=r(99196),a=r(70444);const s=(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:()=>s});var n=r(99196),a=r(70444);const s=(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:()=>s});var n=r(99196),a=r(70444);const s=(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"}))},20843:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(99196),a=r(70444);const s=(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:()=>s});var n=r(99196),a=r(70444);const s=(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:()=>s});var n=r(99196),a=r(70444);const s=(0,n.createElement)(a.SVG,{xmlns:"http://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:()=>s});var n=r(99196),a=r(70444);const s=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M8.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H4v-3h4.001ZM4 20h9v-1.5H4V20Zm16-4H4v-1.5h16V16ZM13.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H9v-3h4.001Z"}))},3639:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(99196),a=r(70444);const s=(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"}))},34394:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(99196),a=r(70444);const s=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{d:"M7 7.2h8.2L13.5 9l1.1 1.1 3.6-3.6-3.5-4-1.1 1 1.9 2.3H7c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.2-.5zm13.8 4V11h-1.5v.3c0 1.1 0 3.5-1 4.5-.3.3-.7.5-1.3.5H8.8l1.7-1.7-1.1-1.1L5.9 17l3.5 4 1.1-1-1.9-2.3H17c.9 0 1.7-.3 2.3-.9 1.5-1.4 1.5-4.2 1.5-5.6z"}))},586:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(99196),a=r(70444);const s=(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:()=>s});var n=r(99196),a=r(70444);const s=(0,n.createElement)(a.SVG,{xmlns:"http://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"}))},78270:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(99196),a=r(70444);const s=(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(a.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"}))},48381:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(99196),a=r(70444);const s=(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:()=>s});var n=r(99196),a=r(70444);const s=(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:()=>s});var n=r(99196),a=r(70444);const s=(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:()=>o,Ti:()=>s,eV:()=>i});var n=r(38697),a=r(72867);function s(e,t){return 0===t?e.toLowerCase():(0,a.By)(e,t)}function o(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:s},t))}},81338:(e,t,r)=>{"use strict";r.d(t,{I:()=>i,w:()=>o});var n=r(38697),a=r(68308),s=r(83078);function o(e){return(0,s.l)(e.toLowerCase())}function i(e,t){return void 0===t&&(t={}),(0,a.B)(e,(0,n.pi)({delimiter:" ",transform:o},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:()=>s.c,dotCase:()=>o.$,headerCase:()=>i.e,noCase:()=>l.B,paramCase:()=>c.o,pascalCase:()=>u.Ho,pascalCaseTransform:()=>u.By,pascalCaseTransformMerge:()=>u.Pv,pathCase:()=>p.Y,sentenceCase:()=>d.G,sentenceCaseTransform:()=>d.a,snakeCase:()=>m.f});var n=r(59823),a=r(81338),s=r(56233),o=r(77352),i=r(20025),l=r(68308),c=r(76854),u=r(72867),p=r(76559),d=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 s=typeof a;"string"===s?function(e,t){for(var r=t.split(n),a=r.length,s=0;s<a;++s)e[r[s]]=!0}(e,a):Array.isArray(a)?t(e,a):"object"===s?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"===s&&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 s=new e;t(s,n);var o=[];for(var i in s)s[i]&&o.push(i);return o.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 s=typeof r;if("string"===s||"number"===s)e.push(r);else if(Array.isArray(r)){if(r.length){var o=a.apply(null,r);o&&e.push(o)}}else if("object"===s){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:()=>o});var n=r(38697),a=r(68308),s=r(48936);function o(e,t){return void 0===t&&(t={}),(0,a.B)(e,(0,n.pi)({delimiter:"_",transform:s.L},t))}},94273:e=>{!function(){"use strict";var t=[],r=3988292384;function n(e){var t,n,a,s,o=-1;for(t=0,a=e.length;t<a;t+=1){for(s=255&(o^e[t]),n=0;n<8;n+=1)1==(1&s)?s=s>>>1^r:s>>>=1;o=o>>>8^s}return-1^o}function a(e,r){var n,s,o;if(void 0!==a.crc&&r&&e||(a.crc=-1,e)){for(n=a.crc,s=0,o=e.length;s<o;s+=1)n=n>>>8^t[255&(n^e[s])];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,{$:()=>s});var n=r(38697),a=r(68308);function s(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 s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(r,n){function a(r){e.removeListener(t,s),n(r)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",a),r([].slice.call(arguments))}g(e,t,s,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&g(e,"error",t,r)}(e,a,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=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?s.defaultMaxListeners:e._maxListeners}function c(e,t,r,n){var a,s,o,c;if(i(r),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),o=s[t]),void 0===o)o=s[t]=r,++e._eventsCount;else if("function"==typeof o?o=s[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(a=l(e))>0&&o.length>a&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=o.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 p(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 d(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(s){n.once&&e.removeEventListener(t,a),r(s)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o},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+".");o=e}}),s.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},s.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},s.prototype.getMaxListeners=function(){return l(this)},s.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var a="error"===e,s=this._events;if(void 0!==s)a=a&&void 0===s.error;else if(!a)return!1;if(a){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var i=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw i.context=o,i}var l=s[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},s.prototype.addListener=function(e,t){return c(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return c(this,e,t,!0)},s.prototype.once=function(e,t){return i(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return i(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var r,n,a,s,o;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,s=r.length-1;s>=0;s--)if(r[s]===t||r[s].listener===t){o=r[s].listener,a=s;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,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.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,s=Object.keys(r);for(n=0;n<s.length;++n)"removeListener"!==(a=s[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},s.prototype.listeners=function(e){return d(this,e,!0)},s.prototype.rawListeners=function(e){return d(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.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 s,o,i,l,c,u,p,d,m,h,g,f,b,v,k,y,w,E,_,C,S,x=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},j=[],L=0;if(isNaN(a))throw new TypeError("Invalid number");if(i=!0===x.bits,k=!0===x.unix,f=!0===x.pad,o=x.base||10,b=void 0!==x.round?x.round:k?1:2,p=void 0!==x.locale?x.locale:"",d=x.localeOptions||{},y=void 0!==x.separator?x.separator:"",w=void 0!==x.spacer?x.spacer:k?"":" ",_=x.symbols||{},E=2===o?x.standard||"iec":"jedec",g=x.output||"string",c=!0===x.fullform,u=x.fullforms instanceof Array?x.fullforms:[],s=void 0!==x.exponent?x.exponent:-1,C=n[x.roundingMethod]||Math.round,m=(h=Number(a))<0,l=o>2?1e3:1024,S=!1===isNaN(x.precision)?parseInt(x.precision,10):0,m&&(h=-h),(-1===s||isNaN(s))&&(s=Math.floor(Math.log(h)/Math.log(l)))<0&&(s=0),s>8&&(S>0&&(S+=8-s),s=8),"exponent"===g)return s;if(0===h)j[0]=0,v=j[1]=k?"":t[E][i?"bits":"bytes"][s];else{L=h/(2===o?Math.pow(2,10*s):Math.pow(1e3,s)),i&&(L*=8)>=l&&s<8&&(L/=l,s++);var A=Math.pow(10,s>0?b:0);j[0]=C(L*A)/A,j[0]===l&&s<8&&void 0===x.exponent&&(j[0]=1,s++),v=j[1]=10===o&&1===s?i?"kbit":"kB":t[E][i?"bits":"bytes"][s],k&&(j[1]=j[1].charAt(0),e.test(j[1])&&(j[0]=Math.floor(j[0]),j[1]=""))}if(m&&(j[0]=-j[0]),S>0&&(j[0]=j[0].toPrecision(S)),j[1]=_[j[1]]||j[1],!0===p?j[0]=j[0].toLocaleString():p.length>0?j[0]=j[0].toLocaleString(p,d):y.length>0&&(j[0]=j[0].toString().replace(".",y)),f&&!1===Number.isInteger(j[0])&&b>0){var P=y||".",T=j[0].toString().split(P),N=T[1]||"",M=N.length,R=b-M;j[0]="".concat(T[0]).concat(P).concat(N.padEnd(M+R,"0"))}return c&&(j[1]=u[s]?u[s]:r[E][s]+(i?"bit":"byte")+(1===j[0]?"":"s")),"array"===g?j:"object"===g?{value:j[0],symbol:j[1],exponent:s,unit:v}:j.join(w)}return a.partial=function(e){return function(t){return a(t,e)}},a}()},20025:(e,t,r)=>{"use strict";r.d(t,{e:()=>s});var n=r(38697),a=r(81338);function s(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,s=(n=n||{}).Base64,o="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)},p=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,d=function(e){return e.replace(p,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(d(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 s=e[n],o=e[n+1],l=e[n+2],c=s<<16|o<<8|l;r+=i.charAt(c>>>18)+i.charAt(c>>>12&63)+(void 0!==o?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,w=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))}},E=function(e){return e.replace(y,w)},_=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,_)},S=function(e){return C(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},x=function(e){return E(C(e))},j=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},L=function(e){return x(j(e))};n.Uint8Array&&(k=function(e){return Uint8Array.from(S(j(e)),(function(e){return e.charCodeAt(0)}))});var A=function(){var e=n.Base64;return n.Base64=s,e};if(n.Base64={VERSION:o,atob:S,btoa:h,fromBase64:L,toBase64:b,utob:d,encode:b,encodeURI:v,btou:E,decode:L,noConflict:A,fromUint8Array:a,toUint8Array:k},"function"==typeof Object.defineProperty){var P=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};n.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",P((function(){return L(this)}))),Object.defineProperty(String.prototype,"toBase64",P((function(e){return b(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",P((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 s(e){return"[object Function]"===a(e)}function o(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 p(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)?s(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(s(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 p=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(o).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+p+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+p+")","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 d(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 d(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={},p(this)}h.prototype.add=function(e,t){return this.__schemas__[e]=t,p(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,s,o,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))&&(s=r.index+r[1].length,(this.__index__<0||s<this.__index__)&&(this.__schema__="",this.__index__=s,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))&&(s=n.index+n[1].length,o=n.index+n[0].length,(this.__index__<0||s<this.__index__||s===this.__index__&&o>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=o)),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(),p(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,p(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(),s="";return"string"==typeof n.docId&&(s="-"+n.docId+"-"),s+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 s=a.rules.footnote_anchor_name(e,t,r,n,a),o=a.rules.footnote_caption(e,t,r,n,a),i=s;return e[t].meta.subId>0&&(i+=":"+e[t].meta.subId),'<sup class="footnote-ref"><a href="#fn'+s+'" id="fnref'+i+'">'+o+"</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 s(){return"</ol>\n</section>\n"}function o(e,t,r,n,a){var s=a.rules.footnote_anchor_name(e,t,r,n,a);return e[t].meta.subId>0&&(s+=":"+e[t].meta.subId),'<li id="fn'+s+'" class="footnote-item">'}function i(){return"</li>\n"}function l(e,t,r,n,a){var s=a.rules.footnote_anchor_name(e,t,r,n,a);return e[t].meta.subId>0&&(s+=":"+e[t].meta.subId),' <a href="#fnref'+s+'" 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=s,e.renderer.rules.footnote_open=o,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,s,o,i,l,c,p,d,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,(p=new e.Token("footnote_reference_open","",1)).meta={label:c},p.level=e.level++,e.tokens.push(p),a=e.bMarks[t],s=e.tShift[t],o=e.sCount[t],i=e.parentType,g=l,d=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-d,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]=s,e.sCount[t]=o,e.bMarks[t]=a,(p=new e.Token("footnote_reference_close","",-1)).level=--e.level,e.tokens.push(p),!0}),{alt:["paragraph","reference"]}),e.inline.ruler.after("image","footnote_inline",(function(e,t){var r,n,a,s,o=e.posMax,i=e.pos;return!(i+2>=o)&&(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,s=[]),e.push("footnote_ref","",0).meta={id:a},e.env.footnotes.list[a]={content:e.src.slice(r,n),tokens:s}),e.pos=n+1,e.posMax=o,!0))))})),e.inline.ruler.after("footnote_inline","footnote_ref",(function(e,t){var r,n,a,s,o=e.posMax,i=e.pos;if(i+3>o)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<o;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>=o)&&(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],s=e.env.footnotes.list[a].count,e.env.footnotes.list[a].count++,e.push("footnote_ref","",0).meta={id:a,subId:s,label:r}),e.pos=n,e.posMax=o,!0)))})),e.core.ruler.after("inline","footnote_tail",(function(e){var t,r,n,a,s,o,i,l,c,u,p=!1,d={};if(e.env.footnotes&&(e.tokens=e.tokens.filter((function(e){return"footnote_reference_open"===e.type?(p=!0,c=[],u=e.meta.label,!1):"footnote_reference_close"===e.type?(p=!1,d[":"+u]=c,!1):(p&&c.push(e),!p)})),e.env.footnotes.list)){for(o=e.env.footnotes.list,i=new e.Token("footnote_block_open","",1),e.tokens.push(i),t=0,r=o.length;t<r;t++){for((i=new e.Token("footnote_open","",1)).meta={id:t,label:o[t].label},e.tokens.push(i),o[t].tokens?(l=[],(i=new e.Token("paragraph_open","p",1)).block=!0,l.push(i),(i=new e.Token("inline","",0)).children=o[t].tokens,i.content=o[t].content,l.push(i),(i=new e.Token("paragraph_close","p",-1)).block=!0,l.push(i)):o[t].label&&(l=d[":"+o[t].label]),l&&(e.tokens=e.tokens.concat(l)),s="paragraph_close"===e.tokens[e.tokens.length-1].type?e.tokens.pop():null,a=o[t].count>0?o[t].count:1,n=0;n<a;n++)(i=new e.Token("footnote_anchor","",0)).meta={id:t,subId:n,label:o[t].label},e.tokens.push(i);s&&e.tokens.push(s),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 s(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 o(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 p=/[&<>"]/,d=/[&<>"]/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)&&s(r="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?o(r):e}(e,r)}))},t.isValidEntityCode=s,t.fromCodePoint=o,t.escapeHtml=function(e){return p.test(e)?e.replace(d,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,s,o=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(o+1,t)),i.ok=!0,i;92===a&&t+1<r?t+=2:t++}return i}for(s=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&&++s>32)return i;if(41===a){if(0===s)break;s--}t++}return o===t||0!==s||(i.str=n(e.slice(o,t)),i.lines=0,i.pos=t,i.ok=!0),i}},82174:e=>{"use strict";e.exports=function(e,t,r){var n,a,s,o,i=-1,l=e.posMax,c=e.pos;for(e.pos=t+1,n=1;e.pos<l;){if(93===(s=e.src.charCodeAt(e.pos))&&0===--n){a=!0;break}if(o=e.pos,e.md.inline.skipToken(e),91===s)if(o===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,s,o=0,i=t,l={ok:!1,pos:0,lines:0,str:""};if(t>=r)return l;if(34!==(s=e.charCodeAt(t))&&39!==s&&40!==s)return l;for(t++,40===s&&(s=41);t<r;){if((a=e.charCodeAt(t))===s)return l.pos=t+1,l.lines=o,l.str=n(e.slice(i+1,t)),l.ok=!0,l;if(40===a&&41===s)return l;10===a?o++:92===a&&t+1<r&&(t++,10===e.charCodeAt(t)&&o++),t++}return l}},9702:(e,t,r)=>{"use strict";var n=r(39615),a=r(57007),s=r(42403),o=r(17742),i=r(99575),l=r(37487),c=r(62232),u=r(49236),p=r(60300),d={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=p.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=p.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 o,this.renderer=new s,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=d[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 s(){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()})}s.prototype.tokenize=function(e,t,r){for(var n,a=this.ruler.getRules(""),s=a.length,o=t,i=!1,l=e.md.options.maxNesting;o<r&&(e.line=o=e.skipEmptyLines(o),!(o>=r))&&!(e.sCount[o]<e.blkIndent);){if(e.level>=l){e.line=r;break}for(n=0;n<s&&!a[n](e,o,r,!1);n++);e.tight=!i,e.isEmpty(e.line-1)&&(i=!0),(o=e.line)<r&&e.isEmpty(o)&&(i=!0,o++,e.line=o)}},s.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))},s.prototype.State=r(75355),e.exports=s},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 s(){this.ruler=new n;for(var e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1])}s.prototype.process=function(e){var t,r,n;for(t=0,r=(n=this.ruler.getRules("")).length;t<r;t++)n[t](e)},s.prototype.State=r(30727),e.exports=s},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)]],s=[["balance_pairs",r(76399)],["strikethrough",r(54988).g],["emphasis",r(56141).g],["text_collapse",r(52406)]];function o(){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<s.length;e++)this.ruler2.push(s[e][0],s[e][1])}o.prototype.skipToken=function(e){var t,r,n=e.pos,a=this.ruler.getRules(""),s=a.length,o=e.md.options.maxNesting,i=e.cache;if(void 0===i[n]){if(e.level<o)for(r=0;r<s&&(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]},o.prototype.tokenize=function(e){for(var t,r,n=this.ruler.getRules(""),a=n.length,s=e.posMax,o=e.md.options.maxNesting;e.pos<s;){if(e.level<o)for(r=0;r<a&&!(t=n[r](e,!1));r++);if(t){if(e.pos>=s)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},o.prototype.parse=function(e,t,r,n){var a,s,o,i=new this.State(e,t,r,n);for(this.tokenize(i),o=(s=this.ruler2.getRules("")).length,a=0;a<o;a++)s[a](i)},o.prototype.State=r(25240),e.exports=o},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,s=r(39615).escapeHtml,o={};function i(){this.rules=n({},o)}o.code_inline=function(e,t,r,n,a){var o=e[t];return"<code"+a.renderAttrs(o)+">"+s(e[t].content)+"</code>"},o.code_block=function(e,t,r,n,a){var o=e[t];return"<pre"+a.renderAttrs(o)+"><code>"+s(e[t].content)+"</code></pre>\n"},o.fence=function(e,t,r,n,o){var i,l,c,u,p,d=e[t],m=d.info?a(d.info).trim():"",h="",g="";return m&&(h=(c=m.split(/(\s+)/g))[0],g=c.slice(2).join("")),0===(i=r.highlight&&r.highlight(d.content,h,g)||s(d.content)).indexOf("<pre")?i+"\n":m?(l=d.attrIndex("class"),u=d.attrs?d.attrs.slice():[],l<0?u.push(["class",r.langPrefix+h]):(u[l]=u[l].slice(),u[l][1]+=" "+r.langPrefix+h),p={attrs:u},"<pre><code"+o.renderAttrs(p)+">"+i+"</code></pre>\n"):"<pre><code"+o.renderAttrs(d)+">"+i+"</code></pre>\n"},o.image=function(e,t,r,n,a){var s=e[t];return s.attrs[s.attrIndex("alt")][1]=a.renderInlineAsText(s.children,r,n),a.renderToken(e,t,r)},o.hardbreak=function(e,t,r){return r.xhtmlOut?"<br />\n":"<br>\n"},o.softbreak=function(e,t,r){return r.breaks?r.xhtmlOut?"<br />\n":"<br>\n":"\n"},o.text=function(e,t){return s(e[t].content)},o.html_block=function(e,t){return e[t].content},o.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+=" "+s(e.attrs[t][0])+'="'+s(e.attrs[t][1])+'"';return n},i.prototype.renderToken=function(e,t,r){var n,a="",s=!1,o=e[t];return o.hidden?"":(o.block&&-1!==o.nesting&&t&&e[t-1].hidden&&(a+="\n"),a+=(-1===o.nesting?"</":"<")+o.tag,a+=this.renderAttrs(o),0===o.nesting&&r.xhtmlOut&&(a+=" /"),o.block&&(s=!0,1===o.nesting&&t+1<e.length&&("inline"===(n=e[t+1]).type||n.hidden||-1===n.nesting&&n.tag===o.tag)&&(s=!1)),a+=s?">\n":">")},i.prototype.renderInline=function(e,t,r){for(var n,a="",s=this.rules,o=0,i=e.length;o<i;o++)void 0!==s[n=e[o].type]?a+=s[n](e,o,t,r,this):a+=this.renderToken(e,o,t);return a},i.prototype.renderInlineAsText=function(e,t,r){for(var n="",a=0,s=e.length;a<s;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,s,o="",i=this.rules;for(n=0,a=e.length;n<a;n++)"inline"===(s=e[n].type)?o+=this.renderInline(e[n].children,t,r):void 0!==i[s]?o+=i[e[n].type](e,n,t,r,this):o+=this.renderToken(e,n,t,r);return o},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),s=n||{};if(-1===a)throw new Error("Parser rule not found: "+e);this.__rules__.splice(a,0,{name:t,enabled:!0,fn:r,alt:s.alt||[]}),this.__cache__=null},t.prototype.after=function(e,t,r,n){var a=this.__find__(e),s=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:s.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 s,o,i,l,c,u,p,d,m,h,g,f,b,v,k,y,w,E,_,C,S=e.lineMax,x=e.bMarks[t]+e.tShift[t],j=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(x++))return!1;if(a)return!0;for(l=m=e.sCount[t]+1,32===e.src.charCodeAt(x)?(x++,l++,m++,s=!1,y=!0):9===e.src.charCodeAt(x)?(y=!0,(e.bsCount[t]+m)%4==3?(x++,l++,m++,s=!1):s=!0):y=!1,h=[e.bMarks[t]],e.bMarks[t]=x;x<j&&(o=e.src.charCodeAt(x),n(o));)9===o?m+=4-(m+e.bsCount[t]+(s?1:0))%4:m++,x++;for(g=[e.bsCount[t]],e.bsCount[t]=e.sCount[t]+1+(y?1:0),u=x>=j,v=[e.sCount[t]],e.sCount[t]=m-l,k=[e.tShift[t]],e.tShift[t]=x-e.bMarks[t],E=e.md.block.ruler.getRules("blockquote"),b=e.parentType,e.parentType="blockquote",d=t+1;d<r&&(C=e.sCount[d]<e.blkIndent,!((x=e.bMarks[d]+e.tShift[d])>=(j=e.eMarks[d])));d++)if(62!==e.src.charCodeAt(x++)||C){if(u)break;for(w=!1,i=0,c=E.length;i<c;i++)if(E[i](e,d,r,!0)){w=!0;break}if(w){e.lineMax=d,0!==e.blkIndent&&(h.push(e.bMarks[d]),g.push(e.bsCount[d]),k.push(e.tShift[d]),v.push(e.sCount[d]),e.sCount[d]-=e.blkIndent);break}h.push(e.bMarks[d]),g.push(e.bsCount[d]),k.push(e.tShift[d]),v.push(e.sCount[d]),e.sCount[d]=-1}else{for(l=m=e.sCount[d]+1,32===e.src.charCodeAt(x)?(x++,l++,m++,s=!1,y=!0):9===e.src.charCodeAt(x)?(y=!0,(e.bsCount[d]+m)%4==3?(x++,l++,m++,s=!1):s=!0):y=!1,h.push(e.bMarks[d]),e.bMarks[d]=x;x<j&&(o=e.src.charCodeAt(x),n(o));)9===o?m+=4-(m+e.bsCount[d]+(s?1:0))%4:m++,x++;u=x>=j,g.push(e.bsCount[d]),e.bsCount[d]=e.sCount[d]+1+(y?1:0),v.push(e.sCount[d]),e.sCount[d]=m-l,k.push(e.tShift[d]),e.tShift[d]=x-e.bMarks[d]}for(f=e.blkIndent,e.blkIndent=0,(_=e.push("blockquote_open","blockquote",1)).markup=">",_.map=p=[t,0],e.md.block.tokenize(e,t,d),(_=e.push("blockquote_close","blockquote",-1)).markup=">",e.lineMax=S,e.parentType=b,p[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,s;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,(s=e.push("code_block","code",0)).content=e.getLines(t,a,4+e.blkIndent,!1)+"\n",s.map=[t,e.line],!0}},79783:e=>{"use strict";e.exports=function(e,t,r,n){var a,s,o,i,l,c,u,p=!1,d=e.bMarks[t]+e.tShift[t],m=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(d+3>m)return!1;if(126!==(a=e.src.charCodeAt(d))&&96!==a)return!1;if(l=d,(s=(d=e.skipChars(d,a))-l)<3)return!1;if(u=e.src.slice(l,d),o=e.src.slice(d,m),96===a&&o.indexOf(String.fromCharCode(a))>=0)return!1;if(n)return!0;for(i=t;!(++i>=r)&&!((d=l=e.bMarks[i]+e.tShift[i])<(m=e.eMarks[i])&&e.sCount[i]<e.blkIndent);)if(e.src.charCodeAt(d)===a&&!(e.sCount[i]-e.blkIndent>=4||(d=e.skipChars(d,a))-l<s||(d=e.skipSpaces(d))<m)){p=!0;break}return s=e.sCount[t],e.line=i+(p?1:0),(c=e.push("fence","code",0)).info=o,c.content=e.getLines(t+1,i,s,!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 s,o,i,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(35!==(s=e.src.charCodeAt(c))||c>=u)return!1;for(o=1,s=e.src.charCodeAt(++c);35===s&&c<u&&o<=6;)o++,s=e.src.charCodeAt(++c);return!(o>6||c<u&&!n(s))&&(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(o),1)).markup="########".slice(0,o),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(o),-1)).markup="########".slice(0,o)),!0)}},68837:(e,t,r)=>{"use strict";var n=r(39615).isSpace;e.exports=function(e,t,r,a){var s,o,i,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(42!==(s=e.src.charCodeAt(c++))&&45!==s&&95!==s)return!1;for(o=1;c<u;){if((i=e.src.charCodeAt(c++))!==s&&!n(i))return!1;i===s&&o++}return!(o<3)&&(a||(e.line=t+1,(l=e.push("hr","hr",0)).map=[t,e.line],l.markup=Array(o+1).join(String.fromCharCode(s))),!0)}},33869:(e,t,r)=>{"use strict";var n=r(43093),a=r(36570).q,s=[[/^<(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,o,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<s.length&&!s[a][0].test(l);a++);if(a===s.length)return!1;if(n)return s[a][2];if(o=t+1,!s[a][1].test(l))for(;o<r&&!(e.sCount[o]<e.blkIndent);o++)if(c=e.bMarks[o]+e.tShift[o],u=e.eMarks[o],l=e.src.slice(c,u),s[a][1].test(l)){0!==l.length&&o++;break}return e.line=o,(i=e.push("html_block","",0)).map=[t,o],i.content=e.getLines(t,o,e.blkIndent,!0),!0}},5393:e=>{"use strict";e.exports=function(e,t,r){var n,a,s,o,i,l,c,u,p,d,m=t+1,h=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(d=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===(p=e.src.charCodeAt(l))||61===p)&&(l=e.skipChars(l,p),(l=e.skipSpaces(l))>=c)){u=61===p?1:2;break}if(!(e.sCount[m]<0)){for(a=!1,s=0,o=h.length;s<o;s++)if(h[s](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(p),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(p),e.parentType=d,!0)}},46388:(e,t,r)=>{"use strict";var n=r(39615).isSpace;function a(e,t){var r,a,s,o;return a=e.bMarks[t]+e.tShift[t],s=e.eMarks[t],42!==(r=e.src.charCodeAt(a++))&&45!==r&&43!==r||a<s&&(o=e.src.charCodeAt(a),!n(o))?-1:a}function s(e,t){var r,a=e.bMarks[t]+e.tShift[t],s=a,o=e.eMarks[t];if(s+1>=o)return-1;if((r=e.src.charCodeAt(s++))<48||r>57)return-1;for(;;){if(s>=o)return-1;if(!((r=e.src.charCodeAt(s++))>=48&&r<=57)){if(41===r||46===r)break;return-1}if(s-a>=10)return-1}return s<o&&(r=e.src.charCodeAt(s),!n(r))?-1:s}e.exports=function(e,t,r,n){var o,i,l,c,u,p,d,m,h,g,f,b,v,k,y,w,E,_,C,S,x,j,L,A,P,T,N,M,R=!1,I=!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&&(R=!0),(L=s(e,t))>=0){if(d=!0,P=e.bMarks[t]+e.tShift[t],v=Number(e.src.slice(P,L-1)),R&&1!==v)return!1}else{if(!((L=a(e,t))>=0))return!1;d=!1}if(R&&e.skipSpaces(L)>=e.eMarks[t])return!1;if(b=e.src.charCodeAt(L-1),n)return!0;for(f=e.tokens.length,d?(M=e.push("ordered_list_open","ol",1),1!==v&&(M.attrs=[["start",v]])):M=e.push("bullet_list_open","ul",1),M.map=g=[t,0],M.markup=String.fromCharCode(b),y=t,A=!1,N=e.md.block.ruler.getRules("list"),_=e.parentType,e.parentType="list";y<r;){for(j=L,k=e.eMarks[y],p=w=e.sCount[y]+L-(e.bMarks[t]+e.tShift[t]);j<k;){if(9===(o=e.src.charCodeAt(j)))w+=4-(w+e.bsCount[y])%4;else{if(32!==o)break;w++}j++}if((u=(i=j)>=k?1:w-p)>4&&(u=1),c=p+u,(M=e.push("list_item_open","li",1)).markup=String.fromCharCode(b),M.map=m=[t,0],d&&(M.info=e.src.slice(P,L-1)),x=e.tight,S=e.tShift[t],C=e.sCount[t],E=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=c,e.tight=!0,e.tShift[t]=i-e.bMarks[t],e.sCount[t]=w,i>=k&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,r):e.md.block.tokenize(e,t,r,!0),e.tight&&!A||(I=!1),A=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=E,e.tShift[t]=S,e.sCount[t]=C,e.tight=x,(M=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(T=!1,l=0,h=N.length;l<h;l++)if(N[l](e,y,r,!0)){T=!0;break}if(T)break;if(d){if((L=s(e,y))<0)break;P=e.bMarks[y]+e.tShift[y]}else if((L=a(e,y))<0)break;if(b!==e.src.charCodeAt(L-1))break}return(M=d?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=_,I&&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,s,o,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,s=c.length;a<s;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,(o=e.push("paragraph_open","p",1)).map=[t,e.line],(o=e.push("inline","",0)).content=r,o.map=[t,e.line],o.children=[],o=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,s){var o,i,l,c,u,p,d,m,h,g,f,b,v,k,y,w,E=0,_=e.bMarks[t]+e.tShift[t],C=e.eMarks[t],S=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";S<c&&!e.isEmpty(S);S++)if(!(e.sCount[S]-e.blkIndent>3||e.sCount[S]<0)){for(k=!1,p=0,d=y.length;p<d;p++)if(y[p](e,S,c,!0)){k=!0;break}if(k)break}for(C=(v=e.getLines(t,S,e.blkIndent,!1).trim()).length,_=1;_<C;_++){if(91===(o=v.charCodeAt(_)))return!1;if(93===o){h=_;break}(10===o||92===o&&++_<C&&10===v.charCodeAt(_))&&E++}if(h<0||58!==v.charCodeAt(h+1))return!1;for(_=h+2;_<C;_++)if(10===(o=v.charCodeAt(_)))E++;else if(!a(o))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=E+=f.lines,b=_;_<C;_++)if(10===(o=v.charCodeAt(_)))E++;else if(!a(o))break;for(f=e.md.helpers.parseLinkTitle(v,_,C),_<C&&b!==_&&f.ok?(w=f.str,_=f.pos,E+=f.lines):(w="",_=i,E=l);_<C&&(o=v.charCodeAt(_),a(o));)_++;if(_<C&&10!==v.charCodeAt(_)&&w)for(w="",_=i,E=l;_<C&&(o=v.charCodeAt(_),a(o));)_++;return!(_<C&&10!==v.charCodeAt(_))&&(!!(m=n(v.slice(1,h)))&&(s||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[m]&&(e.env.references[m]={title:w,href:u}),e.parentType=g,e.line=t+E+1),!0))}},75355:(e,t,r)=>{"use strict";var n=r(71872),a=r(39615).isSpace;function s(e,t,r,n){var s,o,i,l,c,u,p,d;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="",d=!1,i=l=u=p=0,c=(o=this.src).length;l<c;l++){if(s=o.charCodeAt(l),!d){if(a(s)){u++,9===s?p+=4-p%4:p++;continue}d=!0}10!==s&&l!==c-1||(10!==s&&l++,this.bMarks.push(i),this.eMarks.push(l),this.tShift.push(u),this.sCount.push(p),this.bsCount.push(0),d=!1,u=0,p=0,i=l+1)}this.bMarks.push(o.length),this.eMarks.push(o.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}s.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},s.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},s.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},s.prototype.skipSpaces=function(e){for(var t,r=this.src.length;e<r&&(t=this.src.charCodeAt(e),a(t));e++);return e},s.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!a(this.src.charCodeAt(--e)))return e+1;return e},s.prototype.skipChars=function(e,t){for(var r=this.src.length;e<r&&this.src.charCodeAt(e)===t;e++);return e},s.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},s.prototype.getLines=function(e,t,r,n){var s,o,i,l,c,u,p,d=e;if(e>=t)return"";for(u=new Array(t-e),s=0;d<t;d++,s++){for(o=0,p=l=this.bMarks[d],c=d+1<t||n?this.eMarks[d]+1:this.eMarks[d];l<c&&o<r;){if(i=this.src.charCodeAt(l),a(i))9===i?o+=4-(o+this.bsCount[d])%4:o++;else{if(!(l-p<this.tShift[d]))break;o++}l++}u[s]=o>r?new Array(o-r+1).join(" ")+this.src.slice(l,c):this.src.slice(l,c)}return u.join("")},s.prototype.Token=n,e.exports=s},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 s(e){var t,r=[],n=0,a=e.length,s=!1,o=0,i="";for(t=e.charCodeAt(n);n<a;)124===t&&(s?(i+=e.substring(o,n-1),o=n):(r.push(i+e.substring(o,n)),i="",o=n+1)),s=92===t,n++,t=e.charCodeAt(n);return r.push(i+e.substring(o)),r}e.exports=function(e,t,r,o){var i,l,c,u,p,d,m,h,g,f,b,v,k,y,w,E,_,C;if(t+2>r)return!1;if(d=t+1,e.sCount[d]<e.blkIndent)return!1;if(e.sCount[d]-e.blkIndent>=4)return!1;if((c=e.bMarks[d]+e.tShift[d])>=e.eMarks[d])return!1;if(124!==(_=e.src.charCodeAt(c++))&&45!==_&&58!==_)return!1;if(c>=e.eMarks[d])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[d];){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=s(l)).length&&""===m[0]&&m.shift(),m.length&&""===m[m.length-1]&&m.pop(),0===(h=m.length)||h!==f.length)return!1;if(o)return!0;for(y=e.parentType,e.parentType="table",E=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),d=t+2;d<r&&!(e.sCount[d]<e.blkIndent);d++){for(w=!1,u=0,p=E.length;u<p;u++)if(E[u](e,d,r,!0)){w=!0;break}if(w)break;if(!(l=a(e,d).trim()))break;if(e.sCount[d]-e.blkIndent>=4)break;for((m=s(l)).length&&""===m[0]&&m.shift(),m.length&&""===m[m.length-1]&&m.pop(),d===t+2&&((g=e.push("tbody_open","tbody",1)).map=k=[t+2,0]),(g=e.push("tr_open","tr",1)).map=[d,d+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]=d),g=e.push("table_close","table",-1),v[1]=d,e.parentType=y,e.line=d,!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,s,o,i,l,c,u,p,d,m,h,g,f,b,v,k,y,w=e.tokens;if(e.md.options.linkify)for(r=0,s=w.length;r<s;r++)if("inline"===w[r].type&&e.md.linkify.pretest(w[r].content))for(g=0,t=(o=w[r].children).length-1;t>=0;t--)if("link_close"!==(l=o[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(p=l.content,k=e.md.linkify.match(p),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:\/\//,""),(d=k[u].index)>m&&((i=new e.Token("text","",0)).content=p.slice(m,d),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<p.length&&((i=new e.Token("text","",0)).content=p.slice(m),i.level=h,c.push(i)),w[r].children=o=n(o,t,c)}}else for(t--;o[t].level!==l.level&&"link_open"!==o[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 s(e,t){return a[t.toLowerCase()]}function o(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,s)),"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)&&o(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,s=r(39615).isMdAsciiPunct,o=/['"]/,i=/['"]/g;function l(e,t,r){return e.substr(0,t)+r+e.substr(t+1)}function c(e,t){var r,o,c,u,p,d,m,h,g,f,b,v,k,y,w,E,_,C,S,x,j;for(S=[],r=0;r<e.length;r++){for(o=e[r],m=e[r].level,_=S.length-1;_>=0&&!(S[_].level<=m);_--);if(S.length=_+1,"text"===o.type){p=0,d=(c=o.content).length;e:for(;p<d&&(i.lastIndex=p,u=i.exec(c));){if(w=E=!0,p=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,p<d)f=c.charCodeAt(p);else for(_=r+1;_<e.length&&("softbreak"!==e[_].type&&"hardbreak"!==e[_].type);_++)if(e[_].content){f=e[_].content.charCodeAt(0);break}if(b=s(g)||a(String.fromCharCode(g)),v=s(f)||a(String.fromCharCode(f)),k=n(g),(y=n(f))?w=!1:v&&(k||b||(w=!1)),k?E=!1:b&&(y||v||(E=!1)),34===f&&'"'===u[0]&&g>=48&&g<=57&&(E=w=!1),w&&E&&(w=b,E=v),w||E){if(E)for(_=S.length-1;_>=0&&(h=S[_],!(S[_].level<m));_--)if(h.single===C&&S[_].level===m){h=S[_],C?(x=t.md.options.quotes[2],j=t.md.options.quotes[3]):(x=t.md.options.quotes[0],j=t.md.options.quotes[1]),o.content=l(o.content,u.index,j),e[h.token].content=l(e[h.token].content,h.pos,x),p+=j.length-1,h.token===r&&(p+=x.length-1),d=(c=o.content).length,S.length=_;continue e}w?S.push({token:r,pos:u.index,single:C,level:m}):E&&C&&(o.content=l(o.content,u.index,"’"))}else C&&(o.content=l(o.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&&o.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,s,o,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)?(s=e.md.normalizeLink(a),!!e.md.validateLink(s)&&(n||((o=e.push("link_open","a",1)).attrs=[["href",s]],o.markup="autolink",o.info="auto",(o=e.push("text","",0)).content=e.md.normalizeLinkText(a),(o=e.push("link_close","a",-1)).markup="autolink",o.info="auto"),e.pos+=a.length+2,!0)):!!t.test(a)&&(s=e.md.normalizeLink("mailto:"+a),!!e.md.validateLink(s)&&(n||((o=e.push("link_open","a",1)).attrs=[["href",s]],o.markup="autolink",o.info="auto",(o=e.push("text","",0)).content=e.md.normalizeLinkText(a),(o=e.push("link_close","a",-1)).markup="autolink",o.info="auto"),e.pos+=a.length+2,!0))}},7912:e=>{"use strict";e.exports=function(e,t){var r,n,a,s,o,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(o=i=u;-1!==(o=e.src.indexOf("`",i));){for(i=o+1;i<n&&96===e.src.charCodeAt(i);)i++;if((c=i-o)===l)return t||((s=e.push("code_inline","code",0)).markup=a,s.content=e.src.slice(u,o).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),e.pos=i,!0;e.backticks[c]=o}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=l,!0}},76399:e=>{"use strict";function t(e,t){var r,n,a,s,o,i,l,c,u={},p=t.length;if(p){var d=0,m=-2,h=[];for(r=0;r<p;r++)if(a=t[r],h.push(0),t[d].marker===a.marker&&m===a.token-1||(d=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]),o=u[a.marker][(a.open?3:0)+a.length%3],i=n=d-h[d]-1;n>o;n-=h[n]+1)if((s=t[n]).marker===a.marker&&s.open&&s.end<0&&(l=!1,(s.close||a.open)&&(s.length+a.length)%3==0&&(s.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,s.end=r,s.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,s,o,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,o=String.fromCharCode(n.marker),(s=e.tokens[n.token]).type=i?"strong_open":"em_open",s.tag=i?"strong":"em",s.nesting=1,s.markup=i?o+o:o,s.content="",(s=e.tokens[a.token]).type=i?"strong_close":"em_close",s.tag=i?"strong":"em",s.nesting=-1,s.markup=i?o+o:o,s.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,s=e.src.charCodeAt(a);if(t)return!1;if(95!==s&&42!==s)return!1;for(n=e.scanDelims(e.pos,42===s),r=0;r<n.length;r++)e.push("text","",0).content=String.fromCharCode(s),e.delimiters.push({marker:s,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,s=r(39615).isValidEntityCode,o=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,p=e.posMax;if(38!==e.src.charCodeAt(u))return!1;if(u+1<p)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+=s(r)?o(r):o(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=[],s=0;s<256;s++)a.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(e){a[e.charCodeAt(0)]=1})),e.exports=function(e,t){var r,s=e.pos,o=e.posMax;if(92!==e.src.charCodeAt(s))return!1;if(++s<o){if((r=e.src.charCodeAt(s))<256&&0!==a[r])return t||(e.pending+=e.src[s]),e.pos+=2,!0;if(10===r){for(t||e.push("hardbreak","br",0),s++;s<o&&(r=e.src.charCodeAt(s),n(r));)s++;return e.pos=s,!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,s,o=e.pos;return!!e.md.options.html&&(s=e.posMax,!(60!==e.src.charCodeAt(o)||o+2>=s)&&(!(33!==(r=e.src.charCodeAt(o+1))&&63!==r&&47!==r&&!function(e){var t=32|e;return t>=97&&t<=122}(r))&&(!!(a=e.src.slice(o).match(n))&&(t||(e.push("html_inline","",0).content=e.src.slice(o,o+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,s,o,i,l,c,u,p,d,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&&(s=e.src.charCodeAt(u),a(s)||10===s);u++);if(u>=k)return!1;for(f=u,(d=e.md.helpers.parseLinkDestination(e.src,u,e.posMax)).ok&&(b=e.md.normalizeLink(d.str),e.md.validateLink(b)?u=d.pos:b=""),f=u;u<k&&(s=e.src.charCodeAt(u),a(s)||10===s);u++);if(d=e.md.helpers.parseLinkTitle(e.src,u,e.posMax),u<k&&f!==u&&d.ok)for(m=d.str,u=d.pos;u<k&&(s=e.src.charCodeAt(u),a(s)||10===s);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)),!(p=e.env.references[n(i)]))return e.pos=v,!1;b=p.href,m=p.title}return t||(o=e.src.slice(c,l),e.md.inline.parse(o,e.md,e.env,g=[]),(h=e.push("image","img",0)).attrs=r=[["src",b],["alt",""]],h.children=g,h.content=o,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,s,o,i,l,c,u,p,d="",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&&(s=e.src.charCodeAt(c),a(s)||10===s);c++);if(c>=g)return!1;if(f=c,(u=e.md.helpers.parseLinkDestination(e.src,c,e.posMax)).ok){for(d=e.md.normalizeLink(u.str),e.md.validateLink(d)?c=u.pos:d="",f=c;c<g&&(s=e.src.charCodeAt(c),a(s)||10===s);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&&(s=e.src.charCodeAt(c),a(s)||10===s);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?o=e.src.slice(f,c++):c=i+1):c=i+1,o||(o=e.src.slice(l,i)),!(p=e.env.references[n(o)]))return e.pos=h,!1;d=p.href,m=p.title}return t||(e.pos=l,e.posMax=i,e.push("link_open","a",1).attrs=r=[["href",d]],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,s,o=e.pos;if(10!==e.src.charCodeAt(o))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(s=r-1;s>=1&&32===e.pending.charCodeAt(s-1);)s--;e.pending=e.pending.slice(0,s),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(o++;o<a&&n(e.src.charCodeAt(o));)o++;return e.pos=o,!0}},25240:(e,t,r)=>{"use strict";var n=r(71872),a=r(39615).isWhiteSpace,s=r(39615).isPunctChar,o=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),s=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=[],s={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(a),this.tokens_meta.push(s),a},i.prototype.scanDelims=function(e,t){var r,n,i,l,c,u,p,d,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,p=o(r)||s(String.fromCharCode(r)),m=o(n)||s(String.fromCharCode(n)),u=a(r),(d=a(n))?g=!1:m&&(u||p||(g=!1)),u?f=!1:p&&(d||m||(f=!1)),t?(l=g,c=f):(l=g&&(!f||p),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,s,o,i=[],l=t.length;for(r=0;r<l;r++)126===(a=t[r]).marker&&-1!==a.end&&(s=t[a.end],(o=e.tokens[a.token]).type="s_open",o.tag="s",o.nesting=1,o.markup="~~",o.content="",(o=e.tokens[s.token]).type="s_close",o.tag="s",o.nesting=-1,o.markup="~~",o.content="","text"===e.tokens[s.token-1].type&&"~"===e.tokens[s.token-1].content&&i.push(s.token-1));for(;i.length;){for(n=(r=i.pop())+1;n<e.tokens.length&&"s_close"===e.tokens[n].type;)n++;r!==--n&&(o=e.tokens[n],e.tokens[n]=e.tokens[r],e.tokens[r]=o)}}e.exports.w=function(e,t){var r,n,a,s,o=e.pos,i=e.src.charCodeAt(o);if(t)return!1;if(126!==i)return!1;if(a=(n=e.scanDelims(e.pos,!0)).length,s=String.fromCharCode(i),a<2)return!1;for(a%2&&(e.push("text","",0).content=s,a--),r=0;r<a;r+=2)e.push("text","",0).content=s+s,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,s=e.tokens.length;for(t=r=0;t<s;t++)a[t].nesting<0&&n--,a[t].level=n,a[t].nesting>0&&n++,"text"===a[t].type&&t+1<s&&"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,s,o,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&(s=parseInt(e.slice(t+4,t+6),16)))?(c+=(l=n<<6&1984|63&s)<128?"��":String.fromCharCode(l),t+=3):224==(240&n)&&t+6<r&&(s=parseInt(e.slice(t+4,t+6),16),o=parseInt(e.slice(t+7,t+9),16),128==(192&s)&&128==(192&o))?(c+=(l=n<<12&61440|s<<6&4032|63&o)<2048||l>=55296&&l<=57343?"���":String.fromCharCode(l),t+=6):240==(248&n)&&t+9<r&&(s=parseInt(e.slice(t+4,t+6),16),o=parseInt(e.slice(t+7,t+9),16),i=parseInt(e.slice(t+10,t+12),16),128==(192&s)&&128==(192&o)&&128==(192&i))?((l=n<<18&1835008|s<<12&258048|o<<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 s,o,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),s=0,o=e.length;s<o;s++)if(i=e.charCodeAt(s),a&&37===i&&s+2<o&&/^[0-9a-f]{2}$/i.test(e.slice(s+1,s+3)))u+=e.slice(s,s+3),s+=2;else if(i<128)u+=c[i];else if(i>=55296&&i<=57343){if(i>=55296&&i<=56319&&s+1<o&&(l=e.charCodeAt(s+1))>=56320&&l<=57343){u+=encodeURIComponent(e[s]+e[s+1]),s++;continue}u+="%EF%BF%BD"}else u+=encodeURIComponent(e[s]);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]*)?$/,s=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),o=["'"].concat(s),i=["%","/","?",";","#"].concat(o),l=["/","?","#"],c=/^[+a-z0-9A-Z_-]{0,63}$/,u=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},d={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,s,o,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&&(o=(b=b[0]).toLowerCase(),this.protocol=b,g=g.substr(b.length)),(t||b||g.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(h="//"===g.substr(0,2))||b&&p[b]||(g=g.substr(2),this.slashes=!0)),!p[b]&&(h||b&&!d[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 w=g.slice(0,y);g=g.slice(y),this.parseHost(w),this.hostname=this.hostname||"";var E="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!E){var _=this.hostname.split(/\./);for(n=0,s=_.length;n<s;n++){var C=_[n];if(C&&!C.match(c)){for(var S="",x=0,j=C.length;x<j;x++)C.charCodeAt(x)>127?S+="x":S+=C[x];if(!S.match(c)){var L=_.slice(0,n),A=_.slice(n+1),P=C.match(u);P&&(L.push(P[1]),A.unshift(P[2])),A.length&&(g=A.join(".")+g),this.hostname=L.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),E&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var T=g.indexOf("#");-1!==T&&(this.hash=g.substr(T),g=g.slice(0,T));var N=g.indexOf("?");return-1!==N&&(this.search=g.substr(N),g=g.slice(0,N)),g&&(this.pathname=g),d[o]&&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}},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"}},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,s=7*a,o=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*o;case"weeks":case"week":case"w":return l*s;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 s=Math.abs(e);if(s>=a)return i(e,s,a,"day");if(s>=n)return i(e,s,n,"hour");if(s>=r)return i(e,s,r,"minute");if(s>=t)return i(e,s,t,"second");return e+" ms"}(e):function(e){var s=Math.abs(e);if(s>=a)return Math.round(e/a)+"d";if(s>=n)return Math.round(e/n)+"h";if(s>=r)return Math.round(e/r)+"m";if(s>=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:()=>o});var n=r(97740),a=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],s=/[^A-Z0-9]+/gi;function o(e,t){void 0===t&&(t={});for(var r=t.splitRegexp,o=void 0===r?a:r,l=t.stripRegexp,c=void 0===l?s:l,u=t.transform,p=void 0===u?n.U:u,d=t.delimiter,m=void 0===d?" ":d,h=i(i(e,o,"$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(p).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:()=>s});var n=r(38697),a=r(77352);function s(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:()=>s,Ho:()=>i,Pv:()=>o});var n=r(38697),a=r(68308);function s(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 o(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:s},t))}},76559:(e,t,r)=>{"use strict";r.d(t,{Y:()=>s});var n=r(38697),a=r(77352);function s(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),s=r(53191),o=r.n(s),i=r(51128),l=r.n(i)()("photon"),c={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},u="__domain__.invalid",p="http://".concat(u),d="https://i0.wp.com";function m(e,t){var r;try{r=new URL(e,p)}catch(e){return null}var n,s,i,m,h,g="https:"===r.protocol,f=new URL(d);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,s=a()(n),i=o()(s),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 s(){}s.resetWarningCache=a,e.exports=function(){function e(e,t,r,a,s,o){if(o!==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:s,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:()=>L});var n,a=r(99196),s=r.n(a),o=Object.defineProperty,i=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,u=(e,t,r)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p=(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},d=(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 o=[];for(let e=0;e<this.size;e++)o.push(!1);for(let e=0;e<this.size;e++)this.modules.push(o.slice()),this.isFunction.push(o.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)}}s(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,o=40,l=-1,c=!0){if(!(t.MIN_VERSION<=a&&a<=o&&o<=t.MAX_VERSION)||l<-1||l>7)throw new RangeError("Invalid value");let u,p;for(u=a;;u++){const n=8*t.getNumDataCodewords(u,r),a=i.getTotalBits(e,u);if(a<=n){p=a;break}if(u>=o)throw new RangeError("Data too long")}for(const e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])c&&p<=8*t.getNumDataCodewords(u,e)&&(r=e);let d=[];for(const t of e){n(t.mode.modeBits,4,d),n(t.numChars,t.mode.numCharCountBits(u),d);for(const e of t.getData())d.push(e)}s(d.length==p);const m=8*t.getNumDataCodewords(u,r);s(d.length<=m),n(0,Math.min(4,m-d.length),d),n(0,(8-d.length%8)%8,d),s(d.length%8==0);for(let e=236;d.length<m;e^=253)n(e,8,d);let h=[];for(;8*h.length<d.length;)h.push(0);return d.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);s(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;s(t>>>18==0);for(let e=0;e<18;e++){const r=a(t,e),n=this.size-11+e%3,s=Math.floor(e/3);this.setFunctionModule(n,s,r),this.setFunctionModule(s,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)),s=e+n,o=t+r;0<=s&&s<this.size&&0<=o&&o<this.size&&this.setFunctionModule(s,o,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],o=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 p=t.reedSolomonComputeDivisor(o);for(let r=0,n=0;r<a;r++){let a=e.slice(n,n+c-o+(r<l?0:1));n+=a.length;const s=t.reedSolomonComputeRemainder(a,p);r<l&&a.push(0),u.push(a.concat(s))}let d=[];for(let e=0;e<u[0].length;e++)u.forEach(((t,r)=>{(e!=c-o||r>=l)&&d.push(t[e])}));return s(d.length==i),d}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 s=0;s<2;s++){const o=t-s,i=0==(t+1&2)?this.size-1-n:n;!this.isFunction[i][o]&&r<8*e.length&&(this.modules[i][o]=a(e[r>>>3],7-(7&r)),r++)}}s(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,s=[0,0,0,0,0,0,0];for(let o=0;o<this.size;o++)this.modules[r][o]==n?(a++,5==a?e+=t.PENALTY_N1:a>5&&e++):(this.finderPenaltyAddHistory(a,s),n||(e+=this.finderPenaltyCountPatterns(s)*t.PENALTY_N3),n=this.modules[r][o],a=1);e+=this.finderPenaltyTerminateAndCount(n,a,s)*t.PENALTY_N3}for(let r=0;r<this.size;r++){let n=!1,a=0,s=[0,0,0,0,0,0,0];for(let o=0;o<this.size;o++)this.modules[o][r]==n?(a++,5==a?e+=t.PENALTY_N1:a>5&&e++):(this.finderPenaltyAddHistory(a,s),n||(e+=this.finderPenaltyCountPatterns(s)*t.PENALTY_N3),n=this.modules[o][r],a=1);e+=this.finderPenaltyTerminateAndCount(n,a,s)*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 s(0<=a&&a<=9),e+=a*t.PENALTY_N4,s(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 s(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 s(r>>>8==0),r}finderPenaltyCountPatterns(e){const t=e[1];s(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 s(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 o=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 o(o.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!o.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 o(o.Mode.NUMERIC,e.length,t)}static makeAlphanumeric(e){if(!o.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*o.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t));a+=o.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t+1)),n(a,11,r)}return t<e.length&&n(o.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t)),6,r),new o(o.Mode.ALPHANUMERIC,e.length,r)}static makeSegments(e){return""==e?[]:o.isNumeric(e)?[o.makeNumeric(e)]:o.isAlphanumeric(e)?[o.makeAlphanumeric(e)]:[o.makeBytes(o.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 o(o.Mode.ECI,0,t)}static isNumeric(e){return o.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return o.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=o;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,w=.1;function E(e,t=0){const r=[];return e.forEach((function(e,n){let a=null;e.forEach((function(s,o){if(!s&&null!==a)return r.push(`M${a+t} ${n+t}h${o-a}v1H${a+t}z`),void(a=null);if(o!==e.length-1)s&&null===a&&(a=o);else{if(!s)return;null===a?r.push(`M${o+t},${n+t} h1v1H${o+t}z`):r.push(`M${a+t},${n+t} h${o+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,s=e.length+2*a,o=Math.floor(t*w),i=s/t,l=(n.width||o)*i,c=(n.height||o)*i,u=null==n.x?e.length/2-l/2:n.x*i,p=null==n.y?e.length/2-c/2:n.y*i;let d=null;if(n.excavate){let e=Math.floor(u),t=Math.floor(p);d={x:e,y:t,w:Math.ceil(l+u-e),h:Math.ceil(c+p-t)}}return{x:u,y:p,h:c,w:l,excavation:d}}var S=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}();function x(e){const t=e,{value:r,size:n=g,level:o=f,bgColor:i=b,fgColor:l=v,includeMargin:c=k,style:u,imageSettings:w}=t,x=d(t,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),j=null==w?void 0:w.src,L=(0,a.useRef)(null),A=(0,a.useRef)(null),[P,T]=(0,a.useState)(!1);(0,a.useEffect)((()=>{if(null!=L.current){const e=L.current,t=e.getContext("2d");if(!t)return;let a=m.QrCode.encodeText(r,h[o]).getModules();const s=c?y:0,u=a.length+2*s,p=C(a,n,c,w),d=A.current,g=null!=p&&null!==d&&d.complete&&0!==d.naturalHeight&&0!==d.naturalWidth;g&&null!=p.excavation&&(a=_(a,p.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,S?t.fill(new Path2D(E(a,s))):a.forEach((function(e,r){e.forEach((function(e,n){e&&t.fillRect(n+s,r+s,1,1)}))})),g&&t.drawImage(d,p.x+s,p.y+s,p.w,p.h)}})),(0,a.useEffect)((()=>{T(!1)}),[j]);const N=p({height:n,width:n},u);let M=null;return null!=j&&(M=s().createElement("img",{src:j,key:j,style:{display:"none"},onLoad:()=>{T(!0)},ref:A})),s().createElement(s().Fragment,null,s().createElement("canvas",p({style:N,height:n,width:n,ref:L},x)),M)}function j(e){const t=e,{value:r,size:n=g,level:a=f,bgColor:o=b,fgColor:i=v,includeMargin:l=k,imageSettings:c}=t,u=d(t,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let w=m.QrCode.encodeText(r,h[a]).getModules();const S=l?y:0,x=w.length+2*S,j=C(w,n,l,c);let L=null;null!=c&&null!=j&&(null!=j.excavation&&(w=_(w,j.excavation)),L=s().createElement("image",{xlinkHref:c.src,height:j.h,width:j.w,x:j.x+S,y:j.y+S,preserveAspectRatio:"none"}));const A=E(w,S);return s().createElement("svg",p({height:n,width:n,viewBox:`0 0 ${x} ${x}`},u),s().createElement("path",{fill:o,d:`M0,0 h${x}v${x}H0z`,shapeRendering:"crispEdges"}),s().createElement("path",{fill:i,d:A,shapeRendering:"crispEdges"}),L)}var L=e=>{const t=e,{renderAs:r}=t,n=d(t,["renderAs"]);return"svg"===r?s().createElement(j,p({},n)):s().createElement(x,p({},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,s,o=[];for(s in"string"!=typeof t&&(t="?"),e)if(r.call(e,s)){if((n=e[s])||null!=n&&!isNaN(n)||(n=""),s=a(s),n=a(n),null===s||null===n)continue;o.push(s+"="+n)}return o.length?t+o.join("&"):""},t.parse=function(e){for(var t,r=/([^=?#&]+)=?([^&]*)/g,a={};t=r.exec(e);){var s=n(t[1]),o=n(t[2]);null===s||null===o||s in a||(a[s]=o)}return a}},51516:(e,t,r)=>{"use strict";var n=r(91850);t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot},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,s="undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(s):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 s(){r&&(r=!1,e()),n&&l()}function i(){o(s)}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},p=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||s},d=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 d;var n=p(e).getComputedStyle(e),a=function(e){for(var t={},r=0,n=["top","right","bottom","left"];r<n.length;r++){var a=n[r],s=e["padding-"+a];t[a]=m(s)}return t}(n),s=a.left+a.right,o=a.top+a.bottom,i=m(n.width),l=m(n.height);if("border-box"===n.boxSizing&&(Math.round(i+s)!==t&&(i-=h(n,"left","right")+s),Math.round(l+o)!==r&&(l-=h(n,"top","bottom")+o)),!function(e){return e===p(e).document.documentElement}(e)){var c=Math.round(i+s)-t,u=Math.round(l+o)-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 p(e).SVGGraphicsElement}:function(e){return e instanceof p(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):d}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,s,o,i,l,c=(n=(r=t).x,a=r.y,s=r.width,o=r.height,i="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(i.prototype),u(l,{x:n,y:a,width:s,height:o,top:a,right:n+s,bottom:o+a,left:n}),l);u(this,{target:e,contentRect:c})},w=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 p(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 p(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}(),E="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 w(t,r,this);E.set(this,n)};["observe","unobserve","disconnect"].forEach((function(e){_.prototype[e]=function(){var t;return(t=E.get(this))[e].apply(t,arguments)}}));const C=void 0!==s.ResizeObserver?s.ResizeObserver:_},53191:e=>{"use strict";var t=256,r=[],n=window,a=Math.pow(t,6),s=Math.pow(2,52),o=2*s,i=255,l=Math.random;function c(e){var r,n=e.length,a=this,s=0,o=a.i=a.j=0,l=a.S=[];for(n||(e=[n++]);s<t;)l[s]=s++;for(s=0;s<t;s++)l[s]=l[o=i&o+e[s%n]+(r=l[s])],l[o]=r;(a.g=function(e){for(var r,n=0,s=a.i,o=a.j,l=a.S;e--;)r=l[s=i&s+1],n=n*t+l[i&(l[s]=l[o=i&o+r])+(l[o]=r)];return a.i=s,a.j=o,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 p(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 d(t)}function d(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=(p(u(l&&l.entropy||!1?[i,d(r)]:0 in arguments?i:function(e){try{return n.crypto.getRandomValues(e=new Uint8Array(t)),d(e)}catch(e){return[+new Date,n,n.navigator&&n.navigator.plugins,n.screen,d(r)]}}(),3),m),new c(m));return p(d(h.S),r),function(){for(var e=h.g(6),r=a,n=0;e<s;)e=(e+n)*t,r*=t,n=h.g(1);for(;e>=o;)e/=2,r/=2,n>>>=1;return(e+n)/r}},e.exports.resetGlobal=function(){Math.random=l},p(Math.random(),r)},44434:(e,t,r)=>{"use strict";r.d(t,{G:()=>i,a:()=>o});var n=r(38697),a=r(68308),s=r(83078);function o(e,t){var r=e.toLowerCase();return 0===t?(0,s.l)(r):r}function i(e,t){return void 0===t&&(t={}),(0,a.B)(e,(0,n.pi)({delimiter:" ",transform:o},t))}},59491:(e,t,r)=>{"use strict";r.d(t,{f:()=>s});var n=r(38697),a=r(77352);function s(e,t){return void 0===t&&(t={}),(0,a.$)(e,(0,n.pi)({delimiter:"_"},t))}},67742:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51128),a=r.n(n),s=r(56694);const o=a()("jetpack-ai-client:ask-question");async function i(e,{postId:t=null,fromCache:r=!1,feature:n,functions:a,model:i}={}){return o("Asking question: %o. options: %o",e,{postId:t,fromCache:r,feature:n,functions:a,model:i}),new s.Z({question:e,options:{postId:t,feature:n,fromCache:r,functions:a,model:i}})}},4437:(e,t,r)=>{"use strict";r.d(t,{Z:()=>w});var n=r(52175),a=r(55609),s=r(94333),o=r(69307),i=r(65736),l=r(61074),c=r(6163),u=r(90986),p=r(78270),d=r(34394),m=r(79201),h=r(65235),g=r.n(h),f=r(99196),b=r.n(f),v=r(11928),k=r(22291);const __=i.__,y=()=>{};const w=(0,o.forwardRef)((function({disabled:e=!1,value:t="",placeholder:r="",showAccept:i=!1,acceptLabel:h=__("Accept","jetpack"),showButtonLabels:f=!0,isTransparent:w=!1,state:E="init",showGuideLine:_=!1,customFooter:C=null,onChange:S=y,onSend:x=y,onStop:j=y,onAccept:L=y,onDiscard:A=null,showRemove:P=!1,bannerComponent:T=null,errorComponent:N=null},M){const R=(0,o.useRef)(null),I="requesting"===E||"suggesting"===E,[Z,D]=b().useState(!1),[B,O]=b().useState(t||null);(0,o.useEffect)((()=>{Z&&R?.current?.focus(),Z||null===B||t===B||S?.(B)}),[Z,B,t]);const F=(0,o.useCallback)((()=>{O(t),D(!1),x?.(t)}),[t]),U=(0,o.useCallback)((e=>{S?.(e),"init"!==E&&D(B?e!==B:e.length>0)}),[B,E]),z=(0,o.useCallback)((()=>{A?.()}),[]),q=(0,o.useCallback)((()=>{S(B||""),D(!1)}),[B]);return(0,o.useImperativeHandle)(M,(()=>R.current)),(0,s.useKeyboardShortcut)("mod+enter",(()=>{i&&L?.()}),{target:R}),(0,s.useKeyboardShortcut)("enter",(e=>{e.preventDefault(),F()}),{target:R}),b().createElement("div",{className:"jetpack-components-ai-control__container-wrapper"},N,b().createElement("div",{className:"jetpack-components-ai-control__container"},T,b().createElement("div",{className:g()("jetpack-components-ai-control__wrapper",{"is-transparent":w})},b().createElement(v.Z,{state:E}),b().createElement("div",{className:"jetpack-components-ai-control__input-wrapper"},b().createElement(n.PlainText,{value:t,onChange:U,placeholder:r,className:"jetpack-components-ai-control__input",disabled:I||e,ref:R})),(!i||Z)&&b().createElement("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper"},I?b().createElement(a.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:j,variant:"secondary",label:__("Stop request","jetpack")},f?__("Stop","jetpack"):b().createElement(l.Z,{icon:c.Z})):b().createElement(b().Fragment,null,Z&&b().createElement(a.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:q,variant:"secondary",label:__("Cancel","jetpack")},f?__("Cancel","jetpack"):b().createElement(l.Z,{icon:c.Z})),P&&!Z&&!t?.length&&A&&b().createElement(a.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:z,variant:"secondary",label:__("Cancel","jetpack")},f?__("Cancel","jetpack"):b().createElement(l.Z,{icon:c.Z})),t?.length>0&&b().createElement(a.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:F,variant:"primary",disabled:!t?.length||e,label:__("Send request","jetpack")},f?__("Generate","jetpack"):b().createElement(l.Z,{icon:u.Z})))),i&&!Z&&b().createElement("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper"},(t?.length>0||null===B)&&b().createElement(a.ButtonGroup,null,b().createElement(a.Button,{className:"jetpack-components-ai-control__controls-prompt_button",label:__("Discard","jetpack"),onClick:z,tooltipPosition:"top"},b().createElement(l.Z,{icon:p.Z})),b().createElement(a.Button,{className:"jetpack-components-ai-control__controls-prompt_button",label:__("Regenerate","jetpack"),onClick:()=>x?.(t),tooltipPosition:"top",disabled:!t?.length||null===t||e},b().createElement(l.Z,{icon:d.Z}))),b().createElement(a.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:L,variant:"primary",label:h},f?h:b().createElement(l.Z,{icon:m.Z})))),_&&!I&&!Z&&(C||b().createElement(k.Eo,null))))}))},22291:(e,t,r)=>{"use strict";r.d(t,{Eo:()=>b});var n=r(55609),a=r(69307),s=r(65736),o=r(30797),i=r(23435),l=r(79201),c=r(90496),u=r(61074);const __=s.__,p="warning",d="error",m="success",h="info",g={[p]:o.Z,[d]:i.Z,[m]:l.Z,[h]:c.Z};function f({severity:e=null,icon:t=null,children:r}){return React.createElement("div",{className:"jetpack-ai-assistant__message"},(e||t)&&React.createElement(u.Z,{icon:g[e]||t}),React.createElement("div",{className:"jetpack-ai-assistant__message-content"},r))}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:()=>o});var n=r(55609),a=r(65235),s=r.n(a);function o({state:e}){return React.createElement("div",{className:s()("jetpack-ai-status-indicator__icon-wrapper",{[`is-${e}`]:!0})},React.createElement(n.Spinner,null))}},590:(e,t,r)=>{"use strict";r(69307)},58890:(e,t,r)=>{"use strict";r.d(t,{tK:()=>n.Z});var n=r(4437);r(11928),r(590),r(22291)},62282:(e,t,r)=>{"use strict";r.d(t,{h:()=>i,u:()=>o});var n=r(69307),a=r(99196),s=r.n(a);const o=(0,n.createContext)({}),i=({value:e,children:t})=>s().createElement(o.Provider,{value:e,children:t})},20281:(e,t,r)=>{"use strict";r.d(t,{X_:()=>s.Z,hE:()=>n.h,oN:()=>a.Z,uE:()=>n.u});var n=r(62282),a=r(3669),s=r(79466)},79466:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(69307),a=r(16700),s=r(20281);function o({onDone:e,onSuggestion:t,onError:r}={}){const o=(0,n.useContext)(s.uE),{eventSource:i}=o,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]),o}},3669:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(94333),a=r(69307),s=r(99196),o=r.n(s),i=r(42194),l=r(20281);const c=(0,n.createHigherOrderComponent)((e=>t=>{const{suggestion:r,error:n,requestingState:s,request:c,stopSuggestion:u,eventSource:p}=(0,i.Z)(),d=(0,a.useMemo)((()=>({suggestion:r,requestingError:n,requestingState:s,eventSource:p,requestSuggestion:c,stopSuggestion:u})),[r,n,s,p,c,u]);return o().createElement(l.hE,{value:d},o().createElement(e,t))}),"withAiDataProvider")},42194:(e,t,r)=>{"use strict";r.d(t,{A:()=>u,Z:()=>p});var n=r(69307),a=r(65736),s=r(51128),o=r.n(s),i=r(67742),l=r(16700);const __=a.__,c=o()("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 p({prompt:e,autoRequest:t=!1,askQuestionOptions:r={},onSuggestion:a,onDone:s,onError:o}={}){const[p,d]=(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=>{s?.(e?.detail),d("done")}),[s]),y=(0,n.useCallback)((e=>{b?.current?.close(),d("error"),f(u(e)),o?.(u(e))}),[o]),w=(0,n.useCallback)((()=>y(l.$L)),[]),E=(0,n.useCallback)((()=>y(l.bC)),[]),_=(0,n.useCallback)((()=>y(l.$u)),[]),C=(0,n.useCallback)((()=>y(l.q4)),[]),S=(0,n.useCallback)((()=>y(l.co)),[]),x=(0,n.useCallback)((async(e,t={...r})=>{Array.isArray(e)&&e?.length?e.forEach((({role:t,content:r},n)=>c("(%s/%s) %o\n%s",n+1,e.length,`[${t}]`,r))):c("%o",e),d("requesting");try{if(b.current=await(0,i.Z)(e,t),!b?.current)return;const r=b.current;d("suggesting"),r.addEventListener("suggestion",v),r.addEventListener(l.$L,w),r.addEventListener(l.bC,E),r.addEventListener(l.$u,_),r.addEventListener(l.q4,C),r.addEventListener(l.co,S),r.addEventListener("done",k)}catch(e){console.error(e)}}),[k,w,E,_,C,S,v]),j=(0,n.useCallback)((()=>{d("init"),h(""),f(void 0)}),[]),L=(0,n.useCallback)((()=>{if(!b?.current)return;const e=b?.current;e.close(),e.removeEventListener("suggestion",v),e.removeEventListener(l.$L,w),e.removeEventListener(l.bC,E),e.removeEventListener(l.$u,_),e.removeEventListener(l.q4,C),e.removeEventListener(l.co,S),e.removeEventListener("done",k),d("done")}),[b,v,w,E,_,C,S,k]);return(0,n.useEffect)((()=>{if(e?.length)return t&&x(e,r),()=>{L()}}),[t,e,x,L]),{suggestion:m,error:g,requestingState:p,request:x,stopSuggestion:L,reset:j,eventSource:b.current}}},13109:(e,t,r)=>{"use strict";r(69307)},61317:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(55609),a=r(99196),s=r.n(a);const o=s().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"},s().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"}),s().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"}),s().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(81204),r(4454),r(71893),r(52887),r(96083),r(50500))},81204:(e,t,r)=>{"use strict";var n=r(55609),a=r(99196),s=r.n(a);n.SVG,n.Rect,n.Line,n.Path},4454:(e,t,r)=>{"use strict";var n=r(55609),a=r(99196),s=r.n(a);n.SVG,n.Path,n.Path},96083:(e,t,r)=>{"use strict";var n=r(55609),a=r(99196),s=r.n(a);n.SVG,n.Path,n.Rect,n.Rect},71893:(e,t,r)=>{"use strict";var n=r(55609),a=r(99196),s=r.n(a);n.SVG,n.Path,n.Path},52887:(e,t,r)=>{"use strict";var n=r(55609),a=r(99196),s=r.n(a);n.SVG,n.Path,n.Rect},50500:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(55609),a=r(99196),s=r.n(a);const o=s().createElement(n.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s().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"}),s().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"}))},42290:(e,t,r)=>{"use strict";r.d(t,{$L:()=>i.$L,X_:()=>o.X_,jt:()=>n.Z,oN:()=>o.oN,tK:()=>s.tK,u_:()=>a.u_,v_:()=>a.v_});r(2890),r(56694);var n=r(67742),a=(r(42194),r(13109),r(59822)),s=r(58890),o=r(20281),i=r(16700)},2890:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(13419),a=r(86989),s=r.n(a),o=r(51128);const i=r.n(o)()("jetpack-ai-client:jwt"),l="jetpack-ai-jwt",c=12e4;async function u({apiNonce:e,siteId:t,expirationTime:r}={}){e=e||window.JP_CONNECTION_INITIAL_STATE.apiNonce,t=t||window.JP_CONNECTION_INITIAL_STATE.siteSuffix,r=r||c;const a=(0,n.Wp)(),o=localStorage.getItem(l);let u,p=null;if(o)try{p=JSON.parse(o)}catch(e){i("Error parsing token",e)}if(p&&p?.expire>Date.now())return i("Using cached token"),p;u=a?await s()({path:"/wpcom/v2/sites/"+t+"/jetpack-openai-query/jwt",method:"POST"}):await s()({path:"/jetpack/v4/jetpack-ai-jwt?_cacheBuster="+Date.now(),credentials:"same-origin",headers:{"X-WP-Nonce":e},method:"POST"});const d={token:u.token,blogId:a?t:u.blog_id,expire:Date.now()+r};return i("Storing new token"),localStorage.setItem(l,JSON.stringify(d)),d}},56694:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(60400),a=r(51128),s=r.n(a),o=r(42194),i=r(2890),l=r(16700);const c=s()("jetpack-ai-client:suggestions-event-source");class u extends EventTarget{constructor(e){super(),this.fullMessage="",this.fullFunctionCall={name:"",arguments:""},this.isPromptClear=!1,this.controller=new AbortController,this.initEventSource(e)}async initEventSource({url:e,question:t,token:r,options:a={}}){if(!r)try{c("Token was not provided, requesting one..."),r=(await(0,i.Z)()).token}catch(e){return void this.processErrorEvent(e)}const s={};if(Number.isInteger(parseInt(a.postId))&&(s.post_id=+a.postId),!e){const t=new URL("https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query");a?.fromCache&&t.searchParams.append("stream_cache","true"),e=t.toString(),c("URL not provided, using default: %o",e)}Array.isArray(t)?s.messages=t:s.question=t,a?.feature?.length&&(c("Feature: %o",a.feature),s.feature=a.feature),a?.functions?.length&&(c("Functions: %o",a.functions),s.functions=a.functions),a?.model?.length&&(c("Model: %o",a.model),s.model=a.model),this.errorUnclearPromptTriggered=!1,await(0,n.L)(e,{openWhenHidden:!0,method:"POST",headers:{"Content-type":"application/json",Authorization:"Bearer "+r},body:JSON.stringify(s),onclose:()=>{c("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&&![413,422,429].includes(e.status)&&this.processConnectionError(e),503===e.status&&(t=l.$u,this.dispatchEvent(new CustomEvent(l.$u))),413===e.status&&(t=l.cv,this.dispatchEvent(new CustomEvent(l.cv))),422===e.status&&(t=l.q4,this.dispatchEvent(new CustomEvent(l.q4))),429===e.status&&(t=l.$L,this.dispatchEvent(new CustomEvent(l.$L))),this.dispatchEvent(new CustomEvent(l.vF,{detail:(0,o.A)(t)})),new Error},signal:this.controller.signal})}checkForUnclearPrompt(){if(this.isPromptClear)return;const e=this.fullMessage.replace(/__|(\*\*)/g,"");if(e.startsWith("JETPACK_AI_ERROR")){if(this.errorUnclearPromptTriggered)return;this.errorUnclearPromptTriggered=!0,this.dispatchEvent(new CustomEvent(l.bC)),c("Unclear error prompt dispatched"),this.dispatchEvent(new CustomEvent(l.vF,{detail:(0,o.A)(l.bC)}))}else"JETPACK_AI_ERROR".startsWith(e)?c(this.fullMessage):this.isPromptClear=!0}close(){this.controller.abort()}processEvent(e){if("[DONE]"===e.data){if(this.errorUnclearPromptTriggered)return;if(this.fullMessage.length)return this.dispatchEvent(new CustomEvent("done",{detail:this.fullMessage})),void c("Done: %o",this.fullMessage);if(this.fullFunctionCall.name.length)return this.dispatchEvent(new CustomEvent("function_done",{detail:this.fullFunctionCall})),void c("Done: %o",this.fullFunctionCall)}let t;try{t=JSON.parse(e.data)}catch(t){return void c("Error parsing JSON",e,t)}const{delta:r}=t?.choices?.[0]??{delta:{content:null,function_call:null}},n=r.content,a=r.function_call;n&&(this.fullMessage+=n,this.checkForUnclearPrompt(),this.isPromptClear&&(this.dispatchEvent(new CustomEvent("chunk",{detail:n})),c("suggestion: %o",this.fullMessage),this.dispatchEvent(new CustomEvent("suggestion",{detail:this.fullMessage})))),a&&(null!=a.name&&(this.fullFunctionCall.name+=a.name),null!=a.arguments&&(this.fullFunctionCall.arguments+=a.arguments),this.dispatchEvent(new CustomEvent("functionCallChunk",{detail:this.fullFunctionCall})))}processConnectionError(e){c("Connection error: %o",e),this.dispatchEvent(new CustomEvent(l.co,{detail:e})),this.dispatchEvent(new CustomEvent(l.vF,{detail:(0,o.A)(l.co)}))}processErrorEvent(e){c("onerror: %o",e),this.dispatchEvent(new CustomEvent(l.co,{detail:e})),this.dispatchEvent(new CustomEvent(l.vF,{detail:(0,o.A)(l.co)}))}}},16700:(e,t,r)=>{"use strict";r.d(t,{$L:()=>a,$u:()=>n,bC:()=>l,co:()=>i,cv:()=>o,q4:()=>s,vF:()=>c});const n="error_service_unavailable",a="error_quota_exceeded",s="error_moderation",o="error_context_too_large",i="error_network",l="error_unclear_prompt",c="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 s,o;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,t=null){this.googleAnalyticsEnabled=e,this.googleAnalyticsKey=t},setMcAnalyticsEnabled:function(e){this.mcAnalyticsEnabled=e},setUser:function(e,t){o={ID:e,username:t}},setSuperProps:function(e){s=e},assignSuperProps:function(e){s=Object.assign(s||{},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,s,o){i.ga.recordPurchase(e,t,r,n,a,s,o)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(s&&(a("- Super Props: %o",s),t=Object.assign(t,s)),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||(o&&(e={userId:"u-"+o.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 s="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==r&&(s+=" [Option Label: "+r+"]"),void 0!==n&&(s+=" [Option Value: "+n+"]"),a(s),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,r,n)},recordPurchase:function(e,t,r,n,a,s,o){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:n,currency:o}),window.ga("ecommerce:addItem",{id:e,name:t,sku:r,price:a,quantity:s}),window.ga("ecommerce:send")}},identifyUser:function(){o&&window._tkq.push(["identifyUser",o.ID,o.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:()=>p});var n=r(61132),a=r(96483);function s(e){class t extends Error{constructor(...t){super(...t),this.name=e}}return t}const o=s("JsonParseError"),i=s("JsonParseAfterRedirectError"),l=s("Api404Error"),c=s("Api404AfterRedirectError"),u=s("FetchNetworkError");const p=new function(e,t){let r=e,s=e,o={"X-WP-Nonce":t},i={credentials:"same-origin",headers:o},l={method:"post",credentials:"same-origin",headers:Object.assign({},o,{"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){s=e},setApiNonce(e){o={"X-WP-Nonce":e},i={credentials:"same-origin",headers:o},l={method:"post",credentials:"same-origin",headers:Object.assign({},o,{"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(d).then(m)},fetchAuthorizationUrl:e=>p((0,a.addQueryArgs)(`${r}jetpack/v4/connection/authorize_url`,{no_iframe:"1",redirect_uri:e}),i).then(d).then(m),fetchSiteConnectionData:()=>p(`${r}jetpack/v4/connection/data`,i).then(m),fetchSiteConnectionStatus:()=>p(`${r}jetpack/v4/connection`,i).then(m),fetchSiteConnectionTest:()=>p(`${r}jetpack/v4/connection/test`,i).then(d).then(m),fetchUserConnectionData:()=>p(`${r}jetpack/v4/connection/data`,i).then(m),fetchUserTrackingSettings:()=>p(`${r}jetpack/v4/tracking/settings`,i).then(d).then(m),updateUserTrackingSettings:e=>h(`${r}jetpack/v4/tracking/settings`,l,{body:JSON.stringify(e)}).then(d).then(m),disconnectSite:()=>h(`${r}jetpack/v4/connection`,l,{body:JSON.stringify({isActive:!1})}).then(d).then(m),fetchConnectUrl:()=>p(`${r}jetpack/v4/connection/url`,i).then(d).then(m),unlinkUser:()=>h(`${r}jetpack/v4/connection/user`,l,{body:JSON.stringify({linked:!1})}).then(d).then(m),reconnect:()=>h(`${r}jetpack/v4/connection/reconnect`,l).then(d).then(m),fetchConnectedPlugins:()=>p(`${r}jetpack/v4/connection/plugins`,i).then(d).then(m),setHasSeenWCConnectionModal:()=>h(`${r}jetpack/v4/seen-wc-connection-modal`,l).then(d).then(m),fetchModules:()=>p(`${r}jetpack/v4/module/all`,i).then(d).then(m),fetchModule:e=>p(`${r}jetpack/v4/module/${e}`,i).then(d).then(m),activateModule:e=>h(`${r}jetpack/v4/module/${e}/active`,l,{body:JSON.stringify({active:!0})}).then(d).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(d).then(m),updateSettings:e=>h(`${r}jetpack/v4/settings`,l,{body:JSON.stringify(e)}).then(d).then(m),getProtectCount:()=>p(`${r}jetpack/v4/module/protect/data`,i).then(d).then(m),resetOptions:e=>h(`${r}jetpack/v4/options/${e}`,l,{body:JSON.stringify({reset:!0})}).then(d).then(m),activateVaultPress:()=>h(`${r}jetpack/v4/plugins`,l,{body:JSON.stringify({slug:"vaultpress",status:"active"})}).then(d).then(m),getVaultPressData:()=>p(`${r}jetpack/v4/module/vaultpress/data`,i).then(d).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(d).then(m)},activateAkismet:()=>h(`${r}jetpack/v4/plugins`,l,{body:JSON.stringify({slug:"akismet",status:"active"})}).then(d).then(m),getAkismetData:()=>p(`${r}jetpack/v4/module/akismet/data`,i).then(d).then(m),checkAkismetKey:()=>p(`${r}jetpack/v4/module/akismet/key/check`,i).then(d).then(m),checkAkismetKeyTyped:e=>h(`${r}jetpack/v4/module/akismet/key/check`,l,{body:JSON.stringify({api_key:e})}).then(d).then(m),fetchStatsData:e=>p(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(d).then(m).then(f),getPluginUpdates:()=>p(`${r}jetpack/v4/updates/plugins`,i).then(d).then(m),getPlans:()=>p(`${r}jetpack/v4/plans`,i).then(d).then(m),fetchSettings:()=>p(`${r}jetpack/v4/settings`,i).then(d).then(m),updateSetting:e=>h(`${r}jetpack/v4/settings`,l,{body:JSON.stringify(e)}).then(d).then(m),fetchSiteData:()=>p(`${r}jetpack/v4/site`,i).then(d).then(m).then((e=>JSON.parse(e.data))),fetchSiteFeatures:()=>p(`${r}jetpack/v4/site/features`,i).then(d).then(m).then((e=>JSON.parse(e.data))),fetchSiteProducts:()=>p(`${r}jetpack/v4/site/products`,i).then(d).then(m),fetchSitePurchases:()=>p(`${r}jetpack/v4/site/purchases`,i).then(d).then(m).then((e=>JSON.parse(e.data))),fetchSiteBenefits:()=>p(`${r}jetpack/v4/site/benefits`,i).then(d).then(m).then((e=>JSON.parse(e.data))),fetchSiteDiscount:()=>p(`${r}jetpack/v4/site/discount`,i).then(d).then(m).then((e=>e.data)),fetchSetupQuestionnaire:()=>p(`${r}jetpack/v4/setup/questionnaire`,i).then(d).then(m),fetchRecommendationsData:()=>p(`${r}jetpack/v4/recommendations/data`,i).then(d).then(m),fetchRecommendationsProductSuggestions:()=>p(`${r}jetpack/v4/recommendations/product-suggestions`,i).then(d).then(m),fetchRecommendationsUpsell:()=>p(`${r}jetpack/v4/recommendations/upsell`,i).then(d).then(m),fetchRecommendationsConditional:()=>p(`${r}jetpack/v4/recommendations/conditional`,i).then(d).then(m),saveRecommendationsData:e=>h(`${r}jetpack/v4/recommendations/data`,l,{body:JSON.stringify({data:e})}).then(d),fetchProducts:()=>p(`${r}jetpack/v4/products`,i).then(d).then(m),fetchRewindStatus:()=>p(`${r}jetpack/v4/rewind`,i).then(d).then(m).then((e=>JSON.parse(e.data))),fetchScanStatus:()=>p(`${r}jetpack/v4/scan`,i).then(d).then(m).then((e=>JSON.parse(e.data))),dismissJetpackNotice:e=>h(`${r}jetpack/v4/notice/${e}`,l,{body:JSON.stringify({dismissed:!0})}).then(d).then(m),fetchPluginsData:()=>p(`${r}jetpack/v4/plugins`,i).then(d).then(m),fetchIntroOffers:()=>p(`${r}jetpack/v4/intro-offers`,i).then(d).then(m),fetchVerifySiteGoogleStatus:e=>p(null!==e?`${r}jetpack/v4/verify-site/google/${e}`:`${r}jetpack/v4/verify-site/google`,i).then(d).then(m),verifySiteGoogle:e=>h(`${r}jetpack/v4/verify-site/google`,l,{body:JSON.stringify({keyring_id:e})}).then(d).then(m),submitSurvey:e=>h(`${r}jetpack/v4/marketing/survey`,l,{body:JSON.stringify(e)}).then(d).then(m),saveSetupQuestionnaire:e=>h(`${r}jetpack/v4/setup/questionnaire`,l,{body:JSON.stringify(e)}).then(d).then(m),updateLicensingError:e=>h(`${r}jetpack/v4/licensing/error`,l,{body:JSON.stringify(e)}).then(d).then(m),updateLicenseKey:e=>h(`${r}jetpack/v4/licensing/set-license`,l,{body:JSON.stringify({license:e})}).then(d).then(m),getUserLicensesCounts:()=>p(`${r}jetpack/v4/licensing/user/counts`,i).then(d).then(m),getUserLicenses:()=>p(`${r}jetpack/v4/licensing/user/licenses`,i).then(d).then(m),updateLicensingActivationNoticeDismiss:e=>h(`${r}jetpack/v4/licensing/user/activation-notice-dismiss`,l,{body:JSON.stringify({last_detached_count:e})}).then(d).then(m),updateRecommendationsStep:e=>h(`${r}jetpack/v4/recommendations/step`,l,{body:JSON.stringify({step:e})}).then(d),confirmIDCSafeMode:()=>h(`${r}jetpack/v4/identity-crisis/confirm-safe-mode`,l).then(d),startIDCFresh:e=>h(`${r}jetpack/v4/identity-crisis/start-fresh`,l,{body:JSON.stringify({redirect_uri:e})}).then(d).then(m),migrateIDC:()=>h(`${r}jetpack/v4/identity-crisis/migrate`,l).then(d),attachLicenses:e=>h(`${r}jetpack/v4/licensing/attach-licenses`,l,{body:JSON.stringify({licenses:e})}).then(d).then(m),fetchSearchPlanInfo:()=>p(`${s}jetpack/v4/search/plan`,i).then(d).then(m),fetchSearchSettings:()=>p(`${s}jetpack/v4/search/settings`,i).then(d).then(m),updateSearchSettings:e=>h(`${s}jetpack/v4/search/settings`,l,{body:JSON.stringify(e)}).then(d).then(m),fetchSearchStats:()=>p(`${s}jetpack/v4/search/stats`,i).then(d).then(m),fetchWafSettings:()=>p(`${r}jetpack/v4/waf`,i).then(d).then(m),updateWafSettings:e=>h(`${r}jetpack/v4/waf`,l,{body:JSON.stringify(e)}).then(d).then(m),fetchWordAdsSettings:()=>p(`${r}jetpack/v4/wordads/settings`,i).then(d).then(m),updateWordAdsSettings:e=>h(`${r}jetpack/v4/wordads/settings`,l,{body:JSON.stringify(e)}),fetchSearchPricing:()=>p(`${s}jetpack/v4/search/pricing`,i).then(d).then(m),fetchMigrationStatus:()=>p(`${r}jetpack/v4/migration/status`,i).then(d).then(m),fetchBackupUndoEvent:()=>p(`${r}jetpack/v4/site/backup/undo-event`,i).then(d).then(m)};function p(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 d(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 o}function g(){throw new u}},22636:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(65235),a=r.n(n),s=r(99196),o=r.n(s),i=r(46409);const l=({children:e=null,width:t=null,height:r=null,className:n=""})=>o().createElement("div",{className:a()(i.Z.placeholder,n),style:{width:t,height:r}},e)},49777:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(28918);const a=({value:e="https://jetpack.com",bgColor:t,fgColor:r,level:a,includeMargin:s,imageSettings:o,renderAs:i="canvas",size:l=248})=>React.createElement(n.ZP,{value:e,size:l,bgColor:t,fgColor:r,level:a,includeMargin:s,imageSettings:o,renderAs:i})},45033:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(25162),a=r.n(n),s=r(99196),o=r.n(s);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 o().createElement("div",{className:t},o().createElement("div",{className:"jp-components-spinner__outer",style:r},o().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:()=>d});var n=r(99196),a=r.n(n),s=r(93468);const o={"--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={},p=(e,t,r)=>{const n={...o,...i,...l,...c};for(const t in n)e.style.setProperty(t,n[t]);r&&e.classList.add(s.Z.global),t&&(u[t]={provided:!0,root:e})},d=({children:e=null,targetDom:t,id:r,withGlobalStyles:s=!0})=>{const o=(0,n.useRef)(),i=u?.[r]?.provided;return(0,n.useLayoutEffect)((()=>{if(!i)return t?p(t,r,s):void(o?.current&&p(o.current,r,s))}),[t,o,i,r,s]),t?a().createElement(a().Fragment,null,e):a().createElement("div",{ref:o},e)}},6895:(e,t,r)=>{"use strict";function n(e,t={}){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.currentBlogID??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),s=r(99196),o=r(80428);const i=window?.JP_CONNECTION_INITIAL_STATE?window.JP_CONNECTION_INITIAL_STATE:{},l=({registrationNonce:e=i.registrationNonce,apiRoot:t=i.apiRoot,apiNonce:r=i.apiNonce,redirectUri:l,autoTrigger:c,from:u,skipUserConnection:p}={})=>{const{registerSite:d,connectUser:m,refreshConnectedPlugins:h}=(0,a.useDispatch)(o.t),g=(0,a.useSelect)((e=>e(o.t).getRegistrationError())),{siteIsRegistering:f,userIsConnecting:b,userConnectionData:v,connectedPlugins:k,connectionErrors:y,isRegistered:w,isUserConnected:E,hasConnectedOwner:_,isOfflineMode:C}=(0,a.useSelect)((e=>({siteIsRegistering:e(o.t).getSiteIsRegistering(),userIsConnecting:e(o.t).getUserIsConnecting(),userConnectionData:e(o.t).getUserConnectionData(),connectedPlugins:e(o.t).getConnectedPlugins(),connectionErrors:e(o.t).getConnectionErrors(),isOfflineMode:e(o.t).getIsOfflineMode(),...e(o.t).getConnectionStatus()}))),S=()=>p?l?(window.location=l,Promise.resolve(l)):Promise.resolve():m({from:u,redirectUri:l}),x=t=>(t&&t.preventDefault(),w?S():d({registrationNonce:e,redirectUri:l}).then((()=>S())));return(0,s.useEffect)((()=>{n.ZP.setApiRoot(t),n.ZP.setApiNonce(r)}),[t,r]),(0,s.useEffect)((()=>{!c||f||b||x()}),[]),{handleRegisterSite:x,handleConnectUser:S,refreshConnectedPlugins:h,isRegistered:w,isUserConnected:E,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:()=>s,N4:()=>i,Qo:()=>p,T1:()=>c,TS:()=>u,ZP:()=>E,b5:()=>m,i6:()=>a,qJ:()=>h,qV:()=>l,r7:()=>o,wQ:()=>d});var n=r(64743);const a="SET_CONNECTION_STATUS",s="SET_CONNECTION_STATUS_IS_FETCHING",o="SET_SITE_IS_REGISTERING",i="SET_USER_IS_CONNECTING",l="SET_REGISTRATION_ERROR",c="CLEAR_REGISTRATION_ERROR",u="SET_AUTHORIZATION_URL",p="DISCONNECT_USER_SUCCESS",d="SET_CONNECTED_PLUGINS",m="SET_CONNECTION_ERRORS",h="SET_IS_OFFLINE_MODE",g=e=>({type:a,connectionStatus:e}),f=e=>({type:o,isRegistering:e}),b=e=>({type:i,isConnecting:e}),v=e=>({type:l,registrationError:e}),k=()=>({type:c}),y=e=>({type:u,authorizationUrl:e}),w=e=>({type:d,connectedPlugins:e});const E={setConnectionStatus:g,setConnectionStatusIsFetching:e=>({type:s,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*({registrationNonce:e,redirectUri:t}){yield k(),yield f(!0);try{const r=yield{type:"REGISTER_SITE",registrationNonce:e,redirectUri:t};return yield g({isRegistered:!0}),yield y(r.authorizeUrl),yield f(!1),Promise.resolve(r)}catch(e){return yield v(e),yield f(!1),Promise.reject(e)}},connectUser:function*({from:e,redirectFunc:t,redirectUri:r}={}){yield b(!0),yield{type:"CONNECT_USER",from:e,redirectFunc:t,redirectUri:r}},disconnectUserSuccess:()=>({type:p}),setConnectedPlugins:w,refreshConnectedPlugins:()=>async({dispatch:e})=>await new Promise((t=>n.ZP.fetchConnectedPlugins().then((r=>{e(w(r)),t(r)})))),setConnectionErrors:e=>({type:m,connectionErrors:e}),setIsOfflineMode:e=>({type:h,isOfflineMode:e})}},31432:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(64743),a=r(9818),s=r(27057);const o={FETCH_AUTHORIZATION_URL:({redirectUri:e})=>n.ZP.fetchAuthorizationUrl(e),REGISTER_SITE:({registrationNonce:e,redirectUri:t})=>n.ZP.registerSite(e,t),CONNECT_USER:(0,a.createRegistryControl)((({resolveSelect:e})=>({from:t,redirectFunc:r,redirectUri:n}={})=>new Promise(((a,o)=>{e(s.Z).getAuthorizationUrl(n).then((e=>{const n=r||(e=>window.location.assign(e)),s=new URL(e);t&&s.searchParams.set("from",encodeURIComponent(t));const o=s.toString();n(o),a(o)})).catch((e=>{o(e)}))}))))}},41479:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(9818),a=r(27523);const s=(0,n.combineReducers)({connectionStatus:(e={},t)=>{switch(t.type){case a.i6:return{...e,...t.connectionStatus};case a.Qo:return{...e,isUserConnected:!1}}return e},connectionStatusIsFetching:(e=!1,t)=>t.type===a.LI?t.isFetching:e,siteIsRegistering:(e=!1,t)=>t.type===a.r7?t.isRegistering:e,userIsConnecting:(e=!1,t)=>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:(e={},t)=>t.type===a.wQ?t.connectedPlugins:e,connectionErrors:(e={},t)=>t.type===a.b5?t.connectionErrors:e,isOfflineMode:(e=!1,t)=>t.type===a.qJ?t.isConnecting:e})},77728:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(9818),a=r(27523),s=r(27057);const o={...{getAuthorizationUrl:{isFulfilled:(e,...t)=>{const r=Boolean(e.authorizationUrl),a=(0,n.select)(s.Z).hasFinishedResolution("getAuthorizationUrl",t);return r&&!a&&(0,n.dispatch)(s.Z).finishResolution("getAuthorizationUrl",t),r},*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:()=>s});var n=r(9818);class a{static store=null;static mayBeInit(e,t){null===a.store&&(a.store=(0,n.createReduxStore)(e,t),(0,n.register)(a.store))}}const s=a},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),s=r(41479),o=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:s.Z,actions:n.ZP,selectors:i.Z,resolvers:o.Z,controls:a.Z,initialState:u||{}})},13419:(e,t,r)=>{"use strict";r.d(t,{Dp:()=>c.Z,FK:()=>l.FK,HD:()=>l.HD,M6:()=>s.M6,OZ:()=>o.Z,Pb:()=>n.Z,Qq:()=>l.Qq,Rl:()=>l.Rl,T:()=>i.Z,Ug:()=>s.Ug,Wp:()=>s.Wp,X1:()=>l.X1,_D:()=>l._D,dM:()=>d.d,el:()=>p.Z,lQ:()=>a.Z,lt:()=>d.l,m3:()=>l.m3,og:()=>m.Z,z$:()=>u.Z});var n=r(50148),a=r(35004),s=r(99505),o=r(48052),i=(r(76714),r(80354)),l=r(75404),c=r(68586),u=r(61053),p=r(11380),d=(r(6342),r(96959)),m=r(19499);r(39058)},6342:(e,t,r)=>{"use strict";r(99196)},96959:(e,t,r)=>{"use strict";r.d(t,{d:()=>s,l:()=>o});var n=r(69307),a=r(12953);function s(e){const t={};let r="span",a=e.icon;const s=document.createElement("div");s.innerHTML=e.icon;const o=s.querySelector("svg");return o&&(r="svg",a=o.innerHTML,Array.from(o.attributes).forEach((({nodeName:e,nodeValue:r})=>t[e]=r))),(0,n.createElement)(r,{...t,dangerouslySetInnerHTML:{__html:a||""}})}function o(e){return{src:s(e),foreground:(0,a.Z)()}}},12953:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(99505);const a="#069e08";function s(){return(0,n.Ug)()||(0,n.Wp)()?null:a}},19499:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(50148);function a(){const e=(0,n.Z)();return e?.blocks_variation??"production"}},50148:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});const n="Jetpack_Editor_Initial_State";function a(){return"object"==typeof window?window?.[n]??null:null}},48052:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(50148);function a(e){const t=(0,n.Z)(),r=t?.available_blocks?.[e]?.available??!1,a=t?.available_blocks?.[e]?.unavailable_reason??"unknown";return{available:r,...!r&&{details:t?.available_blocks?.[e]?.details??[],unavailableReason:a}}}},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),s=r(69307);const{tracks:o}=n.Z,{recordEvent:i}=o,l=({pageViewEventName:e=null,pageViewNamespace:t="jetpack",pageViewSuffix:r="page_view",pageViewEventProperties:l={}}={})=>{const[c,u]=(0,s.useState)(!1),{isUserConnected:p,isRegistered:d,userConnectionData:m={}}=(0,a.Z)(),{wpcomUser:{login:h,ID:g}={},blogId:f}=m.currentUser||{},b=(0,s.useCallback)((async(e,t={})=>{p&&g&&h&&i(e,t)}),[p,g,h]);return(0,s.useEffect)((()=>{p&&g&&h&&f&&n.Z.initialize(g,h,{blog_id:f})}),[f,g,h,p]),(0,s.useEffect)((()=>{const n=e?`${t}_${e}_${r}`:null;d&&n&&(c||(b(n,l),u(!0)))}),[c,t,e,r,d,l,b]),{recordEvent:b,tracks:o}}},11380:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(9818),a=r(69307),s=r(39058);const o=e=>{const{isModuleActive:t,isChangingStatus:r,isLoadingModules:o}=(0,n.useSelect)((t=>{const r=t(s.p);return{isModuleActive:r.isModuleActive(e),isChangingStatus:r.isModuleUpdating(e),isLoadingModules:r.areModulesLoading(e)}}),[s.p]),{updateJetpackModuleStatus:i}=(0,n.useDispatch)(s.p),l=(0,a.useCallback)((t=>i({name:e,active:t})),[e,i]);return(0,a.useMemo)((()=>({isLoadingModules:o,isChangingStatus:r,isModuleActive:t,changeStatus:l})),[o,r,t,l])}},68586:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(50148);function a(){return(0,n.Z)()?.jetpack?.is_current_user_connected??!1}},44166:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>d,rW:()=>p});var n=r(9818),a=r(99505),s=r(82162),o=r(39058);const i="SET_JETPACK_MODULES",l="SET_MODULE_UPDATING";function c(e){return p({isLoading:e})}function u(e,t){return{type:l,name:e,isUpdating:t}}function p(e){return{type:i,options:e}}const d={updateJetpackModuleStatus:function*(e){try{yield u(e.name,!0),yield(0,s.zL)(e);const t=yield(0,s.Bs)();return yield p({data:t}),!0}catch(e){const t=(0,n.select)(o.p).getJetpackModules();return yield p(t),!1}finally{yield u(e.name,!1)}},setJetpackModules:p,fetchModules:function*(){if((0,a.Wp)())return!0;try{yield c(!0);const e=yield(0,s.Bs)();return yield p({data:e}),!0}catch(e){const t=(0,n.select)(o.p).getJetpackModules();return yield p(t),!1}finally{yield c(!1)}}}},82162:(e,t,r)=>{"use strict";r.d(t,{Bs:()=>i,ZP:()=>c,zL:()=>l});var n=r(86989),a=r.n(n);const s="FETCH_JETPACK_MODULES",o="UPDATE_JETPACK_MODULE_STATUS",i=()=>({type:s}),l=e=>({type:o,settings:e}),c={[s]:function(){return a()({path:"/jetpack/v4/module/all",method:"GET"})},[o]:function({settings:e}){return a()({path:`/jetpack/v4/module/${e.name}/active`,method:"POST",data:{active:e.active}})}}},39058:(e,t,r)=>{"use strict";r.d(t,{p:()=>c});var n=r(9818),a=r(44166),s=r(82162),o=r(42469),i=r(55133),l=r(43524);const c="jetpack-modules",u=(0,n.createReduxStore)(c,{reducer:o.Z,actions:a.ZP,controls:s.ZP,resolvers:i.Z,selectors:l.Z});(0,n.register)(u);const p=window?.Initial_State?.getModules||window?.Jetpack_Editor_Initial_State?.modules||null;null!==p&&(0,n.dispatch)(c).setJetpackModules({data:{...p}})},42469:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});const n={isLoading:!1,isUpdating:{},data:{}},a=(e=n,t)=>{switch(t.type){case"SET_JETPACK_MODULES":return{...e,...t.options};case"SET_MODULE_UPDATING":return{...e,isUpdating:{...e.isUpdating,[t.name]:t.isUpdating}}}return e}},55133:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(44166),a=r(82162);const s={getJetpackModules:function*(){try{const e=yield(0,a.Bs)();if(e)return(0,n.rW)({data:e})}catch(e){console.error(e)}}}},43524:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(99505);const a={getJetpackModules:e=>e.data,isModuleActive:(e,t)=>(0,n.Wp)()||(e?.data?.[t]?.activated??!1),areModulesLoading:e=>e.isLoading??!1,isModuleUpdating:(e,t)=>e?.isUpdating?.[t]??!1}},75404:(e,t,r)=>{"use strict";r.d(t,{FK:()=>g,HD:()=>f,Qq:()=>u,Rl:()=>m,X1:()=>p,_D:()=>d,m3:()=>b});var n=r(65736),a=r(96483),s=r(92819),o=r(50148),i=r(48052),l=r(35004),c=r(99505);const __=n.__;function u({planSlug:e,plan:t,postId:r,postType:n}){const o=(0,s.startsWith)(e,"jetpack_")?e:(0,s.get)(t,["path_slug"]),i=(void 0===n?()=>{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(n)?"":"edit";return(0,c.Wp)()?(0,a.addQueryArgs)("/"+(0,s.compact)([e,n,(0,l.Z)(),r]).join("/"),{plan_upgraded:1}):(0,a.addQueryArgs)(window.location.protocol+`//${(0,l.Z)().replace("::","/")}/wp-admin/post.php`,{action:"edit",post:r,plan_upgraded:1})})();return(0,c.Ug)()?(0,a.addQueryArgs)(`https://wordpress.com/plans/${(0,l.Z)()}`,{redirect_to:i,customerType:"business"}):o&&(0,a.addQueryArgs)(`https://wordpress.com/checkout/${(0,l.Z)()}/${o}`,{redirect_to:i})}function p(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 d(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 d(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,s.get)((0,o.Z)(),"jetpack.enable_upgrade_nudge",!1)}const f=e=>(0,s.map)(h,"name").includes(e),b=e=>(0,s.head)((0,s.filter)(h,(({name:t})=>t===e)))},76714:(e,t,r)=>{"use strict";r(98817)},99505:(e,t,r)=>{"use strict";r.d(t,{M6:()=>i,Ug:()=>o,Wp:()=>s});var n=r(50148);function a(){return"object"==typeof window&&"string"==typeof window._currentSiteType?window._currentSiteType:null}function s(){return"simple"===a()}function o(){return"atomic"===a()}function i(){const e=(0,n.Z)();return e?.jetpack?.is_private_site??!1}},80354:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(82674),a=r.n(n),s=r(94333);const o=e=>(0,s.createHigherOrderComponent)((t=>r=>React.createElement(t,a()({},r,{className:r.name===e?"has-warning is-interactive":r.className}))),"withHasWarningIsInteractiveClassNames")},83059:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>j});var n=r(51806),a=r(42290),s=r(13419),o=r(4981),i=r(55609),l=r(9818),c=r(69307),u=r(65736),p=r(586),d=r(3639),m=r(92710),h=r(58532),g=r(51128),f=r.n(g),b=(r(99196),r(49259)),v=r(63634),k=r(854),y=r(6747),w=r(81612),E=r(27298);const __=u.__,_=f()("jetpack-ai-assistant:dropdown"),C=[{name:__("Correct spelling and grammar","jetpack"),key:"correct-spelling",aiSuggestion:v.Hd,icon:p.Z},{name:__("Simplify","jetpack"),key:"simplify",aiSuggestion:v.hI,icon:d.Z},{name:__("Summarize","jetpack"),key:"summarize",aiSuggestion:v.Lq,icon:m.Z},{name:__("Expand","jetpack"),key:"make-longer",aiSuggestion:v.TV,icon:h.Z}];function S(e){return e.filter((e=>null!=e)).map((e=>(0,o.getBlockContent)(e))).join("\n\n")}function x({onClose:e,blockType:t}){const[r,o]=(0,c.useState)(!1),{getSelectedBlockClientIds:u,getBlocksByClientId:p}=(0,l.useSelect)("core/block-editor"),{removeBlocks:d,replaceBlock:m}=(0,l.useDispatch)("core/block-editor");(0,c.useEffect)((()=>{const e=u(),t=S(p(e)),r=(0,k.t$)(t);return o(!r.length)}),[p,u]);const{tracks:h}=(0,s.z$)(),g=(r,n={})=>{const a=u(),s=p(a),o=S(s);e(),_("requestSuggestion",r,n),h.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_button_click",{suggestion:r,block_type:t});const[i]=s,[l,...c]=a,g={...i?.attributes||{},content:o},f=(0,y.b)(t,g),v={clientId:l,type:r,options:{...n,contentType:"generated",fromExtension:!0}};localStorage.setItem((0,b.$M)(f.clientId),JSON.stringify(v)),m(l,f),d(c)};return(0,n.createElement)(n.Fragment,null,r&&(0,n.createElement)(i.Notice,{status:"warning",isDismissible:!1,className:"jetpack-ai-assistant__info"},__("Add content to activate the tools below","jetpack")),(0,n.createElement)(i.MenuGroup,null,(0,n.createElement)(i.MenuItem,{icon:a.u_,iconPosition:"left",key:"key-ai-assistant",onClick:()=>{const e=u(),r=p(e),n=S(r),[a,...s]=e,[o]=r,i={...o?.attributes||{},content:n};m(a,(0,y.b)(t,i)),d(s),h.recordEvent("jetpack_ai_assistant_prompt_show",{block_type:t})},disabled:r},(0,n.createElement)("div",{className:"jetpack-ai-assistant__menu-item"},__("Ask AI Assistant","jetpack"))),C.map((e=>(0,n.createElement)(i.MenuItem,{icon:e?.icon,iconPosition:"left",key:`key-${e.key}`,onClick:()=>{g(e.aiSuggestion,{})},disabled:r},(0,n.createElement)("div",{className:"jetpack-ai-assistant__menu-item"},e.name)))),(0,n.createElement)(E.IP,{onChange:e=>{g(v.Lg,{tone:e})},disabled:r}),(0,n.createElement)(w.xK,{onChange:e=>{g(v.Nw,{language:e})},disabled:r})))}function j({blockType:e}){const{tracks:t}=(0,s.z$)();return(0,n.createElement)(i.Dropdown,{popoverProps:{variant:"toolbar"},renderToggle:({isOpen:e,onToggle:t})=>(0,n.createElement)(i.ToolbarButton,{className:"jetpack-ai-assistant__button",showTooltip:!0,onClick:t,"aria-haspopup":"true","aria-expanded":e,label:__("AI Assistant","jetpack"),icon:a.u_}),onToggle:r=>{r&&t.recordEvent("jetpack_ai_assistant_extension_toolbar_menu_show",{block_type:e})},renderContent:({onClose:t})=>(0,n.createElement)(x,{onClose:t,blockType:e})})}},3180:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(65736),s=r(26546),o=r(46867);const __=a.__,i=()=>{const e=`${window?.Jetpack_Editor_Initial_State?.adminUrl}admin.php?page=my-jetpack#/connection`,{autosaveAndRedirect:t,isRedirecting:r}=(0,o.Z)(e);return(0,n.createElement)(s.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})}},87445:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(6895),s=r(55609),o=r(65736);const __=o.__;const i=function(){const e=(0,a.Z)("jetpack-ai-feedback");return(0,n.createElement)("div",{className:"jetpack-ai-feedback-control"},(0,n.createElement)(s.BaseControl,{label:__("Feedback","jetpack")},(0,n.createElement)("p",null,__("Your feedback is valuable in our commitment to refine and improve this feature.","jetpack")),(0,n.createElement)(s.ExternalLink,{href:e},__("Share your feedback","jetpack"))))}},81612:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>f,xK:()=>b});var n=r(51806),a=r(13419),s=r(55609),o=r(65736),i=r(61074),l=r(46936),c=r(43618);r(99196);const __=o.__,u=["en","es","fr","de","it","pt","ru","zh","ja","ar","hi","ko"],p=window?.Jetpack_Editor_Initial_State?.siteLocale||navigator?.language,d=__("Translate","jetpack"),m=p?.split("-")[0]||"en",h=(p?.split("-"),{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")}}),g=({value:e,onChange:t})=>{const r=[...u.filter((e=>e!==m))];return u.includes(m)&&r.unshift(m),(0,n.createElement)(s.MenuGroup,{label:__("Select language","jetpack")},r.map((r=>(0,n.createElement)(s.MenuItem,{key:`key-${r}`,onClick:()=>t(r+" ("+h[r].label+")"),isSelected:e===r},h[r].label))))};function f({value:e=m,label:t=d,onChange:r,disabled:o=!1}){const{tracks:l}=(0,a.z$)();return o?(0,n.createElement)(s.Tooltip,{text:t},(0,n.createElement)(s.Button,{disabled:!0},(0,n.createElement)(i.Z,{icon:c.Z}))):(0,n.createElement)(s.ToolbarDropdownMenu,{icon:c.Z,label:t,popoverProps:{variant:"toolbar"},onToggle:e=>{e&&l.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"i18n"})}},(()=>(0,n.createElement)(g,{value:e,onChange:r})))}function b({value:e=m,label:t=d,onChange:r,disabled:a=!1}){return(0,n.createElement)(s.DropdownMenu,{className:"ai-assistant__i18n-dropdown",icon:c.Z,label:t,toggleProps:{children:(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:"ai-assistant__i18n-dropdown__toggle-label"},t),(0,n.createElement)(i.Z,{icon:l.Z})),disabled:a}},(({onClose:t})=>(0,n.createElement)(g,{onChange:e=>{r(e),t()},value:e})))}},50297:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(55609),s=r(65736);const __=s.__,o=({image:e,inModal:t=!1,saveImage:r,setImageModal:s})=>(0,n.createElement)(a.Flex,{direction:"column"},t&&(0,n.createElement)(a.FlexItem,{style:{textAlign:"center"}},(0,n.createElement)(a.Button,{variant:"primary",onClick:()=>r(e)},__("Use this image","jetpack"))),(0,n.createElement)(a.FlexBlock,null,(0,n.createElement)("input",{type:"image",className:"wp-block-ai-image-image",src:e,alt:"",onClick:()=>s(e)})),!t&&(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:()=>r(e)},__("Use this image","jetpack"))))))},24404:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>g});var n=r(51806),a=r(13419),s=r(55609),o=r(65736),i=r(77840);r(99196);const __=o.__,l="make-longer",c="makeLonger",u="make-shorter",p="makeShorter",d="summarize",m="summarize",h=[{name:__("Summarize","jetpack"),key:d,aiSuggestion:m},{name:__("Make longer","jetpack"),key:l,aiSuggestion:c},{name:__("Make shorter","jetpack"),key:u,aiSuggestion:p}];function g({key:e,label:t=__("Improve","jetpack"),exclude:r=[],onChange:o,disabled:l=!1}){const{tracks:c}=(0,a.z$)();return l?(0,n.createElement)(s.Tooltip,{text:t},(0,n.createElement)(s.Button,{disabled:!0},(0,n.createElement)(s.Icon,{icon:i.Z}))):(0,n.createElement)(s.ToolbarDropdownMenu,{icon:i.Z,label:t,popoverProps:{variant:"toolbar"},onToggle:e=>{e&&c.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"improve"})}},(()=>{const a=h.filter((e=>!r.includes(e.key)));return(0,n.createElement)(s.MenuGroup,{label:t},a.map((t=>(0,n.createElement)(s.MenuItem,{key:`key-${t.key}`,onClick:()=>o(t.aiSuggestion,{contentType:"generated"}),isSelected:e===t.key},t.name))))}))}},85642:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>g});var n=r(51806),a=r(13419),s=r(55609),o=r(65736),i=r(77840),l=r(58532),c=r(586),u=r(3639),p=r(92710),d=r(32677);r(99196);const __=o.__,m=[{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")}}],h=[{label:__("Say it differently…","jetpack"),description:{original:"Rewrite it in a way that ",translated:__("Rewrite it in a way that ","jetpack")}},{label:__("Add…","jetpack"),description:{original:"Add more details about ",translated:__("Add more details about ","jetpack")}},{label:__("Remove…","jetpack"),description:{original:"Remove unnecessary details about ",translated:__("Remove unnecessary details about ","jetpack")}}];function g({hasContentBefore:e,hasContent:t,hasPostTitle:r,contentIsLoaded:o,onPromptSelect:g,onSuggestionSelect:f}){const b=__("Write with AI…","jetpack"),{tracks:v}=(0,a.z$)();return(0,n.createElement)(s.ToolbarDropdownMenu,{className:"jetpack-ai-assistant__templates-control",icon:null,label:b,text:b,onToggle:e=>{e&&v.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"write-with-ai"})}},(({onClose:a})=>o?(0,n.createElement)(s.MenuGroup,{label:__("Write…","jetpack")},h.map(((e,t)=>(0,n.createElement)(s.MenuItem,{icon:i.Z,iconPosition:"left",key:`key-${t}`,onClick:()=>{a(),g(e.description)}},e.label)))):(0,n.createElement)(n.Fragment,null,e&&(0,n.createElement)(s.MenuGroup,{label:__("Based on preceding content…","jetpack")},(0,n.createElement)(s.MenuItem,{icon:l.Z,iconPosition:"left",onClick:()=>f("continue")},__("Continue writing","jetpack")),(0,n.createElement)(s.MenuItem,{icon:c.Z,iconPosition:"left",onClick:()=>f("correctSpelling")},__("Correct spelling and grammar","jetpack")),(0,n.createElement)(s.MenuItem,{icon:u.Z,iconPosition:"left",onClick:()=>f("simplify")},__("Simplify","jetpack"))),t&&(0,n.createElement)(s.MenuGroup,{label:__("Based on entire content…","jetpack")},t&&(0,n.createElement)(s.MenuItem,{icon:p.Z,iconPosition:"left",onClick:()=>f("summarize")},__("Summarize","jetpack")),t&&(0,n.createElement)(s.MenuItem,{icon:d.Z,iconPosition:"left",onClick:()=>f("generateTitle")},__("Generate a post title","jetpack"))),(0,n.createElement)(s.MenuGroup,{label:__("Write…","jetpack")},r&&(0,n.createElement)(s.MenuItem,{icon:i.Z,iconPosition:"left",onClick:()=>f("titleSummary")},__("Summary based on title","jetpack")),m.map(((e,t)=>(0,n.createElement)(s.MenuItem,{icon:i.Z,iconPosition:"left",key:`key-${t}`,onClick:()=>{a(),g(e.description)}},e.label)))))))}},27298:(e,t,r)=>{"use strict";r.d(t,{IP:()=>m,Nj:()=>u,ZP:()=>h});var n=r(51806),a=r(42290),s=r(13419),o=r(55609),i=r(65736),l=r(46936);r(99196);const __=i.__,c=["formal","informal","optimistic","humorous","serious","skeptical","empathetic","confident","passionate","provocative"],u="formal",p={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=({value:e,onChange:t})=>(0,n.createElement)(o.MenuGroup,{label:__("Select tone","jetpack")},c.map((r=>(0,n.createElement)(o.MenuItem,{key:`key-${r}`,onClick:()=>t(r),isSelected:e===r},`${p[r].emoji} ${p[r].label}`))));function m({label:e=__("Change tone","jetpack"),value:t=u,onChange:r,disabled:s=!1}){return(0,n.createElement)(o.DropdownMenu,{icon:a.v_,label:e,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"},e),(0,n.createElement)(o.Icon,{icon:l.Z})),disabled:s}},(({onClose:e})=>(0,n.createElement)(d,{value:t,onChange:t=>{r(t),e()}})))}function h({value:e=u,onChange:t,disabled:r=!1}){const i=__("Change tone","jetpack"),{tracks:l}=(0,s.z$)();return r?(0,n.createElement)(o.Tooltip,{text:i},(0,n.createElement)(o.Button,{disabled:!0},(0,n.createElement)(o.Icon,{icon:a.v_}))):(0,n.createElement)(o.ToolbarDropdownMenu,{icon:a.v_,label:i,popoverProps:{variant:"toolbar"},disabled:r,onToggle:e=>{e&&l.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"tone"})}},(()=>(0,n.createElement)(d,{value:e,onChange:t})))}},4965:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h});var n=r(51806),a=r(52175),s=r(55609),o=r(65736),i=r(79201),l=r(48381),c=(r(75022),r(63634)),u=r(81612),p=r(24404),d=r(85642),m=r(27298);const __=o.__,h=({contentIsLoaded:e,getSuggestionFromOpenAI:t,retryRequest:r,handleAcceptContent:o,handleImageRequest:h,handleTryAgain:g,showRetry:f,contentBefore:b,hasPostTitle:v,wholeContent:k,setUserPrompt:y,recordEvent:w,isGeneratingTitle:E})=>(0,n.createElement)(n.Fragment,null,(0,n.createElement)(a.BlockControls,null,!f&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(s.ToolbarGroup,null,(0,n.createElement)(d.ZP,{hasContentBefore:!!b?.length,hasContent:!!k?.length,hasPostTitle:v,contentIsLoaded:e,onPromptSelect:e=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"prompt-template",prompt:e.original}),y(e.translated)},onSuggestionSelect:e=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:e}),t(e)}})),(0,n.createElement)(a.BlockControls,{group:"block"},(0,n.createElement)(m.ZP,{value:"neutral",onChange:r=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:c.Lg}),t(c.Lg,{tone:r,contentType:e?"generated":null})},disabled:!e&&!k?.length}),(0,n.createElement)(u.ZP,{value:"en",onChange:r=>{w("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:c.Nw}),t(c.Nw,{language:r,contentType:e?"generated":null})},disabled:!e&&!k?.length}),(0,n.createElement)(p.ZP,{onChange:t,exclude:E?["summarize"]:[],disabled:!e}))),(f||g)&&(0,n.createElement)(s.ToolbarGroup,null,!f&&e&&g&&(0,n.createElement)(s.ToolbarButton,{onClick:g},__("Try Again","jetpack")),f&&e&&(0,n.createElement)(s.ToolbarButton,{icon:i.Z,onClick:o},__("Accept","jetpack")),f&&(0,n.createElement)(s.ToolbarButton,{icon:l.Z,onClick:r},__("Retry","jetpack"))),false))},5246:(e,t,r)=>{"use strict";r.d(t,{Z:()=>b});var n=r(51806),a=r(6895),s=r(13419),o=r(69307),i=r(65736),l=r(51128),c=r.n(l),u=r(99196),p=r(26546),d=r(23795),m=r(63206),h=r(18135),g=r(71449);const __=i.__,f=c()("jetpack-ai-assistant:upgrade-prompt"),b=e=>{const{upgradeType:t}=(0,h.Z)();return"vip"===t?(0,n.createElement)(p.p,{buttonText:null,checkoutUrl:null,className:"jetpack-ai-upgrade-banner",description:(0,o.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}):(({placement:e=null})=>{const{checkoutUrl:t,autosaveAndRedirect:r,isRedirecting:l}=(0,m.Z)(),c=(0,g.d)(),{nextTier:b,tierPlansEnabled:v,currentTier:k,requestsCount:y,usagePeriod:w}=(0,h.Z)(),E=(0,d.U_)(k)===d.dt?w?.requestsCount:y,{tracks:_}=(0,s.z$)(),C=(0,u.useCallback)((t=>{f("upgrade",e),_.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:k?.slug,requests_count:E,placement:e}),r(t)}),[r,k,E,_,e]),S=(0,u.useCallback)((()=>{f("contact us",e),_.recordEvent("jetpack_ai_upgrade_contact_us",{placement:e})}),[_,e]);if(!c)return(0,n.createElement)(p.p,{showButton:!1,className:"jetpack-ai-upgrade-banner",description:(0,o.createInterpolateElement)(__("Congratulations on exploring Jetpack AI and reaching the free requests limit! <strong>Reach out to the site administrator to upgrade and keep using Jetpack AI.</strong>","jetpack"),{strong:(0,n.createElement)("strong",null)}),visible:!0,align:null,title:null,context:null});if(v){if(!b){const e=(0,a.Z)("jetpack-ai-tiers-more-requests-contact");return(0,n.createElement)(p.p,{buttonText:__("Contact Us","jetpack"),description:__("You have reached the request limit for your current plan.","jetpack"),className:"jetpack-ai-upgrade-banner",checkoutUrl:e,visible:!0,align:null,title:null,context:null,goToCheckoutPage:S})}return(0,n.createElement)(p.p,{buttonText:(0,i.sprintf)(/* Translators: number of requests */
__("Upgrade to %d requests","jetpack"),b.limit),checkoutUrl:t,className:"jetpack-ai-upgrade-banner",description:(0,o.createInterpolateElement)((0,i.sprintf)(/* Translators: number of requests */
__("You have reached the requests limit for your current plan. <strong>Upgrade now to increase your requests limit to %d.</strong>","jetpack"),b.limit),{strong:(0,n.createElement)("strong",null)}),goToCheckoutPage:C,isRedirecting:l,visible:!0,align:"center",title:null,context:null})}return(0,n.createElement)(p.p,{buttonText:"Upgrade",checkoutUrl:t,className:"jetpack-ai-upgrade-banner",description:(0,o.createInterpolateElement)(__("Congratulations on exploring Jetpack AI and reaching the free requests limit! <strong>Upgrade now to keep using it.</strong>","jetpack"),{strong:(0,n.createElement)("strong",null)}),goToCheckoutPage:r,isRedirecting:l,visible:!0,align:null,title:null,context:null})})(e)}},45624:(e,t,r)=>{"use strict";r.d(t,{Z:()=>Z});var n=r(82674),a=r.n(n),s=r(51806),o=r(42290),i=r(13419),l=r(52175),c=r(4981),u=r(55609),p=r(94333),d=r(9818),m=r(69307),h=r(65736),g=r(65235),f=r.n(g),b=r(10185),v=r.n(b),k=r(99196),y=r(84102),w=r(80013),E=r(3180),_=r(87445),C=r(50297),S=r(4965),x=r(5246),j=r(49259),L=r(18135),A=r(60751),P=r(71449),T=r(3687),N=r(63634);const __=h.__,M=new(v())({breaks:!0}),R="post"===window?.Jetpack_Editor_Initial_State?.screenBase,I=window?.Jetpack_Editor_Initial_State?.["ai-assistant"]?.["is-playground-visible"];function Z({attributes:e,setAttributes:t,clientId:r,isSelected:n}){const[h,g]=(0,m.useState)({}),[b,v]=(0,m.useState)(!1),[Z,D]=(0,m.useState)([]),[B,O]=(0,m.useState)(null),[F,U]=(0,m.useState)(null),{tracks:z}=(0,i.z$)(),q=(0,d.useSelect)((e=>e("core/editor").getCurrentPostId())),{getBlock:$}=(0,d.useSelect)("core/block-editor"),H=(0,k.useRef)(null),V=(0,k.useRef)(null),{replaceBlocks:G,replaceBlock:W,removeBlock:J}=(0,d.useDispatch)("core/block-editor"),{editPost:K}=(0,d.useDispatch)("core/editor"),{mediaUpload:Y}=(0,d.useSelect)((e=>{const{getSettings:t}=e("core/block-editor");return{mediaUpload:t().mediaUpload}}),[]),{isOverLimit:Q,requireUpgrade:X,increaseRequestsCount:ee}=(0,L.Z)(),te=()=>{setTimeout((()=>{H.current?.focus?.()}),100)},re=()=>{setTimeout((()=>{V.current?.focus?.()}),100)},ne=(0,p.useViewportMatch)("medium","<"),{isLoadingCategories:ae,isLoadingCompletion:se,wasCompletionJustRequested:oe,getSuggestionFromOpenAI:ie,stopSuggestion:le,showRetry:ce,contentBefore:ue,postTitle:pe,retryRequest:de,wholeContent:me,requestingState:he}=(0,A.Z)({onSuggestionDone:(0,m.useCallback)((()=>{te(),ee()}),[ee]),onUnclearPrompt:(0,m.useCallback)((()=>{re(),ee()}),[ee]),onModeration:te,attributes:e,clientId:r,content:e.content,setError:g,tracks:z,userPrompt:e.userPrompt,requireUpgrade:X,requestingState:e.requestingState}),ge=(0,P.b)(),fe=(0,j.$M)(r);(0,k.useEffect)((()=>{if(!fe)return;const e=JSON.parse(localStorage.getItem(fe));if(!e)return;const{type:t,options:r}=e;localStorage.removeItem(fe),ie(t,r)}),[fe,ie]),(0,k.useEffect)((()=>{h&&U(!1)}),[h]);const be=(0,k.useRef)(e?.content);(0,k.useEffect)((()=>{if(!e?.useGutenbergSyntax)return;if(!be?.current?.length)return;const t=$(r);if(t?.innerBlocks?.length)return;const n=(0,c.parse)(be.current);n?.length&&G(r,n)}),[be,r,G,$,e?.useGutenbergSyntax]),(0,k.useEffect)((()=>{["init","done"].includes(he)&&t({requestingState:he})}),[he,t]);const ve=async t=>{if(b)return;v(!0),g({});const n=await fetch(t),a=await n.blob(),s=new File([a],"jetpack_ai_image.png",{type:"image/png"});Y({filesList:[s],onFileChange:([t])=>{t.id&&W(r,(0,c.createBlock)("core/image",{url:t.url,caption:e.requestedPrompt,alt:e.requestedPrompt}))},allowedTypes:["image"],onError:e=>{console.error(e),v(!1)}}),z.recordEvent("jetpack_ai_dalle_generation_upload",{post_id:q})},ke=e?.useGutenbergSyntax,ye=se||ae,we=!!e.content,Ee="generateTitle"===e.promptType,_e=__("Accept","jetpack"),Ce=__("Accept title","jetpack"),Se=Ee?Ce:_e,xe=(...e)=>{ie(...e),re()},je=async()=>{let t=[];if(ke)t=$(r),t=t?.innerBlocks||[];else{const r=M.render(e.content||"").replace(/<li>\s+<p>/g,"<li>").replace(/<\/p>\s+<\/li>/g,"</li>");t=(0,c.rawHandler)({HTML:r})}await G(r,t);const n=(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})(t);n&&(e=>{const t=window.getSelection();t.selectAllChildren(e),t.collapseToEnd(),e.focus()})(n)},Le=()=>{je(),z.recordEvent("jetpack_ai_assistant_block_accept",{feature:"ai-assistant"})},Ae=()=>{R?(K({title:e.content?e.content.trim():""}),J(r),z.recordEvent("jetpack_ai_assistant_block_accept",{feature:"ai-assistant"})):Le()},Pe=()=>{le(),te(),z.recordEvent("jetpack_ai_assistant_block_stop",{feature:"ai-assistant"})},[Te,Ne]=(0,m.useState)(!1),Me=()=>{Ne(!Te)},Re=(0,l.useBlockProps)({ref:V,className:f()({"is-waiting-response":oe})}),Ie=(0,l.useInnerBlocksProps)(Re),Ze=__("Ask Jetpack AI…","jetpack"),De=__("Write about… Make a table for…","jetpack"),Be=(0,s.createElement)(s.Fragment,null,Q&&n&&(0,s.createElement)(x.Z,{placement:"ai-assistant-block"}),!ge&&(0,s.createElement)(E.Z,null)),Oe=(0,s.createElement)(s.Fragment,null,h?.message&&!F&&"error_quota_exceeded"!==h?.code&&(0,s.createElement)(u.Notice,{status:h.status,isDismissible:!1,className:"jetpack-ai-assistant__error"},h.message));return(0,s.createElement)(u.KeyboardShortcuts,{bindGlobal:!0,shortcuts:{esc:()=>{["requesting","suggesting"].includes(he)&&Pe()}}},(0,s.createElement)("div",Re,we&&!ke&&(0,s.createElement)("div",{className:"jetpack-ai-assistant__content"},(0,s.createElement)(m.RawHTML,null,M.render(e.content))),we&&ke&&(0,s.createElement)("div",a()({className:"jetpack-ai-assistant__content is-layout-building-mode"},Ie)),(0,s.createElement)(l.InspectorControls,null,(0,s.createElement)(u.PanelBody,{initialOpen:!0},(0,s.createElement)(u.PanelRow,null,(0,s.createElement)(y.Z,{placement:w.I}))),(0,s.createElement)(u.PanelBody,{initialOpen:!0},(0,s.createElement)(u.PanelRow,null,(0,s.createElement)(_.Z,null)))),I&&(0,s.createElement)(l.InspectorControls,null,(0,s.createElement)(u.PanelBody,{title:__("AI Playground","jetpack"),initialOpen:!0},(0,s.createElement)(u.PanelRow,null,(0,s.createElement)(u.ToggleControl,{label:__("Gutenberg Syntax","jetpack"),onChange:e=>t({useGutenbergSyntax:e}),checked:e.useGutenbergSyntax})),(0,s.createElement)(u.PanelRow,null,(0,s.createElement)(u.ToggleControl,{label:__("GPT-4","jetpack"),onChange:e=>t({useGpt4:e}),checked:e.useGpt4})),(0,s.createElement)(u.PanelRow,null,Te&&(0,s.createElement)(u.Modal,{title:__("Custom System Prompt","jetpack"),onRequestClose:Me},(0,s.createElement)(u.TextareaControl,{rows:20,label:__("Set up the custom system prompt ","jetpack"),onChange:e=>t({customSystemPrompt:e}),className:"jetpack-ai-assistant__custom-prompt",value:e.customSystemPrompt||(0,N.t4)({useGutenbergSyntax:e.useGutenbergSyntax,useGpt4:e.useGpt4})?.content}),(0,s.createElement)("div",{className:"jetpack-ai-assistant__custom-prompt__footer"},(0,s.createElement)(u.Button,{onClick:()=>t({customSystemPrompt:""}),variant:"secondary"},__("Restore the prompt","jetpack")),(0,s.createElement)(u.Button,{onClick:Me,variant:"secondary"},__("Close","jetpack")))),(0,s.createElement)(u.Button,{onClick:Me,variant:"secondary"},__("Set system custom prompt","jetpack"))))),!ye&&ge&&!X&&(0,s.createElement)(S.Z,{isWaitingState:ye,contentIsLoaded:we,getSuggestionFromOpenAI:ie,retryRequest:de,handleAcceptContent:Le,handleAcceptTitle:Ae,handleGetSuggestion:xe,handleImageRequest:()=>{D([]),g({}),(0,T.b)(""===e.userPrompt.trim()?__("What would you like to see?","jetpack"):e.userPrompt,t,v,D,g,q),z.recordEvent("jetpack_ai_dalle_generation",{post_id:q})},handleTryAgain:null,showRetry:ce,contentBefore:ue,hasPostTitle:!!pe?.length,wholeContent:me,promptType:e.promptType,setUserPrompt:e=>{if(!H?.current)return;H.current.focus(),t({userPrompt:e})},recordEvent:z.recordEvent,isGeneratingTitle:Ee}),(0,s.createElement)(o.tK,{ref:H,disabled:X||!ge,value:e.userPrompt,placeholder:e?.content?Ze:De,onChange:e=>{U(!0),t({userPrompt:e})},onSend:()=>{xe("userPrompt"),z.recordEvent("jetpack_ai_assistant_block_generate",{feature:"ai-assistant"})},onStop:Pe,onAccept:()=>{Ee?Ae():Le()},onDiscard:()=>{const n=e?.content===$(r).attributes?.content;t({content:e?.originalContent,promptType:void 0,messages:e?.originalMessages}),je(),n?z.recordEvent("jetpack_ai_assistant_block_dismiss"):z.recordEvent("jetpack_ai_assistant_block_discard",{feature:"ai-assistant"})},state:he,isTransparent:X||!ge,showButtonLabels:!ne,showAccept:"init"!==he&&we&&!ye,acceptLabel:Se,showGuideLine:we,showRemove:e?.content?.length>0,bannerComponent:Be,errorComponent:Oe}),!b&&Z.length>0&&(0,s.createElement)(u.Flex,{direction:"column",style:{width:"100%"}},(0,s.createElement)(u.FlexBlock,{style:{textAlign:"center",margin:"12px",fontStyle:"italic",width:"100%"}},e.requestedPrompt),(0,s.createElement)(u.FlexBlock,{style:{fontSize:"20px",lineHeight:"38px"}},__("Please choose your image","jetpack")),(0,s.createElement)(u.Flex,{direction:"row",wrap:!0},Z.map((e=>(0,s.createElement)(C.Z,{setImageModal:O,saveImage:ve,image:e,key:e}))))),!b&&B&&(0,s.createElement)(u.Modal,{onRequestClose:()=>O(null)},(0,s.createElement)(C.Z,{saveImage:ve,setImageModal:O,image:B,inModal:!0}))))}},27559:(e,t,r)=>{"use strict";var n=r(31985),a=r(23536),s=r(45624),o=r(6747);r(81765),r(54765),r(94662);(0,n.S)(a,{edit:s.Z,save:()=>null,transforms:o.Z})},54765:(e,t,r)=>{"use strict";r.d(t,{J7:()=>u,NP:()=>l});var n=r(4981),a=r(9818),s=r(92694),o=r(23536),i=r(71449);const l=["core/paragraph","core/heading","core/list"],c=window?.Jetpack_Editor_Initial_State?.available_blocks?.["ai-assistant-support"];function u(){if(!(0,n.getBlockType)(o.name))return!1;if(!c)return!1;if(!(0,i.b)())return!1;const{errorCode:e}=(0,a.select)("wordpress-com/plans")?.getAiAssistantFeature?.()||{};if(e)return!1;const{getHiddenBlockTypes:t}=(0,a.select)("core/edit-post")||{};return!(t?.()||[]).includes(o.name)}(0,s.addFilter)("blocks.registerBlockType","jetpack/ai-assistant-support",(function(e,t){return l.includes(t)&&u()?{...e,supports:{...e.supports,"jetpack/ai":{assistant:!0}}}:e}),100)},49259:(e,t,r)=>{"use strict";r.d(t,{$M:()=>i,ZP:()=>l});var n=r(51806),a=r(52175),s=r(94333),o=(r(99196),r(83059));function i(e){return`ai-assistant-block-${e}`}const l=(0,s.createHigherOrderComponent)((e=>t=>{const{name:r}=t;return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(e,t),(0,n.createElement)(a.BlockControls,{group:"block"},(0,n.createElement)(o.ZP,{blockType:r})))}),"withAIAssistant")},79191:(e,t,r)=>{"use strict";r.d(t,{Z:()=>C});var n=r(51806),a=r(42290),s=r(13419),o=r(4981),i=r(55609),l=r(94333),c=r(9818),u=r(69307),p=r(65736),d=r(53961),m=r(65235),h=r.n(m),g=(r(99196),r(3180)),f=r(5246),b=r(18135),v=r(71449),k=r(63634),y=r(79817),w=r(44110);const __=p.__,E={huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480};function _(e){if(!e?.length)return"";const t=(0,c.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 C({clientId:e,className:t=""}){const r=(0,u.useRef)(null),o=(0,u.useRef)(null),{tracks:p}=(0,s.z$)(),m=(0,v.b)(),{inputValue:C,setInputValue:S,isVisible:x,assistantAnchor:j}=(0,u.useContext)(y.D),{dequeueAiAssistantFeatureAyncRequest:L}=(0,c.useDispatch)("wordpress-com/plans"),A=()=>{setTimeout((()=>{o.current?.focus?.()}),100)},{requestSuggestion:P,requestingState:T,stopSuggestion:N,requestingError:M}=(0,a.X_)({onDone:A}),{requireUpgrade:R}=(0,b.Z)(),I=M?.code===a.$L||R,Z="requesting"===T||"suggesting"===T,D="suggesting"===T||"done"===T,B=__("Ask Jetpack AI to create your form","jetpack"),O=__("Creating your form. Please wait a few moments.","jetpack"),{removeNotice:F}=(0,c.useDispatch)(d.store),U=(0,u.useCallback)((()=>{if(!C?.length)return;F(w.uu);const t=(0,k.r1)(k.Re,{request:C,content:_(e)});L(),P(t,{feature:"jetpack-form-ai-extension"}),p.recordEvent("jetpack_ai_assistant_block_generate",{feature:"jetpack-form-ai-extension"}),r?.current?.focus()}),[e,L,C,F,P,p]),z=(0,u.useCallback)((()=>{N(),A(),p.recordEvent("jetpack_ai_assistant_block_stop",{feature:"jetpack-form-ai-extension"})}),[N,p]),q=(0,l.useViewportMatch)("medium","<"),$=q&&j,H=(0,u.useRef)(null),V=(0,u.useRef)(q),[G,W]=(0,u.useState)(q);if((0,u.useEffect)((()=>{const e=r?.current;if(e)return H?.current||(H.current=new ResizeObserver((e=>{if(!x)return;if($)return;const t=e[0].contentRect.width<E.mobile;t!==V.current&&(V.current=t,W(t))}))),H.current.observe(e),()=>{H?.current?.disconnect()}}),[$,x]),(0,u.useEffect)((()=>{x&&p.recordEvent("jetpack_ai_assistant_prompt_show",{block_type:"jetpack/contact-form"})}),[x,p]),(0,u.useEffect)((()=>{const e=setTimeout((()=>{x&&o?.current&&o.current.focus()}),300);return function(){clearTimeout(e)}}),[]),!x)return null;const J=(0,n.createElement)("div",{className:"jetpack-ai-assistant__bar-wrapper"},(0,n.createElement)(i.KeyboardShortcuts,{bindGlobal:!0,shortcuts:{esc:()=>{["requesting","suggesting"].includes(T)&&z()}}},(0,n.createElement)("div",{ref:r,className:h()("jetpack-ai-assistant__bar",{[t]:t,"is-fixed":$,"is-mobile-mode":G}),tabIndex:-1},I&&(0,n.createElement)(f.Z,{placement:"jetpack-form-block"}),!m&&(0,n.createElement)(g.Z,null),(0,n.createElement)(a.tK,{ref:o,disabled:I||!m,value:C,placeholder:Z?O:B,onChange:S,onSend:U,onStop:z,state:T,isTransparent:I||!m,showButtonLabels:!G,showGuideLine:D}))));return $?(0,u.createPortal)(J,j):J}},81732:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(51806),a=r(42290),s=r(55609),o=r(94333),i=r(69307),l=r(65736),c=r(99196),u=r(79817),p=r(44110);const __=l.__,d="jetpack-ai-assistant-bar__slot";function m({jetpackFormClientId:e}){const{isVisible:t,toggle:r,setAnchor:l,assistantAnchor:m}=(0,i.useContext)(u.D),{requestingState:h}=(0,a.X_)(),g=(0,i.useRef)(null),f=(0,o.useViewportMatch)("medium","<");(0,c.useEffect)((()=>{if(!g.current)return;const e=g.current.closest(".block-editor-block-contextual-toolbar");if(!e)return;let t=e.parentElement?.querySelector(`.${d}`);if(t)return e.after(t),l(t);t=document.createElement("div"),t.setAttribute("role","toolbar"),t.setAttribute("aria-label",__("AI Assistant","jetpack")),t.setAttribute("aria-orientation","horizontal"),t.className=d;const r=e.offsetHeight;t.style.top=`${r}px`,e.after(t),l(t)}),[l]),(0,c.useEffect)((()=>{f||m?.remove()}),[f,m]);const b=(0,i.useCallback)((()=>{if(!e)return r();(0,p.Vl)(e,r)}),[e,r]),v="requesting"===h||"suggesting"===h;return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(s.KeyboardShortcuts,{bindGlobal:!0,shortcuts:{"mod+/":r}}),(0,n.createElement)(s.ToolbarButton,{ref:g,showTooltip:!0,onClick:b,"aria-haspopup":"true","aria-expanded":t,label:__("Ask AI Assistant","jetpack"),icon:a.u_,disabled:v}))}},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,{G:()=>f});var n=r(51806),a=r(42290),s=r(13419),o=r(52175),i=r(4981),l=r(94333),c=r(9818),u=r(69307),p=r(92694),d=(r(99196),r(79191)),m=r(81732),h=r(59090),g=r(44110);function f(e,{checkChildrenBlocks:t=!1,clientId:r}={clientId:""}){const n=(0,i.getBlockType)("jetpack/ai-assistant"),{isModuleActive:a}=(0,s.el)("contact-form");if(!a)return!1;if(!n)return!1;if("string"!=typeof e)return!1;if(!h.aE)return!1;if(!r?.length)return!1;if(t){if(!h.nB.includes(e))return!1}else if("jetpack/contact-form"!==e)return!1;const{getHiddenBlockTypes:o}=(0,c.select)("core/edit-post")||{};return!(o?.()||[]).includes(e)}const b=(0,l.createHigherOrderComponent)((e=>t=>{const r=f(t?.name,{clientId:t.clientId}),{increaseAiAssistantRequestsCount:s}=(0,c.useDispatch)("wordpress-com/plans"),{eventSource:i}=(0,a.X_)({onDone:(0,u.useCallback)((()=>{s()}),[s]),onError:(0,u.useCallback)((e=>{"error_network"!==e.code&&"error_quota_exceeded"!==e.code&&s()}),[s])}),l=(0,u.useCallback)((()=>{i&&i?.close()}),[i]);if((0,u.useEffect)((()=>()=>{"jetpack/contact-form"===t?.name&&l()}),[l,t?.name]),!r)return(0,n.createElement)(e,t);return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(e,t),(0,n.createElement)(d.Z,{clientId:t.clientId}),(0,n.createElement)(o.BlockControls,{group:"block"},(0,n.createElement)(m.Z,null)))}),"jetpackFormEditWithAiComponents");(0,p.addFilter)("blocks.registerBlockType","jetpack/ai-assistant-support",(function(e,t){return"jetpack/contact-form"!==t?e:{...e,edit:(0,a.oN)((0,g.ZP)(b(e.edit)))}}),100);const v=(0,l.createHigherOrderComponent)((e=>t=>{const r=(0,c.useSelect)((e=>{const r=e("core/block-editor"),{getBlockParentsByBlockName:n}=r;return n(t.clientId,"jetpack/contact-form")?.[0]}),[t.clientId]);if(!f(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)(m.Z,{jetpackFormClientId:r})))}),"jetpackFormChildrenEditWithAiComponents");(0,p.addFilter)("blocks.registerBlockType","jetpack/ai-assistant-support",(function(e,t){return h.nB.includes(t)?{...e,edit:v(e.edit)}:e}))},79817:(e,t,r)=>{"use strict";r.d(t,{D:()=>s,v:()=>o});var n=r(51806),a=r(69307);const s=(0,a.createContext)({}),o=({value:e,children:t})=>(0,n.createElement)(s.Provider,{value:e,children:t})},44110:(e,t,r)=>{"use strict";r.d(t,{Vl:()=>b,ZP:()=>v,uu:()=>f});var n=r(51806),a=r(42290),s=r(4981),o=r(55609),i=r(94333),l=r(9818),c=r(69307),u=r(65736),p=r(53961),d=(r(99196),r(94662)),m=r(5863),h=r(56359),g=r(79817);const __=u.__,f="ai-assistant";function b(e,t){(0,l.dispatch)("core/block-editor").selectBlock(e).then(t)}const v=(0,i.createHigherOrderComponent)((e=>t=>{const{clientId:r,isSelected:i}=t,{replaceInnerBlocks:u}=(0,l.useDispatch)("core/block-editor"),v=(0,l.useSelect)((e=>e("core/editor")),[]),k=(0,l.useSelect)((e=>e("core/block-editor")),[]),y=v.getCurrentPostId(),w=k.getBlock(r),[E,_]=(0,c.useState)(""),C="jetpack/contact-form"===w?.name&&0===w?.innerBlocks?.length,[S,x]=(0,c.useState)(C),[j,L]=(0,c.useState)(!1),[A,P]=(0,c.useState)(null),T=(0,c.useRef)([]),N=(0,c.useCallback)((()=>{x(!0)}),[]),M=(0,c.useCallback)((()=>{x(!1)}),[]),R=(0,c.useCallback)((()=>{x(!S)}),[S]),I=(0,c.useCallback)((e=>{P(e)}),[]),{createNotice:Z}=(0,l.useDispatch)(p.store),D=(0,c.useCallback)((({severity:e,message:t,code:r})=>{r!==a.$L&&Z(e,t,{isDismissible:!0,id:f})}),[Z]);(0,c.useEffect)((()=>{i||M()}),[i,M]);const B=(0,c.useMemo)((()=>({inputValue:E,setInputValue:_,isVisible:S,show:N,hide:M,toggle:R,isFixed:j,setAssistantFixed:L,assistantAnchor:A,setAnchor:I})),[E,S,N,M,R,j,A,I]),O=(0,c.useCallback)(((e,t=!1)=>{const n=e.replace(/<!-- (\/)*wp:jetpack\/(contact-)*form ({[^}]*} )*(\/)*-->/g,""),a=(0,h.J)(n),o=(0,s.parse)(a).filter((e=>e.isValid&&!["core/freeform","core/missing","core/html"].includes(e.name)));let i=!1;if(o.length<T.current.length)o.push(T.current[T.current.length-1]);else if(o.length===T.current.length&&o.length>0){const e=o[o.length-1],t=T.current[o.length-1];i=!(0,m.c)(e,t)}if(o.length>0&&(o.length!==T.current.length||i)&&(u(r,o),T.current=o),t){const e=o.filter((e=>"jetpack/button"===e.name));if(T.current=T.current||[],e.length>1){let t=0;T.current=T.current.filter((r=>"jetpack/button"!==r.name||(t++,t===e.length))),u(r,T.current)}else 0===e.length&&u(r,[...T.current,(0,s.createBlock)("jetpack/button",{label:__("Submit","jetpack"),element:"button",text:__("Submit","jetpack"),borderRadius:8,lock:{remove:!0}})]);T.current=[]}}),[r,u]);return(0,a.X_)({askQuestionOptions:{postId:y},onDone:e=>{O(e,!0),_("")},onSuggestion:O,onError:D}),(0,d.G)(t.name,{clientId:t.clientId})?(0,n.createElement)(g.v,{value:B},(0,n.createElement)(o.KeyboardShortcuts,{shortcuts:{"mod+/":()=>b(r,N)}},(0,n.createElement)(e,t))):(0,n.createElement)(e,t)}),"withUiHandlerDataProvider")},63206:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(6895),a=r(13419),s=r(46867),o=r(18135);const i=()=>{const e=new URLSearchParams(window.location.search),t=(0,a.lQ)();return(0,a.Wp)()&&e.has("post")?`https://wordpress.com/post/${t}/${e.get("post")}`:`https://wordpress.com/home/${t}`};function l(){const{nextTier:e,tierPlansEnabled:t}=(0,o.Z)(),r=i(),l=t?(0,n.Z)("jetpack-ai-yearly-tier-upgrade-nudge",{site:(0,a.lQ)(),path:`jetpack_ai_yearly:-q-${e?.limit}`,query:`redirect_to=${encodeURIComponent(r)}`}):(0,n.Z)("jetpack-ai-monthly-plan-ai-assistant-block-banner",{site:(0,a.lQ)()}),c=(0,a.Ug)()||(0,a.Wp)()?l:`${window?.Jetpack_Editor_Initial_State?.adminUrl}admin.php?redirect_to_referrer=1&page=my-jetpack#/add-jetpack-ai`,{autosaveAndRedirect:u,isRedirecting:p}=(0,s.Z)(c);return{checkoutUrl:c,autosaveAndRedirect:u,isRedirecting:p}}},18135:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(9818);function a(){const{data:e,loading:t}=(0,n.useSelect)((e=>{const{getAiAssistantFeature:t,getIsRequestingAiAssistantFeature:r}=e("wordpress-com/plans");return{data:t(),loading:r()}}),[]),{fetchAiAssistantFeature:r,increaseAiAssistantRequestsCount:a}=(0,n.useDispatch)("wordpress-com/plans");return{...e,loading:t,error:null,refresh:r,increaseRequestsCount:a}}},42890:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(6975),a=r(69307);const s=window?.Jetpack_Editor_Initial_State?.tracksUserData||null,o=parseInt(window?.Jetpack_Editor_Initial_State?.wpcomBlogId)||0,i=()=>((0,a.useEffect)((()=>{s&&n.Z.initialize(s?.userid,s?.username,o?{blog_id:o}:{})}),[]),n.Z)},60751:(e,t,r)=>{"use strict";r.d(t,{Z:()=>g});var n=r(42290),a=r(4981),s=r(9818),o=r(69307),i=r(65736),l=r(51128),c=r.n(l),u=r(27298),p=r(63634),d=r(854);const __=i.__,m=c()("jetpack-ai-assistant:event"),h=c()("jetpack-ai-assistant:prompt"),g=({attributes:e,clientId:t,content:r,setError:i,tracks:l,userPrompt:c,onSuggestionDone:g,onUnclearPrompt:f,onModeration:b,requireUpgrade:v,requestingState:k})=>{const[y,w]=(0,o.useState)(!1),[E,_]=(0,o.useState)(!1),[C,S]=(0,o.useState)(!1),[x,j]=(0,o.useState)(!1),[L,A]=(0,o.useState)(""),{updateBlockAttributes:P}=(0,s.useDispatch)("core/block-editor"),{dequeueAiAssistantFeatureAyncRequest:T,setAiAssistantFeatureRequireUpgrade:N}=(0,s.useDispatch)("wordpress-com/plans"),[M,R]=(0,o.useState)(k||"init"),I=(0,o.useRef)(),Z=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("title")));let D=!1;const B=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("categories")))||[],O=(0,s.useSelect)((e=>B.map((t=>{const r=e("core").getEntityRecord("taxonomy","category",t);if(r)return r;D=!0})).filter(Boolean)),[B]),F=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("tags")),[])||[],U=(0,s.useSelect)((e=>F.map((t=>{const r=e("core").getEntityRecord("taxonomy","post_tag",t);if(r)return r;D=!0})).filter(Boolean)),[F]);(0,o.useEffect)((()=>(w(D),()=>{I?.current&&(m("Cleaning things up..."),I?.current?.close())})),[D,I]);const z=(0,s.useSelect)((e=>e("core/editor").getCurrentPostId())),q=(O.filter((e=>1!==e.id)).map((({name:e})=>e)).join(", "),U.map((({name:e})=>e)).join(", "),async(o,g={})=>{T();const k=g?.functions?.reduce(((e,{name:t,implementation:r})=>({...e,[t]:r})),{});if(v)return R("error"),_(!1),S(!1),j(!1),void i({code:"error_quota_exceeded",message:__("You have reached the limit of requests for this site.","jetpack"),status:"info"});if(g={retryRequest:!1,tone:u.Nj,...g},E)return;j(!1),i({});let y=L;l.recordEvent("jetpack_ai_chat_completion",{post_id:z});const w=[...e.messages]??[];let C={};if(g.retryRequest)C=y[y.length-1];else{const n=e?.isLayoutBuldingModeEnable?(0,d.WN)(t):(0,d.xN)();y=(0,p.Iq)({generatedContent:r,allPostContent:n,postContentAbove:(0,d.h7)(t),currentPostTitle:Z,options:g,userPrompt:c,type:o,isGeneratingTitle:"generateTitle"===e.promptType,useGutenbergSyntax:!!e?.useGutenbergSyntax,customSystemPrompt:e?.customSystemPrompt}),C=y.pop(),y=[...y,...w],y.push(C),A(y),"generateTitle"!==e.promptType&&P(t,{promptType:o})}try{_(!0),S(!0),y.forEach((({role:e,content:t},r)=>h("(%s/%s) %o\n%s",r+1,y.length,`[${e}]`,t))),R("requesting"),I.current=await(0,n.jt)(y,{postId:z,requireUpgrade:v,feature:e?.useGpt4?"ai-assistant-experimental":"ai-assistant",functions:g?.functions}),R("suggesting")}catch(e){e.message?i({message:e.message,code:e?.code||"unknown",status:"error"}):i({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"}),j(!0),_(!1),S(!1)}const x=async t=>{const{detail:r}=t,a={role:"assistant",content:null,function_call:r},s=await(k[r.name]?.(JSON.parse(r.arguments))),o={role:"function",name:r?.name,content:JSON.stringify(s)};y=[...y,a,o],I?.current?.removeEventListener("function_done",x),I?.current?.removeEventListener("done",M),I?.current?.removeEventListener("error_unclear_prompt",D),I?.current?.removeEventListener("error_network",O),I?.current?.removeEventListener("error_context_too_large",B),I?.current?.removeEventListener("error_service_unavailable",F),I?.current?.removeEventListener("error_quota_exceeded",U),I?.current?.removeEventListener("error_moderation",q),I?.current?.removeEventListener("suggestion",H),I.current=await(0,n.jt)(y,{postId:z,requireUpgrade:v,feature:e?.useGpt4?"ai-assistant-experimental":null,functions:g.functions}),I?.current?.addEventListener("function_done",x),I?.current?.addEventListener("done",M),I?.current?.addEventListener("error_unclear_prompt",D),I?.current?.addEventListener("error_network",O),I?.current?.addEventListener("error_context_too_large",B),I?.current?.addEventListener("error_service_unavailable",F),I?.current?.addEventListener("error_quota_exceeded",U),I?.current?.addEventListener("error_moderation",q),I?.current?.addEventListener("suggestion",H)},M=r=>{const{detail:n}=r;R("done");const o=n.replaceAll(p._W,""),i={role:"assistant",content:o};w.push(C,i),h("Add %o\n%s",`[${C.role}]`,C.content),h("Add %o\n%s",`[${i.role}]`,i.content),w.length>20&&w.splice(0,w.length-20),$();const l=e?.useGutenbergSyntax;if(P(t,{content:o,messages:w}),!l)return;const{replaceInnerBlocks:c}=(0,s.dispatch)("core/block-editor"),u=(0,a.parse)(n).filter((e=>e.isValid));c(t,u)},D=()=>{R("error"),I?.current?.close(),_(!1),S(!1),i({code:"error_unclear_prompt",message:__("Your request was unclear. Mind trying again?","jetpack"),status:"info"}),f?.()},B=()=>{R("error"),I?.current?.close(),_(!1),S(!1),j(!1),i({code:"error_context_too_large",message:__("The content is too large to be processed all at once. Please try to shorten it or divide it into smaller parts.","jetpack"),status:"info"})},O=({detail:n})=>{R("error");const{name:a,message:s}=n;"TypeError"===a&&"Failed to fetch"===s&&(w.splice(0,8),P(t,{messages:w}),y=(0,p.Iq)({generatedContent:r,allPostContent:(0,d.xN)(),postContentAbove:(0,d.h7)(t),currentPostTitle:Z,options:g,userPrompt:c,type:o,isGeneratingTitle:"generateTitle"===e.promptType,useGutenbergSyntax:!!e?.useGutenbergSyntax,customSystemPrompt:e?.customSystemPrompt}),A([...y,...w,C])),I?.current?.close(),_(!1),S(!1),j(!0),i({code:"error_network",message:__("It was not possible to process your request. Mind trying again?","jetpack"),status:"info"})},F=()=>{R("error"),I?.current?.close(),_(!1),S(!1),j(!0),i({code:"error_service_unavailable",message:__("Jetpack AI services are currently unavailable. Sorry for the inconvenience.","jetpack"),status:"info"})},U=()=>{R("error"),I?.current?.close(),_(!1),S(!1),j(!1),N(!0),i({code:"error_quota_exceeded",message:__("You have reached the limit of requests for this site.","jetpack"),status:"info"})},q=()=>{R("error"),I?.current?.close(),_(!1),S(!1),j(!1),i({code:"error_moderation",message:__("This request has been flagged by our moderation system. Please try to rephrase it and try again.","jetpack"),status:"info"}),b?.()},H=e=>{S(!1),m("(suggestion)",e?.detail),P(t,{content:e?.detail?.replaceAll(p._W,"")})};return I?.current?.addEventListener("function_done",x),I?.current?.addEventListener("done",M),I?.current?.addEventListener("error_unclear_prompt",D),I?.current?.addEventListener("error_network",O),I?.current?.addEventListener("error_context_too_large",B),I?.current?.addEventListener("error_service_unavailable",F),I?.current?.addEventListener("error_quota_exceeded",U),I?.current?.addEventListener("error_moderation",q),I?.current?.addEventListener("suggestion",H),I?.current});function $(){I?.current&&(I?.current?.close(),_(!1),S(!1),g?.(),R("done"))}return{isLoadingCategories:y,isLoadingCompletion:E,wasCompletionJustRequested:C,setIsLoadingCategories:w,setShowRetry:j,showRetry:x,postTitle:Z,contentBefore:(0,d.h7)(t),wholeContent:(0,d.xN)(),requestingState:M,getSuggestionFromOpenAI:q,stopSuggestion:$,retryRequest:()=>q("",{retryRequest:!0})}}},71449:(e,t,r)=>{"use strict";r.d(t,{b:()=>u,d:()=>p});var n=r(13419),a=r(51128),s=r.n(a);const o=window?.JP_CONNECTION_INITIAL_STATE,i=s()("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):o?.connectionStatus?.isUserConnected?(c("Jetpack user is connected ✅"),!0):(c("User is not connected ❌"),!1)}function p(){if((0,n.Wp)())return!0;return!1==!(o?.userConnectionData?.currentUser?.permissions??{}).manage_options}},3687:(e,t,r)=>{"use strict";r.d(t,{b:()=>o});var n=r(86989),a=r.n(n),s=r(65736);const __=s.__;function o(e,t,r,n,s,o){r(!0),s(null),t({requestedPrompt:e}),a()({path:"/wpcom/v2/jetpack-ai/images/generations",method:"POST",data:{prompt:e,post_id:o}}).then((e=>{r(!1);const t=e.data.map((e=>"data:image/png;base64,"+e.b64_json));n(t)})).catch((e=>{e.message?s(e.message):s(__("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)}))}},57832:(e,t,r)=>{"use strict";r.d(t,{v_:()=>i,x1:()=>l});var n=r(63634);const a="title",s="content",o=null;function i(e,t){return{role:"jetpack-ai",context:{type:"ai-assistant-initial-prompt",for:u(e),...t?.length?{custom_system_prompt:t}:{}}}}function l({generatedContent:e,allPostContent:t,postContentAbove:r,currentPostTitle:a,options:s,type:o,userPrompt:i,isGeneratingTitle:l}){const u=[],p="generated"===s?.contentType;let d=null;switch(o){case n.qA:d=a;break;case n.sz:case n.hI:case n.Hd:d=r;break;case n.jf:d=t;break;case n.TV:case n.DR:d=e;break;case n.Lg:case n.Lq:case n.Nw:d=p?e:t;break;case n.Gh:d=e||t}const m=function(e,t){return!e&&t?.length>0?{role:"jetpack-ai",context:{type:"ai-assistant-relevant-content",content:t}}:null}(o===n.Gh?!!e?.length:p,d);return m&&u.push(m),u.push({role:"jetpack-ai",context:c({generatedContent:e,allPostContent:t,postContentAbove:r,currentPostTitle:a,options:s,type:o,userPrompt:i,isGeneratingTitle:l})}),u}function c({options:e,type:t,userPrompt:r,isGeneratingTitle:i}){const l=function(e,t,r){return e?a:!t||r?s:o}(i,"generated"===e?.contentType,e?.fromExtension||!1);return{type:u(t),...l?{subject:l}:{},...t===n.Lg&&e?.tone?{tone:e.tone}:{},...t===n.Nw&&e?.language?{language:e.language}:{},...t===n.Gh&&r?{request:r}:{}}}function u(e){return{[n.qA]:"ai-assistant-summary-by-title",[n.sz]:"ai-assistant-continue-writing",[n.hI]:"ai-assistant-simplify",[n.Hd]:"ai-assistant-correct-spelling",[n.jf]:"ai-assistant-generate-title",[n.TV]:"ai-assistant-make-longer",[n.DR]:"ai-assistant-make-shorter",[n.Lg]:"ai-assistant-change-tone",[n.Lq]:"ai-assistant-summarize",[n.Nw]:"ai-assistant-change-language",[n.Gh]:"ai-assistant-user-prompt"}[e]}},63634:(e,t,r)=>{"use strict";r.d(t,{DR:()=>d,Gh:()=>f,Hd:()=>c,Iq:()=>T,Lg:()=>m,Lq:()=>h,Nw:()=>g,Re:()=>b,SV:()=>v,TV:()=>p,_W:()=>y,hI:()=>l,jf:()=>u,qA:()=>o,r1:()=>N,sz:()=>i,t4:()=>w});var n=r(51128),a=r.n(n),s=r(57832);const o="titleSummary",i="continue",l="simplify",c="correctSpelling",u="generateTitle",p="makeLonger",d="makeShorter",m="changeTone",h="summarize",g="changeLanguage",f="userPrompt",b="jetpackFormCustomPrompt",v=!0,k=a()("jetpack-ai-assistant:prompt"),y="````";function w({context:e="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:t,useGutenbergSyntax:r=!1,useMarkdown:n=!0,customSystemPrompt:a=null}){let s="";t?.length&&(s=t.map((e=>`- ${e}.`)).join("\n")+"\n");let o=`${e}. Strictly follow these rules:\n\n${s}${n?"- 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 r&&(o=`${e}. 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`),a&&(o=a),{role:"system",content:o}}function E(e){return`${y}${e.replaceAll(y,"")}${y}`}function _({content:e,role:t="user"}){return[{role:t,content:`Repeat the text delimited with ${y}, 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: ${E(e)}`}]}function C({content:e,role:t="user"}){return[{role:t,content:`Simplify the text delimited with ${y}, using words and phrases that are easier to understand and keeping the language of the text: ${E(e)}`}]}function S({content:e,role:t="user"}){return[{role:t,content:`Summarize the text delimited with ${y}, keeping the language of the text: ${E(e)}`}]}function x({content:e,role:t="user"}){return[{role:t,content:`Expand the text delimited with ${y} to about double its size, keeping the language of the text: ${E(e)}`}]}function j({content:e,language:t,role:r="user"}){return[{role:r,content:`Translate the text delimited with ${y} to ${t}, preserving the same core meaning and tone: ${E(e)}`}]}function L({content:e,tone:t,role:r="user"}){return[{role:r,content:`Rewrite the text delimited with ${y}, with a ${t} tone, keeping the language of the text: ${E(e)}`}]}function A({content:e,request:t}){if(!t)throw new Error("You must provide a custom prompt for the Jetpack Form Custom Prompt");return[{role:"jetpack-ai",context:{type:"form-ai-extension",content:e,request:t}}]}const P=({rules:e=[],request:t=null,relevantContent:r=null,isContentGenerated:n=!1,isGeneratingTitle:a=!1,useGutenbergSyntax:s=!1,customSystemPrompt:o=null})=>{if(!t&&!r)throw new Error("You must provide either a request or content");const i=[w({rules:e,useGutenbergSyntax:s,customSystemPrompt:o})];if(null!=r&&r?.length){const e=r.replaceAll(y,"");n||i.push({role:"user",content:`The specific relevant content for this request, if necessary, delimited with ${y} characters: ${y}${e}${y}`})}const l={role:"user",content:t};return a&&(l.content+=" Only output a title, do not generate body content."),i.push(l),i.forEach((e=>{k(`Role: ${e?.role}.\nMessage: ${e?.content}\n---`)})),i};function T({generatedContent:e,allPostContent:t,postContentAbove:r,currentPostTitle:n,options:a,type:b,userPrompt:k,isGeneratingTitle:y,useGutenbergSyntax:w,customSystemPrompt:E}){if(v){return[(0,s.v_)(b,E),...(0,s.x1)({generatedContent:e,allPostContent:t,postContentAbove:r,currentPostTitle:n,options:a,type:b,userPrompt:k,isGeneratingTitle:y})]}const _="generated"===a?.contentType,C=function(e,t=!1,r){const n="generated"===r?.contentType;let a="the title";t||(a=n?"your last answer":"the content");const s=`. Do not switch to any language other than the language of ${a} in your response`;switch(e){case o:return{request:`Write a short piece for a blog post based on ${a}, keeping the same language`};case i:return{request:`Continue writing from ${a}${s}.`,rules:n?[]:["Only output the continuation of the content, without repeating it"]};case l:return{request:`Simplify ${a}${s}.`,rules:["Use words and phrases that are easier to understand for non-technical people","Use as much of the original language as possible"]};case c:return{request:`Repeat ${a}, correcting any spelling and grammar mistakes, and do not add new content${s}.`};case u: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 p:return{request:`Make ${a} longer${s}.`};case d:return{request:`Make ${a} shorter${s}.`};case m:return{request:`Rewrite ${a} with ${/^[aeiou]/i.test(r.tone)?"an":"a"} ${r.tone} tone${s}.`};case h:return{request:`Summarize ${a}${s}.`};case g:return{request:`Translate ${a} to the following language: ${r.language}.`};default:return null}}(b,y,a);if(b!==f){let a;switch(b){case o:a=n;break;case i:case l:case c:a=r;break;case u:a=t;break;case p:case d:a=e;break;case m:case h:case g:a=_?e:t}return P({...C,relevantContent:a,isContentGenerated:_,isGeneratingTitle:y,useGutenbergSyntax:w,customSystemPrompt:E})}return P({request:k,relevantContent:e||t,isContentGenerated:!!e?.length,isGeneratingTitle:y,useGutenbergSyntax:w,customSystemPrompt:E})}function N(e,t){k("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 c:return[...a,..._(t)];case l:return[...a,...C(t)];case h:return[...a,...S(t)];case p:return[...a,...x(t)];case g:return[...a,...j(t)];case m:return[...a,...L(t)];case b:return[...r,...A(t)];default:throw new Error(`Unknown prompt type: ${e}`)}}},74359:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});const n=new(r(92213).Z)({emDelimiter:"_",headingStyle:"atx"});n.addRule("strikethrough",{filter:["del","s","strike"],replacement:function(e){return"~~"+e+"~~"}});const a=n},854:(e,t,r)=>{"use strict";r.d(t,{WN:()=>l,h7:()=>o,t$:()=>c,xN:()=>i});var n=r(4981),a=r(9818),s=r(74359);function o(e){if(!e)return"";const t=(0,a.select)("core/block-editor"),r=t.getBlockIndex(e),o=t.getBlocks().slice(0,r)??[];return o?.length?s.Z.turndown((0,n.serialize)(o)):""}function i(){const e=(0,a.select)("core/block-editor").getBlocks();return e?.length?s.Z.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=>(0,n.getBlockContent)(e.clientId))).join("\n\n"):""}function c(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||""}},5863:(e,t,r)=>{"use strict";r.d(t,{c:()=>s});const n=e=>{delete e.clientId;for(const t of e.innerBlocks??[])n(t);return e},a=e=>n((e=>JSON.parse(JSON.stringify(e)))(e));function s(e,t){const r=a(e),n=a(t);return JSON.stringify(r)===JSON.stringify(n)}},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),s=r(54765),o=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,s.J7)()?{...e,edit:(0,o.ZP)(e.edit)}:e}),100)},6747:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u,b:()=>c});var n=r(4981),a=r(23536),s=r(54765),o=r(63634),i=r(74359);const l=[];function c(e,t){const{content:r,...s}=t;let l=r;"core/heading"===e&&t?.level&&(l=l.replace(/<(\/?)h\d([^>]*)>/g,`<$1h${t.level}$2>`));const c=i.Z.turndown(l),u=[];return o.SV?u.push({role:"jetpack-ai",context:{type:"ai-assistant-relevant-content",content:c}}):(u.push({role:"user",content:"Tell me some content for this block, please."}),u.push({role:"assistant",content:c})),(0,n.createBlock)(a.name,{...s,content:c,originalContent:c,messages:u,originalMessages:u})}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}},50756:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(51806),a=r(55609),s=r(69307),o=r(65736),i=r(65235),l=r.n(i),c=r(92819);const __=o.__,u="09:00",p="17:00";class d extends s.Component{renderInterval=(e,t)=>{const{day:r}=this.props,{opening:o,closing:i}=e;return(0,n.createElement)(s.Fragment,{key:t},(0,n.createElement)("div",{className:"business-hours__row"},(0,n.createElement)("div",{className:l()(r.name,"business-hours__day")},0===t&&this.renderDayToggle()),(0,n.createElement)("div",{className:l()(r.name,"business-hours__hours")},(0,n.createElement)(a.TextControl,{type:"time",label:__("Opening","jetpack"),value:o,className:"business-hours__open",placeholder:u,onChange:e=>{this.setHour(e,"opening",t)}}),(0,n.createElement)(a.TextControl,{type:"time",label:__("Closing","jetpack"),value:i,className:"business-hours__close",placeholder:p,onChange:e=>{this.setHour(e,"closing",t)}})),(0,n.createElement)("div",{className:"business-hours__remove"},r.hours.length>1&&(0,n.createElement)(a.Button,{isSmall:!0,variant:"link",icon:"trash",label:__("Remove Hours","jetpack"),onClick:()=>{this.removeInterval(t)}}))),t===r.hours.length-1&&(0,n.createElement)("div",{className:"business-hours__row business-hours-row__add"},(0,n.createElement)("div",{className:l()(r.name,"business-hours__day")}," "),(0,n.createElement)("div",{className:l()(r.name,"business-hours__hours")},(0,n.createElement)(a.Button,{variant:"link",label:__("Add Hours","jetpack"),onClick:this.addInterval},__("Add Hours","jetpack"))),(0,n.createElement)("div",{className:"business-hours__remove"}," ")))};setHour=(e,t,r)=>{const{day:n,attributes:a,setAttributes:s}=this.props,{days:o}=a;s({days:o.map((a=>a.name===n.name?{...a,hours:a.hours.map(((n,a)=>a===r?{...n,[t]:e}:n))}:a))})};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:u,closing:p}]:[];return{...r,hours:t}}return r}))})};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))})};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,c.isEmpty)(e.hours)}renderDayToggle(){const{day:e,localization:t}=this.props;return(0,n.createElement)(s.Fragment,null,(0,n.createElement)("span",{className:"business-hours__day-name"},t.days[e.name]),(0,n.createElement)(a.ToggleControl,{label:this.isClosed()?__("Closed","jetpack"):__("Open","jetpack"),checked:!this.isClosed(),onChange:this.toggleClosed}))}renderClosed(){const{day:e}=this.props;return(0,n.createElement)("div",{className:"business-hours__row business-hours-row__closed"},(0,n.createElement)("div",{className:l()(e.name,"business-hours__day")},this.renderDayToggle()),(0,n.createElement)("div",{className:l()(e.name,"closed","business-hours__hours")}," "),(0,n.createElement)("div",{className:"business-hours__remove"}," "))}render(){const{day:e}=this.props;return this.isClosed()?this.renderClosed():e.hours.map(this.renderInterval)}}const m=d},80190:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(69771),s=r(69307),o=r(65736),i=r(92819);const _x=o._x;class l extends s.Component{formatTime(e){const{timeFormat:t}=this.props,[r,n]=e.split(":"),s=new Date;return!(!r||!n)&&(s.setHours(r),s.setMinutes(n),(0,a.date)(t,s))}renderInterval=(e,t)=>{const{day:r}=this.props,a=r.hours;return(0,n.createElement)("span",{key:t},(0,o.sprintf)("%1$s - %2$s",this.formatTime(e.opening),this.formatTime(e.closing)),a.length>1+t&&(0,n.createElement)("span",null,", "))};render(){const{day:e,localization:t}=this.props,r=e.hours.filter((e=>this.formatTime(e.opening)&&this.formatTime(e.closing)));return(0,n.createElement)("div",{className:"jetpack-business-hours__item"},(0,n.createElement)("dt",{className:e.name},t.days[e.name]),(0,n.createElement)("dd",null,(0,i.isEmpty)(r)?_x("Closed","business is closed on a full day","jetpack"):r.map(this.renderInterval),(0,n.createElement)("br",null)))}}const c=l},86162:(e,t,r)=>{"use strict";r.d(t,{Z:()=>w});var n=r(82674),a=r.n(n),s=r(51806),o=r(13419),i=r(86989),l=r.n(i),c=r(55609),u=r(69771),p=r(69307),d=r(65736),m=r(65235),h=r.n(m),g=r(22023),f=r(50756),b=r(80190);const __=d.__,v=(0,o.dM)(g),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{state={localization:k,hasFetched:!1};componentDidMount(){this.apiFetch()}apiFetch(){this.setState({data:k},(()=>{l()({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:i}=this.state,{startOfWeek:l}=o,p=n.concat(n.slice(0,l)).slice(l);if(!i)return(0,s.createElement)(c.Placeholder,{icon:v,label:__("Loading business hours","jetpack")});if(!r){const e=(0,u.getSettings)(),{formats:{time:r}}=e;return(0,s.createElement)("dl",{className:h()(t,"jetpack-business-hours")},p.map(((e,t)=>(0,s.createElement)(b.Z,{key:t,day:e,localization:o,timeFormat:r}))))}return(0,s.createElement)("div",{className:h()(t,"is-edit")},p.map(((e,t)=>(0,s.createElement)(f.Z,a()({key:t,day:e,localization:o},this.props)))))}}const w=y},60866:(e,t,r)=>{"use strict";var n=r(51806),a=r(31985),s=r(22023),o=r(86162);(0,a.S)(s,{edit:e=>(0,n.createElement)(o.Z,e),save:()=>null})},98625:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(55609),a=r(92819);const s=(0,n.withFallbackStyles)(((e,t)=>{const{backgroundColor:r,textColor:n}=t,s=(0,a.get)(r,"color"),o=!(0,a.get)(n,"color")&&e?e.querySelector('[contenteditable="true"]'):null;return{fallbackBackgroundColor:s||!e?void 0:getComputedStyle(e).backgroundColor,fallbackTextColor:n||!o?void 0:getComputedStyle(o).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),s=r(69307),o=r(65736),i=r(90446);const __=o.__;function l({borderRadius:e="",setAttributes:t}){const r=(0,s.useCallback)((e=>t({borderRadius:e})),[t]);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:r,value:e}))}},36953:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(52175),s=r(65736);const __=s.__;function o({isGradientAvailable:e,backgroundColor:t,fallbackBackgroundColor:r,fallbackTextColor:s,gradientValue:o,setBackgroundColor:i,setGradient:l,setTextColor:c,textColor:u}){const p=(0,n.createElement)(a.ContrastChecker,{backgroundColor:t.color,fallbackBackgroundColor:r,fallbackTextColor:s,isLargeText:!1,textColor:u.color});return e?(0,n.createElement)(a.__experimentalPanelColorGradientSettings,{settings:[{colorValue:u.color,label:__("Text Color","jetpack"),onColorChange:c},{colorValue:t.color,gradientValue:o,label:__("Background","jetpack"),onColorChange:i,onGradientChange:l}],title:__("Background & Text Color","jetpack")},p):(0,n.createElement)(a.PanelColorSettings,{colorSettings:[{value:u.color,onChange:c,label:__("Text Color","jetpack")},{value:t.color,onChange:i,label:__("Background","jetpack")}],title:__("Background & Text Color","jetpack")},p)}},90446:(e,t,r)=>{"use strict";r.d(t,{DA:()=>a,G0:()=>i,Gp:()=>o,pg:()=>s});var n=r(52175);const a=!!n.__experimentalUseGradient,s=5,o=50,i=0},29343:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(9818),s=r(30429),o=r(43043),i=r(36953);function l({attributes:e,backgroundColor:t,clientId:r,context:l,fallbackBackgroundColor:c,fallbackTextColor:u,setAttributes:p,setBackgroundColor:d,setTextColor:m,textColor:h,gradientValue:g,setGradient:f,isGradientAvailable:b}){const{align:v,borderRadius:k}=e,y="jetpack/parentBlockWidth"in l,w=y?l["jetpack/parentBlockWidth"]:e.width,E=(0,a.useSelect)((e=>{const{getBlock:t,getBlockRootClientId:n}=e("core/block-editor");return t(n(r))})),{updateBlockAttributes:_}=(0,a.useDispatch)("core/block-editor");return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(i.Z,{backgroundColor:t,fallbackBackgroundColor:c,fallbackTextColor:u,gradientValue:g,setBackgroundColor:d,setGradient:f,setTextColor:m,textColor:h,isGradientAvailable:b}),(0,n.createElement)(o.Z,{borderRadius:k,setAttributes:p}),(0,n.createElement)(s.G,{align:v,width:w,onChange:e=>{y?_(E.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),s=r(51806),o=r(52175),i=r(94333),l=r(65736),c=r(65235),u=r.n(c),p=r(81673),d=r(98625),m=r(90446),h=r(29343),g=r(16969);const __=l.__;const f=(0,i.compose)((0,o.withColors)({backgroundColor:"background-color"},{textColor:"color"}),d.Z)((function(e){const{attributes:t,backgroundColor:r,className:n,clientId:i,context:l,setAttributes:c,textColor:d}=e,{borderRadius:f,element:b,placeholder:v,text:k,width:y,fontSize:w}=t,E="jetpack/parentBlockWidth"in l;(0,g.Z)({attributes:t,clientId:i,setAttributes:c}),(0,p.Z)({attributes:t,disableEffects:E,setAttributes:c});const{gradientClass:_,gradientValue:C,setGradient:S}=m.DA?(0,o.__experimentalUseGradient)({gradientAttribute:"gradient",customGradientAttribute:"customGradient"}):{},x=u()("wp-block-button",n),j=u()("wp-block-button__link",{"has-background":r.color||C,[r.class]:!C&&r.class,"has-text-color":d.color,[d.class]:d.class,[_]:_,"no-border-radius":0===f,"has-custom-width":!!y,[`has-${w}-font-size`]:!!w,"has-custom-font-size":!!w}),L={...!r.color&&C?{background:C}:{backgroundColor:r.color},fontSize:t.style?.typography?.fontSize,color:d.color,borderRadius:f?f+"px":void 0,width:y};return(0,s.createElement)("div",{className:x},(0,s.createElement)(o.RichText,{allowedFormats:"input"===b?[]:void 0,className:j,disableLineBreaks:"input"===b,onChange:e=>c({text:e}),placeholder:v||__("Add text…","jetpack"),style:L,value:k,withoutInteractiveFormatting:!0}),(0,s.createElement)(o.InspectorControls,null,(0,s.createElement)(h.Z,a()({gradientValue:C,setGradient:S,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:()=>s});var n=r(51806),a=r(55609);const s=(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),s=r(70424),o=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:s.Z,edit:o.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),s=r(65235),o=r.n(s),i=r(90446);function l({attributes:e,blockName:t,uniqueId:r}){const{backgroundColor:s,borderRadius:l,className:c,customBackgroundColor:u,customGradient:p,customTextColor:d,gradient:m,saveInPostContent:h,text:g,textColor:f,url:b,width:v,fontSize:k}=e;if(!h)return null;const y=(0,a.getColorClassName)("background-color",s),w=i.DA?(0,a.__experimentalGetGradientClass)(m):void 0,E=(0,a.getColorClassName)("color",f),_=o()("wp-block-button","jetpack-submit-button",c,{[`wp-block-jetpack-${t}`]:t}),C=o()("wp-block-button__link",{"has-text-color":f||d,[E]:E,"has-background":s||m||u||p,[y]:y,[w]:w,"no-border-radius":0===l,"has-custom-width":!!v,[`has-${k}-font-size`]:!!k,"has-custom-font-size":!!k}),S={background:p||void 0,backgroundColor:y||p||m?void 0:u,fontSize:e.style?.typography?.fontSize,color:E?void 0:d,borderRadius:l?l+"px":void 0,width:v};return(0,n.createElement)("div",{className:_},(0,n.createElement)(a.RichText.Content,{className:C,"data-id-attr":r||"placeholder",href:b,id:r,rel:"noopener noreferrer",role:"button",style:S,tagName:"a",target:"_blank",value:g}))}},16969:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(9818),a=r(69307),s=r(92819);function o({attributes:e,clientId:t,setAttributes:r}){const{passthroughAttributes:o}=e,{attributesToSync:i}=(0,n.useSelect)((r=>{const{getBlockAttributes:n,getBlockRootClientId:a}=r("core/block-editor"),i=n(a(t))||{},l=(0,s.mapValues)(o,(e=>i[e]));return{attributesToSync:(0,s.pickBy)(l,((t,r)=>t!==e[r]))}}));(0,a.useEffect)((()=>{(0,s.isEmpty)(i)||r(i)}),[i,r])}},39964:(e,t,r)=>{"use strict";r.d(t,{l:()=>n});const n="https://calendly.com/wpcom/jetpack-block-example"},60153:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>p});var n=r(51806),a=r(13419),s=r(52175),o=r(55609),i=r(65736),l=r(57538);const __=i.__,_x=i._x,c=({onEditClick:e})=>(0,n.createElement)(o.ToolbarGroup,null,(0,n.createElement)(o.ToolbarButton,{onClick:()=>e(!0)},__("Edit","jetpack"))),u=e=>{const{attributes:{hideEventTypeDetails:t,url:r},defaultClassName:s,embedCode:i,parseEmbedCode:l,setAttributes:c,setEmbedCode:u}=e;let p=null;return r&&(p=(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)(o.PanelBody,{PanelBody:!0,title:__("Calendar settings","jetpack"),initialOpen:!1},(0,n.createElement)("form",{onSubmit:l,className:`${s}-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)(o.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))),(0,n.createElement)(o.ToggleControl,{label:__("Hide event type details","jetpack"),checked:t,onChange:()=>c({hideEventTypeDetails:!t})})),p&&(0,n.createElement)(o.Notice,{className:`${s}-color-notice`,isDismissible:!1},(0,n.createElement)(o.ExternalLink,{href:p},__("Explore more customization options.","jetpack"))))},p=e=>{const{attributes:t,clientId:r,isEditingUrl:a,setAttributes:o,setIsEditingUrl:i}=e,{style:p,url:d}=t,m=[{value:"inline",label:__("Inline","jetpack")},{value:"link",label:__("Link","jetpack")}];return(0,n.createElement)(n.Fragment,null,d&&!a&&(0,n.createElement)(s.BlockControls,null,(0,n.createElement)(c,{onEditClick:i})),d&&(0,n.createElement)(l.Z,{clientId:r,styleOptions:m,onSelectStyle:o,activeStyle:p,attributes:t,viewportWidth:500}),(0,n.createElement)(s.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),s=r(65736),o=r(24381);const __=s.__,i={attributes:{backgroundColor:{type:"string",default:"ffffff",validator:o.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:o.Z},textColor:{type:"string",default:"4D5055",validator:o.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:o.Z},customTextButtonColor:{type:"string",validator:o.Z}},migrate:e=>{const{submitButtonText:t,submitButtonTextColor:r,submitButtonBackgroundColor:n,submitButtonClasses:s,backgroundButtonColor:o,textButtonColor:i,customBackgroundButtonColor:l,customTextButtonColor:c,...u}=e,p={text:(d=e).submitButtonText||__("Schedule time with me","jetpack"),textColor:d.submitButtonTextColor||d.textButtonColor,customTextColor:d.customTextButtonColor,backgroundColor:d.submitButtonBackgroundColor||d.backgroundButtonColor,customBackgroundColor:d.customBackgroundButtonColor,url:d.url};var d;return[u,[(0,a.createBlock)("jetpack/button",{element:"a",uniqueId:"calendly-widget-id",...p})]]},save:({attributes:{url:e}})=>(0,n.createElement)("a",{href:e},e)}},29415:(e,t,r)=>{"use strict";r.d(t,{Z:()=>_});var n=r(82674),a=r.n(n),s=r(51806),o=r(13419),i=r(52175),l=r(4981),c=r(55609),u=r(9818),p=r(69307),d=r(65736),m=r(92819),h=r(4554),g=r(23621),f=r(23329),b=r(39964),v=r(60153),k=r(4867);const __=d.__,_x=d._x,y="jetpack/button",w={element:"a",text:__("Schedule time with me","jetpack"),uniqueId:"calendly-widget-id",url:b.l},E=(0,o.dM)(f);const _=(0,c.withNotices)((function(e){const{attributes:t,className:r,clientId:n,name:o,noticeOperations:d,noticeUI:_,setAttributes:C}=e,S=(0,l.getBlockDefaultClassName)(o),x=(0,h.S)(f.attributes,t);(0,m.isEqual)(x,t)||C(x);const{backgroundColor:j,hideEventTypeDetails:L,primaryColor:A,textColor:P,style:T,url:N}=x,[M,R]=(0,p.useState)(N),[I,Z]=(0,p.useState)(!1),[D,B]=(0,p.useState)(!1),[O,F]=(0,p.useState)({}),U=()=>{d.removeAllNotices(),d.createErrorNotice(__("Your calendar couldn't be embedded. Please double check your URL or code.","jetpack"))};(0,p.useEffect)((()=>{N&&b.l!==N&&"link"!==T&&(0,g.Z)(N,B).catch((()=>{C({url:void 0}),U()}))}),[]);const z=e=>{if(!e)return void U();e.preventDefault();const t=(0,k.CC)(M);if(t){if(t.buttonAttributes&&"link"===t.style){const e=(0,u.select)("core/editor").getBlocksByClientId(n);e.length&&e[0].innerBlocks.forEach((e=>{(0,u.dispatch)("core/editor").updateBlockAttributes(e.clientId,t.buttonAttributes)})),F(t.buttonAttributes)}(0,g.Z)(t.url,B).then((()=>{const e=(0,h.S)(f.attributes,t);C(e),Z(!1),d.removeAllNotices()})).catch((()=>{C({url:void 0}),U()}))}else U()},q=(0,s.createElement)("div",{className:"wp-block-embed is-loading"},(0,s.createElement)(c.Spinner,null),(0,s.createElement)("p",null,__("Embedding…","jetpack"))),$=(0,s.createElement)(c.Placeholder,{label:__("Calendly","jetpack"),instructions:__("Enter your Calendly web address or embed code below.","jetpack"),icon:E,notices:_},(0,s.createElement)("form",{onSubmit:z},(0,s.createElement)("input",{type:"text",id:"embedCode",onChange:e=>R(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:M||"",className:"components-placeholder__input"}),(0,s.createElement)("div",null,(0,s.createElement)(c.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))),(0,s.createElement)("div",{className:`${S}-learn-more`},(0,s.createElement)(c.ExternalLink,{href:"https://help.calendly.com/hc/en-us/articles/223147027-Embed-options-overview"},__("Need help finding your embed code?","jetpack")))),H=(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:`${S}-overlay`}),(0,s.createElement)("iframe",{src:(()=>{const e=new URLSearchParams({embed_domain:"wordpress.com",embed_type:"Inline",hide_event_type_details:L?1:0,background_color:j,primary_color:A,text_color:P});return`${N}?${e}`})(),width:"100%",height:"100%",frameBorder:"0","data-origwidth":"100%","data-origheight":"100%",title:"Calendly"})),V=(0,s.createElement)(i.InnerBlocks,{template:[[y,{...w,...O,passthroughAttributes:{url:"url"}}]],templateLock:"all"});if(D)return q;let G=r;return N&&!I&&(G+=` calendly-style-${T}`),(0,s.createElement)("div",{className:G},(0,s.createElement)(v.ZP,a()({},e,{defaultClassName:S,embedCode:M,isEditingUrl:I,parseEmbedCode:z,setEmbedCode:R,setIsEditingUrl:Z})),N&&!I?"inline"===T?H:V:$)}))},52020:(e,t,r)=>{"use strict";var n=r(4981),a=r(31985),s=r(23329),o=r(83830),i=r(29415),l=r(15816),c=r(4867);(0,a.S)(s,{edit:i.Z,save:l.Z,transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&c.mL.test(e.textContent),transform:e=>{const t=(0,c.CC)(e.textContent);return(0,n.createBlock)("jetpack/calendly",t)}}]},deprecated:[o.Z]})},15816:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(52175);function s(){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"),s=n.get("primary_color"),o=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),s&&s.match(i)&&(t.primaryColor=s),o&&o.match(i)&&(t.textColor=o),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:()=>d});var n=r(51806),a=r(52175),s=r(55609),o=r(69307),i=r(65736),l=r(65235),c=r.n(l),u=r(35208);const __=i.__;class p extends o.Component{constructor(...e){super(...e),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:p,country:d,linkToGoogleMaps:m},isSelected:h,setAttributes:g}=this.props,f=[e,t,r,i,l,p,d].some((e=>""!==e)),b=c()({"jetpack-address-block":!0,"is-selected":h}),v=(0,n.createElement)(s.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)(o.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:p,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:d,placeholder:__("Country","jetpack"),"aria-label":__("Country","jetpack"),onChange:e=>g({country:e}),onKeyDown:this.preventEnterKey}),v))}}const d=p},11005:(e,t,r)=>{"use strict";r.d(t,{X:()=>p,u:()=>u});var n=r(51806),a=r(55609),s=r(69307),o=r(65736),i=r(36598),l=r(36553),c=r(35208);const __=o.__,_x=o._x,u="address",p={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)(s.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),s=r(65736);const __=s.__,o=({attributes:{address:e,addressLine2:t,addressLine3:r,city:s,region:o,postal:i,country:l}})=>(0,n.createElement)(a.Fragment,null,e&&(0,n.createElement)("div",{className:"jetpack-address__address jetpack-address__address1"},e),t&&(0,n.createElement)("div",{className:"jetpack-address__address jetpack-address__address2"},t),r&&(0,n.createElement)("div",{className:"jetpack-address__address jetpack-address__address3"},r),s&&!(o||i)&&(0,n.createElement)("div",{className:"jetpack-address__city"},s),s&&(o||i)&&(0,n.createElement)("div",null,(0,n.createElement)("span",{className:"jetpack-address__city"},s),", ",(0,n.createElement)("span",{className:"jetpack-address__region"},o)," ",(0,n.createElement)("span",{className:"jetpack-address__postal"},i)),!s&&(o||i)&&(0,n.createElement)("div",null,(0,n.createElement)("span",{className:"jetpack-address__region"},o)," ",(0,n.createElement)("span",{className:"jetpack-address__postal"},i)),l&&(0,n.createElement)("div",{className:"jetpack-address__country"},l)),i=({attributes:{address:e,addressLine2:t,addressLine3:r,city:n,region:a,postal:s,country:o}})=>{let i=a?`+${a},`:"";i=s?`${i}+${s}`:i;return`https://www.google.com/maps/search/${e?`${e},`:""}${t?`${t},`:""}${r?`${r},`:""}${n?`+${n},`:""}${i}${o?`+${o}`:""}`.replace(" ","+")},l=e=>(({address:e,addressLine2:t,addressLine3:r,city:n,region:a,postal:s,country:o})=>[e,t,r,n,a,s,o].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)(o,e)),!e.attributes.linkToGoogleMaps&&(0,n.createElement)(o,e))},83238:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(52175),s=r(65235),o=r.n(s);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:o()({"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(4981),a=r(31985),s=r(11005),o=r(58891),i=r(83238),l=r(99804),c=r(52398),u=r(56162);(0,a.S)(o,{edit:i.Z,save:u.Z,transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:({idBase:e,instance:t})=>!!t?.raw&&"widget_contact_info"===e,transform:({instance:e})=>{let t=[(0,n.createBlock)("core/heading",{content:e.raw.title}),(0,n.createBlock)("jetpack/email",{email:e.raw.email}),(0,n.createBlock)("jetpack/phone",{phone:e.raw.phone}),(0,n.createBlock)("jetpack/address",{address:e.raw.address})];return e.raw.hours&&(t=[...t,(0,n.createBlock)("core/paragraph",{content:e.raw.hours})]),e.raw.showmap&&e.raw.address&&(t=[...t,(0,n.createBlock)("jetpack/map",{address:e.raw.address})]),(0,n.createBlock)("jetpack/contact-info",{},t)}}]}},[{name:s.u,settings:s.X},{name:l.u,settings:l.X},{name:c.u,settings:c.X}])},31336:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(65736),a=r(66425),s=r(90458);const __=n.__,o=e=>{const{setAttributes:t}=e;return(0,a.Z)("email",e,__("Email","jetpack"),s.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),s=r(65736),o=r(36598),i=r(31336),l=r(90458);const __=s.__,_x=s._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,o.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:()=>o});var n=r(51806),a=r(69307),s=r(92384);const o=({attributes:{email:e},className:t})=>e&&(0,n.createElement)("div",{className:t},e.split(/(\s+)/).map(((e,t)=>{const r=e.replace(/([.,/#!$%^&*;:{}=\-_`~()\][])+$/g,"");return e.indexOf("@")&&s.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)})))},70835:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(65736),a=r(66425),s=r(21621);const __=n.__,o=e=>{const{setAttributes:t}=e;return(0,a.Z)("phone",e,__("Phone number","jetpack"),s.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),s=r(65736),o=r(36598),i=r(70835),l=r(21621);const __=s.__,_x=s._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,o.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=({attributes:{phone:e},className:t})=>e&&(0,n.createElement)("div",{className:t},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,s=r?e.substring(0,r):"",o=a.replace(/\D/g,"");return/[0-9/+/(]/.test(a[0])?(s=s.slice(0,-1),"+"===a[0]&&(o="+"+o)):a=a.substring(1),[s.trim()?(0,n.createElement)("span",{key:"phonePrefix",className:"phone-prefix"},s):null,(0,n.createElement)("a",{key:"phoneNumber",href:`tel:${o}`},a)]}(e))},56162:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(52175);const s=({className:e})=>(0,n.createElement)("div",{className:e},(0,n.createElement)(a.InnerBlocks.Content,null))},10764:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(51806),a=r(25607),s=r(43317),o=r(52175),i=r(69307),l=r(65235),c=r.n(l),u=r(79162);const p=({className:e=null,currency:t=null,defaultValue:r=null,disabled:l=!1,label:p="",onChange:d=null,value:m=""})=>{const[h,g]=(0,i.useState)((0,a.ZP)(m,t,{symbol:""})),[f,b]=(0,i.useState)(!1),[v,k]=(0,i.useState)(!1),y=(0,i.useRef)(null),w=(0,i.useCallback)((e=>{if(g(e),!d)return;const r=(0,u.Vm)(e,t);r&&r>=(0,u.hj)(t)?(d(r),k(!1)):k(!0)}),[t,d]),E=()=>{y.current&&(y.current.focus(),b(!0))};return(0,i.useEffect)((()=>{if(!y.current)return;const e=y.current,n=()=>{b(!1),h||w((0,a.ZP)(r,t,{symbol:""}))};return e.addEventListener("blur",n),()=>{e.removeEventListener("blur",n)}}),[t,r,h,y,w]),(0,i.useEffect)((()=>{f||v||g((0,a.ZP)(m,t,{symbol:""}))}),[t,f,v,w,m]),(0,i.useEffect)((()=>{w((0,a.ZP)(m,t,{symbol:""}))}),[m]),(0,n.createElement)("div",{className:c()("donations__amount",e,{"has-focus":f,"has-error":v}),role:"button",tabIndex:0,onClick:E,onKeyDown:E},s.M[t].symbol,l?(0,n.createElement)("div",{className:"donations__amount-value"},(0,a.ZP)(m||r,t,{symbol:""})):(0,n.createElement)(o.RichText,{allowedFormats:[],"aria-label":p,onChange:e=>w(e),placeholder:(0,a.ZP)(r,t,{symbol:""}),ref:y,value:h,withoutInteractiveFormatting:!0}))}},82275:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(51806),a=r(43317),s=r(13419),o=r(52175),i=r(55609),l=r(65736),c=r(39630),u=r(79162);const __=l.__,p=e=>{const{attributes:t,setAttributes:r}=e,{currency:l,oneTimeDonation:p,monthlyDonation:d,annualDonation:m,showCustomAmount:h}=t,g=(e,n)=>{const a={"1 month":"monthlyDonation","1 year":"annualDonation"}[e],s=t[a];r({[a]:{...s,show:n}})};return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(o.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:({onToggle:e,isOpen:t})=>(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:e,onKeyDown:r=>{t||r.keyCode!==c.DOWN||(r.preventDefault(),r.stopPropagation(),e())}}),renderContent:({onClose:e})=>(0,n.createElement)(i.MenuGroup,null,Object.keys(u.ck).map((t=>(0,n.createElement)(i.MenuItem,{isSelected:t===l,icon:t===l?"yes":"",onClick:()=>{(e=>{const t=(0,u.li)(e);r({currency:e,oneTimeDonation:{...p,amounts:t},monthlyDonation:{...d,amounts:t},annualDonation:{...m,amounts:t}})})(t),e()},key:`jetpack-donations-currency-${t}`},t+" - "+a.M[t].symbol))))}))))),(0,n.createElement)(o.InspectorControls,null,(0,n.createElement)(i.PanelBody,{title:__("Settings","jetpack")},(0,n.createElement)(i.ToggleControl,{checked:d.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,s.lQ)()}`},__("View donation earnings","jetpack")))))}},853:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(25607),s=r(43317),o=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:({attributes:e})=>{const{currency:t,oneTimeDonation:r,monthlyDonation:i,annualDonation:c,showCustomAmount:u,chooseAmountText:p,customAmountText:d}=e;if(!r||!r.show||-1===r.planId)return null;const m={"one-time":{title:__("One-Time","jetpack")},...i.show&&{"1 month":{title:__("Monthly","jetpack")}},...c.show&&{"1 year":{title:__("Yearly","jetpack")}}};return(0,n.createElement)("div",null,(0,n.createElement)("div",{className:"donations__container"},Object.keys(m).length>1&&(0,n.createElement)("div",{className:"donations__nav"},Object.entries(m).map((([e,{title:t}])=>(0,n.createElement)("div",{role:"button",tabIndex:0,className:"donations__nav-item",key:`jetpack-donations-nav-item-${e} `,"data-interval":e},t)))),(0,n.createElement)("div",{className:"donations__content"},(0,n.createElement)("div",{className:"donations__tab"},(0,n.createElement)(o.RichText.Content,{tagName:"h4",className:"donations__one-time-item",value:r.heading}),i.show&&(0,n.createElement)(o.RichText.Content,{tagName:"h4",className:"donations__monthly-item",value:i.heading}),c.show&&(0,n.createElement)(o.RichText.Content,{tagName:"h4",className:"donations__annual-item",value:c.heading}),(0,n.createElement)(o.RichText.Content,{tagName:"p",value:p}),(0,n.createElement)("div",{className:"donations__amounts donations__one-time-item"},r.amounts.map((e=>(0,n.createElement)("div",{className:"donations__amount","data-amount":e},(0,a.ZP)(e,t))))),i.show&&(0,n.createElement)("div",{className:"donations__amounts donations__monthly-item"},i.amounts.map((e=>(0,n.createElement)("div",{className:"donations__amount","data-amount":e},(0,a.ZP)(e,t))))),c.show&&(0,n.createElement)("div",{className:"donations__amounts donations__annual-item"},c.amounts.map((e=>(0,n.createElement)("div",{className:"donations__amount","data-amount":e},(0,a.ZP)(e,t))))),u&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(o.RichText.Content,{tagName:"p",value:d}),(0,n.createElement)("div",{className:"donations__amount donations__custom-amount"},s.M[t].symbol,(0,n.createElement)("div",{className:"donations__amount-value","data-currency":t,"data-empty-text":(0,a.ZP)(100*(0,l.hj)(t),t,{symbol:""})}))),(0,n.createElement)("div",{className:"donations__separator"},"——"),(0,n.createElement)(o.RichText.Content,{tagName:"p",className:"donations__one-time-item",value:r.extraText}),i.show&&(0,n.createElement)(o.RichText.Content,{tagName:"p",className:"donations__monthly-item",value:i.extraText}),c.show&&(0,n.createElement)(o.RichText.Content,{tagName:"p",className:"donations__annual-item",value:c.extraText}),(0,n.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__one-time-item"},(0,n.createElement)(o.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__one-time-item",value:r.buttonText})),i.show&&(0,n.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__monthly-item"},(0,n.createElement)(o.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__monthly-item",value:i.buttonText})),c.show&&(0,n.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__annual-item"},(0,n.createElement)(o.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__annual-item",value:c.buttonText}))))))}}},86245:(e,t,r)=>{"use strict";r.d(t,{Z:()=>b});var n=r(82674),a=r.n(n),s=r(51806),o=r(45033),i=r(9818),l=r(69307),c=r(65736),u=r(79162),p=r(74251),d=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:w,unlockPostSaving:E}=(0,i.useDispatch)("core/editor"),_=(0,i.useSelect)((e=>e("core/editor").getCurrentPost()),[]),{setConnectUrl:C,setConnectedAccountDefaultCurrency:S}=(0,i.useDispatch)(d.G4);(0,l.useEffect)((()=>{n({fallbackLinkUrl:_.link})}),[_.link,n]);const x=(0,i.useSelect)((e=>e(d.G4).getConnectedAccountDefaultCurrency()));(0,l.useEffect)((()=>{if(!c&&x){const e=x.toUpperCase(),t=!!u.ck[e];n(t?{currency:e}:{currency:"USD"})}}),[c,x,n]);const j=e=>{v(e)};return(0,l.useEffect)((()=>{w("donations");const e=e=>e.reduce(((e,{id:t,currency:r,type:n,interval:a})=>(r===c&&"donation"===n&&(e[a]=t),e)),{});(0,h.Z)("donation").then((t=>{if(!t&&"object"!=typeof t||t.errors)return E("donations"),void v(__("Could not load data from WordPress.com.","jetpack"));C((0,p.Z)(_.id,t.connect_url)),S(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 E("donations")):t.connect_url?(y({"one-time":-1,"1 month":-1,"1 year":-1}),void E("donations")):void(c&&(0,m.Z)(c).then((t=>{y(e(t)),E("donations")}),j))}),j)}),[w,c,_.id,C,S,E]),b?(0,s.createElement)(g.Z,{className:r,error:b}):c?(0,s.createElement)(f.Z,a()({},e,{products:k})):(0,s.createElement)(o.Z,null)}},67140:(e,t,r)=>{"use strict";var n=r(31985),a=r(98826),s=r(853),o=r(86245),i=r(75314);(0,n.S)(a,{edit:o.Z,save:i.Z,deprecated:[s.Z]})},21789:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(86989),a=r.n(n);const s=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:()=>o});var n=r(86989),a=r.n(n),s=r(96483);const o=async(e=null)=>{const t=new URLSearchParams(window.location.search),r=(0,s.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)}}},24177:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(55609),s=r(65736);const __=s.__,o=({className:e,error:t})=>(0,n.createElement)(a.Placeholder,{icon:"lock",label:__("Donations","jetpack"),instructions:t,className:e})},75314:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(52175);const s=({attributes:e})=>{const{fallbackLinkUrl:t,oneTimeDonation:r,monthlyDonation:s,annualDonation:o}=e;return r&&r.show&&r.planId&&-1!==r.planId?(0,n.createElement)("div",null,(0,n.createElement)(a.RichText.Content,{tagName:"h4",value:r.heading}),(0,n.createElement)(a.RichText.Content,{tagName:"p",value:r.extraText}),(0,n.createElement)(a.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:t,rel:"noopener noreferrer noamphtml",target:"_blank",value:r.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:t,rel:"noopener noreferrer noamphtml",target:"_blank",value:s.buttonText})),o.show&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)("hr",{className:"donations__separator"}),(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:t,rel:"noopener noreferrer noamphtml",target:"_blank",value:o.buttonText}))):null}},91757:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(52175),s=r(9818),o=r(65736),i=r(79162),l=r(10764);const __=o.__,c=({activeTab:e,attributes:t,setAttributes:r})=>{const{currency:c,oneTimeDonation:u,monthlyDonation:p,annualDonation:d,showCustomAmount:m,chooseAmountText:h,customAmountText:g}=t,f={"one-time":"oneTimeDonation","1 month":"monthlyDonation","1 year":"annualDonation"},b=r=>t[f[e]][r],v=(n,a)=>{const s=f[e],o=t[s];r({[s]:{...o,[n]:a}})},k=(0,i.li)(c),y=b("amounts"),w=(0,s.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:b("heading"),onChange:e=>v("heading",e)}),(0,n.createElement)(a.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:h,onChange:e=>r({chooseAmountText:e})}),(0,n.createElement)("div",{className:"donations__amounts"},y.map(((e,t)=>(0,n.createElement)(l.Z,{currency:c,defaultValue:k[t],label:(0,o.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=[...y];r[t]=e,v("amounts",r)})(e,t),value:e})))),m&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(a.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:g,onChange:e=>r({customAmountText:e})}),(0,n.createElement)(l.Z,{currency:c,label:__("Custom amount","jetpack"),defaultValue:100*(0,i.hj)(c),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:b("extraText"),onChange:e=>v("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:b("buttonText"),onChange:e=>{return t=e,void r({oneTimeDonation:{...u,buttonText:t},monthlyDonation:{...p,buttonText:t},annualDonation:{...d,buttonText:t}});var t},allowedFormats:w})))}},72833:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(51806),a=r(69307),s=r(65736),o=r(65235),i=r.n(o),l=r(16367),c=r(82275),u=r(91757);const __=s.__,p=e=>{const{attributes:t,className:r,products:s,setAttributes:o}=e,{oneTimeDonation:p,monthlyDonation:d,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")},...d.show&&{"1 month":{title:__("Monthly","jetpack")}},...m.show&&{"1 year":{title:__("Yearly","jetpack")}}};return(0,a.useEffect)((()=>{p.planId===s["one-time"]&&d.planId===s["1 month"]&&m.planId===s["1 year"]||o({...s["one-time"]&&{oneTimeDonation:{...p,planId:s["one-time"]}},...s["1 month"]&&{monthlyDonation:{...d,planId:s["1 month"]}},...s["1 year"]&&{annualDonation:{...m,planId:s["1 year"]}}})}),[p,d,m,o,s]),(0,a.useEffect)((()=>{!d.show&&f("1 month")&&g("one-time"),!m.show&&f("1 year")&&g("one-time")}),[d,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,{title:t}])=>(0,n.createElement)("div",{role:"button",tabIndex:0,className:i()("donations__nav-item",{"is-active":f(e)}),onClick:()=>g(e),onKeyDown:()=>g(e),key:`jetpack-donations-nav-item-${e} `},t)))),(0,n.createElement)("div",{className:"donations__content"},(0,n.createElement)(u.Z,{activeTab:h,attributes:t,setAttributes:o}))),(0,n.createElement)(c.Z,e))}},92868:(e,t,r)=>{"use strict";r.d(t,{IJ:()=>a,Q7:()=>s,Wh:()=>n});const n=/^\s*https?:\/\/(?:www\.)?(?:eventbrite\.[a-z.]+)\/e\/[^/]*?(\d+)\/?(?:\?[^/]*)?\s*$/i,a=/^\s*https?:\/\/(?:.+\.)?(?:eventbrite\.[a-z.]+)\/?(?:\?[^/]*)?\s*$/i,s="https://www.eventbrite.com/e/test-event-tickets-123456789"},6949:(e,t,r)=>{"use strict";r.d(t,{J:()=>o});var n=r(51806),a=r(55609),s=r(65736);const __=s.__,o=({setEditingUrl:e})=>(0,n.createElement)(a.ToolbarGroup,null,(0,n.createElement)(a.ToolbarButton,{className:"components-toolbar__control",label:__("Edit URL","jetpack"),icon:"edit",onClick:()=>e(!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:()=>p});var n=r(51806),a=r(52175),s=r(4981),o=r(65736),i=r(65235),l=r.n(i),c=r(92819);const _x=o._x,u=["text","backgroundColor","textColor","customBackgroundColor","customTextColor","borderRadius"];const p={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},o=(0,c.pick)(e,u);return[a,[(0,s.createBlock)("jetpack/button",{element:"a",text:o.text||_x("Register","verb: e.g. register for an event.","jetpack"),...o,uniqueId:"eventbrite-widget-id",className:t&&-1!==t.indexOf("is-style-outline")?"is-style-outline":""})]]},save:function({attributes:e}){const{eventId:t,useModal:r,url:s,style:o}=e;if(t)return r||"modal"===o?function(e){const{backgroundColor:t,borderRadius:r,customBackgroundColor:s,customTextColor:o,eventId:i,text:c,textColor:u,url:p}=e,d=(0,a.getColorClassName)("color",u),m=(0,a.getColorClassName)("background-color",t),h=l()("wp-block-button__link",{"has-text-color":u||o,[d]:d,"has-background":t||s,[m]:m,"no-border-radius":0===r}),g={backgroundColor:m?void 0:s,color:d?void 0:o,borderRadius:r?r+"px":void 0};return(0,n.createElement)("div",{className:"wp-block-button"},(0,n.createElement)(a.RichText.Content,{className:h,href:p,id:`eventbrite-widget-${i}`,rel:"noopener noreferrer",role:"button",style:g,tagName:"a",target:"_blank",value:c}))}(e):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(51806),a=r(13419),s=r(52175),o=r(55609),i=r(69307),l=r(65736),c=r(57538),u=r(4554),p=r(23621),d=r(33711),m=r(92868),h=r(6949),g=r(8964),f=r(77825);const __=l.__,_x=l._x,b=(0,a.dM)(d),v={name:"jetpack/button",attributes:{element:"a",text:_x("Register","verb: e.g. register for an event.","jetpack"),uniqueId:"eventbrite-widget-id"}};class k extends i.Component{state={editedUrl:this.props.attributes.url||"",editingUrl:!1,isResolvingUrl:!1};componentDidMount(){const{url:e}=this.props.attributes;this.setUrl(e)}setUrl=e=>{const{attributes:t,noticeOperations:r,setAttributes:n}=this.props,{style:a}=t;if(!e||m.Q7===e||"modal"===a)return;const s=(0,f.Ve)(e);if(s){const t={eventId:s,url:e};(0,p.Z)(t.url,this.setIsResolvingUrl).then((e=>{const a=(0,u.S)(d.attributes,{...t,url:e});n(a),this.setState({editedUrl:e}),r.removeAllNotices()})).catch((()=>{n({eventId:void 0,url:void 0}),this.setErrorNotice()}))}else this.setErrorNotice()};setIsResolvingUrl=e=>this.setState({isResolvingUrl:e});setEditingUrl=e=>this.setState({editingUrl:e});setErrorNotice=()=>{const{noticeOperations:e,onReplace:t}=this.props,{editedUrl:r}=this.state;e.removeAllNotices(),e.createErrorNotice((0,n.createElement)(n.Fragment,null,__("Sorry, this content could not be embedded.","jetpack")," ",(0,n.createElement)(o.Button,{variant:"link",onClick:()=>(0,f.N3)(r,t)},_x("Convert block to link","button label","jetpack"))))};submitForm=e=>{e&&e.preventDefault(),this.setUrl((0,f.qq)(this.state.editedUrl)),this.setState({editingUrl:!1})};cannotEmbed=()=>{const{url:e}=this.props.attributes,{isResolvingUrl:t}=this.state;return!t&&e&&!m.Wh.test(e)};renderLoading(){return(0,n.createElement)("div",{className:"wp-block-embed is-loading"},(0,n.createElement)(o.Spinner,null),(0,n.createElement)("p",null,__("Embedding…","jetpack")))}renderInspectorControls(){const{style:e}=this.props.attributes,{attributes:t,clientId:r,setAttributes:a}=this.props,s=[{value:"inline",label:__("In-page Embed","jetpack"),preview:(0,n.createElement)("div",{className:"block-editor-block-preview__container"},(0,n.createElement)("img",{src:g,alt:__("In page Eventbrite checkout example","jetpack")}))},{value:"modal",label:__("Button & Modal","jetpack")}];return(0,n.createElement)(c.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:s,onSelectStyle:a,activeStyle:e,attributes:t,viewportWidth:130})}renderEditEmbed(){const{className:e,noticeUI:t}=this.props,{editedUrl:r}=this.state,s=(0,a.Wp)()||(0,a.Ug)()?"http://support.wordpress.com/wordpress-editor/blocks/eventbrite-block/":"https://jetpack.com/support/jetpack-blocks/eventbrite-block/";return(0,n.createElement)("div",{className:e},(0,n.createElement)(o.Placeholder,{label:__("Eventbrite Checkout","jetpack"),instructions:__("Paste a link to an Eventbrite event to embed ticket checkout.","jetpack"),icon:b,notices:t},(0,n.createElement)("form",{onSubmit:this.submitForm},(0,n.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,n.createElement)(o.Button,{variant:"secondary",type:"submit"},_x("Embed","submit button label","jetpack"))),(0,n.createElement)("div",{className:"components-placeholder__learn-more"},(0,n.createElement)(o.ExternalLink,{href:s},__("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}`,a=`\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,n.createElement)("div",{className:e},(0,n.createElement)(o.SandBox,{html:a}),(0,n.createElement)("div",{className:"block-library-embed__interactive-overlay"}))}render(){const{attributes:e}=this.props,{url:t,style:r}=e,{editingUrl:a,isResolvingUrl:o}=this.state;return o?this.renderLoading():a||!t||this.cannotEmbed()?this.renderEditEmbed():(0,n.createElement)(n.Fragment,null,this.renderInspectorControls(),(0,n.createElement)(s.BlockControls,null,(0,n.createElement)(h.J,{setEditingUrl:this.setEditingUrl})),"modal"===r?(0,n.createElement)(s.InnerBlocks,{template:[[v.name,v.attributes]],templateLock:"all"}):this.renderInlinePreview())}}const y=(0,o.withNotices)(k)},83772:(e,t,r)=>{"use strict";var n=r(4981),a=r(31985),s=r(33711),o=r(92868),i=r(1344),l=r(16078),c=r(86435);(0,a.S)(s,{edit:l.Z,save:c.Z,transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&(o.Wh.test(e.textContent)||o.IJ.test(e.textContent)),transform:e=>(0,n.createBlock)("jetpack/eventbrite",{url:e.textContent.trim()})}]},deprecated:i.Z})},86435:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(52175);function s({attributes:e}){const{eventId:t,style:r,url:s}=e;if(t)return"modal"===r?(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:()=>o,Ve:()=>i,qq:()=>l});var n=r(51806),a=r(4981),s=r(69307);function o(e,t){const r=(0,n.createElement)("a",{href:e},e);t((0,a.createBlock)("core/paragraph",{content:(0,s.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(e=""){return e&&"string"==typeof e?e.trim():null}},12084:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(55609),s=r(69307),o=r(65736);const __=o.__;const i=(0,s.forwardRef)((function({onSubmit:e,onChange:t,value:r=""},s){return(0,n.createElement)("form",{className:"wp-block-jetpack-gif_input-container",onSubmit:e},(0,n.createElement)("input",{type:"text",className:"wp-block-jetpack-gif_input components-placeholder__input",placeholder:__("Enter search terms, e.g. cat…","jetpack"),value:r,onChange:t,ref:s,"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:()=>o});var n=r(51806),a=r(52175),s=r(55609);function o(){return(0,n.createElement)(a.InspectorControls,null,(0,n.createElement)(s.PanelBody,{className:"components-panel__body-gif-branding"},(0,n.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 202 22"},(0,n.createElement)(s.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)(s.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:()=>b});var n=r(51806),a=r(13419),s=r(52175),o=r(55609),i=r(69307),l=r(65736),c=r(65235),u=r.n(c),p=r(13625),d=r(12084),m=r(57852),h=r(27147),g=r(80163);const __=l.__,f=(0,a.dM)(p);const b=function({attributes:e,setAttributes:t,className:r,isSelected:a}){const{align:l,caption:c,giphyUrl:b,searchText:v,paddingTop:k}=e,y=u()(r,`align${l}`),[w,E]=(0,i.useState)(!1),_=(0,i.createRef)(),{isFetching:C,giphyData:S,fetchGiphyData:x}=(0,h.Z)(),j=()=>{_.current.focus(),E(!1)};(0,i.useEffect)((()=>{S&&S[0]&&t((0,g.ix)(S[0]))}),[S,t]);const L=async t=>{if(t.preventDefault(),!e.searchText||C)return;const r=await(0,g.Gr)(e.searchText);r&&x(r)},A=e=>t({searchText:e.target.value});return(0,n.createElement)("div",{className:y},(0,n.createElement)(m.Z,null),b?(0,n.createElement)("figure",null,a&&(0,n.createElement)(d.Z,{onSubmit:L,onChange:A,value:v,ref:_}),a&&S&&S.length>1&&(0,n.createElement)("div",{className:"wp-block-jetpack-gif_thumbnails-container"},S.map((e=>{const r={backgroundImage:`url(${e.images.downsized_still.url})`};return(0,n.createElement)("button",{className:"wp-block-jetpack-gif_thumbnail-container",key:e.id,onClick:r=>{r.preventDefault(),(e=>{t((0,g.ix)(e))})(e)},style:r})}))),(0,n.createElement)("div",{className:"wp-block-jetpack-gif-wrapper",style:{paddingTop:k}},(0,n.createElement)("div",{className:"wp-block-jetpack-gif_cover",onClick:j,onKeyDown:j,role:"button",tabIndex:"0"}),(0,n.createElement)("iframe",{src:b,title:v})),(!s.RichText.isEmpty(c)||a)&&!!b&&(0,n.createElement)(s.RichText,{className:"wp-block-jetpack-gif-caption gallery-caption",inlineToolbar:!0,isSelected:w,onFocus:()=>E(!1),onChange:e=>t({caption:e}),placeholder:__("Write caption…","jetpack"),tagName:"figcaption",value:c})):(0,n.createElement)(o.Placeholder,{className:"wp-block-jetpack-gif_placeholder",icon:f,label:p.title,instructions:__("Search for a term or paste a Giphy URL","jetpack")},(0,n.createElement)(d.Z,{onSubmit:L,onChange:A,value:v,ref:_})))}},63139:(e,t,r)=>{"use strict";var n=r(31985),a=r(13625),s=r(61266);(0,n.S)(a,{edit:s.Z,save:()=>null})},27147:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(69307);const a=(e=[])=>{const[t,r]=(0,n.useState)(!1),[a,s]=(0,n.useState)(e),[o,i]=(0,n.useState)("");return(0,n.useEffect)((()=>{if(!o)return;(async()=>{r(!0);const e=await fetch(o).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&&s(r)}r(!1)})()}),[o]),{isFetching:t,giphyData:a,fetchGiphyData:i}}},80163:(e,t,r)=>{"use strict";r.d(t,{Gr:()=>l,ix:()=>p});var n=r(23621),a=r(72844);const s=e=>`https://api.giphy.com/v1/gifs/search?q=${encodeURIComponent(e)}&api_key=${encodeURIComponent(a.U)}&limit=10`,o=e=>`https://api.giphy.com/v1/gifs/${encodeURIComponent(e)}?api_key=${encodeURIComponent(a.U)}`,i=(e="",t)=>{const r=e.split(t);return r[r.length-1]},l=(e="")=>new Promise((t=>{let r=null;if((e=e.trim()).match(/^https:\/\/gph\.is\/(?:[a-zA-Z0-9]+\/)?[a-zA-Z0-9]+$/i))(0,n.Z)(e).then((n=>{n.startsWith("https://giphy.com/gifs/")?(r=i(n,"-"),t(o(r))):t(s(e))}));else{const n=/^https?:\/\/(media\.|i\.)?giphy\.com\/(embed|gifs|media)?\/?([-\w]*)(\/giphy)?(\.gif)?$/,a=e.match(n);a&&a[3]&&(r=i(a[3],"-")),r&&t(o(r)),t(s(e))}})),c=e=>`${Math.floor(e.images.original.height/e.images.original.width*100)}%`,u=e=>e?.embed_url,p=e=>({giphyUrl:u(e),paddingTop:c(e)})},4966:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(55609),s=r(65736);const __=s.__,_x=s._x,o=e=>{const{className:t,embedValue:r,onChange:s,onSubmit:o}=e;return(0,n.createElement)(a.PanelBody,{title:__("Calendar settings","jetpack"),initialOpen:!1},(0,n.createElement)("form",{onSubmit:o,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:s}),(0,n.createElement)(a.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack"))))}},81907:(e,t,r)=>{"use strict";r.d(t,{Z:()=>f});var n=r(51806),a=r(13419),s=r(52175),o=r(4981),i=r(55609),l=r(94333),c=r(69307),u=r(65736),p=r(90162),d=r(5416),m=r(4966),h=r(4525);const __=u.__,_x=u._x,g=(0,a.dM)(d);const f=(0,l.compose)(i.withNotices,(0,p.withViewportMatch)({isMobile:"< small"}))((function(e){const{attributes:{url:t,height:r},className:l,isMobile:u,isSelected:p,name:d,noticeOperations:f,noticeUI:b,setAttributes:v}=e,[k,y]=(0,c.useState)(t||""),[w,E]=(0,c.useState)(!1),[_,C]=(0,c.useState)(!1);(0,c.useEffect)((()=>{!p&&_&&C(!1)}),[p,_]);const S=()=>{C(!0)},x=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),E(!1),f.removeAllNotices()},j=(0,o.getBlockDefaultClassName)(d),L=`<iframe src="${t}" style="border:0" scrolling="no" frameborder="0" height="${u?"300":r}"></iframe>`,A=(0,n.createElement)(i.ExternalLink,{href:"https://en.support.wordpress.com/google-calendar/"},__("Enable Permissions for the calendar you want to share","jetpack")),P=(0,n.createElement)(s.InspectorControls,null,(0,n.createElement)(m.Z,{className:`${j}-embed-form-sidebar`,embedValue:k,onChange:e=>y(e.target.value),onSubmit:x}));if(w||!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},P,(0,n.createElement)(i.Placeholder,{className:l,label:__("Google Calendar","jetpack"),icon:g,notices:b},(0,n.createElement)("ol",{className:`${j}-placeholder-instructions`},(0,n.createElement)("li",null,A),(0,n.createElement)("li",null,__("Paste the embed code you copied from your Google Calendar below","jetpack"))),(T=`${j}-embed-form-editor`,(0,n.createElement)("form",{onSubmit:x,className:T},(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:`${j}-placeholder-links`},(0,n.createElement)(i.ExternalLink,{href:e},__("Learn more","jetpack")))))}var T;return(0,n.createElement)("div",{className:l},P,(0,n.createElement)("div",null,(0,n.createElement)(i.SandBox,{html:L,onFocus:S}),!_&&(0,n.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:S})))}))},58710:(e,t,r)=>{"use strict";var n=r(4981),a=r(31985),s=r(5416),o=r(81907),i=r(77724),l=r(4525);(0,a.S)(s,{edit:o.Z,save:i.Z,transforms:{from:[{type:"shortcode",tag:"googleapps",isMatch:function(e){return"calendar"===e.named.domain},attributes:{url:{type:"string",shortcode:({named:{domain:e,dir:t,query:r}})=>`https://${e}.google.com/${t}?${r}`}}},{type:"raw",isMatch:e=>"P"===e.nodeName&&l.Wh.test(e.textContent),transform:e=>(0,n.createBlock)("jetpack/google-calendar",{url:e.textContent.trim()})},{type:"raw",isMatch:e=>"FIGURE"===e.nodeName&&l.E6.test(e.innerHTML),transform:e=>{const{url:t,height:r}=(0,l.jj)(e.innerHTML.trim());return(0,n.createBlock)("jetpack/google-calendar",{url:t,height:r})}}]}})},77724:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(51806);const a=({attributes:{url:e}})=>(0,n.createElement)("a",{href:e},e)},4525:(e,t,r)=>{"use strict";r.d(t,{E6:()=>s,L7:()=>u,Wh:()=>a,jj:()=>c});const n="s*https?://calendar.google.com/calendar",a=new RegExp(`^${n}`,"i"),s=new RegExp(`<iframe((?:\\s+\\w+=(['"]).*?\\2)*)\\s+src=(["'])(${n}.*?)\\3((?:\\s+\\w+=(['"]).*?\\6)*)`,"i"),o=new RegExp(`${n}\\?cid=([-A-Za-z0-9+/]+={0,3})`,"i"),i=/\s+(\w+)=(["'])(.*?)\2/gi;function l(e){const t=o.exec(e);if(t)return"https://calendar.google.com/calendar/embed?src="+encodeURIComponent(atob(t[1]))}function c(e){const t=s.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 s.test(e)?c(e):o.test(e)?{url:l(e)}:{url:e}}},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),s=r(65736),o=r(696);const __=s.__,_n=s._n;function i({accountImageTotal:e,attributes:t,currentUserConnected:r,disconnectFromService:i,shouldRenderSidebarNotice:l,setAttributes:c}){const{accessToken:u,columns:p,count:d,instagramUser:m,isStackedOnMobile:h,spacing:g}=t;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/${m}/`},"@",m)),r&&(0,n.createElement)(a.PanelRow,null,(0,n.createElement)(a.Button,{isDestructive:!0,variant:"link",onClick:()=>i(u)},__("Disconnect your account","jetpack")))),(0,n.createElement)(a.PanelBody,{title:__("Display Settings","jetpack")},l?(()=>{const t=e?(0,s.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.",e,"jetpack"),e):__("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"},t))})():null,(0,n.createElement)(a.RangeControl,{label:__("Number of Posts","jetpack"),value:d,onChange:e=>c({count:e}),min:1,max:o.u}),(0,n.createElement)(a.RangeControl,{label:__("Number of Columns","jetpack"),value:p,onChange:e=>c({columns:e}),min:1,max:6}),(0,n.createElement)(a.RangeControl,{label:__("Image Spacing (px)","jetpack"),value:g,onChange:e=>c({spacing:e}),min:0,max:50}),(0,n.createElement)(a.ToggleControl,{label:__("Stack on mobile","jetpack"),checked:h,onChange:()=>c({isStackedOnMobile:!h})})))}},36420:(e,t,r)=>{"use strict";r.d(t,{Z:()=>y});var n=r(51806),a=r(13419),s=r(52175),o=r(55609),i=r(69307),l=r(65736),c=r(65235),u=r.n(c),p=r(92819),d=r(4554),m=r(96946),h=r(696),g=r(64129),f=r(44961),b=r(79236),v=r(2681),k=r(75412);const __=l.__,y=(0,o.withNotices)((e=>{const{attributes:t,className:r,isSelected:l,noticeOperations:c,noticeUI:y,setAttributes:w}=e,{accessToken:E,align:_,columns:C,count:S,isStackedOnMobile:x,spacing:j}=t;(0,i.useEffect)((()=>{const e=(0,d.S)(m.attributes,t);(0,p.isEqual)(e,t)||w(e)}),[t,w]);const[L,A]=(0,i.useState)(E),{isRequestingWpcomConnectUrl:P,wpcomConnectUrl:T}=(0,v.Z)(),{images:N,isLoadingGallery:M,setImages:R}=(0,k.Z)({accessToken:E,noticeOperations:c,setAttributes:w,setSelectedAccount:A}),{connectToService:I,disconnectFromService:Z,isConnecting:D,isRequestingUserConnections:B,userConnections:O}=(0,b.Z)({accessToken:E,noticeOperations:c,selectedAccount:L,setAttributes:w,setImages:R,setSelectedAccount:A}),F=(0,a.Dp)(),U=S>N.length?N.length:S,z=!M&&(!E||(0,p.isEmpty)(N)),q=!z,$=E&&M&&(0,p.isEmpty)(N),H=!z&&!$,V=u()(r,{[`align${_}`]:_}),G=u()("wp-block-jetpack-instagram-gallery__grid",`wp-block-jetpack-instagram-gallery__grid-columns-${C}`,{"is-stacked-on-mobile":x}),W={gridGap:j,"--latest-instagram-posts-spacing":j?`${j}px`:void 0},J={padding:j},K=()=>{L&&h.D!==L?w({accessToken:L,instagramUser:(0,p.find)(O,{token:L}).username}):I()};return(0,n.createElement)("div",{className:V},z&&(0,n.createElement)(o.Placeholder,{icon:"instagram",instructions:F?B||O.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},F?(()=>{const e=O.length>0,t=[...(0,p.map)(O,(e=>({label:`@${e.username}`,value:e.token}))),{label:__("Add a new account","jetpack"),value:h.D}],r=D||B||e&&!L;return(0,n.createElement)("div",null,e&&(0,n.createElement)(o.RadioControl,{label:__("Select your Instagram account:","jetpack"),onChange:e=>A(e),options:t,selected:L}),h.D===L&&(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)(o.Button,{disabled:r,variant:"primary",onClick:K},D&&__("Connecting…","jetpack"),B&&__("Loading your connections…","jetpack"),!D&&!B&&__("Connect to Instagram","jetpack")))})():(0,n.createElement)(o.Button,{disabled:P||!T,href:T,variant:"secondary"},__("Connect to WordPress.com","jetpack"))),$&&(0,n.createElement)("div",{className:"wp-block-embed is-loading"},(0,n.createElement)(o.Spinner,null),(0,n.createElement)("p",null,__("Embedding…","jetpack"))),H&&(0,n.createElement)("div",{className:G,style:W},(0,p.times)(l?S:U,(e=>(0,n.createElement)("span",{className:u()("wp-block-jetpack-instagram-gallery__grid-post"),key:e,style:J},(e=>{if(N[e]){const r=N[e];return(0,n.createElement)(f.Z,{alt:r.title||r.url,src:r.url,attributes:t,spacing:j})}return(0,n.createElement)("img",{alt:__("Latest Instagram Posts placeholder","jetpack"),src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNMyc2tBwAEOgG/c94mJwAAAABJRU5ErkJggg=="})})(e))))),q&&(0,n.createElement)(s.InspectorControls,null,(0,n.createElement)(g.Z,{accountImageTotal:N.length,attributes:t,currentUserConnected:F,disconnectFromService:Z,shouldRenderSidebarNotice:q&&!$&&N.length<S,setAttributes:w})))}))},34575:(e,t,r)=>{"use strict";var n=r(4981),a=r(31985),s=r(96946),o=r(36420),i=r(30408);(0,a.S)(s,{edit:o.Z,save:i.Z,transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:({idBase:e,instance:t})=>!!t?.raw&&"wpcom_instagram_widget"===e,transform:({instance:e})=>(0,n.createBlock)("jetpack/instagram-gallery",{columns:e.raw.columns,count:e.raw.count,accessToken:e.raw.token_id})}]}})},44961:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(69307),s=r(65235),o=r.n(s);function i({src:e,alt:t,spacing:r}){const[s,i]=(0,a.useState)(!1),[l,c]=(0,a.useState)("auto"),u=(0,a.useRef)(),p=()=>{i(!0),c("auto")};(0,a.useEffect)((()=>{const t=e;if(t){const e=new window.Image;e.src=t,e.onload=p}u.current&&c(u.current.parentNode.getBoundingClientRect().width)}),[e]);const d=-1*r,m=o()("wp-block-jetpack-instagram-gallery__placeholder",{"is-loaded":s}),h=s?{margin:d}:{margin:d,height:l},g=o()({"is-loaded":s});return(0,n.createElement)("span",{style:h,className:m},(0,n.createElement)("img",{alt:t,className:g,ref:u,src:e}))}},30408:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(51806);const a=({attributes:{instagramUser:e}})=>e&&(0,n.createElement)("div",null,(0,n.createElement)("a",{href:`https://www.instagram.com/${e}/`,rel:"noopener noreferrer",target:"_blank"},`https://www.instagram.com/${e}/`))},79236:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(13419),a=r(7211),s=r(86989),o=r.n(s),i=r(69307),l=r(65736),c=r(92819),u=r(696);const __=l.__;function p({accessToken:e,noticeOperations:t,selectedAccount:r,setAttributes:s,setImages:l,setSelectedAccount:p}){const[d,m]=(0,i.useState)(!1),[h,g]=(0,i.useState)(!1),[f,b]=(0,i.useState)([]),v=(0,n.Dp)();(0,i.useEffect)((()=>{!e&&v&&(g(!0),o()({path:"/wpcom/v2/instagram-gallery/connections"}).then((e=>{g(!1),b(e)})).catch((()=>{g(!1),b([])})))}),[e,v]),(0,i.useEffect)((()=>{u.D===r||(0,c.find)(f,{token:r})||p(void 0)}),[r,p,f]);return{connectToService:()=>{t.removeAllNotices(),m(!0),o()({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",(({keyring_id:e})=>{if(m(!1),e){const t=e.toString();s({accessToken:t}),p(t)}})),t.on("close",(e=>{"connect-to-instagram-popup"===e&&m(!1)}))})).catch((()=>{t.createErrorNotice(__("An error occurred. Please try again later.","jetpack")),m(!1)}))},disconnectFromService:()=>{t.removeAllNotices(),s({accessToken:void 0,instagramUser:void 0}),l([])},isConnecting:d,isRequestingUserConnections:h,userConnections:f}}},2681:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(13419),a=r(86989),s=r.n(a),o=r(9818),i=r(69307),l=r(96483);function c(){const{isAutoDraft:e}=(0,o.useSelect)((e=>{const{status:t}=e("core/editor").getCurrentPost();return{isAutoDraft:"auto-draft"===t}})),{savePost:t}=(0,o.useDispatch)("core/editor"),[r,a]=(0,i.useState)(),[c,u]=(0,i.useState)(!1),p=(0,n.Dp)();return(0,i.useEffect)((()=>{p||r||c||(e?t():(u(!0),s()({path:(0,l.addQueryArgs)("/jetpack/v4/connection/url",{from:"jetpack-block-editor",redirect:window.location.href})}).then((e=>{a(e),u(!1)}))))}),[p,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),s=r(69307),o=r(65736),i=r(96483),l=r(92819),c=r(696);const __=o.__;function u({accessToken:e,noticeOperations:t,setAttributes:r,setSelectedAccount:n}){const[o,u]=(0,s.useState)([]),[p,d]=(0,s.useState)(!1);return(0,s.useEffect)((()=>{e&&(t.removeAllNotices(),d(!0),a()({path:(0,i.addQueryArgs)("/wpcom/v2/instagram-gallery/gallery",{access_token:e,count:c.u})}).then((({external_name:e,images:a})=>{if(d(!1),!a||!(0,l.isArray)(a))return t.createErrorNotice(__("An error occurred. Please try again later.","jetpack")),u([]),r({accessToken:void 0,instagramUser:void 0}),void n(void 0);(0,l.isEmpty)(a)&&t.createErrorNotice(__("No images were found in your Instagram account.","jetpack")),r({instagramUser:e}),u(a)})).catch((()=>{d(!1),u([]),r({accessToken:void 0,instagramUser:void 0}),n(void 0)})))}),[e,r,n]),{images:o,isLoadingGallery:p,setImages:u}}},64968:(e,t,r)=>{"use strict";r.d(t,{Cw:()=>s,N3:()=>n,sf:()=>a});const n="processing",a="success",s="error"},84038:(e,t,r)=>{"use strict";r.d(t,{Q:()=>l});var n=r(51806),a=r(55609),s=r(65736),o=r(64968),i=r(24535);const __=s.__;function l({auditionNotification:e,clearAudition:t,setAttributes:r,emailPlaceholder:s,processingLabel:l,successLabel:c,errorLabel:u,interests:p,signupFieldTag:d,signupFieldValue:m,connectURL:h}){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:s,onChange:e=>{r({emailPlaceholder:e}),t()}})),(0,n.createElement)(a.PanelBody,{title:__("Notifications","jetpack")},(0,n.createElement)(a.TextControl,{label:__("Processing text","jetpack"),value:l,onChange:t=>{r({processingLabel:t}),e(o.N3)}}),(0,n.createElement)(a.TextControl,{label:__("Success text","jetpack"),value:c,onChange:t=>{r({successLabel:t}),e(o.sf)}}),(0,n.createElement)(a.TextControl,{label:__("Error text","jetpack"),value:u,onChange:t=>{r({errorLabel:t}),e(o.Cw)}})),(0,n.createElement)(a.PanelBody,{title:__("Mailchimp Groups","jetpack")},(0,n.createElement)(i.Z,{interests:p,onChange:(e,t)=>{const n=[...new Set([...p,e])].filter((r=>!(r===e&&!t)&&r));r({interests:n})}}),(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:d,onChange:e=>r({signupFieldTag:e})}),(0,n.createElement)(a.TextControl,{label:__("Signup Field Value","jetpack"),placeholder:__("website","jetpack"),value:m,onChange:e=>r({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:h},__("Manage Connection","jetpack"))))}},748:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(4981),a=r(65736),s=r(92819);const __=a.__,o=["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,s.omit)(e,o),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,s.isEmpty)(t)||(0,s.some)((0,s.pick)(e,o),Boolean),save:()=>null}},43818:(e,t,r)=>{"use strict";r.d(t,{Z:()=>y});var n=r(51806),a=r(13419),s=r(86989),o=r.n(s),i=r(52175),l=r(55609),c=r(69307),u=r(65736),p=r(96483),d=r(65235),m=r.n(d),h=r(88322),g=r(64968),f=r(84038);const __=u.__,b=(0,a.dM)(h),v={name:"jetpack/button",attributes:{element:"button",text:__("Join my Mailchimp audience","jetpack"),uniqueId:"mailchimp-widget-id"}};class k extends c.Component{constructor(){super(...arguments),this.state={audition:null,connected:0,connectURL:null,currentUserConnected:null},this.timeout=null}componentDidMount=()=>{this.apiCall()};onError=e=>{const{noticeOperations:t}=this.props;t.removeAllNotices(),t.createErrorNotice(e)};apiCall=()=>{const e=(0,a.Dp)();if(e){const t={path:"/wpcom/v2/mailchimp",method:"GET"};o()(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 o()({path:(0,p.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})}))};auditionNotification=e=>{this.setState({audition:e}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(this.clearAudition,3e3)};clearAudition=()=>{this.setState({audition:null})};labelForAuditionType=e=>{const{attributes:t}=this.props,{processingLabel:r,successLabel:n,errorLabel:a}=t;return e===g.N3?r:e===g.sf?n:e===g.Cw?a:null};roleForAuditionType=e=>e===g.Cw?"alert":"status";render=()=>{const{attributes:e,className:t,notices:r,noticeUI:a,setAttributes:s}=this.props,{audition:o,connected:u,connectURL:p,currentUserConnected:d}=this.state,{emailPlaceholder:h,consentText:g,interests:k,processingLabel:y,successLabel:w,errorLabel:E,preview:_,signupFieldTag:C,signupFieldValue:S}=e,x="wp-block-jetpack-mailchimp",j=(0,n.createElement)(l.Placeholder,{icon:b,notices:r,className:"wp-block-jetpack-mailchimp",label:__("Mailchimp","jetpack")},(0,n.createElement)("div",{className:"align-center"},(0,n.createElement)(l.Spinner,null))),L=(0,n.createElement)(l.Placeholder,{className:"wp-block-jetpack-mailchimp",icon:b,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,n.createElement)(l.Button,{variant:"secondary",href:p,target:"_blank"},__("Set up Mailchimp form","jetpack")),(0,n.createElement)("div",{className:`${x}-recheck`},(0,n.createElement)(l.Button,{variant:"link",onClick:this.apiCall},__("Re-check Connection","jetpack")))),A=(0,n.createElement)(l.Placeholder,{className:"wp-block-jetpack-mailchimp",icon:b,label:__("Mailchimp","jetpack"),notices:r,instructions:__("First, you'll need to connect your WordPress.com account.","jetpack")},(0,n.createElement)(l.Button,{variant:"secondary",href:p},__("Connect to WordPress.com","jetpack"))),P=(0,n.createElement)(i.InspectorControls,null,(0,n.createElement)(f.Q,{auditionNotification:this.auditionNotification,clearAudition:this.clearAudition,emailPlaceholder:h,processingLabel:y,successLabel:w,errorLabel:E,interests:k,setAttributes:this.props.setAttributes,signupFieldTag:C,signupFieldValue:S,connectURL:p})),T=m()(t,{[`${x}_notication-audition`]:o}),N=(0,n.createElement)("div",{className:T},(0,n.createElement)(l.TextControl,{"aria-label":h,className:"wp-block-jetpack-mailchimp_text-input",disabled:!0,onChange:()=>!1,placeholder:h,title:__("You can edit the email placeholder in the sidebar.","jetpack"),type:"email"}),(0,n.createElement)(i.InnerBlocks,{template:[[v.name,v.attributes]],templateLock:"all"}),(0,n.createElement)(i.RichText,{tagName:"p",placeholder:__("Write consent text","jetpack"),value:g,onChange:e=>s({consentText:e}),inlineToolbar:!0}),o&&(0,n.createElement)("div",{className:`${x}_notification ${x}_${o}`,role:this.roleForAuditionType(o)},this.labelForAuditionType(o))),M=N;return(0,n.createElement)(c.Fragment,null,a,_&&M,!_&&0===u&&j,!_&&2===u&&d&&L,!_&&2===u&&!d&&A,!_&&1===u&&P,!_&&1===u&&N)}}const y=(0,l.withNotices)(k)},61204:(e,t,r)=>{"use strict";var n=r(31985),a=r(88322),s=r(748),o=r(43818),i=r(31745),l=r(84197);(0,n.S)(a,{edit:o.Z,save:i.Z,deprecated:[s.Z],transforms:l.Z})},24535:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(86989),s=r.n(a),o=r(55609),i=r(69307);class l extends i.Component{state={interest_categories:[]};componentDidMount(){this.retrieveGroups()}retrieveGroups=()=>{s()({method:"GET",path:"/wpcom/v2/mailchimp/groups"}).then((e=>{const{interest_categories:t}=e;this.setState({interest_categories:t})}))};render=()=>{const{interest_categories:e}=this.state,{interests:t,onChange:r}=this.props;return(0,n.createElement)(i.Fragment,null,e&&(e||[]).map((e=>e.interests.map((e=>(0,n.createElement)(o.CheckboxControl,{label:e.name,value:e.id,checked:t.includes(e.id),onChange:t=>r(e.id,t),key:e.id}))))))}}const c=l;l.defaultProps={interests:[],onChange:()=>null}},31745:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(52175);const s=()=>(0,n.createElement)(a.InnerBlocks.Content,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),s=r(69307),o=r(65736),i=r(31852);const __=o.__;class l extends s.Component{render(){const{onClose:e,onAddPoint:t,onError:r,apiKey:s,mapProvider:o}=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:s,onError:r,mapProvider:o})))}}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),s=r(51806),o=r(69307),i=r(21035),l=r(99128);const c=(0,o.forwardRef)(((e,t)=>{if("mapkit"===e.mapProvider){const r={...e,ref:null};return(0,s.createElement)(l.Z,a()({},r,{ref:t}))}return(0,s.createElement)(i.Z,a()({},e,{ref:t}))}))},75385:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(61323),s=r(82891);const o=e=>"mapkit"===e.mapProvider?(0,n.createElement)(s.Z,e):(0,n.createElement)(a.Z,e)},61323:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(69307),a=r(84634);class s extends n.Component{componentDidMount(){const{mapboxgl:e}=this.props;this.el=document.createElement("DIV"),this.infowindow=(0,a.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,n.createPortal)(this.props.children,this.el):null}closeClick=()=>{this.props.unsetActiveMarker()};openWindow(){const{map:e,activeMarker:t}=this.props;this.infowindow.setLngLat(t.getPoint()).addTo(e)}closeWindow(){this.infowindow.remove()}}s.defaultProps={unsetActiveMarker:()=>{},activeMarker:null,map:null,mapboxgl:null};const o=s},82891:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(55609),s=r(69307),o=r(65736),i=r(72672);const __=o.__,l=()=>{const{activeMarker:e,setActiveMarker:t,calloutReference:r,admin:o,points:l,setPoints:c}=(0,i.qw)(),[u,p]=(0,s.useState)(l),[d,m]=(0,s.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));p(r),m(!0)};return(0,s.useEffect)((()=>{!e&&d&&c(u)}),[e,d,u,c]),(0,s.useEffect)((()=>{p(l),m(!1)}),[l]),e&&r?(0,s.createPortal)((0,n.createElement)(s.Fragment,null,o&&(0,n.createElement)(s.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));p(r),m(!0),t(null)},className:"wp-block-jetpack-map__delete-btn"},(0,n.createElement)(a.Dashicon,{icon:"trash",size:"15"})," ",__("Delete Marker","jetpack"))),!o&&(0,n.createElement)(s.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:()=>i});var n=r(69307),a=r(85007),s=r(84634);class o extends n.Component{componentDidMount(){this.renderMarker()}componentWillUnmount(){this.marker&&this.marker.remove()}componentDidUpdate(){this.renderMarker()}handleClick=()=>{const{onClick:e}=this.props;e(this)};getPoint=()=>{const{point:e}=this.props;return[e.coordinates.longitude,e.coordinates.latitude]};renderMarker(){const{map:e,point:t,mapboxgl:r,markerColor:n,mapRef:o}=this.props,{handleClick:i}=this,l=[t.coordinates.longitude,t.coordinates.latitude],{currentDoc:c}=(0,a.bL)(o.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",i)),(0,s.zb)(u,n)}render(){return null}}o.defaultProps={point:{},map:null,markerColor:"#000000",mapboxgl:null,onClick:()=>{}};const i=o},21035:(e,t,r)=>{"use strict";r.d(t,{Z:()=>f});var n=r(51806),a=r(55609),s=r(69307),o=r(65736),i=r(92819),l=r(85007),c=r(45388),u=r(90055),p=r(84634),d=r(51321),m=r(75385),h=r(32333);const __=o.__;class g extends s.Component{constructor(){super(...arguments),this.state={map:null,fit_to_bounds:!1,loaded:!1,mapboxgl:null},this.mapRef=(0,s.createRef)(),this.debouncedSizeMap=(0,i.debounce)(this.sizeMap,250)}render(){const{points:e,admin:t,children:r,markerColor:o}=this.props,{map:l,activeMarker:c,mapboxgl:u}=this.state,{onMarkerClick:p,deleteActiveMarker:d,updateActiveMarker:g}=this,f=(0,i.get)(c,"props.point")||{},{title:b,caption:v}=f,k=s.Children.map(r,(e=>{if("AddPoint"===(0,i.get)(e,"props.tagName"))return e})),y=l&&u&&e.map(((e,t)=>(0,n.createElement)(h.Z,{mapRef:this.mapRef,key:t,point:e,index:t,map:l,mapboxgl:u,markerColor:o,onClick:p}))),w=u&&(0,n.createElement)(m.Z,{activeMarker:c,map:l,mapboxgl:u,unsetActiveMarker:()=>this.setState({activeMarker:null})},c&&t&&(0,n.createElement)(s.Fragment,null,(0,n.createElement)(a.TextControl,{label:__("Marker Title","jetpack"),value:b,onChange:e=>g({title:e})}),(0,n.createElement)(a.TextareaControl,{className:"wp-block-jetpack-map__marker-caption",label:__("Marker Caption","jetpack"),value:v,rows:"2",tag:"textarea",onChange:e=>g({caption:e})}),(0,n.createElement)(a.Button,{onClick:d,className:"wp-block-jetpack-map__delete-btn"},(0,n.createElement)(a.Dashicon,{icon:"trash",size:"15"})," ",__("Delete Marker","jetpack"))),c&&!t&&(0,n.createElement)(s.Fragment,null,(0,n.createElement)("h3",null,b),(0,n.createElement)("p",null,v)));return(0,n.createElement)(s.Fragment,null,(0,n.createElement)("div",{className:"wp-block-jetpack-map__gm-container",ref:this.mapRef},y),w,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:s,mapDetails:o,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(),s===e.mapStyle&&o===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))}onMarkerClick=e=>{const{onMarkerClick:t}=this.props;this.setState({activeMarker:e}),t()};onMapClick=()=>{this.setState({activeMarker:null})};clearCurrentMarker=()=>{this.setState({activeMarker:null})};updateActiveMarker=e=>{const{points:t}=this.props,{activeMarker:r}=this.state,{index:n}=r.props,a=t.slice(0);(0,i.assign)(a[n],e),this.props.onSetPoints(a)};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})};sizeMap=()=>{const{mapHeight:e}=this.props,{map:t}=this.state,r=this.mapRef.current;(0,d.Z)(r,e),t.resize(),this.setBoundsByMarkers()};updateZoom=()=>{const{zoom:e}=this.props,{map:t}=this.state;t.setZoom(e)};setBoundsByMarkers=()=>{const{admin:e,onSetMapCenter:t,onSetZoom:r,points:n,zoom:a}=this.props,{map:s,activeMarker:o,mapboxgl:i,zoomControl:l,boundsSetProgrammatically:c}=this.state;if(!s)return;if(n.length&&e?s.dragPan.disable():s.dragPan.enable(),!n.length)return;if(o)return;const u=(0,p.YB)(i,n);if(t(u.getCenter()),n.length>1){(0,p.k)(s,u),this.setState({boundsSetProgrammatically:!0});try{s.removeControl(l)}catch(e){}}else{if(s.setCenter(u.getCenter()),c){const e=12;s.setZoom(e),r(e)}else s.setZoom(parseInt(a,10));s.addControl(l),this.setState({boundsSetProgrammatically:!1})}};getMapStyle(){const{mapStyle:e,mapDetails:t}=this.props;return(0,u.h)(e,t)}getMapType(){const{mapStyle:e}=this.props;switch(e){case"satellite":return"HYBRID";case"terrain":return"TERRAIN";default:return"ROADMAP"}}scriptsLoaded=()=>{const{mapCenter:e,points:t}=this.props;this.setState({loaded:!0}),t.length,this.initMap(e)};loadMapLibraries(){const{apiKey:e}=this.props,{currentWindow:t}=(0,l.bL)(this.mapRef.current),r={"mapbox-gl-js":()=>{(0,l.Dz)(t,"mapboxgl").then((t=>{t.accessToken=e,this.setState({mapboxgl:t},this.scriptsLoaded)}))}};(0,l.Pp)(c,r,this.mapRef.current)}initMap(e){const{mapboxgl:t}=this.state,{zoom:r,onMapLoaded:n,onError:a,scrollToZoom:s,showFullscreenButton:o,admin:i}=this.props;let l=null;try{l=new t.Map({container:this.mapRef.current,style:this.getMapStyle(),center:(0,p.b2)(e),zoom:parseInt(r,10),pitchWithRotate:!1,attributionControl:!1,dragRotate:!1})}catch(e){return void a("mapbox_error",e.message)}s||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),o&&(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)}))}}g.defaultProps={points:[],mapStyle:"default",zoom:13,onSetZoom:()=>{},onSetMapCenter:()=>{},onMapLoaded:()=>{},onMarkerClick:()=>{},onError:()=>{},markerColor:"red",apiKey:null,mapCenter:{},address:null};const f=g},99128:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(51806),a=r(69307),s=r(92819),o=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:d}=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,s.get)(e,"props.tagName"))return e}));return(0,a.useEffect)((()=>{h&&u("mapkit_error",h)}),[h,u]),(0,n.createElement)(o.c,{value:{mapkit:g,map:v,loaded:m,currentDoc:f,currentWindow:b,admin:r,points:l,setPoints:d}},m&&g&&v?(0,n.createElement)(p,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"}))})),p=(0,a.memo)((({address:e,mapCenter:t,mapStyle:r,zoom:n,onSetMapCenter:s,onSetZoom:o,onSetPoints:c,points:u,markerColor:p,onMarkerClick:d,onMapLoaded:m})=>{const{map:h,mapkit:g,setActiveMarker:f,setPreviousCenter:b,setCalloutReference:v,currentDoc:k}=(0,i.qw)(),y=(0,a.useRef)(d),w=(0,a.useRef)(c),E=(0,a.useCallback)((e=>{f(e),b(h.center),y.current&&y.current(e),h.setCenterAnimated(new g.Coordinate(e.coordinates.latitude,e.coordinates.longitude))}),[h,g,f,b,y]);return(0,i.LO)(t,s),(0,i.Xj)(r),(0,i.zZ)(n,o),(0,i.J2)(u,p,(0,l.eR)(k,v),E),(0,i.jo)(m),(0,i.mk)((e=>{f(null),e&&h.setCenterAnimated(e)})),(0,i.wd)(e,w),null}));u.defaultProps={points:[],mapStyle:"default",zoom:13,onSetZoom:()=>{},onSetMapCenter:()=>{},onMapLoaded:()=>{},onMarkerClick:()=>{},onError:()=>{},markerColor:"red",mapCenter:{},address:null};const d=u},53036:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(52175),s=r(55609),o=r(65736),i=r(57897);const __=o.__,l=(0,n.createElement)(s.SVG,{width:"14",height:"20",viewBox:"0 0 14 20",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(s.G,{id:"Page-1",fill:"none",fillRule:"evenodd"},(0,n.createElement)(s.G,{id:"outline-add_location-24px",transform:"translate(-5 -2)"},(0,n.createElement)(s.Polygon,{id:"Shape",points:"0 0 24 0 24 24 0 24"}),(0,n.createElement)(s.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"})))),c=({attributes:e,setAttributes:t,state:r,setState:o,context:c,mapRef:u,instanceId:p,minHeight:d,removeAPIKey:m,updateAPIKey:h,setPointVisibility:g,mapProvider:f})=>{const b=e=>{t({align:e}),u.current?.sizeMap&&setTimeout(u.current.sizeMap,0)};return"toolbar"===c?(0,n.createElement)(n.Fragment,null,(0,n.createElement)(a.BlockAlignmentToolbar,{value:e.align,onChange:b,controls:["center","wide","full"]}),(0,n.createElement)(s.ToolbarGroup,null,(0,n.createElement)(s.ToolbarButton,{icon:l,label:__("Add a marker","jetpack"),onClick:g}))):(0,n.createElement)(n.Fragment,null,(0,n.createElement)(a.PanelColorSettings,{title:__("Colors","jetpack"),initialOpen:!0,colorSettings:[{value:e.markerColor,onChange:e=>t({markerColor:e}),label:__("Marker Color","jetpack")}]}),(0,n.createElement)(s.PanelBody,{title:__("Map Settings","jetpack")},(0,n.createElement)(s.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=>{t({mapHeight:e.target.value}),e.target!==document.activeElement&&u.current&&setTimeout(u.current.sizeMap,0)},onBlur:r=>{const{mapHeight:n}=e;let a=parseInt(r.target.value,10);if(isNaN(a))a=null;else if(null==n){const e=u?.current?.mapRef??u;a=e?.current.offsetHeight}else a<d&&(a=d);t({mapHeight:a}),u.current.sizeMap&&setTimeout(u.current.sizeMap,0)},value:e.mapHeight||"",min:d,step:"10"})),(0,n.createElement)(s.RangeControl,{label:__("Zoom level","jetpack"),help:e.points.length>1&&__("The default zoom level cannot be changed when there are two or more markers on the map.","jetpack"),disabled:e.points.length>1,value:Math.round(e.zoom),onChange:e=>{t({zoom:e}),u.current&&u.current.updateZoom&&setTimeout(u.current.updateZoom,0)},min:0,max:22}),"mapbox"===f?(0,n.createElement)(s.ToggleControl,{label:__("Show street names","jetpack"),checked:e.mapDetails,onChange:e=>t({mapDetails:e})}):null,(0,n.createElement)(s.ToggleControl,{label:__("Scroll to zoom","jetpack"),help:__("Allow the map to capture scrolling, and zoom in or out.","jetpack"),checked:e.scrollToZoom,onChange:e=>t({scrollToZoom:e})}),"mapbox"===f?(0,n.createElement)(s.ToggleControl,{label:__("Show Fullscreen Button","jetpack"),help:__("Allow your visitors to display the map in fullscreen.","jetpack"),checked:e.showFullscreenButton,onChange:e=>t({showFullscreenButton:e})}):null),e.points.length?(0,n.createElement)(s.PanelBody,{title:__("Markers","jetpack"),initialOpen:!1},(0,n.createElement)(i.Z,{points:e.points,onChange:e=>{t({points:e})}})):null,"mapbox"===f?(0,n.createElement)(s.PanelBody,{title:__("Mapbox Access Token","jetpack"),initialOpen:!1},(0,n.createElement)(s.TextControl,{help:"wpcom"===r.apiKeySource&&(0,n.createElement)(n.Fragment,null,__("You can optionally enter your own access token.","jetpack")," ",(0,n.createElement)(s.ExternalLink,{href:"https://account.mapbox.com/access-tokens/"},__("Find it on Mapbox","jetpack"))),label:__("Mapbox Access Token","jetpack"),value:r.apiKeyControl,onChange:e=>o({apiKeyControl:e})}),(0,n.createElement)(s.ButtonGroup,null,(0,n.createElement)(s.Button,{type:"button",onClick:h,disabled:!r.apiKeyControl||r.apiKeyControl===r.apiKey},__("Update Token","jetpack")),(0,n.createElement)(s.Button,{type:"button",onClick:m,disabled:"wpcom"===r.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:()=>o});var n=r(51806),a=r(69307);class s extends a.Component{render(){const{attributes:e}=this.props,{align:t,mapStyle:r,mapDetails:a,points:s,zoom:o,mapCenter:i,markerColor:l,scrollToZoom:c,mapHeight:u}=e,p=s.map(((e,t)=>{const{longitude:r,latitude:a}=e.coordinates,s="https://www.google.com/maps/search/?api=1&query="+a+","+r;return(0,n.createElement)("li",{key:t},(0,n.createElement)("a",{href:s},e.title))})),d=t?`align${t}`:null;return(0,n.createElement)("div",{className:d,"data-map-style":r,"data-map-details":a,"data-points":JSON.stringify(s),"data-zoom":o,"data-map-center":JSON.stringify(i),"data-marker-color":l,"data-scroll-to-zoom":c||null,"data-map-height":u||null},s.length>0&&(0,n.createElement)("ul",null,p))}}const o=s},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:()=>o});var n=r(51806),a=r(69307);class s extends a.Component{render(){const{attributes:e}=this.props,{align:t,mapStyle:r,mapDetails:a,points:s,zoom:o,mapCenter:i,markerColor:l,scrollToZoom:c,mapHeight:u,showFullscreenButton:p}=e,d=s.map(((e,t)=>{const{longitude:r,latitude:a}=e.coordinates,s="https://www.google.com/maps/search/?api=1&query="+a+","+r;return(0,n.createElement)("li",{key:t},(0,n.createElement)("a",{href:s},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(s),"data-zoom":o,"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":p||null},s.length>0&&(0,n.createElement)("ul",null,d))}}const o=s},740:(e,t,r)=>{"use strict";r.d(t,{Z:()=>S});var n=r(51806),a=r(13419),s=r(86989),o=r.n(s),i=r(52175),l=r(55609),c=r(94333),u=r(9818),p=r(69307),d=r(65736),m=r(81518),h=r(2944),g=r(32334),f=r(75890),b=r(53036),v=r(1555),k=r(96406),y=r(53289),w=r(32566);const __=d.__,E=(0,a.dM)(g),_={top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1};class C extends p.Component{constructor(){super(...arguments),this.state={addPointVisibility:!1,apiState:0},this.mapRef=(0,p.createRef)()}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)))};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())};addPoint=e=>{const{attributes:t,setAttributes:r}=this.props,{points:n}=t,a=n.slice(0);let s=!1;n.map((t=>{t.id===e.id&&(s=!0)})),s||(a.push(e),r({points:a}),this.setState({addPointVisibility:!1}))};setPointVisibility=()=>{this.setState({addPointVisibility:!0})};updateAPIKeyControl=e=>{this.setState({apiKeyControl:e.target.value})};updateAPIKey=()=>{const{noticeOperations:e}=this.props,{apiKeyControl:t}=this.state;e.removeAllNotices(),t&&this.apiCall(t,"POST")};removeAPIKey=()=>{this.apiCall(null,"DELETE")};apiCall(e=null,t="GET"){return new Promise(((r,n)=>{const{noticeOperations:a}=this.props,s="/wpcom/v2/service-api-keys/mapbox",i=e?{path:s,method:t,data:{service_api_key:e}}:{path:s,method:t};this.setState({apiRequestOutstanding:!0},(()=>{o()(i).then((({service_api_key:e,service_api_key_source:t})=>{a.removeAllNotices();const n=e?2:1,s="wpcom"===t?"":e;this.setState({apiState:n,apiKey:e,apiKeyControl:s,apiKeySource:t,apiRequestOutstanding:!1}),r()}),(({message:e})=>{this.onError(null,e),this.setState({apiState:1,apiRequestOutstanding:!1}),n()}))}))}))}getMapProvider=()=>{const e=(0,m.t)(y.Z,this.props?.attributes?.className);return(0,w.Z)({mapStyle:e})};componentDidMount(){"mapbox"===this.getMapProvider()?this.apiCall().then((()=>{this.props.attributes?.address&&this.geoCodeAddress(this.props.attributes?.address,this.state.apiKey)})):this.setState({apiState:2})}onError=(e,t)=>{const{noticeOperations:r}=this.props;r.removeAllNotices(),r.createErrorNotice(t)};onMapResize=(e,t,r,n)=>{const{onResizeStop:a,setAttributes:s}=this.props;a();const o=this.mapRef?.current?.mapRef??this.mapRef;if(o){s({mapHeight:parseInt(o.current.offsetHeight+n.height,10)}),o.current.sizeMap&&setTimeout(o.current.sizeMap,0)}};render(){const{className:e,setAttributes:t,attributes:r,noticeUI:a,notices:s,isSelected:o,instanceId:c,onResizeStart:u}=this.props,{address:d,mapDetails:g,points:v,zoom:w,mapCenter:C,markerColor:S,preview:x,mapHeight:j,showFullscreenButton:L}=r,{addPointVisibility:A,apiKey:P,apiKeyControl:T,apiState:N,apiRequestOutstanding:M}=this.state,R=this.getMapProvider(),I=(0,n.createElement)(p.Fragment,null,(0,n.createElement)(i.BlockControls,null,(0,n.createElement)(b.Z,{attributes:r,setAttributes:t,state:this.state,setPointVisibility:this.setPointVisibility,context:"toolbar",mapRef:this.mapRef,mapProvider:R})),(0,n.createElement)(i.InspectorControls,null,(0,n.createElement)(b.Z,{attributes:r,setAttributes:t,state:this.state,setState:this.setState,mapRef:this.mapRef,instanceId:c,minHeight:400,removeAPIKey:this.removeAPIKey,updateAPIKey:this.updateAPIKey,mapProvider:R}))),Z=(0,n.createElement)(l.Placeholder,{icon:E},(0,n.createElement)(l.Spinner,null)),D=(0,n.createElement)("p",{className:"components-placeholder__instructions"},__("To use the map block, you need an Access Token.","jetpack"),(0,n.createElement)("br",null),(0,n.createElement)(l.ExternalLink,{href:"https://www.mapbox.com"},__("Create an account or log in to Mapbox.","jetpack")),(0,n.createElement)("br",null),__("Locate and copy the default access token. Then, paste it into the field below.","jetpack")),B=(0,n.createElement)(l.Placeholder,{icon:E,label:__("Map","jetpack"),notices:s},(0,n.createElement)(p.Fragment,null,D,(0,n.createElement)("form",null,(0,n.createElement)("input",{type:"text",className:"components-placeholder__input",disabled:M,placeholder:__("Paste Token Here","jetpack"),value:T,onChange:this.updateAPIKeyControl}),(0,n.createElement)(l.Button,{variant:"secondary",disabled:M||!T||T.length<1,onClick:this.updateAPIKey},__("Set Token","jetpack"))))),O=o&&v.length<=1,F=(0,m.t)(y.Z,r.className),U=(0,n.createElement)(p.Fragment,null,I,(0,n.createElement)("div",{className:e},(0,n.createElement)(l.ResizableBox,{size:{height:j||"auto",width:"100%"},grid:[10,10],showHandle:o,minHeight:400,enable:_,onResizeStart:u,onResizeStop:this.onMapResize},(0,n.createElement)("div",{className:"wp-block-jetpack-map__map_wrapper"},(0,n.createElement)(f.Z,{ref:this.mapRef,address:d,scrollToZoom:O,showFullscreenButton:L,mapStyle:F||"default",mapDetails:g,mapHeight:j,points:v,zoom:w,mapCenter:C,markerColor:S,onSetZoom:e=>{t({zoom:e})},admin:!0,apiKey:P,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},o&&A&&(0,n.createElement)(h.Z,{onAddPoint:this.addPoint,onClose:()=>this.setState({addPointVisibility:!1}),apiKey:P,onError:this.onError,tagName:"AddPoint",mapProvider:R})))))),z=y.Z.find((e=>e.name===F)),q=(0,n.createElement)("div",null,(0,n.createElement)("img",{alt:__("Map Preview","jetpack"),src:z?z.preview:k}));return(0,n.createElement)(p.Fragment,null,a,x&&q,!x&&0===N&&Z,!x&&1===N&&B,!x&&2===N&&U)}}const S=(0,c.compose)([l.withNotices,(0,u.withDispatch)((e=>{const{toggleSelection:t}=e("core/block-editor");return{onResizeStart:()=>t(!1),onResizeStop:()=>t(!0)}}))])(C)},22055:(e,t,r)=>{"use strict";var n=r(31985),a=r(32334),s=r(55109),o=r(45051),i=r(740),l=r(19496),c=r(53289);(0,n.S)(a,{edit:i.Z,save:l.Z,styles:c.Z,deprecated:[o.Z,s.Z]})},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})},31852:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(3142),s=r(3156);const o=e=>{const t="mapbox"===e.mapProvider?a.Z:s.Z;return(0,n.createElement)(t,e)}},3142:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(51806),a=r(55609),s=r(69307),o=r(65736),i=r(96881);const l=(0,o.__)("Add a marker…","jetpack");class c extends s.Component{constructor(){super(...arguments),this.textRef=(0,s.createRef)(),this.containerRef=(0,s.createRef)(),this.state={isEmpty:!0},this.autocompleter={name:"placeSearch",options:this.search,isDebounced:!0,getOptionLabel:e=>(0,n.createElement)("span",null,e.place_name),getOptionKeywords:e=>[e.place_name],getOptionCompletion:this.getOptionCompletion}}componentDidMount(){setTimeout((()=>{this.containerRef.current.querySelector("input").focus()}),50)}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};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()}))};onReset=()=>{this.textRef.current.value=null};render(){const{label:e}=this.props;return(0,n.createElement)("div",{ref:this.containerRef},(0,n.createElement)(a.BaseControl,{label:e,className:"components-location-search"},(0,n.createElement)(i.Z,{completer:this.autocompleter,onReset:this.onReset},(({isExpanded:e,listBoxId:t,activeId:r,onChange:s,onKeyDown:o})=>(0,n.createElement)(a.TextControl,{placeholder:l,ref:this.textRef,onChange:s,"aria-expanded":e,"aria-owns":t,"aria-activedescendant":r,onKeyDown:o})))))}}c.defaultProps={onError:()=>{}};const u=c},3156:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(51806),a=r(55609),s=r(69307),o=r(65736),i=r(96881),l=r(72672);const c=(0,o.__)("Add a marker…","jetpack"),u=({label:e,onAddPoint:t})=>{const r=(0,s.useRef)(),o=(0,s.useRef)(),{mapkit:u}=(0,l.qw)(),p={name:"placeSearch",options:async e=>new Promise((function(t,r){new u.Search({includePointsOfInterest:!1}).autocomplete(e,((e,n)=>{if(e)return void r(e);const a=(n?.results.filter((e=>e.coordinate))??[]).map((e=>({...e,placeName:e.displayLines?.join(", ")})));t(a)}))})),isDebounced:!0,getOptionLabel:e=>(0,n.createElement)("span",null,e.placeName),getOptionKeywords:e=>[e.placeName],getOptionCompletion:e=>{const{value:r}=e,n={placeTitle:r.placeName,title:r.placeName,caption:r.placeName,coordinates:{longitude:r.coordinate.longitude,latitude:r.coordinate.latitude},id:`${r.placeName} ${Number(r.coordinate.latitude).toFixed(2)} ${Number(r.coordinate.longitude).toFixed(2)}`};return t(n),r.placeName}};return(0,s.useEffect)((()=>{setTimeout((()=>{r.current.querySelector("input").focus()}),50)}),[]),(0,n.createElement)("div",{ref:r},(0,n.createElement)(a.BaseControl,{label:e,className:"components-location-search"},(0,n.createElement)(i.Z,{completer:p,onReset:()=>{o.current.value=""}},(({isExpanded:e,listBoxId:t,activeId:r,onChange:s,onKeyDown:i})=>(0,n.createElement)(a.TextControl,{placeholder:c,ref:o,onChange:s,"aria-expanded":e,"aria-owns":t,"aria-activedescendant":r,onKeyDown:i})))))}},57897:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(55609),s=r(69307);class o extends s.Component{constructor(){super(...arguments),this.state={selectedCell:null}}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)};setMarkerField(e,t,r){const{points:n,onChange:a}=this.props,s=n.slice(0);s[r][e]=t,a(s)}render(){const{points:e}=this.props,t=e.map(((e,t)=>(0,n.createElement)(a.PanelBody,{title:e.placeTitle,key:e.id,initialOpen:!1},(0,n.createElement)(a.TextControl,{label:"Marker Title",value:e.title,onChange:e=>this.setMarkerField("title",e,t)}),(0,n.createElement)(a.TextareaControl,{label:"Marker Caption",value:e.caption,rows:"3",onChange:e=>this.setMarkerField("caption",e,t)}),(0,n.createElement)(a.Button,{"data-id":t,onClick:this.onDeletePoint,className:"component__locations__delete-btn"},(0,n.createElement)(a.Dashicon,{icon:"trash",size:"15"})," Delete Marker"))));return(0,n.createElement)("div",{className:"component__locations"},(0,n.createElement)(a.Panel,{className:"component__locations__panel"},t))}}o.defaultProps={points:Object.freeze([]),onChange:()=>{}};const i=o},96881:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h});var n=r(51806),a=r(55609),s=r(94333),o=r(69307),i=r(65736),l=r(39630),c=r(65235),u=r.n(c),p=r(92819);const __=i.__,_n=i._n;function d(e=[],t=10){const r=[];for(let n=0;n<e.length;n++){const a=e[n];let{keywords:s=[]}=a;if("string"==typeof a.label&&(s=[...s,a.label]),r.push(a),r.length===t)break}return r}class m extends o.Component{static getInitialState(){return{selectedIndex:0,query:void 0,filteredOptions:[],isOpen:!1}}constructor(){super(...arguments),this.debouncedLoadOptions=(0,p.debounce)(this.loadOptions,250),this.state=this.constructor.getInitialState()}componentWillUnmount(){this.debouncedLoadOptions.cancel()}select=e=>{const{completer:t}=this.props;(t.getOptionCompletion||{})(e),this.reset()};reset=()=>{this.setState(this.constructor.getInitialState())};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=d(r),s=a.length===this.state.filteredOptions.length?this.state.selectedIndex:0;this.setState({options:r,filteredOptions:a,selectedIndex:s,isOpen:a.length>0}),this.announce(a)}))}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?d(r):[];t&&this.setState({selectedIndex:0,filteredOptions:n,query:e})};onKeyDown=e=>{const{isOpen:t,selectedIndex:r,filteredOptions:n}=this.state;if(!t)return;let a;switch(e.keyCode){case l.UP:a=(0===r?n.length:r)-1,this.setState({selectedIndex:a});break;case l.DOWN:a=(r+1)%n.length,this.setState({selectedIndex:a});break;case l.ENTER:this.select(n[r]);break;case l.LEFT:case l.RIGHT:case l.ESCAPE:return void this.reset();default:return}e.preventDefault(),e.stopPropagation()};announce(e){const{debouncedSpeak:t}=this.props;t&&(e.length?t((0,i.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:s,completer:o}=this.props,{selectedIndex:i,filteredOptions:l}=this.state,{key:c=""}=l[i]||{},{className:d}=o,m=l.length>0,h=m?`components-autocomplete-listbox-${s}`:null,g=m?`components-autocomplete-item-${s}-${c}`:null;return(0,n.createElement)("div",{className:"components-autocomplete"},r({isExpanded:m,listBoxId:h,activeId:g,onChange:e,onKeyDown:t}),m&&(0,n.createElement)(a.Popover,{focusOnMount:!1,onClose:this.reset,position:"top center",className:"components-autocomplete__popover",noArrow:!0},(0,n.createElement)("div",{id:h,role:"listbox",className:"components-autocomplete__results"},(0,p.map)(l,((e,t)=>(0,n.createElement)(a.Button,{key:e.key,id:`components-autocomplete-item-${s}-${e.key}`,role:"option","aria-selected":t===i,disabled:e.isDisabled,className:u()("components-autocomplete__result",d,{"is-selected":t===i}),onClick:()=>this.select(e)},e.label))))))}}const h=(0,s.compose)([a.withSpokenMessages,s.withInstanceId,a.withFocusOutside])(m)},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:()=>s,xt:()=>i,zb:()=>o});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 s(e,t){e.fitBounds(t,{padding:{top:80,bottom:80,left:40,right:40}})}function o(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:()=>p,E_:()=>i,F7:()=>l,eR:()=>c,ot:()=>o,rZ:()=>u});var n=r(85007);const a=6371e3;function s(e){return Math.abs(a*Math.cos(e*Math.PI/180)*2*Math.PI/256)}function o(e,t){return 512/Math.pow(2,e)*.5*s(t)}function i(e,t){const r=e/s(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)),s=new e.CoordinateSpan(1.3*Math.abs(r.latitude-n.latitude),1.3*Math.abs(n.longitude-r.longitude));return new e.CoordinateRegion(a,s)}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 p(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:()=>s,c:()=>o});var n=r(51806),a=r(69307);const s=(0,a.createContext)({map:null,mapkit:null,loaded:!1,activeMarker:null,calloutReference:null,currentDoc:null,currentWindow:null,admin:!1,setPoints:()=>{},points:[],previousCenter:null}),o=({value:e,children:t})=>{const[r,o]=(0,a.useState)(null),[i,l]=(0,a.useState)(null),[c,u]=(0,a.useState)(null);return(0,n.createElement)(s.Provider,{value:{...e,activeMarker:r,setActiveMarker:o,calloutReference:i,setCalloutReference:l,previousCenter:c,setPreviousCenter:u}},t)}},72672:(e,t,r)=>{"use strict";r.d(t,{$M:()=>m,J2:()=>b,LO:()=>h,Xj:()=>g,eV:()=>d,jo:()=>v,mk:()=>k,qw:()=>p,wd:()=>y,zZ:()=>f});var n=r(80428),a=r(9818),s=r(69307),o=r(65736),i=r(92819),l=r(85007),c=r(96442),u=r(32037);const __=o.__,p=()=>(0,s.useContext)(u.L),d=e=>{const[t,r]=(0,s.useState)(!1),[o,i]=(0,s.useState)(!1),[u,p]=(0,s.useState)(null),[d,m]=(0,s.useState)(null),[h,g]=(0,s.useState)(null);return(0,s.useEffect)((()=>{const t=(0,a.select)(n.t).getBlogId(),{currentDoc:s,currentWindow:o}=(0,l.bL)(e.current);if(e.current){m(o),g(s);const e=__("Failed to retrieve a Mapkit API token. Please try refreshing.","jetpack");o.mapkit?(p(o.mapkit),(0,c.E0)(o.mapkit,t,o).then((()=>{r(!0)}),(()=>{i(e)}))):(0,c.rZ)(s,o).then((n=>{p(n),(0,c.E0)(n,t,o).then((()=>{r(!0)}),(()=>{i(e)}))}))}}),[e]),{loaded:t,error:o,mapkit:u,currentDoc:h,currentWindow:d}},m=(e,t,r)=>{const[n,a]=(0,s.useState)(null);return(0,s.useEffect)((()=>{e&&t&&a(new e.Map(r.current,{showsMapTypeControl:!1}))}),[e,t,r]),{map:n}},h=(e,t)=>{const{mapkit:r,map:n}=p(),a=(0,s.useRef)(e),o=(0,s.useRef)(t);(0,s.useEffect)((()=>{if(!r||!n||!a.current)return;const e=a.current?.lat??a.current?.latitude,t=a.current?.lng??a.current?.longitude;"number"==typeof e&&"number"==typeof t&&(n.center=new r.Coordinate(e,t))}),[r,n,a]),(0,s.useEffect)((()=>{if(!r||!n)return;const e=()=>{if(n.center){const{latitude:e,longitude:t}=n.center;o.current({lat:e,lng:t})}};return n.addEventListener("region-change-end",(0,i.debounce)(e,1e3)),()=>{n.removeEventListener("region-change-end",e)}}),[r,n,o])},g=e=>{const{mapkit:t,map:r}=p();(0,s.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}=p();(0,s.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,s.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=(e,t,r=null,n=null)=>{const{mapkit:a,map:o,loaded:i}=p(),l=(0,s.useRef)(r),c=(0,s.useRef)(n);(0,s.useEffect)((()=>{if(i){o.annotations.filter((t=>!e.find((e=>e.id===t.data.id)))).forEach((e=>o.removeAnnotation(e)));const r=e.map((e=>{const r=o.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,o))),n}));o.annotations.length!==r.length&&o.showItems(r)}}),[e,i,o,a,t,l,c])},v=e=>{const{map:t,loaded:r}=p(),n=(0,s.useRef)(e);(0,s.useEffect)((()=>{r&&n.current(t)}),[r,t,n])},k=e=>{const{map:t,previousCenter:r,loaded:n}=p(),a=(0,s.useRef)(e);(0,s.useEffect)((()=>{n&&t.addEventListener("single-tap",(()=>{a.current(r)}))}),[n,t,r,a])},y=(e,t)=>{const{mapkit:r,map:n}=p();(0,s.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),s=r(81518),o=r(53289);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:p,mapHeight:d,showFullscreenButton:m}=e,h=(0,s.t)(o.Z,r),g=i.map(((e,t)=>{const{longitude:r,latitude:a}=e.coordinates,s="https://www.google.com/maps/search/?api=1&query="+a+","+r;return(0,n.createElement)("li",{key:t},(0,n.createElement)("a",{href:s},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":p||null,"data-map-height":d||null,"data-show-fullscreen-button":m||null},i.length>0&&(0,n.createElement)("ul",null,g))}}const l=i},53289:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(65736),a=r(80469),s=r(7247),o=r(13925),i=r(24873),l=r(25685),c=r(81667),u=r(15387),p=r(32566);const __=n.__,d=(0,p.Z)(),m=[{name:"default",label:__("Basic","jetpack"),preview:"mapkit"===d?i:o,isDefault:!0},{name:"black_and_white",label:"mapkit"===d?__("Muted","jetpack",0):__("Black & White","jetpack"),preview:"mapkit"===d?s:a},{name:"satellite",label:__("Satellite","jetpack"),preview:"mapkit"===d?c:l},{name:"terrain",label:__("Terrain","jetpack"),preview:u}]},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=(e,t=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:()=>g});var n=r(51806),a=r(52175),s=r(94333),o=r(9818),i=r(69307),l=r(65736),c=r(65235),u=r.n(c),p=r(69283);const __=l.__,d="editor",m="preview";class h extends i.Component{input=null;state={activePanel:d};bindInput=e=>{this.input=e};componentDidUpdate(e){e.isSelected&&!this.props.isSelected&&this.state.activePanel===m&&this.toggleMode(d)(),!e.isSelected&&this.props.isSelected&&this.state.activePanel===d&&this.input&&this.input.focus()}isEmpty(){const e=this.props.attributes.source;return!e||""===e.trim()}updateSource=e=>this.props.setAttributes({source:e});handleKeyDown=e=>{const{attributes:t,removeBlock:r}=this.props,{source:n}=t;8===e.keyCode&&""===n&&(r(),e.preventDefault())};toggleMode=e=>()=>this.setState({activePanel:e});renderToolbarButton(e,t){const{activePanel:r}=this.state,{className:a}=this.props,s=u()(a,"components-button components-tab-button",{"is-pressed":r===e});return(0,n.createElement)("button",{className:s,onClick:this.toggleMode(e)},(0,n.createElement)("span",null,t))}render(){const{attributes:e,className:t,isSelected:r}=this.props,{source:s}=e,{activePanel:o}=this.state;return!r&&this.isEmpty()?(0,n.createElement)("p",{className:`${t}__placeholder`},__("Write your _Markdown_ **here**…","jetpack")):(0,n.createElement)("div",{className:t},(0,n.createElement)(a.BlockControls,null,(0,n.createElement)("div",{className:"components-toolbar"},this.renderToolbarButton(d,__("Markdown","jetpack")),this.renderToolbarButton(m,__("Preview","jetpack")))),o!==m&&r?(0,n.createElement)(a.PlainText,{className:`${t}__editor`,onChange:this.updateSource,onKeyDown:this.handleKeyDown,"aria-label":__("Markdown","jetpack"),innerRef:this.bindInput,value:s}):(0,n.createElement)(p.Z,{className:`${t}__preview`,source:s}))}}const g=(0,s.compose)([(0,o.withSelect)((e=>({currentBlockId:e("core/block-editor").getSelectedBlockClientId()}))),(0,o.withDispatch)(((e,{currentBlockId:t})=>({removeBlock:()=>e("core/block-editor").removeBlocks(t)})))])(h)},49702:(e,t,r)=>{"use strict";var n=r(31985),a=r(41549),s=r(461),o=r(2683);(0,n.S)(a,{edit:s.Z,save:o.Z})},69283:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h});var n=r(51806),a=r(52175),s=r(69307),o=r(65736),i=r(10185),l=r.n(i),c=r(82339),u=r.n(c);const __=o.__,p=new(l())({typographer:!0}).use(u()),d=e=>{if("A"===e.target.nodeName){window.confirm(__("Are you sure you wish to leave this page?","jetpack"))||e.preventDefault()}},m=(e={})=>{const t=(0,a.__experimentalGetSpacingClassesAndStyles)?.(e);return t?.style?t.style:{}},h=({className:e,source:t="",attributes:r})=>(0,n.createElement)(s.RawHTML,{className:e,onClick:d,style:m(r)},t.length?p.render(t):"")},2683:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(69283);const s=({attributes:e,className:t})=>(0,n.createElement)(a.Z,{className:t,source:e.source,attributes:e})},80452:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(51806);const a={attributes:r(46385).attributes,supports:{align:!0,html:!1},save:({attributes:{rid:e}})=>(0,n.createElement)(n.Fragment,null,e.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(46385).attributes,migrate:e=>{const{style:t,className:r}=e,n="standard"===t?"":`is-style-${t}`;return{...e,className:r?`${r} ${n}`:n}},isEligible:({style:e,className:t})=>!(!e||"standard"===e)&&(!t||-1===t.indexOf("is-style-")),save:({attributes:{rid:e}})=>(0,n.createElement)("div",null,e.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:()=>E});var n=r(51806),a=r(13419),s=r(52175),o=r(4981),i=r(55609),l=r(69307),c=r(65736),u=r(65235),p=r.n(u),d=r(92819),m=r(81518),h=r(4554),g=r(46385),f=r(47144),b=r(57087),v=r(14680),k=r(41007),y=r(48769);const __=c.__,w=(0,a.dM)(g);const E=(0,i.withNotices)((function({attributes:e,className:t,clientId:r,isSelected:u,name:E,noticeOperations:_,noticeUI:C,setAttributes:S}){const x=(0,o.getBlockDefaultClassName)(E),j=(0,h.S)(g.attributes,e);(0,d.isEqual)(j,e)||S(j);const{align:L,rid:A,iframe:P,domain:T,lang:N,newtab:M,negativeMargin:R}=e,I=(0,d.isEmpty)(A),Z=(0,m.t)((0,v.Eo)(),e.className),D=(0,m.t)((0,v.Eo)(A),e.className),B=(0,k.Z)(D),O=(0,d.isEqual)(A,["1"]);(0,l.useEffect)((()=>{if(_.removeAllNotices(),!I&&!O&&"wide"===D&&"wide"!==L&&"full"!==L){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"));_.createNotice({status:"warning",content:e})}}),[O,L,I,A,D]),(0,l.useEffect)((()=>{"button"===Z&&Array.isArray(A)&&A?.length>1&&S({className:"",style:""})}),[A,Z,S]),(0,l.useEffect)((()=>{u&&(Array.isArray(A)&&A?.length>1?(0,o.unregisterBlockStyle)("jetpack/opentable",["button"]):(0,o.registerBlockStyle)("jetpack/opentable",v.jn))}),[u,A]),(0,l.useEffect)((()=>{"wide"===B&&"wide"===L&&S({align:""}),"wide"===D&&B&&D!==B&&S({align:"wide"}),S({style:D})}),[D]);const F=(0,v.fL)(A),U=e=>A?.length>1?["multi","button"!==e?e:"standard"]:["button"===e?"button":"standard","button"===e?"standard":e],z=e=>{Array.isArray(e)?S({rid:e,style:e.length>1&&"button"===D?"standard":D}):(e=>{const t=(0,y.CC)(e);t||(_.removeAllNotices(),_.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.attributes,t);S(r),_.removeAllNotices()})(e)},q=(0,n.createElement)(n.Fragment,null,(0,n.createElement)(s.InspectorAdvancedControls,null,(0,n.createElement)(i.ToggleControl,{label:__("Load the widget in an iFrame (Recommended)","jetpack"),checked:P,onChange:()=>S({iframe:!P}),className:"is-opentable"}),"button"===D&&(0,n.createElement)(i.ToggleControl,{label:__("Remove button margin","jetpack"),checked:R,onChange:()=>S({negativeMargin:!R})})),(0,n.createElement)(s.InspectorControls,null,(0,n.createElement)(i.PanelBody,{title:__("Settings","jetpack")},(0,n.createElement)(b.Z,{rids:A,onChange:z}),(0,n.createElement)(i.SelectControl,{label:__("Language","jetpack"),value:N,onChange:e=>S({lang:e}),options:f.V}),(0,n.createElement)(i.ToggleControl,{label:__("Open in a new window","jetpack"),checked:M,onChange:()=>S({newtab:!M})})))),$=(0,a.Wp)()||(0,a.Ug)()?"https://en.support.wordpress.com/wordpress-editor/blocks/opentable-block/":"https://jetpack.com/support/jetpack-blocks/opentable-block/",H=(0,n.createElement)(i.Placeholder,{label:__("OpenTable Reservation","jetpack"),icon:w,instructions:__("Enter your restaurant name, or paste an OpenTable Reservation Widget embed code.","jetpack"),notices:C},(0,n.createElement)(b.Z,{rids:A,onSubmit:z}),(0,n.createElement)("div",{className:`${x}-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:$},__("Learn more","jetpack")))),V=p()(t,{[`is-style-${D}`]:!I&&F.includes(D)&&-1===t.indexOf("is-style"),"is-placeholder":I,"is-multi":"multi"===U(D)[0],[`align${L}`]:L,"has-no-margin":R});return(0,n.createElement)(n.Fragment,null,C,(0,n.createElement)("div",{className:V},!I&&q,I?H:(e=>{const[t,a]=U(e||D);return(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:`${x}-overlay`}),(0,n.createElement)("iframe",{title:(0,c.sprintf)(/* translators: Placeholder is a unique ID. */
__("Open Table Preview %s","jetpack"),r),scrolling:"no",src:`https://www.opentable.com/widget/reservation/canvas?rid=${(0,d.join)(A,"%2C")}&type=${t}&theme=${a}&overlay=false&domain=${T}&lang=${N&&f.v.includes(N)?N:"en-US"}&newtab=${M}&disablega=true`}))})()))}))},92482:(e,t,r)=>{"use strict";var n=r(51806),a=r(4981),s=r(31985),o=r(46385),i=r(80452),l=r(70398),c=r(76851),u=r(14680),p=r(48769);(0,s.S)(o,{edit:c.Z,save:({attributes:{rid:e}})=>(0,n.createElement)("div",null,e?.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:o.attributes,styles:(0,u.Eo)(),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:[i.Z,l.Z]})},47144:(e,t,r)=>{"use strict";r.d(t,{V:()=>n,v:()=>a});const n=[{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"}],a=n.map((e=>e.value))},57087:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(82674),a=r.n(n),s=r(51806),o=r(55609),i=r(69307),l=r(65736),c=r(92819),u=r(25392);const __=l.__,_n=l._n,p=20;function d(e){const[t,r]=(0,i.useState)(""),n=(0,u.Z)(t,p),[l,d]=(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,s.createElement)(o.FormTokenField,a()({value:l,suggestions:h,saveTransform:e=>u.$.test(e)?"":e.trim(),onInputChange:r,maxSuggestions:p,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]}));d(r),e.onChange&&e.onChange(r)}}));return(0,s.createElement)("div",{className:"wp-block-jetpack-opentable-restaurant-picker"},e.onSubmit?(0,s.createElement)("form",{onSubmit:r=>{r.preventDefault(),e.onSubmit((0,c.isEmpty)(l)?t:l)}},g,(0,s.createElement)(o.Button,{variant:"secondary",type:"submit"},__("Embed","jetpack"))):g)}},14680:(e,t,r)=>{"use strict";r.d(t,{Eo:()=>o,fL:()=>i,jn:()=>s});var n=r(65736),a=r(92819);const __=n.__,s={name:"button",label:__("Button (210 x 113 pixels)","jetpack")},o=e=>(0,a.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)&&s]),i=e=>o(e).map((e=>e.name))},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,{$:()=>s,Z:()=>o});var n=r(69307),a=r(92819);const s=/^\s*(http[s]?:\/\/|\<script)/;function o(e,t){const[r,o]=(0,n.useState)([]),i=(0,n.useCallback)((0,a.throttle)(((e="")=>{fetch("https://www.opentable.com/widget/reservation/restaurant-search?pageSize="+t+"&query="+encodeURIComponent(e)).then((e=>e.json())).then((e=>o((0,a.unionBy)(r,e.items,"rid"))))}),500),[r]);return(0,n.useEffect)((()=>{(0,a.isEmpty)(e)||s.test(e)||i(e)}),[e]),r}},48769:(e,t,r)=>{"use strict";r.d(t,{CC:()=>o,pU:()=>s,tC:()=>a});const n=/<\s*script[^>]*src\s*=\s*["']?([^"']*)/i,a=/restref=([0-9]+)&/,s=/rid=([0-9]+)&/,o=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 s={};a&&(s.rid=a);const o=r.get("domain");o&&(s.domain=o);const i=r.get("iframe");i&&(s.iframe=i);const l=r.get("lang");l&&(s.lang=l);const c=r.get("newtab");return c&&(s.newtab=c),n&&(s.style=n),s})((e=>{const t=e.match(n);return t&&t[1]?t[1]:a.test(e)||s.test(e)?e:void 0})(e))}},15774:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(13419),s=r(55609),o=r(65736),i=r(55388);const __=o.__,_x=o._x,l=(0,a.dM)(i);function c({className:e,onSubmit:t,noticeUI:r,url:a,setUrl:o}){return(0,n.createElement)("div",{className:e},(0,n.createElement)(s.Placeholder,{label:__("Pinterest","jetpack"),icon:l,notices:r},(0,n.createElement)("form",{onSubmit:e=>{e.preventDefault(),t()}},(0,n.createElement)("input",{type:"url",value:a,className:"components-placeholder__input","aria-label":__("Pinterest URL","jetpack"),placeholder:__("Enter URL to embed here…","jetpack"),onChange:e=>o(e.target.value)}),(0,n.createElement)(s.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),s=r(55609),o=r(69307),i=r(65736);const __=i.__,_x=i._x;function l({fallbackUrl:e,onClick:t}){return(0,n.createElement)(n.Fragment,null,__("Sorry, this content could not be embedded.","jetpack")," ",(0,n.createElement)(s.Button,{variant:"link",onClick:()=>{const r=(0,n.createElement)("a",{href:e},e);t((0,a.createBlock)("core/paragraph",{content:(0,o.renderToString)(r)}))}},_x("Convert block to link","button label","jetpack")))}},13647:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(55609),s=r(65736);const __=s.__;function o(){return(0,n.createElement)("div",{className:"wp-block-embed is-loading"},(0,n.createElement)(a.Spinner,null),(0,n.createElement)("p",null,__("Embedding…","jetpack")))}},85777:(e,t,r)=>{"use strict";r.d(t,{W:()=>a,a:()=>n});const n="https://pinterest.com/anapinskywalker/",a=/^\s*https?:\/\/(?:www\.)?(?:[a-z]{2}\.)?(?:pinterest\.[a-z.]+|pin\.it)\/([^/]+)(\/[^/]+)?/i},89852:(e,t,r)=>{"use strict";r.d(t,{C:()=>o});var n=r(51806),a=r(55609),s=r(65736);const __=s.__;function o({setEditingState:e}){return(0,n.createElement)(a.ToolbarGroup,null,(0,n.createElement)(a.ToolbarButton,{className:"components-toolbar__control",label:__("Edit URL","jetpack"),icon:"edit",onClick:()=>e(!0)}))}},15479:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(34098);const s={attributes:{url:{type:"string"}},supports:{align:!1,html:!1},save:({attributes:e,className:t})=>{const{url:r}=e;return(0,a.t)(r)?(0,n.createElement)("div",{className:t},(0,n.createElement)("a",{"data-pin-do":(0,a.t)(r),href:r})):null}}},43529:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(51806),a=r(52175),s=r(55609),o=r(69307),i=r(15774),l=r(89488),c=r(13647),u=r(89852),p=r(18867),d=r(34098);const m=(0,s.withNotices)((function({attributes:e,isSelected:t,className:r,noticeOperations:m,noticeUI:h,setAttributes:g,onReplace:f}){const{url:b}=e,{isFetching:v,pinterestUrl:k,testUrl:y,hasTestUrlError:w}=(0,p.Z)(),[E,_]=(0,o.useState)(!1),[C,S]=(0,o.useState)(""),[x,j]=(0,o.useState)(!1),L=(0,o.useCallback)((()=>(0,n.createElement)(l.Z,{fallbackUrl:C,onClick:f})),[w]),A=()=>{v||(y(C),j(!1))},P=()=>{_(!0)};if((0,o.useEffect)((()=>{b&&y(b)}),[]),(0,o.useEffect)((()=>{!t&&E&&_(!1)}),[t,E]),(0,o.useEffect)((()=>{g({url:k}),m.removeAllNotices(),k&&S(k),w&&m.createErrorNotice(L())}),[k,w,g,L]),v)return(0,n.createElement)(c.Z,null);const T=(0,d.t)(b);if(x||!b||b&&!T)return(0,n.createElement)(i.Z,{className:r,onSubmit:A,noticeUI:h,url:C,setUrl:S});const N=`<a data-pin-do='${T}' href='${b}'></a>`;return(0,n.createElement)("div",{className:r},(0,n.createElement)(a.BlockControls,null,(0,n.createElement)(u.C,{setEditingState:j})),(0,n.createElement)("div",null,(0,n.createElement)(s.SandBox,{html:N,scripts:["https://assets.pinterest.com/js/pinit.js"],onFocus:P}),!E&&(0,n.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:P})))}))},7414:(e,t,r)=>{"use strict";var n=r(4981),a=r(31985),s=r(55388),o=r(85777),i=r(15479),l=r(43529),c=r(54709);(0,a.S)(s,{edit:l.Z,save:c.Z,transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&o.W.test(e.textContent),transform:e=>(0,n.createBlock)("jetpack/pinterest",{url:e.textContent.trim()})}]},deprecated:[i.Z]})},18867:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(69307),a=r(23621),s=r(85777);const o=(e="")=>{const[t,r]=(0,n.useState)(!1),[o,i]=(0,n.useState)(e),[l,c]=(0,n.useState)(!1);return(0,n.useEffect)((()=>{o&&o!==s.a&&(r(!0),(0,a.Z)(o).then((e=>{r(!1),i(e),c(!1)})).catch((()=>{r(!1),i(o||void 0),c(!0)})))}),[o]),{isFetching:t,pinterestUrl:o,hasTestUrlError:l,testUrl:i}}},54709:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(51806);function a({attributes:e}){const{url:t}=e;return(0,n.createElement)("a",{href:t},t)}},34098:(e,t,r)=>{"use strict";r.d(t,{t:()=>s});var n=r(96483),a=r(85777);function s(e){if(!a.W.test(e))return"";const t=(0,n.getPath)(e);return t?t.startsWith("pin/")?"embedPin":t.match(/^([^/]+)\/?$/)?"embedUser":t.match(/^([^/]+)\/([^/]+)\/?$/)?"embedBoard":"":""}},10799:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(52175),s=r(55609),o=r(65736),i=r(92819);const __=o.__,l=({id:e,setRating:t,children:r})=>{return(0,n.createElement)("span",{className:"jetpack-ratings-button",tabIndex:0,role:"button",onKeyDown:(a=e,({code:e})=>"Enter"===e?t(a):null),onClick:(e=>()=>t(e))(e)},r);var a},c=e=>function({className:t,setAttributes:r,attributes:{align:o,color:c,rating:u,maxRating:p}}){const d=e=>{e===u?Math.ceil(u)===u&&(e-=.5):.5===u&&1===e&&(e=0),r({rating:e})};return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(a.BlockControls,null,(0,n.createElement)(a.AlignmentToolbar,{value:o,onChange:e=>r({align:e})})),(0,n.createElement)("div",{className:t,style:{textAlign:o}},(0,i.range)(1,p+1).map((t=>(0,n.createElement)(l,{key:t,id:t,setRating:d},(0,n.createElement)("span",null,(0,n.createElement)(e,{className:u>=t-.5?null:"is-rating-unfilled",color:c})),(0,n.createElement)("span",null,(0,n.createElement)(e,{className:u>=t?null:"is-rating-unfilled",color:c})))))),(0,n.createElement)(a.InspectorControls,null,(0,n.createElement)(s.PanelBody,{title:__("Settings","jetpack")},(0,n.createElement)(s.RangeControl,{label:__("Highest rating","jetpack"),value:p,onChange:e=>r({maxRating:e}),min:2,max:10}),(0,n.createElement)(a.PanelColorSettings,{title:__("Color Settings","jetpack"),initialOpen:!0,colorSettings:[{value:c,onChange:e=>r({color:e}),label:__("Color","jetpack")}]}))))}},36836:(e,t,r)=>{"use strict";var n=r(31985),a=r(98477),s=r(10799),o=r(5056),i=r(78403);(0,n.S)(a,{edit:(0,s.Z)(o.r),save:(0,i.Z)("★")})},5056:(e,t,r)=>{"use strict";r.d(t,{r:()=>s});var n=r(51806),a=r(55609);const 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"}))}},78403:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(92819);const s=e=>function({className:t,attributes:{align:r,rating:s,color:o}}){return(0,n.createElement)("figure",{className:t,style:{textAlign:r}},(0,a.range)(1,s+1).map((t=>(0,n.createElement)("span",{key:t,style:{color:o}},e))))}},53296:(e,t,r)=>{"use strict";r.d(t,{AP:()=>l,Hj:()=>i});var n=r(51806),a=r(55609),s=r(65736);const __=s.__,o=6;function i({attributes:e,setAttributes:t}){const{displayAuthor:r,displayContext:s,displayDate:i,displayHeadline:l,displayThumbnails:c,headline:u,postsToShow:p}=e;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:l,onChange:e=>t({displayHeadline:e})}),l&&(0,n.createElement)(a.TextControl,{value:u,onChange:e=>t({headline:e}),label:__("Headline","jetpack")}),(0,n.createElement)(a.RangeControl,{label:__("Number of posts","jetpack"),value:p,onChange:e=>t({postsToShow:Math.min(e,o)}),min:1,max:o})),(0,n.createElement)(a.PanelBody,{title:__("Metadata settings","jetpack")},(0,n.createElement)(a.ToggleControl,{label:__("Display date","jetpack"),checked:i,onChange:e=>t({displayDate:e})}),(0,n.createElement)(a.ToggleControl,{label:__("Display author","jetpack"),checked:r,onChange:e=>t({displayAuthor:e})}),(0,n.createElement)(a.ToggleControl,{label:__("Display context (category or tag)","jetpack"),checked:s,onChange:e=>t({displayContext:e})}),(0,n.createElement)(a.ToggleControl,{label:__("Display thumbnail","jetpack"),checked:c,onChange:e=>t({displayThumbnails:e})})))}function l({attributes:e,setAttributes:t}){const{postLayout:r}=e,s=[{icon:"grid-view",title:__("Grid view","jetpack"),onClick:()=>t({postLayout:"grid"}),isActive:"grid"===r},{icon:"list-view",title:__("List view","jetpack"),onClick:()=>t({postLayout:"list"}),isActive:"list"===r}];return(0,n.createElement)(a.ToolbarGroup,{controls:s})}},86434:(e,t,r)=>{"use strict";r.d(t,{Z:()=>w});var n=r(51806),a=r(13419),s=r(52175),o=r(55609),i=r(94333),l=r(9818),c=r(12238),u=r(65736),p=r(8649),d=r(25411),m=r(53296),h=r(61871),g=r(54797),f=r(17778);const __=u.__,b=d.name.replace("jetpack/","");function v(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 k(e){const t=e.post?.block_context?.text||"",r=e.post?.block_context?.link||"",a=""!==t,s=""!==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,target:"_blank",rel:"nofollow noopener noreferrer"},(0,n.createElement)("img",{className:"jp-related-posts-i2__post-img",src:e.post.img.src,alt:e.post.title})),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"},s&&(0,n.createElement)("a",{href:r},t),!1===s&&t))}function y(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)))}function w(e){const{isLoadingModules:t,isChangingStatus:r,isModuleActive:o,changeStatus:u}=(0,a.el)(b),{isEnabled:d,enable:E,isFetchingStatus:_,isUpdatingStatus:C}=(0,g._)(),S=r||C,{posts:x,isLoading:j}=(0,h.r)(d),{isInSiteEditor:L}=(0,l.useSelect)((e=>{const t=e(c.store).getCurrentPost();return{isInSiteEditor:!t||0===Object.keys(t).length}})),{instanceId:A}=(0,i.useInstanceId)(w),{attributes:P,className:T,setAttributes:N}=e;if(t||_||j)return(0,n.createElement)(p.d,null);if(!o||!d)return(0,n.createElement)(f.v,{className:T,changeStatus:u,isLoading:S,enable:E});const{displayAuthor:M,displayContext:R,displayDate:I,displayHeadline:Z,displayThumbnails:D,headline:B,postLayout:O,postsToShow:F}=P,U="jp-relatedposts-i2",z=[];for(let e=0;e<F;e++)x[e]?z.push((0,n.createElement)(k,{id:`related-posts-${A}-post-${e}`,key:U+"-"+e,post:x[e],displayThumbnails:D,displayDate:I,displayContext:R,displayAuthor:M})):z.push((0,n.createElement)(v,{id:`related-posts-${A}-post-${e}`,key:"related-post-placeholder-"+e,displayThumbnails:D,displayDate:I,displayContext:R,isInSiteEditor:L,displayAuthor:M}));return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(s.InspectorControls,null,(0,n.createElement)(m.Hj,{attributes:P,setAttributes:N})),(0,n.createElement)(s.BlockControls,null,(0,n.createElement)(m.AP,{attributes:P,setAttributes:N})),(0,n.createElement)("div",{className:T,id:`related-posts-${A}`},Z&&(0,n.createElement)("h3",null,B),(0,n.createElement)("div",{className:U,"data-layout":O},(0,n.createElement)(y,{posts:z}))))}},89517:(e,t,r)=>{"use strict";var n=r(31985),a=r(25411),s=r(86434);(0,n.S)(a,{edit:s.Z,save:()=>null,transforms:{from:[{type:"shortcode",tag:"jetpack-related-posts"}]}})},61871:(e,t,r)=>{"use strict";r.d(t,{r:()=>c});var n=r(86989),a=r.n(n),s=r(94333),o=r(9818),i=r(12238),l=r(69307);const c=e=>{const t=(0,s.usePrevious)(e),[r,n]=(0,l.useState)(!1),[c,u]=(0,l.useState)(null),{currentPostId:p,currentPostRelatedPosts:d}=(0,o.useSelect)((e=>{const t=e(i.store).getCurrentPost();return{currentPostId:t.id,currentPostRelatedPosts:t?.["jetpack-related-posts"]??[]}})),m=0===d.length&&!t&&e;return(0,l.useEffect)((()=>{m&&(n(!0),async function(e){try{return await a()({path:`/wpcom/v2/related-posts/${e}`})}catch(e){return[]}}(p).then((e=>{u(e)})).catch((()=>{})).then((()=>{n(!1)})))}),[m,p]),(0,l.useMemo)((()=>({posts:c??d,isLoading:r})),[r,c,d])}},54797:(e,t,r)=>{"use strict";r.d(t,{_:()=>o});var n=r(86989),a=r.n(n),s=r(69307);const o=()=>{const[e,t]=(0,s.useState)(!1),[r,n]=(0,s.useState)(!1),[o,i]=(0,s.useState)(!1);(0,s.useEffect)((()=>{t(!0),async function(){try{const e=await a()({path:"/wpcom/v2/related-posts"});return e?.enabled??!1}catch(e){return!1}}().then((e=>{i(e),t(!1)})).catch((()=>{t(!1)}))}),[]);const l=(0,s.useCallback)((()=>{n(!0),async function(){try{return await a()({path:"/wpcom/v2/related-posts/enable",method:"POST"})}catch(e){return!1}}().then((e=>{i(e),n(!1)})).catch((()=>{n(!1)}))}),[]);return(0,s.useMemo)((()=>({isEnabled:o,enable:l,isFetchingStatus:e,isUpdatingStatus:r})),[o,l,e,r])}},17778:(e,t,r)=>{"use strict";r.d(t,{v:()=>p});var n=r(51806),a=r(6895),s=r(13419),o=r(55609),i=r(69307),l=r(65736),c=r(25411);const __=l.__,u=(0,s.dM)(c),p=({className:e,changeStatus:t,isLoading:r,enable:l})=>{const{tracks:p}=(0,s.z$)();(0,i.useEffect)((()=>{p.recordEvent("jetpack_editor_related_posts_placeholder_view")}),[p]);const d=(0,s.Wp)()||(0,s.Ug)()?"https://wordpress.com/support/related-posts/":(0,a.Z)("jetpack-support-related-posts");return(0,n.createElement)("div",{className:e},(0,n.createElement)(o.Placeholder,{icon:u,instructions:__("You'll need to activate the Related Posts feature to use this block.","jetpack"),label:c.title},(0,n.createElement)(o.Button,{disabled:r,isBusy:r,onClick:()=>{let e=!1;return p.recordEvent("jetpack_editor_related_posts_enable"),(0,s.Wp)()||(e=t(!0)),e=l(),e},variant:"secondary"},r?__("Activating Related Posts","jetpack"):__("Activate Related Posts","jetpack",0)),(0,n.createElement)("div",{className:"components-placeholder__learn-more"},(0,n.createElement)(o.ExternalLink,{href:d},__("Learn more about the Related Posts feature.","jetpack")))))}},4498:(e,t,r)=>{"use strict";r.d(t,{Z:()=>b});var n=r(51806),a=r(13419),s=r(52175),o=r(55609),i=r(9818),l=r(69307),c=r(65736),u=r(65235),p=r.n(u),d=r(18962),m=r(51100);const __=c.__,_n=c._n,h=[{value:m.FV,label:__("Show after threshold","jetpack")},{value:m.Am,label:__("Show before threshold","jetpack")}],g=(0,a.dM)(d);class f extends l.Component{state={isThresholdValid:!0};setCriteria=e=>this.props.setAttributes({criteria:e});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,c.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,c.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,n.createElement)("div",{className:p()(this.props.className,{"wp-block-jetpack-repeat-visitor--is-unselected":!this.props.isSelected})},(0,n.createElement)(o.Placeholder,{icon:g,label:__("Repeat Visitor","jetpack"),className:"wp-block-jetpack-repeat-visitor-placeholder"},(0,n.createElement)(o.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,n.createElement)(o.RadioControl,{label:__("Visibility","jetpack"),selected:this.props.attributes.criteria,options:h,onChange:this.setCriteria})),(0,n.createElement)(o.Notice,{status:"info",isDismissible:!1},this.getNoticeLabel()),(0,n.createElement)("div",{className:"wp-block-jetpack-repeat-visitor__inner-container"},(0,n.createElement)(s.InnerBlocks,null)))}}const b=(0,i.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:()=>s});var n=r(51806),a=r(52175);const s=({className:e})=>(0,n.createElement)("div",{className:e},(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:()=>s});const n="after-visits",a="before-visits",s=3},35983:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(52175),s=r(51100);const o={attributes:{criteria:{type:"string",default:s.FV},threshold:{type:"number",default:s.Kv}},supports:{html:!1},save:({className:e})=>(0,n.createElement)("div",{className:e},(0,n.createElement)(a.InnerBlocks.Content,null))}},50323:(e,t,r)=>{"use strict";var n=r(31985),a=r(18962),s=r(4498),o=r(48516),i=r(35983);(0,n.S)(a,{edit:s.Z,save:o.Z,deprecated:[i.Z]})},36825:(e,t,r)=>{"use strict";r.d(t,{LC:()=>n,Rh:()=>s,a7:()=>a});const n="jp_pay_product",a="USD",s=[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:()=>o});var n=r(51806),a=r(55609),s=r(65736);const __=s.__;function o({setAttributes:e,postLinkText:t}){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:t=>e({postLinkText:t}),value:t})))}},66763:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(69307);const s={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:({attributes:e})=>{const{productId:t}=e;return t?(0,n.createElement)(a.RawHTML,null,`[simple-payment id="${t}"]`):null}}},21559:(e,t,r)=>{"use strict";r.d(t,{Z:()=>E});var n=r(51806),a=r(43317),s=r(52175),o=r(55609),i=r(94333),l=r(9818),c=r(69307),u=r(65736),p=r(65235),d=r.n(p),m=r(92384),h=r(92819),g=r(59809),f=r(36825),b=r(39416),v=r(72802),k=r(96059);const __=u.__,_n=u._n;class y extends c.Component{state={fieldEmailError:null,fieldPriceError:null,fieldTitleError:null,isSavingProduct:!1};shouldInjectPaymentAttributes=!!this.props.attributes.productId;componentDidMount(){this.injectPaymentAttributes();const{attributes:e,hasPublishAction:t,postLinkUrl:r,setAttributes:n}=this.props,{productId:a}=e;!a&&t&&this.saveProduct();const s=r&&r!==this.props.attributes.postLinkUrl,o=!this.props.attributes.postLinkText;(s||o)&&n({...s&&{postLinkUrl:r},...o&&{postLinkText:__("Click here to purchase.","jetpack")}})}componentDidUpdate(e){const{hasPublishAction:t,isSelected:r,postLinkUrl:n,setAttributes:a}=this.props;(0,h.isEqual)(e.simplePayment,this.props.simplePayment)||this.injectPaymentAttributes(),!e.isSaving&&this.props.isSaving&&t&&this.validateAttributes()?this.saveProduct():e.isSelected&&!r&&this.validateAttributes();const s=n&&n!==this.props.attributes.postLinkUrl,o=!this.props.attributes.postLinkText;(s||o)&&a({...s&&{postLinkUrl:n},...o&&{postLinkText:__("Click here to purchase.","jetpack")}})}injectPaymentAttributes(){const{simplePayment:e,featuredMedia:t}=this.props;if(!this.shouldInjectPaymentAttributes||(0,h.isEmpty)(e))return;const{attributes:r,setAttributes:n}=this.props,{content:a,currency:s,email:o,featuredMediaId:i,featuredMediaUrl:l,featuredMediaTitle:c,multiple:u,price:p,title:d}=r;n({content:(0,h.get)(e,["content","raw"],a),currency:(0,h.get)(e,["meta","spay_currency"],s),email:(0,h.get)(e,["meta","spay_email"],o),featuredMediaId:(0,h.get)(e,["featured_media"],i),featuredMediaUrl:(0,h.get)(t,"url",l),featuredMediaTitle:(0,h.get)(t,"title",c),multiple:Boolean((0,h.get)(e,["meta","spay_multiple"],Boolean(u))),price:(0,h.get)(e,["meta","spay_price"],p||void 0),title:(0,h.get)(e,["title","raw"],d)}),this.shouldInjectPaymentAttributes=!this.shouldInjectPaymentAttributes}toApi(){const{attributes:e}=this.props,{content:t,currency:r,email:n,featuredMediaId:a,multiple:s,price:o,productId:i,title:l}=e;return{id:i,content:t,featured_media:a,meta:{spay_currency:r,spay_email:n,spay_multiple:s,spay_price:o},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,l.dispatch)("core");this.setState({isSavingProduct:!0},(()=>{n("postType",f.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,u.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})}))}))}validateAttributes=()=>{const e=this.validatePrice(),t=this.validateTitle(),r=this.validateEmail(),n=this.validateCurrency();return e&&t&&r&&n};validateCurrency=()=>{const{currency:e}=this.props.attributes;return f.Rh.includes(e)};validatePrice=()=>{const{currency:e,price:t}=this.props.attributes,{precision:r}=(0,a.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,k.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,u.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)};validateEmail=()=>{const{email:e}=this.props.attributes;return e?m.validate(e)?(this.state.fieldEmailError&&this.setState({fieldEmailError:null}),!0):(this.setState({fieldEmailError:(0,u.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)};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)};handleEmailChange=e=>{this.props.setAttributes({email:e}),this.setState({fieldEmailError:null})};handleContentChange=e=>{this.props.setAttributes({content:e})};handlePriceChange=e=>{e=parseFloat(e),isNaN(e)?this.props.setAttributes({price:void 0}):this.props.setAttributes({price:e}),this.setState({fieldPriceError:null})};handleCurrencyChange=e=>{this.props.setAttributes({currency:e})};handleMultipleChange=e=>{this.props.setAttributes({multiple:!!e})};handleTitleChange=e=>{this.props.setAttributes({title:e}),this.setState({fieldTitleError:null})};getCurrencyList=f.Rh.map((e=>{const{symbol:t}=(0,a.X)(e);return{value:e,label:t===e?e:`${e} ${(0,h.trimEnd)(t,".")}`}}));renderSettings=()=>(0,n.createElement)(s.InspectorControls,null,(0,n.createElement)(o.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1},(0,n.createElement)(o.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)(o.TextControl,{placeholder:__("Click here to purchase","jetpack"),onChange:e=>this.props.setAttributes({postLinkText:e}),value:this.props.attributes.postLinkText}))));render(){const{fieldEmailError:e,fieldPriceError:t,fieldTitleError:r}=this.state,{attributes:a,instanceId:s,isSelected:i,setAttributes:l,simplePayment:c}=this.props,{content:u,currency:p,email:m,featuredMediaId:f,featuredMediaUrl:y,featuredMediaTitle:w,multiple:E,price:_,productId:C,title:S}=a,x=C&&(0,h.isEmpty)(c);if(!i&&x)return(0,n.createElement)("div",{className:"simple-payments__loading"},(0,n.createElement)(v.Z,{"aria-busy":"true",content:"█████",formattedPrice:"█████",title:"█████"}));if(!i&&m&&_&&S&&!e&&!t&&!r)return(0,n.createElement)(v.Z,{"aria-busy":"false",content:u,featuredMediaUrl:y,featuredMediaTitle:w,formattedPrice:(0,k.w)(_,p),multiple:E,title:S});const j=x?o.Disabled:"div";return(0,n.createElement)(j,{className:"wp-block-jetpack-simple-payments"},this.renderSettings(),(0,n.createElement)(b.Z,{featuredMediaId:f,featuredMediaUrl:y,featuredMediaTitle:w,setAttributes:l}),(0,n.createElement)("div",null,(0,n.createElement)(o.TextControl,{"aria-describedby":`${s}-title-error`,className:d()("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:S}),(0,n.createElement)(g.Z,{id:`${s}-title-error`,isError:!0},r),(0,n.createElement)(o.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,n.createElement)("div",{className:"simple-payments__price-container"},(0,n.createElement)(o.SelectControl,{className:"simple-payments__field simple-payments__field-currency",label:__("Currency","jetpack"),onChange:this.handleCurrencyChange,options:this.getCurrencyList,value:p}),(0,n.createElement)(o.TextControl,{"aria-describedby":`${s}-price-error`,className:d()("simple-payments__field","simple-payments__field-price",{"simple-payments__field-has-error":t}),label:__("Price","jetpack"),onChange:this.handlePriceChange,placeholder:(0,k.w)(0,p,!1),required:!0,step:"1",type:"number",value:_||""}),(0,n.createElement)(g.Z,{id:`${s}-price-error`,isError:!0},t)),(0,n.createElement)("div",{className:"simple-payments__field-multiple"},(0,n.createElement)(o.ToggleControl,{checked:Boolean(E),label:__("Allow people to buy more than one item at a time","jetpack"),onChange:this.handleMultipleChange})),(0,n.createElement)(o.TextControl,{"aria-describedby":`${s}-email-${e?"error":"help"}`,className:d()("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:m}),(0,n.createElement)(g.Z,{id:`${s}-email-error`,isError:!0},e),(0,n.createElement)(g.Z,{id:`${s}-email-help`},__("Enter the email address associated with your PayPal account. Don’t have an account?","jetpack")+" ",(0,n.createElement)(o.ExternalLink,{href:"https://www.paypal.com/"},__("Create one on PayPal","jetpack")))))}}const w=(0,l.withSelect)(((e,t)=>{const{getEntityRecord:r,getMedia:n}=e("core"),{isSavingPost:a,getCurrentPost:s}=e("core/editor"),{productId:o,featuredMediaId:i}=t.attributes,l=o?(0,h.pick)(r("postType",f.LC,o),[["content"],["meta","spay_currency"],["meta","spay_email"],["meta","spay_multiple"],["meta","spay_price"],["title","raw"],["featured_media"]]):void 0,c=s();return{hasPublishAction:!!(0,h.get)(c,["_links","wp:action-publish"]),isSaving:!!a(),simplePayment:l,featuredMedia:i?n(i):null,postLinkUrl:c.link}})),E=(0,i.compose)(w,i.withInstanceId)(y)},24097:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h});var n=r(51806),a=r(13419),s=r(55609),o=r(69307),i=r(65736),l=r(70355),c=r(36825),u=r(21559),p=r(83080);const __=i.__,_x=i._x,d=(0,n.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(s.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,n.createElement)(s.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)(o.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)(s.ExternalLink,{href:m},__("Support reference","jetpack"))),icon:{src:d,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:({named:{id:e}})=>{if(!e)return;const t=parseInt(e,10);return t||void 0}}}}]},edit:u.Z,save:p.Z,supports:{className:!1,customClassName:!1,html:!1,reusable:!1}}},83080:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(96059);function s({attributes:e}){const{content:t,currency:r,featuredMediaUrl:s,featuredMediaTitle:o,postLinkUrl:i,postLinkText:l,price:c,productId:u,title:p}=e;return u?(0,n.createElement)("div",{className:`jetpack-simple-payments-wrapper jetpack-simple-payments-${u}`},(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:o})))),(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,t)),(0,n.createElement)("div",{className:"jetpack-simple-payments-price"},(0,n.createElement)("p",null,(0,a.w)(c,r))),(0,n.createElement)("a",{className:"jetpack-simple-payments-purchase",href:i,target:"_blank",rel:"noopener noreferrer"},l)))):null}},36239:(e,t,r)=>{"use strict";r.d(t,{Z:()=>C});var n=r(51806),a=r(43317),s=r(52175),o=r(55609),i=r(94333),l=r(9818),c=r(69307),u=r(65736),p=r(6551),d=r(65235),m=r.n(d),h=r(92384),g=r(92819),f=r(59809),b=r(36825),v=r(65093),k=r(39416),y=r(72802),w=r(96059);const __=u.__,_n=u._n;class E extends c.Component{state={fieldEmailError:null,fieldPriceError:null,fieldTitleError:null,isSavingProduct:!1};shouldInjectPaymentAttributes=!!this.props.attributes.productId;componentDidMount(){this.injectPaymentAttributes();const{attributes:e,hasPublishAction:t,postLinkUrl:r,setAttributes:n,isPostEditor:a}=this.props,{productId:s}=e;(!s&&t||!a)&&this.saveProduct();const o=r&&r!==this.props.attributes.postLinkUrl,i=!this.props.attributes.postLinkText;(o||i)&&n({...o&&{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,p.getWidgetIdFromBlock)(this.props.block)&&this.validateAttributes()&&this.saveProduct()}))}componentDidUpdate(e){const{hasPublishAction:t,isSelected:r,postLinkUrl:n,setAttributes:a,isPostEditor:s}=this.props;(0,g.isEqual)(e.simplePayment,this.props.simplePayment)||this.injectPaymentAttributes(),e.isSaving||!this.props.isSaving||!t&&s||!this.validateAttributes()?e.isSelected&&!r&&this.validateAttributes():this.saveProduct();const o=n&&n!==this.props.attributes.postLinkUrl,i=!this.props.attributes.postLinkText;(o||i)&&a({...o&&{postLinkUrl:n},...i&&{postLinkText:__("Click here to purchase.","jetpack")}})}injectPaymentAttributes(){const{simplePayment:e,featuredMedia:t}=this.props;if(!this.shouldInjectPaymentAttributes||(0,g.isEmpty)(e))return;const{attributes:r,setAttributes:n}=this.props,{content:a,currency:s,email:o,featuredMediaId:i,featuredMediaUrl:l,featuredMediaTitle:c,multiple:u,price:p,title:d}=r;n({content:(0,g.get)(e,["content","raw"],a),currency:(0,g.get)(e,["meta","spay_currency"],s),email:(0,g.get)(e,["meta","spay_email"],o),featuredMediaId:(0,g.get)(e,["featured_media"],i),featuredMediaUrl:(0,g.get)(t,"url",l),featuredMediaTitle:(0,g.get)(t,"title",c),multiple:Boolean((0,g.get)(e,["meta","spay_multiple"],Boolean(u))),price:(0,g.get)(e,["meta","spay_price"],p||void 0),title:(0,g.get)(e,["title","raw"],d)}),this.shouldInjectPaymentAttributes=!this.shouldInjectPaymentAttributes}toApi(){const{attributes:e}=this.props,{content:t,currency:r,email:n,featuredMediaId:a,multiple:s,price:o,productId:i,title:l}=e;return{id:i,content:t,featured_media:a,meta:{spay_currency:r,spay_email:n,spay_multiple:s,spay_price:o},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,l.dispatch)("core");this.setState({isSavingProduct:!0},(()=>{n("postType",b.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,u.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})}))}))}validateAttributes=()=>{const e=this.validatePrice(),t=this.validateTitle(),r=this.validateEmail(),n=this.validateCurrency();return e&&t&&r&&n};validateCurrency=()=>{const{currency:e}=this.props.attributes;return b.Rh.includes(e)};validatePrice=()=>{const{currency:e,price:t}=this.props.attributes,{precision:r}=(0,a.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,w.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,u.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)};validateEmail=()=>{const{email:e}=this.props.attributes;return e?h.validate(e)?(this.state.fieldEmailError&&this.setState({fieldEmailError:null}),!0):(this.setState({fieldEmailError:(0,u.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)};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)};handleEmailChange=e=>{this.props.setAttributes({email:e}),this.setState({fieldEmailError:null})};handleContentChange=e=>{this.props.setAttributes({content:e})};handlePriceChange=e=>{e=parseFloat(e),isNaN(e)?this.props.setAttributes({price:void 0}):this.props.setAttributes({price:e}),this.setState({fieldPriceError:null})};handleCurrencyChange=e=>{this.props.setAttributes({currency:e})};handleMultipleChange=e=>{this.props.setAttributes({multiple:!!e})};handleTitleChange=e=>{this.props.setAttributes({title:e}),this.setState({fieldTitleError:null})};getCurrencyList=b.Rh.map((e=>{const{symbol:t}=(0,a.X)(e);return{value:e,label:t===e?e:`${e} ${(0,g.trimEnd)(t,".")}`}}));renderSettings=()=>(0,n.createElement)(s.InspectorControls,null,(0,n.createElement)(v.G,{postLinkText:this.props.attributes.postLinkText,setAttributes:this.props.setAttributes}));render(){const{fieldEmailError:e,fieldPriceError:t,fieldTitleError:r}=this.state,{attributes:a,instanceId:s,isSelected:i,setAttributes:l,simplePayment:c}=this.props,{content:u,currency:p,email:d,featuredMediaId:h,featuredMediaUrl:b,featuredMediaTitle:v,multiple:E,price:_,productId:C,title:S}=a,x=C&&(0,g.isEmpty)(c);if(!i&&x)return(0,n.createElement)("div",{className:"simple-payments__loading"},(0,n.createElement)(y.Z,{"aria-busy":"true",content:"█████",formattedPrice:"█████",title:"█████"}));if(!i&&d&&_&&S&&!e&&!t&&!r)return(0,n.createElement)(y.Z,{"aria-busy":"false",content:u,featuredMediaUrl:b,featuredMediaTitle:v,formattedPrice:(0,w.T4)(_,p),multiple:E,title:S});const j=x?o.Disabled:"div";return(0,n.createElement)(j,{className:"wp-block-jetpack-simple-payments"},this.renderSettings(),(0,n.createElement)(k.Z,{featuredMediaId:h,featuredMediaUrl:b,featuredMediaTitle:v,setAttributes:l}),(0,n.createElement)("div",null,(0,n.createElement)(o.TextControl,{"aria-describedby":`${s}-title-error`,className:m()("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:S}),(0,n.createElement)(f.Z,{id:`${s}-title-error`,isError:!0},r),(0,n.createElement)(o.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,n.createElement)("div",{className:"simple-payments__price-container"},(0,n.createElement)(o.SelectControl,{className:"simple-payments__field simple-payments__field-currency",label:__("Currency","jetpack"),onChange:this.handleCurrencyChange,options:this.getCurrencyList,value:p}),(0,n.createElement)(o.TextControl,{"aria-describedby":`${s}-price-error`,className:m()("simple-payments__field","simple-payments__field-price",{"simple-payments__field-has-error":t}),label:__("Price","jetpack"),onChange:this.handlePriceChange,placeholder:(0,w.T4)(0,p,!1),required:!0,step:"1",type:"number",value:_||""}),(0,n.createElement)(f.Z,{id:`${s}-price-error`,isError:!0},t)),(0,n.createElement)("div",{className:"simple-payments__field-multiple"},(0,n.createElement)(o.ToggleControl,{checked:Boolean(E),label:__("Allow people to buy more than one item at a time","jetpack"),onChange:this.handleMultipleChange})),(0,n.createElement)(o.TextControl,{"aria-describedby":`${s}-email-${e?"error":"help"}`,className:m()("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:d}),(0,n.createElement)(f.Z,{id:`${s}-email-error`,isError:!0},e),(0,n.createElement)(f.Z,{id:`${s}-email-help`},__("Enter the email address associated with your PayPal account. Don’t have an account?","jetpack")+" ",(0,n.createElement)(o.ExternalLink,{href:"https://www.paypal.com/"},__("Create one on PayPal","jetpack")))))}}const _=(0,l.withSelect)(((e,t)=>{const{getEntityRecord:r,getMedia:n}=e("core"),{getCurrentPost:a}=e("core/editor"),{__experimentalGetDirtyEntityRecords:s,isSavingEntityRecord:o}=e("core"),i=s,{productId:l,featuredMediaId:c}=t.attributes,u=l?(0,g.pick)(r("postType",b.LC,l),[["content"],["meta","spay_currency"],["meta","spay_email"],["meta","spay_multiple"],["meta","spay_price"],["title","raw"],["featured_media"]]):void 0,p=a();return{block:e("core/block-editor").getBlock(t.clientId),hasPublishAction:!!(0,g.get)(p,["_links","wp:action-publish"]),isSaving:i().some((e=>o(e.kind,e.name,e.key))),simplePayment:u,featuredMedia:c?n(c):null,postLinkUrl:p?.guid?.raw,isPostEditor:Object.keys(a()).length>0}})),C=(0,i.compose)(_,i.withInstanceId)(E)},36227:(e,t,r)=>{"use strict";var n=r(31985),a=r(70955),s=r(66763),o=r(24097),i=r(36239),l=r(16376);(0,n.S)(a,{edit:i.Z,save:l.Z,transforms:{from:[{type:"shortcode",tag:"simple-payment",attributes:{productId:{type:"number",shortcode:({named:{id:e}})=>{if(!e)return;const t=parseInt(e,10);return t||void 0}}}}]},deprecated:[s.Z,o.Z]})},39416:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(51806),a=r(52175),s=r(55609),o=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)}),p=({featuredMediaId:e,featuredMediaUrl:t,featuredMediaTitle:r,setAttributes:i})=>e?(0,n.createElement)("div",null,(0,n.createElement)(o.Fragment,null,(0,n.createElement)(a.BlockControls,null,(0,n.createElement)(s.ToolbarGroup,null,(0,n.createElement)(s.ToolbarItem,null,(()=>(0,n.createElement)(a.MediaUpload,{onSelect:u(i),allowedTypes:["image"],value:e,render:({open:e})=>(0,n.createElement)(c.Z,{label:__("Edit Image","jetpack"),onClick:e})}))),(0,n.createElement)(s.ToolbarButton,{icon:"trash",title:__("Remove Image","jetpack"),onClick:()=>i({featuredMediaId:null,featuredMediaUrl:null,featuredMediaTitle:null})}))),(0,n.createElement)("figure",null,(0,n.createElement)("img",{src:t,alt:r})))):(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(i)})},72802:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(65736),s=r(23879),o=r(22323);const __=a.__,i=({title:e="",content:t="",formattedPrice:r="",multiple:a=!1,featuredMediaUrl:i=null,featuredMediaTitle:l=null})=>(0,n.createElement)("div",{className:"jetpack-simple-payments-wrapper"},(0,n.createElement)("div",{className:"jetpack-simple-payments-product"},i&&(0,n.createElement)("div",{className:"jetpack-simple-payments-product-image"},(0,n.createElement)("figure",{className:"jetpack-simple-payments-image"},(0,n.createElement)("img",{src:i,alt:l}))),(0,n.createElement)("div",{className:"jetpack-simple-payments-details"},e&&(0,n.createElement)("div",{className:"jetpack-simple-payments-title"},(0,n.createElement)("p",null,e)),t&&(0,n.createElement)("div",{className:"jetpack-simple-payments-description"},(0,n.createElement)("p",null,t)),r&&(0,n.createElement)("div",{className:"jetpack-simple-payments-price"},(0,n.createElement)("p",null,r)),(0,n.createElement)("div",{className:"jetpack-simple-payments-purchase-box"},a&&(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:o,srcSet:`${s} 2x`}))))))},16376:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(96059);function s({attributes:e}){const{content:t,currency:r,featuredMediaUrl:s,featuredMediaTitle:o,postLinkUrl:i,postLinkText:l,price:c,productId:u,title:p}=e;return u?(0,n.createElement)("div",{className:`jetpack-simple-payments-wrapper jetpack-simple-payments-${u}`},(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:o})))),(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,t)),(0,n.createElement)("div",{className:"jetpack-simple-payments-price"},(0,n.createElement)("p",null,(0,a.T4)(c,r))),(0,n.createElement)("a",{className:"jetpack-simple-payments-purchase",href:i,target:"_blank",rel:"noopener noreferrer"},l)))):null}},96059:(e,t,r)=>{"use strict";r.d(t,{N3:()=>s,T4:()=>l,w:()=>i});var n=r(43317),a=r(92819);r(36825);const s=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},o=(e="en-US")=>{const t=window?.window?.navigator;return t?.languages?.length?t.languages[0]:t?.userLanguage??t?.language??t?.browserLanguage??e},i=(e=0,t,r=!0)=>{const{precision:s,symbol:o}=(0,n.X)(t),i=e.toFixed(s);return r?`${i} ${(0,a.trimEnd)(o,".")}`:i},l=(e=0,t,r=!0)=>{if(!window.Intl||"function"!=typeof Intl.NumberFormat)return i(e,t,r);const n=[window?.Jetpack_Editor_Initial_State?.siteLocale??"en-US",o(),"en-US"];let a,s={};for(a of(r&&(s={style:"currency",currency:t}),n))try{return Intl.NumberFormat(a,s).format(e)}catch{continue}return i(e,t,r)}},20288:(e,t,r)=>{"use strict";r.d(t,{G:()=>c,J:()=>u});var n=r(51806),a=r(52175),s=r(55609),o=r(69307),i=r(65736),l=r(92819);const __=i.__,_x=i._x;function c({attributes:{autoplay:e,delay:t,effect:r,images:a,sizeSlug:i},imageSizeOptions:c,onChangeImageSize:u,setAttributes:p}){const d="undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,m=[{label:_x("Slide","Slideshow transition effect","jetpack"),value:"slide"},{label:_x("Fade","Slideshow transition effect","jetpack"),value:"fade"}];return(0,n.createElement)(o.Fragment,null,(0,n.createElement)(s.PanelBody,{title:__("Autoplay","jetpack")},(0,n.createElement)(s.ToggleControl,{label:__("Autoplay","jetpack"),help:__("Autoplay between slides","jetpack"),checked:e,onChange:e=>{p({autoplay:e})}}),e&&(0,n.createElement)(s.RangeControl,{label:__("Delay between transitions (in seconds)","jetpack"),value:t,onChange:e=>{p({delay:e})},min:1,max:5}),e&&d&&(0,n.createElement)("span",null,__("The Reduce Motion accessibility option is selected, therefore autoplay will be disabled in this browser.","jetpack"))),(0,n.createElement)(s.PanelBody,{title:__("Effects","jetpack")},(0,n.createElement)(s.SelectControl,{label:__("Transition","jetpack"),value:r,onChange:e=>{p({effect:e})},options:m})),!(0,l.isEmpty)(a)&&!(0,l.isEmpty)(c)&&(0,n.createElement)(s.PanelBody,{title:__("Image Settings","jetpack")},(0,n.createElement)(s.SelectControl,{label:__("Size","jetpack"),value:i,options:c,onChange:e=>u(e)})))}function u({allowedMediaTypes:e,attributes:{images:t},onSelectImages:r}){return(0,n.createElement)(o.Fragment,null,!!t.length&&(0,n.createElement)(s.ToolbarGroup,null,(0,n.createElement)(s.ToolbarItem,null,(()=>(0,n.createElement)(a.MediaUpload,{onSelect:r,allowedTypes:e,multiple:!0,gallery:!0,value:t.map((e=>e.id)),render:({open:e})=>(0,n.createElement)(s.Button,{label:__("Edit Slideshow","jetpack"),onClick:e},__("Edit","jetpack"))})))))}},30847:(e,t,r)=>{"use strict";async function n(e=".swiper-container",t={},n={}){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,t])=>[e,function(){t(this)}])))},[{default:s}]=await Promise.all([Promise.all([r.e(958),r.e(390)]).then(r.t.bind(r,59101,23)),Promise.all([r.e(958),r.e(390)]).then(r.bind(r,89701))]);return new s(e,{...a,...t})}r.d(t,{Z:()=>n})},21233:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>w});var n=r(51806),a=r(13419),s=r(11313),o=r(52175),i=r(55609),l=r(94333),c=r(9818),u=r(12238),p=r(69307),d=r(65736),m=r(92819),h=r(26523),g=r(20288),f=r(19486);const __=d.__,b=["image"],v=(0,a.dM)(h),k=(e,t)=>{const r=(0,m.pick)(e,["alt","id","link","caption"]);return r.url=(0,m.get)(e,["sizes",t,"url"])||(0,m.get)(e,["media_details","sizes",t,"source_url"])||e.url,r};class y extends p.Component{constructor(){super(...arguments),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((({id:e})=>parseInt(e,10)))}),this.props.setAttributes(e)}onSelectImages=e=>{const{sizeSlug:t}=this.props.attributes,r=e.map((e=>k(e,t)));this.setAttributes({images:r})};onRemoveImage=e=>()=>{const t=(0,m.filter)(this.props.attributes.images,((t,r)=>e!==r));this.setState({selectedImage:null}),this.setAttributes({images:t})};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,u.mediaUpload)({allowedTypes:b,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})};uploadFromFiles=e=>this.addFiles(e.target.files);getImageSizeOptions(){const{imageSizes:e}=this.props;return(0,m.map)(e,(({name:e,slug:t})=>({value:t,label:e})))}updateImagesSize=e=>{const{images:t}=this.props.attributes,{resizedImages:r}=this.props,n=t.map((t=>{const n=r.find((({id:e})=>parseInt(e,10)===parseInt(t.id,10))),a=(0,m.get)(n,["sizes",e,"source_url"]);return{...t,...a&&{url:a}}}));this.setAttributes({images:n,sizeSlug:e})};render(){const{attributes:e,className:t,isSelected:r,noticeOperations:a,noticeUI:s}=this.props,{align:l,autoplay:c,delay:u,effect:d,images:m}=e,h=this.getImageSizeOptions(),k=(0,n.createElement)(p.Fragment,null,(0,n.createElement)(o.InspectorControls,null,(0,n.createElement)(g.G,{attributes:e,imageSizeOptions:h,onChangeImageSize:this.updateImagesSize,setAttributes:e=>this.setAttributes(e)})),(0,n.createElement)(o.BlockControls,null,(0,n.createElement)(g.J,{allowedMediaTypes:b,attributes:e,onSelectImages:this.onSelectImages})));return 0===m.length?(0,n.createElement)(p.Fragment,null,k,(0,n.createElement)(o.MediaPlaceholder,{icon:v,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:b,multiple:!0,notices:s,onError:a.createErrorNotice})):(0,n.createElement)(p.Fragment,null,k,s,(0,n.createElement)(f.Z,{align:l,autoplay:c,className:t,delay:u,effect:d,images:m,onError:a.createErrorNotice}),(0,n.createElement)(i.DropZone,{onFilesDrop:this.addFiles}),r&&(0,n.createElement)("div",{className:"wp-block-jetpack-slideshow__add-item"},(0,n.createElement)(i.FormFileUpload,{multiple:!0,className:"wp-block-jetpack-slideshow__add-item-button",onChange:this.uploadFromFiles,accept:"image/*",icon:"insert"},__("Upload an image","jetpack"))))}}const w=(0,l.compose)((0,c.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,m.get)(n,["media_details","sizes"])}]}),[])}))),(0,c.withDispatch)((e=>{const{lockPostSaving:t,unlockPostSaving:r}=e("core/editor");return{lockPostSaving:t,unlockPostSaving:r}})),i.withNotices)(y)},17013:(e,t,r)=>{"use strict";var n=r(31985),a=r(26523),s=r(21233),o=r(67240),i=r(65784),l=r(6425),c=r(85983),u=r(81504);(0,n.S)(a,{edit:s.ZP,save:o.Z,transforms:u.Z,example:{attributes:{align:"center",autoplay:!0,ids:[22,23],images:[{alt:"",caption:"",id:22,url:i},{alt:"",caption:"",id:23,url:l},{alt:"",caption:"",id:23,url:c}],effect:"slide"}}})},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:()=>s});var n=r(51806),a=r(19486);const s=({attributes:{align:e,autoplay:t,delay:r,effect:s,images:o},className:i})=>(0,n.createElement)(a.Z,{align:e,autoplay:t,className:i,delay:r,effect:s,images:o})},19486:(e,t,r)=>{"use strict";r.d(t,{Z:()=>b});var n=r(51806),a=r(11313),s=r(52175),o=r(55609),i=r(69307),l=r(65736),c=r(65235),u=r.n(c),p=r(92819),d=r(6209),m=r(30847),h=r(85575),g=r(17766);const __=l.__;class f extends i.Component{pendingRequestAnimationFrame=null;resizeObserver=null;static defaultProps={effect:"slide"};constructor(e){super(e),this.slideshowRef=(0,i.createRef)(),this.btnNextRef=(0,i.createRef)(),this.btnPrevRef=(0,i.createRef)(),this.paginationRef=(0,i.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:s,onError:o}=this.props;if(t===e.align&&(0,p.isEqual)(s,e.images)||this.swiperInstance&&this.swiperInstance.update(),a!==e.effect||r!==e.autoplay||n!==e.delay||s!==e.images){let t;t=this.swiperIndex?s.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((()=>{o(__("The Swiper library could not be loaded.","jetpack"))}))}}initializeResizeObserver=e=>{this.clearResizeObserver(),this.resizeObserver=new d.Z((()=>{this.clearPendingRequestAnimationFrame(),this.pendingRequestAnimationFrame=requestAnimationFrame((()=>{(0,g.$m)(e),e.update()}))})),this.resizeObserver.observe(e.el)};clearPendingRequestAnimationFrame=()=>{this.pendingRequestAnimationFrame&&(cancelAnimationFrame(this.pendingRequestAnimationFrame),this.pendingRequestAnimationFrame=null)};clearResizeObserver=()=>{this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)};render(){if(!this.props?.images?.length)return null;const{autoplay:e,className:t,delay:r,effect:i,images:l}=this.props;return(0,n.createElement)("div",{className:t,"data-autoplay":e||null,"data-delay":e?r:null,"data-effect":i},(0,n.createElement)("div",{className:"wp-block-jetpack-slideshow_container swiper-container",ref:this.slideshowRef},(0,n.createElement)("ul",{className:"wp-block-jetpack-slideshow_swiper-wrapper swiper-wrapper"},l.map((({alt:e,caption:t,id:r,url:i})=>(0,n.createElement)("li",{className:u()("wp-block-jetpack-slideshow_slide","swiper-slide",(0,a.isBlobURL)(i)&&"is-transient"),key:r||i},(0,n.createElement)("figure",null,(0,n.createElement)("img",{alt:e,className:`wp-block-jetpack-slideshow_image wp-image-${r}`,"data-id":r,src:i}),(0,a.isBlobURL)(i)&&(0,n.createElement)(o.Spinner,null),t&&(0,n.createElement)(s.RichText.Content,{className:"wp-block-jetpack-slideshow_caption gallery-caption",tagName:"figcaption",value:t})))))),(0,n.createElement)("a",{className:"wp-block-jetpack-slideshow_button-prev swiper-button-prev swiper-button-white",ref:this.btnPrevRef,role:"button"}),(0,n.createElement)("a",{className:"wp-block-jetpack-slideshow_button-next swiper-button-next swiper-button-white",ref:this.btnNextRef,role:"button"}),(0,n.createElement)("a",{"aria-label":"Pause Slideshow",className:"wp-block-jetpack-slideshow_button-pause",role:"button"}),(0,n.createElement)("div",{className:"wp-block-jetpack-slideshow_pagination swiper-pagination swiper-pagination-white",ref:this.paginationRef})))}prefersReducedMotion=()=>"undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;buildSwiper=(e=0)=>(0,m.Z)(this.slideshowRef.current,{autoplay:!(!this.props.autoplay||this.prefersReducedMotion())&&{delay:1e3*this.props.delay,disableOnInteraction:!1},effect:this.props.effect,loop:!0,initialSlide:e,navigation:{nextEl:this.btnNextRef.current,prevEl:this.btnPrevRef.current},pagination:{clickable:!0,el:this.paginationRef.current,type:"custom",renderCustom:h.D}},{init:g.UA,imagesReady:g.$m,paginationRender:g.Wj,transitionEnd:g.HV})}const b=f},17766:(e,t,r)=>{"use strict";r.d(t,{$m:()=>c,HV:()=>u,UA:()=>l,Wj:()=>p});var n=r(81975);const a=16/9,s=.8,o=600,i="wp-block-jetpack-slideshow_autoplay-paused";function l(e){c(e),u(e),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*s:o,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 p(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:()=>o});var n=r(4981),a=r(92819);function s(e){return(0,a.filter)(e,(({id:e,url:t})=>e&&t))}const o={from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],isMatch:e=>s(e).length>0,transform:e=>{const t=s(e);return(0,n.createBlock)("jetpack/slideshow",{images:t.map((({alt:e,caption:t,id:r,url:n})=>({alt:e,caption:t,id:r,url:n}))),ids:t.map((({id:e})=>e))})}},{type:"block",blocks:["core/gallery","jetpack/tiled-gallery"],transform:({images:e})=>{const t=s(e);return t.length>0?(0,n.createBlock)("jetpack/slideshow",{images:t.map((({alt:e,caption:t,id:r,url:n})=>({alt:e,caption:t,id:r,url:n}))),ids:t.map((({id:e})=>e))}):(0,n.createBlock)("jetpack/slideshow")}}],to:[{type:"block",blocks:["core/gallery"],transform:({images:e,ids:t})=>(0,n.createBlock)("core/gallery",{images:e,ids:t})},{type:"block",blocks:["core/image"],transform:({images:e})=>e.length>0?e.map((({id:e,url:t,alt:r,caption:a})=>(0,n.createBlock)("core/image",{id:e,url:t,alt:r,caption:a}))):(0,n.createBlock)("core/image")}]}},3740:(e,t,r)=>{"use strict";r.d(t,{GP:()=>i,P0:()=>c,RA:()=>n,Z5:()=>o,hI:()=>s,q3:()=>a,xJ:()=>l});const n=["image"],a=4,s=20,o=20,i=2e3,l="circle",c=[{isDefault:!0,name:"rectangular"},{name:l},{name:"square"},{name:"columns"}]},73463:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(76476),a=r(43125),s=r(67525);const o=[r(99504),s,a,n]},1377:(e,t,r)=>{"use strict";r.d(t,{EU:()=>o,GP:()=>s,P0:()=>i,hI:()=>a,q3:()=>n});const n=4,a=20,s=2e3,o="rectangular",i=[{isDefault:!0,name:o},{name:"circle"},{name:"square"},{name:"columns"}]},56005:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(11313);function s(e){const{"aria-label":t,alt:r,height:s,id:o,link:i,linkTo:l,origUrl:c,url:u,width:p}=e;if((0,a.isBlobURL)(c))return null;let d;switch(l){case"media":d=u;break;case"attachment":d=i}const m=(0,n.createElement)("img",{alt:r,"aria-label":t,"data-height":s,"data-id":o,"data-link":i,"data-url":c,"data-width":p,src:u});return(0,n.createElement)("figure",{className:"tiled-gallery__item"},d?(0,n.createElement)("a",{href:d},m):m)}},76476:(e,t,r)=>{"use strict";r.r(t),r.d(t,{attributes:()=>a,save:()=>n.Z,support:()=>s});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"}},s={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({children:e}){return(0,n.createElement)("div",{className:"tiled-gallery__col"},e)}},89754:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(51806);function a({children:e,galleryRef:t}){return(0,n.createElement)("div",{className:"tiled-gallery__gallery",ref:t},e)}},15645:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(51806),a=r(11313),s=r(69307),o=r(65736),i=r(69424),l=r(1377),c=r(56005),u=r(30791),p=r(79313);const __=o.__;class d extends s.Component{photonize({height:e,width:t,url:r}){if(!r)return;if((0,a.isBlobURL)(r)||/^https?:\/\/localhost/.test(r))return r;const n=r.split("?",1)[0],s=function(e){const{host:t}=new URL(e,window.location.href);return/\.files\.wordpress\.com$/.test(t)}(r)?h:i.Z,{layoutStyle:o}=this.props;if(m(o)&&t&&e){const r=Math.min(l.GP,t,e);return s(n,{resize:`${r},${r}`})}return s(n)}renderImage(e,t){const{images:r,linkTo:a,selectedImage:s}=this.props,i=(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,r.length);return(0,n.createElement)(c.Z,{alt:e.alt,"aria-label":i,height:e.height,id:e.id,origUrl:e.url,isSelected:s===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:s,layoutStyle:o}=this.props,i=m(o)?p.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:s,layoutStyle:o,renderedImages:l}),t)}}function m(e){return["circle","square"].includes(e)}function h(e,t={}){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:()=>p});var n=r(51806),a=r(69307),s=r(6209),o=r(52235),i=r(89754),l=r(36472),c=r(6817),u=r(6648);class p extends a.Component{gallery=(0,a.createRef)();pendingRaf=null;ro=null;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()}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,u.W)(r).forEach((t=>(0,u.i)(t,e)))}}))};triggerResize(){this.gallery.current&&this.handleGalleryResize([{target:this.gallery.current,contentRect:{width:this.gallery.current.clientWidth}}])}observeResize(){this.triggerResize(),this.ro=new s.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:a,renderedImages:s}=this.props,u=(0,c.h9)(r),p="columns"===a?(0,c.sv)(u,t):(0,c.T9)(u,{isWide:["full","wide"].includes(e)});let d=0;return(0,n.createElement)(i.Z,{galleryRef:this.gallery},p.map(((e,t)=>(0,n.createElement)(l.Z,{key:t},e.map(((e,t)=>{const r=s.slice(d,d+e);return d+=e,(0,n.createElement)(o.Z,{key:t},r)}))))))}}},6817:(e,t,r)=>{"use strict";r.d(t,{T9:()=>S,h9:()=>a,sv:()=>o});var n=r(92819);function a(e){return(0,n.map)(e,s)}function s({height:e,width:t}){return e&&t?t/e:1}function o(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const r=(0,n.sum)(e)/t,a=[];let s=e,o=0;for(let e=0;e<t-1;e++){const t=(0,n.takeWhile)(s,(t=>{const n=o<=(e+1)*r;return n&&(o+=t),n})).length;a.push(t),s=(0,n.drop)(s,t)}return a.push(s.length),[a]}const i=x([2,1,2],5),l=j([L,L,A,L,L]),c=j([L,L,L,A,L,L,L]),u=x([3,1,3],5),p=j([A,L,L,A]),d=x([1,2,1],5),m=j([A,L,L,L]),h=x([1,3],3),g=j([L,L,L,A]),f=x([3,1],3),b=j([T(1.6),(0,n.overEvery)(P(.9),T(2)),(0,n.overEvery)(P(.9),T(2))]),v=x([1,2],3),k=x([1,1,1,1,1],1),y=x([1,1,1,1],1),w=x([1,1,1],3),E=j([(0,n.overEvery)(P(.9),T(2)),(0,n.overEvery)(P(.9),T(2)),T(1.6)]),_=x([2,1],3),C=j([function(e){return e>=2}]);function S(e,{isWide:t}={}){const r=(e,a)=>{if(!a.length)return e;let s;s=a.length>15&&l(a)&&i(e)?[2,1,2]:a.length>15&&c(a)&&u(e)?[3,1,3]:5!==a.length&&p(a)&&d(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&&w(e)&&(a<2.5||a<5&&t.length>=3&&t[0]===t[2]||r)}(e,a,t)?[1,1,1]:E(a)&&_(e)?[2,1]:C(a)?[1]:a.length>3?[1,1]:Array(a.length).fill(1);const o=e.concat([s]),S=(0,n.sum)(s),x=a.slice(S);return r(o,x)};return r([],e)}function x(e,t){return r=>!(0,n.some)((0,n.takeRight)(r,t),(t=>(0,n.isEqual)(t,e)))}function j(e){return t=>t.length>=e.length&&(0,n.every)((0,n.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function L(e){return e>=1&&e<2}function A(e){return e<1}function P(e){return t=>t>=e}function T(e){return t=>t<e}},6648:(e,t,r)=>{"use strict";r.d(t,{W:()=>o,i:()=>s});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 s(e,t){!function(e,[t,r],s){const o=1/t*(s-n.q3*(e.childElementCount-1)-r);!function(e,{rawHeight:t,rowWidth:r}){const s=i(e),o=s.map((e=>(t-n.q3*(e.childElementCount-1))*c(e)[0])),p=a(o,r);s.forEach(((e,r)=>{const s=o[r],i=p[r];!function(e,{colHeight:t,width:r,rawWidth:n}){const s=l(e).map((e=>n/u(e))),o=a(s,t);Array.from(e.children).forEach(((e,t)=>{const n=o[t];e.setAttribute("style",`height:${n}px;width:${r}px;`)}))}(e,{colHeight:t-n.q3*(e.childElementCount-1),width:i,rawWidth:s})}))}(e,{rawHeight:o,rowWidth:s-n.q3*(e.childElementCount-1)})}(e,function(e){const t=i(e).map(c).reduce((([e,t],[r,n])=>[e+r,t+n]),[0,0]);return t}(e),t)}function o(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:()=>o});var n=r(51806),a=r(65235),s=r.n(a);function o({children:e,className:t}){return(0,n.createElement)("div",{className:s()("tiled-gallery__row",t)},e)}},79313:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(92819),s=r(1377),o=r(52235),i=r(89754),l=r(36472);function c({columns:e,renderedImages:t}){const r=Math.min(s.hI,e),c=t.length%r;return(0,n.createElement)(i.Z,null,[...c?[(0,a.take)(t,c)]:[],...(0,a.chunk)((0,a.drop)(t,c),r)].map(((e,t)=>(0,n.createElement)(l.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,n.createElement)(o.Z,{key:t},e)))))))}},91507:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(81518),s=r(1377),o=r(15645);function i(e){return Math.min(3,e.images.length)}function l({attributes:e}){const{images:t}=e;if(!t.length)return null;const{align:r,className:l,columns:c=i(e),linkTo:u}=e;return(0,n.createElement)(o.Z,{align:r,className:l,columns:c,images:t,layoutStyle:(0,a.t)(s.P0,l),linkTo:u})}},86738:(e,t,r)=>{"use strict";r.d(t,{EU:()=>i,GP:()=>s,P0:()=>l,Z5:()=>a,hI:()=>n,xJ:()=>o});const n=20,a=20,s=2e3,o="circle",i="rectangular",l=[{isDefault:!0,name:i},{name:o},{name:"square"},{name:"columns"}]},64931:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(11313),s=r(65235),o=r.n(s);function i(e){const{alt:t,imageFilter:r,height:s,id:i,link:l,linkTo:c,origUrl:u,url:p,width:d}=e;if((0,a.isBlobURL)(u))return null;let m;switch(c){case"media":m=p;break;case"attachment":m=l}const h=(0,n.createElement)("img",{alt:t,"data-height":s,"data-id":i,"data-link":l,"data-url":u,"data-width":d,src:p});return(0,n.createElement)("figure",{className:o()("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:()=>s,save:()=>a.Z,supports:()=>o});var n=r(86738),a=r(68405);const s={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}},o={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({children:e}){return(0,n.createElement)("div",{className:"tiled-gallery__col"},e)}},40195:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(51806);function a({children:e,galleryRef:t}){return(0,n.createElement)("div",{className:"tiled-gallery__gallery",ref:t},e)}},73208:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(51806),a=r(69307),s=r(65736),o=r(65235),i=r.n(o),l=r(86738),c=r(64931),u=r(67091),p=r(84420),d=r(87178);const __=s.__;class m extends a.Component{renderImage(e,t){const{columns:r,imageFilter:a,images:o,linkTo:i,layoutStyle:l,selectedImage:p}=this.props,d=(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,o.length),{src:m,srcSet:h}=(0,u.z)(e,{layoutStyle:l});return(0,n.createElement)(c.Z,{alt:e.alt,"aria-label":d,columns:r,height:e.height,id:e.id,imageFilter:a,isFirstItem:0===t,isLastItem:t+1===o.length,isSelected:p===t,key:t,link:e.link,linkTo:i,origUrl:e.url,showMovers:o.length>1,srcSet:h,url:m,width:e.width})}render(){const{align:e,children:t,className:r,columns:a,images:s,layoutStyle:o,roundedCorners:c}=this.props,m=(0,u.v)(o)?d.Z:p.Z,h=this.props.images.map(this.renderImage,this),g=o!==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:s,layoutStyle:o,renderedImages:h}),t)}}},84420:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(69307),s=r(85407),o=r(40195),i=r(56243),l=r(12126);class c extends a.Component{gallery=(0,a.createRef)();pendingRaf=null;render(){const{align:e,columns:t,images:r,layoutStyle:a,renderedImages:c}=this.props,u=(0,l.h9)(r),p="columns"===a?(0,l.sv)(u,t):(0,l.T9)(u,{isWide:["full","wide"].includes(e)});let d=0;return(0,n.createElement)(o.Z,{galleryRef:this.gallery},p.map(((e,t)=>(0,n.createElement)(i.Z,{key:t},e.map(((e,t)=>{const r=c.slice(d,d+e);return d+=e,(0,n.createElement)(s.Z,{key:t},r)}))))))}}},12126:(e,t,r)=>{"use strict";r.d(t,{T9:()=>S,h9:()=>a,sv:()=>o});var n=r(92819);function a(e){return(0,n.map)(e,s)}function s({height:e,width:t}){return e&&t?t/e:1}function o(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const r=(0,n.sum)(e)/t,a=[];let s=e,o=0;for(let e=0;e<t-1;e++){const t=(0,n.takeWhile)(s,(t=>{const n=o<=(e+1)*r;return n&&(o+=t),n})).length;a.push(t),s=(0,n.drop)(s,t)}return a.push(s.length),[a]}const i=x([2,1,2],5),l=j([L,L,A,L,L]),c=j([L,L,L,A,L,L,L]),u=x([3,1,3],5),p=j([A,L,L,A]),d=x([1,2,1],5),m=j([A,L,L,L]),h=x([1,3],3),g=j([L,L,L,A]),f=x([3,1],3),b=j([T(1.6),(0,n.overEvery)(P(.9),T(2)),(0,n.overEvery)(P(.9),T(2))]),v=x([1,2],3),k=x([1,1,1,1,1],1),y=x([1,1,1,1],1),w=x([1,1,1],3),E=j([(0,n.overEvery)(P(.9),T(2)),(0,n.overEvery)(P(.9),T(2)),T(1.6)]),_=x([2,1],3),C=j([function(e){return e>=2}]);function S(e,{isWide:t}={}){const r=(e,a)=>{if(!a.length)return e;let s;s=a.length>15&&l(a)&&i(e)?[2,1,2]:a.length>15&&c(a)&&u(e)?[3,1,3]:5!==a.length&&p(a)&&d(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&&w(e)&&(a<2.5||a<5&&t.length>=3&&t[0]===t[2]||r)}(e,a,t)?[1,1,1]:E(a)&&_(e)?[2,1]:C(a)?[1]:a.length>3?[1,1]:Array(a.length).fill(1);const o=e.concat([s]),S=(0,n.sum)(s),x=a.slice(S);return r(o,x)};return r([],e)}function x(e,t){return r=>!(0,n.some)((0,n.takeRight)(r,t),(t=>(0,n.isEqual)(t,e)))}function j(e){return t=>t.length>=e.length&&(0,n.every)((0,n.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function L(e){return e>=1&&e<2}function A(e){return e<1}function P(e){return t=>t>=e}function T(e){return t=>t<e}},56243:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(65235),s=r.n(a);function o({children:e,className:t}){return(0,n.createElement)("div",{className:s()("tiled-gallery__row",t)},e)}},87178:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(92819),s=r(86738),o=r(85407),i=r(40195),l=r(56243);function c({columns:e,renderedImages:t}){const r=Math.min(s.hI,e),c=t.length%r;return(0,n.createElement)(i.Z,null,[...c?[(0,a.take)(t,c)]:[],...(0,a.chunk)((0,a.drop)(t,c),r)].map(((e,t)=>(0,n.createElement)(l.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,n.createElement)(o.Z,{key:t},e)))))))}},68405:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(81518),s=r(86738),o=r(73208);function i(e){return Math.min(3,e.images.length)}function l({attributes:e}){const{imageFilter:t,images:r}=e;if(!r.length)return null;const{align:l,className:c,columns:u=i(e),linkTo:p,roundedCorners:d}=e;return(0,n.createElement)(o.Z,{align:l,className:c,columns:u,imageFilter:t,images:r,isSave:!0,layoutStyle:(0,a.t)(s.P0,c),linkTo:p,roundedCorners:d})}},67091:(e,t,r)=>{"use strict";r.d(t,{v:()=>i,z:()=>l});var n=r(11313),a=r(92819),s=r(69424),o=r(86738);function i(e){return["circle","square"].includes(e)}function l(e,t={}){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:p}=t,d=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:s.Z;let m;if(i(p)&&u&&l){const e=Math.min(o.GP,u,l);m=d(r,{resize:`${e},${e}`})}else m=d(r);let h;if(i(p)){const e=Math.min(600,u,l),t=Math.min(o.GP,u,l);h=(0,a.range)(e,t,300).map((e=>{const t=d(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(o.GP,u);h=(0,a.range)(e,t,300).map((e=>{const t=d(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,t={}){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:()=>s,P0:()=>l,Z5:()=>a,hI:()=>n,xJ:()=>o});const n=20,a=20,s=2e3,o="circle",i="rectangular",l=[{isDefault:!0,name:i},{name:o},{name:"square"},{name:"columns"}]},21959:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(11313),s=r(65235),o=r.n(s);function i(e){const{alt:t,imageFilter:r,height:s,id:i,link:l,linkTo:c,origUrl:u,url:p,width:d}=e;if((0,a.isBlobURL)(u))return null;let m;switch(c){case"media":m=p;break;case"attachment":m=l}const h=(0,n.createElement)("img",{alt:t,"data-height":s,"data-id":i,"data-link":l,"data-url":u,"data-width":d,src:p});return(0,n.createElement)("figure",{className:o()("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:()=>s,migrate:()=>i,save:()=>a.Z,supports:()=>o});var n=r(13993),a=r(5826);const s={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}},o={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({children:e,width:t}){const r=Math.pow(10,12),a=Math.round(t*r)/r,s=t?{flexBasis:`${a}%`}:void 0;return(0,n.createElement)("div",{className:"tiled-gallery__col",style:s},e)}},46349:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(51806);function a({children:e,galleryRef:t}){return(0,n.createElement)("div",{className:"tiled-gallery__gallery",ref:t},e)}},178:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(51806),a=r(69307),s=r(65736),o=r(65235),i=r.n(o),l=r(13993),c=r(21959),u=r(11197),p=r(47510),d=r(65662);const __=s.__;class m extends a.Component{renderImage(e,t){const{columns:r,imageFilter:a,images:o,isSave:i,linkTo:l,layoutStyle:p,onMoveBackward:d,onMoveForward:m,onRemoveImage:h,onSelectImage:g,selectedImage:f,setImageAttributes:b}=this.props,v=(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,o.length),{src:k,srcSet:y}=(0,u.z)(e,{layoutStyle:p});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===o.length,isSelected:f===t,key:t,link:e.link,linkTo:l,onMoveBackward:i?void 0:d(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:o.length>1,srcSet:y,url:k,width:e.width})}render(){const{align:e,children:t,className:r,columns:a,images:s,layoutStyle:o,roundedCorners:c,onResize:m,isSave:h,columnWidths:g}=this.props,f=(0,u.v)(o)?d.Z:p.Z,b=this.props.images.map(this.renderImage,this),v=o!==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:s,layoutStyle:o,renderedImages:b,onResize:h?void 0:m}),t)}}},47510:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(69307),s=r(17410),o=r(46349),i=r(78922),l=r(3453);class c extends a.Component{gallery=(0,a.createRef)();pendingRaf=null;render(){const{align:e,columns:t,images:r,layoutStyle:a,renderedImages:c,columnWidths:u}=this.props,p=(0,l.h9)(r),d="columns"===a?(0,l.sv)(p,t):(0,l.T9)(p,{isWide:["full","wide"].includes(e)});let m=0;return(0,n.createElement)(o.Z,{galleryRef:this.gallery},d.map(((e,t)=>(0,n.createElement)(i.Z,{key:t},e.map(((e,r)=>{const a=c.slice(m,m+e);return m+=e,(0,n.createElement)(s.Z,{key:r,width:u?.[t]?.[r]},a)}))))))}}},3453:(e,t,r)=>{"use strict";r.d(t,{T9:()=>S,h9:()=>a,sv:()=>o});var n=r(92819);function a(e){return(0,n.map)(e,s)}function s({height:e,width:t}){return e&&t?t/e:1}function o(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const r=(0,n.sum)(e)/t,a=[];let s=e,o=0;for(let e=0;e<t-1;e++){const t=(0,n.takeWhile)(s,(t=>{const n=o<=(e+1)*r;return n&&(o+=t),n})).length;a.push(t),s=(0,n.drop)(s,t)}return a.push(s.length),[a]}const i=x([2,1,2],5),l=j([L,L,A,L,L]),c=j([L,L,L,A,L,L,L]),u=x([3,1,3],5),p=j([A,L,L,A]),d=x([1,2,1],5),m=j([A,L,L,L]),h=x([1,3],3),g=j([L,L,L,A]),f=x([3,1],3),b=j([T(1.6),(0,n.overEvery)(P(.9),T(2)),(0,n.overEvery)(P(.9),T(2))]),v=x([1,2],3),k=x([1,1,1,1,1],1),y=x([1,1,1,1],1),w=x([1,1,1],3),E=j([(0,n.overEvery)(P(.9),T(2)),(0,n.overEvery)(P(.9),T(2)),T(1.6)]),_=x([2,1],3),C=j([function(e){return e>=2}]);function S(e,{isWide:t}={}){const r=(e,a)=>{if(!a.length)return e;let s;s=a.length>15&&l(a)&&i(e)?[2,1,2]:a.length>15&&c(a)&&u(e)?[3,1,3]:5!==a.length&&p(a)&&d(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&&w(e)&&(a<2.5||a<5&&t.length>=3&&t[0]===t[2]||r)}(e,a,t)?[1,1,1]:E(a)&&_(e)?[2,1]:C(a)?[1]:a.length>3?[1,1]:Array(a.length).fill(1);const o=e.concat([s]),S=(0,n.sum)(s),x=a.slice(S);return r(o,x)};return r([],e)}function x(e,t){return r=>!(0,n.some)((0,n.takeRight)(r,t),(t=>(0,n.isEqual)(t,e)))}function j(e){return t=>t.length>=e.length&&(0,n.every)((0,n.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function L(e){return e>=1&&e<2}function A(e){return e<1}function P(e){return t=>t>=e}function T(e){return t=>t<e}},78922:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=r(65235),s=r.n(a);function o({children:e,className:t}){return(0,n.createElement)("div",{className:s()("tiled-gallery__row",t)},e)}},65662:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(92819),s=r(13993),o=r(17410),i=r(46349),l=r(78922);function c({columns:e,renderedImages:t}){const r=Math.min(s.hI,e),c=t.length%r;return(0,n.createElement)(i.Z,null,[...c?[(0,a.take)(t,c)]:[],...(0,a.chunk)((0,a.drop)(t,c),r)].map(((e,t)=>(0,n.createElement)(l.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,n.createElement)(o.Z,{key:t},e)))))))}},5826:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(81518),s=r(13993),o=r(178);function i(e){return Math.min(3,e.images.length)}function l({attributes:e}){const{imageFilter:t,images:r}=e;if(!r.length)return null;const{align:l,className:c,columns:u=i(e),linkTo:p,roundedCorners:d,columnWidths:m}=e;return(0,n.createElement)(o.Z,{align:l,className:c,columns:u,imageFilter:t,images:r,isSave:!0,layoutStyle:(0,a.t)(s.P0,c),linkTo:p,roundedCorners:d,columnWidths:m})}},11197:(e,t,r)=>{"use strict";r.d(t,{v:()=>i,z:()=>l});var n=r(11313),a=r(92819),s=r(69424),o=r(13993);function i(e){return["circle","square"].includes(e)}function l(e,t={}){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:p}=t,d=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:s.Z;let m;if(i(p)&&u&&l){const e=Math.min(o.GP,u,l);m=d(r,{resize:`${e},${e}`})}else m=d(r);let h;if(i(p)){const e=Math.min(600,u,l),t=Math.min(o.GP,u,l);h=(0,a.range)(e,t,300).map((e=>{const t=d(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(o.GP,u);h=(0,a.range)(e,t,300).map((e=>{const t=d(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,t={}){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:()=>o,P0:()=>c,Z5:()=>s,hI:()=>a,q3:()=>n,xJ:()=>i});const n=4,a=20,s=20,o=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),s=r(65235),o=r.n(s);function i(e){const{alt:t,imageFilter:r,height:s,id:i,link:l,linkTo:c,origUrl:u,url:p,width:d}=e;if((0,a.isBlobURL)(u))return null;let m;switch(c){case"media":m=p;break;case"attachment":m=l}const h=(0,n.createElement)("img",{alt:t,"data-height":s,"data-id":i,"data-link":l,"data-url":u,"data-width":d,src:p,"data-amp-layout":"responsive"});return(0,n.createElement)("figure",{className:o()("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:()=>s,save:()=>a.Z,supports:()=>o});var n=r(38698),a=r(26225);const s={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}},o={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({children:e,width:t}){const r=t?{flexBasis:`${t}%`}:void 0;return(0,n.createElement)("div",{className:"tiled-gallery__col",style:r},e)}},750:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(51806);function a({children:e,galleryRef:t}){return(0,n.createElement)("div",{className:"tiled-gallery__gallery",ref:t},e)}},9230:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(51806),a=r(69307),s=r(65736),o=r(65235),i=r.n(o),l=r(38698),c=r(65597),u=r(74713),p=r(82265),d=r(72264);const __=s.__;class m extends a.Component{renderImage(e,t){const{columns:r,imageFilter:a,images:o,isSave:i,linkTo:l,layoutStyle:p,onMoveBackward:d,onMoveForward:m,onRemoveImage:h,onSelectImage:g,selectedImage:f,setImageAttributes:b}=this.props,v=(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,o.length),{src:k,srcSet:y}=(0,u.z)(e,{layoutStyle:p});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===o.length,isSelected:f===t,key:t,link:e.link,linkTo:l,onMoveBackward:i?void 0:d(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:o.length>1,srcSet:y,url:k,width:e.width})}render(){const{align:e,children:t,className:r,columns:a,images:s,layoutStyle:o,roundedCorners:c,onResize:m,style:h,isSave:g,columnWidths:f}=this.props,b=(0,u.v)(o)?d.Z:p.Z,v=this.props.images.map(this.renderImage,this),k=o!==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:s,layoutStyle:o,renderedImages:v,onResize:g?void 0:m}),t)}}},82265:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(51806),a=r(69307),s=r(6209),o=r(63866),i=r(750),l=r(2911),c=r(76981),u=r(76187);class p extends a.Component{gallery=(0,a.createRef)();pendingRaf=null;ro=null;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()}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,u.W)(r).forEach((t=>{n.push((0,u.i)(t,e))})),void 0!==this.props.onResize&&this.props.onResize(n)}}))};triggerResize(){this.gallery.current&&this.handleGalleryResize([{target:this.gallery.current,contentRect:{width:this.gallery.current.clientWidth}}])}observeResize(){this.triggerResize(),this.ro=new s.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,u.i)(e,r)))}render(){const{align:e,columns:t,images:r,layoutStyle:s,renderedImages:u}=this.props,p=(0,c.h9)(r),d="columns"===s?(0,c.sv)(p,t):(0,c.T9)(p,{isWide:["full","wide"].includes(e)}),m=a.Platform.select({web:()=>this.props.columnWidths,native:()=>this.getColumnWidths(d,u,1e3)})();let h=0;return(0,n.createElement)(i.Z,{galleryRef:this.gallery},d.map(((e,t)=>(0,n.createElement)(l.Z,{key:t},e.map(((e,r)=>{const a=u.slice(h,h+e);return h+=e,(0,n.createElement)(o.Z,{key:r,width:m?.[t]?.[r]},a)}))))))}}},76981:(e,t,r)=>{"use strict";r.d(t,{T9:()=>S,h9:()=>a,sv:()=>o});var n=r(92819);function a(e){return(0,n.map)(e,s)}function s({height:e,width:t}){return e&&t?t/e:1}function o(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const r=(0,n.sum)(e)/t,a=[];let s=e,o=0;for(let e=0;e<t-1;e++){const t=(0,n.takeWhile)(s,(t=>{const n=o<=(e+1)*r;return n&&(o+=t),n})).length;a.push(t),s=(0,n.drop)(s,t)}return a.push(s.length),[a]}const i=x([2,1,2],5),l=j([L,L,A,L,L]),c=j([L,L,L,A,L,L,L]),u=x([3,1,3],5),p=j([A,L,L,A]),d=x([1,2,1],5),m=j([A,L,L,L]),h=x([1,3],3),g=j([L,L,L,A]),f=x([3,1],3),b=j([T(1.6),(0,n.overEvery)(P(.9),T(2)),(0,n.overEvery)(P(.9),T(2))]),v=x([1,2],3),k=x([1,1,1,1,1],1),y=x([1,1,1,1],1),w=x([1,1,1],3),E=j([(0,n.overEvery)(P(.9),T(2)),(0,n.overEvery)(P(.9),T(2)),T(1.6)]),_=x([2,1],3),C=j([function(e){return e>=2}]);function S(e,{isWide:t}={}){const r=(e,a)=>{if(!a.length)return e;let s;s=a.length>15&&l(a)&&i(e)?[2,1,2]:a.length>15&&c(a)&&u(e)?[3,1,3]:5!==a.length&&p(a)&&d(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&&w(e)&&(a<2.5||a<5&&t.length>=3&&t[0]===t[2]||r)}(e,a,t)?[1,1,1]:E(a)&&_(e)?[2,1]:C(a)?[1]:a.length>3?[1,1]:Array(a.length).fill(1);const o=e.concat([s]),S=(0,n.sum)(s),x=a.slice(S);return r(o,x)};return r([],e)}function x(e,t){return r=>!(0,n.some)((0,n.takeRight)(r,t),(t=>(0,n.isEqual)(t,e)))}function j(e){return t=>t.length>=e.length&&(0,n.every)((0,n.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function L(e){return e>=1&&e<2}function A(e){return e<1}function P(e){return t=>t>=e}function T(e){return t=>t<e}},76187:(e,t,r)=>{"use strict";r.d(t,{W:()=>o,i:()=>s});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 s(e,t){return function(e,[t,r],s){const o=1/t*(s-n.q3*(e.childElementCount-1)-r);return function(e,{rawHeight:t,rowWidth:r}){const s=i(e),o=s.map((e=>(t-n.q3*(e.childElementCount-1))*c(e)[0])),p=a(o,r);s.forEach(((e,r)=>{const s=o[r],i=p[r];!function(e,{colHeight:t,width:r,rawWidth:n}){const s=l(e).map((e=>n/u(e))),o=a(s,t);Array.from(e.children).forEach(((e,t)=>{const n=o[t];e.setAttribute("style",`height:${n}px;width:${r}px;`)}))}(e,{colHeight:t-n.q3*(e.childElementCount-1),width:i,rawWidth:s})}));return p.map((e=>parseFloat(e/r*100).toFixed(5)))}(e,{rawHeight:o,rowWidth:s-n.q3*(e.childElementCount-1)})}(e,function(e){const t=i(e).map(c).reduce((([e,t],[r,n])=>[e+r,t+n]),[0,0]);return t}(e),t)}function o(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:()=>o});var n=r(51806),a=r(65235),s=r.n(a);function o({children:e,className:t}){return(0,n.createElement)("div",{className:s()("tiled-gallery__row",t)},e)}},72264:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(92819),s=r(38698),o=r(63866),i=r(750),l=r(2911);function c({columns:e,renderedImages:t}){const r=Math.min(s.hI,e),c=t.length%r;return(0,n.createElement)(i.Z,null,[...c?[(0,a.take)(t,c)]:[],...(0,a.chunk)((0,a.drop)(t,c),r)].map(((e,t)=>(0,n.createElement)(l.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,n.createElement)(o.Z,{key:t},e)))))))}},26225:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(81518),s=r(38698),o=r(9230);function i(e){return Math.min(3,e.images.length)}function l({attributes:e}){const{imageFilter:t,images:r}=e;if(!r.length)return null;const{align:l,className:c,columns:u=i(e),linkTo:p,roundedCorners:d,columnWidths:m}=e;return(0,n.createElement)(o.Z,{align:l,className:c,columns:u,imageFilter:t,images:r,isSave:!0,layoutStyle:(0,a.t)(s.P0,c),linkTo:p,roundedCorners:d,columnWidths:m})}},74713:(e,t,r)=>{"use strict";r.d(t,{v:()=>c,z:()=>u});var n=r(13419),a=r(11313),s=r(92819),o=r(69424),i=r(99621),l=r(38698);function c(e){return["circle","square"].includes(e)}function u(e,t={}){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:d}=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}()?p:o.Z;let g;if(c(m)&&d&&u){const e=Math.min(l.GP,d,u);g=h(r,{resize:`${e},${e}`})}else g=h(r);let f;if(c(m)){const e=Math.min(600,d,u),t=Math.min(l.GP,d,u);f=(0,s.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,d),t=Math.min(l.GP,d);f=(0,s.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 p(e,t={}){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:()=>E});var n=r(51806),a=r(13419),s=r(52175),o=r(55609),i=r(12238),l=r(69307),c=r(65736),u=r(92819),p=r(81518),d=r(94545),m=r(99496),h=r(3740),g=r(38897),f=r(21340);const __=c.__,b=(0,a.dM)(m),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,u.pick)(e,[["alt"],["id"],["link"]]);return t.url=(0,u.get)(e,["sizes","large","url"])||(0,u.get)(e,["media_details","sizes","large","source_url"])||e.url,t};class w extends l.Component{state={selectedImage:null,changed:void 0===this.props.attributes.columnWidths||0===this.props.attributes.columnWidths?.length};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((({id:e})=>parseInt(e,10)))}),this.props.setAttributes(e)}addFiles=e=>{const t=this.props.attributes.images||[],{noticeOperations:r}=this.props;(0,i.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})};onRemoveImage=e=>()=>{const t=(0,u.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})};onSelectImage=e=>()=>{this.state.selectedImage!==e&&this.setState({selectedImage:e})};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})};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})};onMoveForward=e=>()=>{e!==this.props.attributes.images.length-1&&this.onMove(e,e+1)};onMoveBackward=e=>()=>{0!==e&&this.onMove(e,e-1)};onResize=e=>{this.state.changed&&this.setAttributes({columnWidths:e})};setColumnsNumber=e=>this.setAttributes({columns:e});setRoundedCorners=e=>this.setAttributes({roundedCorners:e});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)]})};setLinkTo=e=>this.setAttributes({linkTo:e});uploadFromFiles=e=>this.addFiles(e.target.files);render(){const{selectedImage:e}=this.state,{attributes:t,isSelected:r,className:a,noticeOperations:i,noticeUI:c,setAttributes:u}=this.props,{align:m,columns:y=k(t),imageFilter:w,images:E,linkTo:_,roundedCorners:C}=t,S=(0,n.createElement)(o.DropZone,{onFilesDrop:this.addFiles}),x=(0,n.createElement)(s.BlockControls,null,!!E.length&&(0,n.createElement)(l.Fragment,null,(0,n.createElement)(o.ToolbarGroup,null,(0,n.createElement)(o.ToolbarItem,null,(()=>(0,n.createElement)(s.MediaUpload,{onSelect:this.onSelectImages,allowedTypes:h.RA,multiple:!0,gallery:!0,value:E.map((e=>e.id)),render:({open:e})=>(0,n.createElement)(d.Z,{label:__("Edit Gallery","jetpack"),onClick:e})})))),(0,n.createElement)(g.Z,{value:w,onChange:e=>{u({imageFilter:e}),this.setState({selectedImage:null})}})));if(0===E.length)return(0,n.createElement)(l.Fragment,null,x,(0,n.createElement)(s.MediaPlaceholder,{icon:b,className:a,labels:{title:__("Tiled Gallery","jetpack"),name:__("images","jetpack")},onSelect:this.onSelectImages,accept:"image/*",allowedTypes:h.RA,multiple:!0,notices:c,onError:i.createErrorNotice}));const j=(0,p.t)(h.P0,t.className);return(0,n.createElement)(l.Fragment,null,x,(0,n.createElement)(s.InspectorControls,null,(0,n.createElement)(o.PanelBody,{title:__("Tiled Gallery settings","jetpack")},["columns","circle","square"].includes(j)&&E.length>1&&(0,n.createElement)(o.RangeControl,{label:__("Columns","jetpack"),value:y,onChange:this.setColumnsNumber,min:1,max:Math.min(h.hI,E.length)}),j!==h.xJ&&(0,n.createElement)(o.RangeControl,{label:__("Rounded corners","jetpack"),value:C,onChange:this.setRoundedCorners,min:0,max:h.Z5}),(0,n.createElement)(o.SelectControl,{label:__("Link To","jetpack"),value:_,onChange:this.setLinkTo,options:v}))),c,(0,n.createElement)(f.Z,{align:m,className:a,columns:y,imageFilter:w,images:E,layoutStyle:j,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},S,r&&(0,n.createElement)("div",{className:"tiled-gallery__add-item"},(0,n.createElement)(o.FormFileUpload,{multiple:!0,className:"tiled-gallery__add-item-button",onChange:this.uploadFromFiles,accept:"image/*",icon:"insert"},__("Upload an image","jetpack")))))}}const E=(0,o.withNotices)(w)},47158:(e,t,r)=>{"use strict";var n=r(4981),a=r(92819),s=r(31985),o=r(99496),i=r(73463),l=r(15078),c=r(10745);const u={align:"center",className:"is-style-rectangular",images:[{alt:"",link:"",url:r(96606),width:160,height:95},{alt:"",link:"",url:r(85472),width:160,height:107},{alt:"",link:"",url:r(79009),width:304,height:203},{alt:"",link:"",url:r(10742),width:312,height:207},{alt:"",link:"",url:r(52642),width:152,height:101},{alt:"",link:"",url:r(41145),width:152,height:105}],linkTo:"none"};function p(e){return(0,a.filter)(e,(({id:e,url:t})=>e&&t))}(0,s.S)(o,{edit:l.ZP,save:c.Z,transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],isMatch:e=>p(e).length>0,transform:e=>{const t=p(e);return(0,n.createBlock)(o.name,{images:t.map((({id:e,url:t,link:r,alt:n})=>({id:e,url:t,link:r,alt:n}))),ids:t.map((({id:e})=>e))})}},{type:"block",blocks:["core/gallery","jetpack/slideshow"],transform:({images:e})=>{const t=p(e);return t.length>0?(0,n.createBlock)(o.name,{images:t.map((({id:e,url:t,link:r,alt:n})=>({id:e,url:t,link:r,alt:n}))),ids:t.map((({id:e})=>e))}):(0,n.createBlock)(o.name)}}],to:[{type:"block",blocks:["core/gallery"],transform:({images:e,ids:t,columns:r,linkTo:a})=>(0,n.createBlock)("core/gallery",{images:e,ids:t,columns:r,imageCrop:!0,linkTo:a})},{type:"block",blocks:["core/image"],transform:({align:e,images:t})=>t.length>0?t.map((({id:t,url:r,alt:a})=>(0,n.createBlock)("core/image",{align:e,id:t,url:r,alt:a}))):(0,n.createBlock)("core/image")}]},providesContext:{imageCrop:"imageCrop"},deprecated:i.Z,example:{attributes:u}})},38897:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(55609),s=r(65736);const __=s.__,_x=s._x,o=[{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({value:e,onChange:t}){return(0,n.createElement)(a.Dropdown,{placement:"bottom-start",className:"editor-block-switcher",contentClassName:"editor-block-switcher__popover",renderToggle:({onToggle:e,isOpen:t})=>(0,n.createElement)(a.Toolbar,{controls:[{onClick:e,extraProps:{"aria-haspopup":"true","aria-expanded":t},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:({onClose:r})=>(0,n.createElement)(a.NavigableMenu,{className:"tiled-gallery__filter-picker-menu"},o.map((({icon:s,title:o,value:i})=>{return(0,n.createElement)(a.MenuItem,{className:e===i?"is-active":void 0,icon:s,isSelected:e===i,key:i||"original",onClick:(l=i,()=>{t(e===l?void 0:l),r()}),role:"menuitemcheckbox"},o);var l})))})}},57773:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h});var n=r(51806),a=r(11313),s=r(55609),o=r(9818),i=r(69307),l=r(65736),c=r(39630),u=r(65235),p=r.n(u),d=r(62051);const __=l.__;class m extends i.Component{img=(0,i.createRef)();onImageClick=()=>{this.props.isSelected||this.props.onSelect()};onImageKeyDown=e=>{this.img.current===document.activeElement&&this.props.isSelected&&[c.BACKSPACE,c.DELETE].includes(e.keyCode)&&this.props.onRemove()};componentDidUpdate(){const{alt:e,height:t,image:r,link:n,url:a,width:s}=this.props;if(r){const o={};!e&&r.alt_text&&(o.alt=r.alt_text),!t&&r.media_details&&r.media_details.height&&(o.height=+r.media_details.height),!n&&r.link&&(o.link=r.link),!a&&r.source_url&&(o.url=r.source_url),!s&&r.media_details&&r.media_details.width&&(o.width=+r.media_details.width),Object.keys(o).length&&this.props.setAttributes(o)}}render(){const{"aria-label":e,alt:t,columns:r,height:o,id:l,imageFilter:c,isFirstItem:u,isLastItem:m,isSelected:h,link:g,linkTo:f,onMoveBackward:b,onMoveForward:v,onRemove:k,origUrl:y,showMovers:w,srcSet:E,url:_,width:C}=this.props;let S;switch(f){case"media":S=y;break;case"attachment":S=g}const x=(0,a.isBlobURL)(y),j=(0,n.createElement)(i.Fragment,null,(0,n.createElement)("img",{alt:t,"aria-label":e,"data-height":o,"data-id":l,"data-link":g,"data-url":y,"data-width":C,onClick:this.onImageClick,onKeyDown:this.onImageKeyDown,ref:this.img,src:x?void 0:_,srcSet:x?void 0:E,tabIndex:"0",style:x?{backgroundImage:`url(${y})`}:void 0}),x&&(0,n.createElement)(s.Spinner,null));return(0,n.createElement)("figure",{className:p()("tiled-gallery__item",{"is-selected":h,"is-transient":x,[`filter__${c}`]:!!c})},w&&(0,n.createElement)("div",{className:"tiled-gallery__item__move-menu"},(0,n.createElement)(s.Button,{icon:1===r?d.WO:d.KT,onClick:u?void 0:b,className:"tiled-gallery__item__move-backward",label:__("Move image backward","jetpack"),"aria-disabled":u,disabled:!h}),(0,n.createElement)(s.Button,{icon:1===r?d.xf:d.zz,onClick:m?void 0:v,className:"tiled-gallery__item__move-forward",label:__("Move image forward","jetpack"),"aria-disabled":m,disabled:!h})),(0,n.createElement)("div",{className:"tiled-gallery__item__inline-menu"},(0,n.createElement)(s.Button,{icon:d.xv,onClick:k,className:"tiled-gallery__item__remove",label:__("Remove image","jetpack"),disabled:!h})),S?(0,n.createElement)("a",null,j):j)}}const h=(0,o.withSelect)(((e,t)=>{const{getMedia:r}=e("core"),{id:n}=t;return{image:n?r(n):null}}))(m)},81921:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(11313),s=r(65235),o=r.n(s);function i(e){const{alt:t,imageFilter:r,height:s,id:i,link:l,linkTo:c,origUrl:u,url:p,width:d}=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":s,"data-id":i,"data-link":l,"data-url":u,"data-width":d,src:p,"data-amp-layout":"responsive"});return(0,n.createElement)("figure",{className:o()("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:()=>s,WO:()=>l,xf:()=>i,xv:()=>c,zz:()=>o});var n=r(51806),a=r(55609);const 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:"M5 8.70002L10.6 14.4L12 12.9L7.8 8.70002L12 4.50002L10.6 3.00002L5 8.70002Z"})),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:"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"}))},24639:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(51806);function a({children:e,width:t}){const r=t?{flexBasis:`${t}%`}:void 0;return(0,n.createElement)("div",{className:"tiled-gallery__col",style:r},e)}},75084:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(51806);function a({children:e,galleryRef:t}){return(0,n.createElement)("div",{className:"tiled-gallery__gallery",ref:t},e)}},21340:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h});var n=r(51806),a=r(69307),s=r(65736),o=r(65235),i=r.n(o),l=r(3740),c=r(57773),u=r(81921),p=r(13369),d=r(46438),m=r(70216);const __=s.__;class h extends a.Component{renderImage(e,t){const{columns:r,imageFilter:a,images:o,isSave:i,linkTo:l,layoutStyle:d,onMoveBackward:m,onMoveForward:h,onRemoveImage:g,onSelectImage:f,selectedImage:b,setImageAttributes:v}=this.props,k=(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,o.length),y=i?u.Z:c.Z,{src:w,srcSet:E}=(0,p.z)(e,{layoutStyle:d});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===o.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:o.length>1,srcSet:E,url:w,width:e.width})}render(){const{align:e,children:t,className:r,columns:a,images:s,layoutStyle:o,roundedCorners:c,onResize:u,style:h,isSave:g,columnWidths:f}=this.props,b=(0,p.v)(o)?m.Z:d.Z,v=this.props.images.map(this.renderImage,this),k=o!==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:s,layoutStyle:o,renderedImages:v,onResize:g?void 0:u}),t)}}},46438:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(51806),a=r(69307),s=r(6209),o=r(24639),i=r(75084),l=r(51309),c=r(96001),u=r(99856);class p extends a.Component{gallery=(0,a.createRef)();pendingRaf=null;ro=null;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()}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,u.W)(r).forEach((t=>{n.push((0,u.i)(t,e))})),void 0!==this.props.onResize&&this.props.onResize(n)}}))};triggerResize(){this.gallery.current&&this.handleGalleryResize([{target:this.gallery.current,contentRect:{width:this.gallery.current.clientWidth}}])}observeResize(){this.triggerResize(),this.ro=new s.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,u.i)(e,r)))}render(){const{align:e,columns:t,images:r,layoutStyle:s,renderedImages:u}=this.props,p=(0,c.h9)(r),d="columns"===s?(0,c.sv)(p,t):(0,c.T9)(p,{isWide:["full","wide"].includes(e)}),m=a.Platform.select({web:()=>this.props.columnWidths,native:()=>this.getColumnWidths(d,u,1e3)})();let h=0;return(0,n.createElement)(i.Z,{galleryRef:this.gallery},d.map(((e,t)=>(0,n.createElement)(l.Z,{key:t},e.map(((e,r)=>{const a=u.slice(h,h+e);return h+=e,(0,n.createElement)(o.Z,{key:r,width:m?.[t]?.[r]},a)}))))))}}},96001:(e,t,r)=>{"use strict";r.d(t,{T9:()=>S,h9:()=>a,sv:()=>o});var n=r(92819);function a(e){return(0,n.map)(e,s)}function s({height:e,width:t}){return e&&t?t/e:1}function o(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const r=(0,n.sum)(e)/t,a=[];let s=e,o=0;for(let e=0;e<t-1;e++){const t=(0,n.takeWhile)(s,(t=>{const n=o<=(e+1)*r;return n&&(o+=t),n})).length;a.push(t),s=(0,n.drop)(s,t)}return a.push(s.length),[a]}const i=x([2,1,2],5),l=j([L,L,A,L,L]),c=j([L,L,L,A,L,L,L]),u=x([3,1,3],5),p=j([A,L,L,A]),d=x([1,2,1],5),m=j([A,L,L,L]),h=x([1,3],3),g=j([L,L,L,A]),f=x([3,1],3),b=j([T(1.6),(0,n.overEvery)(P(.9),T(2)),(0,n.overEvery)(P(.9),T(2))]),v=x([1,2],3),k=x([1,1,1,1,1],1),y=x([1,1,1,1],1),w=x([1,1,1],3),E=j([(0,n.overEvery)(P(.9),T(2)),(0,n.overEvery)(P(.9),T(2)),T(1.6)]),_=x([2,1],3),C=j([function(e){return e>=2}]);function S(e,{isWide:t}={}){const r=(e,a)=>{if(!a.length)return e;let s;s=a.length>15&&l(a)&&i(e)?[2,1,2]:a.length>15&&c(a)&&u(e)?[3,1,3]:5!==a.length&&p(a)&&d(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&&w(e)&&(a<2.5||a<5&&t.length>=3&&t[0]===t[2]||r)}(e,a,t)?[1,1,1]:E(a)&&_(e)?[2,1]:C(a)?[1]:a.length>3?[1,1]:Array(a.length).fill(1);const o=e.concat([s]),S=(0,n.sum)(s),x=a.slice(S);return r(o,x)};return r([],e)}function x(e,t){return r=>!(0,n.some)((0,n.takeRight)(r,t),(t=>(0,n.isEqual)(t,e)))}function j(e){return t=>t.length>=e.length&&(0,n.every)((0,n.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function L(e){return e>=1&&e<2}function A(e){return e<1}function P(e){return t=>t>=e}function T(e){return t=>t<e}},99856:(e,t,r)=>{"use strict";r.d(t,{W:()=>o,i:()=>s});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 s(e,t){return function(e,[t,r],s){const o=1/t*(s-n.q3*(e.childElementCount-1)-r);return function(e,{rawHeight:t,rowWidth:r}){const s=i(e),o=s.map((e=>(t-n.q3*(e.childElementCount-1))*c(e)[0])),p=a(o,r);s.forEach(((e,r)=>{const s=o[r],i=p[r];!function(e,{colHeight:t,width:r,rawWidth:n}){const s=l(e).map((e=>n/u(e))),o=a(s,t);Array.from(e.children).forEach(((e,t)=>{const n=o[t];e.setAttribute("style",`height:${n}px;width:${r}px;`)}))}(e,{colHeight:t-n.q3*(e.childElementCount-1),width:i,rawWidth:s})}));return p.map((e=>parseFloat(e/r*100).toFixed(5)))}(e,{rawHeight:o,rowWidth:s-n.q3*(e.childElementCount-1)})}(e,function(e){const t=i(e).map(c).reduce((([e,t],[r,n])=>[e+r,t+n]),[0,0]);return t}(e),t)}function o(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:()=>o});var n=r(51806),a=r(65235),s=r.n(a);function o({children:e,className:t}){return(0,n.createElement)("div",{className:s()("tiled-gallery__row",t)},e)}},70216:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(92819),s=r(3740),o=r(24639),i=r(75084),l=r(51309);function c({columns:e,renderedImages:t}){const r=Math.min(s.hI,e),c=t.length%r;return(0,n.createElement)(i.Z,null,[...c?[(0,a.take)(t,c)]:[],...(0,a.chunk)((0,a.drop)(t,c),r)].map(((e,t)=>(0,n.createElement)(l.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,n.createElement)(o.Z,{key:t},e)))))))}},10745:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(81518),s=r(3740),o=r(15078),i=r(21340);function l({attributes:e}){const{imageFilter:t,images:r}=e;if(!r.length)return null;const{align:l,className:c,columns:u=(0,o.F)(e),linkTo:p,roundedCorners:d,columnWidths:m}=e;return(0,n.createElement)(i.Z,{align:l,className:c,columns:u,imageFilter:t,images:r,isSave:!0,layoutStyle:(0,a.t)(s.P0,c),linkTo:p,roundedCorners:d,columnWidths:m})}},13369:(e,t,r)=>{"use strict";r.d(t,{v:()=>c,z:()=>u});var n=r(13419),a=r(11313),s=r(92819),o=r(69424),i=r(99621),l=r(3740);function c(e){return["circle","square"].includes(e)}function u(e,t={}){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:d}=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}()?p:o.Z;let g;if(c(m)&&d&&u){const e=Math.min(l.GP,d,u);g=h(r,{resize:`${e},${e}`})}else g=h(r);let f;if(c(m)){const e=Math.min(600,d,u),t=Math.min(l.GP,d,u);f=(0,s.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,d),t=Math.min(l.GP,d);f=(0,s.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 p(e,t={}){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()}},44814:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(51806),a=r(52175),s=r(55609),o=r(69307),i=r(65736),l=r(75365),c=r(39630);const __=i.__,u=({tockUrl:e,setEditedUrl:t,setUrl:r,cancel:a})=>{const i=(0,o.useRef)(!0),u=(0,o.useRef)(!1),p=e=>{r(),u.current=!0,e()};return(0,n.createElement)(s.ToolbarGroup,null,(0,n.createElement)(s.Dropdown,{popoverProps:{variant:"toolbar"},onClose:()=>u.current?u.current=!1:a(),placement:"bottom-start",renderToggle:({isOpen:t,onToggle:r})=>(!i.current||t||e||(i.current=!1,r()),(0,n.createElement)(s.ToolbarButton,{className:"components-toolbar__control",label:__("Edit Tock business name","jetpack"),onClick:()=>{r(),t&&a()}},__("Edit","jetpack"))),renderContent:({onClose:r})=>(0,n.createElement)(s.BaseControl,{className:"jetpack-tock-url-settings",help:(0,o.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)(s.TextControl,{placeholder:__("Add Tock business name","jetpack"),onChange:t,value:e,onKeyDownCapture:t=>((t,r)=>{const{keyCode:n}=t;n===c.ENTER&&""!==e&&(t.preventDefault(),p(r)),n===c.ESCAPE&&(t.preventDefault(),a(),r())})(t,r),className:"jetpack-tock-url-input"}),(0,n.createElement)("div",{className:"jetpack-tock-url-input-action"},(0,n.createElement)(s.Button,{type:"submit",label:__("Submit","jetpack"),icon:l.Z,className:"jetpack-tock-url-input-submit",onClick:()=>p(r)}))))}))},p=({url:e,popoverAnchor:t})=>{const r=`\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', '${e}');\n\t\t<\/script>\n\t`;return(0,n.createElement)("div",{ref:t},(0,n.createElement)(s.SandBox,{html:r,key:`tock-${e}`}),(0,n.createElement)("div",{className:"block-library-embed__interactive-overlay"}))};function d({attributes:e,setAttributes:t,isSelected:r}){const s=e.url??"",[i,l]=(0,o.useState)(s),c=(0,o.useCallback)((()=>{l(s)}),[s]);return(0,o.useEffect)((()=>{r||c()}),[r,c]),(0,n.createElement)("div",(0,a.useBlockProps)(),(0,n.createElement)(a.BlockControls,null,(0,n.createElement)(u,{tockUrl:i,setEditedUrl:l,setUrl:()=>{const e=i.replace(/.*exploretock.com\//,"");l(e),t({url:e})},cancel:c})),(0,n.createElement)(p,{url:s}))}},14035:(e,t,r)=>{"use strict";var n=r(51806),a=r(31985),s=r(27508),o=r(44814);(0,a.S)(s,{edit:o.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"})})},10723:(e,t,r)=>{"use strict";r.d(t,{H:()=>s,Z:()=>o});var n=r(51806),a=r(69307);const s=(0,a.createContext)(),o=({onFilesSelected:e,onMediaItemSelected:t,onUploadFinished:r,children:a})=>(0,n.createElement)(s.Provider,{value:{onFilesSelected:e,onMediaItemSelected:t,onUploadFinished:r},children:a})},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:()=>s});var n=r(51806),a=r(52175);function s({attributes:e}){const{caption:t,guid:r}=e;if(!r)return null;const s=`https://videopress.com/v/${r}`;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(t)&&(0,n.createElement)(a.RichText.Content,{tagName:"figcaption",value:t}))}},97504:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(30454),a=r(93512);const s={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:({videoPressClassNames:e,guid:t})=>t&&void 0===e,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:()=>o});var n=r(51806),a=r(52175),s=r(92490);function o(e){const{attributes:{autoplay:t,caption:r,controls:o,guid:i,loop:l,muted:c,poster:u,preload:p,videoPressClassNames:d}={}}=e;if(!i)return null;const m=(0,s.p)(i,{autoplay:t,controls:o,loop:l,muted:c,poster:u,preload:p});return(0,n.createElement)("figure",{className:d},(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,{autoplay:t,controls:r,loop:a,muted:s,poster:o,preload:i})=>{if(!e)return null;const l={...t&&{autoPlay:!0},...!r&&{controls:!1},...a&&{loop:!0},...s&&{muted:!0,persistVolume:!1},...o&&{posterUrl:o},..."none"!==i&&{preloadContent:i}};return(0,n.addQueryArgs)(`https://videopress.com/v/${e}`,l)}},93512:(e,t,r)=>{"use strict";r.d(t,{a:()=>l});var n=r(29512),a=r.n(n),s=r(73320),o=r.n(s);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,{className:t})=>(e[t]=!1,e)),{"wp-has-aspect-ratio":!1}),n=o()(e,{...r,"wp-block-embed":!1,"is-type-video":!1,"is-provider-videopress":!1}),s=new(a())(n);let l=o()(e,t);return s.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),s=r(65235),o=r.n(s),i=r(96931);function l(e){const{attributes:{autoplay:t,caption:r,controls:s,guid:l,loop:c,muted:u,playsinline:p,poster:d,preload:m,videoPressClassNames:h,className:g,align:f,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:k}={}}=e,y=a.useBlockProps.save({className:o()("wp-block-video",g,h,{[`align${f}`]:f})}),w=(0,i.p)(l,{autoplay:t,controls:s,loop:c,muted:u,playsinline:p,poster:d,preload:m,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:k});return(0,n.createElement)("figure",y,(0,n.createElement)("div",{className:"wp-block-embed__wrapper"},`\n${w}\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,{autoplay:t,controls:r,loop:a,muted:s,playsinline:o,poster:i,preload:l,seekbarColor:c,seekbarPlayedColor:u,seekbarLoadingColor:p})=>{if(!e)return null;const d={resizeToParent:!0,...t&&{autoPlay:!0},...!r&&{controls:!1},...a&&{loop:!0},...s&&{muted:!0,persistVolume:!1},...o&&{playsinline:!0},...i&&{posterUrl:i},..."none"!==l&&{preloadContent:l},...""!==c&&{sbc:c},...""!==u&&{sbpc:u},...""!==p&&{sblc:p}};return(0,n.addQueryArgs)(`https://videopress.com/v/${e}`,d)}},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),s=r(65235),o=r.n(s),i=r(67502);function l(e){const{attributes:{autoplay:t,caption:r,controls:s,guid:l,loop:c,muted:u,playsinline:p,poster:d,preload:m,videoPressClassNames:h,className:g,align:f,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:k,maxWidth:y}={}}=e,w=a.useBlockProps.save({className:o()("wp-block-video",g,h,{[`align${f}`]:f})}),E=(0,i.p)(l,{autoplay:t,controls:s,loop:c,muted:u,playsinline:p,poster:d,preload:m,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:k});let _={};return y&&y.length>0&&"100%"!==y&&(_={maxWidth:y,margin:"auto"}),(0,n.createElement)("figure",w,(0,n.createElement)("div",{className:"wp-block-embed__wrapper",style:_},`\n${E}\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,{autoplay:t,controls:r,loop:a,muted:s,playsinline:o,poster:i,preload:l,seekbarColor:c,seekbarPlayedColor:u,seekbarLoadingColor:p})=>{if(!e)return null;const d={resizeToParent:!0,cover:!0,...t&&{autoPlay:!0},...!r&&{controls:!1},...a&&{loop:!0},...s&&{muted:!0,persistVolume:!1},...o&&{playsinline:!0},...i&&{posterUrl:i},..."none"!==l&&{preloadContent:l},...""!==c&&{sbc:c},...""!==u&&{sbpc:u},...""!==p&&{sblc:p}};return(0,n.addQueryArgs)(`https://videopress.com/v/${e}`,d)}},30053:(e,t,r)=>{"use strict";r.d(t,{Z:()=>R});var n=r(82674),a=r.n(n),s=r(51806),o=r(86989),i=r.n(o),l=r(11313),c=r(52175),u=r(55609),p=r(94333),d=r(9818),m=r(69307),h=r(81975),g=r(65736),f=r(61074),b=r(65235),v=r.n(b),k=r(92819),y=r(99196),w=r(81427),E=r(10723),_=r(90879),C=r(31302),S=r(43774),x=r(75880),j=r(22081),L=r(32478),A=r(90953),P=r(77290);const __=g.__,_x=g._x,T=["image"],N=e=>{const t=(0,c.useBlockProps)({className:"resumable-upload"}),{onChangeTitle:r,title:n,filename:a,onSelectPoster:o,onRemovePoster:i,videoPosterImageData:l,fileForUpload:h,isUploadComplete:g,onDismissEditor:b,onSave:v,onVideoFrameSelected:k}=e,_=(0,d.useSelect)((e=>e("core/editor").isSavingPost()),[]),C=(0,p.usePrevious)(_);return(0,y.useEffect)((()=>{_&&!C&&v()}),[_,C,v]),(0,s.createElement)(E.Z,{onUploadFinished:e.uploadFinished},(0,s.createElement)(m.Fragment,null,e.blockSettings,(0,s.createElement)("div",t,(0,s.createElement)("div",{className:"uploader-block__logo"},(0,s.createElement)(f.Z,{icon:w.ll}),(0,s.createElement)("div",{className:"uploader-block__logo-text"},__("VideoPress","jetpack"))),(0,s.createElement)(L.$,{file:h,filename:a,title:n,onChangeTitle:r,onSelectPoster:o,onRemovePoster:i,videoPosterImageData:l,onVideoFrameSelected:k}),!g&&(0,s.createElement)(S.Z,{file:h}),g&&(0,s.createElement)("div",{className:"uploader-block__upload-complete"},(0,s.createElement)("span",null,__("Upload Complete!","jetpack")," 🎉"),(0,s.createElement)(u.Button,{variant:"primary",onClick:b},__("Done","jetpack"))))))},M=e=>{let{scripts:t}=e;const{html:r,interactive:n,caption:a,isSelected:o,hideOverlay:i,attributes:l,setAttributes:p}=e,{align:d,className:m,videoPressClassNames:h,maxWidth:g}=l,f=(0,c.useBlockProps)({className:v()("wp-block-video",m,h,{[`align${d}`]:d})});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,s.createElement)("figure",f,(0,s.createElement)("div",{className:"wp-block-embed__wrapper"},(0,s.createElement)(u.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%")}p({maxWidth:n})}},(0,s.createElement)(u.SandBox,{html:r,scripts:t,type:h}))),!n&&(0,s.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:i}),(!c.RichText.isEmpty(a)||o)&&(0,s.createElement)(c.RichText,{tagName:"figcaption",placeholder:__("Write caption…","jetpack"),value:a,onChange:e=>p({caption:e}),inlineToolbar:!0}))},R=(0,p.createHigherOrderComponent)((0,p.compose)([(0,d.withSelect)(((e,t)=>{const{autoplay:r,controls:n,fileForImmediateUpload:a,guid:s,loop:o,muted:i,playsinline:c,poster:u,preload:p,seekbarColor:d,seekbarLoadingColor:m,seekbarPlayedColor:h,src:g,useAverageColor:f}=t.attributes,{getEmbedPreview:b,isRequestingEmbedPreview:v}=e("core"),k=(0,A.p)(s,{autoplay:r,controls:n,loop:o,muted:i,playsinline:c,poster:u,preload:p,seekbarColor:d,seekbarLoadingColor:m,seekbarPlayedColor:h,useAverageColor:f}),y=!!k&&b(k),w=!!k&&v(k),E=!!window.videoPressResumableEnabled;return{fileForImmediateUpload:a,isFetchingPreview:w,isUploading:!E&&(0,l.isBlobURL)(g),preview:y,resumableUploadEnabled:E,url:k}})),(0,d.withDispatch)((e=>({invalidateCachedEmbedPreview:t=>{e("core/data").invalidateResolution("core","getEmbedPreview",[t])}}))),p.withInstanceId,e=>class extends m.Component{constructor(e){super(...arguments),this.state={media:null,isFetchingMedia:!1,fallback:!1,interactive:!1,rating:null,lastRequestedMediaId:null,isUpdatingRating:!1,allowDownload:null,privacySetting:_.v.SITE_DEFAULT,isUpdatingAllowDownload:!1,fileForUpload:e.fileForImmediateUpload,isUpdatingIsPrivate:!1,isEditingWhileUploading:!1,isUploadComplete:!1,lastPosterValueSource:""},this.posterImageButton=(0,m.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}hideOverlay=()=>{this.setState({interactive:!0})};async componentDidMount(){const{guid:e}=this.props.attributes;e?this.setTracks(e):await this.setGuid(),this.setRatingAndAllowDownload()}setRatingAndAllowDownload=async()=>{const e=(0,k.get)(this.props,"attributes.id"),t=await this.requestMedia(e);let r=(0,k.get)(t,"jetpack_videopress.rating");const n=(0,k.get)(t,"jetpack_videopress.allow_download"),a=(0,k.get)(t,"jetpack_videopress.privacy_setting",_.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})};async componentDidUpdate(e){const{attributes:t,invalidateCachedEmbedPreview:r,preview:n,setAttributes:a,url:s,isFetchingPreview:o}=this.props;t.id!==e.attributes.id&&(await this.setGuid(),this.setRatingAndAllowDownload());let i=!1;if(s&&s!==e.url&&(r(s),i=!0),n){const e=(0,P.f6)(n.html,v()("wp-block-embed","is-type-video","is-provider-videopress"),!1);this.previewFailuresCount=0,a({videoPressClassNames:e})}else o||i||!this.props.attributes.guid||this.schedulePreviewCacheReload()}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))};fallbackToCore=()=>{this.props.setAttributes({guid:void 0}),this.setState({fallback:!0})};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,k.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})};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 i()({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)};setTracks=e=>{const{setAttributes:t}=this.props;e&&i()({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})}))};switchToEditing=()=>{this.props.setAttributes({id:void 0,guid:void 0,src:void 0})};onSelectPoster=e=>{const{setAttributes:t}=this.props;t({poster:e.url}),this.setState({videoPosterImageData:e})};onRemovePoster=()=>{const{setAttributes:e}=this.props;e({poster:""}),this.setState({videoPosterImageData:null}),this.posterImageButton.current.focus()};toggleAttribute=e=>t=>{this.props.setAttributes({[e]:t})};getAutoplayHelp=e=>e?__("Note: Autoplaying videos may cause usability issues for some visitors.","jetpack"):null;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}getPrivacySettingHelp=e=>{const t=parseInt(e,10);return _.v.PRIVATE===t?__("Restrict views to members of this site","jetpack"):_.v.PUBLIC===t?__("Video can be viewed by anyone","jetpack"):__("Follow the site privacy setting","jetpack")};renderControlLabelWithTooltip(e,t){return(0,s.createElement)(u.Tooltip,{text:t,position:"top"},(0,s.createElement)("span",null,e))}onChangeRating=e=>{const t=this.state.rating;"X-18"===e&&(e="R-17"),-1!==(0,k.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})))};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})))};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})))};updateMetaApiCall=(e,t,r,n)=>{const{invalidateCachedEmbedPreview:a,url:s}=this.props,{id:o}=this.props.attributes;if(!o)return;t();const l={id:o};Object.assign(l,e),i()({path:"/wpcom/v2/videopress/meta",method:"POST",data:l}).then((e=>{status in e&&200!==e.status&&r()})).catch((()=>r())).finally((()=>{n(),a(s)}))};render(){const{attributes:t,instanceId:r,isFetchingPreview:n,isUploading:o,preview:l,resumableUploadEnabled:p,setAttributes:d}=this.props,{fallback:f,fileForUpload:b,isFetchingMedia:v,isUpdatingRating:k,interactive:y,rating:w,allowDownload:S,privacySetting:L,isUpdatingAllowDownload:A,isUpdatingPrivacySetting:R,videoPosterImageData:I}=this.state,{autoplay:Z,caption:D,controls:B,guid:O,loop:F,muted:U,playsinline:z,poster:q,preload:$,useAverageColor:H,videoPressTracks:V,isVideoPressExample:G,src:W}=t;if(G&&W)return(0,s.createElement)("img",{src:W,alt:D});const J=`video-block__poster-image-description-${r}`,K=!(!q&&!I),Y=(0,s.createElement)(m.Fragment,null,(0,s.createElement)(c.BlockControls,{group:"block"},(0,s.createElement)(j.Z,{tracks:V,onChange:e=>{d({videoPressTracks:e})},guid:O})),(0,s.createElement)(c.BlockControls,null,(0,s.createElement)(u.ToolbarGroup,null,(0,s.createElement)(u.ToolbarButton,{className:"components-icon-button components-toolbar__control",text:__("Replace","jetpack"),onClick:this.switchToEditing}))),(0,s.createElement)(c.InspectorControls,null,(0,s.createElement)(u.PanelBody,{title:__("Video Settings","jetpack")},(0,s.createElement)(u.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,s.createElement)(u.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:F}),(0,s.createElement)(u.ToggleControl,{label:__("Muted","jetpack"),onChange:this.toggleAttribute("muted"),checked:U}),(0,s.createElement)(u.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:B}),(0,s.createElement)(u.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:z}),(0,s.createElement)(u.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:$??"",onChange:e=>d({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,s.createElement)(c.MediaUploadCheck,null,(0,s.createElement)(u.BaseControl,{className:"editor-video-poster-control",label:__("Poster Image","jetpack")},(0,s.createElement)(c.MediaUpload,{title:__("Select Poster Image","jetpack"),onSelect:this.onSelectPoster,allowedTypes:T,render:({open:e})=>(0,s.createElement)(u.Button,{variant:"secondary",onClick:e,ref:this.posterImageButton,"aria-describedby":J},K?__("Replace image","jetpack",0):__("Select Poster Image","jetpack"))}),(0,s.createElement)("p",{id:J,hidden:!0},K?(0,g.sprintf)(/* translators: Placeholder is an image URL. */
__("The current poster image url is %s","jetpack"),q??I):__("There is no poster image currently selected","jetpack")),K&&(0,s.createElement)(u.Button,{onClick:this.onRemovePoster,variant:"link",isDestructive:!0},__("Remove Poster Image","jetpack")))),(0,m.createInterpolateElement)(__("Send us your <a>VideoPress feedback</a>","jetpack"),{a:(0,s.createElement)(u.ExternalLink,{href:"https://automattic.survey.fm/videopress-feedback"})})),(0,s.createElement)(x.Z,{attributes:t,setAttributes:d,useAverageColor:H,toggleAttribute:this.toggleAttribute}),(0,s.createElement)(u.PanelBody,{title:__("Video File Settings","jetpack")},(0,s.createElement)(u.SelectControl,{label:_x("Rating","The age rating for this video.","jetpack"),value:w??"",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,s.createElement)(u.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:S,disabled:v||A}),(0,s.createElement)(u.SelectControl,{label:__("Video Privacy","jetpack"),help:this.getPrivacySettingHelp(L),onChange:this.onChangePrivacySetting,value:L??"",options:[{value:_.v.SITE_DEFAULT,label:_x("Site Default","VideoPress privacy setting","jetpack")},{value:_.v.PUBLIC,label:_x("Public","VideoPress privacy setting","jetpack")},{value:_.v.PRIVATE,label:_x("Private","VideoPress privacy setting","jetpack")}],disabled:v||R})))),Q=e=>{this.setState({fileForUpload:e[0]})},X=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})):d({src:void 0,id:void 0,poster:void 0})},ee=()=>"videoPressUploadPoster"in window,te=(0,h.escapeHTML)(b?(0,P.K8)(b.name):""),re=({mediaId:e,guid:t,src:r})=>{this.setState({title:this.state.title??te,fileForUpload:null,isUploadComplete:!!e,isEditingWhileUploading:!!e&&this.state.isEditingWhileUploading}),e&&t&&r&&d({id:e,guid:t,src:r})},ne=e=>{this.setState({title:e})},ae=e=>{this.setState({videoFrameSelectedInMillis:e,videoPosterImageData:null})},se=()=>{const e=this.state.title;this.updateMetaApiCall({title:e},(()=>this.setState({isUpdatingTitle:!0,title:e})),(()=>this.setState({title:e})),(()=>this.setState({isUpdatingTitle:!1})))},oe=()=>pe({at_time:this.state.videoFrameSelectedInMillis,is_millisec:!0}),ie=()=>pe({poster_attachment_id:this.state.videoPosterImageData.id}),le=e=>{e.generating?ce():ue(e.poster)},ce=()=>{setTimeout((()=>{(ee()?window.videoPressGetPoster(O):i()({path:`/videos/${O}/poster`,apiNamespace:"rest/v1.1",global:!0,method:"GET"})).then((e=>le(e)))}),2e3)},ue=e=>{e&&d({poster:e})},pe=e=>{if(ee())return window.videoPressUploadPoster(O,e).then((e=>le(e)));i()({path:`/videos/${O}/poster`,apiNamespace:"rest/v1.1",method:"POST",global:!0,data:e}).catch((e=>e))},de=()=>{const{title:e,videoFrameSelectedInMillis:t}=this.state;e&&se(),I?ie():null!=t&&oe()},me=()=>{this.setState({isEditingWhileUploading:!1}),de()};if(null!=b&&b.name||this.state.isEditingWhileUploading){const e=this.state.title??te;return(0,s.createElement)(N,{fileForUpload:b,filename:te,uploadFinished:re,blockSettings:Y,onDismissEditor:me,isUploadComplete:this.state.isUploadComplete,onSelectPoster:this.onSelectPoster,onRemovePoster:this.onRemovePoster,onChangeTitle:ne,title:e,videoPosterImageData:this.state.videoPosterImageData,onVideoFrameSelected:ae,onSave:de})}const he=v||n,ge=f||o||!O,fe=ge&&!o&&!he,be=(0,s.createElement)(m.Fragment,null,(0,s.createElement)("div",{className:o||he?"":"videopress-block-hide"},(0,s.createElement)(C.Z,{text:o?__("Uploading…","jetpack"):__("Generating preview…","jetpack",0)})),(0,s.createElement)("div",{className:fe?"":"videopress-block-hide"},(0,s.createElement)(e,this.props)));if(ge)return p?(0,s.createElement)(E.Z,{onFilesSelected:Q,onMediaItemSelected:X},be):(0,s.createElement)(m.Fragment,null,be);const{html:ve,scripts:ke}=l||{html:null,scripts:null},ye=he||!l;return(0,s.createElement)(m.Fragment,null,Y,ye&&(0,s.createElement)(C.Z,{text:__("Generating preview…","jetpack")}),!ye&&(0,s.createElement)(M,a()({},this.props,{hideOverlay:this.hideOverlay,html:ve,scripts:ke,interactive:y,caption:D})))}}]),"withVideoPressEdit")},37549:(e,t,r)=>{"use strict";var n=r(82674),a=r.n(n),s=r(51806),o=r(6975),i=r(13419),l=r(11313),c=r(52175),u=r(65391),p=r(4981),d=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),w=r(29899),E=r(97504),_=r(34284),C=r(58351),S=r(30053),x=r(23096),j=r(77290),L=r(23062),A=r(84676),P=r(41194);const __=v.__,T=(0,m.createHigherOrderComponent)((e=>t=>{const{name:r}=(0,c.useBlockEditContext)();return"core/video"!==r?(0,s.createElement)(e,t):(0,s.createElement)(e,a()({},t,{disableDropZone:!0,className:"no-videopress-media-placeholder"}),(0,s.createElement)(d.Button,{disabled:!0,className:"components-button no-videopress-disabled-button",variant:"secondary"},__("Media Library","jetpack")),(0,s.createElement)(d.Button,{disabled:!0,className:"components-button no-videopress-disabled-button",variant:"secondary"},__("Upload","jetpack")))}),"videoPressNoPlanMediaPlaceholder"),N=(0,m.createHigherOrderComponent)((e=>t=>{const{name:r}=(0,c.useBlockEditContext)();if("core/video"!==r)return(0,s.createElement)(e,t);const{onFilesSelected:n,onMediaItemSelected:o}=(0,f.useContext)(y.H),i={...t,handleUpload:!1,disableDropZone:!0,onSelect:e=>{void 0!==e.length?n(e):o(e)}};return(0,s.createElement)(e,a()({},i,{className:"videopress-media-placeholder"}))}),"videoPressMediaPlaceholder"),M=(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:s,transforms:o}=e,{available:c,unavailableReason:u}=(0,i.OZ)("videopress"),d=((0,i.Wp)()||(0,i.Ug)())&&["missing_plan","unknown"].includes(u),m=!!window.videoPressResumableEnabled;if(d?((0,b.addFilter)("editor.MediaPlaceholder","jetpack/videopress",T),(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",N),e.description=__("Embed a video from your media library or upload a new one with VideoPress.","jetpack"),e.example.attributes={caption:"",isVideoPressExample:!0,src:P}),(0,b.addFilter)("blocks.getSaveContent.extraProps","jetpack/videopress",M,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:{...o,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,p.createBlock)("core/video",{fileForImmediateUpload:e});r.push(t)}else{const n=(0,p.createBlock)("core/video",{src:(0,l.createBlobURL)(e)});(0,g.mediaUpload)({filesList:[e],onFileChange:([{id:e,url:r}])=>{t(n.clientId,{id:e,src:r})},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,p.createBlock)("core/embed",{url:"https://videopress.com/v/"+t[1].trim()})}}]},supports:{...s,reusable:!1},edit:(0,S.Z)(n),save:(0,x.Z)(a),deprecated:[...r||[],C.Z,_.Z,{attributes:t,isEligible:e=>!e.guid,save:a,supports:s,isDeprecation:!0},E.Z,w.Z]}}return e}),5),(0,b.addFilter)("blocks.registerBlockType","videopress/add-wp-chapters-support",A.Z),(0,b.addFilter)("blocks.registerBlockType","videopress/add-v6-transform-support",L.Z),(0,b.addFilter)("blocks.registerBlockType","videopress/add-core-video-transform",(function(e,t){if("videopress/video"!==t)return e;const r=(0,p.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,j.Zx)(t);return r||n},transform:e=>{const t=(0,h.select)(g.store).getCurrentPostId();return o.Z?.tracks?.recordEvent("jetpack_editor_videopress_block_manual_transform_click",{post_id:t}),(0,p.createBlock)("videopress/video",e)}}],to:[...e.transforms?.to||[],{type:"block",blocks:["core/video"],transform:e=>(0,p.createBlock)("core/video",e)}]}}:e}));const R=(0,m.createHigherOrderComponent)((e=>t=>{const{block:r}=t,{name:n,attributes:a,clientId:o,__unstableBlockSource:l}=r,{replaceBlock:u}=(0,h.useDispatch)(c.store),{url:d,guid:m,providerNameSlug:g}=a,{available:b}=((0,j.Kp)(a),(0,p.getBlockType)("videopress/video"),(0,i.OZ)("videopress/video")),v="core/embed"===n,k=(0,j.Zx)(d),y=v&&k?k:m;(0,i.Wp)();return(0,f.useEffect)((()=>{}),[o,false,a,l,u,y]),(0,s.createElement)(e,t)}),"convertVideoBlockToVideoPressVideoBlock");function I({BlockListBlock:e,...t}){const{block:r}=t,{name:n,attributes:a,clientId:o}=r,{replaceBlock:i}=(0,h.useDispatch)(c.store);return(0,f.useEffect)((()=>{try{const e=(0,u.parse)(a.originalContent),t=e?.[0];if(!t)return;const{attrs:r}=t;i(o,(0,p.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,o,a,i]),(0,s.createElement)(e,t)}(0,b.addFilter)("editor.BlockListBlock","videopress/jetpack-convert-to-videopress-video-block",R);const Z=(0,m.createHigherOrderComponent)((e=>t=>{const{block:r}=t,{name:n,attributes:o}=r;return"core/missing"!==n||"videopress/video"!==o?.originalName?(0,s.createElement)(e,t):(0,s.createElement)(I,a()({},t,{BlockListBlock:e}))}),"convertV6toV5");(0,b.addFilter)("editor.BlockListBlock","videopress/jetpack-convert-from-v6-to-v5",Z)},31302:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(55609);const s=({text:e})=>(0,n.createElement)("div",{className:"wp-block-embed is-loading"},(0,n.createElement)(a.Spinner,null),(0,n.createElement)("p",null,e))},43774:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(51806),a=r(55609),s=r(69307),o=r(65736),i=r(90861),l=r.n(i),c=r(10723),u=r(5482);const __=o.__;function p({file:e}){const[t,r]=(0,s.useState)(0),[i,p]=(0,s.useState)(!1),[d,m]=(0,s.useState)(null),[h,g]=(0,s.useState)(null),[f,b]=(0,s.useState)(null),{onUploadFinished:v}=(0,s.useContext)(c.H),k=(0,s.useRef)(null);k.current=d;const y=(0,s.useCallback)((()=>{const t=(0,u.J)({onError:e=>{g(e)},onProgress:(e,t)=>{r(e/t*100)},onSuccess:e=>{v(e)},onUploadUuidRetrieved:e=>{null===f&&b(e)}});(0,u.v)().then((r=>{const n=t(e,r);m(n)})).catch((e=>{g(e)}))}),[e,v,f]);(0,s.useEffect)((()=>(y(),()=>{null!==k.current&&k.current.abort()})),[]);const w=Math.round(t),E={width:`${w}%`},_=l()(e.size);return(0,n.createElement)(n.Fragment,null,null!==h?(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 h){const t=h.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:()=>(g(null),void y())},__("Try again","jetpack")),(0,n.createElement)(a.Button,{variant:"secondary",onClick:()=>v({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:E})),(0,n.createElement)("div",{className:"resumable-upload__file-info"},(0,n.createElement)("div",null,i?(0,o.sprintf)(/* translators: Placeholder is an upload progress percenatage number, from 0-100. */
__("Paused (%s%%)","jetpack"),w):(0,o.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"},_)),(0,n.createElement)("div",{className:"resumable-upload__actions"},(0,n.createElement)(a.Button,{variant:"link",onClick:()=>{d&&(i?d.start():d.abort(),p(!i))}},i?"Resume":"Pause"))))}},5482:(e,t,r)=>{"use strict";r.d(t,{J:()=>o,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)}))}))},s={},o=({onUploadUuidRetrieved:e,onError:t,onProgress:r,onSuccess:o})=>(i,l)=>{const c=new n.gq(i,{onError:t,onProgress:r,endpoint:l.url,removeFingerprintOnSuccess:!0,withCredentials:!1,autoRetry:!0,overridePatchMethod:!1,chunkSize:1e7,allowedFileTypes:["video/*"],metadata:{filename:i.name,filetype:i.type},retryDelays:[0,1e3,3e3,5e3,1e4],onAfterResponse:function(t,r){if(r.getStatus()>=400)return;const n=r.getHeader("x-videopress-upload-guid"),a=r.getHeader("x-videopress-upload-media-id"),i=r.getHeader("x-videopress-upload-src-url");if(n&&a&&i)return void(o&&o({mediaId:Number(a),guid:n,src:i}));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&&(s[c.key]=c.token),c.key&&e(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(s[n])e.setHeader("x-videopress-upload-token",s[n]);else if("HEAD"===t)return a(n).then((t=>(s[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),s=r(94333),o=r(65235),i=r.n(o),l=r(90953);const c=(0,s.createHigherOrderComponent)((e=>t=>{const{attributes:{autoplay:r,caption:s,controls:o,guid:c,loop:u,muted:p,playsinline:d,poster:m,preload:h,videoPressClassNames:g,className:f,align:b,seekbarColor:v,seekbarPlayedColor:k,seekbarLoadingColor:y,useAverageColor:w,maxWidth:E}={}}=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:o,loop:u,muted:p,playsinline:d,poster:m,preload:h,seekbarColor:v,seekbarPlayedColor:k,seekbarLoadingColor:y,useAverageColor:w});let S={};return E&&E.length>0&&"100%"!==E&&(S={maxWidth:E,margin:"auto"}),(0,n.createElement)("figure",_,(0,n.createElement)("div",{className:"wp-block-embed__wrapper",style:S},`\n${C}\n`),!a.RichText.isEmpty(s)&&(0,n.createElement)(a.RichText.Content,{tagName:"figcaption",value:s}))}),"withVideoPressSave")},75880:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(52175),s=r(55609),o=r(69307),i=r(65736);r(99196);const __=i.__;class l extends o.Component{constructor(){super(...arguments);const{seekbarColor:e,seekbarPlayedColor:t,seekbarLoadingColor:r}=this.props.attributes;this.state={seekbarColor:e,seekbarPlayedColor:t,seekbarLoadingColor:r}}handleChangeSeekbarColor=e=>{this.setState({seekbarColor:e})};handleChangeSeekbarLoadingColor=e=>{this.setState({seekbarLoadingColor:e})};handleChangeSeekbarPlayedColor=e=>{this.setState({seekbarPlayedColor:e})};saveColors=()=>{const{seekbarColor:e,seekbarLoadingColor:t,seekbarPlayedColor:r}=this.state,{setAttributes:n}=this.props;n({seekbarColor:e,seekbarLoadingColor:t,seekbarPlayedColor:r})};render(){const{seekbarColor:e,seekbarPlayedColor:t,seekbarLoadingColor:r}=this.state,{toggleAttribute:o,useAverageColor:i}=this.props,l=!0;return(0,n.createElement)(s.PanelBody,{className:"seekbar-color-settings__panel",title:__("Progress Bar Colors","jetpack"),initialOpen:!1},(0,n.createElement)(s.ToggleControl,{label:__("Match video","jetpack"),help:__("Colors adapt to the video as it plays","jetpack"),onChange:o("useAverageColor"),checked:i}),(0,n.createElement)(a.PanelColorSettings,{opened:!i,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,n.createElement)(s.Button,{variant:"secondary",onClick:this.saveColors},__("Save colors","jetpack"))))}}const c=l},22081:(e,t,r)=>{"use strict";r.d(t,{Z:()=>w,n:()=>b});var n=r(51806),a=r(86989),s=r.n(a),o=r(52175),i=r(55609),l=r(9818),c=r(69307),u=r(65736),p=r(47659);const __=u.__,d="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 s()(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 s()(r)};function k({tracks:e,onChange:t,guid:r}){const[a=-1,s]=(0,c.useState)();let o;return o=0===e.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")):e.map(((o,l)=>(0,n.createElement)("div",{key:l,className:"videopress-block-tracks-editor__track-list-track"},(0,n.createElement)("span",null,o.label),(0,n.createElement)("div",{className:"videopress-block-tracks-editor__track-list-track-delete"},(0,n.createElement)(i.Button,{variant:"link",isDestructive:!0,onClick:()=>{(n=>{const a=e[n];s(n),v(a,r).finally((()=>{t(e.filter(((e,t)=>t!==n))),s(-1)}))})(l)},"aria-label":(0,u.sprintf)(/* translators: %s: Label of the video text track e.g: "French subtitles" */
__("Delete %s","jetpack"),o.label),disabled:a===l},a===l?__("Deleting","jetpack"):__("Delete","jetpack",0)))))),(0,n.createElement)(i.MenuGroup,{label:__("Text tracks","jetpack"),className:"videopress-block-tracks-editor__track-list"},o)}function y({track:e,guid:t,onChange:r,onClose:a,onCancel:s,trackExists:p}){const[g,f]=(0,c.useState)(),[v=!1,k]=(0,c.useState)(),{label:y="",srcLang:w="",kind:E=d}=e,_=e.tmpFile?e.tmpFile.name:"";if(!(0,l.useSelect)((e=>e(o.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"),":"),""!==_&&(0,n.createElement)("span",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-label-name"},(0,n.createElement)("strong",null,_)),(0,n.createElement)(o.MediaUploadCheck,null,(0,n.createElement)(i.FormFileUpload,{onChange:t=>{const n=t.target.files;!n.length>0||(e.tmpFile=n[0],r(e))},accept:m,render:({openFileDialog:e})=>(0,n.createElement)(i.Button,{variant:"link",onClick:()=>{e()}},""===_?__("Select track","jetpack"):__("Change track","jetpack",0)),disabled:v}))),(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." */ /* 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:t=>r({...e,label:t}),label:__("Label","jetpack"),value:y,help:__("Title of track","jetpack"),disabled:v}),(0,n.createElement)(i.TextControl,{onChange:t=>r({...e,srcLang:t}),label:__("Source language","jetpack"),value:w,help:__("Language tag (en, fr, etc.)","jetpack"),disabled:v})),(0,n.createElement)(i.SelectControl,{className:"videopress-block-tracks-editor__single-track-editor-kind-select",options:h,value:E,label:/* translators: %s: The kind of video text track e.g: "Subtitles, Captions" */
__("Kind","jetpack"),onChange:t=>{r({...e,kind:t})},disabled:v}),(0,n.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-buttons-container"},v?(0,n.createElement)(i.Spinner,null):(0,n.createElement)(i.Button,{variant:"secondary",disabled:!e.tmpFile,onClick:()=>{f(null),""===y&&(e.label=__("English","jetpack")),""===w&&(e.srcLang="en"),void 0===e.kind&&(e.kind=d),p(e)?f(__("A track already exists for that language and kind.","jetpack")):(k(!0),b(e,t).then((()=>{r(e),f(null),a()})).catch((e=>{e.message&&f(e.message)})).finally((()=>{k(!1)})))}},__("Save","jetpack")),(0,n.createElement)(i.Button,{variant:"link",onClick:s},__("Close","jetpack"))),g&&(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." */ /* translators: %s: An error message returned after a failed video track file upload." */
(0,u.sprintf)(__("Error: %s","jetpack"),g))))}function w({tracks:e=[],onChange:t,guid:r}){const[a,s]=(0,c.useState)(null);return(0,n.createElement)(i.Dropdown,{contentClassName:"videopress-block-tracks-editor",renderToggle:({isOpen:e,onToggle:t})=>(0,n.createElement)(i.ToolbarButton,{label:__("Text tracks","jetpack"),showTooltip:!0,"aria-expanded":e,"aria-haspopup":"true",onClick:t,icon:g}),renderContent:()=>null!==a?(0,n.createElement)(y,{track:e[a],guid:r,onChange:r=>{const n=[...e];n[a]=r,t(n)},onClose:()=>s(null),onCancel:()=>{t(e.filter(((e,t)=>t!==a))),s(null)},trackExists:t=>-1!==e.filter(((e,t)=>t!==a)).findIndex((e=>e.kind===t.kind&&e.srcLang===t.srcLang))}):(0,n.createElement)(n.Fragment,null,(0,n.createElement)(i.NavigableMenu,null,(0,n.createElement)(k,{tracks:e,onChange:t,guid:r}),(0,n.createElement)(i.MenuGroup,{className:"videopress-block-tracks-editor__add-tracks-container",label:__("Add tracks","jetpack")},(0,n.createElement)(i.MenuItem,{icon:p.Z,onClick:()=>{(()=>{const r=e.length,n=[...e];n[r]||(n[r]={}),n[r]={...e[r]},t(n),s(r)})()}},__("Upload track","jetpack")))))})}},32478:(e,t,r)=>{"use strict";r.d(t,{$:()=>g});var n=r(51806),a=r(52175),s=r(55609),o=r(69307),i=r(65736),l=r(61074),c=r(65235),u=r.n(c),p=r(81427);const __=i.__,d=["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:p.o1})):(0,n.createElement)("span",null,"No Poster Selected"))},h=e=>{const{onSelectPoster:t,onRemovePoster:r}=e;return(0,n.createElement)(s.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:d,render:({open:e})=>(0,n.createElement)("div",{className:"poster-selector__buttons"},(0,n.createElement)(s.Button,{onClick:r,variant:"link",isDestructive:!0},__("Remove Poster Image","jetpack")),(0,n.createElement)(s.Button,{variant:"secondary",onClick:e},__("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,o.useState)(0),[v,k]=(0,o.useState)(!0),y=(0,o.useRef)(null),w=(0,o.useRef)(null),E=()=>{k(!1)};(0,o.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)(s.TextControl,{label:__("Video title","jetpack"),className:"uploading-editor__title",onChange:m,value:u}),(0,n.createElement)("div",{className:"uploading-editor__content"},(0,n.createElement)(s.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:E,onLoadedMetadata:e=>{e.target.videoHeight||E()},style:_})),!c&&(0,n.createElement)(l.Z,{className:"uploading-editor__play-icon",icon:p.o1})),(0,n.createElement)("span",{style:_},(0,n.createElement)(s.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,o.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:d,render:({open:e})=>(0,n.createElement)("a",{className:"uploading-editor__upload-link",onClick:e,onKeyDown:e,ref:w,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,{autoplay:t,controls:r,loop:a,muted:s,playsinline:o,poster:i,preload:l,seekbarColor:c,seekbarPlayedColor:u,seekbarLoadingColor:p,useAverageColor:d})=>{if(!e)return null;const m={resizeToParent:!0,cover:!0,...t&&{autoPlay:!0},...!r&&{controls:!1},...a&&{loop:!0},...s&&{muted:!0,persistVolume:!1},...o&&{playsinline:!0},...i&&{posterUrl:i},...""!==l&&{preloadContent:l},...""!==c&&{sbc:c},...""!==u&&{sbpc:u},...""!==p&&{sblc:p},...d&&{useAverageColor:!0}};return(0,n.addQueryArgs)(`https://videopress.com/v/${e}`,m)}},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),s=r(90879);const o=e=>{const t=s.s.reduce(((e,{className:t})=>(e[t]=!1,e)),{"wp-has-aspect-ratio":!1});return a()(e,t)};function i(e,t="",r=!0){if(!r)return o(t);const n=document.implementation.createHTMLDocument("");n.body.innerHTML=e;const i=n.body.querySelector("iframe");if(i&&i.height&&i.width){const e=(i.width/i.height).toFixed(2);for(let r=0;r<s.s.length;r++){const n=s.s[r];if(e>=n.ratio)return a()(o(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),s=r(52175),o=r(4981),i=r(55609),l=r(9818),c=r(12238),u=r(65736),p=(r(99196),r(77290)),d=r(5743);const __=u.__,m={instances:[]},h=(e=[],t=!1,r=0)=>{if(t&&(m.instances=[]),e.forEach((e=>{if(e.innerBlocks.length)return void h(e.innerBlocks,!1,r+1);const{clientId:t,name:n,attributes:a}=e;"core/video"===n&&(0,p.Kp)(a)&&m.instances.push({clientId:t,name:n,attributes:a})})),0===r)return m.instances};function g({clientId:e,attributes:t}){const r=(0,l.useSelect)((e=>e(c.store).getCurrentPostId())),{getBlocks:u}=(0,l.useSelect)(s.store),{replaceBlock:m}=(0,l.useDispatch)(s.store),{tracks:g}=(0,a.z$)();return(0,n.createElement)("div",{className:d.Z.wrapper},(0,n.createElement)(i.Notice,{status:"info",isDismissible:!1,className:d.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 n=h(u(),!0);n?.length&&(n.find((t=>t.clientId===e))||n.push({clientId:e,name:"core/video",currentBlockAttributes:t}),n.forEach((e=>{const{clientId:t,name:n,attributes:a}=e;"core/video"===n&&(0,p.Kp)(a)&&(m(t,(0,o.createBlock)("videopress/video",a)),g.recordEvent("jetpack_editor_videopress_block_manual_conversion_click",{post_id:r}))})))}},__("Transform blocks to VideoPress","jetpack")))}},68938:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(52175),s=r(94333),o=r(77290),i=r(65192);const l=(0,s.createHigherOrderComponent)((e=>t=>(0,o.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:()=>o});var n=r(13419),a=r(68938);const s="videopress/video";function o(e,t){if("core/video"!==t)return e;const{available:r}=(0,n.OZ)(s);return r?{...e,edit:(0,a.Z)(e.edit)}:e}},73859:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(51806),a=r(55609),s=r(65736),o=r(78680),i=r(75255);const __=s.__,l="videopress/video-chapters",c=!!window?.Jetpack_Editor_Initial_State?.available_blocks[l],u=31;function p({isRequestingVideoItem:e}){const{attributes:t,setAttributes:r}=(0,i.Z)(),{title:s,description:p}=t,d=(0,o.L)(l),m=p?.length?p.split("\n").map((e=>Math.ceil(e.length/u)||1)).reduce(((e,t)=>e+t),0):4,h=Math.min(12,Math.max(m,4));if(!c)return null;return(0,n.createElement)(a.PanelBody,{title:__("Details","jetpack"),className:d?"is-beta":""},(0,n.createElement)(a.TextControl,{label:__("Title","jetpack"),value:s,placeholder:__("Video title","jetpack"),onChange:e=>{r({title:e})},disabled:e}),(0,n.createElement)(a.TextareaControl,{label:__("Description","jetpack"),value:p,placeholder:__("Video description","jetpack"),onChange:e=>{r({description:e})},disabled:e,rows:h}))}},24288:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(51806),a=r(52175),s=r(94333),o=r(69307),i=r(73859),l=r(67203),c=r(49664),u=r(84676);const p=(0,s.createHigherOrderComponent)((e=>t=>{const{attributes:r,setAttributes:s}=t,[p,d]=(0,l.Z)(r?.id),[m]=(0,c.v)(r);return(0,o.useEffect)((()=>{if(!p)return;const e={};p?.title&&(e.title=p.title),p?.description&&(e.description=p.description),Object.keys(e).length&&(s(e),m(e))}),[p,s,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:d})),(0,n.createElement)(e,t)):(0,n.createElement)(e,t)}))},75255:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(52175),a=r(9818);function s(){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),s=r(94333),o=r(37798),i=r(9818),l=r(12238),c=r(69307),u=r(65736),p=r(22081),d=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,s.usePrevious)(g),b=(0,i.useDispatch)(o.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 w=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(w(a).then((()=>y({title:r,description:n}))),!a?.description?.length)return;const s=(0,m.ZP)(a.description);if(!s?.length)return;const o={label:__("English","jetpack"),srcLang:"en",kind:"chapters",tmpFile:(0,h.ZP)(a.description)};(0,p.n)(o,u).then((()=>{const t=(0,d.p)(u,e);b("getEmbedPreview",[t])}))}),[g,f,r,v?.title,v?.description,n,w,y,e,b,t,u]),[y]}},67203:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(86989),a=r.n(n),s=r(69307);function o(e){const[t,r]=(0,s.useState)({}),[n,o]=(0,s.useState)(!1);return(0,s.useEffect)((()=>{e&&(o(!0),async function(){try{const t=await a()({path:`/wp/v2/media/${e}`});r(t?.jetpack_videopress||{}),o(!1)}catch(e){throw o(!1),new Error(e)}}())}),[e]),[t,n]}},84676:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s,d:()=>a});var n=r(24288);const a=!!window?.Jetpack_Editor_Initial_State?.available_blocks["videopress/video-chapters"];function s(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),s=(a<(e.length-r.length)/2?e.substring(a+r.length,e.length):e.substring(0,a)).trim().replace(/(\s-$)|(^-\s)/,""),o=n.split(":");return 1===o[0].length&&(o[0]=`0${o[0]}`),2===o.length&&o.unshift("00"),{startAt:o.join(":"),title:s}}(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:()=>s});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 s(e,t){const r=function(e,t=359999e3){const r=(0,n.Tn)(e);if(0===r.length)return null;let s="WEBVTT\n",o=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);s+=`\n${o++}\n${n.startAt}.${i} --\x3e ${l}.000\n${n.title}\n`}return s}(e,t);return r?new File([r],"chapters.vtt",{type:"text/vtt"}):null}},68925:(e,t,r)=>{"use strict";r.d(t,{W:()=>c});var n=r(51806),a=r(13419),s=r(55609),o=r(65736),i=r(99787);const __=o.__,l=(0,a.dM)(i),c=({changeStatus:e,isLoading:t,isModuleActive:r})=>(0,n.createElement)(s.Placeholder,{icon:l,instructions:__("You'll need to activate the WordAds feature to use this block.","jetpack"),label:i.title},(0,n.createElement)(s.Button,{disabled:r||t,isBusy:t,onClick:()=>e(!0),variant:"secondary"},t?__("Activating WordAds","jetpack"):__("Activate WordAds","jetpack",0)),(0,n.createElement)("div",{className:"membership-button__disclaimer"},(0,n.createElement)(s.ExternalLink,{href:"https://jetpack.com/support/ads/"},__("Learn more about the WordAds feature.","jetpack"))))},61981:(e,t,r)=>{"use strict";r.d(t,{c:()=>o});var n=r(51806),a=r(22636),s=r(55609);const o=()=>(0,n.createElement)(s.Placeholder,null,(0,n.createElement)(s.Flex,{gap:2,direction:"column",style:{width:"100%"}},(0,n.createElement)(s.Flex,{gap:4},(0,n.createElement)(s.FlexItem,null,(0,n.createElement)(a.Z,{width:30,height:30})),(0,n.createElement)(s.FlexBlock,null,(0,n.createElement)(a.Z,{width:"90%",height:30}))),(0,n.createElement)(s.Flex,{style:{marginTop:12}},(0,n.createElement)(s.FlexBlock,null,(0,n.createElement)(a.Z,{height:30,width:"60%"}))),(0,n.createElement)(s.Flex,{style:{marginTop:12}},(0,n.createElement)(s.FlexBlock,null,(0,n.createElement)(a.Z,{width:150,height:50}))),(0,n.createElement)(s.Flex,{style:{marginTop:18}},(0,n.createElement)(s.FlexBlock,null,(0,n.createElement)(a.Z,{width:"90%",height:16})))))},50354:(e,t,r)=>{"use strict";r.d(t,{m:()=>o});var n=r(51806),a=r(55609),s=r(65736);const __=s.__,o=[{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:"mrec",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),s=r(55609),o=r(65736),i=r(1020);const __=o.__,l=({value:e,onChange:t})=>(0,n.createElement)(s.PanelBody,{title:__("Visibility","jetpack")},(0,n.createElement)(s.ToggleControl,{className:"jetpack-wordads__mobile-visibility",checked:!!e,label:__("Hide on mobile","jetpack"),help:__("Hides this block for site visitors on mobile devices.","jetpack"),onChange:t})),c=({attributes:{format:e,hideMobile:t},setAttributes:r})=>(0,n.createElement)(n.Fragment,null,(0,n.createElement)(a.BlockControls,null,(0,n.createElement)(i.Z,{value:e,onChange:e=>r({format:e})})),(0,n.createElement)(a.InspectorControls,null,(0,n.createElement)(l,{value:t,onChange:e=>r({hideMobile:!!e})})))},53193:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h});var n=r(51806),a=r(88275),s=r(13419),o=r(68925),i=r(61981),l=r(50354),c=r(56565),u=r(80405),p=r(72473),d=r(38511),m=r(52203);const h=({attributes:e,setAttributes:t})=>{const{format:r}=e,{isLoadingModules:h,isChangingStatus:g,isModuleActive:f,changeStatus:b}=(0,s.el)("wordads"),v=l.m.find((({tag:e})=>e===r));return f?(0,n.createElement)(n.Fragment,null,(0,n.createElement)(c.Z,{attributes:e,setAttributes:t}),(0,n.createElement)("div",{className:`wp-block-jetpack-wordads jetpack-wordads-${r}`},(0,n.createElement)("div",{className:"jetpack-wordads__ad",style:{width:v.width,height:v.height,backgroundImage:`url( ${(e=>{switch(e){case"leaderboard":return m;case"mobile_leaderboard":return d;case"wideskyscraper":return u;default:return p}})(r)} )`,backgroundSize:"cover"}}))):h?(0,n.createElement)(a.ZP,null,(0,n.createElement)(i.c,null)):(0,n.createElement)(o.W,{changeStatus:b,isModuleActive:f,isLoading:g})}},3432:(e,t,r)=>{"use strict";var n=r(31985),a=r(99787),s=r(53193);(0,n.S)(a,{edit:s.Z,save:()=>null})},1020:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(55609),s=r(65736),o=r(50354);const i=(0,s.__)("Pick an ad format","jetpack");function l({value:e,onChange:t}){return(0,n.createElement)(a.Dropdown,{placement:"bottom-start",renderToggle:({onToggle:e,isOpen:t})=>(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:e,extraProps:{"aria-expanded":t},className:"wp-block-jetpack-wordads__format-picker-icon"}]}),renderContent:({onClose:r})=>(0,n.createElement)(a.NavigableMenu,{className:"wp-block-jetpack-wordads__format-picker"},o.m.map((({tag:s,name:o,icon:i})=>(0,n.createElement)(a.MenuItem,{className:s===e?"is-active":void 0,icon:i,isSelected:s===e,key:s,onClick:()=>{t(s),r()},role:"menuitemcheckbox"},o))))})}},78680:(e,t,r)=>{"use strict";r.d(t,{L:()=>p});var n=r(82674),a=r.n(n),s=r(51806),o=r(86989),i=r.n(o),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(29692),r(1949));function p(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){if(!p(t))return e;const{title:r,keywords:n}=e,a="(beta)",s="beta",o={...e};return r&&(o.title=r.toLowerCase().endsWith(a)?r:`${e.title} ${a}`),Array.isArray(n)&&(o.keywords=n.includes(s)?n:[...n,s]),o}));const d=(0,l.createHigherOrderComponent)((e=>t=>{if(t?.clientRootId)return(0,s.createElement)(e,t);const{name:r}=t;return p(r)?(0,s.createElement)(e,a()({},t,{className:"is-beta-extension"})):(0,s.createElement)(e,t)}),"withBetaClassName");(0,c.addFilter)("editor.BlockListBlock","jetpack/label-beta-extensions",d)},6460:(e,t,r)=>{"use strict";var n=r(4981),a=r(65736),s=r(81427);const __=a.__,o={name:"descript",title:"Descript",icon:s.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",o)},5166:(e,t,r)=>{"use strict";var n=r(92694),a=r(65736),s=r(70355),o=r(81427);const __=a.__,_x=a._x,i={name:"facebook",title:"Facebook",icon:{src:o.Vq,foreground:(0,s.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!==i.name));return e.variations=[...r,i],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),s=r(70355),o=r(81427),i=r(12923);const __=a.__,_x=a._x,l={name:"instagram",title:"Instagram",icon:{src:o.yu,foreground:(0,s.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,i.Z)())return e;const r=e.variations.filter((e=>e.name!==l.name));return e.variations=[...r,l],e}))},25467:(e,t,r)=>{"use strict";var n=r(4981),a=r(65736),s=r(81427);const __=a.__,o={name:"loom",title:"Loom",icon:s.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",o)},91128:(e,t,r)=>{"use strict";var n=r(4981),a=r(65736),s=r(81427);const __=a.__,o={name:"smartframe",title:"SmartFrame",icon:s.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",o)},31657:(e,t,r)=>{"use strict";var n=r(4981),a=r(92694),s=r(6512);const o={from:[{type:"block",isMultiBlock:!1,blocks:["core/legacy-widget"],isMatch:({idBase:e,instance:t})=>!!t?.raw&&"jetpack_widget_social_icons"===e,transform:({instance:e})=>{let t=[];return e.raw.icons.forEach((e=>{const r=new URL(e.url.includes(":")?e.url:"https://"+e.url),a=r.hostname?r.hostname:r.protocol,o=s.Z.find((e=>a.includes(e.url)||e.url.includes(a))),i=(0,n.createBlock)("core/social-link",{service:o?o.name:"chain",url:e.url});t=[...t,i]})),(0,n.createBlock)("core/social-links",{},t)}}]};(0,a.addFilter)("blocks.registerBlockType","addTransformToSocialLinksWidget",(function(e,t){return"core/social-links"!==t||(e.transforms=o),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:()=>o,x:()=>s});var n=r(51806),a=r(69307);const s=(0,a.createContext)(),o=({onBannerVisibilityChange:e,hasParentBanner:t,children:r})=>(0,n.createElement)(s.Provider,{value:{onBannerVisibilityChange:e,hasParentBanner:t},children:r})},23984:(e,t,r)=>{"use strict";var n=r(13419),a=r(47701),s=r.n(a),o=r(92694),i=r(65736),l=r(92819),c=r(30371),u=r(7832),p=r(42770),d=r(27003);const __=i.__,m=[];(0,o.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,p.Z)(e.icon)),e.attributes.shouldDisplayFrontendBanner||(e.attributes.shouldDisplayFrontendBanner={type:"boolean",default:!0}),"core/cover"!==t&&(e.supports={...e.supports,__experimentalExposeControlsToChildren:!0})),e))),(0,o.addFilter)("blocks.registerBlockType","jetpack/paid-block-with-upgrade-banner",d.v),(0,o.addFilter)("editor.MediaPlaceholder","jetpack/paid-block-media-placeholder",c.Z),(0,o.addFilter)("editor.MediaReplaceFlow","jetpack/paid-block-media-placeholder",u.Z),s()((function(){(0,n.FK)()&&document.body.classList.add("jetpack-enable-upgrade-nudge")}))},30371:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(82674),a=r.n(n),s=r(51806),o=r(13419),i=r(52175),l=r(94333),c=r(69307),u=r(11317),p=r(87950);const d=(0,l.createHigherOrderComponent)((e=>t=>{const{name:r}=(0,i.useBlockEditContext)(),n=(0,o.m3)(r);if(!n?.mediaPlaceholder||!(0,o.X1)(r))return(0,s.createElement)(e,t);const{fileType:l}=n,{onError:d}=t,{onBannerVisibilityChange:m}=(0,c.useContext)(p.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]):d(e)}),[h,l,d]);return(0,s.createElement)("div",{className:"paid-block-media-placeholder"},(0,s.createElement)(e,a()({},t,{onFilesPreUpload:h,onError:g})))}),"withMediaPlaceholderUpgradable")},7832:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=r(82674),a=r.n(n),s=r(51806),o=r(13419),i=r(52175),l=r(94333),c=r(69307),u=r(11317),p=r(87950);const d=(0,l.createHigherOrderComponent)((e=>t=>{const{name:r}=(0,i.useBlockEditContext)(),n=(0,o.m3)(r),l=(0,c.useRef)();if(!n?.mediaReplaceFlow||!(0,o.X1)(r))return(0,s.createElement)(e,t);const{fileType:d}=n,{onBannerVisibilityChange:m}=(0,c.useContext)(p.x);return(0,s.createElement)(e,a()({},t,{onFilesUpload:e=>{l.current=e?.length?e[0]:null,m(e?.length&&(0,u.Qu)(e[0],d))},createNotice:(e,r,n)=>{if((0,u.Qu)(l.current,d))return l.current=null,null;t.createNotice(e,r,n)}}))}),"withMediaReplaceFlowUpgradable")},95796:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(55609);const s=({cx:e=0,cy:t=0,r:r=4,fill:s="#e34c84",stroke:o="#ffffff",strokeWidth:i="2"})=>(0,n.createElement)(a.SVG,{className:"jetpack-paid-block-symbol"},(0,n.createElement)(a.Circle,{cx:e,cy:t,r:r,fill:s,stroke:o,strokeWidth:i}))},42770:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(51806),a=(r(13419),r(95796));const s=e=>{const t=(0,n.createElement)(a.Z,{key:"paid-symbol"});return e?.src?{...e,src:(0,n.createElement)(n.Fragment,null,e.src,t)}:(0,n.createElement)(n.Fragment,null,e,t)},o=s},66316:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>p});var n=r(51806),a=r(9818),s=r(65736),o=r(26546),i=r(78798);const __=s.__,_x=s._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")),p=({onRedirect:e,align:t,className:r,title:p=l,description:d=null,buttonText:m=u,visible:h=!0,requiredPlan:g,context:f})=>{const[b,v,k]=(0,i.Z)(g,e),y=(0,a.useSelect)((e=>{if(d)return d;const t=e("wordpress-com/plans"),r=t&&t.getPlan(g);return r?(0,s.sprintf)(c,r.product_name_short):null}),[d]);return y&&(0,n.createElement)(o.p,{align:t,buttonText:m,checkoutUrl:b,className:r,context:f,description:y,goToCheckoutPage:v,isRedirecting:k,title:p,visible:h})}},38140:(e,t,r)=>{"use strict";r.d(t,{W:()=>a,v:()=>n});const n=({plan:e,blockName:t,context:r,tracks:n})=>{n.recordEvent("jetpack_editor_block_upgrade_click",{plan:e,block:t,context:r})},a=({plan:e,blockName:t,context:r,tracks:n})=>{n.recordEvent("jetpack_editor_block_upgrade_banner_impression",{plan:e,block:t,context:r})}},27003:(e,t,r)=>{"use strict";r.d(t,{v:()=>m});var n=r(51806),a=r(13419),s=r(52175),o=r(94333),i=r(9818),l=r(69307),c=r(87950),u=r(66316),p=r(38140);const d=(0,o.createHigherOrderComponent)((e=>t=>{const{name:r,clientId:o,isSelected:d,attributes:m,setAttributes:h}=t||{},g=(0,a.Rl)(r);if(!g)return(0,n.createElement)(e,t);const f=(0,a.HD)(r),b=(0,a.m3)(r),[v,k]=(0,l.useState)(!f),[y,w]=(0,l.useState)(!1),E="editor-canvas",_=(0,i.useSelect)((e=>e("core/block-editor").hasSelectedInnerBlock(o,!0)),[]),{hasParentBanner:C}=(0,l.useContext)(c.x)||{},S=(d||_)&&v&&!C,{tracks:x}=(0,a.z$)(),j=(0,l.useMemo)((()=>({plan:g,blockName:r,context:E,tracks:x})),[g,r,x]);(0,l.useEffect)((()=>{S&&w(!0)}),[S,w]),(0,l.useEffect)((()=>{!y&&S&&(0,p.W)(j)}),[y,j,S]),(0,l.useEffect)((()=>k(!f)),[m,k,f]),(0,l.useEffect)((()=>{h({shouldDisplayFrontendBanner:!C})}),[h,C]);const L=(0,s.useBlockProps)();return(0,n.createElement)(c.L,{onBannerVisibilityChange:k,hasParentBanner:S},(0,n.createElement)("div",{ref:L.ref,style:{"max-width":"unset"}},(0,n.createElement)(u.ZP,{className:`is-${r.replace(/\//,"-")}-paid-block`,title:null,align:m?.align,visible:S,description:b?.description,requiredPlan:g,context:E,onRedirect:()=>(0,p.v)(j)}),(0,n.createElement)(e,t)))}),"withUpgradeBanner");function m(e,t){return(0,a.Rl)(t)?{...e,edit:d(e.edit)}:e}},14465:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(51806),a=r(22636),s=r(55609),o=r(65736),i=r(65235),l=r.n(i),c=(r(99196),r(23795));const __=o.__,u=({usage:e,limitReached:t,requireUpgrade:r=!1})=>{if(null==e)return null;const a={width:100*Math.max(Math.min(e,1),0)+"%"};return(0,n.createElement)("div",{className:"ai-assistant-usage-bar-wrapper"},(0,n.createElement)("div",{className:l()("ai-assistant-usage-bar-usage",{"is-limit-reached":t,"require-upgrade":r}),style:a}))};const p=function({isOverLimit:e,planType:t,requestsCount:r,requestsLimit:i,daysUntilReset:l=null,requireUpgrade:p=!1,loading:d=!1}){const m=e||r>=i,h=Array();if(m&&t===c._5&&h.push(__("You've reached your free requests limit.","jetpack")),m&&t===c.dt&&h.push(__("You've reached your plan requests limit.","jetpack")),l&&t===c.dt){const e=(0,o.sprintf)(
// translators: %1$d: number of days until the next usage count reset
__("Requests will reset in %1$d days.","jetpack"),l);h.push(e)}const g=r/i,f=(0,n.createElement)(n.Fragment,null,t===c._5&&(0,n.createElement)("p",null,(0,o.sprintf)(
// translators: %1$d: current request counter; %2$d: request allowance;
__("%1$d / %2$d free requests.","jetpack"),r,i)),t===c.dt&&(0,n.createElement)("p",null,(0,o.sprintf)(
// translators: %1$d: current request counter; %2$d: request allowance;
__("%1$d / %2$d requests.","jetpack"),r,i)),t===c.hp&&(0,n.createElement)("p",null,__("Unlimited requests.","jetpack")),(t===c._5||t===c.dt)&&(0,n.createElement)(u,{usage:g,limitReached:m,requireUpgrade:p})),b=(0,n.createElement)(a.Z,{height:100,className:"jetpack-ai-usage-panel__loading-placeholder"});return(0,n.createElement)(s.BaseControl,{help:!d&&h.length?h.join(" "):null,label:__("Usage","jetpack")},!d&&f,d&&b)}},84102:(e,t,r)=>{"use strict";r.d(t,{Z:()=>k});var n=r(51806),a=r(6895),s=r(13419),o=r(55609),i=r(69307),l=r(65736),c=(r(99196),r(63206)),u=r(18135),p=r(42890),d=r(71449),m=r(46867),h=r(23795),g=r(14465);const __=l.__,f=e=>{if(!e)return null;const t=new Date(e),r=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())-Date.now();return Math.ceil(r/864e5)},b=(e,t)=>e===h._5?__("Upgrade","jetpack"):t?(0,l.sprintf)(
// translators: %1$d: an integer, the number of requests to upgrade to on the next tier
__("Get %1$d requests","jetpack"),t):__("Get more requests","jetpack"),v=()=>{const e=(0,a.Z)("jetpack-ai-tiers-more-requests-contact"),{autosaveAndRedirect:t,isRedirecting:r}=(0,m.Z)(e);return{contactUsURL:e,autosaveAndRedirectContactUs:t,isRedirectingContactUs:r}};function k({placement:e=null}){const{checkoutUrl:t,autosaveAndRedirect:r,isRedirecting:a}=(0,c.Z)(),{contactUsURL:l,autosaveAndRedirectContactUs:m}=v(),{tracks:k}=(0,p.Z)(),y=(0,d.d)(),{requestsCount:w,requestsLimit:E,isOverLimit:_,usagePeriod:C,currentTier:S,nextTier:x,requireUpgrade:j,loading:L}=(0,u.Z)(),A=(0,h.U_)(S),P=f(C?.nextStart),T=A===h.dt?C?.requestsCount:w,N=A===h._5?E:S?.limit,M=(0,i.useCallback)((t=>{t.preventDefault(),k.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:S?.slug,requests_count:T,...e?{placement:e}:{}}),r(t)}),[k,S,T,e,r]),R=(0,i.useCallback)((t=>{t.preventDefault(),k.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:S?.slug,requests_count:T,...e?{placement:e}:{}}),m()}),[k,S,T,e,m]),I=b(A,x?.limit),Z=((0,s.Wp)()||(0,s.Ug)())&&A===h.dt&&!x;return(0,n.createElement)("div",{className:"jetpack-ai-usage-panel"},(0,n.createElement)(n.Fragment,null,(0,n.createElement)(g.Z,{isOverLimit:_,requestsCount:T,requestsLimit:N,daysUntilReset:P,planType:A,requireUpgrade:j,loading:L}),!L&&(A===h._5||A===h.dt)&&y&&(0,n.createElement)("div",{className:"jetpack-ai-usage-panel-upgrade-button"},Z&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)("p",null,__("Need more requests?","jetpack")),(0,n.createElement)(o.Button,{variant:"primary",label:__("Contact us for more requests","jetpack"),href:l,onClick:R},__("Contact Us","jetpack"))),!Z&&(0,n.createElement)(o.Button,{variant:"primary",label:__("Upgrade your Jetpack AI plan","jetpack"),href:t,onClick:M,disabled:a},I))))}},80013:(e,t,r)=>{"use strict";r.d(t,{I:()=>n});const n="block_settings_sidebar"},85921:(e,t,r)=>{"use strict";var n=r(51806),a=r(13419),s=r(4981),o=r(65736),i=r(81427);const __=o.__;(0,a.Wp)()||(0,a.Ug)()||(0,s.registerBlockCollection)("jetpack",{title:"Jetpack",icon:(0,n.createElement)(i.IM,null)}),(0,s.setCategories)([...(0,s.getCategories)().filter((({slug:e})=>"contact-form"!==e)),{slug:"contact-form",title:__("Forms","jetpack"),icon:(0,n.createElement)(i.IM,null)}]),(0,s.setCategories)([...(0,s.getCategories)().filter((({slug:e})=>"earn"!==e)),{slug:"earn",title:__("Earn","jetpack"),icon:(0,n.createElement)(i.IM,null)}]),(0,s.setCategories)([...(0,s.getCategories)().filter((({slug:e})=>"grow"!==e)),{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,a){let s;try{s=new URL("editor-assets",r.p)}catch(e){}if(!s)return;const o=s.href,{currentDoc:i}=n(a),l=i.getElementsByTagName("head")[0];e.forEach((e=>{const[r,n]=e.file.split("/").pop().split(".");if("css"===n){if(i.getElementById(e.id))return;const t=i.createElement("link");t.id=e.id,t.rel="stylesheet",t.href=`${o}/${r}-${e.version}.${n}`,l.appendChild(t)}if("js"===n){const a=t[e.id]?t[e.id]:null;if(i.getElementById(e.id))return a();const s=i.createElement("script");s.id=e.id,s.type="text/javascript",s.src=`${o}/${r}-${e.version}.${n}`,s.onload=a,l.appendChild(s)}}))}function s(e,t){return new Promise((r=>{const n=()=>{e[t]?r(e[t]):e.requestAnimationFrame(n)};n()}))}r.d(t,{Dz:()=>s,Pp:()=>a,bL:()=>n})},70355:(e,t,r)=>{"use strict";r.d(t,{m:()=>o});var n=r(80550),a=r(13419);const s=n.O["Jetpack Green 40"];function o(){return(0,a.Ug)()||(0,a.Wp)()?null:s}},81518:(e,t,r)=>{"use strict";r.d(t,{t:()=>o});var n=r(29512),a=r.n(n),s=r(92819);function o(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,s.find)(e,{name:t});if(n)return n}return(0,s.find)(e,"isDefault")}(e,t);return r?r.name:null}},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)}},44738:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(51806),a=r(52175),s=r(55609),o=r(65736),i=r(65235),l=r.n(i),c=r(46867);const __=o.__;function u({blockName:e,buttonLabel:t,className:r,href:o,icon:i,onClick:u,readMoreUrl:p,subtitle:d,title:m}){const{autosaveAndRedirect:h}=(0,c.Z)(o);return(0,n.createElement)(a.Warning,{actions:o&&[(0,n.createElement)(s.Button,{href:o,onClick:t=>{t.preventDefault(),u(e),h(t)},target:"_top",variant:"secondary",className:"jetpack-stripe-nudge__link"},t)],className:l()(r,"jetpack-block-nudge wp-block")},(0,n.createElement)("span",{className:"jetpack-block-nudge__info"},i,(0,n.createElement)("span",{className:"jetpack-block-nudge__text-container"},(0,n.createElement)("span",{className:"jetpack-block-nudge__title"},m),d&&(0,n.createElement)("span",{className:"jetpack-block-nudge__message"},d,p&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)("br",null),(0,n.createElement)(s.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),s=r(4981),o=r(55609),i=r(9818),l=r(69307),c=r(65736),u=r(39630),p=r(65235),d=r.n(p),m=r(92819);const __=c.__,h=({attributes:e,styleOption:t,viewportWidth:r,blockName:o})=>{const i=(0,s.getBlockType)(o);return(0,n.createElement)(a.BlockPreview,{viewportWidth:r,blocks:(l=i.example?(0,s.getBlockFromExample)(o,{attributes:{...i.example.attributes,style:t.value},innerBlocks:i.example.innerBlocks}):(0,s.createBlock)(o,e),{...l,attributes:{...l.attributes,__isBlockPreview:!0}})});var l},g=l.memo?(0,l.memo)(h,((e,t)=>(0,m.isEqual)(e,t))):h;function f({attributes:e,clientId:t,styleOptions:r,onSelectStyle:s,activeStyle:l,viewportWidth:c,title:p}){let m;return i.useSelect&&(m=(0,i.useSelect)((e=>{const{getBlock:r}=e("core/block-editor");return r(t)}))),(0,n.createElement)(n.Fragment,null,(0,n.createElement)(a.BlockControls,null,(0,n.createElement)(o.ToolbarGroup,{isCollapsed:!0,icon:"admin-appearance",label:__("Style","jetpack"),controls:r.map((e=>({title:e.label,isActive:e.value===l,onClick:()=>s({style:e.value})}))),popoverProps:{className:"jetpack-block-styles-selector-toolbar"}})),(0,n.createElement)(a.InspectorControls,null,(0,n.createElement)(o.PanelBody,{title:p||__("Styles","jetpack")},(0,n.createElement)("div",{className:"block-editor-block-styles jetpack-block-styles-selector"},r.map((t=>{const r={...e,style:t.value};return(0,n.createElement)("div",{key:t.value,className:d()("block-editor-block-styles__item",{"is-active":t.value===l}),onClick:()=>{s({style:t.value})},onKeyDown:e=>{u.ENTER!==e.keyCode&&u.SPACE!==e.keyCode||(e.preventDefault(),s({style:t.value}))},role:"button",tabIndex:"0","aria-label":t.label},(0,n.createElement)("div",{className:"block-editor-block-styles__item-preview"},t.preview?t.preview:i.useSelect&&m&&(0,n.createElement)(g,{blockName:m.name,styleOption:t,attributes:r,viewportWidth:c})),(0,n.createElement)("div",{className:"block-editor-block-styles__item-label"},t.label))}))))))}},8649:(e,t,r)=>{"use strict";r.d(t,{d:()=>i});var n=r(51806),a=r(88275),s=r(22636),o=r(55609);const i=()=>(0,n.createElement)(a.ZP,null,(0,n.createElement)(o.Placeholder,null,(0,n.createElement)(o.Flex,{gap:2,direction:"column",style:{flexBasis:"33.3%",padding:"0 1em"}},(0,n.createElement)(o.FlexItem,null,(0,n.createElement)(s.Z,{width:"100%",height:30})),(0,n.createElement)(o.FlexItem,null,(0,n.createElement)(s.Z,{width:"100%",height:90}))),(0,n.createElement)(o.Flex,{gap:2,direction:"column",style:{flexBasis:"33.3%",padding:"0 1em"}},(0,n.createElement)(o.FlexItem,null,(0,n.createElement)(s.Z,{width:"100%",height:30})),(0,n.createElement)(o.FlexItem,null,(0,n.createElement)(s.Z,{width:"100%",height:90}))),(0,n.createElement)(o.Flex,{gap:2,direction:"column",style:{flexBasis:"33.3%",padding:"0 1em"}},(0,n.createElement)(o.FlexItem,null,(0,n.createElement)(s.Z,{width:"100%",height:30})),(0,n.createElement)(o.FlexItem,null,(0,n.createElement)(s.Z,{width:"100%",height:90})))))},20769:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(82674),a=r.n(n),s=r(51806),o=r(55609);const i=o.NumberControl||o.__experimentalNumberControl||function(e){return(0,s.createElement)(o.TextControl,a()({type:"number",inputMode:"numeric"},e))}},14436:(e,t,r)=>{"use strict";r.d(t,{Bn:()=>n,DM:()=>a});const n="payment-plan",a="subscription"},51585:(e,t,r)=>{"use strict";r.d(t,{l:()=>o});var n=r(65736),a=r(14436);const __=n.__,s={"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 o(e,t=a.Bn){return s?.[e]?.[t]||null}__("Monthly Subscription","jetpack"),__("Yearly Subscription","jetpack"),__("Subscription","jetpack")},16367:(e,t,r)=>{"use strict";r.d(t,{U:()=>p});var n=r(51806),a=r(6895),s=r(13419),o=r(9818),i=r(65736),l=r(89933),c=r(7652),u=r(44738);const __=i.__,p=({blockName:e})=>{const t=(0,o.select)(c.h).getConnectUrl(),{tracks:r}=(0,s.z$)(),i=(0,s.Ug)()||(0,s.Wp)();if(!t)return null;let p;switch(e){case"payment-buttons":p=i?(0,a.Z)("wpcom-support-wordpress-editor-blocks-payments-block"):(0,a.Z)("jetpack-support-jetpack-blocks-payments-block");break;case"donations":p=i?(0,a.Z)("wpcom-support-wordpress-editor-blocks-donations-block"):(0,a.Z)("jetpack-support-jetpack-blocks-donations-block");break;case"premium-content":p=i?(0,a.Z)("wpcom-support-wordpress-editor-blocks-premium-content-block"):(0,a.Z)("jetpack-support-jetpack-blocks-premium-content-block");break;default:p=i?(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:t,readMoreUrl:p,onClick:()=>r.recordEvent("jetpack_editor_block_stripe_connect_click",{block:e}),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),s=r(65736),o=r(65235),i=r.n(o);const __=s.__,l=({align:e,className:t,title:r,description:s,buttonText:o=null,visible:l=!0,context:c,checkoutUrl:u=null,goToCheckoutPage:p=null,isRedirecting:d=!1,showButton:m=!0})=>{const h=i()(t,"jetpack-upgrade-plan-banner",{"wp-block":"editor-canvas"===c,"block-editor-block-list__block":"editor-canvas"===c,"jetpack-upgrade-plan__hidden":!l}),g=__("Redirecting…","jetpack");return(0,n.createElement)("div",{className:h,"data-align":e},(0,n.createElement)("div",{className:"jetpack-upgrade-plan-banner__wrapper"},r&&(0,n.createElement)("strong",{className:i()("banner-title",{[`${t}__title`]:t})},r),s&&(0,n.createElement)("span",{className:`${t}__description banner-description`},s),m&&(0,n.createElement)(a.Button,{href:d?null:u,onClick:p,target:"_top",className:i()("is-primary",{"jetpack-upgrade-plan__hidden":!u}),isBusy:d},d?g:o)))}},79162:(e,t,r)=>{"use strict";r.d(t,{Vm:()=>l,ck:()=>a,hj:()=>s,li:()=>o,vs:()=>i});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};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 o(e){const t=s(e);return[10*t,30*t,200*t]}function i(e,t){return!isNaN(t)&&t>=s(e)}function l(e,t){if(!e)return null;if("number"==typeof e)return e;let r=e;return n.M[t].grouping&&(r=e.replace(new RegExp("\\"+n.M[t].grouping,"g"),"")),e=parseFloat(r.replace(new RegExp("\\"+n.M[t].decimal,"g"),".")),isNaN(e)?null:e}},94545:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(55609);const s=({label:e,onClick:t})=>(0,n.createElement)(a.Button,{className:"components-toolbar__control",label:e,icon:"edit",onClick:t})},73905:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});const n=new Map,a=e=>n.has(e),s={acquire:e=>{if(a(e))return null;const t=Math.random();return n.set(e,t),[e,t]},blockExecution:async(e,t=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:()=>v,CY:()=>g,Eh:()=>i,En:()=>k,OG:()=>d,QU:()=>w,Qh:()=>b,Tu:()=>p,UQ:()=>c,Wm:()=>f,h9:()=>h,iT:()=>o,l5:()=>_,oI:()=>u,tY:()=>m,wk:()=>l,yD:()=>y,zs:()=>E});var n=r(69771),a=r(65736),s=r(92819);const __=a.__,o="google_photos",i="openverse",l="pexels",c="jetpack_app_media",u="recent",p="/",d=[{value:u,label:__("Photos","jetpack")},{value:p,label:__("Albums","jetpack")}],m=[{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")}],h=["mountain","ocean","river","clouds","pattern","abstract","sky"],g="ANY",f="LAST_7_DAYS",b="LAST_30_DAYS",v="LAST_6_MONTHS",k="LAST_12_MONTHS",y="CUSTOM",w=[{value:g,label:__("Any time","jetpack")},{value:f,label:__("Last 7 days","jetpack")},{value:b,label:__("Last 30 days","jetpack")},{value:v,label:__("Last 6 months","jetpack")},{value:k,label:__("Last 12 months","jetpack")},{value:y,label:__("Specific Month/Year","jetpack")}],E=(new Date).getFullYear(),_=[{label:__("Any Month","jetpack"),value:-1},...(0,s.map)((0,s.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),s=r(51806),o=r(13419),i=r(52175),l=r(92694),c=r(20982),u=r(10892),p=r(1285),d=r(38457);if((0,o.Dp)()&&"function"==typeof i.useBlockEditContext){(0,p.HO)(),(0,p.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:o}=(0,i.useBlockEditContext)();let{render:l}=n;if(t(o,l)||e(n)){const{allowedTypes:e,gallery:t=!1,value:r=[]}=n;e.indexOf("image")>-1&&!(t&&r.length>0)&&(l=e=>(0,s.createElement)(u.Z,a()({},e,{mediaProps:n})))}return(0,s.createElement)(r,a()({},n,{render:l}))}),100),(0,l.addFilter)("blocks.registerBlockType","external-media/individual-blocks",(function(e,t){if("core/image"!==t)return e;if("beta"!==(0,o.og)()){const e=d.Dv.findIndex((e=>e.id===c.UQ));e>-1&&d.Dv.splice(e,1)}return{...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),s=r(69307),o=r(65736),i=r(39630),l=r(65235),c=r.n(l),u=r(92819),p=r(46406),d=r(9827);const __=o.__,m=(0,s.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:o,pageHandle:l,className:h,multiple:g,setPath:f,nextPage:b,onCopy:v,selectButtonText:k}=e,[y,w]=(0,s.useState)([]),[E,_]=(0,s.useState)(-1),C=(0,s.useRef)(-1),S=(0,s.useRef)(null),x=(0,s.useCallback)((e=>{let t=[e];"folder"===e.type?f(e.ID):g?(t=y.slice(0,9).concat(e),y.find((t=>e.ID===t.ID))&&(t=y.filter((t=>t.ID!==e.ID)))):1===y.length&&e.ID===y[0].ID&&(t=[]),w(t)}),[y,g,f]),j=(0,s.useCallback)((()=>{v(y)}),[y,v]),L=t.filter((e=>"folder"!==e.type)).length>0,A=c()({"jetpack-external-media-browser__media":!0,"jetpack-external-media-browser__media__loading":o}),P=c()({"jetpack-external-media-browser":!0,[h]:!0}),T=()=>{let e=1;const t=S.current.children;if(t.length>0){const r=t[0].offsetTop;for(;e<t.length&&t[e].offsetTop===r;)++e}C.current=e},N=(0,u.debounce)(T,400);(0,s.useEffect)((()=>(window.addEventListener("resize",N),()=>{window.removeEventListener("resize",N)})),[]),(0,s.useEffect)((()=>{t.length&&-1===C.current&&T()}),[t]);const M=(e,{item:t})=>{x(t)},R=(e,{item:r,index:n})=>{[i.LEFT,i.RIGHT,i.UP,i.DOWN].includes(e.keyCode)?((e,r)=>{switch(e){case i.LEFT:r>=1&&_(r-1);break;case i.RIGHT:r<t.length&&_(r+1);break;case i.UP:r>=C.current&&_(r-C.current);break;case i.DOWN:r<t.length-C.current&&_(r+C.current)}})(e.keyCode,n):i.SPACE===e.keyCode?(x(r),e.preventDefault()):i.ENTER===e.keyCode&&x(r),[i.LEFT,i.RIGHT,i.UP,i.DOWN,i.SPACE,i.ENTER].includes(e.keyCode)&&e.stopPropagation()};return(0,n.createElement)("div",{className:P},(0,n.createElement)("ul",{ref:S,className:A},t.map(((e,t)=>(0,n.createElement)(p.Z,{item:e,index:t,key:e.ID,onClick:M,onKeyDown:R,focus:t===E,isSelected:y.find((t=>t.ID===e.ID)),isCopying:r}))),0===t.length&&!o&&(0,n.createElement)(m,null),o&&(0,n.createElement)(d.Z,null),l&&!o&&(0,n.createElement)(a.Button,{variant:"secondary",className:"jetpack-external-media-browser__loadmore",disabled:o||r,onClick:()=>{t.length&&_(t.length),b()}},__("Load More","jetpack"))),L&&(0,n.createElement)((e=>{const t=0===y.length||r,s=e?.labelText?e?.labelText(y.length):__("Selecting","jetpack",0),o=r?__("Inserting…","jetpack"):s;return(0,n.createElement)("div",{className:"jetpack-external-media-browser__media__toolbar"},(0,n.createElement)(a.Button,{variant:"primary",isBusy:r,disabled:t,onClick:j},o))}),{labelText:k}))}},46406:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(51806),a=r(55609),s=r(69307),o=r(65736),i=r(65235),l=r.n(i);const __=o.__;const c=function(e){const{item:t,focus:r,isSelected:o,isCopying:i=!1}=e,{thumbnails:c,caption:u,name:p,title:d,type:m,children:h=0}=t,{medium:g=null,fmt_hd:f=null,thumbnail:b=null}=c,v=d||u||p,k=l()({"jetpack-external-media-browser__media__item":!0,"jetpack-external-media-browser__media__item__selected":o,"jetpack-external-media-browser__media__folder":"folder"===m,"is-transient":i}),y=(0,s.useRef)(null);return(0,s.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":!!o,"aria-disabled":!!i},o&&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"},p),(0,n.createElement)("div",{className:"jetpack-external-media-browser__media__count"},h)))}},9827:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(69307);const s=(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:()=>p});var n=r(82674),a=r.n(n),s=r(51806),o=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 p=function(e){const{mediaProps:t}=e,[r,n]=(0,o.useState)(null),p=(0,i.ZR)(r);return(0,s.createElement)("div",{onClick:e=>e.stopPropagation()},(0,s.createElement)(l.Z,a()({},e,{setSelectedSource:n,isReplace:u(t),isFeatured:c(t),hasImage:t.value>0})),p&&(0,s.createElement)(p,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),s=r(65736),o=r(61074),i=r(20843),l=r(13959);const __=s.__;const c=function(e){const{mediaProps:t,open:r,setSelectedSource:s,isFeatured:c,isReplace:u,hasImage:p}=e,d=t.render;let m="tertiary";if(u)return(0,n.createElement)(l.Z,{originalButton:d,open:r,setSource:s});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:({isOpen:e,onToggle:t})=>{const r=d&&d({open:t});return c&&p||r&&"string"!=typeof r.props.children?r:(0,n.createElement)(a.Button,{variant:m,className:"jetpack-external-media-button-menu","aria-haspopup":"true","aria-expanded":e,onClick:t},(0,n.createElement)("div",{className:"jetpack-external-media-button-menu__label"},h),(0,n.createElement)(o.Z,{icon:i.Z}))},renderContent:({onClose:e})=>(0,n.createElement)(a.NavigableMenu,{"aria-label":h},(0,n.createElement)(a.MenuGroup,null,(0,n.createElement)(a.MenuItem,{icon:i.Z,onClick:()=>{e(),r()}},__("Media Library","jetpack")),(0,n.createElement)(l.Z,{open:r,setSource:s,onClick:e})))}))}},13959:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(55609),s=r(69307),o=r(38457);const i=function({originalButton:e=null,onClick:t=(()=>{}),open:r,setSource:i}){return(0,n.createElement)(s.Fragment,null,e&&e({open:r}),o.Dv.map((({icon:e,id:r,label:s})=>(0,n.createElement)(a.MenuItem,{icon:e,key:r,onClick:()=>{t(),i(r)}},s))))}},1285:(e,t,r)=>{"use strict";r.d(t,{HO:()=>L,on:()=>j,uk:()=>A});var n=r(6975),a=r(86989),s=r.n(a),o=r(9818),i=r(65736),l=r(96483),c=r(67194),u=r(94841),p=r(29755);const __=i.__,d=__("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"}),w=e=>({caption:e?.caption??"",previewUrl:e.thumbnails.thumbnail,title:e?.title??e?.name??e.file,url:e.URL}),E=(e,t,r,a,o)=>({name:e,labels:{name:t,search_items:r},mediaType:"image",fetch:async e=>await s()({path:y(a,{per_page:o.per_page,search:""===e?.search?o.search:e.search}),method:"GET"}).then((t=>{const r=t.media.filter((e=>e.type===k.Image)).map(w);return n.Z.tracks.recordEvent("jetpack_editor_media_inserter_external_source",{mediaSource:a.toString(),results:r.length,search:""===e?.search?o.search:e.search}),r})).catch((()=>[])),getReportUrl:null,isExternalResource:!0}),_=()=>E("google_photos",g,f,p.Y.GooglePhotos,b),C=()=>(0,o.select)("core/edit-post")?.isInserterOpened()||(0,o.select)("core/edit-site")?.isInserterOpened()||(0,o.select)("core/edit-widgets")?.isInserterOpened?.(),S=e=>(0,o.dispatch)("core/block-editor")?.registerInserterMediaCategory?.(e()),x=()=>E("pexels",d,m,p.Y.Pexels,h),j=async()=>{(0,c.X)(C).then((async()=>{await(async e=>s()({path:y(e,h),method:"GET"}).then((e=>e)).catch((()=>!1)))(p.Y.GooglePhotos)?S(_):(0,c.X)((()=>{return e=p.Y.GooglePhotos,!!(0,o.select)(u.j).isAuthenticated(e);var e})).then((()=>S(_)))}))},L=()=>{(0,c.X)(C).then((()=>S(x)))},A=(e,t)=>{(0,o.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.JetpackAppMedia="jetpack_app_media",e.Unknown="unknown",e}({})},47285:(e,t,r)=>{"use strict";r.d(t,{k:()=>o});var n=r(13419),a=r(96483);const s={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 o(e,t,r={}){return s[e]?(0,a.addQueryArgs)(s[e]+t,r):null}},53463:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(51806),a=r(69307),s=r(65736),o=r(81427);const __=s.__;const i=(0,a.memo)((function(){return(0,n.createElement)(a.Fragment,null,(0,n.createElement)(o.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:()=>o});var n=r(51806),a=r(69307),s=r(65736);const __=s.__;const o=(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),s=r(69307),o=r(65736),i=r(20982);const __=o.__;const l=(0,s.memo)((function({path:e,setPath:t}){return(0,n.createElement)(s.Fragment,null,(0,n.createElement)(a.Button,{variant:"tertiary",onClick:()=>t(i.Tu)},__("Albums","jetpack")),"→   ",e.name)}))},4819:(e,t,r)=>{"use strict";r.d(t,{Z:()=>g});var n=r(51806),a=r(55609),s=r(69307),o=r(65736),i=r(92819),l=r(20769),c=r(20982);const __=o.__;function u({value:e,updateFilter:t}){return(0,n.createElement)(a.SelectControl,{label:__("Category","jetpack"),value:e,options:c.tY,onChange:t})}function p({value:e,updateFilter:t}){const r=e?.range||c.CY,[o,i]=(0,s.useState)(-1),[u,p]=(0,s.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:r,options:c.QU,onChange:e=>t({range:e})}),r===c.yD&&(0,n.createElement)(s.Fragment,null,(0,n.createElement)(a.SelectControl,{label:__("Month","jetpack"),value:o,options:c.l5,onChange:i}),(0,n.createElement)(l.Z,{className:"components-base-control",label:__("Year","jetpack"),value:u,min:1970,onChange:p}),(0,n.createElement)(a.Button,{variant:"secondary",disabled:e?.month===o&&e?.year===u,onClick:()=>{t({range:r,month:o,year:u})}},__("Apply","jetpack"))))}function d(){return(0,n.createElement)("span",null,__("Favorites","jetpack"))}function m({value:e,updateFilter:t}){const r=[{label:__("All","jetpack"),value:""},{label:__("Images","jetpack"),value:"photo"},{label:__("Videos","jetpack"),value:"video"}];return(0,n.createElement)(a.SelectControl,{label:__("Type","jetpack"),value:e,options:r,onChange:t})}function h({children:e,removeFilter:t,isRemovable:r=!1}){return(0,n.createElement)("div",{className:"jetpack-external-media-googlephotos-filter"},e,!!r&&(0,n.createElement)(a.Button,{onClick:t,isSmall:!0},__("Remove Filter","jetpack")))}const g=function({filters:e,setFilters:t,canChangeMedia:r}){const a=Object.keys(e).filter((e=>r||"mediaType"!==e)).map((r=>{return(0,n.createElement)(h,{key:r,removeFilter:()=>t((0,i.omit)(e,r))},(a=r,s=e[r],o=n=>t(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}(e,r,n)),"category"===a?(0,n.createElement)(u,{value:s,updateFilter:o}):"date"===a?(0,n.createElement)(p,{value:s,updateFilter:o}):"favorite"===a?(0,n.createElement)(d,{value:s}):"mediaType"===a?(0,n.createElement)(m,{value:s,updateFilter:o}):null));var a,s,o}));return 0===a.length?null:a}},58912:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(76292),a=r.n(n),s=r(20982);const o=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 s.Wm:e=a()(o).subtract(7,"days"),t=o;break;case s.Qh:e=a()(o).subtract(30,"days"),t=o;break;case s.Bb:e=a()(o).subtract(6,"months"),t=o;break;case s.En:e=a()(o).subtract(1,"year"),t=o;break;case s.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),s=r(69307),o=r(65736);const __=o.__,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,s.useState)(c([])),{isLoading:o,isCopying:i,filters:u,canChangeMedia:p}=e,d=function(e,t){return t?e:e.filter((e=>"mediaType"!==e.value))}(l(u),p);return 0===d.length?null:(0,n.createElement)(s.Fragment,null,(0,n.createElement)(a.SelectControl,{label:__("Filters","jetpack"),value:t,disabled:o||i,options:d,onChange:r}),(0,n.createElement)(a.Button,{disabled:o||i,variant:"secondary",isSmall:!0,onClick:()=>{const n=(a=u,s=t,{...a,[s]:"favorite"===s||""});var a,s;e.setFilters(n),r(c(n))}},__("Add Filter","jetpack")))}},64034:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(2772);const s=({account:e,setAuthenticated:t})=>{const{image:r,name:s}=e||{};return(0,n.createElement)("div",{className:"jetpack-external-media-header__account"},(0,n.createElement)("div",{className:"jetpack-external-media-header__account-info"},r&&(0,n.createElement)("img",{className:"jetpack-external-media-header__account-image",src:r,alt:"",height:"18",width:"18"}),s&&(0,n.createElement)("div",{className:"jetpack-external-media-header__account-name"},s)),(0,n.createElement)(a.Z,{setAuthenticated:t}))}},62494:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h});var n=r(51806),a=r(39229),s=r(86989),o=r.n(s),i=r(55609),l=r(69307),c=r(65736),u=r(20982),p=r(47285),d=r(53463),m=r(5890);const __=c.__;const h=function(e){const{setAuthenticated:t}=e,[r,s]=(0,l.useState)(!1),c=(0,l.useCallback)((()=>{s(!0),o()({path:(0,p.k)("connection",u.iT)}).then((e=>{if(e.error)throw e.message;(0,a.Z)(e.connect_URL,(()=>{s(!1),t(!0)}))})).catch((()=>{s(!1)}))}),[t]);return(0,n.createElement)("div",{className:"jetpack-external-media-auth"},r?(0,n.createElement)(m.Z,null):(0,n.createElement)(d.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:()=>p});var n=r(51806),a=r(86989),s=r.n(a),o=r(55609),i=r(69307),l=r(65736),c=r(20982),u=r(47285);const __=l.__,p=({setAuthenticated:e})=>{const[t,r]=(0,i.useState)(!1),a=(0,i.useCallback)((()=>{r(!0),s()({method:"DELETE",path:(0,u.k)("connection",c.iT)}).then((()=>e(!1))).catch((()=>r(!1)))}),[e]);return(0,n.createElement)(o.Button,{variant:"secondary",className:"jetpack-external-media-browser__disconnect",onClick:a,disabled:t,isBusy:t},__("Disconnect from Google Photos","jetpack"))}},20107:(e,t,r)=>{"use strict";r.d(t,{Z:()=>g});var n=r(51806),a=r(55609),s=r(69307),o=r(65736),i=r(20982),l=r(11583),c=r(47285),u=r(86167),p=r(4819),d=r(58912),m=r(53800),h=r(64034);const __=o.__;const g=function(e){const{account:t,allowedTypes:r,copyMedia:o,getMedia:g,isCopying:f,isLoading:b,media:v,multiple:k,onChangePath:y,pageHandle:w,path:E,setAuthenticated:_,showAdditionalFilters:C=!1}=e,S=(x=r)&&1===x.length&&"image"===x[0];var x;const[j,L]=(0,s.useState)(S?{mediaType:"photo",date:{range:i.CY}}:{date:{range:i.CY}}),A=(0,s.useRef)(""),P=(0,s.useRef)(""),T=E.ID===i.oI?(0,d.Z)(j):null,N={number:20,path:E.ID};T&&(N.filter=T);const M=(0,c.k)("list",i.iT,N),R=(0,s.useCallback)(((e,t=!1)=>{g(M,t)}),[g,M]),I=(0,s.useCallback)((e=>{const t=v.find((t=>t.ID===e));P.current=E,y(t||{ID:e})}),[v,y,P,E]),Z=(0,s.useCallback)((e=>{o(e,(0,c.k)("copy",i.iT),i.iT)}),[o]);return(0,s.useEffect)((()=>{A!==M&&(A.current=M,R({},E!==P.current))}),[A,M,R,E]),(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:E.ID!==i.oI?i.Tu:i.oI,disabled:b||f,options:i.OG,onChange:I}),C&&E.ID===i.oI&&(0,n.createElement)(m.Z,{filters:j,isLoading:b,setFilters:L,canChangeMedia:!S}),(0,n.createElement)("div",{className:"jetpack-external-media-header__filter"},E.ID===i.oI&&(0,n.createElement)(p.Z,{filters:j,isLoading:b,setFilters:L,canChangeMedia:!S}),E.ID!==i.oI&&E.ID!==i.Tu&&(0,n.createElement)(u.Z,{path:E,setPath:I})),(!b||v.length>0)&&(0,n.createElement)(h.Z,{account:t,setAuthenticated:_})),(0,n.createElement)(l.Z,{className:"jetpack-external-media-browser__google",key:M,media:v,isCopying:f,isLoading:b,nextPage:R,onCopy:Z,pageHandle:w,multiple:k,setPath:I}))}},77453:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(51806),a=r(29755),s=r(97893),o=r(62494),i=r(20107);const l=(0,s.Z)(a.Y.GooglePhotos)((function(e){return e.isAuthenticated?(0,n.createElement)(i.Z,e):(0,n.createElement)(o.Z,e)}))},38457:(e,t,r)=>{"use strict";r.d(t,{Dv:()=>p,ZR:()=>d});var n=r(51806),a=r(65736),s=r(81427),o=r(20982),i=r(77453),l=r(32558),c=r(41214),u=r(12533);const __=a.__,p=[{id:o.iT,label:__("Google Photos","jetpack"),icon:(0,n.createElement)(s.He,{className:"components-menu-items__item-icon"}),keyword:"google photos"},{id:o.wk,label:__("Pexels Free Photos","jetpack"),icon:(0,n.createElement)(s.yk,{className:"components-menu-items__item-icon"}),keyword:"pexels"},{id:o.Eh,label:__("Openverse","jetpack"),icon:(0,n.createElement)(s.FG,{className:"components-menu-items__item-icon"}),keyword:"openverse"},{id:o.UQ,label:__("Jetpack Mobile App","jetpack"),icon:(0,n.createElement)(s.EL,{className:"components-menu-items__item-icon"}),keyword:"jetpack mobile app"}];function d(e){return e===o.wk?u.Z:e===o.iT?i.Z:e===o.Eh?c.Z:e===o.UQ?l.Z:null}},32558:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(51806),a=r(49777),s=r(9818),o=r(69307),i=r(65736),l=r(81427),c=r(28229),u=r(11583),p=r(29755),d=r(97893);const __=i.__,_n=i._n;const m=(0,d.Z)(p.Y.JetpackAppMedia)((function(e){const{media:t,insertMedia:r,isCopying:p,multiple:d,getMedia:m}=e,h=window?.Jetpack_Editor_Initial_State?.wpcomBlogId||0,g=window?.Jetpack_Editor_Initial_State?.pluginBasePath+"/images/",f=(0,s.useSelect)((e=>e("core/editor").getCurrentPostId())),[b]=(0,o.useState)(Date.now()/1e3),v=(0,o.useCallback)((()=>{m(`/wpcom/v2/app-media?refresh=true&after=${b}`,!0)}),[m,b]),k=(0,o.useCallback)((()=>{m(`/wpcom/v2/app-media?refresh=true&after=${b}`,!1,!1)}),[m,b]),y=(0,o.useCallback)((e=>{r(e)}),[r]);(0,o.useEffect)((()=>{1!==t.length||d||y(t)}),[t,d,y]),(0,o.useEffect)(v,[]),(0,c.Z)(k,2e3);const w=!!t.length,E=w?"jetpack-external-media-wrapper__jetpack_app_media-wrapper":"jetpack-external-media-wrapper__jetpack_app_media-wrapper has-no-image-uploaded";return(0,n.createElement)("div",{className:E},(0,n.createElement)(l.EU,null),(0,n.createElement)("h2",{className:"jetpack-external-media-wrapper__jetpack_app_media-title"},w&&__("Select images to be added","jetpack"),!w&&__("Upload from your phone","jetpack")),(0,n.createElement)("p",{className:"jetpack-external-media-wrapper__jetpack_app_media-description"},w&&__("Select the images below to add, or continue adding more from your device.","jetpack"),!w&&__("Scan the QR code with your iPhone or Android camera to upload from your photos.","jetpack")),!w&&(0,n.createElement)("div",{className:"jetpack-external-media-wrapper__jetpack_app_media-qr-code-wrapper"},(0,n.createElement)("div",{className:"jetpack-external-media-wrapper__jetpack_app_media-qr-code"},(0,n.createElement)(a.Z,{size:"100",value:`https://apps.wordpress.com/get/?campaign=qr-code-media&postId=${f}#%2Fmedia%2F${h}`})),(0,n.createElement)("div",{className:"jetpack-external-media-wrapper__jetpack_app_media-instructions"},(0,n.createElement)("img",{src:`${g}app-image-upload.png`,srcSet:`${g}app-image-upload.png 1x, ${g}app-image-upload-2x.png 2x`,alt:""}))),w&&(0,n.createElement)(u.Z,{key:"jetpack-app-media",className:"jetpack-external-media-browser__jetpack_app_media_browser",media:t,isCopying:p,isLoading:!1,nextPage:v,onCopy:y,pageHandle:!1,multiple:d,selectButtonText:e=>e?(0,i.sprintf)(/* translators: %1$d is the number of images that were selected. */
_n("Add %1$d image","Add %1$d images",e,"jetpack"),e):__("Add images","jetpack")}))}))},41214:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(51806),a=r(55609),s=r(69307),o=r(65736),i=r(92819),l=r(20982),c=r(11583),u=r(29755),p=r(47285),d=r(97893);const __=o.__;const m=(0,d.Z)(u.Y.Openverse)((function(e){const{media:t,isCopying:r,isLoading:o,pageHandle:u,multiple:d,copyMedia:m,getMedia:h}=e,[g,f]=(0,s.useState)((0,i.sample)(l.h9)),[b,v]=(0,s.useState)(""),k=(0,s.useCallback)((e=>{m(e,(0,p.k)("copy",l.Eh),l.Eh)}),[m]),y=(0,s.useCallback)(((e,t=!1)=>{g&&h((0,p.k)("list",l.Eh,{number:20,search:g}),t)}),[h,g]),w=(0,s.useRef)(),E=(0,s.useCallback)((e=>{e.preventDefault(),v(g),y(e,!0),w.current=g}),[y,g]);(0,s.useEffect)(y,[]);const _=(0,s.useRef)(null);return(0,s.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:E},(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:E,type:"submit",disabled:!g.length||g===w.current||r},__("Search","jetpack"))),(0,n.createElement)(c.Z,{key:b,className:"jetpack-external-media-browser__openverse",media:t,isCopying:r,isLoading:o,nextPage:y,onCopy:k,pageHandle:u,multiple:d}))}))},12533:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(51806),a=r(55609),s=r(69307),o=r(65736),i=r(92819),l=r(20982),c=r(11583),u=r(29755),p=r(47285),d=r(97893);const __=o.__;const m=(0,d.Z)(u.Y.Pexels)((function(e){const{media:t,isCopying:r,isLoading:o,pageHandle:u,multiple:d,copyMedia:m,getMedia:h}=e,[g,f]=(0,s.useState)((0,i.sample)(l.h9)),[b,v]=(0,s.useState)(""),k=(0,s.useCallback)((e=>{m(e,(0,p.k)("copy",l.wk),l.wk)}),[m]),y=(0,s.useCallback)(((e,t=!1)=>{g&&h((0,p.k)("list",l.wk,{number:20,path:"recent",search:g}),t)}),[h,g]),w=(0,s.useRef)(),E=(0,s.useCallback)((e=>{e.preventDefault(),v(g),y(e,!0),w.current=g}),[y,g]);(0,s.useEffect)(y,[]);const _=(0,s.useRef)(null);return(0,s.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:E},(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:E,type:"submit",disabled:!g.length||g===w.current||r},__("Search","jetpack"))),(0,n.createElement)(c.Z,{key:b,className:"jetpack-external-media-browser__pexels",media:t,isCopying:r,isLoading:o,nextPage:y,onCopy:k,pageHandle:u,multiple:d}))}))},97893:(e,t,r)=>{"use strict";r.d(t,{Z:()=>v});var n=r(51806),a=r(86989),s=r.n(a),o=r(55609),i=r(94333),l=r(9818),c=r(69307),u=r(65736),p=r(39630),d=r(65235),m=r.n(d),h=r(92819),g=r(20982),f=r(1285),b=r(29755);const __=u.__;function v(e=b.Y.Unknown){return(0,i.createHigherOrderComponent)((t=>{class r extends c.Component{constructor(e){super(e),this.defaultAccount={image:"",name:""},this.state={account:this.defaultAccount,media:[],nextHandle:!1,isLoading:!1,isCopying:null,isAuthenticated:!0,path:{ID:g.oI}}}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)};stopArrowKeysPropagation=e=>{[p.UP,p.DOWN,p.LEFT,p.RIGHT].includes(e.keyCode)&&!e.target.classList.contains("jetpack-external-media-browser__media__item")&&e.stopPropagation()};setAuthenticated=t=>{this.setState({isAuthenticated:t}),(0,f.uk)(e,t)};mergeMedia(e,t){return(0,h.uniqBy)(e.concat(t),"ID")}getRequestUrl(e){const{nextHandle:t}=this.state;return t?e+"&page_handle="+encodeURIComponent(t):e}getMedia=(e,t=!1,r=!0)=>{this.state.isLoading||(t&&this.props.noticeOperations.removeAllNotices(),this.setState({account:t?this.defaultAccount:this.state.account,isLoading:r,media:t?[]:this.state.media,nextHandle:!t&&this.state.nextHandle},(()=>this.getMediaRequest(e))))};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.removeAllNotices(),t.createErrorNotice("internal_server_error"===e.code?"Internal server error":e.message),this.setState({isLoading:!1,isCopying:!1})};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);s()({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)};copyMedia=(e,t,r)=>{this.setState({isCopying:e}),this.props.noticeOperations.removeAllNotices(),this.modalElement&&this.modalElement.focus(),s()({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:this.props.postId}}).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],s=e.find((e=>e.errors));if(s){const{errors:e}=s,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)};insertMedia=e=>{this.setState({isCopying:e}),this.props.noticeOperations.removeAllNotices(),this.modalElement&&this.modalElement.focus();let t=[];t=0!==e.length?e.map((e=>({alt:e.name,caption:e.caption,id:e.ID,type:"image",url:e.guid}))):[{alt:e.name,caption:e.caption,id:e.ID,type:"image",url:e.guid}];const{value:r,multiple:n,addToGallery:a}=this.props,s=n?t:t[0];this.props.onClose(),this.props.onSelect(a?r.concat(t):s)};onChangePath=(e,t)=>{this.setState({path:e},t)};render(){const{account:r,isAuthenticated:a,isCopying:s,isLoading:i,media:l,nextHandle:c,path:u}=this.state,{allowedTypes:p,multiple:d=!1,noticeUI:h,onClose:g}=this.props,f="jetpack_app_media"!==e?__("Select media","jetpack"):"",b=s?__("Inserting media","jetpack"):f,v=s?__("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),k="jetpack-external-media-browser__description",y=m()({"jetpack-external-media-browser":!0,"jetpack-external-media-browser--is-copying":s,"is-jetpack-app-media":"jetpack_app_media"===e});return(0,n.createElement)(o.Modal,{onRequestClose:g,title:b,aria:{describedby:k},className:y},(0,n.createElement)("div",{ref:this.contentRef},h,(0,n.createElement)("p",{id:k,className:"jetpack-external-media-browser--visually-hidden"},v),(0,n.createElement)(t,{account:r,getMedia:this.getMedia,copyMedia:this.copyMedia,insertMedia:this.insertMedia,isCopying:s,isLoading:i,media:l,pageHandle:c,allowedTypes:p,isAuthenticated:a,setAuthenticated:this.setAuthenticated,multiple:d,path:u,onChangePath:this.onChangePath})))}}return(0,l.withSelect)((e=>{const t=e("core/editor").getCurrentPost();return{postId:("number"==typeof t?.id?t.id:t?.wp_id)??0}}))((0,o.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),s=r(57805),o=r(38972);const i="jetpack-media",l={actions:a.Z,reducer:s.Z,selectors:o.Z},c=(0,n.createReduxStore)(i,l);(0,n.register)(c)},57805:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(42232),a=r(2790);const s=(e=a.F,t)=>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)=>e.mediaSourceIsAuthenticated.get(t)??!1}},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:()=>o});var n=r(13419),a=r(92819);function s(){return(0,a.get)((0,n.Pb)(),["allowedMimeTypes"],[])}function o(e,t){if(!e||!t)return!1;if(!s())return!1;const r=(n=t)?(0,a.pickBy)(s(),(e=>(0,a.startsWith)(e,`${n}/`))):{};var n;const o=(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&&o.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(...e){const t=(0,n.getCategories)();for(const r of e)if(t.some((({slug:e})=>e===r)))return r;throw new Error(`Could not find a category from the provided list: ${e.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"),s=JSON.parse(atob(a));if(e)s.from_editor_post_id=e;else{const e=new URLSearchParams(window.location.search);s.from_site_editor_post_id=e.get("postId"),s.from_site_editor_post_type=e.get("postType")}r=(0,n.addQueryArgs)(t,{state:btoa(JSON.stringify(s))})}catch(e){0}return r}},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:s,validValues:o,default:i}=e[n];return t[n]="boolean"===a?"false"!==r&&!!r:s?s(r)?r:i:o?o.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),s=r(51806),o=r(65235),i=r.n(o),l=r(73139);const c=({children:e=null,isError:t=!1,...r})=>{const n=i()("help-message",{"help-message-is-error":t});return e&&(0,s.createElement)("div",a()({className:n},r),t&&(0,s.createElement)(l.Z,{size:"24","aria-hidden":"true",role:"img",focusable:"false"}),(0,s.createElement)("span",null,e))}},81427:(e,t,r)=>{"use strict";r.d(t,{Ae:()=>y,EL:()=>b,EU:()=>v,FG:()=>m,He:()=>d,IM:()=>f,JO:()=>g,Vq:()=>C,h:()=>w,ll:()=>E,o1:()=>_,yk:()=>h,yu:()=>S,zf:()=>k});var n=r(82674),a=r.n(n),s=r(51806),o=r(80550),i=r(55609),l=r(65235),c=r.n(l),u=r(70355);const p=o.O["Jetpack Green 40"],d=e=>(0,s.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,s.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,s.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,s.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,s.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,s.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,s.createElement)(i.G,null,(0,s.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,s.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,s.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,s.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,s.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,s.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,s.createElement)(i.SVG,a()({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),(0,s.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,s.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,s.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,s.createElement)(i.G,{id:"Icon"},(0,s.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,s.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,s.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,s.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,s.createElement)(i.G,{id:"Photos"},(0,s.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,s.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,s.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,s.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,s.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,s.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,s.createElement)(i.G,{id:"Google"},(0,s.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,s.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,s.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,s.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,s.createElement)(i.Rect,{x:"679.2",y:"172.7",class:"st4",fill:e,width:"14.8",height:"99.3"}),(0,s.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=({size:e=24,border:t=0,className:r,color:n=p})=>{const a=t?-t/e*32:0;return(0,s.createElement)(i.SVG,{className:c()("jetpack-logo",r),width:e,height:e,viewBox:`${a} ${a} ${32-2*a} ${32-2*a}`},(0,s.createElement)(i.Path,{className:"jetpack-logo__icon-circle",fill:n,stroke:t?"#fff":"transparent",strokeWidth:t,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z"}),(0,s.createElement)(i.Polygon,{className:"jetpack-logo__icon-triangle",fill:"#fff",points:`15,19 ${7-.5*a},19 15,${3-a}`}),(0,s.createElement)(i.Polygon,{className:"jetpack-logo__icon-triangle",fill:"#fff",points:`17,${29+a} 17,13 ${25+.5*a},13`}))},b=()=>(0,s.createElement)(i.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(i.Rect,{width:"24",height:"24",rx:"5",fill:"#069E08"}),(0,s.createElement)(i.G,{clipPath:"url(#clip0_2_1297)"},(0,s.createElement)(i.Path,{d:"M11.9829 3C7.02857 3 3 7.02857 3 11.9829C3 16.9371 7.02857 20.9657 11.9829 20.9657C16.9371 20.9657 20.9657 16.9371 20.9657 11.9829C20.9657 7.02857 16.9371 3 11.9829 3ZM11.52 13.4743H7.04571L11.52 4.76571V13.4743ZM12.4286 19.1829V10.4743H16.9029L12.4286 19.1829Z",fill:"white"}))),v=()=>(0,s.createElement)(i.SVG,{width:"104",height:"59",viewBox:"0 0 104 59",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"jetpack-app-icon"},(0,s.createElement)(i.Path,{d:"M55 29.5C55 14.3475 42.6525 2 27.5 2C12.32 2 0 14.3475 0 29.5C0 44.68 12.32 57 27.5 57C42.6525 57 55 44.68 55 29.5ZM21.395 44.2675L12.0175 19.105C13.53 19.05 15.235 18.885 15.235 18.885C16.61 18.72 16.445 15.7775 15.07 15.8325C15.07 15.8325 11.0825 16.135 8.5525 16.135C8.0575 16.135 7.535 16.135 6.9575 16.1075C11.33 9.3975 18.8925 5.0525 27.5 5.0525C33.9075 5.0525 39.7375 7.445 44.1375 11.4875C42.2675 11.185 39.6 12.56 39.6 15.8325C39.6 17.8675 40.8375 19.5725 42.075 21.6075C43.0375 23.285 43.5875 25.3475 43.5875 28.3725C43.5875 32.47 39.7375 42.1225 39.7375 42.1225L31.405 19.105C32.89 19.05 33.66 18.6375 33.66 18.6375C35.035 18.5 34.87 15.2 33.495 15.2825C33.495 15.2825 29.535 15.6125 26.95 15.6125C24.5575 15.6125 20.5425 15.2825 20.5425 15.2825C19.1675 15.2 19.0025 18.5825 20.3775 18.6375L22.9075 18.8575L26.3725 28.235L21.395 44.2675ZM47.8775 29.5C48.5375 27.74 49.9125 24.3575 49.06 17.8125C50.985 21.36 51.9475 25.265 51.9475 29.5C51.9475 38.5475 47.19 46.66 39.8475 50.895C42.515 43.7725 45.1825 36.595 47.8775 29.5ZM16.775 51.7475C8.58 47.7875 3.0525 39.2075 3.0525 29.5C3.0525 25.925 3.685 22.68 5.0325 19.6275C8.9375 30.325 12.8425 41.05 16.775 51.7475ZM27.8575 33.515L34.9525 52.71C32.5875 53.5075 30.1125 53.9475 27.5 53.9475C25.3275 53.9475 23.1825 53.645 21.2025 53.04C23.43 46.495 25.6575 40.005 27.8575 33.515Z",fill:"#0675C4"}),(0,s.createElement)(i.Rect,{x:"46",y:"1",width:"57",height:"57",rx:"28.5",fill:"white"}),(0,s.createElement)(i.Path,{d:"M74.5 2C59.3497 2 47 14.316 47 29.5C47 44.6841 59.316 57 74.5 57C89.6841 57 102 44.6841 102 29.5C102 14.316 89.6841 2 74.5 2ZM73.0828 34.0552H59.3834L73.0828 7.39877V34.0552ZM75.8834 51.5337V24.8773H89.5491L75.8834 51.5337Z",fill:"#069E08"}),(0,s.createElement)(i.Rect,{x:"46",y:"1",width:"57",height:"57",rx:"28.5",stroke:"white",strokeWidth:"2"})),k={foreground:(0,u.m)(),src:(0,s.createElement)(i.SVG,{viewBox:"0 0 100 100"},(0,s.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"}))},y={foreground:(0,u.m)(),src:(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20.7 17",xmlSpace:"preserve"},(0,s.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"}))},w={foreground:(0,u.m)(),src:(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43",xmlSpace:"preserve"},(0,s.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"}))},E=((0,u.m)(),(0,s.createElement)(i.SVG,{viewBox:"0 0 24 24"},(0,s.createElement)(i.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,s.createElement)(i.G,null,(0,s.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"}))),(0,u.m)(),(0,s.createElement)(i.SVG,{viewBox:"0 0 24 24"},(0,s.createElement)(i.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,s.createElement)(i.G,null,(0,s.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,s.createElement)(i.SVG,{viewBox:"0 0 24 24"},(0,s.createElement)(i.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,s.createElement)(i.G,null,(0,s.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,s.createElement)(i.SVG,{viewBox:"0 0 24 24"},(0,s.createElement)(i.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,s.createElement)(i.G,null,(0,s.createElement)(i.Path,{d:"M11.1114 8H20.0002M11.1113 15H20.0002",stroke:(0,u.m)(),strokeWidth:"1.5"}),(0,s.createElement)(i.Path,{d:"M4 10V6L8 8L4 10Z",fill:(0,u.m)()}),(0,s.createElement)(i.Path,{d:"M4 17V13L8 15L4 17Z",fill:(0,u.m)()}))),(0,u.m)(),(0,s.createElement)(i.SVG,{viewBox:"0 0 24 24"},(0,s.createElement)(i.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,s.createElement)(i.G,null,(0,s.createElement)(i.Path,{d:"M4 12V4L11 8L4 12Z"}),(0,s.createElement)(i.Path,{d:"M4 14.5H20V16H4V14.5Z"}),(0,s.createElement)(i.Path,{d:"M4 18.5H13V20H4V18.5Z"}))),(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.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,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.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,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.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,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M0 0h24v24H0z",fill:"none"}),(0,s.createElement)(i.Path,{d:"M7 2v11h3v9l7-12h-4l4-8z",fill:"currentColor"})),(0,s.createElement)(i.SVG,{width:"29",height:"21",viewBox:"0 0 29 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.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,s.createElement)(i.SVG,{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.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"})),C=((0,s.createElement)(i.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",style:{fill:"none"}},(0,s.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,s.createElement)("line",{x1:"9.75",y1:"9",x2:"9.75",y2:"4",stroke:"currentColor",strokeWidth:"1.5"}),(0,s.createElement)("line",{x1:"14.25",y1:"9",x2:"14.25",y2:"4",stroke:"currentColor",strokeWidth:"1.5"})),(0,s.createElement)(i.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.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,s.createElement)(i.Path,{d:"M5 7L12 13L19 7",stroke:"currentColor",strokeWidth:"1.5"})),(0,s.createElement)(i.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.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,s.createElement)(i.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.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"})),(0,s.createElement)(i.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(i.Path,{d:"M20 3H4c-.6 0-1 .4-1 1v16c0 .5.4 1 1 1h8.6v-7h-2.3v-2.7h2.3v-2c0-2.3 1.4-3.6 3.5-3.6 1 0 1.8.1 2.1.1v2.4h-1.4c-1.1 0-1.3.5-1.3 1.3v1.7h2.7l-.4 2.8h-2.3v7H20c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1z"}))),S=(0,s.createElement)(i.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(i.G,null,(0,s.createElement)(i.Path,{d:"M12 4.622c2.403 0 2.688.01 3.637.052.877.04 1.354.187 1.67.31.42.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.67.043.95.052 1.235.052 3.638s-.01 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.42-.358.72-.673 1.036-.315.315-.615.51-1.035.673-.317.123-.794.27-1.67.31-.95.043-1.234.052-3.638.052s-2.688-.01-3.637-.052c-.877-.04-1.354-.187-1.67-.31-.42-.163-.72-.358-1.036-.673-.315-.315-.51-.615-.673-1.035-.123-.317-.27-.794-.31-1.67-.043-.95-.052-1.235-.052-3.638s.01-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.42.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.67-.31.95-.043 1.235-.052 3.638-.052M12 3c-2.444 0-2.75.01-3.71.054s-1.613.196-2.185.418c-.592.23-1.094.538-1.594 1.04-.5.5-.807 1-1.037 1.593-.223.572-.375 1.226-.42 2.184C3.01 9.25 3 9.555 3 12s.01 2.75.054 3.71.196 1.613.418 2.186c.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.266.054 3.71.054s2.75-.01 3.71-.054 1.613-.196 2.186-.418c.592-.23 1.094-.538 1.594-1.038s.808-1.002 1.038-1.594c.222-.572.375-1.227.418-2.185.044-.96.054-1.266.054-3.71s-.01-2.75-.054-3.71-.196-1.613-.418-2.186c-.23-.592-.538-1.094-1.038-1.594s-1.002-.808-1.594-1.038c-.572-.222-1.227-.375-2.185-.418C14.75 3.01 14.445 3 12 3zm0 4.378c-2.552 0-4.622 2.07-4.622 4.622s2.07 4.622 4.622 4.622 4.622-2.07 4.622-4.622S14.552 7.378 12 7.378zM12 15c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zm4.804-8.884c-.596 0-1.08.484-1.08 1.08s.484 1.08 1.08 1.08c.596 0 1.08-.484 1.08-1.08s-.483-1.08-1.08-1.08z"})))},12923:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(13419),a=r(92819);function s(){return(0,a.get)((0,n.Pb)(),["jetpack","is_active"],!1)}},99621:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(13419),a=r(92819);function s(){return(0,a.get)((0,n.Pb)(),["jetpack","is_offline_mode"],!1)}},63066:(e,t,r)=>{"use strict";var n=r(13419),a=r(86989),s=r.n(a),o=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 s()({path:"/jetpack/v4/site"});e=JSON.parse(t.data).plan.product_name}finally{const t=l();(0,o.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&&(r.p=window.Jetpack_Block_Assets_Base_Url)},31985:(e,t,r)=>{"use strict";r.d(t,{S:()=>l,Z:()=>i});var n=r(13419),a=r(4981),s=r(92694);const o="jetpack/";function i(e,t,r=[],i=!0){const l="string"==typeof e?e:e.name,c=l.startsWith(o),u=c?l.slice(o.length):l,{available:p,details:d,unavailableReason:m}=(0,n.OZ)(u),h=(0,n._D)(m,d),g=i||c?o:"";if(!p&&!h)return!1;const f=g+u,b=(0,a.registerBlockType)("object"==typeof e?e:f,t);return h&&(0,s.addFilter)("editor.BlockListBlock",`${f}-with-has-warning-is-interactive-class-names`,(0,n.T)(f)),r.forEach((e=>(0,a.registerBlockType)(g+e.name,e.settings))),b}function l(e,t,r,a){const s={...t,icon:(0,n.lt)(e),attributes:e.attributes||{}},{variations:o}=e;return Array.isArray(o)&&o.length>0&&(s.variations=o.map((e=>({...e,icon:(0,n.lt)(e)})))),i(e,s,r,a)}},36598:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(70444);const s=(e,t=24,r=24,s="0 0 24 24")=>(0,n.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:t,height:r,viewBox:s},(0,n.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0V0z",className:"icon-filler"}),e)},66425:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(51806),a=r(52175);const s=(e,t,r,s,o)=>{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&&s(t),(i||""===l)&&(0,n.createElement)(a.PlainText,{value:l,placeholder:r,"aria-label":r,onChange:o}))}},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:()=>o});var n=r(86989),a=r.n(n),s=r(92819);function o(e,t=s.noop){return t(!0),new Promise(((r,n)=>{a()({path:`/wpcom/v2/resolve-redirect/?url=${encodeURIComponent(e)}`}).then((a=>{t(!1);const s=a.status?parseInt(a.status,10):null;s&&s>=400?n():r(a.url||e)}),(()=>{t(!1),n()}))}))}},46867:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(9818),a=r(69307),s=r(92819);function o(e,t=s.noop){const[r,o]=(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,p=(0,n.useSelect)((e=>!!window.wp?.customize||!!e("core/edit-widgets"))),d=(0,n.dispatch)("core/editor").savePost,m=(0,n.useSelect)((e=>e("core").__experimentalGetDirtyEntityRecords())),h=async e=>{e.preventDefault(),u?l&&i&&await d(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||(o(!0),h(n).then((()=>{!function(e,t,r=!1){t&&t(e),r?window.open(e,"_blank"):window.top.location.href=e}(e,t,p)})))},isRedirecting:r}}},23795:(e,t,r)=>{"use strict";r.d(t,{U_:()=>o,_5:()=>n,dt:()=>a,hp:()=>s});const n="free",a="tiered",s="unlimited",o=e=>e?0===e?.value?n:1===e?.value?s:a:null},28229:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(69307);const a=e=>{e&&cancelAnimationFrame(e.id)},s=(e,t=0)=>{const r=(0,n.useRef)(),s=(0,n.useRef)(e);s.current=e,(0,n.useEffect)((()=>(r.current=((e,t=0)=>{const r=t<0?0:t,n={id:0};let a=Date.now();const s=()=>{const t=Date.now();t-a>=r&&(a=t,e()),n.id=requestAnimationFrame(s)};return n.id=requestAnimationFrame(s),n})((()=>{s.current()}),t),()=>{a(r.current)})),[t]);return(0,n.useCallback)((()=>{a(r.current)}),[])}},78798:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(13419),a=r(9818),s=r(92694),o=r(92819),i=r(46867);const l="a8c.wpcom-block-editor.openCheckoutModal";function c(e,t=o.noop){const{checkoutUrl:r,planData:c}=(0,a.useSelect)((t=>{const r=t("core/editor"),a=t("wordpress-com/plans"),{id:s,type:o}=r.getCurrentPost(),i=a&&a.getPlan(e);return{checkoutUrl:(0,n.Qq)({plan:i,planSlug:e,postId:s,postType:o}),planData:i}}),[]),{autosave:u,autosaveAndRedirect:p,isRedirecting:d}=(0,i.Z)(r,t);return[r,async e=>{if(e.preventDefault(),(0,s.hasAction)(l))return e.preventDefault(),u(e),void(0,s.doAction)(l,{products:[c]});p(e)},d,c]}},81673:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(69307);const a=e=>{const t=(0,n.useRef)();return(0,n.useEffect)((()=>{t.current=e}),[e]),t.current};function s({attributes:e,disableEffects:t=!1,setAttributes:r}){const{align:s,width:o}=e,i=a(s);(0,n.useEffect)((()=>{if(t)return;i!==s&&("left"===s||"right"===s)&&o?.includes("%")&&r({width:void 0})}),[s,t,i,r,o])}},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});var n=r(82674),a=r.n(n),s=r(51806),o=r(55609),i=r(69307),l=r(65736),c=r(65235),u=r.n(c);const __=l.__,p=[{value:"%",label:"%",default:100},{value:"px",label:"px",default:150},{value:"em",label:"em",default:10}],d=[{value:"px",label:"px",default:150},{value:"em",label:"em",default:10}],m=["25%","50%","75%","100%"];function h(e){return(0,s.createElement)(o.PanelBody,{title:__("Width settings","jetpack")},(0,s.createElement)(g,a()({showLabel:!1},e)))}function g({align:e,width:t,onChange:r,showLabel:n=!0}){const[a,l]=(0,i.useState)("%");(0,i.useEffect)((()=>{void 0===t&&l("px")}),[t]);const c="left"===e||"right"===e;return(0,s.createElement)(o.BaseControl,{label:n&&__("Width","jetpack")},(0,s.createElement)("div",{className:u()("jetpack-block-width-controls",{"is-aligned":c})},!c&&(0,s.createElement)(o.ButtonGroup,{"aria-label":__("Percentage Width","jetpack")},m.map((e=>(0,s.createElement)(o.Button,{key:e,isSmall:!0,variant:e===t?"primary":void 0,onClick:()=>function(e){const n=t===e?void 0:e;l("%"),r(n)}(e)},e)))),(0,s.createElement)(o.__experimentalUnitControl,{isResetValueOnUnitChange:!0,max:"%"===a||t?.includes("%")?100:void 0,min:0,onChange:e=>r(e),onUnitChange:e=>l(e),size:"small",units:c?d:p,value:t})))}},97115:(e,t,r)=>{"use strict";r.d(t,{Vy:()=>s,Wp:()=>a,_5:()=>o,tT:()=>n});const n="jetpack/media-source",a="is-playing",s="is-error",o="is-paused"},14688:(e,t,r)=>{"use strict";var n=r(9818),a=r(97115),s=r(66858);if(void 0!==n.createReduxStore){const e=(0,n.createReduxStore)(a.tT,s.Z);(0,n.register)(e)}else(0,n.registerStore)(a.tT,s.Z)},66858:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(97115);const a={sources:{},default:null},s={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]:s.getDefaultMediaSource(e);return r?.state},getMediaSourceCurrentTime(e,t){const r=t?e.sources?.[t]:s.getDefaultMediaSource(e);return r?.currentTime},getMediaSourceDuration(e,t){if(!t){const t=s.getDefaultMediaSource(e);return t?.duration}return e.sources?.[t]?.duration},getMediaSourceDomReference(e,t){const r=t?e.sources?.[t]:s.getDefaultMediaSource(e);if(!r)return;const n=r?.domId;return n?document.getElementById(n):void 0}},o={reducer(e=a,t){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:s}},6247:(e,t,r)=>{"use strict";r.r(t),r.d(t,{saveProduct:()=>b,setApiState:()=>g,setConnectUrl:()=>m,setConnectedAccountDefaultCurrency:()=>h,setNewsletterCategories:()=>k,setNewsletterCategoriesSubscriptionsCount:()=>y,setProducts:()=>d,setSiteSlug:()=>f,setSubscriberCounts:()=>v});var n=r(25607),a=r(86989),s=r.n(a),o=r(65736),i=r(14436),l=r(51585),c=r(79162),u=r(23267),p=r(46529);const __=o.__,d=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=(e,t=i.Bn,r=(()=>{}),a=(()=>{}),m=!0)=>async({dispatch:i,registry:h})=>{const{title:g,price:f,currency:b}=e;if(!g||0===g.length)return(0,p.q)((0,l.l)("product requires a name",t),h),void a(!1);const v=parseFloat(f),k=(0,c.hj)(b);if(v<k)return(0,p.q)((0,o.sprintf)(
// translators: %s: Price
__("Minimum allowed price is %s.","jetpack"),(0,n.ZP)(k,b)),h),void a(!1);if(!(0,c.vs)(b,v))return(0,p.q)((0,l.l)("product requires a valid price",t),h),void a(!1);try{const n=await s()({path:"/wpcom/v2/memberships/product",method:"POST",data:e}),o={id:n.id,title:n.title,interval:n.interval,price:n.price,currency:n.currency},c=h.select(u.G4).getProducts();i(d(c.concat([o]))),r([o.id]),m&&(0,p.w)((0,l.l)("successfully created product",t),h),a(!0)}catch(e){(0,p.q)((0,l.l)("there was an error when adding the product",t),h),a(!1)}},v=e=>({type:"SET_SUBSCRIBER_COUNTS",subscriberCounts:e}),k=e=>({type:"SET_NEWSLETTER_CATEGORIES",newsletterCategories:e}),y=e=>({type:"SET_NEWSLETTER_CATEGORIES_SUBSCRIPTIONS_COUNT",newsletterCategoriesSubscriptionsCount:e})},23267:(e,t,r)=>{"use strict";r.d(t,{G4:()=>n,P:()=>o,Zq:()=>i,cH:()=>s,lp:()=>a});const n="jetpack/membership-products",a=0,s=1,o=2,i="tier"},7652:(e,t,r)=>{"use strict";r.d(t,{h:()=>c});var n=r(9818),a=r(6247),s=r(23267),o=r(93100),i=r(20360),l=r(93245);const c=(0,n.createReduxStore)(s.G4,{actions:a,reducer:o.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},newsletterCategories:{enabled:!1,categories:[]}};function a(e=n,t){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};case"SET_NEWSLETTER_CATEGORIES":return{...e,newsletterCategories:t.newsletterCategories};case"SET_NEWSLETTER_CATEGORIES_SUBSCRIPTIONS_COUNT":return{...e,newsletterCategoriesSubscriptionsCount:t.newsletterCategoriesSubscriptionsCount}}return e}},20360:(e,t,r)=>{"use strict";r.r(t),r.d(t,{fetchNewsletterCategoriesSubscriptionsCount:()=>k,getNewsletterCategories:()=>C,getNewsletterCategoriesSubscriptionsCount:()=>S,getNewsletterTierProducts:()=>w,getProducts:()=>E,getSubscriberCounts:()=>_});var n=r(86989),a=r.n(n),s=r(12238),o=r(96483),i=r(14436),l=r(51585),c=r(73905),u=r(74251),p=r(6247),d=r(23267),m=r(46529);const h="membership-products-resolver-getProducts",g="membership-products-resolver-getSubscriberCounts",f="membership-products-resolver-getNewsletterCategories",b="membership-products-resolver-getNewsletterCategoriesSubscriptionsCount";let v=!1;const k=async e=>{const t=await a()({path:`/wpcom/v2/newsletter-categories/count?term_ids=${e.join(",")}`,method:"GET"});if(!t||"object"!=typeof t)throw new Error("Unexpected API response");const r=t?.errors&&Object.values(t.errors)?.[0]?.[0];if(r)throw new Error(r);return t},y=(e,t,r)=>{if(e.length>0)return;const n=r.getProductsNoResolver()[0]?.id;n&&t([n])},w=(e=i.Bn,t=[],r=(()=>{}))=>E(e,t,r,!1),E=(e=i.Bn,t=[],r=(()=>{}),n=!0)=>async({dispatch:i,registry:g,select:f})=>{if(await c.Z.blockExecution(h),v)return void y(t,r,f);const b=c.Z.acquire(h);try{const c=await(async()=>{const e=(0,o.getQueryArg)(window.location.href,"origin"),t=(0,o.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(s.store).getCurrentPostId();r((0,p.setConnectUrl)((0,u.Z)(n,e.connect_url))),r((0,p.setSiteSlug)(e.site_slug)),r((0,p.setProducts)(e.products)),r((0,p.setConnectedAccountDefaultCurrency)(e.connected_account_default_currency)),r((0,p.setApiState)(e.connected_account_id?d.cH:d.P))})(c,g,i),(e=>!e.products.length&&e.connected_account_id)(c)&&await(async(e,t,r,n)=>{await r((0,p.saveProduct)({title:(0,l.l)("default new product title",e),currency:"USD",price:5,interval:"1 month"},e,t,(()=>{}),n))})(e,r,i,n),y(t,r,f),v=!0}catch(e){i((0,p.setConnectUrl)(null)),i((0,p.setApiState)(d.P)),(0,m.q)(e.message,g)}c.Z.release(b)},_=()=>async({dispatch:e,registry:t})=>{await c.Z.blockExecution(g);const r=c.Z.acquire(g);try{const t=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})();e((0,p.setSubscriberCounts)({socialFollowers:t.counts.social_followers,emailSubscribers:t.counts.email_subscribers,paidSubscribers:t.counts.paid_subscribers}))}catch(r){e((0,p.setApiState)(d.P)),(0,m.q)(r.message,t)}c.Z.release(r)},C=()=>async({dispatch:e,registry:t})=>{await c.Z.blockExecution(f);const r=c.Z.acquire(f);try{const t=await(async()=>{const e=await a()({path:"/wpcom/v2/newsletter-categories"});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})();e((0,p.setNewsletterCategories)({enabled:t.enabled,categories:t.newsletter_categories}))}catch(r){e((0,p.setApiState)(d.P)),(0,m.q)(r.message,t)}c.Z.release(r)},S=(e=[])=>async({dispatch:t,registry:r})=>{await c.Z.blockExecution(b);const n=c.Z.acquire(b);try{const r=await k(e);t((0,p.setNewsletterCategoriesSubscriptionsCount)(r.subscriptions_count))}catch(e){t((0,p.setApiState)(d.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:()=>s,getConnectedAccountDefaultCurrency:()=>o,getNewsletterCategories:()=>b,getNewsletterCategoriesEnabled:()=>v,getNewsletterCategoriesSubscriptionsCount:()=>k,getNewsletterTierProducts:()=>p,getProduct:()=>c,getProducts:()=>i,getProductsNoResolver:()=>l,getSelectedProducts:()=>u,getSiteSlug:()=>d,getSubscriberCounts:()=>f,hasInvalidProducts:()=>y,isApiStateConnected:()=>m,isApiStateLoading:()=>h,isInvalidProduct:()=>g});var n=r(23267);const a=e=>e.apiState,s=e=>e.connectUrl,o=e=>e.connectedAccountDefaultCurrency,i=e=>e.products,l=e=>i(e),c=(e,t)=>i(e).find((e=>e.id===t)),u=(e,t)=>i(e).filter((e=>t.includes(e.id))),p=e=>e.products.filter((e=>e.type===n.Zq)),d=e=>e.siteSlug,m=e=>e.apiState===n.cH,h=e=>e.apiState===n.lp,g=(e,t)=>!!t&&!c(e,t),f=e=>e.subscriberCounts,b=e=>e.newsletterCategories.categories,v=e=>e.newsletterCategories.enabled,k=e=>e.newsletterCategoriesSubscriptionsCount,y=(e,t)=>!!t&&t.some((t=>g(e,t)))},46529:(e,t,r)=>{"use strict";r.d(t,{q:()=>a,w:()=>s});var n=r(53961);const a=(e,t)=>t.dispatch(n.store).createErrorNotice(e,{type:"snackbar"}),s=(e,t)=>t.dispatch(n.store).createSuccessNotice(e,{type:"snackbar"})},68802:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(86989),a=r.n(n),s=r(19503);const o={setPlans:e=>({type:s.mf,plans:e}),fetchFromAPI:e=>({type:s.ad,url:e}),storeAiAssistantFeature:e=>({type:s.i9,feature:e}),fetchAiAssistantFeature:()=>async({dispatch:e})=>{e({type:s.Ob});try{const t=await a()({path:s.fJ});e(o.storeAiAssistantFeature(function(e){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"],usagePeriod:{currentStart:e["usage-period"]?.["current-start"],nextStart:e["usage-period"]?.["next-start"],requestsCount:e["usage-period"]?.["requests-count"]||0},currentTier:e["current-tier"],nextTier:e["next-tier"],tierPlansEnabled:!!e["tier-plans-enabled"]}}(t)))}catch(e){console.error(e)}},increaseAiAssistantRequestsCount:(e=1)=>({dispatch:t})=>{t({type:s.VK,count:e}),t(o.decreaseAsyncRequestCountdownValue())},decreaseAsyncRequestCountdownValue:()=>async({dispatch:e,select:t})=>{e({type:s.sQ});t.getAsyncRequestCountdownValue()<=0&&e(o.enqueueAiAssistantFeatureAyncRequest())},enqueueAiAssistantFeatureAyncRequest:()=>({dispatch:e})=>{e.dequeueAiAssistantFeatureAyncRequest();const t=setTimeout((()=>{e(o.fetchAiAssistantFeature())}),s.gC);e({type:s.vS,timerId:t})},dequeueAiAssistantFeatureAyncRequest:()=>({dispatch:e,select:t})=>{e({type:s.l0,timerId:0});const r=t.getAsyncRequestCountdownTimerId();r&&window?.clearTimeout(r)},setAiAssistantFeatureRequireUpgrade:(e=!0)=>({type:s.Pu,requireUpgrade:e}),setTierPlansEnabled:(e=!0)=>({type:s.PJ,tierPlansEnabled:e})},i=o},19503:(e,t,r)=>{"use strict";r.d(t,{Jm:()=>p,Ob:()=>o,PJ:()=>c,Pu:()=>l,Re:()=>m,VK:()=>i,aU:()=>d,ad:()=>a,fJ:()=>u,gC:()=>h,i9:()=>s,l0:()=>b,mf:()=>n,sQ:()=>g,vS:()=>f});const n="SET_PLANS",a="FETCH_FROM_API",s="STORE_AI_ASSISTANT_FEATURE",o="REQUEST_AI_ASSISTANT_FEATURE",i="INCREASE_AI_ASSISTANT_REQUESTS_COUNT",l="SET_AI_ASSISTANT_FEATURE_REQUIRE_UPGRADE",c="SET_TIER_PLANS_ENABLED",u="/wpcom/v2/jetpack-ai/ai-assistant-feature",p=20,d=999999999,m=3,h=5e3,g="DECREASE_NEW_ASYNC_REQUEST_COUNTDOWN",f="ENQUEUE_ASYNC_COUNTDOWN_REQUEST",b="DEQUEUE_ASYNC_COUNTDOWN_REQUEST"},29692:(e,t,r)=>{"use strict";var n=r(9818),a=r(68802),s=r(7842);const o="wordpress-com/plans",i=(0,n.createReduxStore)(o,{__experimentalUseThunks:!0,actions:a.Z,reducer:s.Z,selectors:{getPlan:(e,t)=>e.plans.find((e=>e.product_slug===t)),getAiAssistantFeature(e){const t={...e.features.aiAssistant};return delete t._meta,t},getIsRequestingAiAssistantFeature:e=>e.features.aiAssistant?._meta?.isRequesting,getAsyncRequestCountdownValue:e=>e.features.aiAssistant?._meta?.asyncRequestCountdown,getAsyncRequestCountdownTimerId:e=>e.features.aiAssistant?._meta?.asyncRequestTimerId},controls:{FETCH_FROM_API:({url:e})=>fetch(e).then((e=>e.json()))},resolvers:{*getPlan(){const e=yield a.Z.fetchFromAPI("https://public-api.wordpress.com/rest/v1.5/plans");return a.Z.setPlans(e)},getAiAssistantFeature:e=>{if(!e?.features?.aiAssistant)return a.Z.fetchAiAssistantFeature()}}});(0,n.register)(i),window.Jetpack_Editor_Initial_State?.["ai-assistant"]?.["is-enabled"]&&(0,n.select)(o).getAiAssistantFeature()},7842:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(19503);const a={plans:[],features:{aiAssistant:{hasFeature:!0,isOverLimit:!1,requestsCount:0,requestsLimit:n.Jm,requireUpgrade:!1,errorMessage:"",errorCode:"",upgradeType:"default",currentTier:{slug:"ai-assistant-tier-free",value:0,limit:20},usagePeriod:{currentStart:"",nextStart:"",requestsCount:0},nextTier:null,tierPlansEnabled:!1,_meta:{isRequesting:!1,asyncRequestCountdown:n.Re,asyncRequestTimerId:0}}}};function s(e=a,t){switch(t.type){case n.mf:return{...e,plans:t.plans};case n.Ob:return{...e,features:{...e.features,aiAssistant:{...e.features.aiAssistant,_meta:{...e.features.aiAssistant._meta,isRequesting:!0,asyncRequestCountdown:n.Re,asyncRequestTimerId:0}}}};case n.i9:return{...e,features:{...e.features,aiAssistant:{...t.feature,_meta:{...e.features.aiAssistant._meta,isRequesting:!1}}}};case n.VK:{const r=e.features.aiAssistant.usagePeriod||{requestsCount:0},a=e.features.aiAssistant.requestsCount+t.count;r.requestsCount+=t.count;const s=e.features.aiAssistant.currentTier?.value,o=void 0===s&&!e.features.aiAssistant.hasFeature||0===s,i=void 0===s&&e.features.aiAssistant.hasFeature||1===s;let l=e.features.aiAssistant.currentTier?.limit;i?l=n.aU:o&&(l=e.features.aiAssistant.requestsLimit);const c=(i||o?a:e.features.aiAssistant.usagePeriod?.requestsCount)>=l,u=c&&null!==e.features.aiAssistant.nextTier;return{...e,features:{...e.features,aiAssistant:{...e.features.aiAssistant,isOverLimit:c,requestsCount:a,requireUpgrade:u,usagePeriod:{...r}}}}}case n.sQ:return{...e,features:{...e.features,aiAssistant:{...e.features.aiAssistant,_meta:{...e.features.aiAssistant._meta,asyncRequestCountdown:e.features.aiAssistant._meta.asyncRequestCountdown-1}}}};case n.vS:return{...e,features:{...e.features,aiAssistant:{...e.features.aiAssistant,_meta:{...e.features.aiAssistant._meta,asyncRequestTimerId:t.timerId}}}};case n.Pu:return{...e,features:{...e.features,aiAssistant:{...e.features.aiAssistant,requireUpgrade:t.requireUpgrade,...t.requireUpgrade?{isOverLimit:!0}:{}}}};case n.PJ:return{...e,features:{...e.features,aiAssistant:{...e.features.aiAssistant,tierPlansEnabled:t.tierPlansEnabled}}}}return e}},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:()=>s});var n=r(43317),a=r(5375);function s(e,t,r={}){const s=(0,n.X)(t);if(!s||isNaN(e))return null;const{decimal:o,grouping:i,precision:l,symbol:c}={...s,...r},u=e<0?"-":"";let p=(0,a.Z)(Math.abs(e),l,o,i);return r.stripZeros&&(p=function(e,t){const r=new RegExp(`\\${t}0+$`);return e.replace(r,"")}(p,o)),`${u}${c}${p}`}},5375:(e,t,r)=>{"use strict";function n(e,t=0,r=".",n=","){const a=(e+"").replace(/[^0-9+\-Ee.]/g,""),s=isFinite(+a)?+a:0,o=isFinite(+t)?Math.abs(t):0,i=(o?function(e,t){const r=Math.pow(10,t);return""+(Math.round(e*r)/r).toFixed(t)}(s,o):""+Math.round(s)).split(".");return i[0].length>3&&(i[0]=i[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,n)),(i[1]||"").length<o&&(i[1]=i[1]||"",i[1]+=new Array(o-i[1].length+1).join("0")),i.join(r)}r.d(t,{Z:()=>n})},7211:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n,a=r(53184);function s(){this.intervals={},this.monitorInterval=null,this.windowInstance=null,this.onMessage=e=>{e.source===this.windowInstance&&this.emit("message",e.data)}}n=s.prototype,Object.assign(n,a.EventEmitter.prototype),n.emitChange=function(){this.emit("change")},n.off=n.removeListener,s.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},s.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()},s.prototype.isOpen=function(e){let t=!1;try{t=this.intervals[e]&&this.intervals[e].closed}catch(e){}return!t},s.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))},s.prototype.startMonitoring=function(e,t){this.monitorInterval||(this.monitorInterval=setInterval(this.checkStatus.bind(this),100)),this.intervals[e]=t};const o=s},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}))}},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,s,o=null;function i(...e){if(!i.enabled)return;const n=i,a=Number(new Date),s=a-(r||a);n.diff=s,n.prev=r,n.curr=a,r=a,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,a)=>{if("%%"===r)return"%";o++;const s=t.formatters[a];if("function"==typeof s){const t=e[o];r=s.call(n,t),e.splice(o,1),o--}return r})),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}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!==o?o:(a!==t.namespaces&&(a=t.namespaces,s=t.enabled(e)),s),set:e=>{o=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}},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={},s=Object.keys(e);for(n=0;n<s.length;n++)r=s[n],0<=t.indexOf(r)||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,s),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",o({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},s=["size","onClick","icon","className"];function o(){return o=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},o.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={},s=Object.keys(e);for(n=0;n<s.length;n++)r=s[n],0<=t.indexOf(r)||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,s),c=["gridicon","gridicons-star",i,!!function(e){return 0==e%18}(r)&&"needs-offset",!1,!1].filter(Boolean).join(" ");return a.default.createElement("svg",o({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},s=["size","onClick","icon","className"];function o(){return o=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},o.apply(this,arguments)}},60300:(e,t,r)=>{"use strict";r.r(t),r.d(t,{decode:()=>b,default:()=>w,encode:()=>v,toASCII:()=>y,toUnicode:()=>k,ucs2decode:()=>m,ucs2encode:()=>h});const n=2147483647,a=36,s=/^xn--/,o=/[^\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 p(e){throw new RangeError(l[e])}function d(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 s=0,o=128,i=72,l=e.lastIndexOf("-");l<0&&(l=0);for(let r=0;r<l;++r)e.charCodeAt(r)>=128&&p("not-basic"),t.push(e.charCodeAt(r));for(let d=l>0?l+1:0;d<r;){const l=s;for(let t=1,o=a;;o+=a){d>=r&&p("invalid-input");const l=(u=e.charCodeAt(d++))>=48&&u<58?u-48+26:u>=65&&u<91?u-65:u>=97&&u<123?u-97:a;l>=a&&p("invalid-input"),l>c((n-s)/t)&&p("overflow"),s+=l*t;const m=o<=i?1:o>=i+26?26:o-i;if(l<m)break;const h=a-m;t>c(n/h)&&p("overflow"),t*=h}const m=t.length+1;i=f(s-l,m,0==l),c(s/m)>n-o&&p("overflow"),o+=c(s/m),s%=m,t.splice(s++,0,o)}var u;return String.fromCodePoint(...t)},v=function(e){const t=[],r=(e=m(e)).length;let s=128,o=0,i=72;for(const r of e)r<128&&t.push(u(r));const l=t.length;let d=l;for(l&&t.push("-");d<r;){let r=n;for(const t of e)t>=s&&t<r&&(r=t);const m=d+1;r-s>c((n-o)/m)&&p("overflow"),o+=(r-s)*m,s=r;for(const r of e)if(r<s&&++o>n&&p("overflow"),r===s){let e=o;for(let r=a;;r+=a){const n=r<=i?1:r>=i+26?26:r-i;if(e<n)break;const s=e-n,o=a-n;t.push(u(g(n+s%o,0))),e=c(s/o)}t.push(u(g(e,0))),i=f(o,m,d===l),o=0,++d}++o,++s}return t.join("")},k=function(e){return d(e,(function(e){return s.test(e)?b(e.slice(4).toLowerCase()):e}))},y=function(e){return d(e,(function(e){return o.test(e)?"xn--"+v(e):e}))},w={version:"2.3.1",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:()=>M});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 s(e){return c(e,a)}var o=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function i(e){return c(e,o)}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 p={};function d(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}p.paragraph={filter:"p",replacement:function(e){return"\n\n"+e+"\n\n"}},p.lineBreak={filter:"br",replacement:function(e,t,r){return r.br+"\n"}},p.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"}},p.blockquote={filter:"blockquote",replacement:function(e){return"\n\n"+(e=(e=e.replace(/^\n+|\n+$/g,"")).replace(/^/gm,"> "))+"\n\n"}},p.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"}},p.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 s=a.getAttribute("start"),o=Array.prototype.indexOf.call(a.children,t);n=(s?Number(s)+o:o+1)+".  "}return n+e+(t.nextSibling&&!/\n$/.test(e)?"\n":"")}},p.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"}},p.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,s=((t.firstChild.getAttribute("class")||"").match(/language-(\S+)/)||[null,""])[1],o=t.firstChild.textContent,i=r.fence.charAt(0),l=3,c=new RegExp("^"+i+"{3,}","gm");a=c.exec(o);)a[0].length>=l&&(l=a[0].length+1);var u=n(i,l);return"\n\n"+u+s+"\n"+o.replace(/\n$/,"")+"\n"+u+"\n\n"}},p.horizontalRule={filter:"hr",replacement:function(e,t,r){return"\n\n"+r.hr+"\n\n"}},p.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=d(t.getAttribute("title"));return n&&(n=' "'+n+'"'),"["+e+"]("+r+n+")"}},p.referenceLink={filter:function(e,t){return"referenced"===t.linkStyle&&"A"===e.nodeName&&e.getAttribute("href")},replacement:function(e,t,r){var n,a,s=t.getAttribute("href"),o=d(t.getAttribute("title"));switch(o&&(o=' "'+o+'"'),r.linkReferenceStyle){case"collapsed":n="["+e+"][]",a="["+e+"]: "+s+o;break;case"shortcut":n="["+e+"]",a="["+e+"]: "+s+o;break;default:var i=this.references.length+1;n="["+e+"]["+i+"]",a="["+i+"]: "+s+o}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}},p.emphasis={filter:["em","i"],replacement:function(e,t,r){return e.trim()?r.emDelimiter+e+r.emDelimiter:""}},p.strong={filter:["strong","b"],replacement:function(e,t,r){return e.trim()?r.strongDelimiter+e+r.strongDelimiter:""}},p.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}},p.image={filter:"img",replacement:function(e,t){var r=d(t.getAttribute("alt")),n=t.getAttribute("src")||"",a=d(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,w=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 E(e,t){var r;"string"==typeof e?r=(y=y||new w).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 s=null,o=!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(s&&!/ $/.test(s.data)||o||" "!==c[0]||(c=c.substr(1)),!c){l=f(l);continue}l.data=c,s=l}else{if(1!==l.nodeType){l=f(l);continue}r(l)||"BR"===l.nodeName?(s&&(s.data=s.data.replace(/ $/,"")),s=null,o=!1):n(l)||a(l)?(s=null,o=!0):s&&(o=!1)}var u=b(i,l,a);i=l,l=u}s&&(s.data=s.data.replace(/ $/,""),s.data||f(s))}}({element:r,isBlock:s,isVoid:i,isPre:t.preformattedCode?_:null}),r}function _(e){return"PRE"===e.nodeName||"CODE"===e.nodeName}function C(e,t){return e.isBlock=s(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,o)}(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&&S("left",e,t)&&(r.leading=r.leadingNonAscii);r.trailingAscii&&S("right",e,t)&&(r.trailing=r.trailingNonAscii);return{leading:r.leading,trailing:r.trailing}}(e,t),e}function S(e,t,r){var n,a,o;return"left"===e?(n=t.previousSibling,a=/ $/):(n=t.nextSibling,a=/^ /),n&&(3===n.nodeType?o=a.test(n.nodeValue):r.preformattedCode&&"CODE"===n.nodeName?o=!1:1!==n.nodeType||s(n)||(o=a.test(n.textContent))),o}var x=Array.prototype.reduce,j=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function L(e){if(!(this instanceof L))return new L(e);var t={rules:p,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 A(e){var t=this;return x.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=T.call(t,r)),N(e,n)}),"")}function P(e){var t=this;return this.rules.forEach((function(r){"function"==typeof r.append&&(e=N(e,r.append(t.options)))})),e.replace(/^[\t\r\n]+/,"").replace(/[\t\r\n\s]+$/,"")}function T(e){var t=this.rules.forNode(e),r=A.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 N(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}L.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=A.call(this,new E(e,this.options));return P.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 j.reduce((function(e,t){return e.replace(t[0],t[1])}),e)}};const M=L},23427:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n=r(75908),a=r(9106),s=r(85016),o=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,s.Z)())return(0,o.Z)(this._file.slice(e,t));var r=this._file.slice(e,t);return Promise.resolve({value:r})}},{key:"close",value:function(){}}]),e}(),p=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+d(this._buffer);if(this._done||n){var a=this._getDataFromBuffer(e,t),s=null==a&&this._done;return Promise.resolve({value:a,done:s})}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===d(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 d(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 p(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 s(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),e}r.d(t,{Z:()=>o});var o=function(){function e(){n(this,e)}return s(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 s(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 s(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),s=r(15866),o=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 p(e,t){return p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},p(e,t)}function d(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 o.Z,fileReader:new i.Z,urlStorage:s.H?new s.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&&p(e,t)}(o,e);var t,r,a,s=d(o);function o(){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,o),t=g({},b,{},t),s.call(this,e,t)}return t=o,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),o}(n.Z),k=window,y=k.XMLHttpRequest,w=k.Blob;y&&w&&w.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:()=>o,n:()=>i});var a=!1;try{a="localStorage"in window;var s="tusSupport";localStorage.setItem(s,localStorage.getItem(s))}catch(e){if(e.code!==e.SECURITY_ERR&&e.code!==e.QUOTA_EXCEEDED_ERR)throw e;a=!1}var o=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 s(e){var t="function"==typeof Map?new Map:void 0;return s=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 o(e,arguments,c(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),l(n,e)},s(e)}function o(e,t,r){return o=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},o.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,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=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=s,n.originalResponse=o,n.causingError=a,null!=a&&(e+=", caused by ".concat(a.toString())),null!=s){var i=s.getHeader("X-Request-ID")||"n/a",l=s.getMethod(),c=s.getURL(),u=o?o.getStatus():"n/a",p=o?o.getBody()||"":"n/a";e+=", originated from request (method: ".concat(l,", url: ").concat(c,", response code: ").concat(u,", response text: ").concat(p,", request id: ").concat(i,")")}return n.message=e,n}return r}(s(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:()=>w});var n=r(84097),a=r(41294),s=r.n(a),o=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){p(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 p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(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,s=function(e,t,r){for(var n=Math.floor(e/t),a=[],s=0;s<t;s++)a.push({start:n*s,end:n*(s+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(s.length);var o,l=s.map((function(a,o){var i=0;return t._source.slice(a.start,a.end).then((function(l){var c=l.value;return new Promise((function(l,p){var d=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:p,onProgress:function(e){n=n-i+e,i=e,t._emitProgress(n,r)},_onUploadUrlAvailable:function(){t._parallelUploadUrls[o]=m.url,t._parallelUploadUrls.filter((function(e){return!!e})).length===s.length&&t._saveUploadInUrlStorage()}}),m=new e(c,d);m.start(),t._parallelUploads.push(m)}))}))}));Promise.all(l).then((function(){(o=t._openRequest("POST",t.options.endpoint)).setHeader("Upload-Concat","final;".concat(t._parallelUploadUrls.join(" ")));var e=g(t.options.metadata);return""!==e&&o.setHeader("Upload-Metadata",e),t._sendRequest(o,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(o,e,"tus: invalid or missing Location header")}else t._emitHttpError(o,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 o.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 s=parseInt(r.getHeader("Upload-Length"),10);if(!isNaN(s)||e.options.uploadLengthDeferred){if("function"==typeof e.options._onUploadUrlAvailable&&e.options._onUploadUrlAvailable(),a===s)return e._emitProgress(s,s),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 o.Z("tus: unexpected response while terminating upload",null,n,e)})).catch((function(a){if(a instanceof o.Z||(a=new o.Z("tus: failed to terminate upload",a,n,null)),!k(a,0,r))throw a;var s=r.retryDelays[0],i=r.retryDelays.slice(1),l=u({},r,{retryDelays:i});return new Promise((function(e){return setTimeout(e,s)})).then((function(){return e.terminate(t,l)}))}))}}],r&&d(t.prototype,r),n&&d(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 s in a)n.setHeader(s,a[s]);if(r.addRequestId){var o=(0,l.Z)();n.setHeader("X-Request-ID",o)}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(s())(t,e).toString()}h.defaultOptions=m;const w=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),s=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o=/[\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 p(e){return(e||"").toString().replace(s,"")}var d=[["#","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=p(e)).replace(o,""),t=t||{};var r,n=c.exec(e),a=n[1]?n[1].toLowerCase():"",s=!!n[2],i=!!n[3],l=0;return s?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?s&&(r=r.slice(2)):l>=2&&g(t.protocol)&&(r=n[4]),{protocol:a,slashes:s||g(a),slashesCount:l,rest:r}}function b(e,t,r){if(e=(e=p(e)).replace(o,""),!(this instanceof b))return new b(e,t,r);var s,i,l,c,m,v,k=d.slice(),y=typeof t,w=this,E=0;for("object"!==y&&"string"!==y&&(r=t,t=null),r&&"function"!=typeof r&&(r=a.parse),s=!(i=f(e||"",t=h(t))).protocol&&!i.slashes,w.slashes=i.slashes||s&&t.slashes,w.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(w.protocol)))&&(k[3]=[/(.*)/,"pathname"]);E<k.length;E++)"function"!=typeof(c=k[E])?(l=c[0],v=c[1],l!=l?w[v]=e:"string"==typeof l?~(m="@"===l?e.lastIndexOf(l):e.indexOf(l))&&("number"==typeof c[2]?(w[v]=e.slice(0,m),e=e.slice(m+c[2])):(w[v]=e.slice(m),e=e.slice(0,m))):(m=l.exec(e))&&(w[v]=m[1],e=e.slice(0,m.index)),w[v]=w[v]||s&&c[3]&&t[v]||"",c[4]&&(w[v]=w[v].toLowerCase())):e=c(e,w);r&&(w.query=r(w.query)),s&&t.slashes&&"/"!==w.pathname.charAt(0)&&(""!==w.pathname||""!==t.pathname)&&(w.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],s=!1,o=0;n--;)"."===r[n]?r.splice(n,1):".."===r[n]?(r.splice(n,1),o++):o&&(0===n&&(s=!0),r.splice(n,1),o--);return s&&r.unshift(""),"."!==a&&".."!==a||r.push(""),r.join("/")}(w.pathname,t.pathname)),"/"!==w.pathname.charAt(0)&&g(w.protocol)&&(w.pathname="/"+w.pathname),n(w.port,w.protocol)||(w.host=w.hostname,w.port=""),w.username=w.password="",w.auth&&(~(m=w.auth.indexOf(":"))?(w.username=w.auth.slice(0,m),w.username=encodeURIComponent(decodeURIComponent(w.username)),w.password=w.auth.slice(m+1),w.password=encodeURIComponent(decodeURIComponent(w.password))):w.username=encodeURIComponent(decodeURIComponent(w.auth)),w.auth=w.password?w.username+":"+w.password:w.username),w.origin="file:"!==w.protocol&&g(w.protocol)&&w.host?w.protocol+"//"+w.host:"null",w.href=w.toString()}b.prototype={set:function(e,t,r){var s=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(r||a.parse)(t)),s[e]=t;break;case"port":s[e]=t,n(t,s.protocol)?t&&(s.host=s.hostname+":"+t):(s.host=s.hostname,s[e]="");break;case"hostname":s[e]=t,s.port&&(t+=":"+s.port),s.host=t;break;case"host":s[e]=t,l.test(t)?(t=t.split(":"),s.port=t.pop(),s.hostname=t.join(":")):(s.hostname=t,s.port="");break;case"protocol":s.protocol=t.toLowerCase(),s.slashes=!r;break;case"pathname":case"hash":if(t){var o="pathname"===e?"/":"#";s[e]=t.charAt(0)!==o?o+t:t}else s[e]=t;break;case"username":case"password":s[e]=encodeURIComponent(t);break;case"auth":var i=t.indexOf(":");~i?(s.username=t.slice(0,i),s.username=encodeURIComponent(decodeURIComponent(s.username)),s.password=t.slice(i+1),s.password=encodeURIComponent(decodeURIComponent(s.password))):s.username=encodeURIComponent(decodeURIComponent(t))}for(var c=0;c<d.length;c++){var u=d[c];u[4]&&(s[u[1]]=s[u[1]].toLowerCase())}return s.auth=s.password?s.username+":"+s.password:s.username,s.origin="file:"!==s.protocol&&g(s.protocol)&&s.host?s.protocol+"//"+s.host:"null",s.href=s.toString(),s},toString:function(e){e&&"function"==typeof e||(e=a.stringify);var t,r=this,n=r.host,s=r.protocol;s&&":"!==s.charAt(s.length-1)&&(s+=":");var o=s+(r.protocol&&r.slashes||g(r.protocol)?"//":"");return r.username?(o+=r.username,r.password&&(o+=":"+r.password),o+="@"):r.password?(o+=":"+r.password,o+="@"):"file:"!==r.protocol&&g(r.protocol)&&!n&&"/"!==r.pathname&&(o+="@"),(":"===n[n.length-1]||l.test(r.hostname)&&!r.port)&&(n+=":"),o+=n+r.pathname,(t="object"==typeof r.query?e(r.query):r.query)&&(o+="?"!==t.charAt(0)?"?"+t:t),r.hash&&(o+=r.hash),o}},b.extractProtocol=f,b.location=h,b.trimLeft=p,b.qs=a,e.exports=b},8964:(e,t,r)=>{"use strict";e.exports=r.p+"images/eventbrite-in-page-example-c351ec80e4dd5d39433d.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"},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"},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},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},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},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},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},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},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":"‌"}')},23536:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/ai-assistant","title":"AI Assistant (Experimental)","description":"Elevate your content creation with our AI-powered Gutenberg Block, offering seamless customization and generation. Bear in mind that, as an evolving tool, occasional imprecision may occur.","keywords":["AI","GPT","AL","Magic","help","assistant"],"version":"12.5.0","textdomain":"jetpack","category":"text","icon":"<svg viewBox=\'0 0 32 32\' width=\'32\' height=\'32\' xmlns=\'http://www.w3.org/2000/svg\'><path 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\'/><path 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\'/><path 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\'/></svg>","supports":{"html":false,"multiple":true,"reusable":false},"attributes":{"content":{"type":"string"},"originalContent":{"type":"string"},"promptType":{"type":"string"},"originalMessages":{"type":"array","default":[]},"messages":{"type":"array","default":[]},"useGutenbergSyntax":{"type":"boolean","default":false},"useGpt4":{"type":"boolean","default":false},"customSystemPrompt":{"type":"string","default":""},"userPrompt":{"type":"string","default":""},"requestingState":{"type":"string","default":"init"}},"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."}}}')},22023:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/business-hours","title":"Business Hours","description":"Display opening hours for your business.","keywords":["opening hours","closing time","schedule","working day"],"version":"12.5.0","textdomain":"jetpack","category":"grow","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><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\'/></svg>","supports":{"html":true,"color":{"gradients":true},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true},"align":["wide","full"]},"attributes":{"days":{"type":"array","default":[{"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":[]}]}},"example":{"attributes":{"days":[{"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":[]}]}}}')},23329:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/calendly","title":"Calendly","description":"Embed a calendar for customers to schedule appointments.","keywords":["calendar","schedule","appointments","events","dates"],"version":"12.5.0","textdomain":"jetpack","category":"grow","icon":"<svg viewBox=\'0 0 23 24\' width=\'23\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><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\'/></svg>","supports":{"align":true,"alignWide":false,"html":false},"attributes":{"backgroundColor":{"type":"string","default":"ffffff"},"hideEventTypeDetails":{"type":"boolean","default":false},"primaryColor":{"type":"string","default":"00A2FF"},"textColor":{"type":"string","default":"4D5055"},"style":{"type":"string","default":"inline","enum":["inline","link"]},"url":{"type":"string"}},"example":{"attributes":{"hideEventTypeDetails":false,"style":"inline","url":"https://calendly.com/wpcom/jetpack-block-example"},"innerBlocks":[{"name":"jetpack/button","attributes":{"element":"a","text":"Schedule time with me","uniqueId":"calendly-widget-id","url":"https://calendly.com/wpcom/jetpack-block-example"}}]}}')},58891:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/contact-info","title":"Contact Info","description":"Add an email address, phone number, and physical address with improved markup for better SEO results.","keywords":["email","phone","address"],"version":"12.5.0","textdomain":"jetpack","category":"grow","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><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\'/></svg>","supports":{"align":["wide","full"],"html":false,"color":{"link":true,"gradients":true},"spacing":{"padding":true,"margin":true},"typography":{"fontSize":true,"lineHeight":true}},"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"}}]}}')},98826:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/donations","title":"Donations Form","description":"Collect one-time, monthly, or annually recurring donations.","keywords":["charity","contribution","credit card","debit card","donate","earn","ecommerce","fundraising","fundraiser","gofundme","money","nonprofit","non-profit","paid","patreon","pay","payments","recurring","stripe","sponsor","square","tipping","venmo"],"version":"12.5.0","textdomain":"jetpack","category":"earn","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><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\' /></svg>","supports":{"html":false},"attributes":{"currency":{"type":"string","default":""},"oneTimeDonation":{"type":"object","default":{"show":true,"planId":null,"amounts":[5,15,100],"heading":"Make a one-time donation","extraText":"Your contribution is appreciated.","buttonText":"Donate"}},"monthlyDonation":{"type":"object","default":{"show":true,"planId":null,"amounts":[5,15,100],"heading":"Make a monthly donation","extraText":"Your contribution is appreciated.","buttonText":"Donate monthly"}},"annualDonation":{"type":"object","default":{"show":true,"planId":null,"amounts":[5,15,100],"heading":"Make a yearly donation","extraText":"Your contribution is appreciated.","buttonText":"Donate yearly"}},"showCustomAmount":{"type":"boolean","default":true},"chooseAmountText":{"type":"string","default":"Choose an amount"},"customAmountText":{"type":"string","default":"Or enter a custom amount"},"fallbackLinkUrl":{"type":"string"}},"example":{}}')},33711:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/eventbrite","title":"Eventbrite Checkout","description":"Embed Eventbrite event details and ticket checkout.","keywords":["events","tickets"],"version":"12.5.0","textdomain":"jetpack","category":"embed","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><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\'/></svg>","supports":{"html":false,"align":true},"attributes":{"url":{"type":"string"},"eventId":{"type":"number"},"style":{"type":"string","default":"inline"}},"example":{"attributes":{"url":"https://www.eventbrite.com/e/test-event-tickets-123456789","eventId":123456789,"style":"modal"},"innerBlocks":[{"name":"jetpack/button","attributes":{"element":"a","text":"Register","uniqueId":"eventbrite-widget-id"}}]}}')},13625:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/gif","title":"GIF","description":"Search for and insert an animated image.","keywords":["animated","giphy","image"],"version":"12.5.0","textdomain":"jetpack","category":"embed","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path fill=\'none\' d=\'M0 0h24v24H0V0z\'/><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\'/></svg>","supports":{"html":false,"align":true},"attributes":{"align":{"type":"string","default":"center"},"caption":{"type":"string"},"giphyUrl":{"type":"string"},"searchText":{"type":"string"},"paddingTop":{"type":"string","default":"56.2%"}},"example":{"attributes":{"align":"center","giphyUrl":"https://giphy.com/embed/fxKWgoOG9hzPPkE1oc","paddingTop":"100%","searchText":"WordPress"}}}')},5416:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/google-calendar","title":"Google Calendar","description":"Embed a Google Calendar.","keywords":["events","dates","schedule","appointments"],"version":"12.5.0","textdomain":"jetpack","category":"embed","icon":"<svg viewBox=\'0 0 24 23\' width=\'24\' height=\'23\' xmlns=\'http://www.w3.org/2000/svg\'><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\'/></svg>","supports":{"align":true,"alignWide":true,"html":false},"attributes":{"url":{"type":"string"},"height":{"type":"integer","default":600}},"example":{"attributes":{"url":"https://calendar.google.com/calendar/embed?src=jb4bu80jirp0u11a6niie21pp4%40group.calendar.google.com&ctz=America/New_York"}}}')},96946:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/instagram-gallery","title":"Latest Instagram Posts","description":"Display an automatically updating list of the latest posts from your Instagram feed.","keywords":["images","photos","pictures"],"version":"12.5.0","textdomain":"jetpack","category":"embed","icon":"<svg width=\'24\' height=\'24\' viewBox=\'0 0 24 24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M12 4.622c2.403 0 2.688.01 3.637.052.877.04 1.354.187 1.67.31.42.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.67.043.95.052 1.235.052 3.638s-.01 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.42-.358.72-.673 1.036-.315.315-.615.51-1.035.673-.317.123-.794.27-1.67.31-.95.043-1.234.052-3.638.052s-2.688-.01-3.637-.052c-.877-.04-1.354-.187-1.67-.31-.42-.163-.72-.358-1.036-.673-.315-.315-.51-.615-.673-1.035-.123-.317-.27-.794-.31-1.67-.043-.95-.052-1.235-.052-3.638s.01-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.42.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.67-.31.95-.043 1.235-.052 3.638-.052M12 3c-2.444 0-2.75.01-3.71.054s-1.613.196-2.185.418c-.592.23-1.094.538-1.594 1.04-.5.5-.807 1-1.037 1.593-.223.572-.375 1.226-.42 2.184C3.01 9.25 3 9.555 3 12s.01 2.75.054 3.71.196 1.613.418 2.186c.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.266.054 3.71.054s2.75-.01 3.71-.054 1.613-.196 2.186-.418c.592-.23 1.094-.538 1.594-1.038s.808-1.002 1.038-1.594c.222-.572.375-1.227.418-2.185.044-.96.054-1.266.054-3.71s-.01-2.75-.054-3.71-.196-1.613-.418-2.186c-.23-.592-.538-1.094-1.038-1.594s-1.002-.808-1.594-1.038c-.572-.222-1.227-.375-2.185-.418C14.75 3.01 14.445 3 12 3zm0 4.378c-2.552 0-4.622 2.07-4.622 4.622s2.07 4.622 4.622 4.622 4.622-2.07 4.622-4.622S14.552 7.378 12 7.378zM12 15c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zm4.804-8.884c-.596 0-1.08.484-1.08 1.08s.484 1.08 1.08 1.08c.596 0 1.08-.484 1.08-1.08s-.483-1.08-1.08-1.08z\'></path></svg>","supports":{"align":true,"html":false},"attributes":{"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":true}}}')},88322:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/mailchimp","title":"Mailchimp","description":"Allow readers to join a Mailchimp audience.","keywords":["email","subscription","newsletter"],"version":"12.5.0","textdomain":"jetpack","category":"grow","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'m16.88,11.25c.17-.02.34-.02.49,0,.09-.2.1-.55.02-.93-.12-.57-.28-.91-.61-.86-.33.05-.34.46-.22,1.03.07.32.19.59.32.76\'/><path d=\'m14.03,11.7c.24.1.38.17.44.11.04-.04.03-.11-.03-.2-.12-.19-.36-.38-.61-.49-.52-.22-1.14-.15-1.62.19-.16.12-.31.28-.29.37,0,.03.03.06.09.06.13.01.59-.22,1.11-.25.37-.02.68.09.92.2\'/><path d=\'m13.56,11.97c-.31.05-.48.15-.59.25-.09.08-.15.17-.15.23,0,.03.01.05.02.06.01.01.03.02.05.02.07,0,.23-.06.23-.06.43-.15.71-.13.99-.1.16.02.23.03.26-.03.01-.02.02-.05,0-.1-.07-.12-.38-.32-.81-.26\'/><path d=\'m15.92,12.97c.21.1.44.06.52-.09s-.03-.36-.24-.46c-.21-.1-.44-.06-.52.09-.08.15.03.36.24.46\'/><path d=\'m17.26,11.79c-.17,0-.31.18-.32.42s.13.42.3.43.31-.18.32-.42c0-.23-.13-.42-.3-.43\'/><path d=\'m5.83,16c-.04-.05-.11-.04-.18-.02-.05.01-.1.02-.16.02-.13,0-.23-.06-.29-.15-.08-.12-.07-.3.01-.5l.04-.09c.14-.31.36-.82.11-1.31-.19-.37-.51-.6-.89-.64-.36-.05-.74.09-.98.35-.38.42-.44.98-.36,1.18.03.07.07.09.1.1.06,0,.16-.04.22-.2l.02-.05c.03-.08.08-.24.16-.37.1-.15.25-.26.43-.29.18-.04.37,0,.52.1.26.17.37.5.25.8-.06.16-.15.46-.13.72.04.51.35.71.63.73.27.01.46-.14.51-.25.03-.07,0-.11-.01-.12\'/><path d=\'m8.42,6.69c.89-1.03,1.98-1.92,2.96-2.42.03-.02.07.02.05.05-.08.14-.23.44-.28.67,0,.04.03.06.06.04.61-.42,1.67-.86,2.6-.92.04,0,.06.05.03.07-.14.11-.3.26-.41.41-.02.03,0,.06.03.06.65,0,1.57.23,2.17.57.04.02.01.1-.03.09-.91-.21-2.4-.37-3.94.01-1.38.34-2.43.86-3.2,1.41-.04.03-.09-.02-.05-.06h0Zm4.43,9.95h0s0,0,0,0h0Zm3.67.43s.04-.04.04-.07c0-.04-.04-.06-.07-.06,0,0-1.9.28-3.69-.38.2-.63.71-.41,1.5-.34,1.41.08,2.68-.12,3.62-.39.81-.23,1.88-.69,2.71-1.35.28.61.38,1.29.38,1.29,0,0,.22-.04.4.07.17.11.3.32.21.89-.17,1.05-.62,1.91-1.38,2.7-.46.49-1.02.92-1.65,1.24-.34.18-.7.33-1.08.46-2.84.93-5.75-.09-6.69-2.28-.07-.16-.14-.34-.19-.52-.4-1.44-.06-3.17,1-4.27h0c.07-.07.13-.15.13-.25,0-.09-.05-.18-.1-.24-.37-.54-1.66-1.45-1.4-3.23.19-1.27,1.3-2.17,2.34-2.12l.26.02c.45.03.84.08,1.21.1.62.03,1.18-.06,1.84-.61.22-.19.4-.35.7-.4.03,0,.11-.03.27-.03.16,0,.31.05.45.14.53.35.6,1.21.63,1.83.02.36.06,1.22.07,1.47.03.57.18.65.48.75.17.06.33.1.56.16.7.2,1.12.4,1.38.65.16.16.23.33.25.49.08.6-.47,1.35-1.93,2.03-1.59.74-3.53.93-4.87.78l-.47-.05c-1.07-.14-1.68,1.24-1.04,2.18.41.61,1.54,1.01,2.67,1.01,2.58,0,4.57-1.1,5.31-2.06l.06-.08c.04-.05,0-.08-.04-.05-.6.41-3.28,2.05-6.15,1.56,0,0-.35-.06-.67-.18-.25-.1-.78-.34-.85-.88,2.31.72,3.77.04,3.77.04h0ZM3.8,11.57c-.8.16-1.51.61-1.95,1.24-.26-.22-.74-.63-.83-.8-.69-1.31.76-3.87,1.77-5.32C5.3,3.13,9.21.43,11.02.92c.29.08,1.27,1.21,1.27,1.21,0,0-1.81,1.01-3.49,2.41-2.26,1.74-3.97,4.28-5,7.03h0Zm1.35,6.03c-.12.02-.25.03-.37.03-1.21-.03-2.52-1.12-2.65-2.42-.14-1.43.59-2.53,1.88-2.79.15-.03.34-.05.54-.04.72.04,1.79.6,2.04,2.17.22,1.4-.13,2.82-1.44,3.04h0Zm16.4-2.53s-.08-.28-.17-.58c-.09-.3-.19-.51-.19-.51.37-.56.38-1.06.33-1.34-.05-.35-.2-.65-.49-.96-.29-.31-.89-.62-1.74-.86l-.44-.12s-.02-1.04-.04-1.48c-.01-.32-.04-.82-.2-1.31-.18-.66-.5-1.24-.9-1.61,1.1-1.14,1.79-2.4,1.79-3.48,0-2.08-2.56-2.71-5.7-1.4l-.67.28s-1.2-1.18-1.22-1.2C8.33-2.63-2.89,9.84.7,12.86l.78.66c-.2.53-.28,1.13-.22,1.78.08.83.51,1.63,1.21,2.25.66.59,1.53.96,2.37.96,1.4,3.21,4.58,5.19,8.32,5.3,4.01.12,7.37-1.76,8.78-5.14.09-.24.48-1.31.48-2.25s-.54-1.34-.88-1.34\'/></svg>","supports":{"align":["wide","full"],"color":{"gradients":true},"spacing":{"padding":true,"margin":true}},"attributes":{"emailPlaceholder":{"type":"string","default":"Enter your email"},"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."},"interests":{"type":"array","default":[]},"processingLabel":{"type":"string","default":"Processing…"},"signupFieldTag":{"type":"string"},"signupFieldValue":{"type":"string"},"successLabel":{"type":"string","default":"Success! You\'re on the list."},"errorLabel":{"type":"string","default":"Whoops! There was an error and we couldn\'t process your subscription. Please reload the page and try again."},"preview":{"type":"boolean","default":false}},"example":{"attributes":{"preview":true},"innerBlocks":[{"name":"jetpack/button","attributes":{"element":"button","text":"Join my Mailchimp audience","uniqueId":"mailchimp-widget-id"}}]}}')},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"}]')},32334:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/map","title":"Map","description":"Add an interactive map showing one or more locations.","keywords":["maps","location","navigation"],"version":"12.5.0","textdomain":"jetpack","category":"embed","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path fill=\'none\' d=\'M0 0h24v24H0V0z\' /><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\' /></svg>","supports":{"defaultStylePicker":false,"html":false},"attributes":{"align":{"type":"string"},"points":{"type":"array","default":[]},"address":{"type":"string","default":""},"mapDetails":{"type":"boolean","default":true},"zoom":{"type":"integer","default":13},"mapCenter":{"type":"object","default":{"longitude":-122.41941550000001,"latitude":37.7749295}},"markerColor":{"type":"string","default":"red"},"preview":{"type":"boolean","default":false},"scrollToZoom":{"type":"boolean","default":false},"mapHeight":{"type":"integer"},"showFullscreenButton":{"type":"boolean","default":true}},"example":{"attributes":{"preview":true}}}')},41549:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/markdown","title":"Markdown","description":"Add headings, lists, or links to plain text with ease.","keywords":["formatting","syntax","markup"],"version":"12.5.0","textdomain":"jetpack","category":"text","icon":"<svg viewBox=\'0 0 208 128\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><rect width=\'198\' height=\'118\' x=\'5\' y=\'5\' ry=\'10\' stroke=\'currentColor\' strokeWidth=\'10\' fill=\'none\' /><path d=\'M30 98v-68h20l20 25 20-25h20v68h-20v-39l-20 25-20-25v39zM155 98l-30-33h20v-35h20v35h20z\' />","supports":{"align":["wide","full"],"html":false,"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"padding":true,"margin":true}}},"attributes":{"source":{"type":"string"}},"example":{"attributes":{"source":"## ## Try Markdown\\n\\nMarkdown is a text formatting syntax that is converted into HTML. You can _emphasize_ text or **make it strong** with just a few characters."}}}')},46385:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/opentable","title":"OpenTable","description":"Book a reservation with OpenTable.","keywords":["booking","reservation","restaurant"],"version":"12.5.0","textdomain":"jetpack","category":"earn","icon":"<svg viewBox=\'0 0 22 16\' width=\'22\' height=\'16\' xmlns=\'http://www.w3.org/2000/svg\'><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\' /></svg>","supports":{"align":true,"html":false},"attributes":{"rid":{"default":[],"type":"array"},"style":{"default":"standard","type":"string","enum":["button","standard","wide","tall"]},"iframe":{"default":true,"type":"boolean"},"domain":{"default":"com","type":"string"},"lang":{"default":"en-US","type":"string","enum":["en-US","fr-CA","de-DE","es-MX","ja-JP","nl-NL","it-IT"]},"newtab":{"default":false,"type":"boolean"},"negativeMargin":{"default":false,"type":"boolean"}},"example":{"attributes":{"rid":["1"],"style":"standard","iframe":true,"domain":"com","lang":"en-US","newtab":false,"negativeMargin":false}}}')},55388:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/pinterest","title":"Pinterest","description":"Embed a Pinterest pin, board, or user.","keywords":["social","pinboard","pins"],"version":"12.5.0","textdomain":"jetpack","category":"embed","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><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\'/></svg>","supports":{"html":false,"align":false},"attributes":{"url":{"type":"string"}},"example":{"attributes":{"url":"https://pinterest.com/anapinskywalker/"}}}')},98477:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/rating-star","title":"Star Rating","description":"Rate movies, books, songs, recipes — anything you can put a number on.","keywords":["star","rating","review"],"version":"12.5.0","textdomain":"jetpack","category":"widgets","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><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\'/></svg>","supports":{"html":false},"styles":[{"name":"filled","label":"Filled","isDefault":true},{"name":"outlined","label":"Outlined"}],"attributes":{"rating":{"type":"number","default":1},"maxRating":{"type":"number","default":5},"color":{"type":"string"},"ratingStyle":{"type":"string","default":"star"},"className":{"type":"string"},"align":{"type":"string","default":"left"}},"example":{}}')},25411:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/related-posts","title":"Related Posts","description":"Display a list of related posts.","keywords":["similar content","linked","connected"],"version":"12.5.0","textdomain":"jetpack","category":"embed","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'m19.5,3.5H3.5v4.94s.01,6,.01,6v4s-.01,0-.01,0v1h15.97v-.06h.05l-.02-15.88Zm-11,1v3.94s-3.99,0-3.99,0v-3.94s3.99,0,3.99,0Zm.01,4.94v4h-4v-4h4Zm-3.99,9v-4s3.99,0,3.99,0v4s-3.99,0-3.99,0Zm13.98-13.94v3.94s-8.99,0-8.99,0v-3.94s8.99,0,8.99,0Zm.01,4.94v4h-9v-4h9Zm-8.99,9v-4s8.99,0,8.99,0v4s-8.99,0-8.99,0Z\'/></svg>","supports":{"html":false,"multiple":false,"reusable":false,"color":{"gradients":true,"link":true},"spacing":{"margin":true,"padding":true},"typography":{"__experimentalFontFamily":true,"fontSize":true,"lineHeight":true},"align":["wide","full"]},"attributes":{"postLayout":{"type":"string","default":"grid"},"displayAuthor":{"type":"boolean","default":false},"displayDate":{"type":"boolean","default":true},"displayHeadline":{"type":"boolean","default":false},"displayThumbnails":{"type":"boolean","default":false},"displayContext":{"type":"boolean","default":false},"headline":{"type":"string","default":""},"postsToShow":{"type":"number","default":3}},"example":{"attributes":{"postLayout":"grid","displayAuthor":false,"displayDate":true,"displayHeadline":false,"displayThumbnails":true,"displayContext":false,"headline":"","postsToShow":2}}}')},18962:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/repeat-visitor","title":"Repeat Visitor","description":"Control block visibility based on how often a visitor has viewed the page.","keywords":["return","visitors","visibility"],"version":"12.5.0","textdomain":"jetpack","category":"widgets","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><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\'/></svg>","supports":{"align":["wide","full"],"html":false},"attributes":{"criteria":{"type":"string","default":"after-visits"},"threshold":{"type":"number","default":3}},"example":{"attributes":{"criteria":"after-visits","threshold":3},"innerBlocks":[{"name":"core/paragraph","attributes":"This block will only appear to a visitor who visited the page three or more times."}]}}')},70955:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/simple-payments","title":"Pay with PayPal","description":"Add credit and debit card payment buttons with minimal setup. Good for collecting donations or payments for products and services.","keywords":["buy","commerce","credit card","debit card","earn","ecommerce","money","paid","payments","products","purchase","sell","shop","square","payments"],"version":"12.5.0","textdomain":"jetpack","category":"earn","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path fill=\'none\' d=\'M0 0h24v24H0V0z\' /><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\' /></svg>","supports":{"className":false,"customClassName":false,"html":false,"reusable":false},"attributes":{"currency":{"type":"string","default":"USD"},"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":false},"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."},"price":{"type":"number"},"productId":{"type":"number"},"title":{"type":"string","source":"html","selector":".jetpack-simple-payments-title p","default":""}},"example":{"attributes":{"price":25,"title":"Jetpack t-shirt","content":"Take flight in ultimate comfort with this stylish t-shirt featuring the Jetpack logo.","email":"jetpack@jetpack.com","featuredMediaUrl":"./simple-payments_example-1.jpg"}}}')},26523:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/slideshow","title":"Slideshow","description":"Display multiple images in sequential order.","keywords":["story","image","video","gallery"],"version":"12.5.0","textdomain":"jetpack","category":"media","icon":"<svg  viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'m19,21.5H6v-1h13c.83,0,1.5-.67,1.5-1.5v-11h1v11c0,1.38-1.12,2.5-2.5,2.5Z\'/><path d=\'m16.38,3.25H4.62c-.75,0-1.37.62-1.37,1.37v11.76c0,.75.62,1.37,1.37,1.37h11.76c.75,0,1.37-.62,1.37-1.37V4.62c0-.75-.62-1.37-1.37-1.37Zm.37,13.13c0,.2-.17.37-.37.37H4.62c-.2,0-.37-.17-.37-.37V4.62c0-.2.17-.37.37-.37h11.76c.2,0,.37.17.37.37v11.76Z\'/><path d=\'M9.39 7.51 12.73 11.04 9.31 14.32 8.61 13.6 11.34 10.99 8.67 8.2 9.39 7.51z\'/></svg>","supports":{"html":false,"align":["center","wide","full"]},"attributes":{"align":{"default":"center","type":"string"},"autoplay":{"type":"boolean","default":false},"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"}},"example":{"align":"center","autoplay":true,"ids":[22,23,24],"images":[{"alt":"","caption":"","id":22,"url":"./slideshowExample1.png"},{"alt":"","caption":"","id":23,"url":"./slideshowExample2.png"},{"alt":"","caption":"","id":24,"url":"./slideshowExample3.png"}],"effect":"slide"}}')},99496:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/tiled-gallery","title":"Tiled Gallery","description":"Display multiple images in an elegantly organized tiled layout.","keywords":["columns","images","photos","pictures","square","circle","mosaic"],"version":"12.5.0","textdomain":"jetpack","category":"media","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M19 5v2h-4V5h4M9 5v6H5V5h4m10 8v6h-4v-6h4M9 17v2H5v-2h4M21 3h-8v6h8V3zM11 3H3v10h8V3zm10 8h-8v10h8V11zm-10 4H3v6h8v-6z\'/></svg>","supports":{"align":["center","wide","full"],"color":{"gradients":true,"text":false},"customClassName":false,"html":false,"spacing":{"margin":true,"padding":true},"__experimentalHideChildBlockControls":true},"providesContext":{"imageCrop":"imageCrop"},"styles":[{"name":"rectangular","label":"Tiled mosaic","isDefault":true},{"name":"circle","label":"Circles"},{"name":"square","label":"Square tiles"},{"name":"columns","label":"Tiled columns"}],"attributes":{"align":{"type":"string","default":"center"},"className":{"type":"string","default":"is-style-rectangular"},"columns":{"type":"number"},"columnWidths":{"type":"array","default":[]},"ids":{"type":"array","default":[]},"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","type":"number","selector":"img","source":"attribute"},"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":true},"linkTo":{"default":"none","type":"string"},"roundedCorners":{"type":"integer","default":0}}}')},27508:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/tock","title":"Tock","description":"Reserve a table at your restaurant with Tock.","keywords":["booking","reservation","restaurant"],"version":"12.5.0","textdomain":"jetpack","category":"earn","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><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\'/></svg>","supports":{"align":true,"html":false,"multiple":false},"attributes":{"url":{"type":"string"}},"example":{"attributes":{"url":"roister"},"viewportWidth":250}}')},99787:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/wordads","title":"Ad","description":"Earn income by adding high quality ads to your post.","keywords":["ads","WordAds","advertisement"],"version":"12.5.0","textdomain":"jetpack","category":"earn","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path 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\'/></svg>","supports":{"align":["left","center","right"],"alignWide":false,"className":false,"customClassName":false,"html":false,"reusable":false},"attributes":{"align":{"type":"string","default":"center"},"format":{"type":"string","default":"mrec"},"hideMobile":{"type":"boolean","default":false}},"example":{}}')},1949:e=>{"use strict";e.exports=JSON.parse('{"production":["ai-assistant","ai-chat","ai-assistant-plugin","blogging-prompt","business-hours","button","calendly","cookie-consent","contact-form","contact-form/salesforce-lead-form","contact-info","donations","eventbrite","gif","google-calendar","image-compare","instagram-gallery","like","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","subscriber-login","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","paywall","blogroll","blogroll-item","nextdoor","ai-assistant-usage-panel","sharing-button","sharing-buttons","ai-content-lens"],"beta":["google-docs-embed","launchpad-save-modal","recipe","v6-video-frame-poster","videopress/video-chapters","create-with-voice","blog-stats","top-posts","ai-assistant-backend-prompts","ai-logo-generator"],"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 o[e].call(r.exports,r,r.exports,l),r.exports}l.m=o,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 s={};e=e||[null,t({}),t([]),t(t)];for(var o=2&n&&r;"object"==typeof o&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach((e=>s[e]=()=>r[e]));return s.default=()=>r,l.d(a,s),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="+{390:"8878e5238c6e04a97fb2",958:"81b24742f2e6fdfd299c"}[e],l.miniCssF=e=>"swiper.css?minify=false&ver=71fc786e2e47b8a51a33",(()=>{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,s)=>{if(r[e])r[e].push(t);else{var o,i;if(void 0!==a)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var p=c[u];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==n+a){o=p;break}}o||(i=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,l.nc&&o.setAttribute("nonce",l.nc),o.setAttribute("data-webpack",n+a),o.src=e),r[e]=[t];var d=(t,n)=>{o.onerror=o.onload=null,clearTimeout(m);var a=r[e];if(delete r[e],o.parentNode&&o.parentNode.removeChild(o),a&&a.forEach((e=>e(n))),t)return t(n)},m=setTimeout(d.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=d.bind(null,o.onerror),o.onload=d.bind(null,o.onload),i&&document.head.appendChild(o)}},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=(o=r[n]).getAttribute("data-href")||o.getAttribute("href");if("stylesheet"===o.rel&&(a===e||a===t))return o}var s=document.getElementsByTagName("style");for(n=0;n<s.length;n++){var o;if((a=(o=s[n]).getAttribute("data-href"))===e||a===t)return o}})(n,a))return t();((e,t,r,n)=>{var a=document.createElement("link");a.rel="stylesheet",a.type="text/css",a.onerror=a.onload=s=>{if(a.onerror=a.onload=null,"load"===s.type)r();else{var o=s&&("load"===s.type?"missing":s.type),i=s&&s.target&&s.target.href||t,l=new Error("Loading CSS chunk "+e+" failed.\n("+i+")");l.code="CSS_CHUNK_LOAD_FAILED",l.type=o,l.request=i,a.parentNode.removeChild(a),n(l)}},a.href=t,document.head.appendChild(a)})(e,a,t,r)})),s={486:0},l.f.miniCss=(e,t)=>{s[e]?t.push(s[e]):0!==s[e]&&{390:1}[e]&&t.push(s[e]=a(e).then((()=>{s[e]=0}),(t=>{throw delete s[e],t})))},(()=>{var e={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 s=l.p+l.u(t),o=new Error;l.l(s,(r=>{if(l.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var a=r&&("load"===r.type?"missing":r.type),s=r&&r.target&&r.target.src;o.message="Loading chunk "+t+" failed.\n("+a+": "+s+")",o.name="ChunkLoadError",o.type=a,o.request=s,n[1](o)}}),"chunk-"+t,t)}else e[t]=0};var t=(t,r)=>{var n,a,[s,o,i]=r,c=0;if(s.some((t=>0!==e[t]))){for(n in o)l.o(o,n)&&(l.m[n]=o[n]);if(i)i(l)}for(t&&t(r);c<s.length;c++)a=s[c],l.o(e,a)&&e[a]&&e[a][0](),e[a]=0},r=globalThis.webpackChunkJetpack=globalThis.webpackChunkJetpack||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),l(78680),l(27559),l(60866),l(48887),l(52020),l(82566),l(67140),l(83772),l(63139),l(58710),l(34575),l(61204),l(22055),l(49702),l(92482),l(7414),l(36836),l(89517),l(50323),l(36227),l(17013),l(47158),l(14035),l(37549);l(3432)})();