File Editor
Directories:
.. (Back)
ai-assistant
ai-chat
ai-image
ai-paragraph
amazon
blogging-prompt
blogroll
business-hours
button
calendly
contact-info
cookie-consent
create-with-voice
donations
editor-assets
eventbrite
gif
google-calendar
google-docs-embed
image-compare
images
instagram-gallery
mailchimp
map
markdown
opentable
payment-buttons
paywall
pinterest
podcast-player
premium-content
rating-star
recipe
recurring-payments
related-posts
repeat-visitor
send-a-message
simple-payments
slideshow
story
subscriptions
tiled-gallery
tock
wordads
Files:
958.js
components.css
components.js.LICENSE.txt
components.rtl.css
editor-beta.asset.php
editor-beta.css
editor-beta.js
editor-beta.js.LICENSE.txt
editor-beta.rtl.css
editor-experimental.asset.php
editor-experimental.css
editor-experimental.js
editor-experimental.js.LICENSE.txt
editor-experimental.rtl.css
editor-no-post-editor.asset.php
editor-no-post-editor.css
editor-no-post-editor.js
editor-no-post-editor.js.LICENSE.txt
editor-no-post-editor.rtl.css
editor.asset.php
editor.css
editor.js
editor.js.LICENSE.txt
editor.rtl.css
frontend-nudge.html
swiper.css
swiper.rtl.css
upgrade-nudge.html
Create New File
Create
Edit File: editor-no-post-editor.js
/*! For license information please see editor-no-post-editor.js.LICENSE.txt */ !function(){var e,t,n,r,o,a,i={60400:function(e,t,n){"use strict";n.d(t,{L:function(){return c}});var r=n(2615),o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const a="text/event-stream",i=1e3,s="last-event-id";function c(e,t){var{signal:n,headers:c,onopen:u,onmessage:p,onclose:d,onerror:m,openWhenHidden:h,fetch:f}=t,g=o(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise(((t,o)=>{const b=Object.assign({},c);let v;function k(){v.abort(),document.hidden||S()}b.accept||(b.accept=a),h||document.addEventListener("visibilitychange",k);let y=i,w=0;function E(){document.removeEventListener("visibilitychange",k),window.clearTimeout(w),v.abort()}null==n||n.addEventListener("abort",(()=>{E(),t()}));const _=null!=f?f:window.fetch,C=null!=u?u:l;async function S(){var n;v=new AbortController;try{const n=await _(e,Object.assign(Object.assign({},g),{headers:b,signal:v.signal}));await C(n),await(0,r.Pw)(n.body,(0,r.UM)((0,r._U)((e=>{e?b[s]=e:delete b[s]}),(e=>{y=e}),p))),null==d||d(),E(),t()}catch(e){if(!v.signal.aborted)try{const t=null!==(n=null==m?void 0:m(e))&&void 0!==n?n:y;window.clearTimeout(w),w=window.setTimeout(S,t)}catch(e){E(),o(e)}}}S()}))}function l(e){const t=e.headers.get("content-type");if(!(null==t?void 0:t.startsWith(a)))throw new Error(`Expected content-type to be ${a}, Actual: ${t}`)}},2615:function(e,t,n){"use strict";async function r(e,t){const n=e.getReader();let r;for(;!(r=await n.read()).done;)t(r.value)}function o(e){let t,n,r,o=!1;return function(a){void 0===t?(t=a,n=0,r=-1):t=function(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}(t,a);const i=t.length;let s=0;for(;n<i;){o&&(10===t[n]&&(s=++n),o=!1);let a=-1;for(;n<i&&-1===a;++n)switch(t[n]){case 58:-1===r&&(r=n-s);break;case 13:o=!0;case 10:a=n}if(-1===a)break;e(t.subarray(s,a),r),s=n,r=-1}s===i?t=void 0:0!==s&&(t=t.subarray(s),n-=s)}}function a(e,t,n){let r=i();const o=new TextDecoder;return function(a,s){if(0===a.length)null==n||n(r),r=i();else if(s>0){const n=o.decode(a.subarray(0,s)),i=s+(32===a[s+1]?2:1),c=o.decode(a.subarray(i));switch(n){case"data":r.data=r.data?r.data+"\n"+c:c;break;case"event":r.event=c;break;case"id":e(r.id=c);break;case"retry":const n=parseInt(c,10);isNaN(n)||t(r.retry=n)}}}}function i(){return{data:"",event:"",id:"",retry:void 0}}n.d(t,{Pw:function(){return r},UM:function(){return o},_U:function(){return a}})},84788:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(2378);let o,a,i,s;const c=/<(\/)?(\w+)\s*(\/)?>/g;function l(e,t,n,r,o){return{element:e,tokenStart:t,tokenLength:n,prevOffset:r,leadingTextStart:o,children:[]}}const u=e=>{const t="object"==typeof e,n=t&&Object.values(e);return t&&n.length&&n.every((e=>(0,r.isValidElement)(e)))};function p(e){const t=function(){const e=c.exec(o);if(null===e)return["no-more-tokens"];const t=e.index,[n,r,a,i]=e,s=n.length;if(i)return["self-closed",a,t,s];if(r)return["closer",a,t,s];return["opener",a,t,s]}(),[n,u,p,h]=t,f=s.length,g=p>a?a:null;if(!e[u])return d(),!1;switch(n){case"no-more-tokens":if(0!==f){const{leadingTextStart:e,tokenStart:t}=s.pop();i.push(o.substr(e,t))}return d(),!1;case"self-closed":return 0===f?(null!==g&&i.push(o.substr(g,p-g)),i.push(e[u]),a=p+h,!0):(m(l(e[u],p,h)),a=p+h,!0);case"opener":return s.push(l(e[u],p,h,p+h,g)),a=p+h,!0;case"closer":if(1===f)return function(e){const{element:t,leadingTextStart:n,prevOffset:a,tokenStart:c,children:l}=s.pop(),u=e?o.substr(a,e-a):o.substr(a);u&&l.push(u);null!==n&&i.push(o.substr(n,c-n));i.push((0,r.cloneElement)(t,null,...l))}(p),a=p+h,!0;const t=s.pop(),n=o.substr(t.prevOffset,p-t.prevOffset);t.children.push(n),t.prevOffset=p+h;const c=l(t.element,t.tokenStart,t.tokenLength,p+h);return c.children=t.children,m(c),a=p+h,!0;default:return d(),!1}}function d(){const e=o.length-a;0!==e&&i.push(o.substr(a,e))}function m(e){const{element:t,tokenStart:n,tokenLength:a,prevOffset:i,children:c}=e,l=s[s.length-1],u=o.substr(l.prevOffset,n-l.prevOffset);u&&l.children.push(u),l.children.push((0,r.cloneElement)(t,null,...c)),l.prevOffset=i||n+a}var h=(e,t)=>{if(o=e,a=0,i=[],s=[],c.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,r.createElement)(r.Fragment,null,...i)};t.default=h},51806:function(e,t,n){"use strict";var r=n(25877);Object.defineProperty(t,"__esModule",{value:!0});var o={createInterpolateElement:!0,Platform:!0,renderToString:!0,RawHTML:!0};Object.defineProperty(t,"Platform",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"RawHTML",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"createInterpolateElement",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"renderToString",{enumerable:!0,get:function(){return u.default}});var a=r(n(84788)),i=n(2378);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var s=n(29115);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var c=n(82986);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=r(n(82912)),u=r(n(51962)),p=r(n(74745))},82912:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={OS:"web",select:e=>"web"in e?e.web:e.default,isWeb:!0};t.default=n},74745:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({children:e,...t}){let n="";return r.Children.toArray(e).forEach((e=>{"string"==typeof e&&""!==e.trim()&&(n+=e)})),(0,r.createElement)("div",{dangerouslySetInnerHTML:{__html:n},...t})};var r=n(2378)},29115:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createPortal",{enumerable:!0,get:function(){return r.createPortal}}),Object.defineProperty(t,"createRoot",{enumerable:!0,get:function(){return o.createRoot}}),Object.defineProperty(t,"findDOMNode",{enumerable:!0,get:function(){return r.findDOMNode}}),Object.defineProperty(t,"flushSync",{enumerable:!0,get:function(){return r.flushSync}}),Object.defineProperty(t,"hydrate",{enumerable:!0,get:function(){return r.hydrate}}),Object.defineProperty(t,"hydrateRoot",{enumerable:!0,get:function(){return o.hydrateRoot}}),Object.defineProperty(t,"render",{enumerable:!0,get:function(){return r.render}}),Object.defineProperty(t,"unmountComponentAtNode",{enumerable:!0,get:function(){return r.unmountComponentAtNode}});var r=n(91850),o=n(51516)},2378:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Children",{enumerable:!0,get:function(){return r.Children}}),Object.defineProperty(t,"Component",{enumerable:!0,get:function(){return r.Component}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return r.Fragment}}),Object.defineProperty(t,"StrictMode",{enumerable:!0,get:function(){return r.StrictMode}}),Object.defineProperty(t,"Suspense",{enumerable:!0,get:function(){return r.Suspense}}),Object.defineProperty(t,"cloneElement",{enumerable:!0,get:function(){return r.cloneElement}}),t.concatChildren=function(...e){return e.reduce(((e,t,n)=>(r.Children.forEach(t,((t,o)=>{t&&"string"!=typeof t&&(t=(0,r.cloneElement)(t,{key:[n,o].join()})),e.push(t)})),e)),[])},Object.defineProperty(t,"createContext",{enumerable:!0,get:function(){return r.createContext}}),Object.defineProperty(t,"createElement",{enumerable:!0,get:function(){return r.createElement}}),Object.defineProperty(t,"createRef",{enumerable:!0,get:function(){return r.createRef}}),Object.defineProperty(t,"forwardRef",{enumerable:!0,get:function(){return r.forwardRef}}),Object.defineProperty(t,"isValidElement",{enumerable:!0,get:function(){return r.isValidElement}}),Object.defineProperty(t,"lazy",{enumerable:!0,get:function(){return r.lazy}}),Object.defineProperty(t,"memo",{enumerable:!0,get:function(){return r.memo}}),Object.defineProperty(t,"startTransition",{enumerable:!0,get:function(){return r.startTransition}}),t.switchChildrenNodeName=function(e,t){return e&&r.Children.map(e,((e,n)=>{if("string"==typeof e?.valueOf())return(0,r.createElement)(t,{key:n},e);const{children:o,...a}=e.props;return(0,r.createElement)(t,{key:n,...a},o)}))},Object.defineProperty(t,"useCallback",{enumerable:!0,get:function(){return r.useCallback}}),Object.defineProperty(t,"useContext",{enumerable:!0,get:function(){return r.useContext}}),Object.defineProperty(t,"useDebugValue",{enumerable:!0,get:function(){return r.useDebugValue}}),Object.defineProperty(t,"useDeferredValue",{enumerable:!0,get:function(){return r.useDeferredValue}}),Object.defineProperty(t,"useEffect",{enumerable:!0,get:function(){return r.useEffect}}),Object.defineProperty(t,"useId",{enumerable:!0,get:function(){return r.useId}}),Object.defineProperty(t,"useImperativeHandle",{enumerable:!0,get:function(){return r.useImperativeHandle}}),Object.defineProperty(t,"useInsertionEffect",{enumerable:!0,get:function(){return r.useInsertionEffect}}),Object.defineProperty(t,"useLayoutEffect",{enumerable:!0,get:function(){return r.useLayoutEffect}}),Object.defineProperty(t,"useMemo",{enumerable:!0,get:function(){return r.useMemo}}),Object.defineProperty(t,"useReducer",{enumerable:!0,get:function(){return r.useReducer}}),Object.defineProperty(t,"useRef",{enumerable:!0,get:function(){return r.useRef}}),Object.defineProperty(t,"useState",{enumerable:!0,get:function(){return r.useState}}),Object.defineProperty(t,"useSyncExternalStore",{enumerable:!0,get:function(){return r.useSyncExternalStore}}),Object.defineProperty(t,"useTransition",{enumerable:!0,get:function(){return r.useTransition}});var r=n(99196)},51962:function(e,t,n){"use strict";var r=n(25877);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.hasPrefix=b,t.renderAttributes=A,t.renderComponent=L,t.renderElement=j,t.renderNativeComponent=x,t.renderStyle=T;var o=n(62313),a=n(28132),i=n(81975),s=n(2378),c=r(n(74745));const{Provider:l,Consumer:u}=(0,s.createContext)(void 0),p=(0,s.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"]),f=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"]),g=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,a.paramCase)(y[t]):E[t]?E[t]:t}function C(e){return e.startsWith("--")?e:b(e,["ms","O","Moz","Webkit"])?"-"+(0,a.paramCase)(e):(0,a.paramCase)(e)}function S(e,t){return"number"!=typeof t||0===t||g.has(e)?t:t+"px"}function j(e,t,n={}){if(null==e||!1===e)return"";if(Array.isArray(e))return P(e,t,n);switch(typeof e){case"string":return(0,i.escapeHTML)(e);case"number":return e.toString()}const{type:r,props:o}=e;switch(r){case s.StrictMode:case s.Fragment:return P(o.children,t,n);case c.default:const{children:e,...r}=o;return x(Object.keys(r).length?"div":null,{...r,dangerouslySetInnerHTML:{__html:e}},t,n)}switch(typeof r){case"string":return x(r,o,t,n);case"function":return r.prototype&&"function"==typeof r.prototype.render?L(r,o,t,n):j(r(o,n),t,n)}switch(r&&r.$$typeof){case l.$$typeof:return P(o.children,o.value,n);case u.$$typeof:return j(o.children(t||r._currentValue),t,n);case p.$$typeof:return j(r.render(o),t,n)}return""}function x(e,t,n,r={}){let o="";if("textarea"===e&&t.hasOwnProperty("value")){o=P(t.value,n,r);const{value:e,...a}=t;t=a}else t.dangerouslySetInnerHTML&&"string"==typeof t.dangerouslySetInnerHTML.__html?o=t.dangerouslySetInnerHTML.__html:void 0!==t.children&&(o=P(t.children,n,r));if(!e)return o;const a=A(t);return m.has(e)?"<"+e+a+"/>":"<"+e+a+">"+o+"</"+e+">"}function L(e,t,n,r={}){const o=new e(t,r);"function"==typeof o.getChildContext&&Object.assign(r,o.getChildContext());return j(o.render(),n,r)}function P(e,t,n={}){let r="";e=Array.isArray(e)?e:[e];for(let o=0;o<e.length;o++){r+=j(e[o],t,n)}return r}function A(e){let t="";for(const n in e){const r=_(n);if(!(0,i.isValidAttributeName)(r))continue;let o=k(n,e[n]);if(!d.has(typeof o))continue;if(v(n))continue;const a=h.has(r);if(a&&!1===o)continue;const s=a||b(n,["data-","aria-"])||f.has(r);("boolean"!=typeof o||s)&&(t+=" "+r,a||("string"==typeof o&&(o=(0,i.escapeAttribute)(o)),t+='="'+o+'"'))}return t}function T(e){if(!(0,o.isPlainObject)(e))return e;let t;for(const n in e){const r=e[n];if(null==r)continue;t?t+=";":t="";t+=C(n)+":"+S(n,r)}return t}var N=j;t.default=N},82986:function(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:function(e,t,n){"use strict";var r=n(69307);t.Z=(0,r.forwardRef)((function({icon:e,size:t=24,...n},o){return(0,r.cloneElement)(e,{width:t,height:t,...n,ref:o})}))},90986:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"}));t.Z=a},23435:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.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"}));t.Z=a},79201:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));t.Z=a},46936:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));t.Z=a},6163:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.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"}));t.Z=a},43618:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.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"}));t.Z=a},75022:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.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"}));t.Z=a},90496:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.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"}));t.Z=a},75365:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,r.createElement)(o.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"}));t.Z=a},20843:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,r.createElement)(o.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"}));t.Z=a},77840:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"}));t.Z=a},58532:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{d:"M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z"}));t.Z=a},92710:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{d:"M12.75 9.333c0 .521-.102.977-.327 1.354-.23.386-.555.628-.893.774-.545.234-1.183.227-1.544.222l-.12-.001v-1.5h.123c.414.001.715.002.948-.099a.395.395 0 00.199-.166c.05-.083.114-.253.114-.584V7.2H8.8V4h3.95v5.333zM7.95 9.333c0 .521-.102.977-.327 1.354-.23.386-.555.628-.893.774-.545.234-1.183.227-1.544.222l-.12-.001v-1.5h.123c.414.001.715.002.948-.099a.394.394 0 00.198-.166c.05-.083.115-.253.115-.584V7.2H4V4h3.95v5.333zM13 20H4v-1.5h9V20zM20 16H4v-1.5h16V16z"}));t.Z=a},3639:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.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"}));t.Z=a},586:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.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"}));t.Z=a},32677:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{d:"m4 5.5h2v6.5h1.5v-6.5h2v-1.5h-5.5zm16 10.5h-16v-1.5h16zm-7 4h-9v-1.5h9z"}));t.Z=a},48381:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.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"}));t.Z=a},47659:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.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"}));t.Z=a},30797:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,r.createElement)(o.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"}));t.Z=a},59823:function(e,t,n){"use strict";n.d(t,{AG:function(){return i},Ti:function(){return a},eV:function(){return s}});var r=n(38697),o=n(72867);function a(e,t){return 0===t?e.toLowerCase():(0,o.By)(e,t)}function i(e,t){return 0===t?e.toLowerCase():(0,o.Pv)(e)}function s(e,t){return void 0===t&&(t={}),(0,o.Ho)(e,(0,r.pi)({transform:a},t))}},81338:function(e,t,n){"use strict";n.d(t,{I:function(){return s},w:function(){return i}});var r=n(38697),o=n(68308),a=n(83078);function i(e){return(0,a.l)(e.toLowerCase())}function s(e,t){return void 0===t&&(t={}),(0,o.B)(e,(0,r.pi)({delimiter:" ",transform:i},t))}},28132:function(e,t,n){"use strict";n.r(t),n.d(t,{camelCase:function(){return r.eV},camelCaseTransform:function(){return r.Ti},camelCaseTransformMerge:function(){return r.AG},capitalCase:function(){return o.I},capitalCaseTransform:function(){return o.w},constantCase:function(){return a.c},dotCase:function(){return i.$},headerCase:function(){return s.e},noCase:function(){return c.B},paramCase:function(){return l.o},pascalCase:function(){return u.Ho},pascalCaseTransform:function(){return u.By},pascalCaseTransformMerge:function(){return u.Pv},pathCase:function(){return p.Y},sentenceCase:function(){return d.G},sentenceCaseTransform:function(){return d.a},snakeCase:function(){return m.f}});var r=n(59823),o=n(81338),a=n(56233),i=n(77352),s=n(20025),c=n(68308),l=n(76854),u=n(72867),p=n(76559),d=n(44434),m=n(59491)},73320:function(e,t){var n;!function(){"use strict";var r=function(){function e(){}function t(e,t){for(var n=t.length,r=0;r<n;++r)o(e,t[r])}e.prototype=Object.create(null);var n={}.hasOwnProperty;var r=/\s+/;function o(e,o){if(o){var a=typeof o;"string"===a?function(e,t){for(var n=t.split(r),o=n.length,a=0;a<o;++a)e[n[a]]=!0}(e,o):Array.isArray(o)?t(e,o):"object"===a?function(e,t){if(t.toString===Object.prototype.toString||t.toString.toString().includes("[native code]"))for(var r in t)n.call(t,r)&&(e[r]=!!t[r]);else e[t.toString()]=!0}(e,o):"number"===a&&function(e,t){e[t]=!0}(e,o)}}return function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];var a=new e;t(a,r);var i=[];for(var s in a)a[s]&&i.push(s);return i.join(" ")}}();e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},65235:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)){if(n.length){var i=o.apply(null,n);i&&e.push(i)}}else if("object"===a){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var s in n)r.call(n,s)&&n[s]&&e.push(s)}}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},56233:function(e,t,n){"use strict";n.d(t,{c:function(){return i}});var r=n(38697),o=n(68308),a=n(48936);function i(e,t){return void 0===t&&(t={}),(0,o.B)(e,(0,r.pi)({delimiter:"_",transform:a.L},t))}},94273:function(e){!function(){"use strict";var t=[],n=3988292384;function r(e){var t,r,o,a,i=-1;for(t=0,o=e.length;t<o;t+=1){for(a=255&(i^e[t]),r=0;r<8;r+=1)1==(1&a)?a=a>>>1^n:a>>>=1;i=i>>>8^a}return-1^i}function o(e,n){var r,a,i;if(void 0!==o.crc&&n&&e||(o.crc=-1,e)){for(r=o.crc,a=0,i=e.length;a<i;a+=1)r=r>>>8^t[255&(r^e[a])];return o.crc=r,-1^r}}!function(){var e,r,o;for(r=0;r<256;r+=1){for(e=r,o=0;o<8;o+=1)1&e?e=n^e>>>1:e>>>=1;t[r]=e>>>0}}(),e.exports=function(e,t){var n;e="string"==typeof e?(n=e,Array.prototype.map.call(n,(function(e){return e.charCodeAt(0)}))):e;return((t?r(e):o(e))>>>0).toString(16)},e.exports.direct=r,e.exports.table=o}()},77352:function(e,t,n){"use strict";n.d(t,{$:function(){return a}});var r=n(38697),o=n(68308);function a(e,t){return void 0===t&&(t={}),(0,o.B)(e,(0,r.pi)({delimiter:"."},t))}},92384:function(e,t){"use strict";var n=/^[-!#$%&'*+\/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(!n.test(e))return!1;var t=e.split("@");return!(t[0].length>64)&&!t[1].split(".").some((function(e){return e.length>63}))}},53184:function(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,a),r(n)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}f(e,t,a,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&f(e,"error",t,n)}(e,o,{once:!0})}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var i=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var o,a,i,l;if(s(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),i=a[t]),void 0===i)i=a[t]=n,++e._eventsCount;else if("function"==typeof i?i=a[t]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),(o=c(e))>0&&i.length>o&&!i.warned){i.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=i.length,l=u,console&&console.warn&&console.warn(l)}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,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=u.bind(r);return o.listener=n,r.wrapFn=o,o}function d(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):h(o,o.length)}function m(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function f(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);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 o(a){r.once&&e.removeEventListener(t,o),n(a)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");i=e}}),a.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},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(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},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var o="error"===e,a=this._events;if(void 0!==a)o=o&&void 0===a.error;else if(!o)return!1;if(o){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var s=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw s.context=i,s}var c=a[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else{var l=c.length,u=h(c,l);for(n=0;n<l;++n)r(u[n],this,t)}return!0},a.prototype.addListener=function(e,t){return l(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return l(this,e,t,!0)},a.prototype.once=function(e,t){return s(t),this.on(e,p(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,p(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,o,a,i;if(s(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){i=n[a].listener,o=a;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,i||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,a=Object.keys(n);for(r=0;r<a.length;++r)"removeListener"!==(o=a[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return d(this,e,!0)},a.prototype.rawListeners=function(e){return d(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},a.prototype.listenerCount=m,a.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"]}},n={iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]},r={floor:Math.floor,ceil:Math.ceil};function o(o){var a,i,s,c,l,u,p,d,m,h,f,g,b,v,k,y,w,E,_,C,S,j=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},x=[],L=0;if(isNaN(o))throw new TypeError("Invalid number");if(s=!0===j.bits,k=!0===j.unix,g=!0===j.pad,i=j.base||10,b=void 0!==j.round?j.round:k?1:2,p=void 0!==j.locale?j.locale:"",d=j.localeOptions||{},y=void 0!==j.separator?j.separator:"",w=void 0!==j.spacer?j.spacer:k?"":" ",_=j.symbols||{},E=2===i?j.standard||"iec":"jedec",f=j.output||"string",l=!0===j.fullform,u=j.fullforms instanceof Array?j.fullforms:[],a=void 0!==j.exponent?j.exponent:-1,C=r[j.roundingMethod]||Math.round,m=(h=Number(o))<0,c=i>2?1e3:1024,S=!1===isNaN(j.precision)?parseInt(j.precision,10):0,m&&(h=-h),(-1===a||isNaN(a))&&(a=Math.floor(Math.log(h)/Math.log(c)))<0&&(a=0),a>8&&(S>0&&(S+=8-a),a=8),"exponent"===f)return a;if(0===h)x[0]=0,v=x[1]=k?"":t[E][s?"bits":"bytes"][a];else{L=h/(2===i?Math.pow(2,10*a):Math.pow(1e3,a)),s&&(L*=8)>=c&&a<8&&(L/=c,a++);var P=Math.pow(10,a>0?b:0);x[0]=C(L*P)/P,x[0]===c&&a<8&&void 0===j.exponent&&(x[0]=1,a++),v=x[1]=10===i&&1===a?s?"kbit":"kB":t[E][s?"bits":"bytes"][a],k&&(x[1]=x[1].charAt(0),e.test(x[1])&&(x[0]=Math.floor(x[0]),x[1]=""))}if(m&&(x[0]=-x[0]),S>0&&(x[0]=x[0].toPrecision(S)),x[1]=_[x[1]]||x[1],!0===p?x[0]=x[0].toLocaleString():p.length>0?x[0]=x[0].toLocaleString(p,d):y.length>0&&(x[0]=x[0].toString().replace(".",y)),g&&!1===Number.isInteger(x[0])&&b>0){var A=y||".",T=x[0].toString().split(A),N=T[1]||"",M=N.length,I=b-M;x[0]="".concat(T[0]).concat(A).concat(N.padEnd(M+I,"0"))}return l&&(x[1]=u[a]?u[a]:n[E][a]+(s?"bit":"byte")+(1===x[0]?"":"s")),"array"===f?x:"object"===f?{value:x[0],symbol:x[1],exponent:a,unit:v}:x.join(w)}return o.partial=function(e){return function(t){return o(t,e)}},o}()},20025:function(e,t,n){"use strict";n.d(t,{e:function(){return a}});var r=n(38697),o=n(81338);function a(e,t){return void 0===t&&(t={}),(0,o.I)(e,(0,r.pi)({delimiter:"-"},t))}},62313:function(e,t){"use strict";function n(e){return"[object Object]"===Object.prototype.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=function(e){var t,r;return!1!==n(e)&&(void 0===(t=e.constructor)||!1!==n(r=t.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf"))}},84097:function(e,t){var n,r;r="undefined"!=typeof self?self:"undefined"!=typeof window||"undefined"!=typeof window?window:this,e.exports=function(r){"use strict";var o,a=(r=r||{}).Base64,i="2.6.4",s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=function(e){for(var t={},n=0,r=e.length;n<r;n++)t[e.charAt(n)]=n;return t}(s),l=String.fromCharCode,u=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?l(192|t>>>6)+l(128|63&t):l(224|t>>>12&15)+l(128|t>>>6&63)+l(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return l(240|t>>>18&7)+l(128|t>>>12&63)+l(128|t>>>6&63)+l(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],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[s.charAt(n>>>18),s.charAt(n>>>12&63),t>=2?"=":s.charAt(n>>>6&63),t>=1?"=":s.charAt(63&n)].join("")},h=r.btoa&&"function"==typeof r.btoa?function(e){return r.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)},f=function(e){return h(d(String(e)))},g=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},b=function(e,t){return t?g(f(e)):f(e)},v=function(e){return b(e,!0)};r.Uint8Array&&(o=function(e,t){for(var n="",r=0,o=e.length;r<o;r+=3){var a=e[r],i=e[r+1],c=e[r+2],l=a<<16|i<<8|c;n+=s.charAt(l>>>18)+s.charAt(l>>>12&63)+(void 0!==i?s.charAt(l>>>6&63):"=")+(void 0!==c?s.charAt(63&l):"=")}return t?g(n):n});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 l(55296+(t>>>10))+l(56320+(1023&t));case 3:return l((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return l((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},E=function(e){return e.replace(y,w)},_=function(e){var t=e.length,n=t%4,r=(t>0?c[e.charAt(0)]<<18:0)|(t>1?c[e.charAt(1)]<<12:0)|(t>2?c[e.charAt(2)]<<6:0)|(t>3?c[e.charAt(3)]:0),o=[l(r>>>16),l(r>>>8&255),l(255&r)];return o.length-=[0,0,2,1][n],o.join("")},C=r.atob&&"function"==typeof r.atob?function(e){return r.atob(e)}:function(e){return e.replace(/\S{1,4}/g,_)},S=function(e){return C(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},j=function(e){return E(C(e))},x=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},L=function(e){return j(x(e))};r.Uint8Array&&(k=function(e){return Uint8Array.from(S(x(e)),(function(e){return e.charCodeAt(0)}))});var P=function(){var e=r.Base64;return r.Base64=a,e};if(r.Base64={VERSION:i,atob:S,btoa:h,fromBase64:L,toBase64:b,utob:d,encode:b,encodeURI:v,btou:E,decode:L,noConflict:P,fromUint8Array:o,toUint8Array:k},"function"==typeof Object.defineProperty){var A=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};r.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",A((function(){return L(this)}))),Object.defineProperty(String.prototype,"toBase64",A((function(e){return b(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",A((function(){return b(this,!0)})))}}return r.Meteor&&(Base64=r.Base64),e.exports?e.exports.Base64=r.Base64:void 0===(n=function(){return r.Base64}.apply(t,[]))||(e.exports=n),{Base64:r.Base64}}(r)},62232:function(e,t,n){"use strict";function r(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}function o(e){return Object.prototype.toString.call(e)}function a(e){return"[object Function]"===o(e)}function i(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var s={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};var c={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},l="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=n(95843)(e.__opts__),r=e.__tlds__.slice();function s(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||r.push(l),r.push(t.src_xn),t.src_tlds=r.join("|"),t.email_fuzzy=RegExp(s(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(s(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(s(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(s(t.tpl_host_fuzzy_test),"i");var c=[];function u(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){var n=e.__schemas__[t];if(null!==n){var r={validate:null,link:null};if(e.__compiled__[t]=r,"[object Object]"===o(n))return!function(e){return"[object RegExp]"===o(e)}(n.validate)?a(n.validate)?r.validate=n.validate:u(t,n):r.validate=function(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}(n.validate),void(a(n.normalize)?r.normalize=n.normalize:n.normalize?u(t,n):r.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===o(e)}(n)?u(t,n):c.push(t)}})),c.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(i).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 n=e.__index__,r=e.__last_index__,o=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=o,this.text=o,this.url=o}function m(e,t){var n=new d(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function h(e,t){if(!(this instanceof h))return new h(e,t);var n;t||(n=e,Object.keys(n||{}).reduce((function(e,t){return e||s.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=r({},s,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},c,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__=r(this.__opts__,e),this},h.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,o,a,i,s,c;if(this.re.schema_test.test(e))for((s=this.re.schema_search).lastIndex=0;null!==(t=s.exec(e));)if(o=this.testSchemaAt(e,t[2],s.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+o;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(c=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||c<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(a=n.index+n[1].length,(this.__index__<0||a<this.__index__)&&(this.__schema__="",this.__index__=a,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&null!==(r=e.match(this.re.email_fuzzy))&&(a=r.index+r[1].length,i=r.index+r[0].length,(this.__index__<0||a<this.__index__||a===this.__index__&&i>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=a,this.__last_index__=i)),this.__index__>=0},h.prototype.pretest=function(e){return this.re.pretest.test(e)},h.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},h.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(m(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(m(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n: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,n){return e!==n[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:function(e,t,n){"use strict";e.exports=function(e){var t={};t.src_Any=n(44957).source,t.src_Cc=n(19590).source,t.src_Z=n(59939).source,t.src_P=n(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 r="[><|]";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+"|"+r+"|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+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:function(e,t,n){"use strict";n.d(t,{U:function(){return r}});function r(e){return e.toLowerCase()}},82339:function(e){"use strict";function t(e,t,n,r){var o=Number(e[t].meta.id+1).toString(),a="";return"string"==typeof r.docId&&(a="-"+r.docId+"-"),a+o}function n(e,t){var n=Number(e[t].meta.id+1).toString();return e[t].meta.subId>0&&(n+=":"+e[t].meta.subId),"["+n+"]"}function r(e,t,n,r,o){var a=o.rules.footnote_anchor_name(e,t,n,r,o),i=o.rules.footnote_caption(e,t,n,r,o),s=a;return e[t].meta.subId>0&&(s+=":"+e[t].meta.subId),'<sup class="footnote-ref"><a href="#fn'+a+'" id="fnref'+s+'">'+i+"</a></sup>"}function o(e,t,n){return(n.xhtmlOut?'<hr class="footnotes-sep" />\n':'<hr class="footnotes-sep">\n')+'<section class="footnotes">\n<ol class="footnotes-list">\n'}function a(){return"</ol>\n</section>\n"}function i(e,t,n,r,o){var a=o.rules.footnote_anchor_name(e,t,n,r,o);return e[t].meta.subId>0&&(a+=":"+e[t].meta.subId),'<li id="fn'+a+'" class="footnote-item">'}function s(){return"</li>\n"}function c(e,t,n,r,o){var a=o.rules.footnote_anchor_name(e,t,n,r,o);return e[t].meta.subId>0&&(a+=":"+e[t].meta.subId),' <a href="#fnref'+a+'" class="footnote-backref">↩︎</a>'}e.exports=function(e){var l=e.helpers.parseLinkLabel,u=e.utils.isSpace;e.renderer.rules.footnote_ref=r,e.renderer.rules.footnote_block_open=o,e.renderer.rules.footnote_block_close=a,e.renderer.rules.footnote_open=i,e.renderer.rules.footnote_close=s,e.renderer.rules.footnote_anchor=c,e.renderer.rules.footnote_caption=n,e.renderer.rules.footnote_anchor_name=t,e.block.ruler.before("reference","footnote_def",(function(e,t,n,r){var o,a,i,s,c,l,p,d,m,h,f,g=e.bMarks[t]+e.tShift[t],b=e.eMarks[t];if(g+4>b)return!1;if(91!==e.src.charCodeAt(g))return!1;if(94!==e.src.charCodeAt(g+1))return!1;for(c=g+2;c<b;c++){if(32===e.src.charCodeAt(c))return!1;if(93===e.src.charCodeAt(c))break}if(c===g+2)return!1;if(c+1>=b||58!==e.src.charCodeAt(++c))return!1;if(r)return!0;for(c++,e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.refs||(e.env.footnotes.refs={}),l=e.src.slice(g+2,c-2),e.env.footnotes.refs[":"+l]=-1,(p=new e.Token("footnote_reference_open","",1)).meta={label:l},p.level=e.level++,e.tokens.push(p),o=e.bMarks[t],a=e.tShift[t],i=e.sCount[t],s=e.parentType,f=c,d=m=e.sCount[t]+c-(e.bMarks[t]+e.tShift[t]);c<b&&(h=e.src.charCodeAt(c),u(h));)9===h?m+=4-m%4:m++,c++;return e.tShift[t]=c-f,e.sCount[t]=m-d,e.bMarks[t]=f,e.blkIndent+=4,e.parentType="footnote",e.sCount[t]<e.blkIndent&&(e.sCount[t]+=e.blkIndent),e.md.block.tokenize(e,t,n,!0),e.parentType=s,e.blkIndent-=4,e.tShift[t]=a,e.sCount[t]=i,e.bMarks[t]=o,(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 n,r,o,a,i=e.posMax,s=e.pos;return!(s+2>=i)&&(94===e.src.charCodeAt(s)&&(91===e.src.charCodeAt(s+1)&&(n=s+2,!((r=l(e,s+1))<0)&&(t||(e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.list||(e.env.footnotes.list=[]),o=e.env.footnotes.list.length,e.md.inline.parse(e.src.slice(n,r),e.md,e.env,a=[]),e.push("footnote_ref","",0).meta={id:o},e.env.footnotes.list[o]={content:e.src.slice(n,r),tokens:a}),e.pos=r+1,e.posMax=i,!0))))})),e.inline.ruler.after("footnote_inline","footnote_ref",(function(e,t){var n,r,o,a,i=e.posMax,s=e.pos;if(s+3>i)return!1;if(!e.env.footnotes||!e.env.footnotes.refs)return!1;if(91!==e.src.charCodeAt(s))return!1;if(94!==e.src.charCodeAt(s+1))return!1;for(r=s+2;r<i;r++){if(32===e.src.charCodeAt(r))return!1;if(10===e.src.charCodeAt(r))return!1;if(93===e.src.charCodeAt(r))break}return r!==s+2&&(!(r>=i)&&(r++,n=e.src.slice(s+2,r-1),void 0!==e.env.footnotes.refs[":"+n]&&(t||(e.env.footnotes.list||(e.env.footnotes.list=[]),e.env.footnotes.refs[":"+n]<0?(o=e.env.footnotes.list.length,e.env.footnotes.list[o]={label:n,count:0},e.env.footnotes.refs[":"+n]=o):o=e.env.footnotes.refs[":"+n],a=e.env.footnotes.list[o].count,e.env.footnotes.list[o].count++,e.push("footnote_ref","",0).meta={id:o,subId:a,label:n}),e.pos=r,e.posMax=i,!0)))})),e.core.ruler.after("inline","footnote_tail",(function(e){var t,n,r,o,a,i,s,c,l,u,p=!1,d={};if(e.env.footnotes&&(e.tokens=e.tokens.filter((function(e){return"footnote_reference_open"===e.type?(p=!0,l=[],u=e.meta.label,!1):"footnote_reference_close"===e.type?(p=!1,d[":"+u]=l,!1):(p&&l.push(e),!p)})),e.env.footnotes.list)){for(i=e.env.footnotes.list,s=new e.Token("footnote_block_open","",1),e.tokens.push(s),t=0,n=i.length;t<n;t++){for((s=new e.Token("footnote_open","",1)).meta={id:t,label:i[t].label},e.tokens.push(s),i[t].tokens?(c=[],(s=new e.Token("paragraph_open","p",1)).block=!0,c.push(s),(s=new e.Token("inline","",0)).children=i[t].tokens,s.content=i[t].content,c.push(s),(s=new e.Token("paragraph_close","p",-1)).block=!0,c.push(s)):i[t].label&&(c=d[":"+i[t].label]),c&&(e.tokens=e.tokens.concat(c)),a="paragraph_close"===e.tokens[e.tokens.length-1].type?e.tokens.pop():null,o=i[t].count>0?i[t].count:1,r=0;r<o;r++)(s=new e.Token("footnote_anchor","",0)).meta={id:t,subId:r,label:i[t].label},e.tokens.push(s);a&&e.tokens.push(a),s=new e.Token("footnote_close","",-1),e.tokens.push(s)}s=new e.Token("footnote_block_close","",-1),e.tokens.push(s)}}))}},10185:function(e,t,n){"use strict";e.exports=n(9702)},38337:function(e,t,n){"use strict";e.exports=n(84321)},43093:function(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:function(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*\\/?>",n="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",r=new RegExp("^(?:"+t+"|"+n+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),o=new RegExp("^(?:"+t+"|"+n+")");e.exports.n=r,e.exports.q=o},39615:function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function o(e,t){return r.call(e,t)}function a(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 i(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var s=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,c=new RegExp(s.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),l=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,u=n(38337);var p=/[&<>"]/,d=/[&<>"]/g,m={"&":"&","<":"<",">":">",'"':"""};function h(e){return m[e]}var f=/[.?*+^$[\]\\(){}|-]/g;var g=n(95162);t.lib={},t.lib.mdurl=n(49236),t.lib.ucmicro=n(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(n){e[n]=t[n]}))}})),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=o,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(s,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(c,(function(e,t,n){return t||function(e,t){var n=0;return o(u,t)?u[t]:35===t.charCodeAt(0)&&l.test(t)&&a(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?i(n):e}(e,n)}))},t.isValidEntityCode=a,t.fromCodePoint=i,t.escapeHtml=function(e){return p.test(e)?e.replace(d,h):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,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 g.test(e)},t.escapeRE=function(e){return e.replace(f,"\\$&")},t.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}},57007:function(e,t,n){"use strict";t.parseLinkLabel=n(82174),t.parseLinkDestination=n(36990),t.parseLinkTitle=n(15336)},36990:function(e,t,n){"use strict";var r=n(39615).unescapeAll;e.exports=function(e,t,n){var o,a,i=t,s={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(t)){for(t++;t<n;){if(10===(o=e.charCodeAt(t)))return s;if(60===o)return s;if(62===o)return s.pos=t+1,s.str=r(e.slice(i+1,t)),s.ok=!0,s;92===o&&t+1<n?t+=2:t++}return s}for(a=0;t<n&&32!==(o=e.charCodeAt(t))&&!(o<32||127===o);)if(92===o&&t+1<n){if(32===e.charCodeAt(t+1))break;t+=2}else{if(40===o&&++a>32)return s;if(41===o){if(0===a)break;a--}t++}return i===t||0!==a||(s.str=r(e.slice(i,t)),s.lines=0,s.pos=t,s.ok=!0),s}},82174:function(e){"use strict";e.exports=function(e,t,n){var r,o,a,i,s=-1,c=e.posMax,l=e.pos;for(e.pos=t+1,r=1;e.pos<c;){if(93===(a=e.src.charCodeAt(e.pos))&&0===--r){o=!0;break}if(i=e.pos,e.md.inline.skipToken(e),91===a)if(i===e.pos-1)r++;else if(n)return e.pos=l,-1}return o&&(s=e.pos),e.pos=l,s}},15336:function(e,t,n){"use strict";var r=n(39615).unescapeAll;e.exports=function(e,t,n){var o,a,i=0,s=t,c={ok:!1,pos:0,lines:0,str:""};if(t>=n)return c;if(34!==(a=e.charCodeAt(t))&&39!==a&&40!==a)return c;for(t++,40===a&&(a=41);t<n;){if((o=e.charCodeAt(t))===a)return c.pos=t+1,c.lines=i,c.str=r(e.slice(s+1,t)),c.ok=!0,c;if(40===o&&41===a)return c;10===o?i++:92===o&&t+1<n&&(t++,10===e.charCodeAt(t)&&i++),t++}return c}},9702:function(e,t,n){"use strict";var r=n(39615),o=n(57007),a=n(42403),i=n(17742),s=n(99575),c=n(37487),l=n(62232),u=n(49236),p=n(60300),d={default:n(66223),zero:n(11582),commonmark:n(9372)},m=/^(vbscript|javascript|file|data):/,h=/^data:image\/(gif|png|jpeg|webp);/;function f(e){var t=e.trim().toLowerCase();return!m.test(t)||!!h.test(t)}var g=["http:","https:","mailto:"];function b(e){var t=u.parse(e,!0);if(t.hostname&&(!t.protocol||g.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||g.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||r.isString(e)||(t=e||{},e="default"),this.inline=new c,this.block=new s,this.core=new i,this.renderer=new a,this.linkify=new l,this.validateLink=f,this.normalizeLink=b,this.normalizeLinkText=v,this.utils=r,this.helpers=r.assign({},o),this.options={},this.configure(e),t&&this.set(t)}k.prototype.set=function(e){return r.assign(this.options,e),this},k.prototype.configure=function(e){var t,n=this;if(r.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&&n.set(e.options),e.components&&Object.keys(e.components).forEach((function(t){e.components[t].rules&&n[t].ruler.enableOnly(e.components[t].rules),e.components[t].rules2&&n[t].ruler2.enableOnly(e.components[t].rules2)})),this},k.prototype.enable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.enable(e,!0))}),this),n=n.concat(this.inline.ruler2.enable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},k.prototype.disable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.disable(e,!0))}),this),n=n.concat(this.inline.ruler2.disable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);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 n=new this.core.State(e,this,t);return this.core.process(n),n.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 n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},k.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},e.exports=k},99575:function(e,t,n){"use strict";var r=n(81377),o=[["table",n(12592),["paragraph","reference"]],["code",n(99334)],["fence",n(79783),["paragraph","reference","blockquote","list"]],["blockquote",n(36901),["paragraph","reference","blockquote","list"]],["hr",n(68837),["paragraph","reference","blockquote","list"]],["list",n(46388),["paragraph","reference","blockquote"]],["reference",n(33765)],["html_block",n(33869),["paragraph","reference","blockquote"]],["heading",n(21127),["paragraph","reference","blockquote"]],["lheading",n(5393)],["paragraph",n(24934)]];function a(){this.ruler=new r;for(var e=0;e<o.length;e++)this.ruler.push(o[e][0],o[e][1],{alt:(o[e][2]||[]).slice()})}a.prototype.tokenize=function(e,t,n){for(var r,o=this.ruler.getRules(""),a=o.length,i=t,s=!1,c=e.md.options.maxNesting;i<n&&(e.line=i=e.skipEmptyLines(i),!(i>=n))&&!(e.sCount[i]<e.blkIndent);){if(e.level>=c){e.line=n;break}for(r=0;r<a&&!o[r](e,i,n,!1);r++);e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),(i=e.line)<n&&e.isEmpty(i)&&(s=!0,i++,e.line=i)}},a.prototype.parse=function(e,t,n,r){var o;e&&(o=new this.State(e,t,n,r),this.tokenize(o,o.line,o.lineMax))},a.prototype.State=n(75355),e.exports=a},17742:function(e,t,n){"use strict";var r=n(81377),o=[["normalize",n(13837)],["block",n(30884)],["inline",n(25334)],["linkify",n(64756)],["replacements",n(60555)],["smartquotes",n(28867)]];function a(){this.ruler=new r;for(var e=0;e<o.length;e++)this.ruler.push(o[e][0],o[e][1])}a.prototype.process=function(e){var t,n,r;for(t=0,n=(r=this.ruler.getRules("")).length;t<n;t++)r[t](e)},a.prototype.State=n(30727),e.exports=a},37487:function(e,t,n){"use strict";var r=n(81377),o=[["text",n(10937)],["newline",n(62378)],["escape",n(8329)],["backticks",n(7912)],["strikethrough",n(54988).w],["emphasis",n(56141).w],["link",n(95028)],["image",n(92560)],["autolink",n(73273)],["html_inline",n(9955)],["entity",n(54408)]],a=[["balance_pairs",n(76399)],["strikethrough",n(54988).g],["emphasis",n(56141).g],["text_collapse",n(52406)]];function i(){var e;for(this.ruler=new r,e=0;e<o.length;e++)this.ruler.push(o[e][0],o[e][1]);for(this.ruler2=new r,e=0;e<a.length;e++)this.ruler2.push(a[e][0],a[e][1])}i.prototype.skipToken=function(e){var t,n,r=e.pos,o=this.ruler.getRules(""),a=o.length,i=e.md.options.maxNesting,s=e.cache;if(void 0===s[r]){if(e.level<i)for(n=0;n<a&&(e.level++,t=o[n](e,!0),e.level--,!t);n++);else e.pos=e.posMax;t||e.pos++,s[r]=e.pos}else e.pos=s[r]},i.prototype.tokenize=function(e){for(var t,n,r=this.ruler.getRules(""),o=r.length,a=e.posMax,i=e.md.options.maxNesting;e.pos<a;){if(e.level<i)for(n=0;n<o&&!(t=r[n](e,!1));n++);if(t){if(e.pos>=a)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},i.prototype.parse=function(e,t,n,r){var o,a,i,s=new this.State(e,t,n,r);for(this.tokenize(s),i=(a=this.ruler2.getRules("")).length,o=0;o<i;o++)a[o](s)},i.prototype.State=n(25240),e.exports=i},9372:function(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:function(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:function(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:function(e,t,n){"use strict";var r=n(39615).assign,o=n(39615).unescapeAll,a=n(39615).escapeHtml,i={};function s(){this.rules=r({},i)}i.code_inline=function(e,t,n,r,o){var i=e[t];return"<code"+o.renderAttrs(i)+">"+a(e[t].content)+"</code>"},i.code_block=function(e,t,n,r,o){var i=e[t];return"<pre"+o.renderAttrs(i)+"><code>"+a(e[t].content)+"</code></pre>\n"},i.fence=function(e,t,n,r,i){var s,c,l,u,p,d=e[t],m=d.info?o(d.info).trim():"",h="",f="";return m&&(h=(l=m.split(/(\s+)/g))[0],f=l.slice(2).join("")),0===(s=n.highlight&&n.highlight(d.content,h,f)||a(d.content)).indexOf("<pre")?s+"\n":m?(c=d.attrIndex("class"),u=d.attrs?d.attrs.slice():[],c<0?u.push(["class",n.langPrefix+h]):(u[c]=u[c].slice(),u[c][1]+=" "+n.langPrefix+h),p={attrs:u},"<pre><code"+i.renderAttrs(p)+">"+s+"</code></pre>\n"):"<pre><code"+i.renderAttrs(d)+">"+s+"</code></pre>\n"},i.image=function(e,t,n,r,o){var a=e[t];return a.attrs[a.attrIndex("alt")][1]=o.renderInlineAsText(a.children,n,r),o.renderToken(e,t,n)},i.hardbreak=function(e,t,n){return n.xhtmlOut?"<br />\n":"<br>\n"},i.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},i.text=function(e,t){return a(e[t].content)},i.html_block=function(e,t){return e[t].content},i.html_inline=function(e,t){return e[t].content},s.prototype.renderAttrs=function(e){var t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;t<n;t++)r+=" "+a(e.attrs[t][0])+'="'+a(e.attrs[t][1])+'"';return r},s.prototype.renderToken=function(e,t,n){var r,o="",a=!1,i=e[t];return i.hidden?"":(i.block&&-1!==i.nesting&&t&&e[t-1].hidden&&(o+="\n"),o+=(-1===i.nesting?"</":"<")+i.tag,o+=this.renderAttrs(i),0===i.nesting&&n.xhtmlOut&&(o+=" /"),i.block&&(a=!0,1===i.nesting&&t+1<e.length&&("inline"===(r=e[t+1]).type||r.hidden||-1===r.nesting&&r.tag===i.tag)&&(a=!1)),o+=a?">\n":">")},s.prototype.renderInline=function(e,t,n){for(var r,o="",a=this.rules,i=0,s=e.length;i<s;i++)void 0!==a[r=e[i].type]?o+=a[r](e,i,t,n,this):o+=this.renderToken(e,i,t);return o},s.prototype.renderInlineAsText=function(e,t,n){for(var r="",o=0,a=e.length;o<a;o++)"text"===e[o].type?r+=e[o].content:"image"===e[o].type?r+=this.renderInlineAsText(e[o].children,t,n):"softbreak"===e[o].type&&(r+="\n");return r},s.prototype.render=function(e,t,n){var r,o,a,i="",s=this.rules;for(r=0,o=e.length;r<o;r++)"inline"===(a=e[r].type)?i+=this.renderInline(e[r].children,t,n):void 0!==s[a]?i+=s[e[r].type](e,r,t,n,this):i+=this.renderToken(e,r,t,n);return i},e.exports=s},81377:function(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(n){n.enabled&&(t&&n.alt.indexOf(t)<0||e.__cache__[t].push(n.fn))}))}))},t.prototype.at=function(e,t,n){var r=this.__find__(e),o=n||{};if(-1===r)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=o.alt||[],this.__cache__=null},t.prototype.before=function(e,t,n,r){var o=this.__find__(e),a=r||{};if(-1===o)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o,0,{name:t,enabled:!0,fn:n,alt:a.alt||[]}),this.__cache__=null},t.prototype.after=function(e,t,n,r){var o=this.__find__(e),a=r||{};if(-1===o)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o+1,0,{name:t,enabled:!0,fn:n,alt:a.alt||[]}),this.__cache__=null},t.prototype.push=function(e,t,n){var r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},t.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){var r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!0,n.push(e)}),this),this.__cache__=null,n},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 n=[];return e.forEach((function(e){var r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!1,n.push(e)}),this),this.__cache__=null,n},t.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},e.exports=t},36901:function(e,t,n){"use strict";var r=n(39615).isSpace;e.exports=function(e,t,n,o){var a,i,s,c,l,u,p,d,m,h,f,g,b,v,k,y,w,E,_,C,S=e.lineMax,j=e.bMarks[t]+e.tShift[t],x=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(j++))return!1;if(o)return!0;for(c=m=e.sCount[t]+1,32===e.src.charCodeAt(j)?(j++,c++,m++,a=!1,y=!0):9===e.src.charCodeAt(j)?(y=!0,(e.bsCount[t]+m)%4==3?(j++,c++,m++,a=!1):a=!0):y=!1,h=[e.bMarks[t]],e.bMarks[t]=j;j<x&&(i=e.src.charCodeAt(j),r(i));)9===i?m+=4-(m+e.bsCount[t]+(a?1:0))%4:m++,j++;for(f=[e.bsCount[t]],e.bsCount[t]=e.sCount[t]+1+(y?1:0),u=j>=x,v=[e.sCount[t]],e.sCount[t]=m-c,k=[e.tShift[t]],e.tShift[t]=j-e.bMarks[t],E=e.md.block.ruler.getRules("blockquote"),b=e.parentType,e.parentType="blockquote",d=t+1;d<n&&(C=e.sCount[d]<e.blkIndent,!((j=e.bMarks[d]+e.tShift[d])>=(x=e.eMarks[d])));d++)if(62!==e.src.charCodeAt(j++)||C){if(u)break;for(w=!1,s=0,l=E.length;s<l;s++)if(E[s](e,d,n,!0)){w=!0;break}if(w){e.lineMax=d,0!==e.blkIndent&&(h.push(e.bMarks[d]),f.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]),f.push(e.bsCount[d]),k.push(e.tShift[d]),v.push(e.sCount[d]),e.sCount[d]=-1}else{for(c=m=e.sCount[d]+1,32===e.src.charCodeAt(j)?(j++,c++,m++,a=!1,y=!0):9===e.src.charCodeAt(j)?(y=!0,(e.bsCount[d]+m)%4==3?(j++,c++,m++,a=!1):a=!0):y=!1,h.push(e.bMarks[d]),e.bMarks[d]=j;j<x&&(i=e.src.charCodeAt(j),r(i));)9===i?m+=4-(m+e.bsCount[d]+(a?1:0))%4:m++,j++;u=j>=x,f.push(e.bsCount[d]),e.bsCount[d]=e.sCount[d]+1+(y?1:0),v.push(e.sCount[d]),e.sCount[d]=m-c,k.push(e.tShift[d]),e.tShift[d]=j-e.bMarks[d]}for(g=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,s=0;s<k.length;s++)e.bMarks[s+t]=h[s],e.tShift[s+t]=k[s],e.sCount[s+t]=v[s],e.bsCount[s+t]=f[s];return e.blkIndent=g,!0}},99334:function(e){"use strict";e.exports=function(e,t,n){var r,o,a;if(e.sCount[t]-e.blkIndent<4)return!1;for(o=r=t+1;r<n;)if(e.isEmpty(r))r++;else{if(!(e.sCount[r]-e.blkIndent>=4))break;o=++r}return e.line=o,(a=e.push("code_block","code",0)).content=e.getLines(t,o,4+e.blkIndent,!1)+"\n",a.map=[t,e.line],!0}},79783:function(e){"use strict";e.exports=function(e,t,n,r){var o,a,i,s,c,l,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!==(o=e.src.charCodeAt(d))&&96!==o)return!1;if(c=d,(a=(d=e.skipChars(d,o))-c)<3)return!1;if(u=e.src.slice(c,d),i=e.src.slice(d,m),96===o&&i.indexOf(String.fromCharCode(o))>=0)return!1;if(r)return!0;for(s=t;!(++s>=n)&&!((d=c=e.bMarks[s]+e.tShift[s])<(m=e.eMarks[s])&&e.sCount[s]<e.blkIndent);)if(e.src.charCodeAt(d)===o&&!(e.sCount[s]-e.blkIndent>=4||(d=e.skipChars(d,o))-c<a||(d=e.skipSpaces(d))<m)){p=!0;break}return a=e.sCount[t],e.line=s+(p?1:0),(l=e.push("fence","code",0)).info=i,l.content=e.getLines(t+1,s,a,!0),l.markup=u,l.map=[t,e.line],!0}},21127:function(e,t,n){"use strict";var r=n(39615).isSpace;e.exports=function(e,t,n,o){var a,i,s,c,l=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(35!==(a=e.src.charCodeAt(l))||l>=u)return!1;for(i=1,a=e.src.charCodeAt(++l);35===a&&l<u&&i<=6;)i++,a=e.src.charCodeAt(++l);return!(i>6||l<u&&!r(a))&&(o||(u=e.skipSpacesBack(u,l),(s=e.skipCharsBack(u,35,l))>l&&r(e.src.charCodeAt(s-1))&&(u=s),e.line=t+1,(c=e.push("heading_open","h"+String(i),1)).markup="########".slice(0,i),c.map=[t,e.line],(c=e.push("inline","",0)).content=e.src.slice(l,u).trim(),c.map=[t,e.line],c.children=[],(c=e.push("heading_close","h"+String(i),-1)).markup="########".slice(0,i)),!0)}},68837:function(e,t,n){"use strict";var r=n(39615).isSpace;e.exports=function(e,t,n,o){var a,i,s,c,l=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(42!==(a=e.src.charCodeAt(l++))&&45!==a&&95!==a)return!1;for(i=1;l<u;){if((s=e.src.charCodeAt(l++))!==a&&!r(s))return!1;s===a&&i++}return!(i<3)&&(o||(e.line=t+1,(c=e.push("hr","hr",0)).map=[t,e.line],c.markup=Array(i+1).join(String.fromCharCode(a))),!0)}},33869:function(e,t,n){"use strict";var r=n(43093),o=n(36570).q,a=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+r.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(o.source+"\\s*$"),/^$/,!1]];e.exports=function(e,t,n,r){var o,i,s,c,l=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(l))return!1;for(c=e.src.slice(l,u),o=0;o<a.length&&!a[o][0].test(c);o++);if(o===a.length)return!1;if(r)return a[o][2];if(i=t+1,!a[o][1].test(c))for(;i<n&&!(e.sCount[i]<e.blkIndent);i++)if(l=e.bMarks[i]+e.tShift[i],u=e.eMarks[i],c=e.src.slice(l,u),a[o][1].test(c)){0!==c.length&&i++;break}return e.line=i,(s=e.push("html_block","",0)).map=[t,i],s.content=e.getLines(t,i,e.blkIndent,!0),!0}},5393:function(e){"use strict";e.exports=function(e,t,n){var r,o,a,i,s,c,l,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<n&&!e.isEmpty(m);m++)if(!(e.sCount[m]-e.blkIndent>3)){if(e.sCount[m]>=e.blkIndent&&(c=e.bMarks[m]+e.tShift[m])<(l=e.eMarks[m])&&(45===(p=e.src.charCodeAt(c))||61===p)&&(c=e.skipChars(c,p),(c=e.skipSpaces(c))>=l)){u=61===p?1:2;break}if(!(e.sCount[m]<0)){for(o=!1,a=0,i=h.length;a<i;a++)if(h[a](e,m,n,!0)){o=!0;break}if(o)break}}return!!u&&(r=e.getLines(t,m,e.blkIndent,!1).trim(),e.line=m+1,(s=e.push("heading_open","h"+String(u),1)).markup=String.fromCharCode(p),s.map=[t,e.line],(s=e.push("inline","",0)).content=r,s.map=[t,e.line-1],s.children=[],(s=e.push("heading_close","h"+String(u),-1)).markup=String.fromCharCode(p),e.parentType=d,!0)}},46388:function(e,t,n){"use strict";var r=n(39615).isSpace;function o(e,t){var n,o,a,i;return o=e.bMarks[t]+e.tShift[t],a=e.eMarks[t],42!==(n=e.src.charCodeAt(o++))&&45!==n&&43!==n||o<a&&(i=e.src.charCodeAt(o),!r(i))?-1:o}function a(e,t){var n,o=e.bMarks[t]+e.tShift[t],a=o,i=e.eMarks[t];if(a+1>=i)return-1;if((n=e.src.charCodeAt(a++))<48||n>57)return-1;for(;;){if(a>=i)return-1;if(!((n=e.src.charCodeAt(a++))>=48&&n<=57)){if(41===n||46===n)break;return-1}if(a-o>=10)return-1}return a<i&&(n=e.src.charCodeAt(a),!r(n))?-1:a}e.exports=function(e,t,n,r){var i,s,c,l,u,p,d,m,h,f,g,b,v,k,y,w,E,_,C,S,j,x,L,P,A,T,N,M,I=!1,R=!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(r&&"paragraph"===e.parentType&&e.sCount[t]>=e.blkIndent&&(I=!0),(L=a(e,t))>=0){if(d=!0,A=e.bMarks[t]+e.tShift[t],v=Number(e.src.slice(A,L-1)),I&&1!==v)return!1}else{if(!((L=o(e,t))>=0))return!1;d=!1}if(I&&e.skipSpaces(L)>=e.eMarks[t])return!1;if(b=e.src.charCodeAt(L-1),r)return!0;for(g=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=f=[t,0],M.markup=String.fromCharCode(b),y=t,P=!1,N=e.md.block.ruler.getRules("list"),_=e.parentType,e.parentType="list";y<n;){for(x=L,k=e.eMarks[y],p=w=e.sCount[y]+L-(e.bMarks[t]+e.tShift[t]);x<k;){if(9===(i=e.src.charCodeAt(x)))w+=4-(w+e.bsCount[y])%4;else{if(32!==i)break;w++}x++}if((u=(s=x)>=k?1:w-p)>4&&(u=1),l=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(A,L-1)),j=e.tight,S=e.tShift[t],C=e.sCount[t],E=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=l,e.tight=!0,e.tShift[t]=s-e.bMarks[t],e.sCount[t]=w,s>=k&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,t,n,!0),e.tight&&!P||(R=!1),P=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=j,(M=e.push("list_item_close","li",-1)).markup=String.fromCharCode(b),y=t=e.line,m[1]=y,s=e.bMarks[t],y>=n)break;if(e.sCount[y]<e.blkIndent)break;if(e.sCount[t]-e.blkIndent>=4)break;for(T=!1,c=0,h=N.length;c<h;c++)if(N[c](e,y,n,!0)){T=!0;break}if(T)break;if(d){if((L=a(e,y))<0)break;A=e.bMarks[y]+e.tShift[y]}else if((L=o(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),f[1]=y,e.line=y,e.parentType=_,R&&function(e,t){var n,r,o=e.level+2;for(n=t+2,r=e.tokens.length-2;n<r;n++)e.tokens[n].level===o&&"paragraph_open"===e.tokens[n].type&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}(e,g),!0}},24934:function(e){"use strict";e.exports=function(e,t){var n,r,o,a,i,s,c=t+1,l=e.md.block.ruler.getRules("paragraph"),u=e.lineMax;for(s=e.parentType,e.parentType="paragraph";c<u&&!e.isEmpty(c);c++)if(!(e.sCount[c]-e.blkIndent>3||e.sCount[c]<0)){for(r=!1,o=0,a=l.length;o<a;o++)if(l[o](e,c,u,!0)){r=!0;break}if(r)break}return n=e.getLines(t,c,e.blkIndent,!1).trim(),e.line=c,(i=e.push("paragraph_open","p",1)).map=[t,e.line],(i=e.push("inline","",0)).content=n,i.map=[t,e.line],i.children=[],i=e.push("paragraph_close","p",-1),e.parentType=s,!0}},33765:function(e,t,n){"use strict";var r=n(39615).normalizeReference,o=n(39615).isSpace;e.exports=function(e,t,n,a){var i,s,c,l,u,p,d,m,h,f,g,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(l=e.lineMax,y=e.md.block.ruler.getRules("reference"),f=e.parentType,e.parentType="reference";S<l&&!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,l,!0)){k=!0;break}if(k)break}for(C=(v=e.getLines(t,S,e.blkIndent,!1).trim()).length,_=1;_<C;_++){if(91===(i=v.charCodeAt(_)))return!1;if(93===i){h=_;break}(10===i||92===i&&++_<C&&10===v.charCodeAt(_))&&E++}if(h<0||58!==v.charCodeAt(h+1))return!1;for(_=h+2;_<C;_++)if(10===(i=v.charCodeAt(_)))E++;else if(!o(i))break;if(!(g=e.md.helpers.parseLinkDestination(v,_,C)).ok)return!1;if(u=e.md.normalizeLink(g.str),!e.md.validateLink(u))return!1;for(s=_=g.pos,c=E+=g.lines,b=_;_<C;_++)if(10===(i=v.charCodeAt(_)))E++;else if(!o(i))break;for(g=e.md.helpers.parseLinkTitle(v,_,C),_<C&&b!==_&&g.ok?(w=g.str,_=g.pos,E+=g.lines):(w="",_=s,E=c);_<C&&(i=v.charCodeAt(_),o(i));)_++;if(_<C&&10!==v.charCodeAt(_)&&w)for(w="",_=s,E=c;_<C&&(i=v.charCodeAt(_),o(i));)_++;return!(_<C&&10!==v.charCodeAt(_))&&(!!(m=r(v.slice(1,h)))&&(a||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[m]&&(e.env.references[m]={title:w,href:u}),e.parentType=f,e.line=t+E+1),!0))}},75355:function(e,t,n){"use strict";var r=n(71872),o=n(39615).isSpace;function a(e,t,n,r){var a,i,s,c,l,u,p,d;for(this.src=e,this.md=t,this.env=n,this.tokens=r,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,s=c=u=p=0,l=(i=this.src).length;c<l;c++){if(a=i.charCodeAt(c),!d){if(o(a)){u++,9===a?p+=4-p%4:p++;continue}d=!0}10!==a&&c!==l-1||(10!==a&&c++,this.bMarks.push(s),this.eMarks.push(c),this.tShift.push(u),this.sCount.push(p),this.bsCount.push(0),d=!1,u=0,p=0,s=c+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}a.prototype.push=function(e,t,n){var o=new r(e,t,n);return o.block=!0,n<0&&this.level--,o.level=this.level,n>0&&this.level++,this.tokens.push(o),o},a.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},a.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},a.prototype.skipSpaces=function(e){for(var t,n=this.src.length;e<n&&(t=this.src.charCodeAt(e),o(t));e++);return e},a.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!o(this.src.charCodeAt(--e)))return e+1;return e},a.prototype.skipChars=function(e,t){for(var n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},a.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},a.prototype.getLines=function(e,t,n,r){var a,i,s,c,l,u,p,d=e;if(e>=t)return"";for(u=new Array(t-e),a=0;d<t;d++,a++){for(i=0,p=c=this.bMarks[d],l=d+1<t||r?this.eMarks[d]+1:this.eMarks[d];c<l&&i<n;){if(s=this.src.charCodeAt(c),o(s))9===s?i+=4-(i+this.bsCount[d])%4:i++;else{if(!(c-p<this.tShift[d]))break;i++}c++}u[a]=i>n?new Array(i-n+1).join(" ")+this.src.slice(c,l):this.src.slice(c,l)}return u.join("")},a.prototype.Token=r,e.exports=a},12592:function(e,t,n){"use strict";var r=n(39615).isSpace;function o(e,t){var n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.substr(n,r-n)}function a(e){var t,n=[],r=0,o=e.length,a=!1,i=0,s="";for(t=e.charCodeAt(r);r<o;)124===t&&(a?(s+=e.substring(i,r-1),i=r):(n.push(s+e.substring(i,r)),s="",i=r+1)),a=92===t,r++,t=e.charCodeAt(r);return n.push(s+e.substring(i)),n}e.exports=function(e,t,n,i){var s,c,l,u,p,d,m,h,f,g,b,v,k,y,w,E,_,C;if(t+2>n)return!1;if(d=t+1,e.sCount[d]<e.blkIndent)return!1;if(e.sCount[d]-e.blkIndent>=4)return!1;if((l=e.bMarks[d]+e.tShift[d])>=e.eMarks[d])return!1;if(124!==(_=e.src.charCodeAt(l++))&&45!==_&&58!==_)return!1;if(l>=e.eMarks[d])return!1;if(124!==(C=e.src.charCodeAt(l++))&&45!==C&&58!==C&&!r(C))return!1;if(45===_&&r(C))return!1;for(;l<e.eMarks[d];){if(124!==(s=e.src.charCodeAt(l))&&45!==s&&58!==s&&!r(s))return!1;l++}for(m=(c=o(e,t+1)).split("|"),g=[],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)?g.push(58===b.charCodeAt(0)?"center":"right"):58===b.charCodeAt(0)?g.push("left"):g.push("")}if(-1===(c=o(e,t).trim()).indexOf("|"))return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;if((m=a(c)).length&&""===m[0]&&m.shift(),m.length&&""===m[m.length-1]&&m.pop(),0===(h=m.length)||h!==g.length)return!1;if(i)return!0;for(y=e.parentType,e.parentType="table",E=e.md.block.ruler.getRules("blockquote"),(f=e.push("table_open","table",1)).map=v=[t,0],(f=e.push("thead_open","thead",1)).map=[t,t+1],(f=e.push("tr_open","tr",1)).map=[t,t+1],u=0;u<m.length;u++)f=e.push("th_open","th",1),g[u]&&(f.attrs=[["style","text-align:"+g[u]]]),(f=e.push("inline","",0)).content=m[u].trim(),f.children=[],f=e.push("th_close","th",-1);for(f=e.push("tr_close","tr",-1),f=e.push("thead_close","thead",-1),d=t+2;d<n&&!(e.sCount[d]<e.blkIndent);d++){for(w=!1,u=0,p=E.length;u<p;u++)if(E[u](e,d,n,!0)){w=!0;break}if(w)break;if(!(c=o(e,d).trim()))break;if(e.sCount[d]-e.blkIndent>=4)break;for((m=a(c)).length&&""===m[0]&&m.shift(),m.length&&""===m[m.length-1]&&m.pop(),d===t+2&&((f=e.push("tbody_open","tbody",1)).map=k=[t+2,0]),(f=e.push("tr_open","tr",1)).map=[d,d+1],u=0;u<h;u++)f=e.push("td_open","td",1),g[u]&&(f.attrs=[["style","text-align:"+g[u]]]),(f=e.push("inline","",0)).content=m[u]?m[u].trim():"",f.children=[],f=e.push("td_close","td",-1);f=e.push("tr_close","tr",-1)}return k&&(f=e.push("tbody_close","tbody",-1),k[1]=d),f=e.push("table_close","table",-1),v[1]=d,e.parentType=y,e.line=d,!0}},30884:function(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:function(e){"use strict";e.exports=function(e){var t,n,r,o=e.tokens;for(n=0,r=o.length;n<r;n++)"inline"===(t=o[n]).type&&e.md.inline.parse(t.content,e.md,e.env,t.children)}},64756:function(e,t,n){"use strict";var r=n(39615).arrayReplaceAt;function o(e){return/^<\/a\s*>/i.test(e)}e.exports=function(e){var t,n,a,i,s,c,l,u,p,d,m,h,f,g,b,v,k,y,w=e.tokens;if(e.md.options.linkify)for(n=0,a=w.length;n<a;n++)if("inline"===w[n].type&&e.md.linkify.pretest(w[n].content))for(f=0,t=(i=w[n].children).length-1;t>=0;t--)if("link_close"!==(c=i[t]).type){if("html_inline"===c.type&&(y=c.content,/^<a[>\s]/i.test(y)&&f>0&&f--,o(c.content)&&f++),!(f>0)&&"text"===c.type&&e.md.linkify.test(c.content)){for(p=c.content,k=e.md.linkify.match(p),l=[],h=c.level,m=0,u=0;u<k.length;u++)g=k[u].url,b=e.md.normalizeLink(g),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&&((s=new e.Token("text","",0)).content=p.slice(m,d),s.level=h,l.push(s)),(s=new e.Token("link_open","a",1)).attrs=[["href",b]],s.level=h++,s.markup="linkify",s.info="auto",l.push(s),(s=new e.Token("text","",0)).content=v,s.level=h,l.push(s),(s=new e.Token("link_close","a",-1)).level=--h,s.markup="linkify",s.info="auto",l.push(s),m=k[u].lastIndex);m<p.length&&((s=new e.Token("text","",0)).content=p.slice(m),s.level=h,l.push(s)),w[n].children=i=r(i,t,l)}}else for(t--;i[t].level!==c.level&&"link_open"!==i[t].type;)t--}},13837:function(e){"use strict";var t=/\r\n?|\n/g,n=/\0/g;e.exports=function(e){var r;r=(r=e.src.replace(t,"\n")).replace(n,"�"),e.src=r}},60555:function(e){"use strict";var t=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,n=/\((c|tm|r|p)\)/i,r=/\((c|tm|r|p)\)/gi,o={c:"©",r:"®",p:"§",tm:"™"};function a(e,t){return o[t.toLowerCase()]}function i(e){var t,n,o=0;for(t=e.length-1;t>=0;t--)"text"!==(n=e[t]).type||o||(n.content=n.content.replace(r,a)),"link_open"===n.type&&"auto"===n.info&&o--,"link_close"===n.type&&"auto"===n.info&&o++}function s(e){var n,r,o=0;for(n=e.length-1;n>=0;n--)"text"!==(r=e[n]).type||o||t.test(r.content)&&(r.content=r.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"===r.type&&"auto"===r.info&&o--,"link_close"===r.type&&"auto"===r.info&&o++}e.exports=function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)"inline"===e.tokens[r].type&&(n.test(e.tokens[r].content)&&i(e.tokens[r].children),t.test(e.tokens[r].content)&&s(e.tokens[r].children))}},28867:function(e,t,n){"use strict";var r=n(39615).isWhiteSpace,o=n(39615).isPunctChar,a=n(39615).isMdAsciiPunct,i=/['"]/,s=/['"]/g;function c(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}function l(e,t){var n,i,l,u,p,d,m,h,f,g,b,v,k,y,w,E,_,C,S,j,x;for(S=[],n=0;n<e.length;n++){for(i=e[n],m=e[n].level,_=S.length-1;_>=0&&!(S[_].level<=m);_--);if(S.length=_+1,"text"===i.type){p=0,d=(l=i.content).length;e:for(;p<d&&(s.lastIndex=p,u=s.exec(l));){if(w=E=!0,p=u.index+1,C="'"===u[0],f=32,u.index-1>=0)f=l.charCodeAt(u.index-1);else for(_=n-1;_>=0&&("softbreak"!==e[_].type&&"hardbreak"!==e[_].type);_--)if(e[_].content){f=e[_].content.charCodeAt(e[_].content.length-1);break}if(g=32,p<d)g=l.charCodeAt(p);else for(_=n+1;_<e.length&&("softbreak"!==e[_].type&&"hardbreak"!==e[_].type);_++)if(e[_].content){g=e[_].content.charCodeAt(0);break}if(b=a(f)||o(String.fromCharCode(f)),v=a(g)||o(String.fromCharCode(g)),k=r(f),(y=r(g))?w=!1:v&&(k||b||(w=!1)),k?E=!1:b&&(y||v||(E=!1)),34===g&&'"'===u[0]&&f>=48&&f<=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?(j=t.md.options.quotes[2],x=t.md.options.quotes[3]):(j=t.md.options.quotes[0],x=t.md.options.quotes[1]),i.content=c(i.content,u.index,x),e[h.token].content=c(e[h.token].content,h.pos,j),p+=x.length-1,h.token===n&&(p+=j.length-1),d=(l=i.content).length,S.length=_;continue e}w?S.push({token:n,pos:u.index,single:C,level:m}):E&&C&&(i.content=c(i.content,u.index,"’"))}else C&&(i.content=c(i.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&&i.test(e.tokens[t].content)&&l(e.tokens[t].children,e)}},30727:function(e,t,n){"use strict";var r=n(71872);function o(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}o.prototype.Token=r,e.exports=o},73273:function(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])?)*)$/,n=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/;e.exports=function(e,r){var o,a,i,s,c,l,u=e.pos;if(60!==e.src.charCodeAt(u))return!1;for(c=e.pos,l=e.posMax;;){if(++u>=l)return!1;if(60===(s=e.src.charCodeAt(u)))return!1;if(62===s)break}return o=e.src.slice(c+1,u),n.test(o)?(a=e.md.normalizeLink(o),!!e.md.validateLink(a)&&(r||((i=e.push("link_open","a",1)).attrs=[["href",a]],i.markup="autolink",i.info="auto",(i=e.push("text","",0)).content=e.md.normalizeLinkText(o),(i=e.push("link_close","a",-1)).markup="autolink",i.info="auto"),e.pos+=o.length+2,!0)):!!t.test(o)&&(a=e.md.normalizeLink("mailto:"+o),!!e.md.validateLink(a)&&(r||((i=e.push("link_open","a",1)).attrs=[["href",a]],i.markup="autolink",i.info="auto",(i=e.push("text","",0)).content=e.md.normalizeLinkText(o),(i=e.push("link_close","a",-1)).markup="autolink",i.info="auto"),e.pos+=o.length+2,!0))}},7912:function(e){"use strict";e.exports=function(e,t){var n,r,o,a,i,s,c,l,u=e.pos;if(96!==e.src.charCodeAt(u))return!1;for(n=u,u++,r=e.posMax;u<r&&96===e.src.charCodeAt(u);)u++;if(c=(o=e.src.slice(n,u)).length,e.backticksScanned&&(e.backticks[c]||0)<=n)return t||(e.pending+=o),e.pos+=c,!0;for(i=s=u;-1!==(i=e.src.indexOf("`",s));){for(s=i+1;s<r&&96===e.src.charCodeAt(s);)s++;if((l=s-i)===c)return t||((a=e.push("code_inline","code",0)).markup=o,a.content=e.src.slice(u,i).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),e.pos=s,!0;e.backticks[l]=i}return e.backticksScanned=!0,t||(e.pending+=o),e.pos+=c,!0}},76399:function(e){"use strict";function t(e,t){var n,r,o,a,i,s,c,l,u={},p=t.length;if(p){var d=0,m=-2,h=[];for(n=0;n<p;n++)if(o=t[n],h.push(0),t[d].marker===o.marker&&m===o.token-1||(d=n),m=o.token,o.length=o.length||0,o.close){for(u.hasOwnProperty(o.marker)||(u[o.marker]=[-1,-1,-1,-1,-1,-1]),i=u[o.marker][(o.open?3:0)+o.length%3],s=r=d-h[d]-1;r>i;r-=h[r]+1)if((a=t[r]).marker===o.marker&&a.open&&a.end<0&&(c=!1,(a.close||o.open)&&(a.length+o.length)%3==0&&(a.length%3==0&&o.length%3==0||(c=!0)),!c)){l=r>0&&!t[r-1].open?h[r-1]+1:0,h[n]=n-r+l,h[r]=l,o.open=!1,a.end=n,a.close=!1,s=-1,m=-2;break}-1!==s&&(u[o.marker][(o.open?3:0)+(o.length||0)%3]=s)}}}e.exports=function(e){var n,r=e.tokens_meta,o=e.tokens_meta.length;for(t(0,e.delimiters),n=0;n<o;n++)r[n]&&r[n].delimiters&&t(0,r[n].delimiters)}},56141:function(e){"use strict";function t(e,t){var n,r,o,a,i,s;for(n=t.length-1;n>=0;n--)95!==(r=t[n]).marker&&42!==r.marker||-1!==r.end&&(o=t[r.end],s=n>0&&t[n-1].end===r.end+1&&t[n-1].marker===r.marker&&t[n-1].token===r.token-1&&t[r.end+1].token===o.token+1,i=String.fromCharCode(r.marker),(a=e.tokens[r.token]).type=s?"strong_open":"em_open",a.tag=s?"strong":"em",a.nesting=1,a.markup=s?i+i:i,a.content="",(a=e.tokens[o.token]).type=s?"strong_close":"em_close",a.tag=s?"strong":"em",a.nesting=-1,a.markup=s?i+i:i,a.content="",s&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--))}e.exports.w=function(e,t){var n,r,o=e.pos,a=e.src.charCodeAt(o);if(t)return!1;if(95!==a&&42!==a)return!1;for(r=e.scanDelims(e.pos,42===a),n=0;n<r.length;n++)e.push("text","",0).content=String.fromCharCode(a),e.delimiters.push({marker:a,length:r.length,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0},e.exports.g=function(e){var n,r=e.tokens_meta,o=e.tokens_meta.length;for(t(e,e.delimiters),n=0;n<o;n++)r[n]&&r[n].delimiters&&t(e,r[n].delimiters)}},54408:function(e,t,n){"use strict";var r=n(38337),o=n(39615).has,a=n(39615).isValidEntityCode,i=n(39615).fromCodePoint,s=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,c=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var n,l,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(l=e.src.slice(u).match(s))return t||(n="x"===l[1][0].toLowerCase()?parseInt(l[1].slice(1),16):parseInt(l[1],10),e.pending+=a(n)?i(n):i(65533)),e.pos+=l[0].length,!0}else if((l=e.src.slice(u).match(c))&&o(r,l[1]))return t||(e.pending+=r[l[1]]),e.pos+=l[0].length,!0;return t||(e.pending+="&"),e.pos++,!0}},8329:function(e,t,n){"use strict";for(var r=n(39615).isSpace,o=[],a=0;a<256;a++)o.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(e){o[e.charCodeAt(0)]=1})),e.exports=function(e,t){var n,a=e.pos,i=e.posMax;if(92!==e.src.charCodeAt(a))return!1;if(++a<i){if((n=e.src.charCodeAt(a))<256&&0!==o[n])return t||(e.pending+=e.src[a]),e.pos+=2,!0;if(10===n){for(t||e.push("hardbreak","br",0),a++;a<i&&(n=e.src.charCodeAt(a),r(n));)a++;return e.pos=a,!0}}return t||(e.pending+="\\"),e.pos++,!0}},9955:function(e,t,n){"use strict";var r=n(36570).n;e.exports=function(e,t){var n,o,a,i=e.pos;return!!e.md.options.html&&(a=e.posMax,!(60!==e.src.charCodeAt(i)||i+2>=a)&&(!(33!==(n=e.src.charCodeAt(i+1))&&63!==n&&47!==n&&!function(e){var t=32|e;return t>=97&&t<=122}(n))&&(!!(o=e.src.slice(i).match(r))&&(t||(e.push("html_inline","",0).content=e.src.slice(i,i+o[0].length)),e.pos+=o[0].length,!0))))}},92560:function(e,t,n){"use strict";var r=n(39615).normalizeReference,o=n(39615).isSpace;e.exports=function(e,t){var n,a,i,s,c,l,u,p,d,m,h,f,g,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(l=e.pos+2,(c=e.md.helpers.parseLinkLabel(e,e.pos+1,!1))<0)return!1;if((u=c+1)<k&&40===e.src.charCodeAt(u)){for(u++;u<k&&(a=e.src.charCodeAt(u),o(a)||10===a);u++);if(u>=k)return!1;for(g=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=""),g=u;u<k&&(a=e.src.charCodeAt(u),o(a)||10===a);u++);if(d=e.md.helpers.parseLinkTitle(e.src,u,e.posMax),u<k&&g!==u&&d.ok)for(m=d.str,u=d.pos;u<k&&(a=e.src.charCodeAt(u),o(a)||10===a);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)?(g=u+1,(u=e.md.helpers.parseLinkLabel(e,u))>=0?s=e.src.slice(g,u++):u=c+1):u=c+1,s||(s=e.src.slice(l,c)),!(p=e.env.references[r(s)]))return e.pos=v,!1;b=p.href,m=p.title}return t||(i=e.src.slice(l,c),e.md.inline.parse(i,e.md,e.env,f=[]),(h=e.push("image","img",0)).attrs=n=[["src",b],["alt",""]],h.children=f,h.content=i,m&&n.push(["title",m])),e.pos=u,e.posMax=k,!0}},95028:function(e,t,n){"use strict";var r=n(39615).normalizeReference,o=n(39615).isSpace;e.exports=function(e,t){var n,a,i,s,c,l,u,p,d="",m="",h=e.pos,f=e.posMax,g=e.pos,b=!0;if(91!==e.src.charCodeAt(e.pos))return!1;if(c=e.pos+1,(s=e.md.helpers.parseLinkLabel(e,e.pos,!0))<0)return!1;if((l=s+1)<f&&40===e.src.charCodeAt(l)){for(b=!1,l++;l<f&&(a=e.src.charCodeAt(l),o(a)||10===a);l++);if(l>=f)return!1;if(g=l,(u=e.md.helpers.parseLinkDestination(e.src,l,e.posMax)).ok){for(d=e.md.normalizeLink(u.str),e.md.validateLink(d)?l=u.pos:d="",g=l;l<f&&(a=e.src.charCodeAt(l),o(a)||10===a);l++);if(u=e.md.helpers.parseLinkTitle(e.src,l,e.posMax),l<f&&g!==l&&u.ok)for(m=u.str,l=u.pos;l<f&&(a=e.src.charCodeAt(l),o(a)||10===a);l++);}(l>=f||41!==e.src.charCodeAt(l))&&(b=!0),l++}if(b){if(void 0===e.env.references)return!1;if(l<f&&91===e.src.charCodeAt(l)?(g=l+1,(l=e.md.helpers.parseLinkLabel(e,l))>=0?i=e.src.slice(g,l++):l=s+1):l=s+1,i||(i=e.src.slice(c,s)),!(p=e.env.references[r(i)]))return e.pos=h,!1;d=p.href,m=p.title}return t||(e.pos=c,e.posMax=s,e.push("link_open","a",1).attrs=n=[["href",d]],m&&n.push(["title",m]),e.md.inline.tokenize(e),e.push("link_close","a",-1)),e.pos=l,e.posMax=f,!0}},62378:function(e,t,n){"use strict";var r=n(39615).isSpace;e.exports=function(e,t){var n,o,a,i=e.pos;if(10!==e.src.charCodeAt(i))return!1;if(n=e.pending.length-1,o=e.posMax,!t)if(n>=0&&32===e.pending.charCodeAt(n))if(n>=1&&32===e.pending.charCodeAt(n-1)){for(a=n-1;a>=1&&32===e.pending.charCodeAt(a-1);)a--;e.pending=e.pending.slice(0,a),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(i++;i<o&&r(e.src.charCodeAt(i));)i++;return e.pos=i,!0}},25240:function(e,t,n){"use strict";var r=n(71872),o=n(39615).isWhiteSpace,a=n(39615).isPunctChar,i=n(39615).isMdAsciiPunct;function s(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.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}s.prototype.pushPending=function(){var e=new r("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},s.prototype.push=function(e,t,n){this.pending&&this.pushPending();var o=new r(e,t,n),a=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),o.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],a={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(o),this.tokens_meta.push(a),o},s.prototype.scanDelims=function(e,t){var n,r,s,c,l,u,p,d,m,h=e,f=!0,g=!0,b=this.posMax,v=this.src.charCodeAt(e);for(n=e>0?this.src.charCodeAt(e-1):32;h<b&&this.src.charCodeAt(h)===v;)h++;return s=h-e,r=h<b?this.src.charCodeAt(h):32,p=i(n)||a(String.fromCharCode(n)),m=i(r)||a(String.fromCharCode(r)),u=o(n),(d=o(r))?f=!1:m&&(u||p||(f=!1)),u?g=!1:p&&(d||m||(g=!1)),t?(c=f,l=g):(c=f&&(!g||p),l=g&&(!f||m)),{can_open:c,can_close:l,length:s}},s.prototype.Token=r,e.exports=s},54988:function(e){"use strict";function t(e,t){var n,r,o,a,i,s=[],c=t.length;for(n=0;n<c;n++)126===(o=t[n]).marker&&-1!==o.end&&(a=t[o.end],(i=e.tokens[o.token]).type="s_open",i.tag="s",i.nesting=1,i.markup="~~",i.content="",(i=e.tokens[a.token]).type="s_close",i.tag="s",i.nesting=-1,i.markup="~~",i.content="","text"===e.tokens[a.token-1].type&&"~"===e.tokens[a.token-1].content&&s.push(a.token-1));for(;s.length;){for(r=(n=s.pop())+1;r<e.tokens.length&&"s_close"===e.tokens[r].type;)r++;n!==--r&&(i=e.tokens[r],e.tokens[r]=e.tokens[n],e.tokens[n]=i)}}e.exports.w=function(e,t){var n,r,o,a,i=e.pos,s=e.src.charCodeAt(i);if(t)return!1;if(126!==s)return!1;if(o=(r=e.scanDelims(e.pos,!0)).length,a=String.fromCharCode(s),o<2)return!1;for(o%2&&(e.push("text","",0).content=a,o--),n=0;n<o;n+=2)e.push("text","",0).content=a+a,e.delimiters.push({marker:s,length:0,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0},e.exports.g=function(e){var n,r=e.tokens_meta,o=e.tokens_meta.length;for(t(e,e.delimiters),n=0;n<o;n++)r[n]&&r[n].delimiters&&t(e,r[n].delimiters)}},10937:function(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,n){for(var r=e.pos;r<e.posMax&&!t(e.src.charCodeAt(r));)r++;return r!==e.pos&&(n||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)}},52406:function(e){"use strict";e.exports=function(e){var t,n,r=0,o=e.tokens,a=e.tokens.length;for(t=n=0;t<a;t++)o[t].nesting<0&&r--,o[t].level=r,o[t].nesting>0&&r++,"text"===o[t].type&&t+1<a&&"text"===o[t+1].type?o[t+1].content=o[t].content+o[t+1].content:(t!==n&&(o[n]=o[t]),n++);t!==n&&(o.length=n)}},71872:function(e){"use strict";function t(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,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,n,r;if(!this.attrs)return-1;for(n=0,r=(t=this.attrs).length;n<r;n++)if(t[n][0]===e)return n;return-1},t.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},t.prototype.attrSet=function(e,t){var n=this.attrIndex(e),r=[e,t];n<0?this.attrPush(r):this.attrs[n]=r},t.prototype.attrGet=function(e){var t=this.attrIndex(e),n=null;return t>=0&&(n=this.attrs[t][1]),n},t.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t},e.exports=t},64309:function(e){"use strict";var t={};function n(e,r){var o;return"string"!=typeof r&&(r=n.defaultChars),o=function(e){var n,r,o=t[e];if(o)return o;for(o=t[e]=[],n=0;n<128;n++)r=String.fromCharCode(n),o.push(r);for(n=0;n<e.length;n++)o[r=e.charCodeAt(n)]="%"+("0"+r.toString(16).toUpperCase()).slice(-2);return o}(r),e.replace(/(%[a-f0-9]{2})+/gi,(function(e){var t,n,r,a,i,s,c,l="";for(t=0,n=e.length;t<n;t+=3)(r=parseInt(e.slice(t+1,t+3),16))<128?l+=o[r]:192==(224&r)&&t+3<n&&128==(192&(a=parseInt(e.slice(t+4,t+6),16)))?(l+=(c=r<<6&1984|63&a)<128?"��":String.fromCharCode(c),t+=3):224==(240&r)&&t+6<n&&(a=parseInt(e.slice(t+4,t+6),16),i=parseInt(e.slice(t+7,t+9),16),128==(192&a)&&128==(192&i))?(l+=(c=r<<12&61440|a<<6&4032|63&i)<2048||c>=55296&&c<=57343?"���":String.fromCharCode(c),t+=6):240==(248&r)&&t+9<n&&(a=parseInt(e.slice(t+4,t+6),16),i=parseInt(e.slice(t+7,t+9),16),s=parseInt(e.slice(t+10,t+12),16),128==(192&a)&&128==(192&i)&&128==(192&s))?((c=r<<18&1835008|a<<12&258048|i<<6&4032|63&s)<65536||c>1114111?l+="����":(c-=65536,l+=String.fromCharCode(55296+(c>>10),56320+(1023&c))),t+=9):l+="�";return l}))}n.defaultChars=";/?:@&=+$,#",n.componentChars="",e.exports=n},16087:function(e){"use strict";var t={};function n(e,r,o){var a,i,s,c,l,u="";for("string"!=typeof r&&(o=r,r=n.defaultChars),void 0===o&&(o=!0),l=function(e){var n,r,o=t[e];if(o)return o;for(o=t[e]=[],n=0;n<128;n++)r=String.fromCharCode(n),/^[0-9a-z]$/i.test(r)?o.push(r):o.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2));for(n=0;n<e.length;n++)o[e.charCodeAt(n)]=e[n];return o}(r),a=0,i=e.length;a<i;a++)if(s=e.charCodeAt(a),o&&37===s&&a+2<i&&/^[0-9a-f]{2}$/i.test(e.slice(a+1,a+3)))u+=e.slice(a,a+3),a+=2;else if(s<128)u+=l[s];else if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&a+1<i&&(c=e.charCodeAt(a+1))>=56320&&c<=57343){u+=encodeURIComponent(e[a]+e[a+1]),a++;continue}u+="%EF%BF%BD"}else u+=encodeURIComponent(e[a]);return u}n.defaultChars=";/?:@&=+$,-_.!~*'()#",n.componentChars="-_.!~*'()",e.exports=n},46175:function(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:function(e,t,n){"use strict";e.exports.encode=n(16087),e.exports.decode=n(64309),e.exports.format=n(46175),e.exports.parse=n(57507)},57507:function(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 n=/^([a-z0-9.+-]+:)/i,r=/:[0-9]*$/,o=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,a=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),i=["'"].concat(a),s=["%","/","?",";","#"].concat(i),c=["/","?","#"],l=/^[+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 r,a,i,m,h,f=e;if(f=f.trim(),!t&&1===e.split("#").length){var g=o.exec(f);if(g)return this.pathname=g[1],g[2]&&(this.search=g[2]),this}var b=n.exec(f);if(b&&(i=(b=b[0]).toLowerCase(),this.protocol=b,f=f.substr(b.length)),(t||b||f.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(h="//"===f.substr(0,2))||b&&p[b]||(f=f.substr(2),this.slashes=!0)),!p[b]&&(h||b&&!d[b])){var v,k,y=-1;for(r=0;r<c.length;r++)-1!==(m=f.indexOf(c[r]))&&(-1===y||m<y)&&(y=m);for(-1!==(k=-1===y?f.lastIndexOf("@"):f.lastIndexOf("@",y))&&(v=f.slice(0,k),f=f.slice(k+1),this.auth=v),y=-1,r=0;r<s.length;r++)-1!==(m=f.indexOf(s[r]))&&(-1===y||m<y)&&(y=m);-1===y&&(y=f.length),":"===f[y-1]&&y--;var w=f.slice(0,y);f=f.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(r=0,a=_.length;r<a;r++){var C=_[r];if(C&&!C.match(l)){for(var S="",j=0,x=C.length;j<x;j++)C.charCodeAt(j)>127?S+="x":S+=C[j];if(!S.match(l)){var L=_.slice(0,r),P=_.slice(r+1),A=C.match(u);A&&(L.push(A[1]),P.unshift(A[2])),P.length&&(f=P.join(".")+f),this.hostname=L.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),E&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var T=f.indexOf("#");-1!==T&&(this.hash=f.substr(T),f=f.slice(0,T));var N=f.indexOf("?");return-1!==N&&(this.search=f.substr(N),f=f.slice(0,N)),f&&(this.pathname=f),d[i]&&this.hostname&&!this.pathname&&(this.pathname=""),this},t.prototype.parseHost=function(e){var t=r.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,n){if(e&&e instanceof t)return e;var r=new t;return r.parse(e,n),r}},46409:function(e,t){"use strict";t.Z={placeholder:"NisihrgiIKl_knpYJtfg",pulse:"R2i0K45dEF157drbVRPI"}},48026:function(){},93468:function(e,t){"use strict";t.Z={global:"_fUXxnSp5pagKBp9gSN7"}},5743:function(e,t){"use strict";t.Z={wrapper:"h2NGkiVs1r1nf85LtJpF","conversion-notice":"k3Apzwo3v9n0IaHbB8tf"}},73171:function(e){var t=1e3,n=60*t,r=60*n,o=24*r,a=7*o,i=365.25*o;function s(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,c){c=c||{};var l=typeof e;if("string"===l&&e.length>0)return function(e){if((e=String(e)).length>100)return;var s=/^(-?(?:\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(!s)return;var c=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*i;case"weeks":case"week":case"w":return c*a;case"days":case"day":case"d":return c*o;case"hours":case"hour":case"hrs":case"hr":case"h":return c*r;case"minutes":case"minute":case"mins":case"min":case"m":return c*n;case"seconds":case"second":case"secs":case"sec":case"s":return c*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===l&&isFinite(e))return c.long?function(e){var a=Math.abs(e);if(a>=o)return s(e,a,o,"day");if(a>=r)return s(e,a,r,"hour");if(a>=n)return s(e,a,n,"minute");if(a>=t)return s(e,a,t,"second");return e+" ms"}(e):function(e){var a=Math.abs(e);if(a>=o)return Math.round(e/o)+"d";if(a>=r)return Math.round(e/r)+"h";if(a>=n)return Math.round(e/n)+"m";if(a>=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:function(e,t,n){"use strict";n.d(t,{B:function(){return i}});var r=n(97740),o=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],a=/[^A-Z0-9]+/gi;function i(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,i=void 0===n?o:n,c=t.stripRegexp,l=void 0===c?a:c,u=t.transform,p=void 0===u?r.U:u,d=t.delimiter,m=void 0===d?" ":d,h=s(s(e,i,"$1\0$2"),l,"\0"),f=0,g=h.length;"\0"===h.charAt(f);)f++;for(;"\0"===h.charAt(g-1);)g--;return h.slice(f,g).split("\0").map(p).join(m)}function s(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}},76854:function(e,t,n){"use strict";n.d(t,{o:function(){return a}});var r=n(38697),o=n(77352);function a(e,t){return void 0===t&&(t={}),(0,o.$)(e,(0,r.pi)({delimiter:"-"},t))}},72867:function(e,t,n){"use strict";n.d(t,{By:function(){return a},Ho:function(){return s},Pv:function(){return i}});var r=n(38697),o=n(68308);function a(e,t){var n=e.charAt(0),r=e.substr(1).toLowerCase();return t>0&&n>="0"&&n<="9"?"_"+n+r:""+n.toUpperCase()+r}function i(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function s(e,t){return void 0===t&&(t={}),(0,o.B)(e,(0,r.pi)({delimiter:"",transform:a},t))}},76559:function(e,t,n){"use strict";n.d(t,{Y:function(){return a}});var r=n(38697),o=n(77352);function a(e,t){return void 0===t&&(t={}),(0,o.$)(e,(0,r.pi)({delimiter:"/"},t))}},69424:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(94273),o=n.n(r),a=n(53191),i=n.n(a),s=n(51128),c=n.n(s)()("photon"),l={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 n;try{n=new URL(e,p)}catch(e){return null}var r,a,s,m,h,f="https:"===n.protocol,g=new URL(d);if(h=n.host,/^i[0-2]\.wp\.com$/.test(h))g.pathname=n.pathname,g.hostname=n.hostname;else{if(n.search)return null;var b=n.href.replace("".concat(n.protocol,"/"),"");"blob:"===n.protocol&&(b=n.pathname.replace("://","//")),n.hostname===u&&(b=n.pathname),g.pathname=b,g.hostname=(r=b,a=o()(r),s=i()(a),m="i"+Math.floor(3*s()),c('determined server "%s" to use with "%s"',m,r),m+".wp.com"),f&&g.searchParams.set("ssl",1)}if(t)for(var v in t)"host"!==v&&"hostname"!==v?"secure"!==v||t[v]?g.searchParams.set(l[v]||v,t[v]):g.protocol="http:":g.hostname=t[v];return c("generated Photon URL: %s",g.href),g.href}},469:function(e,t,n){"use strict";var r=n(90758);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var s=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 s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={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:a,resetWarningCache:o};return n.PropTypes=n,n}},25162:function(e,t,n){e.exports=n(469)()},90758:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},40142:function(e,t){"use strict";var n=Object.prototype.hasOwnProperty;function r(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function o(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var r,a,i=[];for(a in"string"!=typeof t&&(t="?"),e)if(n.call(e,a)){if((r=e[a])||null!=r&&!isNaN(r)||(r=""),a=o(a),r=o(r),null===a||null===r)continue;i.push(a+"="+r)}return i.length?t+i.join("&"):""},t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,o={};t=n.exec(e);){var a=r(t[1]),i=r(t[2]);null===a||null===i||a in o||(o[a]=i)}return o}},51516:function(e,t,n){"use strict";var r=n(91850);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},82298:function(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:function(e,t){"use strict";var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}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 n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,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 n=0,r=this.__entries__;n<r.length;n++){var o=r[n];e.call(t,o[1],o[0])}},t}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,o="undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),a="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(o):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var i=["top","right","bottom","left","width","height","size","weight"],s="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 n=!1,r=!1,o=0;function i(){n&&(n=!1,e()),r&&c()}function s(){a(i)}function c(){var e=Date.now();if(n){if(e-o<2)return;r=!0}else n=!0,r=!1,setTimeout(s,t);o=e}return c}(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_,n=t.indexOf(e);~n&&t.splice(n,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(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(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(){r&&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,n=void 0===t?"":t;i.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),l=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},u=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||o},p=b(0,0,0,0);function d(e){return parseFloat(e)||0}function m(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+d(e["border-"+n+"-width"])}),0)}function h(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return p;var r=u(e).getComputedStyle(e),o=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var o=r[n],a=e["padding-"+o];t[o]=d(a)}return t}(r),a=o.left+o.right,i=o.top+o.bottom,s=d(r.width),c=d(r.height);if("border-box"===r.boxSizing&&(Math.round(s+a)!==t&&(s-=m(r,"left","right")+a),Math.round(c+i)!==n&&(c-=m(r,"top","bottom")+i)),!function(e){return e===u(e).document.documentElement}(e)){var l=Math.round(s+a)-t,h=Math.round(c+i)-n;1!==Math.abs(l)&&(s-=l),1!==Math.abs(h)&&(c-=h)}return b(o.left,o.top,s,c)}var f="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof u(e).SVGGraphicsElement}:function(e){return e instanceof u(e).SVGElement&&"function"==typeof e.getBBox};function g(e){return r?f(e)?function(e){var t=e.getBBox();return b(0,0,t.width,t.height)}(e):h(e):p}function b(e,t,n,r){return{x:e,y:t,width:n,height:r}}var v=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=b(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=g(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}(),k=function(e,t){var n,r,o,a,i,s,c,u=(r=(n=t).x,o=n.y,a=n.width,i=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,c=Object.create(s.prototype),l(c,{x:r,y:o,width:a,height:i,top:o,right:r+a,bottom:i+o,left:r}),c);l(this,{target:e,contentRect:u})},y=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 u(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new v(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 u(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 k(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),w="undefined"!=typeof WeakMap?new WeakMap:new n,E=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 n=c.getInstance(),r=new y(t,n,this);w.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){E.prototype[e]=function(){var t;return(t=w.get(this))[e].apply(t,arguments)}}));var _=void 0!==o.ResizeObserver?o.ResizeObserver:E;t.Z=_},53191:function(e){"use strict";var t=256,n=[],r=window,o=Math.pow(t,6),a=Math.pow(2,52),i=2*a,s=255,c=Math.random;function l(e){var n,r=e.length,o=this,a=0,i=o.i=o.j=0,c=o.S=[];for(r||(e=[r++]);a<t;)c[a]=a++;for(a=0;a<t;a++)c[a]=c[i=s&i+e[a%r]+(n=c[a])],c[i]=n;(o.g=function(e){for(var n,r=0,a=o.i,i=o.j,c=o.S;e--;)n=c[a=s&a+1],r=r*t+c[s&(c[a]=c[i=s&i+n])+(c[i]=n)];return o.i=a,o.j=i,r})(t)}function u(e,t){var n,r=[],o=(typeof e)[0];if(t&&"o"==o)for(n in e)try{r.push(u(e[n],t-1))}catch(e){}return r.length?r:"s"==o?e:e+"\0"}function p(e,t){for(var n,r=e+"",o=0;o<r.length;)t[s&o]=s&(n^=19*t[s&o])+r.charCodeAt(o++);return d(t)}function d(e){return String.fromCharCode.apply(0,e)}e.exports=function(s,c){if(c&&!0===c.global)return c.global=!1,Math.random=e.exports(s,c),c.global=!0,Math.random;var m=[],h=(p(u(c&&c.entropy||!1?[s,d(n)]:0 in arguments?s:function(e){try{return r.crypto.getRandomValues(e=new Uint8Array(t)),d(e)}catch(e){return[+new Date,r,r.navigator&&r.navigator.plugins,r.screen,d(n)]}}(),3),m),new l(m));return p(d(h.S),n),function(){for(var e=h.g(6),n=o,r=0;e<a;)e=(e+r)*t,n*=t,r=h.g(1);for(;e>=i;)e/=2,n/=2,r>>>=1;return(e+r)/n}},e.exports.resetGlobal=function(){Math.random=c},p(Math.random(),n)},44434:function(e,t,n){"use strict";n.d(t,{G:function(){return s},a:function(){return i}});var r=n(38697),o=n(68308),a=n(83078);function i(e,t){var n=e.toLowerCase();return 0===t?(0,a.l)(n):n}function s(e,t){return void 0===t&&(t={}),(0,o.B)(e,(0,r.pi)({delimiter:" ",transform:i},t))}},59491:function(e,t,n){"use strict";n.d(t,{f:function(){return a}});var r=n(38697),o=n(77352);function a(e,t){return void 0===t&&(t={}),(0,o.$)(e,(0,r.pi)({delimiter:"_"},t))}},36222:function(e,t,n){"use strict";n.d(t,{$L:function(){return c.$L},X_:function(){return s.X_},jt:function(){return r.Z},oN:function(){return s.oN},pw:function(){return o.Z},tK:function(){return i.tK},u_:function(){return a.u_},v_:function(){return a.v_}});n(2890),n(56694);var r=n(67742),o=n(42194),a=(n(13109),n(59822)),i=n(58890),s=n(20281),c=n(16700)},67742:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(51128),o=n.n(r),a=n(56694);const i=o()("jetpack-ai-client:ask-question");async function s(e){let{postId:t=null,fromCache:n=!1,feature:r,functions:o,model:s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i("Asking question: %o. options: %o",e,{postId:t,fromCache:n,feature:r,functions:o,model:s}),new a.Z({question:e,options:{postId:t,feature:r,fromCache:n,functions:o,model:s}})}},4437:function(e,t,n){"use strict";var r=n(52175),o=n(55609),a=n(94333),i=n(69307),s=n(65736),c=n(6163),l=n(61074),u=n(90986),p=n(79201),d=n(65235),m=n.n(d),h=n(99196),f=n.n(h),g=n(11928),b=n(22291);const __=s.__,v=()=>{};t.Z=(0,i.forwardRef)((function(e,t){let{disabled:n=!1,value:s="",placeholder:d="",showAccept:h=!1,acceptLabel:k=__("Accept","jetpack"),showButtonLabels:y=!0,isTransparent:w=!1,state:E="init",showClearButton:_=!0,showGuideLine:C=!1,onChange:S=v,onSend:j=v,onStop:x=v,onAccept:L=v}=e;const P=(0,i.useRef)(null),A="requesting"===E||"suggesting"===E;(0,i.useImperativeHandle)(t,(()=>P.current)),(0,a.useKeyboardShortcut)("mod+enter",(()=>{h&&L?.()}),{target:P}),(0,a.useKeyboardShortcut)("enter",(e=>{e.preventDefault(),j?.(s)}),{target:P});const T=m()("jetpack-components-ai-control__controls-prompt_button",{"has-label":y});return f().createElement("div",{className:"jetpack-components-ai-control__container"},f().createElement("div",{className:m()("jetpack-components-ai-control__wrapper",{"is-transparent":w})},f().createElement(g.Z,{state:E}),f().createElement("div",{className:"jetpack-components-ai-control__input-wrapper"},f().createElement(r.PlainText,{value:s,onChange:S,placeholder:d,className:"jetpack-components-ai-control__input",disabled:A||n,ref:P})),s?.length>0&&_&&f().createElement(o.Button,{icon:c.Z,className:"jetpack-components-ai-control__clear",onClick:()=>S("")}),f().createElement("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper"},A?f().createElement(o.Button,{className:T,onClick:x,isSmall:!0,label:__("Stop request","jetpack")},f().createElement(l.Z,{icon:c.Z}),y&&__("Stop (ESC)","jetpack")):f().createElement(o.Button,{className:T,onClick:()=>j?.(s),isSmall:!0,disabled:!s?.length||n,label:__("Send request","jetpack")},f().createElement(l.Z,{icon:u.Z}),y&&__("Send","jetpack"))),h&&f().createElement("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper"},f().createElement(o.Button,{className:T,onClick:L,isSmall:!0,label:k},f().createElement(l.Z,{icon:p.Z}),y&&k))),C&&f().createElement(b.Eo,null))}))},22291:function(e,t,n){"use strict";n.d(t,{Eo:function(){return b}});var r=n(55609),o=n(69307),a=n(65736),i=n(30797),s=n(23435),c=n(79201),l=n(90496),u=n(61074);const __=a.__,p="warning",d="error",m="success",h="info",f={[p]:i.Z,[d]:s.Z,[m]:c.Z,[h]:l.Z};function g(e){let{severity:t=null,icon:n=null,children:r}=e;return React.createElement("div",{className:"jetpack-ai-assistant__message"},(t||n)&&React.createElement(u.Z,{icon:f[t]||n}),React.createElement("div",{className:"jetpack-ai-assistant__message-content"},r))}function b(){return React.createElement(g,{severity:h},(0,o.createInterpolateElement)(__("AI-generated content could be inaccurate or biased. <link>Learn more</link>","jetpack"),{link:React.createElement(r.ExternalLink,{href:"https://automattic.com/ai-guidelines"})}))}},11928:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(55609),o=n(65235),a=n.n(o),i=n(59822);function s(e){let{state:t,size:n=24}=e;return React.createElement("div",{className:a()("jetpack-ai-status-indicator__icon-wrapper",{[`is-${t}`]:!0})},React.createElement(r.Icon,{icon:i.u_,size:n}))}},590:function(e,t,n){"use strict";n(69307)},58890:function(e,t,n){"use strict";n.d(t,{tK:function(){return r.Z}});var r=n(4437);n(11928),n(590),n(22291)},62282:function(e,t,n){"use strict";n.d(t,{h:function(){return s},u:function(){return i}});var r=n(69307),o=n(99196),a=n.n(o);const i=(0,r.createContext)({}),s=e=>{let{value:t,children:n}=e;return a().createElement(i.Provider,{value:t,children:n})}},20281:function(e,t,n){"use strict";n.d(t,{X_:function(){return a.Z},hE:function(){return r.h},oN:function(){return o.Z},uE:function(){return r.u}});var r=n(62282),o=n(3669),a=n(79466)},79466:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),o=n(16700),a=n(20281);function i(){let{onDone:e,onSuggestion:t,onError:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=(0,r.useContext)(a.uE),{eventSource:s}=i,c=(0,r.useCallback)((t=>e?.(t?.detail)),[e]),l=(0,r.useCallback)((e=>t?.(e?.detail)),[t]),u=(0,r.useCallback)((e=>{n?.(e?.detail)}),[]);return(0,r.useEffect)((()=>{if(s)return e&&s.addEventListener("done",c),t&&s.addEventListener("suggestion",l),n&&s.addEventListener(o.vF,u),()=>{s.removeEventListener("done",c),s.removeEventListener("suggestion",l),s.removeEventListener(o.vF,u)}}),[s]),i}},3669:function(e,t,n){"use strict";var r=n(94333),o=n(69307),a=n(99196),i=n.n(a),s=n(36222),c=n(20281);const l=(0,r.createHigherOrderComponent)((e=>t=>{const{suggestion:n,error:r,requestingState:a,request:l,stopSuggestion:u,eventSource:p}=(0,s.pw)(),d=(0,o.useMemo)((()=>({suggestion:n,requestingError:r,requestingState:a,eventSource:p,requestSuggestion:l,stopSuggestion:u})),[n,r,a,p,l,u]);return i().createElement(c.hE,{value:d},i().createElement(e,t))}),"withAiDataProvider");t.Z=l},42194:function(e,t,n){"use strict";n.d(t,{A:function(){return u},Z:function(){return p}});var r=n(69307),o=n(65736),a=n(51128),i=n.n(a),s=n(67742),c=n(16700);const __=o.__,l=i()("jetpack-ai-client:use-suggestion");function u(e){switch(e){case c.$L:return{code:c.$L,message:__("You have reached the limit of requests for this site.","jetpack"),severity:"info"};case c.bC:return{code:c.bC,message:__("Your request was unclear. Mind trying again?","jetpack"),severity:"info"};case c.$u:return{code:c.$u,message:__("Jetpack AI services are currently unavailable. Sorry for the inconvenience.","jetpack"),severity:"info"};case c.q4:return{code:c.q4,message:__("This request has been flagged by our moderation system. Please try to rephrase it and try again.","jetpack"),severity:"info"};case c.co:default:return{code:c.co,message:__("It was not possible to process your request. Mind trying again?","jetpack"),severity:"info"}}}function p(){let{prompt:e,autoRequest:t=!1,askQuestionOptions:n={},onSuggestion:o,onDone:a,onError:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[p,d]=(0,r.useState)("init"),[m,h]=(0,r.useState)(""),[f,g]=(0,r.useState)(),b=(0,r.useRef)(void 0),v=(0,r.useCallback)((e=>{h(e?.detail),o?.(e?.detail)}),[o]),k=(0,r.useCallback)((e=>{a?.(e?.detail),d("done")}),[a]),y=(0,r.useCallback)((e=>{b?.current?.close(),d("error"),g(u(e)),i?.(u(e))}),[i]),w=(0,r.useCallback)((()=>y(c.$L)),[]),E=(0,r.useCallback)((()=>y(c.bC)),[]),_=(0,r.useCallback)((()=>y(c.$u)),[]),C=(0,r.useCallback)((()=>y(c.q4)),[]),S=(0,r.useCallback)((()=>y(c.co)),[]),j=(0,r.useCallback)((async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{...n};Array.isArray(e)&&e?.length?e.forEach(((t,n)=>{let{role:r,content:o}=t;return l("(%s/%s) %o\n%s",n+1,e.length,`[${r}]`,o)})):l("%o",e),d("requesting");try{if(b.current=await(0,s.Z)(e,t),!b?.current)return;const n=b.current;d("suggesting"),n.addEventListener("suggestion",v),n.addEventListener(c.$L,w),n.addEventListener(c.bC,E),n.addEventListener(c.$u,_),n.addEventListener(c.q4,C),n.addEventListener(c.co,S),n.addEventListener("done",k)}catch(e){console.error(e)}}),[k,w,E,_,C,S,v]),x=(0,r.useCallback)((()=>{d("init"),h(""),g(void 0)}),[]),L=(0,r.useCallback)((()=>{if(!b?.current)return;const e=b?.current;e.close(),e.removeEventListener("suggestion",v),e.removeEventListener(c.$L,w),e.removeEventListener(c.bC,E),e.removeEventListener(c.$u,_),e.removeEventListener(c.q4,C),e.removeEventListener(c.co,S),e.removeEventListener("done",k),d("done")}),[b,v,w,E,_,C,S,k]);return(0,r.useEffect)((()=>{if(e?.length)return t&&j(e,n),()=>{L()}}),[t,e,j,L]),{suggestion:m,error:f,requestingState:p,request:j,stopSuggestion:L,reset:x,eventSource:b.current}}},13109:function(e,t,n){"use strict";n(69307)},61317:function(e,t,n){"use strict";var r=n(55609),o=n(99196),a=n.n(o);const i=a().createElement(r.SVG,{viewBox:"0 0 32 32",width:"32",height:"32",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"ai-assistant-icon"},a().createElement(r.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"}),a().createElement(r.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"}),a().createElement(r.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"}));t.Z=i},59822:function(e,t,n){"use strict";n.d(t,{u_:function(){return r.Z},v_:function(){return o.Z}});var r=n(61317),o=(n(81204),n(4454),n(71893),n(52887),n(96083),n(50500))},81204:function(e,t,n){"use strict";var r=n(55609),o=n(99196),a=n.n(o);r.SVG,r.Rect,r.Line,r.Path},4454:function(e,t,n){"use strict";var r=n(55609),o=n(99196),a=n.n(o);r.SVG,r.Path,r.Path},96083:function(e,t,n){"use strict";var r=n(55609),o=n(99196),a=n.n(o);r.SVG,r.Path,r.Rect,r.Rect},71893:function(e,t,n){"use strict";var r=n(55609),o=n(99196),a=n.n(o);r.SVG,r.Path,r.Path},52887:function(e,t,n){"use strict";var r=n(55609),o=n(99196),a=n.n(o);r.SVG,r.Path,r.Rect},50500:function(e,t,n){"use strict";var r=n(55609),o=n(99196),a=n.n(o);const i=a().createElement(r.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a().createElement(r.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"}),a().createElement(r.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"}));t.Z=i},2890:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(13419),o=n(86989),a=n.n(o),i=n(51128);const s=n.n(i)()("jetpack-ai-client:jwt"),c="jetpack-ai-jwt",l=12e4;async function u(){let{apiNonce:e,siteId:t,expirationTime:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=e||window.JP_CONNECTION_INITIAL_STATE.apiNonce,t=t||window.JP_CONNECTION_INITIAL_STATE.siteSuffix,n=n||l;const o=(0,r.Wp)(),i=localStorage.getItem(c);let u,p=null;if(i)try{p=JSON.parse(i)}catch(e){s("Error parsing token",e)}if(p&&p?.expire>Date.now())return s("Using cached token"),p;u=o?await a()({path:"/wpcom/v2/sites/"+t+"/jetpack-openai-query/jwt",method:"POST"}):await a()({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:o?t:u.blog_id,expire:Date.now()+n};return s("Storing new token"),localStorage.setItem(c,JSON.stringify(d)),d}},56694:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(60400),o=n(51128),a=n.n(o),i=n(42194),s=n(2890),c=n(16700);const l=a()("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(e){let{url:t,question:n,token:o,options:a={}}=e;if(!o)try{l("Token was not provided, requesting one..."),o=(await(0,s.Z)()).token}catch(e){return void this.processErrorEvent(e)}const u={};if(a?.postId&&(u.post_id=a.postId),!t){const e=new URL("https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query");a?.fromCache&&e.searchParams.append("stream_cache","true"),t=e.toString(),l("URL not provided, using default: %o",t)}Array.isArray(n)?u.messages=n:u.question=n,a?.feature?.length&&(l("Feature: %o",a.feature),u.feature=a.feature),a?.functions?.length&&(l("Functions: %o",a.functions),u.functions=a.functions),a?.model?.length&&(l("Model: %o",a.model),u.model=a.model),await(0,r.L)(t,{openWhenHidden:!0,method:"POST",headers:{"Content-type":"application/json",Authorization:"Bearer "+o},body:JSON.stringify(u),onclose:()=>{l("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=c.$u,this.dispatchEvent(new CustomEvent(c.$u))),413===e.status&&(t=c.cv,this.dispatchEvent(new CustomEvent(c.cv))),422===e.status&&(t=c.q4,this.dispatchEvent(new CustomEvent(c.q4))),429===e.status&&(t=c.$L,this.dispatchEvent(new CustomEvent(c.$L))),this.dispatchEvent(new CustomEvent(c.vF,{detail:(0,i.A)(t)})),new Error},signal:this.controller.signal})}checkForUnclearPrompt(){if(this.isPromptClear)return;const e=this.fullMessage.replace(/__|(\*\*)/g,"");e.startsWith("JETPACK_AI_ERROR")?(this.dispatchEvent(new CustomEvent(c.bC)),this.dispatchEvent(new CustomEvent(c.vF,{detail:(0,i.A)(c.bC)}))):"JETPACK_AI_ERROR".startsWith(e)?l(this.fullMessage):this.isPromptClear=!0}close(){this.controller.abort()}processEvent(e){if("[DONE]"===e.data){if(this.fullMessage.length)return this.dispatchEvent(new CustomEvent("done",{detail:this.fullMessage})),void l("Done: %o",this.fullMessage);if(this.fullFunctionCall.name.length)return this.dispatchEvent(new CustomEvent("function_done",{detail:this.fullFunctionCall})),void l("Done: %o",this.fullFunctionCall)}let t;try{t=JSON.parse(e.data)}catch(t){return void l("Error parsing JSON",e,t)}const{delta:n}=t?.choices?.[0]??{delta:{content:null,function_call:null}},r=n.content,o=n.function_call;r&&(this.fullMessage+=r,this.checkForUnclearPrompt(),this.isPromptClear&&(this.dispatchEvent(new CustomEvent("chunk",{detail:r})),l("suggestion: %o",this.fullMessage),this.dispatchEvent(new CustomEvent("suggestion",{detail:this.fullMessage})))),o&&(null!=o.name&&(this.fullFunctionCall.name+=o.name),null!=o.arguments&&(this.fullFunctionCall.arguments+=o.arguments),this.dispatchEvent(new CustomEvent("functionCallChunk",{detail:this.fullFunctionCall})))}processConnectionError(e){l("Connection error: %o",e),this.dispatchEvent(new CustomEvent(c.co,{detail:e})),this.dispatchEvent(new CustomEvent(c.vF,{detail:(0,i.A)(c.co)}))}processErrorEvent(e){l("onerror: %o",e),this.dispatchEvent(new CustomEvent(c.co,{detail:e})),this.dispatchEvent(new CustomEvent(c.vF,{detail:(0,i.A)(c.co)}))}}},16700:function(e,t,n){"use strict";n.d(t,{$L:function(){return o},$u:function(){return r},bC:function(){return c},co:function(){return s},cv:function(){return i},q4:function(){return a},vF:function(){return l}});const r="error_service_unavailable",o="error_quota_exceeded",a="error_moderation",i="error_context_too_large",s="error_network",c="error_unclear_prompt",l="error_response"},6975:function(e,t,n){"use strict";var r=n(51128);const o=n.n(r)()("dops:analytics");let a,i;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const s={initialize:function(e,t,n){s.setUser(e,t),s.setSuperProps(n),s.identifyUser()},setGoogleAnalyticsEnabled:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.googleAnalyticsEnabled=e,this.googleAnalyticsKey=t},setMcAnalyticsEnabled:function(e){this.mcAnalyticsEnabled=e},setUser:function(e,t){i={ID:e,username:t}},setSuperProps:function(e){a=e},assignSuperProps:function(e){a=Object.assign(a||{},e)},mc:{bumpStat:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);o("Bumping stats %o",e)}else n="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),o('Bumping stat "%s" in group "%s"',t,e);return n}(e,t);s.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+n+"&t="+Math.random())},bumpStatWithPageView:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);o("Built stats %o",e)}else n="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),o('Built stat "%s" in group "%s"',t,e);return n}(e,t);s.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+n+"&t="+Math.random())}},pageView:{record:function(e,t){s.tracks.recordPageView(e),s.ga.recordPageView(e,t)}},purchase:{record:function(e,t,n,r,o,a,i){s.ga.recordPurchase(e,t,n,r,o,a,i)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(a&&(o("- Super Props: %o",a),t=Object.assign(t,a)),o('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):o('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){const t="object"==typeof e?e:{target:e};s.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){s.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){o("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){let e={};s.ga.initialized||(i&&(e={userId:"u-"+i.ID}),window.ga("create",this.googleAnalyticsKey,"auto",e),s.ga.initialized=!0)},recordPageView:function(e,t){s.ga.initialize(),o("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,n,r){s.ga.initialize();let a="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==n&&(a+=" [Option Label: "+n+"]"),void 0!==r&&(a+=" [Option Value: "+r+"]"),o(a),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,n,r)},recordPurchase:function(e,t,n,r,o,a,i){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:r,currency:i}),window.ga("ecommerce:addItem",{id:e,name:t,sku:n,price:o,quantity:a}),window.ga("ecommerce:send")}},identifyUser:function(){i&&window._tkq.push(["identifyUser",i.ID,i.username])},setProperties:function(e){window._tkq.push(["setProperties",e])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}};t.Z=s},64743:function(e,t,n){"use strict";var r=n(61132),o=n(96483);function a(e){class t extends Error{constructor(){super(...arguments),this.name=e}}return t}const i=a("JsonParseError"),s=a("JsonParseAfterRedirectError"),c=a("Api404Error"),l=a("Api404AfterRedirectError"),u=a("FetchNetworkError");const p=new function(e,t){let n=e,a=e,i={"X-WP-Nonce":t},s={credentials:"same-origin",headers:i},c={method:"post",credentials:"same-origin",headers:Object.assign({},i,{"Content-type":"application/json"})},l=function(e){const t=e.split("?"),n=t.length>1?t[1]:"",r=n.length?n.split("&"):[];return r.push("_cacheBuster="+(new Date).getTime()),t[0]+"?"+r.join("&")};const u={setApiRoot(e){n=e},setWpcomOriginApiUrl(e){a=e},setApiNonce(e){i={"X-WP-Nonce":e},s={credentials:"same-origin",headers:i},c={method:"post",credentials:"same-origin",headers:Object.assign({},i,{"Content-type":"application/json"})}},setCacheBusterCallback:e=>{l=e},registerSite:(e,t)=>{const o={registration_nonce:e,no_iframe:!0};return(0,r.jetpackConfigHas)("consumer_slug")&&(o.plugin_slug=(0,r.jetpackConfigGet)("consumer_slug")),null!==t&&(o.redirect_uri=t),h(`${n}jetpack/v4/connection/register`,c,{body:JSON.stringify(o)}).then(d).then(m)},fetchAuthorizationUrl:e=>p((0,o.addQueryArgs)(`${n}jetpack/v4/connection/authorize_url`,{no_iframe:"1",redirect_uri:e}),s).then(d).then(m),fetchSiteConnectionData:()=>p(`${n}jetpack/v4/connection/data`,s).then(m),fetchSiteConnectionStatus:()=>p(`${n}jetpack/v4/connection`,s).then(m),fetchSiteConnectionTest:()=>p(`${n}jetpack/v4/connection/test`,s).then(d).then(m),fetchUserConnectionData:()=>p(`${n}jetpack/v4/connection/data`,s).then(m),fetchUserTrackingSettings:()=>p(`${n}jetpack/v4/tracking/settings`,s).then(d).then(m),updateUserTrackingSettings:e=>h(`${n}jetpack/v4/tracking/settings`,c,{body:JSON.stringify(e)}).then(d).then(m),disconnectSite:()=>h(`${n}jetpack/v4/connection`,c,{body:JSON.stringify({isActive:!1})}).then(d).then(m),fetchConnectUrl:()=>p(`${n}jetpack/v4/connection/url`,s).then(d).then(m),unlinkUser:()=>h(`${n}jetpack/v4/connection/user`,c,{body:JSON.stringify({linked:!1})}).then(d).then(m),reconnect:()=>h(`${n}jetpack/v4/connection/reconnect`,c).then(d).then(m),fetchConnectedPlugins:()=>p(`${n}jetpack/v4/connection/plugins`,s).then(d).then(m),setHasSeenWCConnectionModal:()=>h(`${n}jetpack/v4/seen-wc-connection-modal`,c).then(d).then(m),fetchModules:()=>p(`${n}jetpack/v4/module/all`,s).then(d).then(m),fetchModule:e=>p(`${n}jetpack/v4/module/${e}`,s).then(d).then(m),activateModule:e=>h(`${n}jetpack/v4/module/${e}/active`,c,{body:JSON.stringify({active:!0})}).then(d).then(m),deactivateModule:e=>h(`${n}jetpack/v4/module/${e}/active`,c,{body:JSON.stringify({active:!1})}),updateModuleOptions:(e,t)=>h(`${n}jetpack/v4/module/${e}`,c,{body:JSON.stringify(t)}).then(d).then(m),updateSettings:e=>h(`${n}jetpack/v4/settings`,c,{body:JSON.stringify(e)}).then(d).then(m),getProtectCount:()=>p(`${n}jetpack/v4/module/protect/data`,s).then(d).then(m),resetOptions:e=>h(`${n}jetpack/v4/options/${e}`,c,{body:JSON.stringify({reset:!0})}).then(d).then(m),activateVaultPress:()=>h(`${n}jetpack/v4/plugins`,c,{body:JSON.stringify({slug:"vaultpress",status:"active"})}).then(d).then(m),getVaultPressData:()=>p(`${n}jetpack/v4/module/vaultpress/data`,s).then(d).then(m),installPlugin:(e,t)=>{const r={slug:e,status:"active"};return t&&(r.source=t),h(`${n}jetpack/v4/plugins`,c,{body:JSON.stringify(r)}).then(d).then(m)},activateAkismet:()=>h(`${n}jetpack/v4/plugins`,c,{body:JSON.stringify({slug:"akismet",status:"active"})}).then(d).then(m),getAkismetData:()=>p(`${n}jetpack/v4/module/akismet/data`,s).then(d).then(m),checkAkismetKey:()=>p(`${n}jetpack/v4/module/akismet/key/check`,s).then(d).then(m),checkAkismetKeyTyped:e=>h(`${n}jetpack/v4/module/akismet/key/check`,c,{body:JSON.stringify({api_key:e})}).then(d).then(m),fetchStatsData:e=>p(function(e){let t=`${n}jetpack/v4/module/stats/data`;-1!==t.indexOf("?")?t+=`&range=${encodeURIComponent(e)}`:t+=`?range=${encodeURIComponent(e)}`;return t}(e),s).then(d).then(m).then(g),getPluginUpdates:()=>p(`${n}jetpack/v4/updates/plugins`,s).then(d).then(m),getPlans:()=>p(`${n}jetpack/v4/plans`,s).then(d).then(m),fetchSettings:()=>p(`${n}jetpack/v4/settings`,s).then(d).then(m),updateSetting:e=>h(`${n}jetpack/v4/settings`,c,{body:JSON.stringify(e)}).then(d).then(m),fetchSiteData:()=>p(`${n}jetpack/v4/site`,s).then(d).then(m).then((e=>JSON.parse(e.data))),fetchSiteFeatures:()=>p(`${n}jetpack/v4/site/features`,s).then(d).then(m).then((e=>JSON.parse(e.data))),fetchSiteProducts:()=>p(`${n}jetpack/v4/site/products`,s).then(d).then(m),fetchSitePurchases:()=>p(`${n}jetpack/v4/site/purchases`,s).then(d).then(m).then((e=>JSON.parse(e.data))),fetchSiteBenefits:()=>p(`${n}jetpack/v4/site/benefits`,s).then(d).then(m).then((e=>JSON.parse(e.data))),fetchSiteDiscount:()=>p(`${n}jetpack/v4/site/discount`,s).then(d).then(m).then((e=>e.data)),fetchSetupQuestionnaire:()=>p(`${n}jetpack/v4/setup/questionnaire`,s).then(d).then(m),fetchRecommendationsData:()=>p(`${n}jetpack/v4/recommendations/data`,s).then(d).then(m),fetchRecommendationsProductSuggestions:()=>p(`${n}jetpack/v4/recommendations/product-suggestions`,s).then(d).then(m),fetchRecommendationsUpsell:()=>p(`${n}jetpack/v4/recommendations/upsell`,s).then(d).then(m),fetchRecommendationsConditional:()=>p(`${n}jetpack/v4/recommendations/conditional`,s).then(d).then(m),saveRecommendationsData:e=>h(`${n}jetpack/v4/recommendations/data`,c,{body:JSON.stringify({data:e})}).then(d),fetchProducts:()=>p(`${n}jetpack/v4/products`,s).then(d).then(m),fetchRewindStatus:()=>p(`${n}jetpack/v4/rewind`,s).then(d).then(m).then((e=>JSON.parse(e.data))),fetchScanStatus:()=>p(`${n}jetpack/v4/scan`,s).then(d).then(m).then((e=>JSON.parse(e.data))),dismissJetpackNotice:e=>h(`${n}jetpack/v4/notice/${e}`,c,{body:JSON.stringify({dismissed:!0})}).then(d).then(m),fetchPluginsData:()=>p(`${n}jetpack/v4/plugins`,s).then(d).then(m),fetchIntroOffers:()=>p(`${n}jetpack/v4/intro-offers`,s).then(d).then(m),fetchVerifySiteGoogleStatus:e=>p(null!==e?`${n}jetpack/v4/verify-site/google/${e}`:`${n}jetpack/v4/verify-site/google`,s).then(d).then(m),verifySiteGoogle:e=>h(`${n}jetpack/v4/verify-site/google`,c,{body:JSON.stringify({keyring_id:e})}).then(d).then(m),submitSurvey:e=>h(`${n}jetpack/v4/marketing/survey`,c,{body:JSON.stringify(e)}).then(d).then(m),saveSetupQuestionnaire:e=>h(`${n}jetpack/v4/setup/questionnaire`,c,{body:JSON.stringify(e)}).then(d).then(m),updateLicensingError:e=>h(`${n}jetpack/v4/licensing/error`,c,{body:JSON.stringify(e)}).then(d).then(m),updateLicenseKey:e=>h(`${n}jetpack/v4/licensing/set-license`,c,{body:JSON.stringify({license:e})}).then(d).then(m),getUserLicensesCounts:()=>p(`${n}jetpack/v4/licensing/user/counts`,s).then(d).then(m),getUserLicenses:()=>p(`${n}jetpack/v4/licensing/user/licenses`,s).then(d).then(m),updateLicensingActivationNoticeDismiss:e=>h(`${n}jetpack/v4/licensing/user/activation-notice-dismiss`,c,{body:JSON.stringify({last_detached_count:e})}).then(d).then(m),updateRecommendationsStep:e=>h(`${n}jetpack/v4/recommendations/step`,c,{body:JSON.stringify({step:e})}).then(d),confirmIDCSafeMode:()=>h(`${n}jetpack/v4/identity-crisis/confirm-safe-mode`,c).then(d),startIDCFresh:e=>h(`${n}jetpack/v4/identity-crisis/start-fresh`,c,{body:JSON.stringify({redirect_uri:e})}).then(d).then(m),migrateIDC:()=>h(`${n}jetpack/v4/identity-crisis/migrate`,c).then(d),attachLicenses:e=>h(`${n}jetpack/v4/licensing/attach-licenses`,c,{body:JSON.stringify({licenses:e})}).then(d).then(m),fetchSearchPlanInfo:()=>p(`${a}jetpack/v4/search/plan`,s).then(d).then(m),fetchSearchSettings:()=>p(`${a}jetpack/v4/search/settings`,s).then(d).then(m),updateSearchSettings:e=>h(`${a}jetpack/v4/search/settings`,c,{body:JSON.stringify(e)}).then(d).then(m),fetchSearchStats:()=>p(`${a}jetpack/v4/search/stats`,s).then(d).then(m),fetchWafSettings:()=>p(`${n}jetpack/v4/waf`,s).then(d).then(m),updateWafSettings:e=>h(`${n}jetpack/v4/waf`,c,{body:JSON.stringify(e)}).then(d).then(m),fetchWordAdsSettings:()=>p(`${n}jetpack/v4/wordads/settings`,s).then(d).then(m),updateWordAdsSettings:e=>h(`${n}jetpack/v4/wordads/settings`,c,{body:JSON.stringify(e)}),fetchSearchPricing:()=>p(`${a}jetpack/v4/search/pricing`,s).then(d).then(m),fetchMigrationStatus:()=>p(`${n}jetpack/v4/migration/status`,s).then(d).then(m),fetchBackupUndoEvent:()=>p(`${n}jetpack/v4/site/backup/undo-event`,s).then(d).then(m)};function p(e,t){return fetch(l(e),t)}function h(e,t,n){return fetch(e,Object.assign({},t,n)).catch(f)}function g(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 l(e.redirected):new c})):e.json().catch((e=>h(e))).then((t=>{const n=new Error(`${t.message} (Status ${e.status})`);throw n.response=t,n.name="ApiError",n}))}function m(e){return e.json().catch((t=>h(t,e.redirected,e.url)))}function h(e,t,n){throw t?new s(n):new i}function f(){throw new u}t.ZP=p},22636:function(e,t,n){"use strict";var r=n(65235),o=n.n(r),a=n(99196),i=n.n(a),s=n(46409);t.Z=e=>{let{children:t=null,width:n=null,height:r=null,className:a=""}=e;return i().createElement("div",{className:o()(s.Z.placeholder,a),style:{width:n,height:r}},t)}},45033:function(e,t,n){"use strict";var r=n(25162),o=n.n(r),a=n(99196),i=n.n(a);n(48026);const s=e=>{const t=e.className+" jp-components-spinner",n={width:e.size,height:e.size,fontSize:e.size,borderTopColor:e.color},r={borderTopColor:e.color,borderRightColor:e.color};return i().createElement("div",{className:t},i().createElement("div",{className:"jp-components-spinner__outer",style:n},i().createElement("div",{className:"jp-components-spinner__inner",style:r})))};s.propTypes={color:o().string,className:o().string,size:o().number},s.defaultProps={color:"#FFFFFF",className:"",size:20},t.Z=s},88275:function(e,t,n){"use strict";var r=n(99196),o=n.n(r),a=n(93468);const i={"--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)"},s={"--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 )"},c={"--jp-border-radius":"4px","--jp-menu-border-height":"1px","--jp-underline-thickness":"2px"},l={"--spacing-base":"8px"},u={},p=(e,t,n)=>{const r={...i,...s,...c,...l};for(const t in r)e.style.setProperty(t,r[t]);n&&e.classList.add(a.Z.global),t&&(u[t]={provided:!0,root:e})};t.ZP=e=>{let{children:t=null,targetDom:n,id:a,withGlobalStyles:i=!0}=e;const s=(0,r.useRef)(),c=u?.[a]?.provided;return(0,r.useLayoutEffect)((()=>{if(!c)return n?p(n,a,i):void(s?.current&&p(s.current,a,i))}),[n,s,c,a,i]),n?t:o().createElement("div",{ref:s},t)}},6895:function(e,t,n){"use strict";function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={};let r;if("undefined"!=typeof window&&(r=window?.JP_CONNECTION_INITIAL_STATE?.calypsoEnv),0===e.search("https://")){const t=new URL(e);e=`https://${t.host}${t.pathname}`,n.url=encodeURIComponent(e)}else n.source=encodeURIComponent(e);for(const e in t)n[e]=encodeURIComponent(t[e]);!Object.keys(n).includes("site")&&"undefined"!=typeof jetpack_redirects&&jetpack_redirects.hasOwnProperty("currentSiteRawUrl")&&(n.site=jetpack_redirects.currentSiteRawUrl),r&&(n.calypso_env=r);return"https://jetpack.com/redirect/?"+Object.keys(n).map((e=>e+"="+n[e])).join("&")}n.d(t,{Z:function(){return r}})},61132:function(e,t,n){let r={};try{r=n(92787)}catch{console.error("jetpackConfig is missing in your webpack config file. See @automattic/jetpack-config"),r={missingConfig:!0}}const o=e=>r.hasOwnProperty(e);e.exports={jetpackConfigHas:o,jetpackConfigGet:e=>{if(!o(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 r[e]}}},31294:function(e,t,n){"use strict";var r=n(64743),o=n(9818),a=n(99196),i=n(80428);const s=window?.JP_CONNECTION_INITIAL_STATE?window.JP_CONNECTION_INITIAL_STATE:{};t.Z=function(){let{registrationNonce:e=s.registrationNonce,apiRoot:t=s.apiRoot,apiNonce:n=s.apiNonce,redirectUri:c,autoTrigger:l,from:u,skipUserConnection:p}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{registerSite:d,connectUser:m,refreshConnectedPlugins:h}=(0,o.useDispatch)(i.t),f=(0,o.useSelect)((e=>e(i.t).getRegistrationError())),{siteIsRegistering:g,userIsConnecting:b,userConnectionData:v,connectedPlugins:k,connectionErrors:y,isRegistered:w,isUserConnected:E,hasConnectedOwner:_,isOfflineMode:C}=(0,o.useSelect)((e=>({siteIsRegistering:e(i.t).getSiteIsRegistering(),userIsConnecting:e(i.t).getUserIsConnecting(),userConnectionData:e(i.t).getUserConnectionData(),connectedPlugins:e(i.t).getConnectedPlugins(),connectionErrors:e(i.t).getConnectionErrors(),isOfflineMode:e(i.t).getIsOfflineMode(),...e(i.t).getConnectionStatus()}))),S=()=>p?c?(window.location=c,Promise.resolve(c)):Promise.resolve():m({from:u,redirectUri:c}),j=t=>(t&&t.preventDefault(),w?S():d({registrationNonce:e,redirectUri:c}).then((()=>S())));return(0,a.useEffect)((()=>{r.ZP.setApiRoot(t),r.ZP.setApiNonce(n)}),[t,n]),(0,a.useEffect)((()=>{!l||g||b||j()}),[]),{handleRegisterSite:j,handleConnectUser:S,refreshConnectedPlugins:h,isRegistered:w,isUserConnected:E,siteIsRegistering:g,userIsConnecting:b,registrationError:f,userConnectionData:v,hasConnectedOwner:_,connectedPlugins:k,connectionErrors:y,isOfflineMode:C}}},27523:function(e,t,n){"use strict";n.d(t,{LI:function(){return a},N4:function(){return s},Qo:function(){return p},T1:function(){return l},TS:function(){return u},ZP:function(){return E},b5:function(){return m},i6:function(){return o},qJ:function(){return h},qV:function(){return c},r7:function(){return i},wQ:function(){return d}});var r=n(64743);const o="SET_CONNECTION_STATUS",a="SET_CONNECTION_STATUS_IS_FETCHING",i="SET_SITE_IS_REGISTERING",s="SET_USER_IS_CONNECTING",c="SET_REGISTRATION_ERROR",l="CLEAR_REGISTRATION_ERROR",u="SET_AUTHORIZATION_URL",p="DISCONNECT_USER_SUCCESS",d="SET_CONNECTED_PLUGINS",m="SET_CONNECTION_ERRORS",h="SET_IS_OFFLINE_MODE",f=e=>({type:o,connectionStatus:e}),g=e=>({type:i,isRegistering:e}),b=e=>({type:s,isConnecting:e}),v=e=>({type:c,registrationError:e}),k=()=>({type:l}),y=e=>({type:u,authorizationUrl:e}),w=e=>({type:d,connectedPlugins:e});const E={setConnectionStatus:f,setConnectionStatusIsFetching:e=>({type:a,isFetching:e}),fetchConnectionStatus:()=>({type:"FETCH_CONNECTION_STATUS"}),fetchAuthorizationUrl:e=>({type:"FETCH_AUTHORIZATION_URL",redirectUri:e}),setSiteIsRegistering:g,setUserIsConnecting:b,setRegistrationError:v,clearRegistrationError:k,setAuthorizationUrl:y,registerSite:function(e){let{registrationNonce:t,redirectUri:n}=e;return function*(){yield k(),yield g(!0);try{const e=yield{type:"REGISTER_SITE",registrationNonce:t,redirectUri:n};return yield f({isRegistered:!0}),yield y(e.authorizeUrl),yield g(!1),Promise.resolve(e)}catch(e){return yield v(e),yield g(!1),Promise.reject(e)}}()},connectUser:function(){let{from:e,redirectFunc:t,redirectUri:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function*(){yield b(!0),yield{type:"CONNECT_USER",from:e,redirectFunc:t,redirectUri:n}}()},disconnectUserSuccess:()=>({type:p}),setConnectedPlugins:w,refreshConnectedPlugins:()=>async e=>{let{dispatch:t}=e;return await new Promise((e=>r.ZP.fetchConnectedPlugins().then((n=>{t(w(n)),e(n)}))))},setConnectionErrors:e=>({type:m,connectionErrors:e}),setIsOfflineMode:e=>({type:h,isOfflineMode:e})}},31432:function(e,t,n){"use strict";var r=n(64743),o=n(9818),a=n(27057);const i=(0,o.createRegistryControl)((e=>{let{resolveSelect:t}=e;return function(){let{from:e,redirectFunc:n,redirectUri:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise(((o,i)=>{t(a.Z).getAuthorizationUrl(r).then((t=>{const r=n||(e=>window.location.assign(e)),a=new URL(t);e&&a.searchParams.set("from",encodeURIComponent(e));const i=a.toString();r(i),o(i)})).catch((e=>{i(e)}))}))}}));t.Z={FETCH_AUTHORIZATION_URL:e=>{let{redirectUri:t}=e;return r.ZP.fetchAuthorizationUrl(t)},REGISTER_SITE:e=>{let{registrationNonce:t,redirectUri:n}=e;return r.ZP.registerSite(t,n)},CONNECT_USER:i}},41479:function(e,t,n){"use strict";var r=n(9818),o=n(27523);const a=(0,r.combineReducers)({connectionStatus:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case o.i6:return{...e,...t.connectionStatus};case o.Qo:return{...e,isUserConnected:!1}}return e},connectionStatusIsFetching:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===o.LI?t.isFetching:e},siteIsRegistering:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===o.r7?t.isRegistering:e},userIsConnecting:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===o.N4?t.isConnecting:e},registrationError:(e,t)=>{switch(t.type){case o.T1:return!1;case o.qV:return t.registrationError;default:return e}},authorizationUrl:(e,t)=>t.type===o.TS?t.authorizationUrl:e,userConnectionData:(e,t)=>(t.type,e),connectedPlugins:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.type===o.wQ?t.connectedPlugins:e},connectionErrors:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.type===o.b5?t.connectionErrors:e},isOfflineMode:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===o.qJ?t.isConnecting:e}});t.Z=a},77728:function(e,t,n){"use strict";var r=n(9818),o=n(27523),a=n(27057);const i={getAuthorizationUrl:{isFulfilled:function(e){const t=Boolean(e.authorizationUrl);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];const s=(0,r.select)(a.Z).hasFinishedResolution("getAuthorizationUrl",o);return t&&!s&&(0,r.dispatch)(a.Z).finishResolution("getAuthorizationUrl",o),t},*fulfill(e){const t=yield o.ZP.fetchAuthorizationUrl(e);yield o.ZP.setAuthorizationUrl(t.authorizeUrl)}}};t.Z={...i}},82725:function(e,t){"use strict";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}};t.Z=n},13535:function(e,t,n){"use strict";var r=n(9818);class o{static store=null;static mayBeInit(e,t){null===o.store&&(o.store=(0,r.createReduxStore)(e,t),(0,r.register)(o.store))}}t.Z=o},27057:function(e,t){"use strict";t.Z="jetpack-connection"},80428:function(e,t,n){"use strict";n.d(t,{t:function(){return l.Z}});var r=n(27523),o=n(31432),a=n(41479),i=n(77728),s=n(82725),c=n(13535),l=n(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."),c.Z.mayBeInit(l.Z,{__experimentalUseThunks:!0,reducer:a.Z,actions:r.ZP,selectors:s.Z,resolvers:i.Z,controls:o.Z,initialState:u||{}})},13419:function(e,t,n){"use strict";n.d(t,{Dp:function(){return l.Z},FK:function(){return c.FK},HD:function(){return c.HD},M6:function(){return a.M6},OZ:function(){return i.Z},Pb:function(){return r.Z},Qq:function(){return c.Qq},Rl:function(){return c.Rl},T:function(){return s.Z},Ug:function(){return a.Ug},Wp:function(){return a.Wp},X1:function(){return c.X1},_D:function(){return c._D},dM:function(){return d.d},el:function(){return p.Z},lQ:function(){return o.Z},lt:function(){return d.l},m3:function(){return c.m3},z$:function(){return u.Z}});var r=n(50148),o=n(35004),a=n(99505),i=n(48052),s=(n(76714),n(80354)),c=n(75404),l=n(68586),u=n(61053),p=n(11380),d=(n(6342),n(96959))},6342:function(e,t,n){"use strict";n(99196)},96959:function(e,t,n){"use strict";n.d(t,{d:function(){return a},l:function(){return i}});var r=n(69307),o=n(12953);function a(e){const t={};let n="span",o=e.icon;const a=document.createElement("div");a.innerHTML=e.icon;const i=a.querySelector("svg");return i&&(n="svg",o=i.innerHTML,Array.from(i.attributes).forEach((e=>{let{nodeName:n,nodeValue:r}=e;return t[n]=r}))),(0,r.createElement)(n,{...t,dangerouslySetInnerHTML:{__html:o||""}})}function i(e){return{src:a(e),foreground:(0,o.Z)()}}},12953:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(99505);const o="#069e08";function a(){return(0,r.Ug)()||(0,r.Wp)()?null:o}},50148:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});const r="Jetpack_Editor_Initial_State";function o(){return"object"==typeof window?window?.[r]??null:null}},48052:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(50148);function o(e){const t=(0,r.Z)(),n=t?.available_blocks?.[e]?.available??!1,o=t?.available_blocks?.[e]?.unavailable_reason??"unknown";return{available:n,...!n&&{details:t?.available_blocks?.[e]?.details??[],unavailableReason:o}}}},35004:function(e,t,n){"use strict";function r(){return window&&window.Jetpack_Editor_Initial_State&&window.Jetpack_Editor_Initial_State.siteFragment?window.Jetpack_Editor_Initial_State.siteFragment:null}n.d(t,{Z:function(){return r}})},61053:function(e,t,n){"use strict";var r=n(6975),o=n(31294),a=n(69307);const{tracks:i}=r.Z,{recordEvent:s}=i;t.Z=function(){let{pageViewEventName:e=null,pageViewNamespace:t="jetpack",pageViewSuffix:n="page_view",pageViewEventProperties:c={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[l,u]=(0,a.useState)(!1),{isUserConnected:p,isRegistered:d,userConnectionData:m={}}=(0,o.Z)(),{wpcomUser:{login:h,ID:f}={},blogId:g}=m.currentUser||{},b=(0,a.useCallback)((async function(e){p&&f&&h&&s(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}),[p,f,h]);return(0,a.useEffect)((()=>{p&&f&&h&&g&&r.Z.initialize(f,h,{blog_id:g})}),[g,f,h,p]),(0,a.useEffect)((()=>{const r=e?`${t}_${e}_${n}`:null;d&&r&&(l||(b(r,c),u(!0)))}),[l,t,e,n,d,c,b]),{recordEvent:b,tracks:i}}},11380:function(e,t,n){"use strict";var r=n(86989),o=n.n(r),a=n(69307),i=n(99505);async function s(e){if((0,i.Wp)())return!0;try{const t=await async function(){try{return await o()({path:"/jetpack/v4/module/all",method:"GET"})}catch(e){return e.message}}();return!(!t||!t.hasOwnProperty(e))&&!!t[e].activated}catch(e){return!1}}t.Z=e=>{const[t,n]=(0,a.useState)(Boolean(e)),[r,i]=(0,a.useState)(!1),[c,l]=(0,a.useState)(!1);(0,a.useEffect)((()=>{e&&(n(!0),s(e).then((e=>{l(e),n(!1)})))}),[e]);const u=(0,a.useCallback)((t=>{e&&c!==t&&(i(!0),async function(e,t){return await o()({path:`/jetpack/v4/module/${e}/active`,method:"POST",data:{active:t}})}(e,t).then((()=>{l(t),i(!1)})).catch((()=>{i(!1)})))}),[e,c]);return(0,a.useMemo)((()=>({isLoadingModules:t,isChangingStatus:r,isModuleActive:c,changeStatus:u})),[t,r,c,u])}},68586:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(50148);function o(){return(0,r.Z)()?.jetpack?.is_current_user_connected??!1}},75404:function(e,t,n){"use strict";n.d(t,{FK:function(){return f},HD:function(){return g},Qq:function(){return u},Rl:function(){return m},X1:function(){return p},_D:function(){return d},m3:function(){return b}});var r=n(65736),o=n(96483),a=n(92819),i=n(50148),s=n(48052),c=n(35004),l=n(99505);const __=r.__;function u(e){let{planSlug:t,plan:n,postId:r,postType:i}=e;const s=(0,a.startsWith)(t,"jetpack_")?t:(0,a.get)(n,["path_slug"]),u=(void 0===i?()=>{const e=new URLSearchParams(window.location.search);return(0,o.addQueryArgs)(window.location.protocol+`//${(0,c.Z)().replace("::","/")}/wp-admin/site-editor.php`,{postId:e.get("postId"),postType:e.get("postType"),plan_upgraded:1})}:()=>{const e=["page","post"].includes(i)?"":"edit";return(0,l.Wp)()?(0,o.addQueryArgs)("/"+(0,a.compact)([e,i,(0,c.Z)(),r]).join("/"),{plan_upgraded:1}):(0,o.addQueryArgs)(window.location.protocol+`//${(0,c.Z)().replace("::","/")}/wp-admin/post.php`,{action:"edit",post:r,plan_upgraded:1})})();return(0,l.Ug)()?(0,o.addQueryArgs)(`https://wordpress.com/plans/${(0,c.Z)()}`,{redirect_to:u,customerType:"business"}):s&&(0,o.addQueryArgs)(`https://wordpress.com/checkout/${(0,c.Z)()}/${s}`,{redirect_to:u})}function p(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{available:n,unavailableReason:r}=(0,s.Z)(t);return!n&&"missing_plan"===r}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:n,unavailableReason:r}=(0,s.Z)(t);return d(r,n)}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 f(){return(0,a.get)((0,i.Z)(),"jetpack.enable_upgrade_nudge",!1)}const g=e=>(0,a.map)(h,"name").includes(e),b=e=>(0,a.head)((0,a.filter)(h,(t=>{let{name:n}=t;return n===e})))},76714:function(e,t,n){"use strict";n(98817)},99505:function(e,t,n){"use strict";n.d(t,{M6:function(){return s},Ug:function(){return i},Wp:function(){return a}});var r=n(50148);function o(){return"object"==typeof window&&"string"==typeof window._currentSiteType?window._currentSiteType:null}function a(){return"simple"===o()}function i(){return"atomic"===o()}function s(){const e=(0,r.Z)();return e?.jetpack?.is_private_site??!1}},80354:function(e,t,n){"use strict";var r=n(82674),o=n.n(r),a=n(94333);t.Z=e=>(0,a.createHigherOrderComponent)((t=>n=>React.createElement(t,o()({},n,{className:n.name===e?"has-warning is-interactive":n.className}))),"withHasWarningIsInteractiveClassNames")},84005:function(e,t){"use strict";t.Z={content:{type:"string"},originalContent:{type:"string"},promptType:{type:"string"},originalMessages:{type:"array",default:[]},messages:{type:"array",default:[]},useGutenbergSyntax:{type:"boolean",default:!1},useGpt4:{type:"boolean",default:!1},customSystemPrompt:{type:"string",default:""}}},83059:function(e,t,n){"use strict";n.d(t,{B3:function(){return y},ZP:function(){return E}});var r=n(51806),o=n(36222),a=n(55609),i=n(65736),s=n(586),c=n(3639),l=n(92710),u=n(58532),p=n(65235),d=n.n(p),m=(n(99196),n(63634)),h=n(81612),f=n(27298);const __=i.__,g="correct-spelling",b="simplify",v="summarize",k="make-longer",y="ask-ai-assistant",w=[{name:__("Correct spelling and grammar","jetpack"),key:g,aiSuggestion:m.Hd,icon:s.Z},{name:__("Simplify","jetpack"),key:b,aiSuggestion:m.hI,icon:c.Z},{name:__("Summarize","jetpack"),key:v,aiSuggestion:m.Lq,icon:l.Z},{name:__("Expand","jetpack"),key:k,aiSuggestion:m.TV,icon:u.Z}];function E(e){let{key:t,label:n,exclude:i=[],requestingState:s,disabled:c,onChange:l,onReplace:u}=e;const p=w.filter((e=>!i.includes(e.key))),g="suggesting"===s?null:n||__("AI Assistant","jetpack");return(0,r.createElement)(a.Dropdown,{popoverProps:{variant:"toolbar"},renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,r.createElement)(a.ToolbarButton,{className:d()("jetpack-ai-assistant__button",{[`is-${s}`]:!0}),showTooltip:!0,onClick:n,"aria-haspopup":"true","aria-expanded":t,label:g,icon:o.u_,disabled:c})},renderContent:e=>{let{onClose:s}=e;return(0,r.createElement)(a.MenuGroup,{label:n},!i.includes(y)&&(0,r.createElement)(a.MenuItem,{icon:o.u_,iconPosition:"left",key:"key-ai-assistant",onClick:u,isSelected:"key-ai-assistant"===t},(0,r.createElement)("div",{className:"jetpack-ai-assistant__menu-item"},__("Ask AI Assistant","jetpack"))),p.map((e=>(0,r.createElement)(a.MenuItem,{icon:e?.icon,iconPosition:"left",key:`key-${e.key}`,onClick:()=>{l(e.aiSuggestion),s()},isSelected:t===e.key},(0,r.createElement)("div",{className:"jetpack-ai-assistant__menu-item"},e.name)))),(0,r.createElement)(f.IP,{onChange:e=>{l(m.Lg,{tone:e}),s()}}),(0,r.createElement)(h.xK,{onChange:e=>{l(m.Nw,{language:e}),s()}}))}})}},3180:function(e,t,n){"use strict";var r=n(51806),o=n(65736),a=n(26546),i=n(46867);const __=o.__;t.Z=()=>{const e=`${window?.Jetpack_Editor_Initial_State?.adminUrl}admin.php?page=my-jetpack#/connection`,{autosaveAndRedirect:t,isRedirecting:n}=(0,i.Z)(e);return(0,r.createElement)(a.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:n,visible:!0,align:null,title:null,context:null})}},81612:function(e,t,n){"use strict";n.d(t,{ZP:function(){return f},xK:function(){return g}});var r=n(51806),o=n(55609),a=n(65736),i=n(61074),s=n(46936),c=n(43618);n(99196);const __=a.__,l=["en","es","fr","de","it","pt","ru","zh","ja","ar","hi","ko"],u=window?.Jetpack_Editor_Initial_State?.siteLocale||navigator?.language,p=__("Translate","jetpack"),d=u?.split("-")[0]||"en",m=(u?.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")}}),h=e=>{let{value:t,onChange:n}=e;const a=[...l.filter((e=>e!==d))];return l.includes(d)&&a.unshift(d),(0,r.createElement)(o.MenuGroup,{label:__("Select language","jetpack")},a.map((e=>(0,r.createElement)(o.MenuItem,{key:`key-${e}`,onClick:()=>n(e+" ("+m[e].label+")"),isSelected:t===e},m[e].label))))};function f(e){let{value:t=d,label:n=p,onChange:a}=e;return(0,r.createElement)(o.ToolbarDropdownMenu,{icon:c.Z,label:n,popoverProps:{variant:"toolbar"}},(()=>(0,r.createElement)(h,{value:t,onChange:a})))}function g(e){let{value:t=d,label:n=p,disabled:a=!1,onChange:l}=e;return(0,r.createElement)(o.DropdownMenu,{className:"ai-assistant__i18n-dropdown",icon:c.Z,label:n,disabled:a,toggleProps:{children:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"ai-assistant__i18n-dropdown__toggle-label"},n),(0,r.createElement)(i.Z,{icon:s.Z}))}},(e=>{let{onClose:n}=e;return(0,r.createElement)(h,{onChange:e=>{l(e),n()},value:t})}))}},50297:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(65736);const __=a.__;t.Z=e=>{let{image:t,inModal:n=!1,saveImage:a,setImageModal:i}=e;return(0,r.createElement)(o.Flex,{direction:"column"},n&&(0,r.createElement)(o.FlexItem,{style:{textAlign:"center"}},(0,r.createElement)(o.Button,{variant:"primary",onClick:()=>a(t)},__("Use this image","jetpack"))),(0,r.createElement)(o.FlexBlock,null,(0,r.createElement)("input",{type:"image",className:"wp-block-ai-image-image",src:t,alt:"",onClick:()=>i(t)})),!n&&(0,r.createElement)(o.FlexBlock,null,(0,r.createElement)(o.Flex,{direction:"column",style:{alignItems:"center"}},(0,r.createElement)(o.FlexItem,null,(0,r.createElement)(o.Button,{variant:"primary",onClick:()=>a(t)},__("Use this image","jetpack"))))))}},24404:function(e,t,n){"use strict";n.d(t,{ZP:function(){return h}});var r=n(51806),o=n(55609),a=n(65736),i=n(77840);n(99196);const __=a.__,s="make-longer",c="makeLonger",l="make-shorter",u="makeShorter",p="summarize",d="summarize",m=[{name:__("Summarize","jetpack"),key:p,aiSuggestion:d},{name:__("Make longer","jetpack"),key:s,aiSuggestion:c},{name:__("Make shorter","jetpack"),key:l,aiSuggestion:u}];function h(e){let{key:t,label:n,exclude:a=[],onChange:s}=e;return(0,r.createElement)(o.ToolbarDropdownMenu,{icon:i.Z,label:n||__("Improve","jetpack"),popoverProps:{variant:"toolbar"}},(()=>{const e=m.filter((e=>!a.includes(e.key)));return(0,r.createElement)(o.MenuGroup,{label:n},e.map((e=>(0,r.createElement)(o.MenuItem,{key:`key-${e.key}`,onClick:()=>s(e.aiSuggestion,{contentType:"generated"}),isSelected:t===e.key},e.name))))}))}},85642:function(e,t,n){"use strict";n.d(t,{Ie:function(){return d},ZP:function(){return m}});var r=n(51806),o=n(55609),a=n(65736),i=n(58532),s=n(586),c=n(3639),l=n(92710),u=n(32677),p=n(77840);n(99196);const __=a.__,d=[{label:__("Post about…","jetpack"),description:{original:"Write a post about ",translated:__("Write a post about ","jetpack")}},{label:__("Informative article on…","jetpack"),description:{original:"Craft an informative article explaining ",translated:__("Craft an informative article explaining ","jetpack")}},{label:__("Step-by-step tutorial on…","jetpack"),description:{original:"Write a step-by-step tutorial on ",translated:__("Write a step-by-step tutorial on ","jetpack")}},{label:__("Motivational post on…","jetpack"),description:{original:"Create a motivational post on ",translated:__("Create a motivational post on ","jetpack")}}];function m(e){let{hasContentBefore:t,hasContent:n,hasPostTitle:a,onPromptSelect:m,onSuggestionSelect:h}=e;const f=__("Write with AI…","jetpack");return(0,r.createElement)(o.ToolbarDropdownMenu,{className:"jetpack-ai-assistant__templates-control",icon:null,label:f,text:f},(e=>{let{onClose:f}=e;return(0,r.createElement)(r.Fragment,null,t&&(0,r.createElement)(o.MenuGroup,{label:__("Based on preceding content…","jetpack")},(0,r.createElement)(o.MenuItem,{icon:i.Z,iconPosition:"left",onClick:()=>h("continue")},__("Continue writing","jetpack")),(0,r.createElement)(o.MenuItem,{icon:s.Z,iconPosition:"left",onClick:()=>h("correctSpelling")},__("Correct spelling and grammar","jetpack")),(0,r.createElement)(o.MenuItem,{icon:c.Z,iconPosition:"left",onClick:()=>h("simplify")},__("Simplify","jetpack"))),n&&(0,r.createElement)(o.MenuGroup,{label:__("Based on entire content…","jetpack")},n&&(0,r.createElement)(o.MenuItem,{icon:l.Z,iconPosition:"left",onClick:()=>h("summarize")},__("Summarize","jetpack")),n&&(0,r.createElement)(o.MenuItem,{icon:u.Z,iconPosition:"left",onClick:()=>h("generateTitle")},__("Generate a post title","jetpack"))),(0,r.createElement)(o.MenuGroup,{label:__("Write…","jetpack")},a&&(0,r.createElement)(o.MenuItem,{icon:p.Z,iconPosition:"left",onClick:()=>h("titleSummary")},__("Summary based on title","jetpack")),d.map(((e,t)=>(0,r.createElement)(o.MenuItem,{icon:p.Z,iconPosition:"left",key:`key-${t}`,onClick:()=>{f(),m(e.description)}},e.label)))))}))}},27298:function(e,t,n){"use strict";n.d(t,{IP:function(){return d},Nj:function(){return l},ZP:function(){return m}});var r=n(51806),o=n(36222),a=n(55609),i=n(65736),s=n(46936);n(99196);const __=i.__,c=["formal","informal","optimistic","humorous","serious","skeptical","empathetic","confident","passionate","provocative"],l="formal",u={formal:{label:__("Formal","jetpack"),emoji:"🎩"},informal:{label:__("Informal","jetpack"),emoji:"😊"},optimistic:{label:__("Optimistic","jetpack"),emoji:"😃"},humorous:{label:__("Humorous","jetpack"),emoji:"😂"},serious:{label:__("Serious","jetpack"),emoji:"😐"},skeptical:{label:__("Skeptical","jetpack"),emoji:"🤨"},empathetic:{label:__("Empathetic","jetpack"),emoji:"💗"},confident:{label:__("Confident","jetpack"),emoji:"😎"},passionate:{label:__("Passionate","jetpack"),emoji:"❤️"},provocative:{label:__("Provocative","jetpack"),emoji:"🔥"}},p=e=>{let{value:t,onChange:n}=e;return(0,r.createElement)(a.MenuGroup,{label:__("Select tone","jetpack")},c.map((e=>(0,r.createElement)(a.MenuItem,{key:`key-${e}`,onClick:()=>n(e),isSelected:t===e},`${u[e].emoji} ${u[e].label}`))))};function d(e){let{label:t=__("Change tone","jetpack"),value:n=l,onChange:i}=e;return(0,r.createElement)(a.DropdownMenu,{icon:o.v_,label:t,className:"ai-assistant__tone-dropdown",popoverProps:{variant:"toolbar"},toggleProps:{children:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"ai-assistant__tone-dropdown__toggle-label"},t),(0,r.createElement)(a.Icon,{icon:s.Z}))}},(e=>{let{onClose:t}=e;return(0,r.createElement)(p,{value:n,onChange:e=>{i(e),t()}})}))}function m(e){let{value:t=l,onChange:n}=e;return(0,r.createElement)(a.ToolbarDropdownMenu,{icon:o.v_,label:__("Change tone","jetpack"),popoverProps:{variant:"toolbar"}},(()=>(0,r.createElement)(p,{value:t,onChange:n})))}},4965:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(55609),i=n(65736),s=n(79201),c=n(48381),l=(n(75022),n(63634)),u=n(81612),p=n(24404),d=n(85642),m=n(27298);const __=i.__;t.Z=e=>{let{contentIsLoaded:t,getSuggestionFromOpenAI:n,retryRequest:i,handleAcceptContent:h,handleImageRequest:f,handleTryAgain:g,showRetry:b,contentBefore:v,hasPostTitle:k,wholeContent:y,setUserPrompt:w,recordEvent:E,isGeneratingTitle:_}=e;return(0,r.createElement)(r.Fragment,null,t&&(0,r.createElement)(o.BlockControls,{group:"block"},(0,r.createElement)(m.ZP,{value:"neutral",onChange:e=>{E("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:l.Lg}),n(l.Lg,{tone:e,contentType:"generated"})},disabled:t}),(0,r.createElement)(u.ZP,{value:"en",onChange:e=>{E("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:l.Nw}),n(l.Nw,{language:e,contentType:"generated"})},disabled:t}),(0,r.createElement)(p.ZP,{onChange:n,exclude:_?["summarize"]:[]})),(0,r.createElement)(o.BlockControls,null,!b&&!t&&(0,r.createElement)(d.ZP,{hasContentBefore:!!v?.length,hasContent:!!y?.length,hasPostTitle:k,onPromptSelect:e=>{E("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"prompt-template",prompt:e.original}),w(e.translated)},onSuggestionSelect:e=>{E("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:e}),n(e)}}),(0,r.createElement)(a.ToolbarGroup,null,!b&&t&&(0,r.createElement)(a.ToolbarButton,{onClick:g},__("Try Again","jetpack")),!b&&!t&&!!y?.length&&(0,r.createElement)(o.BlockControls,{group:"block"},(0,r.createElement)(m.ZP,{value:"neutral",onChange:e=>{E("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:l.Lg}),n(l.Lg,{tone:e})}}),(0,r.createElement)(u.ZP,{value:"en",label:__("Translate","jetpack"),onChange:e=>{E("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:l.Nw}),n(l.Nw,{language:e})}})),b&&t&&(0,r.createElement)(a.ToolbarButton,{icon:s.Z,onClick:h},__("Accept","jetpack")),b&&(0,r.createElement)(a.ToolbarButton,{icon:c.Z,onClick:i},__("Retry","jetpack"))),false))}},5246:function(e,t,n){"use strict";var r=n(51806),o=n(69307),a=n(65736),i=(n(99196),n(26546)),s=n(63206),c=n(18135),l=n(71449);const __=a.__;t.Z=()=>{const{upgradeType:e}=(0,c.ZP)();return"vip"===e?(0,r.createElement)(i.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,r.createElement)("strong",null)}),goToCheckoutPage:null,isRedirecting:null,visible:!0,align:null,title:null,context:null}):(()=>{const{checkoutUrl:e,autosaveAndRedirect:t,isRedirecting:n}=(0,s.Z)();return(0,l.d)()?(0,r.createElement)(i.p,{buttonText:"Upgrade",checkoutUrl:e,className:"jetpack-ai-upgrade-banner",description:(0,o.createInterpolateElement)(__("Congratulations on exploring Jetpack AI and reaching the free requests limit!<br /><strong>Upgrade now to keep using it.</strong>","jetpack"),{br:(0,r.createElement)("br",null),strong:(0,r.createElement)("strong",null)}),goToCheckoutPage:t,isRedirecting:n,visible:!0,align:null,title:null,context:null}):(0,r.createElement)(i.p,{showButton:!1,className:"jetpack-ai-upgrade-banner",description:(0,o.createInterpolateElement)(__("Congratulations on exploring Jetpack AI and reaching the free requests limit!<br /><strong>Reach out to the site administrator to upgrade and keep using Jetpack AI.</strong>","jetpack"),{br:(0,r.createElement)("br",null),strong:(0,r.createElement)("strong",null)}),visible:!0,align:null,title:null,context:null})})()}},45624:function(e,t,n){"use strict";n.d(t,{Z:function(){return I}});var r=n(82674),o=n.n(r),a=n(51806),i=n(36222),s=n(13419),c=n(52175),l=n(4981),u=n(55609),p=n(94333),d=n(9818),m=n(69307),h=n(65736),f=n(65235),g=n.n(f),b=n(10185),v=n.n(b),k=n(99196),y=n(3180),w=n(50297),E=n(85642),_=n(4965),C=n(5246),S=n(49259),j=n(18135),x=n(60751),L=n(71449),P=n(3687),A=n(63634);const __=h.__,T=new(v())({breaks:!0}),N="post"===window?.Jetpack_Editor_Initial_State?.screenBase,M=window?.Jetpack_Editor_Initial_State?.["ai-assistant"]?.["is-playground-visible"];function I(e){let{attributes:t,setAttributes:n,clientId:r}=e;const[h,f]=(0,m.useState)(),[b,v]=(0,m.useState)({}),[I,R]=(0,m.useState)(!1),[Z,D]=(0,m.useState)([]),[B,F]=(0,m.useState)(null),[O,U]=(0,m.useState)(null),{tracks:z}=(0,s.z$)(),H=(0,d.useSelect)((e=>e("core/editor").getCurrentPostId())),$=(0,d.useSelect)((e=>()=>e("core/block-editor").getBlock(r)),[r]),q=(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}}),[]),X=()=>{setTimeout((()=>{q.current?.focus?.()}),100)},Q=(0,p.useViewportMatch)("medium","<"),{requireUpgrade:ee,refresh:te}=(0,j.ZP)(),ne=ee||"error_quota_exceeded"===b?.code,{isLoadingCategories:re,isLoadingCompletion:oe,wasCompletionJustRequested:ae,getSuggestionFromOpenAI:ie,stopSuggestion:se,showRetry:ce,contentBefore:le,postTitle:ue,retryRequest:pe,wholeContent:de,requestingState:me}=(0,x.Z)({onSuggestionDone:X,onUnclearPrompt:X,onModeration:X,attributes:t,clientId:r,content:t.content,setError:v,tracks:z,userPrompt:h,refreshFeatureData:te,requireUpgrade:ne}),he=(0,L.b)(),fe=(0,S.$M)(r);(0,k.useEffect)((()=>{if(!fe)return;const e=JSON.parse(localStorage.getItem(fe));if(!e)return;const{type:t,options:n}=e;localStorage.removeItem(fe),ie(t,n)}),[fe,ie]),(0,k.useEffect)((()=>{b&&U(!1)}),[b]);const ge=(0,k.useRef)(t?.content);(0,k.useEffect)((()=>{if(!t?.useGutenbergSyntax)return;if(!ge?.current?.length)return;const e=$();if(e?.innerBlocks?.length)return;const n=(0,l.parse)(ge.current);n?.length&&G(r,n)}),[ge,r,G,$,t?.useGutenbergSyntax]);const[be,ve]=(0,m.useState)(""),[ke,ye]=(0,m.useState)(0);(0,k.useEffect)((()=>{const e=setInterval((()=>{ke<E.Ie.length?(ve(E.Ie[ke].label),ye((e=>e+1))):(clearInterval(e),ve(__("Ask Jetpack AI","jetpack")))}),1600);return()=>clearInterval(e)}),[be,ke]);const we=async e=>{if(I)return;R(!0),v({});const n=await fetch(e),o=await n.blob(),a=new File([o],"jetpack_ai_image.png",{type:"image/png"});Y({filesList:[a],onFileChange:e=>{let[n]=e;n.id&&W(r,(0,l.createBlock)("core/image",{url:n.url,caption:t.requestedPrompt,alt:t.requestedPrompt}))},allowedTypes:["image"],onError:e=>{console.error(e),R(!1)}}),z.recordEvent("jetpack_ai_dalle_generation_upload",{post_id:H})},Ee=t?.useGutenbergSyntax,_e=oe||re,Ce=!!t.content,Se="generateTitle"===t.promptType,je=__("Accept","jetpack"),xe=__("Accept title","jetpack"),Le=Se?xe:je,Pe=function(){ie(...arguments),setTimeout((()=>{V.current?.focus?.()}),100)},Ae=async()=>{let e=[];if(Ee)e=$(),e=e?.innerBlocks||[];else{const n=T.render(t.content).replace(/<li>\s+<p>/g,"<li>").replace(/<\/p>\s+<\/li>/g,"</li>");e=(0,l.rawHandler)({HTML:n})}await G(r,e);const n=(e=>{let t=null;return e.forEach((e=>{const n=document.querySelector(`.wp-block[data-block="${e.clientId}"]`);if(!n)return;"true"===n.contentEditable&&(t=n);const r=n.querySelectorAll("[contenteditable=true]");t=r.length?r[r.length-1]:t})),t})(e);n&&(e=>{const t=window.getSelection();t.selectAllChildren(e),t.collapseToEnd(),e.focus()})(n)},Te=()=>{N?(K({title:t.content.trim()}),J(r)):Ae()},Ne=()=>{se(),X()},[Me,Ie]=(0,m.useState)(!1),Re=()=>{Ie(!Me)},Ze=(0,c.useBlockProps)({ref:V,className:g()({"is-waiting-response":ae})}),De=(0,c.useInnerBlocksProps)(Ze);return(0,a.createElement)(u.KeyboardShortcuts,{bindGlobal:!0,shortcuts:{esc:()=>{["requesting","suggesting"].includes(me)&&Ne()}}},(0,a.createElement)("div",Ze,b?.message&&!O&&"error_quota_exceeded"!==b?.code&&(0,a.createElement)(u.Notice,{status:b.status,isDismissible:!1,className:"jetpack-ai-assistant__error"},b.message),Ce&&!Ee&&(0,a.createElement)("div",{className:"jetpack-ai-assistant__content"},(0,a.createElement)(m.RawHTML,null,T.render(t.content))),Ce&&Ee&&(0,a.createElement)("div",o()({className:"jetpack-ai-assistant__content is-layout-building-mode"},De)),M&&(0,a.createElement)(c.InspectorControls,null,(0,a.createElement)(u.PanelBody,{title:__("AI Playground","jetpack"),initialOpen:!0},(0,a.createElement)(u.PanelRow,null,(0,a.createElement)(u.ToggleControl,{label:__("Gutenberg Syntax","jetpack"),onChange:e=>n({useGutenbergSyntax:e}),checked:t.useGutenbergSyntax})),(0,a.createElement)(u.PanelRow,null,(0,a.createElement)(u.ToggleControl,{label:__("GPT-4","jetpack"),onChange:e=>n({useGpt4:e}),checked:t.useGpt4})),(0,a.createElement)(u.PanelRow,null,Me&&(0,a.createElement)(u.Modal,{title:__("Custom System Prompt","jetpack"),onRequestClose:Re},(0,a.createElement)(u.TextareaControl,{rows:20,label:__("Set up the custom system prompt ","jetpack"),onChange:e=>n({customSystemPrompt:e}),className:"jetpack-ai-assistant__custom-prompt",value:t.customSystemPrompt||(0,A.t4)({useGutenbergSyntax:t.useGutenbergSyntax,useGpt4:t.useGpt4})?.content}),(0,a.createElement)("div",{className:"jetpack-ai-assistant__custom-prompt__footer"},(0,a.createElement)(u.Button,{onClick:()=>n({customSystemPrompt:""}),variant:"secondary"},__("Restore the prompt","jetpack")),(0,a.createElement)(u.Button,{onClick:Re,variant:"secondary"},__("Close","jetpack")))),(0,a.createElement)(u.Button,{onClick:Re,variant:"secondary"},__("Set system custom prompt","jetpack"))))),ne&&(0,a.createElement)(C.Z,null),!he&&(0,a.createElement)(y.Z,null),!_e&&he&&!ne&&(0,a.createElement)(_.Z,{isWaitingState:_e,contentIsLoaded:Ce,getSuggestionFromOpenAI:ie,retryRequest:pe,handleAcceptContent:Ae,handleAcceptTitle:Te,handleGetSuggestion:Pe,handleImageRequest:()=>{D([]),v({}),(0,P.b)(""===h.trim()?__("What would you like to see?","jetpack"):h,n,R,D,v,H),z.recordEvent("jetpack_ai_dalle_generation",{post_id:H})},handleTryAgain:()=>{n({content:t?.originalContent,promptType:void 0,messages:t?.originalMessages})},showRetry:ce,contentBefore:le,hasPostTitle:!!ue?.length,wholeContent:de,promptType:t.promptType,setUserPrompt:e=>{if(!q?.current)return;q.current.focus();for(let t=0;t<e.length;t++)setTimeout((()=>{f(e.slice(0,t+1))}),25*t)},recordEvent:z.recordEvent,isGeneratingTitle:Se}),(0,a.createElement)(i.tK,{ref:q,disabled:ne||!he,value:h,placeholder:be||__("Ask Jetpack AI","jetpack"),onChange:e=>{U(!0),f(e)},onSend:()=>{Pe("userPrompt")},onStop:Ne,onAccept:()=>{Se?Te():Ae()},state:me,isTransparent:ne||!he,showButtonLabels:!Q,showAccept:Ce&&!_e,acceptLabel:Le,showClearButton:!_e,showGuideLine:Ce}),!I&&Z.length>0&&(0,a.createElement)(u.Flex,{direction:"column",style:{width:"100%"}},(0,a.createElement)(u.FlexBlock,{style:{textAlign:"center",margin:"12px",fontStyle:"italic",width:"100%"}},t.requestedPrompt),(0,a.createElement)(u.FlexBlock,{style:{fontSize:"20px",lineHeight:"38px"}},__("Please choose your image","jetpack")),(0,a.createElement)(u.Flex,{direction:"row",wrap:!0},Z.map((e=>(0,a.createElement)(w.Z,{setImageModal:F,saveImage:we,image:e,key:e}))))),!I&&B&&(0,a.createElement)(u.Modal,{onRequestClose:()=>F(null)},(0,a.createElement)(w.Z,{saveImage:we,setImageModal:F,image:B,inModal:!0}))))}},27559:function(e,t,n){"use strict";var r=n(31985),o=n(29137);(0,r.Z)(o.u2,o.Xd)},54765:function(e,t,n){"use strict";n.d(t,{J7:function(){return p},NP:function(){return l}});var r=n(4981),o=n(9818),a=n(92694),i=n(29137),s=n(18135),c=n(71449);const l=["core/paragraph","core/heading","core/list"],u=window?.Jetpack_Editor_Initial_State.available_blocks?.["ai-assistant-support"];function p(){if(!(0,r.getBlockType)(i.pG))return!1;if(!u)return!1;if(!(0,c.b)())return!1;if(s.fb.errorCode)return!1;const{getHiddenBlockTypes:e}=(0,o.select)("core/edit-post")||{};return!(e?.()||[]).includes(i.pG)}(0,a.addFilter)("blocks.registerBlockType","jetpack/ai-assistant-support",(function(e,t){return l.includes(t)&&p()?{...e,supports:{...e.supports,"jetpack/ai":{assistant:!0}}}:e}),100)},49259:function(e,t,n){"use strict";n.d(t,{$M:function(){return m}});var r=n(51806),o=n(13419),a=n(52175),i=n(94333),s=n(9818),c=n(69307),l=(n(99196),n(83059)),u=n(15064),p=n(854),d=n(6747);function m(e){return`ai-assistant-block-${e}`}const h=(0,i.createHigherOrderComponent)((e=>t=>{const{name:n}=t,{removeBlocks:i,replaceBlock:h}=(0,s.useDispatch)("core/block-editor"),{content:f,clientIds:g,blocks:b}=(0,u.Z)(),{tracks:v}=(0,o.z$)(),k=[];"core/list-item"===n&&k.push(l.B3);const y=(0,c.useCallback)(((e,t)=>{const[r]=b,[o,...a]=g,s={...r?.attributes||{},content:f},c=(0,d.b)(n,s),l={clientId:o,type:e,options:{...t,contentType:"generated",fromExtension:!0}};localStorage.setItem(m(c.clientId),JSON.stringify(l)),h(o,c),i(a)}),[b,g,f,n,h,i]),w=(0,c.useCallback)(((e,t)=>{v.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_button_click",{suggestion:e,block_type:n}),y(e,t)}),[v,y,n]),E=(0,c.useCallback)((()=>{const[e,...t]=g,[r]=b,o={...r?.attributes||{},content:f};h(e,(0,d.b)(n,o)),i(t)}),[b,n,f,h,g,i]),_=(0,p.t$)(f);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(e,t),(0,r.createElement)(a.BlockControls,{group:"block"},(0,r.createElement)(l.ZP,{disabled:!_?.length,onChange:w,onReplace:E,exclude:k})))}),"withAIAssistant");t.ZP=h},79191:function(e,t,n){"use strict";n.d(t,{Z:function(){return _}});var r=n(51806),o=n(36222),a=n(4981),i=n(55609),s=n(94333),c=n(9818),l=n(69307),u=n(65736),p=n(53961),d=n(65235),m=n.n(d),h=(n(99196),n(3180)),f=n(5246),g=n(18135),b=n(71449),v=n(63634),k=n(79817),y=n(44110);const __=u.__,w={huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480};function E(e){if(!e?.length)return"";const t=(0,c.select)("core/block-editor").getBlock(e);if(!t)return"";const{innerBlocks:n}=t;return n?.length?n.reduce(((e,t)=>e+(0,a.serialize)(t)+"\n\n"),""):""}function _(e){let{clientId:t,className:n=""}=e;const a=(0,l.useRef)(null),u=(0,l.useRef)(null),d=(0,b.b)(),{inputValue:_,setInputValue:C,isVisible:S,assistantAnchor:j}=(0,l.useContext)(k.D),x=()=>{setTimeout((()=>{u.current?.focus?.()}),100)},{requestSuggestion:L,requestingState:P,stopSuggestion:A,requestingError:T}=(0,o.X_)({onDone:x}),{requireUpgrade:N}=(0,g.ZP)(),M=T?.code===o.$L||N,I="requesting"===P||"suggesting"===P,R="suggesting"===P||"done"===P,Z=__("Ask Jetpack AI to create your form","jetpack"),D=__("Creating your form. Please wait a few moments.","jetpack"),{removeNotice:B}=(0,c.useDispatch)(p.store),F=(0,l.useCallback)((()=>{if(!_?.length)return;B(y.uu);const e=(0,v.r1)(v.Re,{request:_,content:E(t)});L(e,{feature:"jetpack-form-ai-extension"}),a?.current?.focus()}),[t,_,B,L]),O=(0,l.useCallback)((()=>{A(),x()}),[A]),U=(0,s.useViewportMatch)("medium","<"),z=U&&j,H=(0,l.useRef)(null),$=(0,l.useRef)(U),[q,V]=(0,l.useState)(U);if((0,l.useEffect)((()=>{const e=a?.current;if(e)return H?.current||(H.current=new ResizeObserver((e=>{if(!S)return;if(z)return;const t=e[0].contentRect.width<w.mobile;t!==$.current&&($.current=t,V(t))}))),H.current.observe(e),()=>{H?.current?.disconnect()}}),[z,S]),(0,l.useEffect)((()=>{const e=setTimeout((()=>{S&&u?.current&&u.current.focus()}),300);return function(){clearTimeout(e)}}),[]),!S)return null;const G=(0,r.createElement)(i.KeyboardShortcuts,{bindGlobal:!0,shortcuts:{esc:()=>{["requesting","suggesting"].includes(P)&&O()}}},(0,r.createElement)("div",{ref:a,className:m()("jetpack-ai-assistant__bar",{[n]:n,"is-fixed":z,"is-mobile-mode":q}),tabIndex:-1},M&&(0,r.createElement)(f.Z,null),!d&&(0,r.createElement)(h.Z,null),(0,r.createElement)(o.tK,{ref:u,disabled:M||!d,value:I?void 0:_,placeholder:I?D:Z,onChange:C,onSend:F,onStop:O,state:P,isTransparent:M||!d,showButtonLabels:!q,showGuideLine:R})));return z?(0,l.createPortal)(G,j):G}},81732:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(51806),o=n(36222),a=n(55609),i=n(94333),s=n(69307),c=n(65736),l=n(99196),u=n(79817),p=n(44110);const __=c.__,d="jetpack-ai-assistant-bar__slot";function m(e){let{jetpackFormClientId:t}=e;const{isVisible:n,toggle:c,setAnchor:m,assistantAnchor:h}=(0,s.useContext)(u.D),{requestingState:f}=(0,o.X_)(),g=(0,s.useRef)(null),b=(0,i.useViewportMatch)("medium","<");(0,l.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 m(t);t=document.createElement("div"),t.setAttribute("role","toolbar"),t.setAttribute("aria-label",__("AI Assistant","jetpack")),t.setAttribute("aria-orientation","horizontal"),t.className=d,e.after(t);const n=e.offsetHeight;t.style.top=`${n}px`,m(t)}),[m]),(0,l.useEffect)((()=>{b||h?.remove()}),[b,h]);const v=(0,s.useCallback)((()=>{if(!t)return c();(0,p.Vl)(t,c)}),[t,c]),k="requesting"===f||"suggesting"===f;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.KeyboardShortcuts,{bindGlobal:!0,shortcuts:{"mod+/":c}}),(0,r.createElement)(a.ToolbarButton,{ref:g,showTooltip:!0,onClick:v,"aria-haspopup":"true","aria-expanded":n,label:__("Ask AI Assistant","jetpack"),icon:o.u_,disabled:k}))}},59090:function(e,t,n){"use strict";n.d(t,{aE:function(){return r},nB:function(){return o}});const r=window?.Jetpack_Editor_Initial_State.available_blocks?.["ai-assistant-form-support"]?.available,o=["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:function(e,t,n){"use strict";n.d(t,{V:function(){return f}});var r=n(51806),o=n(36222),a=n(52175),i=n(4981),s=n(94333),c=n(9818),l=n(69307),u=n(92694),p=n(79191),d=n(81732),m=n(59090),h=n(44110);function f(e){let{checkChildrenBlocks:t=!1,clientId:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{clientId:""};if(!(0,i.getBlockType)("jetpack/ai-assistant"))return!1;if(!m.aE)return!1;if(!n?.length)return!1;const{getBlockParentsByBlockName:r}=(0,c.select)("core/block-editor");if(r(n,"core/query")?.length>0)return!1;if(t){if(!m.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 g=(0,s.createHigherOrderComponent)((e=>t=>{if(!f(t?.name,{clientId:t.clientId}))return(0,r.createElement)(e,t);const{eventSource:n}=(0,o.X_)(),i=(0,l.useCallback)((()=>{n&&n?.close()}),[n]);(0,l.useEffect)((()=>()=>{i()}),[i]);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(e,t),(0,r.createElement)(p.Z,{clientId:t.clientId}),(0,r.createElement)(a.BlockControls,{group:"block"},(0,r.createElement)(d.Z,null)))}),"withAiAssistantComponents");(0,u.addFilter)("editor.BlockEdit","jetpack/jetpack-form-block-edit",g,100);const b=(0,s.createHigherOrderComponent)((e=>t=>{const n=(0,c.useSelect)((e=>{const{getBlockParentsByBlockName:n}=e("core/block-editor");return n(t.clientId,"jetpack/contact-form")?.[0]}),[t.clientId]);if(!f(t?.name,{checkChildrenBlocks:!0,clientId:n}))return(0,r.createElement)(e,t);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(e,t),(0,r.createElement)(a.BlockControls,{group:"parent"},(0,r.createElement)(d.Z,{jetpackFormClientId:n})))}),"withAiToolbarButton");(0,u.addFilter)("editor.BlockEdit","jetpack/jetpack-form-block-edit",b),(0,u.addFilter)("editor.BlockListBlock","jetpack/ai-assistant-support",h.ZP,100),(0,u.addFilter)("editor.BlockListBlock","jetpack/ai-assistant-block-list",o.oN,110)},79817:function(e,t,n){"use strict";n.d(t,{D:function(){return a},v:function(){return i}});var r=n(51806),o=n(69307);const a=(0,o.createContext)({}),i=e=>{let{value:t,children:n}=e;return(0,r.createElement)(a.Provider,{value:t,children:n})}},44110:function(e,t,n){"use strict";n.d(t,{Vl:function(){return b},uu:function(){return g}});var r=n(51806),o=n(36222),a=n(4981),i=n(55609),s=n(94333),c=n(9818),l=n(69307),u=n(65736),p=n(53961),d=(n(99196),n(94662)),m=n(5863),h=n(56359),f=n(79817);const __=u.__,g="ai-assistant";function b(e,t){(0,c.dispatch)("core/block-editor").selectBlock(e).then(t)}const v=(0,s.createHigherOrderComponent)((e=>t=>{const{clientId:n,isSelected:s}=t,{replaceInnerBlocks:u}=(0,c.useDispatch)("core/block-editor"),v=(0,c.useSelect)((e=>e("core/editor")),[]),k=(0,c.useSelect)((e=>e("core/block-editor")),[]),y=v.getCurrentPostId(),w=k.getBlock(n),[E,_]=(0,l.useState)(""),C="jetpack/contact-form"===w?.name&&0===w?.innerBlocks?.length,[S,j]=(0,l.useState)(C),[x,L]=(0,l.useState)(!1),[P,A]=(0,l.useState)(null),T=(0,l.useRef)([]),N=(0,l.useCallback)((()=>{j(!0)}),[]),M=(0,l.useCallback)((()=>{j(!1)}),[]),I=(0,l.useCallback)((()=>{j(!S)}),[S]),R=(0,l.useCallback)((e=>{A(e)}),[]),{createNotice:Z}=(0,c.useDispatch)(p.store),D=(0,l.useCallback)((e=>{let{severity:t,message:n,code:r}=e;r!==o.$L&&Z(t,n,{isDismissible:!0,id:g})}),[Z]);(0,l.useEffect)((()=>{s||M()}),[s,M]);const B=(0,l.useMemo)((()=>({inputValue:E,setInputValue:_,isVisible:S,show:N,hide:M,toggle:I,isFixed:x,setAssistantFixed:L,assistantAnchor:P,setAnchor:R})),[E,S,N,M,I,x,P,R]),F=(0,l.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=e.replace(/<!-- (\/)*wp:jetpack\/(contact-)*form ({[^}]*} )*(\/)*-->/g,""),o=(0,h.J)(r),i=(0,a.parse)(o).filter((e=>e.isValid&&!["core/freeform","core/missing","core/html"].includes(e.name)));let s=!1;if(i.length<T.current.length)i.push(T.current[T.current.length-1]);else if(i.length===T.current.length&&i.length>0){const e=i[i.length-1],t=T.current[i.length-1];s=!(0,m.c)(e,t)}if(i.length>0&&(i.length!==T.current.length||s)&&(u(n,i),T.current=i),t){const e=i.filter((e=>"jetpack/button"===e.name));if(T.current=T.current||[],e.length>1){let t=0;T.current=T.current.filter((n=>"jetpack/button"!==n.name||(t++,t===e.length))),u(n,T.current)}else 0===e.length&&u(n,[...T.current,(0,a.createBlock)("jetpack/button",{label:__("Submit","jetpack"),element:"button",text:__("Submit","jetpack"),borderRadius:8,lock:{remove:!0}})]);T.current=[]}}),[n,u]);return(0,o.X_)({askQuestionOptions:{postId:y},onDone:e=>{F(e,!0),_("")},onSuggestion:F,onError:D}),(0,d.V)(t.name,{clientId:t.clientId})?(0,r.createElement)(f.v,{value:B},(0,r.createElement)(i.KeyboardShortcuts,{shortcuts:{"mod+/":()=>b(n,N)}},(0,r.createElement)(e,t))):(0,r.createElement)(e,t)}),"withUiHandlerDataProvider");t.ZP=v},63206:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(6895),o=n(13419),a=n(46867);function i(){const e=(0,r.Z)("jetpack-ai-monthly-plan-ai-assistant-block-banner",{site:(0,o.lQ)()}),t=(0,o.Ug)()||(0,o.Wp)()?e:`${window?.Jetpack_Editor_Initial_State?.adminUrl}admin.php?page=my-jetpack#/add-jetpack-ai`,{autosaveAndRedirect:n,isRedirecting:i}=(0,a.Z)(t);return{checkoutUrl:t,autosaveAndRedirect:n,isRedirecting:i}}},18135:function(e,t,n){"use strict";n.d(t,{ZP:function(){return l},fb:function(){return s}});var r=n(86989),o=n.n(r),a=n(69307);const i=window?.Jetpack_Editor_Initial_State?.["ai-assistant"],s={hasFeature:!!i?.["has-feature"],isOverLimit:!!i?.["is-over-limit"],requestsCount:i?.["requests-count"]||0,requestsLimit:i?.["requests-limit"]||20,requireUpgrade:!!i?.["site-require-upgrade"],errorMessage:i?.["error-message"]||"",errorCode:i?.["error-code"],upgradeType:i?.["upgrade-type"]||"default"};async function c(){const e=await o()({path:"/wpcom/v2/jetpack-ai/ai-assistant-feature"});try{return{hasFeature:!!e["has-feature"],isOverLimit:!!e["is-over-limit"],requestsCount:e["requests-count"],requestsLimit:e["requests-limit"],requireUpgrade:!!e["site-require-upgrade"],errorMessage:e["error-message"],errorCode:e["error-code"],upgradeType:e["upgrade-type"]}}catch(e){console.error(e)}}function l(){const[e,t]=(0,a.useState)(s);return(0,a.useEffect)((()=>{c().then(t)}),[]),{...e,refresh:()=>c().then(t)}}},63010:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(9818);function o(){const e=(0,r.useSelect)((e=>e("core/block-editor").getSelectedBlockClientIds()),[]),t=(0,r.useSelect)((t=>t("core/block-editor").getBlocksByClientId(e)),[e]),n={count:0,clientIds:[],blocks:[]};return e?.length&&t?.length?{count:t.length,clientIds:e,blocks:t}:n}},60751:function(e,t,n){"use strict";var r=n(36222),o=n(4981),a=n(9818),i=n(69307),s=n(65736),c=n(51128),l=n.n(c),u=n(27298),p=n(63634),d=n(854);const __=s.__,m=l()("jetpack-ai-assistant:event"),h=l()("jetpack-ai-assistant:prompt");t.Z=e=>{let{attributes:t,clientId:n,content:s,setError:c,tracks:l,userPrompt:f,onSuggestionDone:g,onUnclearPrompt:b,onModeration:v,refreshFeatureData:k,requireUpgrade:y}=e;const[w,E]=(0,i.useState)(!1),[_,C]=(0,i.useState)(!1),[S,j]=(0,i.useState)(!1),[x,L]=(0,i.useState)(!1),[P,A]=(0,i.useState)(""),{updateBlockAttributes:T}=(0,a.useDispatch)("core/block-editor"),[N,M]=(0,i.useState)("init"),I=(0,i.useRef)(),R=(0,a.useSelect)((e=>e("core/editor").getEditedPostAttribute("title")));let Z=!1;const D=(0,a.useSelect)((e=>e("core/editor").getEditedPostAttribute("categories")))||[],B=(0,a.useSelect)((e=>D.map((t=>{const n=e("core").getEntityRecord("taxonomy","category",t);if(n)return n;Z=!0})).filter(Boolean)),[D]),F=(0,a.useSelect)((e=>e("core/editor").getEditedPostAttribute("tags")),[])||[],O=(0,a.useSelect)((e=>F.map((t=>{const n=e("core").getEntityRecord("taxonomy","post_tag",t);if(n)return n;Z=!0})).filter(Boolean)),[F]);(0,i.useEffect)((()=>(E(Z),()=>{I?.current&&(m("Cleaning things up..."),I?.current?.close())})),[Z,I]);const U=(0,a.useSelect)((e=>e("core/editor").getCurrentPostId())),z=(B.filter((e=>1!==e.id)).map((e=>{let{name:t}=e;return t})).join(", "),O.map((e=>{let{name:t}=e;return t})).join(", "),async function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const g=i?.functions?.reduce(((e,t)=>{let{name:n,implementation:r}=t;return{...e,[n]:r}}),{});if(y)return M("error"),C(!1),j(!1),L(!1),void c({code:"error_quota_exceeded",message:__("You have reached the limit of requests for this site.","jetpack"),status:"info"});if(i={retryRequest:!1,tone:u.Nj,...i},_)return;L(!1),c({});let w=P;l.recordEvent("jetpack_ai_chat_completion",{post_id:U});const E=[...t.messages]??[];let S={};if(i.retryRequest)S=w[w.length-1];else{const r=t?.isLayoutBuldingModeEnable?(0,d.WN)(n):(0,d.xN)();w=(0,p.Iq)({generatedContent:s,allPostContent:r,postContentAbove:(0,d.h7)(n),currentPostTitle:R,options:i,userPrompt:f,type:e,isGeneratingTitle:"generateTitle"===t.promptType,useGutenbergSyntax:!!t?.useGutenbergSyntax,customSystemPrompt:t?.customSystemPrompt}),S=w.pop(),w=[...w,...E],w.push(S),A(w),"generateTitle"!==t.promptType&&T(n,{promptType:e})}try{C(!0),j(!0),w.forEach(((e,t)=>{let{role:n,content:r}=e;return h("(%s/%s) %o\n%s",t+1,w.length,`[${n}]`,r)})),M("requesting"),I.current=await(0,r.jt)(w,{postId:U,requireUpgrade:y,feature:t?.useGpt4?"ai-assistant-experimental":"ai-assistant",functions:i?.functions}),M("suggesting")}catch(e){e.message?c({message:e.message,code:e?.code||"unknown",status:"error"}):c({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"}),L(!0),C(!1),j(!1)}const x=async e=>{const{detail:n}=e,o={role:"assistant",content:null,function_call:n},a=await(g[n.name]?.(JSON.parse(n.arguments))),s={role:"function",name:n?.name,content:JSON.stringify(a)};w=[...w,o,s],I?.current?.removeEventListener("function_done",x),I?.current?.removeEventListener("done",N),I?.current?.removeEventListener("error_unclear_prompt",Z),I?.current?.removeEventListener("error_network",B),I?.current?.removeEventListener("error_context_too_large",D),I?.current?.removeEventListener("error_service_unavailable",F),I?.current?.removeEventListener("error_quota_exceeded",O),I?.current?.removeEventListener("error_moderation",z),I?.current?.removeEventListener("suggestion",$),I.current=await(0,r.jt)(w,{postId:U,requireUpgrade:y,feature:t?.useGpt4?"ai-assistant-experimental":null,functions:i.functions}),I?.current?.addEventListener("function_done",x),I?.current?.addEventListener("done",N),I?.current?.addEventListener("error_unclear_prompt",Z),I?.current?.addEventListener("error_network",B),I?.current?.addEventListener("error_context_too_large",D),I?.current?.addEventListener("error_service_unavailable",F),I?.current?.addEventListener("error_quota_exceeded",O),I?.current?.addEventListener("error_moderation",z),I?.current?.addEventListener("suggestion",$)},N=e=>{const{detail:r}=e;M("done");const i=r.replaceAll(p._W,""),s={role:"assistant",content:i};E.push(S,s),h("Add %o\n%s",`[${S.role}]`,S.content),h("Add %o\n%s",`[${s.role}]`,s.content),E.length>20&&E.splice(0,E.length-20),H();const c=t?.useGutenbergSyntax;if(T(n,{content:i,messages:E}),!c)return;const{replaceInnerBlocks:l}=(0,a.dispatch)("core/block-editor"),u=(0,o.parse)(r).filter((e=>e.isValid));l(n,u),k()},Z=()=>{M("error"),I?.current?.close(),C(!1),j(!1),c({code:"error_unclear_prompt",message:__("Your request was unclear. Mind trying again?","jetpack"),status:"info"}),b?.()},D=()=>{M("error"),I?.current?.close(),C(!1),j(!1),L(!1),c({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"})},B=r=>{let{detail:o}=r;M("error");const{name:a,message:l}=o;"TypeError"===a&&"Failed to fetch"===l&&(E.splice(0,8),T(n,{messages:E}),w=(0,p.Iq)({generatedContent:s,allPostContent:(0,d.xN)(),postContentAbove:(0,d.h7)(n),currentPostTitle:R,options:i,userPrompt:f,type:e,isGeneratingTitle:"generateTitle"===t.promptType,useGutenbergSyntax:!!t?.useGutenbergSyntax,customSystemPrompt:t?.customSystemPrompt}),A([...w,...E,S])),I?.current?.close(),C(!1),j(!1),L(!0),c({code:"error_network",message:__("It was not possible to process your request. Mind trying again?","jetpack"),status:"info"})},F=()=>{M("error"),I?.current?.close(),C(!1),j(!1),L(!0),c({code:"error_service_unavailable",message:__("Jetpack AI services are currently unavailable. Sorry for the inconvenience.","jetpack"),status:"info"})},O=()=>{M("error"),I?.current?.close(),C(!1),j(!1),L(!1),c({code:"error_quota_exceeded",message:__("You have reached the limit of requests for this site.","jetpack"),status:"info"})},z=()=>{M("error"),I?.current?.close(),C(!1),j(!1),L(!1),c({code:"error_moderation",message:__("This request has been flagged by our moderation system. Please try to rephrase it and try again.","jetpack"),status:"info"}),v?.()},$=e=>{j(!1),m("(suggestion)",e?.detail),T(n,{content:e?.detail?.replaceAll(p._W,"")})};return I?.current?.addEventListener("function_done",x),I?.current?.addEventListener("done",N),I?.current?.addEventListener("error_unclear_prompt",Z),I?.current?.addEventListener("error_network",B),I?.current?.addEventListener("error_context_too_large",D),I?.current?.addEventListener("error_service_unavailable",F),I?.current?.addEventListener("error_quota_exceeded",O),I?.current?.addEventListener("error_moderation",z),I?.current?.addEventListener("suggestion",$),I?.current});function H(){I?.current&&(I?.current?.close(),C(!1),j(!1),g?.(),M("done"))}return{isLoadingCategories:w,isLoadingCompletion:_,wasCompletionJustRequested:S,setIsLoadingCategories:E,setShowRetry:L,showRetry:x,postTitle:R,contentBefore:(0,d.h7)(n),wholeContent:(0,d.xN)(),requestingState:N,getSuggestionFromOpenAI:z,stopSuggestion:H,retryRequest:()=>z("",{retryRequest:!0})}}},15064:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(854),o=n(63010);function a(){const e=(0,o.Z)();return{...e,content:e.blocks?e.blocks.filter((e=>null!=e)).map((e=>(0,r.op)(e.clientId))).join("\n\n"):""}}},29137:function(e,t,n){"use strict";n.d(t,{Xd:function(){return f},pG:function(){return h},u2:function(){return m}});var r=n(51806),o=n(36222),a=n(6895),i=n(55609),s=n(69307),c=n(65736),l=n(70355),u=n(84005),p=n(45624),d=n(6747);n(81765),n(54765),n(94662);const __=c.__,_x=c._x,m="ai-assistant",h=`jetpack/${m}`,f={apiVersion:2,title:__("AI Assistant (Experimental)","jetpack"),description:(0,r.createElement)(s.Fragment,null,(0,r.createElement)("p",null,__("Elevate your content creation with our AI-powered Gutenberg Block, offering seamless customization and generation.","jetpack")),(0,r.createElement)("p",null,__("Bear in mind that, as an evolving tool, occasional imprecision may occur. Your feedback is valuable in our commitment to refine and improve this feature.","jetpack")),(0,r.createElement)("p",null,(0,r.createElement)(i.ExternalLink,{href:"https://automattic.com/ai-guidelines"},__("AI guidelines.","jetpack"))),(0,r.createElement)(i.ExternalLink,{href:(0,a.Z)("jetpack_ai_feedback")},__("Share your feedback.","jetpack"))),icon:{src:o.u_,foreground:(0,l.m)()},category:"text",keywords:[_x("AI","block search term","jetpack"),_x("GPT","block search term","jetpack"),_x("AL","block search term","jetpack"),_x("Magic","block search term","jetpack"),_x("help","block search term","jetpack"),_x("assistant","block search term","jetpack")],supports:{html:!1,multiple:!0,reusable:!1},edit:p.Z,save:()=>null,attributes:u.Z,transforms:d.Z,example:{attributes:{content:__("With **Jetpack AI Assistant**, you can provide a prompt, and it will generate high-quality blog posts, informative pages, well-organized lists, and thorough tables that meet your specific requirements.\n\nTo start using the **Jetpack AI Assistant**, type `/AI` in the block editor.","jetpack")}}}},71449:function(e,t,n){"use strict";n.d(t,{b:function(){return u},d:function(){return p}});var r=n(13419),o=n(51128),a=n.n(o);const i=window?.JP_CONNECTION_INITIAL_STATE,s=a()("jetpack-ai-assistant:connection");let c=!1;const l=e=>{c||(s(e),c=!0)};function u(){return(0,r.Wp)()?(l("Simple site connected ✅"),!0):(0,r.Ug)()?(l("Atomic site connected ✅"),!0):i?.connectionStatus?.isUserConnected?(l("Jetpack user is connected ✅"),!0):(l("User is not connected ❌"),!1)}function p(){if((0,r.Wp)())return!0;return!1==!(i?.userConnectionData?.currentUser?.permissions??{}).manage_options}},3687:function(e,t,n){"use strict";n.d(t,{b:function(){return i}});var r=n(86989),o=n.n(r),a=n(65736);const __=a.__;function i(e,t,n,r,a,i){n(!0),a(null),t({requestedPrompt:e}),o()({path:"/wpcom/v2/jetpack-ai/images/generations",method:"POST",data:{prompt:e,post_id:i}}).then((e=>{n(!1);const t=e.data.map((e=>"data:image/png;base64,"+e.b64_json));r(t)})).catch((e=>{e.message?a(e.message):a(__("Whoops, we have encountered an error. AI is like really, really hard and this is an experimental feature. Please try again later.","jetpack")),n(!1)}))}},57832:function(e,t,n){"use strict";n.d(t,{v_:function(){return s},x1:function(){return c}});var r=n(63634);const o="title",a="content",i=null;function s(e,t){return{role:"jetpack-ai",context:{type:"ai-assistant-initial-prompt",for:u(e),...t?.length?{custom_system_prompt:t}:{}}}}function c(e){let{generatedContent:t,allPostContent:n,postContentAbove:o,currentPostTitle:a,options:i,type:s,userPrompt:c,isGeneratingTitle:u}=e;const p=[],d="generated"===i?.contentType;let m=null;switch(s){case r.qA:m=a;break;case r.sz:case r.hI:case r.Hd:m=o;break;case r.jf:m=n;break;case r.TV:case r.DR:m=t;break;case r.Lg:case r.Lq:case r.Nw:m=d?t:n;break;case r.Gh:m=t||n}const h=function(e,t){return!e&&t?.length>0?{role:"jetpack-ai",context:{type:"ai-assistant-relevant-content",content:t}}:null}(s===r.Gh?!!t?.length:d,m);return h&&p.push(h),p.push({role:"jetpack-ai",context:l({generatedContent:t,allPostContent:n,postContentAbove:o,currentPostTitle:a,options:i,type:s,userPrompt:c,isGeneratingTitle:u})}),p}function l(e){let{options:t,type:n,userPrompt:s,isGeneratingTitle:c}=e;const l=function(e,t,n){return e?o:!t||n?a:i}(c,"generated"===t?.contentType,t?.fromExtension||!1);return{type:u(n),...l?{subject:l}:{},...n===r.Lg&&t?.tone?{tone:t.tone}:{},...n===r.Nw&&t?.language?{language:t.language}:{},...n===r.Gh&&s?{request:s}:{}}}function u(e){return{[r.qA]:"ai-assistant-summary-by-title",[r.sz]:"ai-assistant-continue-writing",[r.hI]:"ai-assistant-simplify",[r.Hd]:"ai-assistant-correct-spelling",[r.jf]:"ai-assistant-generate-title",[r.TV]:"ai-assistant-make-longer",[r.DR]:"ai-assistant-make-shorter",[r.Lg]:"ai-assistant-change-tone",[r.Lq]:"ai-assistant-summarize",[r.Nw]:"ai-assistant-change-language",[r.Gh]:"ai-assistant-user-prompt"}[e]}},63634:function(e,t,n){"use strict";n.d(t,{DR:function(){return d},Gh:function(){return g},Hd:function(){return l},Iq:function(){return N},Lg:function(){return m},Lq:function(){return h},Nw:function(){return f},Re:function(){return b},SV:function(){return k},TV:function(){return p},_W:function(){return w},hI:function(){return c},jf:function(){return u},qA:function(){return i},r1:function(){return M},sz:function(){return s},t4:function(){return E}});var r=n(51128),o=n.n(r),a=n(57832);const i="titleSummary",s="continue",c="simplify",l="correctSpelling",u="generateTitle",p="makeLonger",d="makeShorter",m="changeTone",h="summarize",f="changeLanguage",g="userPrompt",b="jetpackFormCustomPrompt",v=parseInt(window?.Jetpack_Editor_Initial_State?.wpcomBlogId),k=window?.Jetpack_Editor_Initial_State?.available_blocks?.["ai-assistant-backend-prompts"]?.available||v%10==7,y=o()("jetpack-ai-assistant:prompt"),w="````";function E(e){let{context:t="You are an advanced polyglot ghostwriter. Your task is to generate and modify content based on user requests. This functionality is integrated into the Jetpack product developed by Automattic. Users interact with you through a Gutenberg block, you are inside the WordPress editor",rules:n,useGutenbergSyntax:r=!1,useMarkdown:o=!0,customSystemPrompt:a=null}=e,i="";n?.length&&(i=n.map((e=>`- ${e}.`)).join("\n")+"\n");let s=`${t}. Strictly follow these rules:\n\n${i}${o?"- 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&&(s=`${t}. Strictly follow these rules:\n\t\n${i}- 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&&(s=a),{role:"system",content:s}}function _(e){return`${w}${e.replaceAll(w,"")}${w}`}function C(e){let{content:t,role:n="user"}=e;return[{role:n,content:`Repeat the text delimited with ${w}, 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: ${_(t)}`}]}function S(e){let{content:t,role:n="user"}=e;return[{role:n,content:`Simplify the text delimited with ${w}, using words and phrases that are easier to understand and keeping the language of the text: ${_(t)}`}]}function j(e){let{content:t,role:n="user"}=e;return[{role:n,content:`Summarize the text delimited with ${w}, keeping the language of the text: ${_(t)}`}]}function x(e){let{content:t,role:n="user"}=e;return[{role:n,content:`Expand the text delimited with ${w} to about double its size, keeping the language of the text: ${_(t)}`}]}function L(e){let{content:t,language:n,role:r="user"}=e;return[{role:r,content:`Translate the text delimited with ${w} to ${n}, preserving the same core meaning and tone: ${_(t)}`}]}function P(e){let{content:t,tone:n,role:r="user"}=e;return[{role:r,content:`Rewrite the text delimited with ${w}, with a ${n} tone, keeping the language of the text: ${_(t)}`}]}function A(e){let{content:t,request:n}=e;if(!n)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:t,request:n}}]}const T=e=>{let{rules:t=[],request:n=null,relevantContent:r=null,isContentGenerated:o=!1,isGeneratingTitle:a=!1,useGutenbergSyntax:i=!1,customSystemPrompt:s=null}=e;if(!n&&!r)throw new Error("You must provide either a request or content");const c=[E({rules:t,useGutenbergSyntax:i,customSystemPrompt:s})];if(null!=r&&r?.length){const e=r.replaceAll(w,"");o||c.push({role:"user",content:`The specific relevant content for this request, if necessary, delimited with ${w} characters: ${w}${e}${w}`})}const l={role:"user",content:n};return a&&(l.content+=" Only output a title, do not generate body content."),c.push(l),c.forEach((e=>{y(`Role: ${e?.role}.\nMessage: ${e?.content}\n---`)})),c};function N(e){let{generatedContent:t,allPostContent:n,postContentAbove:r,currentPostTitle:o,options:b,type:v,userPrompt:y,isGeneratingTitle:w,useGutenbergSyntax:E,customSystemPrompt:_}=e;if(k){return[(0,a.v_)(v,_),...(0,a.x1)({generatedContent:t,allPostContent:n,postContentAbove:r,currentPostTitle:o,options:b,type:v,userPrompt:y,isGeneratingTitle:w})]}const C="generated"===b?.contentType,S=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0;const r="generated"===n?.contentType;let o="the title";t||(o=r?"your last answer":"the content");const a=`. Do not switch to any language other than the language of ${o} in your response`;switch(e){case i:return{request:`Write a short piece for a blog post based on ${o}, keeping the same language`};case s:return{request:`Continue writing from ${o}${a}.`,rules:r?[]:["Only output the continuation of the content, without repeating it"]};case c:return{request:`Simplify ${o}${a}.`,rules:["Use words and phrases that are easier to understand for non-technical people","Use as much of the original language as possible"]};case l:return{request:`Repeat ${o}, correcting any spelling and grammar mistakes, and do not add new content${a}.`};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 ${o} longer${a}.`};case d:return{request:`Make ${o} shorter${a}.`};case m:return{request:`Rewrite ${o} with ${/^[aeiou]/i.test(n.tone)?"an":"a"} ${n.tone} tone${a}.`};case h:return{request:`Summarize ${o}${a}.`};case f:return{request:`Translate ${o} to the following language: ${n.language}.`};default:return null}}(v,w,b);if(v!==g){let e;switch(v){case i:e=o;break;case s:case c:case l:e=r;break;case u:e=n;break;case p:case d:e=t;break;case m:case h:case f:e=C?t:n}return T({...S,relevantContent:e,isContentGenerated:C,isGeneratingTitle:w,useGutenbergSyntax:E,customSystemPrompt:_})}return T({request:y,relevantContent:t||n,isContentGenerated:!!t?.length,isGeneratingTitle:w,useGutenbergSyntax:E,customSystemPrompt:_})}function M(e,t){y("Addressing prompt type: %o %o",e,t);const{prevMessages:n=[]}=t,r={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"},o=[...n];switch(o.push(r),e){case l:return[...o,...C(t)];case c:return[...o,...S(t)];case h:return[...o,...j(t)];case p:return[...o,...x(t)];case f:return[...o,...L(t)];case m:return[...o,...P(t)];case b:return[...n,...A(t)];default:throw new Error(`Unknown prompt type: ${e}`)}}},854:function(e,t,n){"use strict";n.d(t,{WN:function(){return c},h7:function(){return i},op:function(){return l},t$:function(){return u},xN:function(){return s}});var r=n(4981),o=n(9818);const a=new(n(92213).Z);function i(e){if(!e)return"";const t=(0,o.select)("core/block-editor"),n=t.getBlockIndex(e),i=t.getBlocks().slice(0,n)??[];return i?.length?a.turndown((0,r.serialize)(i)):""}function s(){const e=(0,o.select)("core/block-editor").getBlocks();return e?.length?a.turndown((0,r.serialize)(e)):""}function c(e){const t=(0,o.select)("core/block-editor").getBlock(e);return t?.innerBlocks?.length?t.innerBlocks.filter((e=>null!=e)).map((e=>l(e.clientId))).join("\n\n"):""}function l(e){if(!e)return"";const t=(0,o.select)("core/block-editor").getBlock(e);return t?(0,r.getBlockContent)(t):""}function u(e){if(!e?.replace(/\s+/,"").length)return"";const t=document.createElement("div");t.innerHTML=e;const{textContent:n,innerText:r}=t;return n&&!n.replace(/\s+/,"").length||r&&!r.replace(/\s+/,"").length?"":t.textContent||t.innerText||""}},5863:function(e,t,n){"use strict";n.d(t,{c:function(){return a}});const r=e=>{delete e.clientId;for(const t of e.innerBlocks??[])r(t);return e},o=e=>r((e=>JSON.parse(JSON.stringify(e)))(e));function a(e,t){const n=o(e),r=o(t);return JSON.stringify(n)===JSON.stringify(r)}},56359:function(e,t,n){"use strict";function r(e){const t=document.createElement("div");return t.innerHTML=e,t.innerHTML}n.d(t,{J:function(){return r}})},81765:function(e,t,n){"use strict";var r=n(4981),o=n(92694),a=n(54765),i=n(49259);(0,o.addFilter)("blocks.registerBlockType","jetpack/handle-jetpack-ai-supports",(function(e){const t=(0,r.getBlockSupport)(e,"jetpack/ai");return t&&t?.assistant&&(0,a.J7)()?{...e,edit:(0,i.ZP)(e.edit)}:e}),100)},6747:function(e,t,n){"use strict";n.d(t,{b:function(){return u}});var r=n(4981),o=n(92213),a=n(29137),i=n(54765),s=n(63634);const c=new o.Z({emDelimiter:"_",headingStyle:"atx"}),l=[];function u(e,t){const{content:n,...o}=t;let i=n;"core/heading"===e&&t?.level&&(i=i.replace(/<(\/?)h\d([^>]*)>/g,`<$1h${t.level}$2>`));const l=c.turndown(i),u=[];return s.SV?u.push({role:"jetpack-ai",context:{type:"ai-assistant-relevant-content",content:l}}):(u.push({role:"user",content:"Tell me some content for this block, please."}),u.push({role:"assistant",content:l})),(0,r.createBlock)(a.pG,{...o,content:l,originalContent:l,messages:u,originalMessages:u})}for(const e of i.NP)l.push({type:"block",blocks:[e],isMatch:()=>(0,i.J7)(),transform:(t,n)=>{const o=(0,r.getSaveContent)(e,t,n);return u(e,{...t,content:o})}});t.Z={from:l}},50756:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(65235),c=n.n(s),l=n(92819);const __=i.__,u="09:00",p="17:00";class d extends a.Component{renderInterval=(e,t)=>{const{day:n}=this.props,{opening:i,closing:s}=e;return(0,r.createElement)(a.Fragment,{key:t},(0,r.createElement)("div",{className:"business-hours__row"},(0,r.createElement)("div",{className:c()(n.name,"business-hours__day")},0===t&&this.renderDayToggle()),(0,r.createElement)("div",{className:c()(n.name,"business-hours__hours")},(0,r.createElement)(o.TextControl,{type:"time",label:__("Opening","jetpack"),value:i,className:"business-hours__open",placeholder:u,onChange:e=>{this.setHour(e,"opening",t)}}),(0,r.createElement)(o.TextControl,{type:"time",label:__("Closing","jetpack"),value:s,className:"business-hours__close",placeholder:p,onChange:e=>{this.setHour(e,"closing",t)}})),(0,r.createElement)("div",{className:"business-hours__remove"},n.hours.length>1&&(0,r.createElement)(o.Button,{isSmall:!0,variant:"link",icon:"trash",label:__("Remove Hours","jetpack"),onClick:()=>{this.removeInterval(t)}}))),t===n.hours.length-1&&(0,r.createElement)("div",{className:"business-hours__row business-hours-row__add"},(0,r.createElement)("div",{className:c()(n.name,"business-hours__day")}," "),(0,r.createElement)("div",{className:c()(n.name,"business-hours__hours")},(0,r.createElement)(o.Button,{variant:"link",label:__("Add Hours","jetpack"),onClick:this.addInterval},__("Add Hours","jetpack"))),(0,r.createElement)("div",{className:"business-hours__remove"}," ")))};setHour=(e,t,n)=>{const{day:r,attributes:o,setAttributes:a}=this.props,{days:i}=o;a({days:i.map((o=>o.name===r.name?{...o,hours:o.hours.map(((r,o)=>o===n?{...r,[t]:e}:r))}:o))})};toggleClosed=e=>{const{day:t,attributes:n,setAttributes:r}=this.props,{days:o}=n;r({days:o.map((n=>{if(n.name===t.name){const t=e?[{opening:u,closing:p}]:[];return{...n,hours:t}}return n}))})};addInterval=()=>{const{day:e,attributes:t,setAttributes:n}=this.props,{days:r}=t;e.hours.push({opening:"",closing:""}),n({days:r.map((t=>t.name===e.name?{...t,hours:e.hours}:t))})};removeInterval=e=>{const{day:t,attributes:n,setAttributes:r}=this.props,{days:o}=n;r({days:o.map((n=>t.name===n.name?{...n,hours:n.hours.filter(((t,n)=>e!==n))}:n))})};isClosed(){const{day:e}=this.props;return(0,l.isEmpty)(e.hours)}renderDayToggle(){const{day:e,localization:t}=this.props;return(0,r.createElement)(a.Fragment,null,(0,r.createElement)("span",{className:"business-hours__day-name"},t.days[e.name]),(0,r.createElement)(o.ToggleControl,{label:this.isClosed()?__("Closed","jetpack"):__("Open","jetpack"),checked:!this.isClosed(),onChange:this.toggleClosed}))}renderClosed(){const{day:e}=this.props;return(0,r.createElement)("div",{className:"business-hours__row business-hours-row__closed"},(0,r.createElement)("div",{className:c()(e.name,"business-hours__day")},this.renderDayToggle()),(0,r.createElement)("div",{className:c()(e.name,"closed","business-hours__hours")}," "),(0,r.createElement)("div",{className:"business-hours__remove"}," "))}render(){const{day:e}=this.props;return this.isClosed()?this.renderClosed():e.hours.map(this.renderInterval)}}t.Z=d},80190:function(e,t,n){"use strict";var r=n(51806),o=n(69771),a=n(69307),i=n(65736),s=n(92819);const _x=i._x;class c extends a.Component{formatTime(e){const{timeFormat:t}=this.props,[n,r]=e.split(":"),a=new Date;return!(!n||!r)&&(a.setHours(n),a.setMinutes(r),(0,o.date)(t,a))}renderInterval=(e,t)=>{const{day:n}=this.props,o=n.hours;return(0,r.createElement)("span",{key:t},(0,i.sprintf)("%1$s - %2$s",this.formatTime(e.opening),this.formatTime(e.closing)),o.length>1+t&&(0,r.createElement)("span",null,", "))};render(){const{day:e,localization:t}=this.props,n=e.hours.filter((e=>this.formatTime(e.opening)&&this.formatTime(e.closing)));return(0,r.createElement)("div",{className:"jetpack-business-hours__item"},(0,r.createElement)("dt",{className:e.name},t.days[e.name]),(0,r.createElement)("dd",null,(0,s.isEmpty)(n)?_x("Closed","business is closed on a full day","jetpack"):n.map(this.renderInterval),(0,r.createElement)("br",null)))}}t.Z=c},86162:function(e,t,n){"use strict";var r=n(82674),o=n.n(r),a=n(51806),i=n(13419),s=n(86989),c=n.n(s),l=n(55609),u=n(69771),p=n(69307),d=n(65736),m=n(65235),h=n.n(m),f=n(22023),g=n(50756),b=n(80190);const __=d.__,v=(0,i.dM)(f),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},(()=>{c()({path:"/wpcom/v2/business-hours/localized-week"}).then((e=>{this.setState({localization:e,hasFetched:!0})}),(()=>{this.setState({localization:k,hasFetched:!0})}))}))}render(){const{attributes:e,className:t,isSelected:n}=this.props,{days:r}=e,{localization:i,hasFetched:s}=this.state,{startOfWeek:c}=i,p=r.concat(r.slice(0,c)).slice(c);if(!s)return(0,a.createElement)(l.Placeholder,{icon:v,label:__("Loading business hours","jetpack")});if(!n){const e=(0,u.getSettings)(),{formats:{time:n}}=e;return(0,a.createElement)("dl",{className:h()(t,"jetpack-business-hours")},p.map(((e,t)=>(0,a.createElement)(b.Z,{key:t,day:e,localization:i,timeFormat:n}))))}return(0,a.createElement)("div",{className:h()(t,"is-edit")},p.map(((e,t)=>(0,a.createElement)(g.Z,o()({key:t,day:e,localization:i},this.props)))))}}t.Z=y},60866:function(e,t,n){"use strict";var r=n(51806),o=n(31985),a=n(22023),i=n(86162);(0,o.S)(a,{edit:e=>(0,r.createElement)(i.Z,e),save:()=>null})},98625:function(e,t,n){"use strict";var r=n(55609),o=n(92819);const a=(0,r.withFallbackStyles)(((e,t)=>{const{backgroundColor:n,textColor:r}=t,a=(0,o.get)(n,"color"),i=!(0,o.get)(r,"color")&&e?e.querySelector('[contenteditable="true"]'):null;return{fallbackBackgroundColor:a||!e?void 0:getComputedStyle(e).backgroundColor,fallbackTextColor:r||!i?void 0:getComputedStyle(i).color}}));t.Z=a},70424:function(e,t,n){"use strict";var r=n(24381);t.Z={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:r.Z},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:r.Z},gradient:{type:"string"},customGradient:{type:"string"},borderRadius:{type:"number"},width:{type:"string"}}},43043:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(90446);const __=i.__;function c(e){let{borderRadius:t="",setAttributes:n}=e;const i=(0,a.useCallback)((e=>n({borderRadius:e})),[n]);return(0,r.createElement)(o.PanelBody,{title:__("Border Settings","jetpack")},(0,r.createElement)(o.RangeControl,{allowReset:!0,initialPosition:s.pg,label:__("Border radius","jetpack"),max:s.Gp,min:s.G0,onChange:i,value:t}))}},36953:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(51806),o=n(52175),a=n(65736);const __=a.__;function i(e){let{isGradientAvailable:t,backgroundColor:n,fallbackBackgroundColor:a,fallbackTextColor:i,gradientValue:s,setBackgroundColor:c,setGradient:l,setTextColor:u,textColor:p}=e;const d=(0,r.createElement)(o.ContrastChecker,{backgroundColor:n.color,fallbackBackgroundColor:a,fallbackTextColor:i,isLargeText:!1,textColor:p.color});return t?(0,r.createElement)(o.__experimentalPanelColorGradientSettings,{settings:[{colorValue:p.color,label:__("Text Color","jetpack"),onColorChange:u},{colorValue:n.color,gradientValue:s,label:__("Background","jetpack"),onColorChange:c,onGradientChange:l}],title:__("Background & Text Color","jetpack")},d):(0,r.createElement)(o.PanelColorSettings,{colorSettings:[{value:p.color,onChange:u,label:__("Text Color","jetpack")},{value:n.color,onChange:c,label:__("Background","jetpack")}],title:__("Background & Text Color","jetpack")},d)}},90446:function(e,t,n){"use strict";n.d(t,{DA:function(){return o},G0:function(){return s},Gp:function(){return i},pg:function(){return a}});var r=n(52175);const o=!!r.__experimentalUseGradient,a=5,i=50,s=0},29343:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(51806),o=n(9818),a=n(30429),i=n(43043),s=n(36953);function c(e){let{attributes:t,backgroundColor:n,clientId:c,context:l,fallbackBackgroundColor:u,fallbackTextColor:p,setAttributes:d,setBackgroundColor:m,setTextColor:h,textColor:f,gradientValue:g,setGradient:b,isGradientAvailable:v}=e;const{align:k,borderRadius:y}=t,w="jetpack/parentBlockWidth"in l,E=w?l["jetpack/parentBlockWidth"]:t.width,_=(0,o.useSelect)((e=>{const{getBlock:t,getBlockRootClientId:n}=e("core/block-editor");return t(n(c))})),{updateBlockAttributes:C}=(0,o.useDispatch)("core/block-editor");return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.Z,{backgroundColor:n,fallbackBackgroundColor:u,fallbackTextColor:p,gradientValue:g,setBackgroundColor:m,setGradient:b,setTextColor:h,textColor:f,isGradientAvailable:v}),(0,r.createElement)(i.Z,{borderRadius:y,setAttributes:d}),(0,r.createElement)(a.G,{align:k,width:E,onChange:e=>{w?C(_.clientId,{width:e}):d({width:e})}}))}},5501:function(e,t,n){"use strict";var r=n(82674),o=n.n(r),a=n(51806),i=n(52175),s=n(94333),c=n(65736),l=n(65235),u=n.n(l),p=n(81673),d=n(98625),m=n(90446),h=n(29343),f=n(16969);const __=c.__;t.Z=(0,s.compose)((0,i.withColors)({backgroundColor:"background-color"},{textColor:"color"}),d.Z)((function(e){const{attributes:t,backgroundColor:n,className:r,clientId:s,context:c,setAttributes:l,textColor:d}=e,{borderRadius:g,element:b,placeholder:v,text:k,width:y,fontSize:w}=t,E="jetpack/parentBlockWidth"in c;(0,f.Z)({attributes:t,clientId:s,setAttributes:l}),(0,p.Z)({attributes:t,disableEffects:E,setAttributes:l});const{gradientClass:_,gradientValue:C,setGradient:S}=m.DA?(0,i.__experimentalUseGradient)({gradientAttribute:"gradient",customGradientAttribute:"customGradient"}):{},j=u()("wp-block-button",r),x=u()("wp-block-button__link",{"has-background":n.color||C,[n.class]:!C&&n.class,"has-text-color":d.color,[d.class]:d.class,[_]:_,"no-border-radius":0===g,"has-custom-width":!!y,[`has-${w}-font-size`]:!!w,"has-custom-font-size":!!w}),L={...!n.color&&C?{background:C}:{backgroundColor:n.color},fontSize:t.style?.typography?.fontSize,color:d.color,borderRadius:g?g+"px":void 0,width:y};return(0,a.createElement)("div",{className:j},(0,a.createElement)(i.RichText,{allowedFormats:"input"===b?[]:void 0,className:x,disableLineBreaks:"input"===b,onChange:e=>l({text:e}),placeholder:v||__("Add text…","jetpack"),style:L,value:k,withoutInteractiveFormatting:!0}),(0,a.createElement)(i.InspectorControls,null,(0,a.createElement)(h.Z,o()({gradientValue:C,setGradient:S,isGradientAvailable:m.DA},e))))}))},48887:function(e,t,n){"use strict";var r=n(31985),o=n(77123);(0,r.Z)(o.u,o.X)},26361:function(e,t,n){"use strict";var r=n(51806),o=n(55609);t.Z=(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.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:function(e,t,n){"use strict";n.d(t,{X:function(){return u},u:function(){return l}});var r=n(65736),o=n(5820),a=n(70424),i=n(5501),s=n(26361),c=n(29586);const __=r.__,l="button",u={title:__("Button","jetpack"),icon:s.Z,category:(0,o.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:a.Z,edit:i.Z,save:c.Z,usesContext:["jetpack/parentBlockWidth"]}},29586:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(51806),o=n(52175),a=n(65235),i=n.n(a),s=n(90446);function c(e){let{attributes:t,blockName:n,uniqueId:a}=e;const{backgroundColor:c,borderRadius:l,className:u,customBackgroundColor:p,customGradient:d,customTextColor:m,gradient:h,saveInPostContent:f,text:g,textColor:b,url:v,width:k,fontSize:y}=t;if(!f)return null;const w=(0,o.getColorClassName)("background-color",c),E=s.DA?(0,o.__experimentalGetGradientClass)(h):void 0,_=(0,o.getColorClassName)("color",b),C=i()("wp-block-button","jetpack-submit-button",u,{[`wp-block-jetpack-${n}`]:n}),S=i()("wp-block-button__link",{"has-text-color":b||m,[_]:_,"has-background":c||h||p||d,[w]:w,[E]:E,"no-border-radius":0===l,"has-custom-width":!!k,[`has-${y}-font-size`]:!!y,"has-custom-font-size":!!y}),j={background:d||void 0,backgroundColor:w||d||h?void 0:p,fontSize:t.style?.typography?.fontSize,color:_?void 0:m,borderRadius:l?l+"px":void 0,width:k};return(0,r.createElement)("div",{className:C},(0,r.createElement)(o.RichText.Content,{className:S,"data-id-attr":a||"placeholder",href:v,id:a,rel:"noopener noreferrer",role:"button",style:j,tagName:"a",target:"_blank",value:g}))}},16969:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(9818),o=n(69307),a=n(92819);function i(e){let{attributes:t,clientId:n,setAttributes:i}=e;const{passthroughAttributes:s}=t,{attributesToSync:c}=(0,r.useSelect)((e=>{const{getBlockAttributes:r,getBlockRootClientId:o}=e("core/block-editor"),i=r(o(n))||{},c=(0,a.mapValues)(s,(e=>i[e]));return{attributesToSync:(0,a.pickBy)(c,((e,n)=>e!==t[n]))}}));(0,o.useEffect)((()=>{(0,a.isEmpty)(c)||i(c)}),[c,i])}},81340:function(e,t,n){"use strict";var r=n(24381);t.Z={backgroundColor:{type:"string",default:"ffffff",validator:r.Z},hideEventTypeDetails:{type:"boolean",default:!1},primaryColor:{type:"string",default:"00A2FF",validator:r.Z},textColor:{type:"string",default:"4D5055",validator:r.Z},style:{type:"string",default:"inline",validValues:["inline","link"]},url:{type:"string",validator:e=>!e||e.startsWith("https://calendly.com/")}}},60153:function(e,t,n){"use strict";var r=n(51806),o=n(13419),a=n(52175),i=n(55609),s=n(65736),c=n(57538);const __=s.__,_x=s._x,l=e=>{let{onEditClick:t}=e;return(0,r.createElement)(i.ToolbarGroup,null,(0,r.createElement)(i.ToolbarButton,{onClick:()=>t(!0)},__("Edit","jetpack")))},u=e=>{const{attributes:{hideEventTypeDetails:t,url:n},defaultClassName:a,embedCode:s,parseEmbedCode:c,setAttributes:l,setEmbedCode:u}=e;let p=null;return n&&(p=(0,o.Ug)()||(0,o.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,r.createElement)(r.Fragment,null,(0,r.createElement)(i.PanelBody,{PanelBody:!0,title:__("Calendar settings","jetpack"),initialOpen:!1},(0,r.createElement)("form",{onSubmit:c,className:`${a}-embed-form-sidebar`},(0,r.createElement)("input",{type:"text",id:"embedCode",onChange:e=>u(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:s||"",className:"components-placeholder__input"}),(0,r.createElement)("div",null,(0,r.createElement)(i.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))),(0,r.createElement)(i.ToggleControl,{label:__("Hide event type details","jetpack"),checked:t,onChange:()=>l({hideEventTypeDetails:!t})})),p&&(0,r.createElement)(i.Notice,{className:`${a}-color-notice`,isDismissible:!1},(0,r.createElement)(i.ExternalLink,{href:p},__("Explore more customization options.","jetpack"))))};t.ZP=e=>{const{attributes:t,clientId:n,isEditingUrl:o,setAttributes:i,setIsEditingUrl:s}=e,{style:p,url:d}=t,m=[{value:"inline",label:__("Inline","jetpack")},{value:"link",label:__("Link","jetpack")}];return(0,r.createElement)(r.Fragment,null,d&&!o&&(0,r.createElement)(a.BlockControls,null,(0,r.createElement)(l,{onEditClick:s})),d&&(0,r.createElement)(c.Z,{clientId:n,styleOptions:m,onSelectStyle:i,activeStyle:p,attributes:t,viewportWidth:500}),(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(u,e)))}},83830:function(e,t,n){"use strict";var r=n(51806),o=n(4981),a=n(65736),i=n(24381);const __=a.__;t.Z={attributes:{backgroundColor:{type:"string",default:"ffffff",validator:i.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:i.Z},textColor:{type:"string",default:"4D5055",validator:i.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:i.Z},customTextButtonColor:{type:"string",validator:i.Z}},migrate:e=>{const{submitButtonText:t,submitButtonTextColor:n,submitButtonBackgroundColor:r,submitButtonClasses:a,backgroundButtonColor:i,textButtonColor:s,customBackgroundButtonColor:c,customTextButtonColor:l,...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,o.createBlock)("jetpack/button",{element:"a",uniqueId:"calendly-widget-id",...p})]]},save:e=>{let{attributes:{url:t}}=e;return(0,r.createElement)("a",{href:t},t)}}},29415:function(e,t,n){"use strict";var r=n(82674),o=n.n(r),a=n(51806),i=n(52175),s=n(4981),c=n(55609),l=n(9818),u=n(69307),p=n(65736),d=n(92819),m=n(4554),h=n(23621),f=n(81340),g=n(60153),b=n(70176),v=n(4867),k=n(50785);const __=p.__,_x=p._x;t.Z=(0,c.withNotices)((function(e){const{attributes:t,className:n,clientId:r,name:p,noticeOperations:y,noticeUI:w,setAttributes:E}=e,_=(0,s.getBlockDefaultClassName)(p),C=(0,m.S)(f.Z,t);(0,d.isEqual)(C,t)||E(C);const{backgroundColor:S,hideEventTypeDetails:j,primaryColor:x,textColor:L,style:P,url:A}=C,[T,N]=(0,u.useState)(A),[M,I]=(0,u.useState)(!1),[R,Z]=(0,u.useState)(!1),[D,B]=(0,u.useState)({}),F=()=>{y.removeAllNotices(),y.createErrorNotice(__("Your calendar couldn't be embedded. Please double check your URL or code.","jetpack"))};(0,u.useEffect)((()=>{A&&k.lR!==A&&"link"!==P&&(0,h.Z)(A,Z).catch((()=>{E({url:void 0}),F()}))}),[]);const O=e=>{if(!e)return void F();e.preventDefault();const t=(0,v.CC)(T);if(t){if(t.buttonAttributes&&"link"===t.style){const e=(0,l.select)("core/editor").getBlocksByClientId(r);e.length&&e[0].innerBlocks.forEach((e=>{(0,l.dispatch)("core/editor").updateBlockAttributes(e.clientId,t.buttonAttributes)})),B(t.buttonAttributes)}(0,h.Z)(t.url,Z).then((()=>{const e=(0,m.S)(f.Z,t);E(e),I(!1),y.removeAllNotices()})).catch((()=>{E({url:void 0}),F()}))}else F()},U=(0,a.createElement)("div",{className:"wp-block-embed is-loading"},(0,a.createElement)(c.Spinner,null),(0,a.createElement)("p",null,__("Embedding…","jetpack"))),z=(0,a.createElement)(c.Placeholder,{label:__("Calendly","jetpack"),instructions:__("Enter your Calendly web address or embed code below.","jetpack"),icon:b.Z,notices:w},(0,a.createElement)("form",{onSubmit:O},(0,a.createElement)("input",{type:"text",id:"embedCode",onChange:e=>N(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:T||"",className:"components-placeholder__input"}),(0,a.createElement)("div",null,(0,a.createElement)(c.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))),(0,a.createElement)("div",{className:`${_}-learn-more`},(0,a.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,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:`${_}-overlay`}),(0,a.createElement)("iframe",{src:(()=>{const e=new URLSearchParams({embed_domain:"wordpress.com",embed_type:"Inline",hide_event_type_details:j?1:0,background_color:S,primary_color:x,text_color:L});return`${A}?${e}`})(),width:"100%",height:"100%",frameBorder:"0","data-origwidth":"100%","data-origheight":"100%",title:"Calendly"})),$=(0,a.createElement)(i.InnerBlocks,{template:[[k.Ss.name,{...k.Ss.attributes,...D,passthroughAttributes:{url:"url"}}]],templateLock:"all"});if(R)return U;let q=n;return A&&!M&&(q+=` calendly-style-${P}`),(0,a.createElement)("div",{className:q},(0,a.createElement)(g.ZP,o()({},e,{defaultClassName:_,embedCode:T,isEditingUrl:M,parseEmbedCode:O,setEmbedCode:N,setIsEditingUrl:I})),A&&!M?"inline"===P?H:$:z)}))},52020:function(e,t,n){"use strict";var r=n(31985),o=n(50785);(0,r.Z)(o.u2,o.Xd)},70176:function(e,t,n){"use strict";var r=n(51806),o=n(55609);t.Z=(0,r.createElement)(o.SVG,{height:"24",viewBox:"0 0 23 24",width:"23",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.Path,{d:"M19,1h-2.3v0c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v0H8.6v0c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v0H4C1.8,1,0,2.8,0,5 v15c0,2.2,1.8,4,4,4h15c2.2,0,4-1.8,4-4V5C23,2.8,21.2,1,19,1z M21,20c0,1.1-0.9,2-2,2H4c-1.1,0-2-0.9-2-2V5c0-1.1,0.9-2,2-2h2.6 v0.8c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1V3h6.1v0.8c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1V3H19c1.1,0,2,0.9,2,2V20z M13.9,14.8l1.4,1.4 c-0.9,0.9-2.1,1.3-3.5,1.3c-2.4,0-4.5-2.1-4.5-4.7s2.1-4.7,4.5-4.7c1.4,0,2.5,0.4,3.4,1.1L14,10.9c-0.5-0.4-1.2-0.6-2.1-0.6 c-1.2,0-2.5,1.1-2.5,2.7c0,1.6,1.3,2.7,2.5,2.7C12.7,15.5,13.4,15.3,13.9,14.8z"}))},50785:function(e,t,n){"use strict";n.d(t,{Ss:function(){return m},Xd:function(){return f},lR:function(){return d},u2:function(){return h}});var r=n(4981),o=n(65736),a=n(70355),i=n(81340),s=n(83830),c=n(29415),l=n(70176),u=n(15816),p=n(4867);const __=o.__,_x=o._x,d="https://calendly.com/wpcom/jetpack-block-example",m={name:"jetpack/button",attributes:{element:"a",text:__("Schedule time with me","jetpack"),uniqueId:"calendly-widget-id",url:d}},h="calendly",f={title:__("Calendly","jetpack"),description:__("Embed a calendar for customers to schedule appointments.","jetpack"),icon:{src:l.Z,foreground:(0,a.m)()},category:"grow",keywords:[_x("calendar","block search term","jetpack"),_x("schedule","block search term","jetpack"),_x("appointments","block search term","jetpack"),_x("events","block search term","jetpack"),_x("dates","block search term","jetpack")],supports:{align:!0,alignWide:!1,html:!1},edit:c.Z,save:u.Z,attributes:i.Z,example:{attributes:{hideEventTypeDetails:!1,style:"inline",url:d},innerBlocks:[m]},transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&p.mL.test(e.textContent),transform:e=>{const t=(0,p.CC)(e.textContent);return(0,r.createBlock)("jetpack/calendly",t)}}]},deprecated:[s.Z]}},15816:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(51806),o=n(52175);function a(){return(0,r.createElement)("div",null,(0,r.createElement)(o.InnerBlocks.Content,null))}},4867:function(e,t,n){"use strict";n.d(t,{CC:function(){return o},mL:function(){return r}});const r=/(^|\/\/)(calendly\.com[^"']*)/i,o=e=>{if(!e)return;const t=(e=>{const t=e.match(r);if(t)return"https://"+t[2]})(e);if(!t)return;const n=(e=>{const t={},n=new URL(e);if(t.url=n.origin+n.pathname,!n.search)return t;const r=new URLSearchParams(n.search),o=r.get("background_color"),a=r.get("primary_color"),i=r.get("text_color"),s=/^[A-Za-z0-9]{6}$/;return r.get("hide_event_type_details")&&(t.hideEventTypeDetails=r.get("hide_event_type_details")),o&&o.match(s)&&(t.backgroundColor=o),a&&a.match(s)&&(t.primaryColor=a),i&&i.match(s)&&(t.textColor=i),t})(t),o=(e=>e.indexOf("data-url")>0?"inline":e.indexOf("initPopupWidget")>0||e.indexOf("initBadgeWidget")>0?"link":void 0)(e);if(o&&(n.style=o),"link"===o){n.buttonAttributes={};const t=(e=>{let t=e.match(/false;">([^<]+)<\//);return t?t[1]:(t=e.match(/text: '([^']*?)'/),t?t[1]:void 0)})(e);t&&(n.buttonAttributes.text=t);const r=(e=>{const t=e.match(/textColor: '([^']*?)'/);if(t)return t[1]})(e);r&&(n.buttonAttributes.textColor=void 0,n.buttonAttributes.customTextColor=r);const o=(e=>{const t=e.match(/color: '([^']*?)'/);if(t)return t[1]})(e);o&&(n.buttonAttributes.backgroundColor=void 0,n.buttonAttributes.customBackgroundColor=o)}return n}},36553:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(55609),i=n(69307),s=n(65736),c=n(65235),l=n.n(c),u=n(35208);const __=s.__;class p extends i.Component{constructor(){super(...arguments),this.preventEnterKey=this.preventEnterKey.bind(this)}preventEnterKey(e){"Enter"!==e.key||e.preventDefault()}render(){const{attributes:{address:e,addressLine2:t,addressLine3:n,city:s,region:c,postal:p,country:d,linkToGoogleMaps:m},isSelected:h,setAttributes:f}=this.props,g=[e,t,n,s,c,p,d].some((e=>""!==e)),b=l()({"jetpack-address-block":!0,"is-selected":h}),v=(0,r.createElement)(a.ToggleControl,{label:__("Link address to Google Maps","jetpack"),checked:m,onChange:e=>f({linkToGoogleMaps:e})});return(0,r.createElement)("div",{className:b},!h&&g&&(0,u.Z)(this.props),(h||!g)&&(0,r.createElement)(i.Fragment,null,(0,r.createElement)(o.PlainText,{value:e,placeholder:__("Street Address","jetpack"),"aria-label":__("Street Address","jetpack"),onChange:e=>f({address:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(o.PlainText,{value:t,placeholder:__("Address Line 2","jetpack"),"aria-label":__("Address Line 2","jetpack"),onChange:e=>f({addressLine2:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(o.PlainText,{value:n,placeholder:__("Address Line 3","jetpack"),"aria-label":__("Address Line 3","jetpack"),onChange:e=>f({addressLine3:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(o.PlainText,{value:s,placeholder:__("City","jetpack"),"aria-label":__("City","jetpack"),onChange:e=>f({city:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(o.PlainText,{value:c,placeholder:__("State/Province/Region","jetpack"),"aria-label":__("State/Province/Region","jetpack"),onChange:e=>f({region:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(o.PlainText,{value:p,placeholder:__("Postal/Zip Code","jetpack"),"aria-label":__("Postal/Zip Code","jetpack"),onChange:e=>f({postal:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(o.PlainText,{value:d,placeholder:__("Country","jetpack"),"aria-label":__("Country","jetpack"),onChange:e=>f({country:e}),onKeyDown:this.preventEnterKey}),v))}}t.Z=p},11005:function(e,t,n){"use strict";n.d(t,{X:function(){return p},u:function(){return u}});var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(36598),c=n(36553),l=n(35208);const __=i.__,_x=i._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,s.Z)((0,r.createElement)(a.Fragment,null,(0,r.createElement)(o.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,r.createElement)(o.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:c.Z,save:l.Z}},35208:function(e,t,n){"use strict";var r=n(51806),o=n(69307),a=n(65736);const __=a.__,i=e=>{let{attributes:{address:t,addressLine2:n,addressLine3:a,city:i,region:s,postal:c,country:l}}=e;return(0,r.createElement)(o.Fragment,null,t&&(0,r.createElement)("div",{className:"jetpack-address__address jetpack-address__address1"},t),n&&(0,r.createElement)("div",{className:"jetpack-address__address jetpack-address__address2"},n),a&&(0,r.createElement)("div",{className:"jetpack-address__address jetpack-address__address3"},a),i&&!(s||c)&&(0,r.createElement)("div",{className:"jetpack-address__city"},i),i&&(s||c)&&(0,r.createElement)("div",null,(0,r.createElement)("span",{className:"jetpack-address__city"},i),", ",(0,r.createElement)("span",{className:"jetpack-address__region"},s)," ",(0,r.createElement)("span",{className:"jetpack-address__postal"},c)),!i&&(s||c)&&(0,r.createElement)("div",null,(0,r.createElement)("span",{className:"jetpack-address__region"},s)," ",(0,r.createElement)("span",{className:"jetpack-address__postal"},c)),l&&(0,r.createElement)("div",{className:"jetpack-address__country"},l))},s=e=>{let{attributes:{address:t,addressLine2:n,addressLine3:r,city:o,region:a,postal:i,country:s}}=e;let c=a?`+${a},`:"";c=i?`${c}+${i}`:c;return`https://www.google.com/maps/search/${t?`${t},`:""}${n?`${n},`:""}${r?`${r},`:""}${o?`+${o},`:""}${c}${s?`+${s}`:""}`.replace(" ","+")};t.Z=e=>(e=>{let{address:t,addressLine2:n,addressLine3:r,city:o,region:a,postal:i,country:s}=e;return[t,n,r,o,a,i,s].some((e=>""!==e))})(e.attributes)&&(0,r.createElement)("div",{className:e.className},e.attributes.linkToGoogleMaps&&(0,r.createElement)("a",{href:s(e),target:"_blank",rel:"noopener noreferrer",title:__("Open address in Google Maps","jetpack")},(0,r.createElement)(i,e)),!e.attributes.linkToGoogleMaps&&(0,r.createElement)(i,e))},83238:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(65235),i=n.n(a);const s=["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"],c=[["jetpack/email"],["jetpack/phone"],["jetpack/address"]];t.Z=e=>{const{isSelected:t}=e;return(0,r.createElement)("div",{className:i()({"jetpack-contact-info-block":!0,"is-selected":t})},(0,r.createElement)(o.InnerBlocks,{allowedBlocks:s,templateLock:!1,template:c}))}},82566:function(e,t,n){"use strict";var r=n(31985),o=n(64446);(0,r.Z)(o.u2,o.Xd,o.Nk)},31336:function(e,t,n){"use strict";var r=n(65736),o=n(66425),a=n(90458);const __=r.__;t.Z=e=>{const{setAttributes:t}=e;return(0,o.Z)("email",e,__("Email","jetpack"),a.Z,(e=>t({email:e})))}},99804:function(e,t,n){"use strict";n.d(t,{X:function(){return u},u:function(){return l}});var r=n(51806),o=n(55609),a=n(65736),i=n(36598),s=n(31336),c=n(90458);const __=a.__,_x=a._x,l="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,i.Z)((0,r.createElement)(o.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:s.Z,save:c.Z,parent:["jetpack/contact-info"]}},90458:function(e,t,n){"use strict";var r=n(51806),o=n(69307),a=n(92384);t.Z=e=>{let{attributes:{email:t},className:n}=e;return t&&(0,r.createElement)("div",{className:n},t.split(/(\s+)/).map(((e,t)=>{const n=e.replace(/([.,/#!$%^&*;:{}=\-_`~()\][])+$/g,"");return e.indexOf("@")&&a.validate(n)?e===n?(0,r.createElement)("a",{href:`mailto:${e}`,key:t},e):(0,r.createElement)(o.Fragment,{key:t},(0,r.createElement)("a",{href:`mailto:${e}`,key:t},n),(0,r.createElement)(o.Fragment,null,e.slice(-(e.length-n.length)))):(0,r.createElement)(o.Fragment,{key:t},e)})))}},64446:function(e,t,n){"use strict";n.d(t,{Nk:function(){return b},Xd:function(){return g},u2:function(){return h}});var r=n(51806),o=n(52175),a=n(4981),i=n(55609),s=n(65736),c=n(70355),l=n(36598),u=n(11005),p=n(83238),d=n(99804),m=n(52398);const __=s.__,_x=s._x,h="contact-info",f=(0,l.Z)((0,r.createElement)(i.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"})),g={title:__("Contact Info","jetpack"),description:__("Add an email address, phone number, and physical address with improved markup for better SEO results.","jetpack"),keywords:[_x("email","block search term","jetpack"),_x("phone","block search term","jetpack"),_x("address","block search term","jetpack")],icon:{src:f,foreground:(0,c.m)()},category:"grow",supports:{align:["wide","full"],html:!1,color:{link:!0,gradients:!0},spacing:{padding:!0,margin:!0},typography:{fontSize:!0,lineHeight:!0}},transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:n}=e;return!!n?.raw&&"widget_contact_info"===t},transform:e=>{let{instance:t}=e,n=[(0,a.createBlock)("core/heading",{content:t.raw.title}),(0,a.createBlock)("jetpack/email",{email:t.raw.email}),(0,a.createBlock)("jetpack/phone",{phone:t.raw.phone}),(0,a.createBlock)("jetpack/address",{address:t.raw.address})];return t.raw.hours&&(n=[...n,(0,a.createBlock)("core/paragraph",{content:t.raw.hours})]),t.raw.showmap&&t.raw.address&&(n=[...n,(0,a.createBlock)("jetpack/map",{address:t.raw.address})]),(0,a.createBlock)("jetpack/contact-info",{},n)}}]},attributes:{},edit:p.Z,save:e=>{let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(o.InnerBlocks.Content,null))},example:{attributes:{},innerBlocks:[{name:"jetpack/email",attributes:{email:"hello@yourjetpack.blog"}},{name:"jetpack/phone",attributes:{phone:"123-456-7890"}},{name:"jetpack/address",attributes:{address:"987 Photon Drive",city:"Speedyville",region:"CA",postal:"12345",country:"USA"}}]}},b=[{name:u.u,settings:u.X},{name:d.u,settings:d.X},{name:m.u,settings:m.X}]},70835:function(e,t,n){"use strict";var r=n(65736),o=n(66425),a=n(21621);const __=r.__;t.Z=e=>{const{setAttributes:t}=e;return(0,o.Z)("phone",e,__("Phone number","jetpack"),a.Z,(e=>t({phone:e})))}},52398:function(e,t,n){"use strict";n.d(t,{X:function(){return u},u:function(){return l}});var r=n(51806),o=n(55609),a=n(65736),i=n(36598),s=n(70835),c=n(21621);const __=a.__,_x=a._x,l="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,i.Z)((0,r.createElement)(o.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:s.Z,save:c.Z}},21621:function(e,t,n){"use strict";var r=n(51806);t.Z=e=>{let{attributes:{phone:t},className:n}=e;return t&&(0,r.createElement)("div",{className:n},function(e){const t=e.match(/\d+\.\d+|\d+\b|\d+(?=\w)/g);if(!t)return e;const n=e.indexOf(t[0]);let o=n?e.substring(n-1):e,a=n?e.substring(0,n):"",i=o.replace(/\D/g,"");return/[0-9/+/(]/.test(o[0])?(a=a.slice(0,-1),"+"===o[0]&&(i="+"+i)):o=o.substring(1),[a.trim()?(0,r.createElement)("span",{key:"phonePrefix",className:"phone-prefix"},a):null,(0,r.createElement)("a",{key:"phoneNumber",href:`tel:${i}`},o)]}(t))}},10764:function(e,t,n){"use strict";var r=n(51806),o=n(25607),a=n(43317),i=n(52175),s=n(69307),c=n(65235),l=n.n(c),u=n(79162);t.Z=e=>{let{className:t=null,currency:n=null,defaultValue:c=null,disabled:p=!1,label:d="",onChange:m=null,value:h=""}=e;const[f,g]=(0,s.useState)((0,o.ZP)(h,n,{symbol:""})),[b,v]=(0,s.useState)(!1),[k,y]=(0,s.useState)(!1),w=(0,s.useRef)(null),E=(0,s.useCallback)((e=>{if(g(e),!m)return;const t=(0,u.Vm)(e,n);t&&t>=(0,u.hj)(n)?(m(t),y(!1)):y(!0)}),[n,m]),_=()=>{w.current&&(w.current.focus(),v(!0))};return(0,s.useEffect)((()=>{if(!w.current)return;const e=w.current,t=()=>{v(!1),f||E((0,o.ZP)(c,n,{symbol:""}))};return e.addEventListener("blur",t),()=>{e.removeEventListener("blur",t)}}),[n,c,f,w,E]),(0,s.useEffect)((()=>{b||k||g((0,o.ZP)(h,n,{symbol:""}))}),[n,b,k,E,h]),(0,s.useEffect)((()=>{E((0,o.ZP)(h,n,{symbol:""}))}),[h]),(0,r.createElement)("div",{className:l()("donations__amount",t,{"has-focus":b,"has-error":k}),role:"button",tabIndex:0,onClick:_,onKeyDown:_},a.M[n].symbol,p?(0,r.createElement)("div",{className:"donations__amount-value"},(0,o.ZP)(h||c,n,{symbol:""})):(0,r.createElement)(i.RichText,{allowedFormats:[],"aria-label":d,multiline:!1,onChange:e=>E(e),placeholder:(0,o.ZP)(c,n,{symbol:""}),ref:w,value:f,withoutInteractiveFormatting:!0}))}},82275:function(e,t,n){"use strict";var r=n(51806),o=n(43317),a=n(13419),i=n(52175),s=n(55609),c=n(65736),l=n(39630),u=n(79162);const __=c.__;t.Z=e=>{const{attributes:t,setAttributes:n}=e,{currency:c,oneTimeDonation:p,monthlyDonation:d,annualDonation:m,showCustomAmount:h}=t,f=(e,r)=>{const o={"1 month":"monthlyDonation","1 year":"annualDonation"}[e],a=t[o];n({[o]:{...a,show:r}})};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.BlockControls,null,(0,r.createElement)(s.ToolbarGroup,null,(0,r.createElement)(s.ToolbarItem,null,(()=>(0,r.createElement)(s.Dropdown,{contentClassName:"jetpack-donations__currency-popover",renderToggle:e=>{let{onToggle:t,isOpen:n}=e;return(0,r.createElement)(s.Button,{className:"jetpack-donations__currency-toggle",icon:(0,r.createElement)(r.Fragment,null,c+" - "+o.M[c].symbol,(0,r.createElement)(s.Dashicon,{icon:"arrow-down"})),label:__("Change currency","jetpack"),onClick:t,onKeyDown:e=>{n||e.keyCode!==l.DOWN||(e.preventDefault(),e.stopPropagation(),t())}})},renderContent:e=>{let{onClose:t}=e;return(0,r.createElement)(s.MenuGroup,null,Object.keys(u.ck).map((e=>(0,r.createElement)(s.MenuItem,{isSelected:e===c,icon:e===c?"yes":"",onClick:()=>{(e=>{const t=(0,u.li)(e);n({currency:e,oneTimeDonation:{...p,amounts:t},monthlyDonation:{...d,amounts:t},annualDonation:{...m,amounts:t}})})(e),t()},key:`jetpack-donations-currency-${e}`},e+" - "+o.M[e].symbol))))}}))))),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(s.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(s.ToggleControl,{checked:d.show,onChange:e=>f("1 month",e),label:__("Show monthly donations","jetpack")}),(0,r.createElement)(s.ToggleControl,{checked:m.show,onChange:e=>f("1 year",e),label:__("Show annual donations","jetpack")}),(0,r.createElement)(s.ToggleControl,{checked:h,onChange:e=>n({showCustomAmount:e}),label:__("Show custom amount option","jetpack")}),(0,r.createElement)(s.ExternalLink,{href:`https://wordpress.com/earn/payments/${(0,a.lQ)()}`},__("View donation earnings","jetpack")))))}},853:function(e,t,n){"use strict";var r=n(51806),o=n(25607),a=n(43317),i=n(52175),s=n(65736),c=n(79162);const __=s.__;t.Z={attributes:{currency:{type:"string",default:"USD"},oneTimeDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a one-time donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate","jetpack")}},monthlyDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a monthly donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate monthly","jetpack")}},annualDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a yearly donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate yearly","jetpack")}},showCustomAmount:{type:"boolean",default:!0},chooseAmountText:{type:"string",default:__("Choose an amount","jetpack")},customAmountText:{type:"string",default:__("Or enter a custom amount","jetpack")}},supports:{html:!1},save:e=>{let{attributes:t}=e;const{currency:n,oneTimeDonation:s,monthlyDonation:l,annualDonation:u,showCustomAmount:p,chooseAmountText:d,customAmountText:m}=t;if(!s||!s.show||-1===s.planId)return null;const h={"one-time":{title:__("One-Time","jetpack")},...l.show&&{"1 month":{title:__("Monthly","jetpack")}},...u.show&&{"1 year":{title:__("Yearly","jetpack")}}};return(0,r.createElement)("div",null,(0,r.createElement)("div",{className:"donations__container"},Object.keys(h).length>1&&(0,r.createElement)("div",{className:"donations__nav"},Object.entries(h).map((e=>{let[t,{title:n}]=e;return(0,r.createElement)("div",{role:"button",tabIndex:0,className:"donations__nav-item",key:`jetpack-donations-nav-item-${t} `,"data-interval":t},n)}))),(0,r.createElement)("div",{className:"donations__content"},(0,r.createElement)("div",{className:"donations__tab"},(0,r.createElement)(i.RichText.Content,{tagName:"h4",className:"donations__one-time-item",value:s.heading}),l.show&&(0,r.createElement)(i.RichText.Content,{tagName:"h4",className:"donations__monthly-item",value:l.heading}),u.show&&(0,r.createElement)(i.RichText.Content,{tagName:"h4",className:"donations__annual-item",value:u.heading}),(0,r.createElement)(i.RichText.Content,{tagName:"p",value:d}),(0,r.createElement)("div",{className:"donations__amounts donations__one-time-item"},s.amounts.map((e=>(0,r.createElement)("div",{className:"donations__amount","data-amount":e},(0,o.ZP)(e,n))))),l.show&&(0,r.createElement)("div",{className:"donations__amounts donations__monthly-item"},l.amounts.map((e=>(0,r.createElement)("div",{className:"donations__amount","data-amount":e},(0,o.ZP)(e,n))))),u.show&&(0,r.createElement)("div",{className:"donations__amounts donations__annual-item"},u.amounts.map((e=>(0,r.createElement)("div",{className:"donations__amount","data-amount":e},(0,o.ZP)(e,n))))),p&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.RichText.Content,{tagName:"p",value:m}),(0,r.createElement)("div",{className:"donations__amount donations__custom-amount"},a.M[n].symbol,(0,r.createElement)("div",{className:"donations__amount-value","data-currency":n,"data-empty-text":(0,o.ZP)(100*(0,c.hj)(n),n,{symbol:""})}))),(0,r.createElement)("div",{className:"donations__separator"},"——"),(0,r.createElement)(i.RichText.Content,{tagName:"p",className:"donations__one-time-item",value:s.extraText}),l.show&&(0,r.createElement)(i.RichText.Content,{tagName:"p",className:"donations__monthly-item",value:l.extraText}),u.show&&(0,r.createElement)(i.RichText.Content,{tagName:"p",className:"donations__annual-item",value:u.extraText}),(0,r.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__one-time-item"},(0,r.createElement)(i.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__one-time-item",value:s.buttonText})),l.show&&(0,r.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__monthly-item"},(0,r.createElement)(i.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__monthly-item",value:l.buttonText})),u.show&&(0,r.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__annual-item"},(0,r.createElement)(i.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__annual-item",value:u.buttonText}))))))}}},86245:function(e,t,n){"use strict";var r=n(82674),o=n.n(r),a=n(51806),i=n(45033),s=n(9818),c=n(69307),l=n(65736),u=n(79162),p=n(74251),d=n(23267),m=n(21789),h=n(85731),f=n(24177),g=n(72833);const __=l.__;t.Z=e=>{const{attributes:t,className:n,setAttributes:r}=e,{currency:l}=t,[b,v]=(0,c.useState)(""),[k,y]=(0,c.useState)([]),{lockPostSaving:w,unlockPostSaving:E}=(0,s.useDispatch)("core/editor"),_=(0,s.useSelect)((e=>e("core/editor").getCurrentPost()),[]),{setConnectUrl:C,setConnectedAccountDefaultCurrency:S}=(0,s.useDispatch)(d.G4);(0,c.useEffect)((()=>{r({fallbackLinkUrl:_.link})}),[_.link,r]);const j=(0,s.useSelect)((e=>e(d.G4).getConnectedAccountDefaultCurrency()));if(!l&&j){const e=j.toUpperCase(),t=!!u.ck[e];r(t?{currency:e}:{currency:"USD"})}const x=e=>{v(e)};return(0,c.useEffect)((()=>{w("donations");const e=e=>e.reduce(((e,t)=>{let{id:n,currency:r,type:o,interval:a}=t;return r===l&&"donation"===o&&(e[a]=n),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 n=e(t.products);return(e=>{const t=Object.keys(e);return t.includes("one-time")&&t.includes("1 month")&&t.includes("1 year")})(n)?(y(n),void E("donations")):t.connect_url?(y({"one-time":-1,"1 month":-1,"1 year":-1}),void E("donations")):void(l&&(0,m.Z)(l).then((t=>{y(e(t)),E("donations")}),x))}),x)}),[w,l,_.id,C,S,E]),b?(0,a.createElement)(f.Z,{className:n,error:b}):l?(0,a.createElement)(g.Z,o()({},e,{products:k})):(0,a.createElement)(i.Z,null)}},67140:function(e,t,n){"use strict";var r=n(31985),o=n(29800);(0,r.Z)(o.u2,o.Xd)},21789:function(e,t,n){"use strict";var r=n(86989),o=n.n(r);t.Z=async e=>{try{return await o()({path:"/wpcom/v2/memberships/products",method:"POST",data:{type:"donation",currency:e,is_editable:!1}})}catch(e){return Promise.reject(e.message)}}},85731:function(e,t,n){"use strict";var r=n(86989),o=n.n(r),a=n(96483);t.Z=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=new URLSearchParams(window.location.search),n=(0,a.addQueryArgs)("/wpcom/v2/memberships/status",{source:"https://wordpress.com"===t.get("origin")?"gutenberg-wpcom":"gutenberg",...e&&{type:e},is_editable:!1});try{return await o()({path:n,method:"GET"})}catch(e){return Promise.reject(e.message)}}},29800:function(e,t,n){"use strict";n.d(t,{Xd:function(){return l},u2:function(){return c}});var r=n(65736),o=n(81427),a=n(853),i=n(86245),s=n(75314);const __=r.__,_x=r._x,c="donations",l={title:__("Donations Form","jetpack"),description:__("Collect one-time, monthly, or annually recurring donations.","jetpack"),icon:o.K9,category:"earn",keywords:[_x("charity","block search term","jetpack"),_x("contribution","block search term","jetpack"),_x("credit card","block search term","jetpack"),_x("debit card","block search term","jetpack"),_x("donate","block search term","jetpack"),_x("earn","block search term","jetpack"),_x("ecommerce","block search term","jetpack"),_x("fundraising","block search term","jetpack"),_x("fundraiser","block search term","jetpack"),"gofundme",_x("money","block search term","jetpack"),_x("nonprofit","block search term","jetpack"),_x("non-profit","block search term","jetpack"),_x("paid","block search term","jetpack"),"patreon",_x("pay","block search term","jetpack"),_x("payments","block search term","jetpack"),_x("recurring","block search term","jetpack"),"stripe",_x("sponsor","block search term","jetpack"),"square",_x("tipping","block search term","jetpack"),"venmo"],supports:{html:!1},edit:i.Z,save:s.Z,example:{},deprecated:[a.Z]}},24177:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(65736);const __=a.__;t.Z=e=>{let{className:t,error:n}=e;return(0,r.createElement)(o.Placeholder,{icon:"lock",label:__("Donations","jetpack"),instructions:n,className:t})}},75314:function(e,t,n){"use strict";var r=n(51806),o=n(52175);t.Z=e=>{let{attributes:t}=e;const{fallbackLinkUrl:n,oneTimeDonation:a,monthlyDonation:i,annualDonation:s}=t;return a&&a.show&&a.planId&&-1!==a.planId?(0,r.createElement)("div",null,(0,r.createElement)(o.RichText.Content,{tagName:"h4",value:a.heading}),(0,r.createElement)(o.RichText.Content,{tagName:"p",value:a.extraText}),(0,r.createElement)(o.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:n,rel:"noopener noreferrer noamphtml",target:"_blank",value:a.buttonText}),i.show&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("hr",{className:"donations__separator"}),(0,r.createElement)(o.RichText.Content,{tagName:"h4",value:i.heading}),(0,r.createElement)(o.RichText.Content,{tagName:"p",value:i.extraText}),(0,r.createElement)(o.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:n,rel:"noopener noreferrer noamphtml",target:"_blank",value:i.buttonText})),s.show&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("hr",{className:"donations__separator"}),(0,r.createElement)(o.RichText.Content,{tagName:"h4",value:s.heading}),(0,r.createElement)(o.RichText.Content,{tagName:"p",value:s.extraText}),(0,r.createElement)(o.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:n,rel:"noopener noreferrer noamphtml",target:"_blank",value:s.buttonText}))):null}},91757:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(9818),i=n(65736),s=n(79162),c=n(10764);const __=i.__;t.Z=e=>{let{activeTab:t,attributes:n,setAttributes:l}=e;const{currency:u,oneTimeDonation:p,monthlyDonation:d,annualDonation:m,showCustomAmount:h,chooseAmountText:f,customAmountText:g}=n,b={"one-time":"oneTimeDonation","1 month":"monthlyDonation","1 year":"annualDonation"},v=e=>n[b[t]][e],k=(e,r)=>{const o=b[t],a=n[o];l({[o]:{...a,[e]:r}})},y=(0,s.li)(u),w=v("amounts"),E=(0,a.useSelect)((e=>e("core/rich-text").getFormatTypes()),[]).map((e=>e.name)).filter((e=>"core/link"!==e));return(0,r.createElement)("div",{className:"donations__tab"},(0,r.createElement)(o.RichText,{tagName:"h4",placeholder:__("Write a message…","jetpack"),value:v("heading"),onChange:e=>k("heading",e)}),(0,r.createElement)(o.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:f,onChange:e=>l({chooseAmountText:e})}),(0,r.createElement)("div",{className:"donations__amounts"},w.map(((e,t)=>(0,r.createElement)(c.Z,{currency:u,defaultValue:y[t],label:(0,i.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 n=[...w];n[t]=e,k("amounts",n)})(e,t),value:e})))),h&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:g,onChange:e=>l({customAmountText:e})}),(0,r.createElement)(c.Z,{currency:u,label:__("Custom amount","jetpack"),defaultValue:100*(0,s.hj)(u),className:"donations__custom-amount",disabled:!0})),(0,r.createElement)("hr",{className:"donations__separator"}),(0,r.createElement)(o.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:v("extraText"),onChange:e=>k("extraText",e)}),(0,r.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper"},(0,r.createElement)(o.RichText,{className:"wp-block-button__link donations__donate-button",placeholder:__("Write a message…","jetpack"),value:v("buttonText"),onChange:e=>{return t=e,void l({oneTimeDonation:{...p,buttonText:t},monthlyDonation:{...d,buttonText:t},annualDonation:{...m,buttonText:t}});var t},allowedFormats:E})))}},72833:function(e,t,n){"use strict";var r=n(51806),o=n(69307),a=n(65736),i=n(65235),s=n.n(i),c=n(16367),l=n(82275),u=n(91757);const __=a.__;t.Z=e=>{const{attributes:t,className:n,products:a,setAttributes:i}=e,{oneTimeDonation:p,monthlyDonation:d,annualDonation:m}=t,[h,f]=(0,o.useState)("one-time"),g=(0,o.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,o.useEffect)((()=>{p.planId===a["one-time"]&&d.planId===a["1 month"]&&m.planId===a["1 year"]||i({...a["one-time"]&&{oneTimeDonation:{...p,planId:a["one-time"]}},...a["1 month"]&&{monthlyDonation:{...d,planId:a["1 month"]}},...a["1 year"]&&{annualDonation:{...m,planId:a["1 year"]}}})}),[p,d,m,i,a]),(0,o.useEffect)((()=>{!d.show&&g("1 month")&&f("one-time"),!m.show&&g("1 year")&&f("one-time")}),[d,m,f,g]),(0,r.createElement)("div",{className:n},(0,r.createElement)(c.U,{blockName:"donations"}),(0,r.createElement)("div",{className:"donations__container"},Object.keys(b).length>1&&(0,r.createElement)("div",{className:"donations__nav"},Object.entries(b).map((e=>{let[t,{title:n}]=e;return(0,r.createElement)("div",{role:"button",tabIndex:0,className:s()("donations__nav-item",{"is-active":g(t)}),onClick:()=>f(t),onKeyDown:()=>f(t),key:`jetpack-donations-nav-item-${t} `},n)}))),(0,r.createElement)("div",{className:"donations__content"},(0,r.createElement)(u.Z,{activeTab:h,attributes:t,setAttributes:i}))),(0,r.createElement)(l.Z,e))}},2785:function(e,t){"use strict";t.Z={url:{type:"string",validator:e=>!e||e.startsWith("http")},eventId:{type:"number"},style:{type:"string",default:"inline"}}},6949:function(e,t,n){"use strict";n.d(t,{J:function(){return i}});var r=n(51806),o=n(55609),a=n(65736);const __=a.__,i=e=>{let{setEditingUrl:t}=e;return(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarButton,{className:"components-toolbar__control",label:__("Edit URL","jetpack"),icon:"edit",onClick:()=>t(!0)}))}},1344:function(e,t,n){"use strict";var r=n(24717);t.Z=[r.Z]},24717:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(4981),i=n(65736),s=n(65235),c=n.n(s),l=n(92819);const _x=i._x,u=["text","backgroundColor","textColor","customBackgroundColor","customTextColor","borderRadius"];t.Z={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:n}=e;let r=n;r||(r=e.useModal?"modal":"inline");const o={...(0,l.omit)(e,["useModal",...u]),className:t&&t.replace("is-style-outline",""),style:r},i=(0,l.pick)(e,u);return[o,[(0,a.createBlock)("jetpack/button",{element:"a",text:i.text||_x("Register","verb: e.g. register for an event.","jetpack"),...i,uniqueId:"eventbrite-widget-id",className:t&&-1!==t.indexOf("is-style-outline")?"is-style-outline":""})]]},save:function(e){let{attributes:t}=e;const{eventId:n,useModal:a,url:i,style:s}=t;if(n)return a||"modal"===s?function(e){const{backgroundColor:t,borderRadius:n,customBackgroundColor:a,customTextColor:i,eventId:s,text:l,textColor:u,url:p}=e,d=(0,o.getColorClassName)("color",u),m=(0,o.getColorClassName)("background-color",t),h=c()("wp-block-button__link",{"has-text-color":u||i,[d]:d,"has-background":t||a,[m]:m,"no-border-radius":0===n}),f={backgroundColor:m?void 0:a,color:d?void 0:i,borderRadius:n?n+"px":void 0};return(0,r.createElement)("div",{className:"wp-block-button"},(0,r.createElement)(o.RichText.Content,{className:h,href:p,id:`eventbrite-widget-${s}`,rel:"noopener noreferrer",role:"button",style:f,tagName:"a",target:"_blank",value:l}))}(t):i&&(0,r.createElement)("a",{className:"eventbrite__direct-link",href:i},i)},isEligible:(e,t)=>("modal"===e.style||e.useModal)&&((0,l.isEmpty)(t)||(0,l.some)((0,l.pick)(e,u),Boolean))}},16078:function(e,t,n){"use strict";var r=n(51806),o=n(13419),a=n(52175),i=n(55609),s=n(69307),c=n(65736),l=n(57538),u=n(4554),p=n(23621),d=n(2785),m=n(6949),h=n(8964),f=n(77825),g=n(75334);const __=c.__,_x=c._x;class b extends s.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:n,setAttributes:r}=this.props,{style:o}=t;if(!e||g.Q7===e||"modal"===o)return;const a=(0,f.Ve)(e);if(a){const t={eventId:a,url:e};(0,p.Z)(t.url,this.setIsResolvingUrl).then((e=>{const o=(0,u.S)(d.Z,{...t,url:e});r(o),this.setState({editedUrl:e}),n.removeAllNotices()})).catch((()=>{r({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:n}=this.state;e.removeAllNotices(),e.createErrorNotice((0,r.createElement)(r.Fragment,null,__("Sorry, this content could not be embedded.","jetpack")," ",(0,r.createElement)(i.Button,{variant:"link",onClick:()=>(0,f.N3)(n,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&&!g.Wh.test(e)};renderLoading(){return(0,r.createElement)("div",{className:"wp-block-embed is-loading"},(0,r.createElement)(i.Spinner,null),(0,r.createElement)("p",null,__("Embedding…","jetpack")))}renderInspectorControls(){const{style:e}=this.props.attributes,{attributes:t,clientId:n,setAttributes:o}=this.props,a=[{value:"inline",label:__("In-page Embed","jetpack"),preview:(0,r.createElement)("div",{className:"block-editor-block-preview__container"},(0,r.createElement)("img",{src:h,alt:__("In page Eventbrite checkout example","jetpack")}))},{value:"modal",label:__("Button & Modal","jetpack")}];return(0,r.createElement)(l.Z,{title:_x("Embed Type","option for how the embed displays on a page, e.g. inline or as a modal","jetpack"),clientId:n,styleOptions:a,onSelectStyle:o,activeStyle:e,attributes:t,viewportWidth:130})}renderEditEmbed(){const{className:e,noticeUI:t}=this.props,{editedUrl:n}=this.state,a=(0,o.Wp)()||(0,o.Ug)()?"http://support.wordpress.com/wordpress-editor/blocks/eventbrite-block/":"https://jetpack.com/support/jetpack-blocks/eventbrite-block/";return(0,r.createElement)("div",{className:e},(0,r.createElement)(i.Placeholder,{label:__("Eventbrite Checkout","jetpack"),instructions:__("Paste a link to an Eventbrite event to embed ticket checkout.","jetpack"),icon:g.qv,notices:t},(0,r.createElement)("form",{onSubmit:this.submitForm},(0,r.createElement)("input",{type:"url",value:n,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,r.createElement)(i.Button,{variant:"secondary",type:"submit"},_x("Embed","submit button label","jetpack"))),(0,r.createElement)("div",{className:"components-placeholder__learn-more"},(0,r.createElement)(i.ExternalLink,{href:a},__("Learn more about Eventbrite embeds","jetpack")))))}renderInlinePreview(){const{className:e}=this.props,{eventId:t}=this.props.attributes;if(!t)return;const n=`eventbrite-widget-${t}`,o=`\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: '${n}',\n\t\t\t\t});\n\t\t\t<\/script>\n\t\t\t<div id="${n}"></div>\n\t\t`;return(0,r.createElement)("div",{className:e},(0,r.createElement)(i.SandBox,{html:o}),(0,r.createElement)("div",{className:"block-library-embed__interactive-overlay"}))}render(){const{attributes:e}=this.props,{url:t,style:n}=e,{editingUrl:o,isResolvingUrl:i}=this.state;return i?this.renderLoading():o||!t||this.cannotEmbed()?this.renderEditEmbed():(0,r.createElement)(r.Fragment,null,this.renderInspectorControls(),(0,r.createElement)(a.BlockControls,null,(0,r.createElement)(m.J,{setEditingUrl:this.setEditingUrl})),"modal"===n?(0,r.createElement)(a.InnerBlocks,{template:[[g.Ss.name,g.Ss.attributes]],templateLock:"all"}):this.renderInlinePreview())}}t.Z=(0,i.withNotices)(b)},83772:function(e,t,n){"use strict";var r=n(31985),o=n(75334);(0,r.Z)(o.u2,o.Xd)},75334:function(e,t,n){"use strict";n.d(t,{Q7:function(){return f},Ss:function(){return d},Wh:function(){return m},Xd:function(){return k},qv:function(){return v},u2:function(){return g}});var r=n(51806),o=n(4981),a=n(55609),i=n(65736),s=n(70355),c=n(2785),l=n(1344),u=n(16078),p=n(86435);const __=i.__,_x=i._x,d={name:"jetpack/button",attributes:{element:"a",text:_x("Register","verb: e.g. register for an event.","jetpack"),uniqueId:"eventbrite-widget-id"}},m=/^\s*https?:\/\/(?:www\.)?(?:eventbrite\.[a-z.]+)\/e\/[^\/]*?(\d+)\/?(?:\?[^\/]*)?\s*$/i,h=/^\s*https?:\/\/(?:.+\.)?(?:eventbrite\.[a-z.]+)\/?(?:\?[^\/]*)?\s*$/i,f="https://www.eventbrite.com/e/test-event-tickets-123456789",g="eventbrite",b=__("Eventbrite Checkout","jetpack"),v=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,r.createElement)(a.G,{id:"eventbrite-icon"},(0,r.createElement)(a.Path,{d:"M18.041,3.931L5.959,3C4.325,3,3,4.325,3,5.959v12.083C3,19.675,4.325,21,5.959,21l12.083-0.931C19.699,19.983,21,18.744,21,17.11V6.89C21,5.256,19.741,4.027,18.041,3.931zM16.933,8.17c-0.082,0.215-0.192,0.432-0.378,0.551c-0.188,0.122-0.489,0.132-0.799,0.132c-1.521,0-3.062-0.048-4.607-0.048c-0.152,0.708-0.304,1.416-0.451,2.128c0.932-0.004,1.873,0.005,2.81,0.005c0.726,0,1.462-0.069,1.586,0.525c0.04,0.189-0.001,0.426-0.052,0.615c-0.105,0.38-0.258,0.676-0.625,0.783c-0.185,0.054-0.408,0.058-0.646,0.058c-1.145,0-2.345,0.017-3.493,0.02c-0.169,0.772-0.328,1.553-0.489,2.333c1.57-0.005,3.067-0.041,4.633-0.058c0.627-0.007,1.085,0.194,1.009,0.85c-0.031,0.262-0.098,0.497-0.211,0.725c-0.102,0.208-0.248,0.376-0.488,0.452c-0.237,0.075-0.541,0.064-0.862,0.078c-0.304,0.014-0.614,0.008-0.924,0.016c-0.309,0.009-0.619,0.022-0.919,0.022c-1.253,0-2.429,0.08-3.683,0.073c-0.603-0.004-1.014-0.249-1.124-0.757c-0.059-0.273-0.018-0.58,0.036-0.841c0.541-2.592,1.083-5.176,1.629-7.763c0.056-0.265,0.114-0.511,0.225-0.714C9.279,7.051,9.534,6.834,9.9,6.735c0.368-0.099,0.883-0.047,1.344-0.047c0.305,0,0.612,0.008,0.914,0.016c0.925,0.026,1.817,0.03,2.747,0.053c0.304,0.007,0.615,0.016,0.915,0.016c0.621,0,1.17,0.073,1.245,0.614C17.104,7.675,17.014,7.954,16.933,8.17z"}))),k={title:b,description:__("Embed Eventbrite event details and ticket checkout.","jetpack"),icon:{src:v,foreground:(0,s.m)()},category:"embed",keywords:[_x("events","block search term","jetpack"),_x("tickets","block search term","jetpack")],supports:{html:!1,align:!0},attributes:c.Z,edit:u.Z,save:p.Z,transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&(m.test(e.textContent)||h.test(e.textContent)),transform:e=>(0,o.createBlock)("jetpack/eventbrite",{url:e.textContent.trim()})}]},example:{attributes:{url:f,eventId:123456789,style:"modal"},innerBlocks:[d]},deprecated:l.Z}},86435:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(51806),o=n(52175);function a(e){let{attributes:t}=e;const{eventId:n,style:a,url:i}=t;if(n)return"modal"===a?(0,r.createElement)("div",null,(0,r.createElement)(o.InnerBlocks.Content,null)):i&&(0,r.createElement)("a",{className:"eventbrite__direct-link",href:i},i)}},77825:function(e,t,n){"use strict";n.d(t,{N3:function(){return i},Ve:function(){return s},qq:function(){return c}});var r=n(51806),o=n(4981),a=n(69307);function i(e,t){const n=(0,r.createElement)("a",{href:e},e);t((0,o.createBlock)("core/paragraph",{content:(0,a.renderToString)(n)}))}function s(e){if(!e)return null;const t=e.match(/(\d+)\/?(?:\?[^\/]*)?\s*$/);return t&&t[1]?parseInt(t[1],10):null}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e&&"string"==typeof e?e.trim():null}},12084:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736);const __=i.__;t.Z=(0,a.forwardRef)((function(e,t){let{onSubmit:n,onChange:a,value:i=""}=e;return(0,r.createElement)("form",{className:"wp-block-jetpack-gif_input-container",onSubmit:n},(0,r.createElement)("input",{type:"text",className:"wp-block-jetpack-gif_input components-placeholder__input",placeholder:__("Enter search terms, e.g. cat…","jetpack"),value:i,onChange:a,ref:t,"aria-labelledby":"wp-block-jetpack-gif_search-button"}),(0,r.createElement)(o.Button,{id:"wp-block-jetpack-gif_search-button",variant:"secondary",type:"submit"},__("Search","jetpack")))}))},72844:function(e,t,n){"use strict";n.d(t,{U:function(){return r}});const r="t1PkR1Vq0mzHueIFBvZSZErgFs9NBmYW"},57852:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(51806),o=n(52175),a=n(55609);function i(){return(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(a.PanelBody,{className:"components-panel__body-gif-branding"},(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 202 22"},(0,r.createElement)(a.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,r.createElement)(a.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:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(55609),i=n(69307),s=n(65736),c=n(65235),l=n.n(c),u=n(12084),p=n(57852),d=n(27147),m=n(80163),h=n(25073);const __=s.__;t.Z=function(e){let{attributes:t,setAttributes:n,className:s,isSelected:c}=e;const{align:f,caption:g,giphyUrl:b,searchText:v,paddingTop:k}=t,y=l()(s,`align${f}`),[w,E]=(0,i.useState)(!1),_=(0,i.createRef)(),{isFetching:C,giphyData:S,fetchGiphyData:j}=(0,d.Z)(),x=()=>{_.current.focus(),E(!1)};(0,i.useEffect)((()=>{S&&S[0]&&n((0,m.ix)(S[0]))}),[S,n]);const L=e=>{e.preventDefault(),t.searchText&&!C&&j((0,m.Gr)(t.searchText))},P=e=>n({searchText:e.target.value});return(0,r.createElement)("div",{className:y},(0,r.createElement)(p.Z,null),b?(0,r.createElement)("figure",null,c&&(0,r.createElement)(u.Z,{onSubmit:L,onChange:P,value:v,ref:_}),c&&S&&S.length>1&&(0,r.createElement)("div",{className:"wp-block-jetpack-gif_thumbnails-container"},S.map((e=>{const t={backgroundImage:`url(${e.images.downsized_still.url})`};return(0,r.createElement)("button",{className:"wp-block-jetpack-gif_thumbnail-container",key:e.id,onClick:t=>{t.preventDefault(),(e=>{n((0,m.ix)(e))})(e)},style:t})}))),(0,r.createElement)("div",{className:"wp-block-jetpack-gif-wrapper",style:{paddingTop:k}},(0,r.createElement)("div",{className:"wp-block-jetpack-gif_cover",onClick:x,onKeyDown:x,role:"button",tabIndex:"0"}),(0,r.createElement)("iframe",{src:b,title:v})),(!o.RichText.isEmpty(g)||c)&&!!b&&(0,r.createElement)(o.RichText,{className:"wp-block-jetpack-gif-caption gallery-caption",inlineToolbar:!0,isSelected:w,onFocus:()=>E(!1),onChange:e=>n({caption:e}),placeholder:__("Write caption…","jetpack"),tagName:"figcaption",value:g})):(0,r.createElement)(a.Placeholder,{className:"wp-block-jetpack-gif_placeholder",icon:h.qv,label:h.TN,instructions:__("Search for a term or paste a Giphy URL","jetpack")},(0,r.createElement)(u.Z,{onSubmit:L,onChange:P,value:v,ref:_})))}},63139:function(e,t,n){"use strict";var r=n(31985),o=n(25073);(0,r.Z)(o.u2,o.Xd)},27147:function(e,t,n){"use strict";var r=n(69307);t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const[t,n]=(0,r.useState)(!1),[o,a]=(0,r.useState)(e),[i,s]=(0,r.useState)("");return(0,r.useEffect)((()=>{if(!i)return;(async()=>{n(!0);const e=await fetch(i).then((e=>!!e.ok&&e)).catch((()=>!1));if(e){const t=await e.json(),n=void 0!==t.data.images?[t.data]:t.data;n[0].images&&a(n)}n(!1)})()}),[i]),{isFetching:t,giphyData:o,fetchGiphyData:s}}},25073:function(e,t,n){"use strict";n.d(t,{TN:function(){return l},Xd:function(){return p},qv:function(){return u},u2:function(){return c}});var r=n(51806),o=n(55609),a=n(65736),i=n(70355),s=n(61266);const __=a.__,_x=a._x,c="gif",l=__("GIF","jetpack"),u=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.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"})),p={title:l,icon:{src:u,foreground:(0,i.m)()},category:"embed",keywords:[_x("animated","block search term","jetpack"),_x("giphy","block search term","jetpack"),_x("image","block search term","jetpack")],description:__("Search for and insert an animated image.","jetpack"),attributes:{align:{type:"string",default:"center"},caption:{type:"string"},giphyUrl:{type:"string"},searchText:{type:"string"},paddingTop:{type:"string",default:"56.2%"}},supports:{html:!1,align:!0},edit:s.Z,save:()=>null,example:{attributes:{align:"center",giphyUrl:"https://giphy.com/embed/fxKWgoOG9hzPPkE1oc",paddingTop:"100%",searchText:"WordPress"}}}},80163:function(e,t,n){"use strict";n.d(t,{Gr:function(){return o},ix:function(){return s}});var r=n(72844);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=null;e=e.trim();const n=e.match(/^https?:\/\/(media\.|i\.)?giphy\.com\/(embed|gifs|media)?\/?([-\w]*)(\/giphy)?(\.gif)?$/);return n&&n[3]&&(t=function(){let e=arguments.length>1?arguments[1]:void 0;const t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(e);return t[t.length-1]}(n[3],"-")),t?`https://api.giphy.com/v1/gifs/${encodeURIComponent(t)}?api_key=${encodeURIComponent(r.U)}`:(e=>`https://api.giphy.com/v1/gifs/search?q=${encodeURIComponent(e)}&api_key=${encodeURIComponent(r.U)}&limit=10`)(e)},a=e=>`${Math.floor(e.images.original.height/e.images.original.width*100)}%`,i=e=>e?.embed_url,s=e=>({giphyUrl:i(e),paddingTop:a(e)})},4966:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(65736);const __=a.__,_x=a._x;t.Z=e=>{const{className:t,embedValue:n,onChange:a,onSubmit:i}=e;return(0,r.createElement)(o.PanelBody,{title:__("Calendar settings","jetpack"),initialOpen:!1},(0,r.createElement)("form",{onSubmit:i,className:t},(0,r.createElement)("textarea",{type:"text",value:n,className:"components-placeholder__input","aria-label":__("Google Calendar URL or iframe","jetpack"),placeholder:__("Enter URL or iframe to embed here…","jetpack"),onChange:a}),(0,r.createElement)(o.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack"))))}},81907:function(e,t,n){"use strict";var r=n(51806),o=n(13419),a=n(52175),i=n(4981),s=n(55609),c=n(94333),l=n(69307),u=n(65736),p=n(90162),d=n(4966),m=n(47875),h=n(4525);const __=u.__,_x=u._x;t.Z=(0,c.compose)(s.withNotices,(0,p.withViewportMatch)({isMobile:"< small"}))((function(e){const{attributes:{url:t,height:n},className:c,isMobile:u,isSelected:p,name:f,noticeOperations:g,noticeUI:b,setAttributes:v}=e,[k,y]=(0,l.useState)(t||""),[w,E]=(0,l.useState)(!1),[_,C]=(0,l.useState)(!1);(0,l.useEffect)((()=>{!p&&_&&C(!1)}),[p,_]);const S=()=>{C(!0)},j=e=>{e&&e.preventDefault();const t=(0,h.L7)(k.trim());if(!h.Wh.test(t.url))return g.removeAllNotices(),void g.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),g.removeAllNotices()},x=(0,i.getBlockDefaultClassName)(f),L=`<iframe src="${t}" style="border:0" scrolling="no" frameborder="0" height="${u?"300":n}"></iframe>`,P=(0,r.createElement)(s.ExternalLink,{href:"https://en.support.wordpress.com/google-calendar/"},__("Enable Permissions for the calendar you want to share","jetpack")),A=(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(d.Z,{className:`${x}-embed-form-sidebar`,embedValue:k,onChange:e=>y(e.target.value),onSubmit:j}));if(w||!t){const e=(0,o.Wp)()||(0,o.Ug)()?"https://en.support.wordpress.com/wordpress-editor/blocks/google-calendar/":"https://jetpack.com/support/jetpack-blocks/google-calendar/";return(0,r.createElement)("div",{className:c},A,(0,r.createElement)(s.Placeholder,{className:c,label:__("Google Calendar","jetpack"),icon:m.Z,notices:b},(0,r.createElement)("ol",{className:`${x}-placeholder-instructions`},(0,r.createElement)("li",null,P),(0,r.createElement)("li",null,__("Paste the embed code you copied from your Google Calendar below","jetpack"))),(T=`${x}-embed-form-editor`,(0,r.createElement)("form",{onSubmit:j,className:T},(0,r.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,r.createElement)(s.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))),(0,r.createElement)("div",{className:`${x}-placeholder-links`},(0,r.createElement)(s.ExternalLink,{href:e},__("Learn more","jetpack")))))}var T;return(0,r.createElement)("div",{className:c},A,(0,r.createElement)("div",null,(0,r.createElement)(s.SandBox,{html:L,onFocus:S}),!_&&(0,r.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:S})))}))},58710:function(e,t,n){"use strict";var r=n(31985),o=n(13839);(0,r.Z)(o.u2,o.Xd)},47875:function(e,t,n){"use strict";var r=n(51806),o=n(55609);t.Z=(0,r.createElement)(o.SVG,{height:"23",viewBox:"0 0 24 23",width:"24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.Path,{d:"M19.5,23h-15c-2.2,0-4-1.8-4-4V4c0-2.2,1.8-4,4-4h15c2.2,0,4,1.8,4,4v15C23.5,21.2,21.7,23,19.5,23z M4.5,2 c-1.1,0-2,0.9-2,2v15c0,1.1,0.9,2,2,2h15c1.1,0,2-0.9,2-2V4c0-1.1-0.9-2-2-2H4.5z M6.9,3.9L6.9,3.9c0.5,0,0.9,0.4,0.9,0.9V5 c0,0.5-0.4,0.9-0.9,0.9l0,0C6.5,5.9,6.1,5.5,6.1,5V4.7C6.1,4.3,6.5,3.9,6.9,3.9z M17,3.9L17,3.9c0.5,0,0.9,0.4,0.9,0.9V5 c0,0.5-0.4,0.9-0.9,0.9l0,0c-0.5,0-0.9-0.4-0.9-0.9V4.7C16.2,4.3,16.5,3.9,17,3.9z M8.8,17.6c1.8,0,3.2-1,3.2-2.4 c0-1.1-0.7-1.8-1.8-1.9v-0.1c0.9-0.2,1.5-0.9,1.5-1.8c0-1.3-1.2-2.2-2.9-2.2c-1.8,0-2.9,1-3,2.5h1.6c0-0.7,0.6-1.1,1.4-1.1 c0.8,0,1.3,0.4,1.3,1.1c0,0.7-0.5,1.1-1.3,1.1h-1v1.3h1c0.9,0,1.5,0.4,1.5,1.1c0,0.7-0.6,1.2-1.4,1.2c-0.9,0-1.4-0.4-1.5-1.1H5.7 C5.8,16.6,7,17.6,8.8,17.6z M17.6,17.4V9.3h-1.7l-2.1,1.4v1.6l2-1.4h0.1v6.4H17.6z"}))},13839:function(e,t,n){"use strict";n.d(t,{Xd:function(){return p},u2:function(){return u}});var r=n(51806),o=n(4981),a=n(65736),i=n(70355),s=n(81907),c=n(47875),l=n(4525);const __=a.__,_x=a._x,u="google-calendar",p={title:__("Google Calendar","jetpack"),description:__("Embed a Google Calendar.","jetpack"),keywords:[_x("events","block search term","jetpack"),_x("dates","block search term","jetpack"),_x("schedule","block search term","jetpack"),_x("appointments","block search term","jetpack")],icon:{src:c.Z,foreground:(0,i.m)()},category:"embed",supports:{align:!0,alignWide:!0,html:!1},attributes:{url:{type:"string"},height:{type:"integer",default:600}},edit:s.Z,save:e=>{let{attributes:{url:t}}=e;return(0,r.createElement)("a",{href:t},t)},transforms:{from:[{type:"shortcode",tag:"googleapps",isMatch:function(e){return"calendar"===e.named.domain},attributes:{url:{type:"string",shortcode:e=>{let{named:{domain:t,dir:n,query:r}}=e;return`https://${t}.google.com/${n}?${r}`}}}},{type:"raw",isMatch:e=>"P"===e.nodeName&&l.Wh.test(e.textContent),transform:e=>(0,o.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:n}=(0,l.jj)(e.innerHTML.trim());return(0,o.createBlock)("jetpack/google-calendar",{url:t,height:n})}}]},example:{attributes:{url:"https://calendar.google.com/calendar/embed?src=jb4bu80jirp0u11a6niie21pp4%40group.calendar.google.com&ctz=America/New_York"}}}},4525:function(e,t,n){"use strict";n.d(t,{E6:function(){return a},L7:function(){return u},Wh:function(){return o},jj:function(){return l}});const r="s*https?://calendar.google.com/calendar",o=new RegExp(`^${r}`,"i"),a=new RegExp(`<iframe((?:\\s+\\w+=(['"]).*?\\2)*)\\s+src=(["'])(${r}.*?)\\3((?:\\s+\\w+=(['"]).*?\\6)*)`,"i"),i=new RegExp(`${r}\\?cid=([-A-Za-z0-9+/]+={0,3})`,"i"),s=/\s+(\w+)=(["'])(.*?)\2/gi;function c(e){const t=i.exec(e);if(t)return"https://calendar.google.com/calendar/embed?src="+encodeURIComponent(atob(t[1]))}function l(e){const t=a.exec(e);if(!t)return;const n={};return t.forEach(((e,t)=>{if(0===t)return;if(o.test(e))return void(n.url=e);let r;for(;null!==(r=s.exec(e));)n[r[1]]=r[3]})),{url:n.url,width:n.width,height:n.height}}function u(e){return a.test(e)?l(e):i.test(e)?{url:c(e)}:{url:e}}},8979:function(e,t){"use strict";t.Z={accessToken:{type:"string"},instagramUser:{type:"string"},columns:{type:"number",default:3,min:1,max:6},count:{type:"number",default:9,min:1,max:30},spacing:{type:"number",default:10,min:0,max:50},isStackedOnMobile:{type:"boolean",default:!0}}},696:function(e,t,n){"use strict";n.d(t,{D:function(){return o},u:function(){return r}});const r=30,o="jetpack-new-instagram-connection"},64129:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(51806),o=n(55609),a=n(65736),i=n(696);const __=a.__,_n=a._n;function s(e){let{accountImageTotal:t,attributes:n,currentUserConnected:s,disconnectFromService:c,shouldRenderSidebarNotice:l,setAttributes:u}=e;const{accessToken:p,columns:d,count:m,instagramUser:h,isStackedOnMobile:f,spacing:g}=n;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelBody,{title:__("Account Settings","jetpack")},(0,r.createElement)(o.PanelRow,null,(0,r.createElement)("span",null,__("Account","jetpack")),(0,r.createElement)(o.ExternalLink,{href:`https://www.instagram.com/${h}/`},"@",h)),s&&(0,r.createElement)(o.PanelRow,null,(0,r.createElement)(o.Button,{isDestructive:!0,variant:"link",onClick:()=>c(p)},__("Disconnect your account","jetpack")))),(0,r.createElement)(o.PanelBody,{title:__("Display Settings","jetpack")},l?(()=>{const e=t?(0,a.sprintf)(/* translators: placeholder is a number. */ _n("There is currently only %s post in your Instagram account.","There are currently only %s posts in your Instagram account.",t,"jetpack"),t):__("There are currently no posts in your Instagram account.","jetpack");return(0,r.createElement)("div",{className:"wp-block-jetpack-instagram-gallery__count-notice"},(0,r.createElement)(o.Notice,{isDismissible:!1,status:"info"},e))})():null,(0,r.createElement)(o.RangeControl,{label:__("Number of Posts","jetpack"),value:m,onChange:e=>u({count:e}),min:1,max:i.u}),(0,r.createElement)(o.RangeControl,{label:__("Number of Columns","jetpack"),value:d,onChange:e=>u({columns:e}),min:1,max:6}),(0,r.createElement)(o.RangeControl,{label:__("Image Spacing (px)","jetpack"),value:g,onChange:e=>u({spacing:e}),min:0,max:50}),(0,r.createElement)(o.ToggleControl,{label:__("Stack on mobile","jetpack"),checked:f,onChange:()=>u({isStackedOnMobile:!f})})))}},36420:function(e,t,n){"use strict";var r=n(51806),o=n(13419),a=n(52175),i=n(55609),s=n(69307),c=n(65736),l=n(65235),u=n.n(l),p=n(92819),d=n(4554),m=n(8979),h=n(696),f=n(64129),g=n(44961),b=n(79236),v=n(2681),k=n(75412);const __=c.__;t.Z=(0,i.withNotices)((e=>{const{attributes:t,className:n,isSelected:c,noticeOperations:l,noticeUI:y,setAttributes:w}=e,{accessToken:E,align:_,columns:C,count:S,isStackedOnMobile:j,spacing:x}=t;(0,s.useEffect)((()=>{const e=(0,d.S)(m.Z,t);(0,p.isEqual)(e,t)||w(e)}),[t,w]);const[L,P]=(0,s.useState)(E),{isRequestingWpcomConnectUrl:A,wpcomConnectUrl:T}=(0,v.Z)(),{images:N,isLoadingGallery:M,setImages:I}=(0,k.Z)({accessToken:E,noticeOperations:l,setAttributes:w,setSelectedAccount:P}),{connectToService:R,disconnectFromService:Z,isConnecting:D,isRequestingUserConnections:B,userConnections:F}=(0,b.Z)({accessToken:E,noticeOperations:l,selectedAccount:L,setAttributes:w,setImages:I,setSelectedAccount:P}),O=(0,o.Dp)(),U=S>N.length?N.length:S,z=!M&&(!E||(0,p.isEmpty)(N)),H=!z,$=E&&M&&(0,p.isEmpty)(N),q=!z&&!$,V=u()(n,{[`align${_}`]:_}),G=u()("wp-block-jetpack-instagram-gallery__grid",`wp-block-jetpack-instagram-gallery__grid-columns-${C}`,{"is-stacked-on-mobile":j}),W={gridGap:x,"--latest-instagram-posts-spacing":x?`${x}px`:void 0},J={padding:x},K=()=>{L&&h.D!==L?w({accessToken:L,instagramUser:(0,p.find)(F,{token:L}).username}):R()};return(0,r.createElement)("div",{className:V},z&&(0,r.createElement)(i.Placeholder,{icon:"instagram",instructions:O?B||F.length?void 0:__("Connect to Instagram to start sharing your images.","jetpack"):__("First, you'll need to connect your WordPress.com account.","jetpack"),label:__("Latest Instagram Posts","jetpack"),notices:y},O?(()=>{const e=F.length>0,t=[...(0,p.map)(F,(e=>({label:`@${e.username}`,value:e.token}))),{label:__("Add a new account","jetpack"),value:h.D}],n=D||B||e&&!L;return(0,r.createElement)("div",null,e&&(0,r.createElement)(i.RadioControl,{label:__("Select your Instagram account:","jetpack"),onChange:e=>P(e),options:t,selected:L}),h.D===L&&(0,r.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,r.createElement)(i.Button,{disabled:n,variant:"primary",onClick:K},D&&__("Connecting…","jetpack"),B&&__("Loading your connections…","jetpack"),!D&&!B&&__("Connect to Instagram","jetpack")))})():(0,r.createElement)(i.Button,{disabled:A||!T,href:T,variant:"secondary"},__("Connect to WordPress.com","jetpack"))),$&&(0,r.createElement)("div",{className:"wp-block-embed is-loading"},(0,r.createElement)(i.Spinner,null),(0,r.createElement)("p",null,__("Embedding…","jetpack"))),q&&(0,r.createElement)("div",{className:G,style:W},(0,p.times)(c?S:U,(e=>(0,r.createElement)("span",{className:u()("wp-block-jetpack-instagram-gallery__grid-post"),key:e,style:J},(e=>{if(N[e]){const n=N[e];return(0,r.createElement)(g.Z,{alt:n.title||n.url,src:n.url,attributes:t,spacing:x})}return(0,r.createElement)("img",{alt:__("Latest Instagram Posts placeholder","jetpack"),src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNMyc2tBwAEOgG/c94mJwAAAABJRU5ErkJggg=="})})(e))))),H&&(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(f.Z,{accountImageTotal:N.length,attributes:t,currentUserConnected:O,disconnectFromService:Z,shouldRenderSidebarNotice:H&&!$&&N.length<S,setAttributes:w})))}))},34575:function(e,t,n){"use strict";var r=n(31985),o=n(78544);(0,r.Z)(o.u,o.X)},44961:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(51806),o=n(69307),a=n(65235),i=n.n(a);function s(e){let{src:t,alt:n,spacing:a}=e;const[s,c]=(0,o.useState)(!1),[l,u]=(0,o.useState)("auto"),p=(0,o.useRef)(),d=()=>{c(!0),u("auto")};(0,o.useEffect)((()=>{const e=t;if(e){const t=new window.Image;t.src=e,t.onload=d}p.current&&u(p.current.parentNode.getBoundingClientRect().width)}),[t]);const m=-1*a,h=i()("wp-block-jetpack-instagram-gallery__placeholder",{"is-loaded":s}),f=s?{margin:m}:{margin:m,height:l},g=i()({"is-loaded":s});return(0,r.createElement)("span",{style:f,className:h},(0,r.createElement)("img",{alt:n,className:g,ref:p,src:t}))}},78544:function(e,t,n){"use strict";n.d(t,{X:function(){return p},u:function(){return u}});var r=n(51806),o=n(4981),a=n(65736),i=n(70355),s=n(81427),c=n(8979),l=n(36420);const __=a.__,_x=a._x,u="instagram-gallery",p={title:__("Latest Instagram Posts","jetpack"),description:__("Display an automatically updating list of the latest posts from your Instagram feed.","jetpack"),icon:{src:s.yu,foreground:(0,i.m)()},category:"embed",keywords:[_x("images","block search term","jetpack"),_x("photos","block search term","jetpack"),_x("pictures","block search term","jetpack")],supports:{align:!0,html:!1},transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:n}=e;return!!n?.raw&&"wpcom_instagram_widget"===t},transform:e=>{let{instance:t}=e;return(0,o.createBlock)("jetpack/instagram-gallery",{columns:t.raw.columns,count:t.raw.count,accessToken:t.raw.token_id})}}]},attributes:c.Z,edit:l.Z,save:e=>{let{attributes:{instagramUser:t}}=e;return t&&(0,r.createElement)("div",null,(0,r.createElement)("a",{href:`https://www.instagram.com/${t}/`,rel:"noopener noreferrer",target:"_blank"},`https://www.instagram.com/${t}/`))}}},79236:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(13419),o=n(7211),a=n(86989),i=n.n(a),s=n(69307),c=n(65736),l=n(92819),u=n(696);const __=c.__;function p(e){let{accessToken:t,noticeOperations:n,selectedAccount:a,setAttributes:c,setImages:p,setSelectedAccount:d}=e;const[m,h]=(0,s.useState)(!1),[f,g]=(0,s.useState)(!1),[b,v]=(0,s.useState)([]),k=(0,r.Dp)();(0,s.useEffect)((()=>{!t&&k&&(g(!0),i()({path:"/wpcom/v2/instagram-gallery/connections"}).then((e=>{g(!1),v(e)})).catch((()=>{g(!1),v([])})))}),[t,k]),(0,s.useEffect)((()=>{u.D===a||(0,l.find)(b,{token:a})||d(void 0)}),[a,d,b]);return{connectToService:()=>{n.removeAllNotices(),h(!0),i()({path:"/wpcom/v2/instagram-gallery/connect-url"}).then((e=>{const t=new o.Z;t.open(e,"connect-to-instagram-popup","toolbar=0,location=0,menubar=0,"+t.getScreenCenterSpecs(700,700)),t.on("message",(e=>{let{keyring_id:t}=e;if(h(!1),t){const e=t.toString();c({accessToken:e}),d(e)}})),t.on("close",(e=>{"connect-to-instagram-popup"===e&&h(!1)}))})).catch((()=>{n.createErrorNotice(__("An error occurred. Please try again later.","jetpack")),h(!1)}))},disconnectFromService:()=>{n.removeAllNotices(),c({accessToken:void 0,instagramUser:void 0}),p([])},isConnecting:m,isRequestingUserConnections:f,userConnections:b}}},2681:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(13419),o=n(86989),a=n.n(o),i=n(9818),s=n(69307),c=n(96483);function l(){const{isAutoDraft:e}=(0,i.useSelect)((e=>{const{status:t}=e("core/editor").getCurrentPost();return{isAutoDraft:"auto-draft"===t}})),{savePost:t}=(0,i.useDispatch)("core/editor"),[n,o]=(0,s.useState)(),[l,u]=(0,s.useState)(!1),p=(0,r.Dp)();return(0,s.useEffect)((()=>{p||n||l||(e?t():(u(!0),a()({path:(0,c.addQueryArgs)("/jetpack/v4/connection/url",{from:"jetpack-block-editor",redirect:window.location.href})}).then((e=>{o(e),u(!1)}))))}),[p,e,l,t,n]),{isRequestingWpcomConnectUrl:l,wpcomConnectUrl:n}}},75412:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(86989),o=n.n(r),a=n(69307),i=n(65736),s=n(96483),c=n(92819),l=n(696);const __=i.__;function u(e){let{accessToken:t,noticeOperations:n,setAttributes:r,setSelectedAccount:i}=e;const[u,p]=(0,a.useState)([]),[d,m]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{t&&(n.removeAllNotices(),m(!0),o()({path:(0,s.addQueryArgs)("/wpcom/v2/instagram-gallery/gallery",{access_token:t,count:l.u})}).then((e=>{let{external_name:t,images:o}=e;if(m(!1),!o||!(0,c.isArray)(o))return n.createErrorNotice(__("An error occurred. Please try again later.","jetpack")),p([]),r({accessToken:void 0,instagramUser:void 0}),void i(void 0);(0,c.isEmpty)(o)&&n.createErrorNotice(__("No images were found in your Instagram account.","jetpack")),r({instagramUser:t}),p(o)})).catch((()=>{m(!1),p([]),r({accessToken:void 0,instagramUser:void 0}),i(void 0)})))}),[t,r,i]),{images:u,isLoadingGallery:d,setImages:p}}},64968:function(e,t,n){"use strict";n.d(t,{Cw:function(){return a},N3:function(){return r},sf:function(){return o}});const r="processing",o="success",a="error"},84038:function(e,t,n){"use strict";n.d(t,{Q:function(){return c}});var r=n(51806),o=n(55609),a=n(65736),i=n(64968),s=n(24535);const __=a.__;function c(e){let{auditionNotification:t,clearAudition:n,setAttributes:a,emailPlaceholder:c,processingLabel:l,successLabel:u,errorLabel:p,interests:d,signupFieldTag:m,signupFieldValue:h,connectURL:f}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelBody,{title:__("Text Elements","jetpack")},(0,r.createElement)(o.TextControl,{label:__("Email Placeholder","jetpack"),value:c,onChange:e=>{a({emailPlaceholder:e}),n()}})),(0,r.createElement)(o.PanelBody,{title:__("Notifications","jetpack")},(0,r.createElement)(o.TextControl,{label:__("Processing text","jetpack"),value:l,onChange:e=>{a({processingLabel:e}),t(i.N3)}}),(0,r.createElement)(o.TextControl,{label:__("Success text","jetpack"),value:u,onChange:e=>{a({successLabel:e}),t(i.sf)}}),(0,r.createElement)(o.TextControl,{label:__("Error text","jetpack"),value:p,onChange:e=>{a({errorLabel:e}),t(i.Cw)}})),(0,r.createElement)(o.PanelBody,{title:__("Mailchimp Groups","jetpack")},(0,r.createElement)(s.Z,{interests:d,onChange:(e,t)=>{const n=[...new Set([...d,e])].filter((n=>!(n===e&&!t)&&n));a({interests:n})}}),(0,r.createElement)(o.ExternalLink,{href:"https://mailchimp.com/help/send-groups-audience/"},__("Learn about groups","jetpack"))),(0,r.createElement)(o.PanelBody,{title:__("Signup Location Tracking","jetpack")},(0,r.createElement)(o.TextControl,{label:__("Signup Field Tag","jetpack"),placeholder:__("SIGNUP","jetpack"),value:m,onChange:e=>a({signupFieldTag:e})}),(0,r.createElement)(o.TextControl,{label:__("Signup Field Value","jetpack"),placeholder:__("website","jetpack"),value:h,onChange:e=>a({signupFieldValue:e})}),(0,r.createElement)(o.ExternalLink,{href:"https://mailchimp.com/help/determine-webpage-signup-location/"},__("Learn about signup location tracking","jetpack"))),(0,r.createElement)(o.PanelBody,{title:__("Mailchimp Connection","jetpack")},(0,r.createElement)(o.ExternalLink,{href:f},__("Manage Connection","jetpack"))))}},748:function(e,t,n){"use strict";var r=n(4981),o=n(65736),a=n(92819);const __=o.__,i=["submitButtonText","backgroundButtonColor","textButtonColor","submitButtonClasses","customBackgroundButtonColor","customTextButtonColor"];t.Z={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,a.omit)(e,i),n={text:(o=e).submitButtonText||__("Join my email list","jetpack"),textColor:o.textButtonColor,customTextColor:o.customTextButtonColor,backgroundColor:o.backgroundButtonColor,customBackgroundColor:o.customBackgroundButtonColor};var o;return[t,[(0,r.createBlock)("jetpack/button",{element:"button",uniqueId:"mailchimp-widget-id",...n})]]},isEligible:(e,t)=>(0,a.isEmpty)(t)||(0,a.some)((0,a.pick)(e,i),Boolean),save:()=>null}},43818:function(e,t,n){"use strict";var r=n(51806),o=n(13419),a=n(86989),i=n.n(a),s=n(52175),c=n(55609),l=n(69307),u=n(65736),p=n(96483),d=n(65235),m=n.n(d),h=n(64968),f=n(84038),g=n(4495);const __=u.__;class b extends l.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,o.Dp)();if(e){const t={path:"/wpcom/v2/mailchimp",method:"GET"};i()(t).then((t=>{const n=t.connect_url,r="connected"===t.code?1:2;this.setState({currentUserConnected:e,connected:r,connectURL:n})}),(t=>{this.setState({currentUserConnected:e,connected:2,connectURL:null}),this.onError(t.message)}))}else i()({path:(0,p.addQueryArgs)("/jetpack/v4/connection/url",{from:"jetpack-block-editor",redirect:window.location.href})}).then((t=>{const n=t;this.setState({currentUserConnected:e,connected:2,connectURL:n})}))};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:n,successLabel:r,errorLabel:o}=t;return e===h.N3?n:e===h.sf?r:e===h.Cw?o:null};roleForAuditionType=e=>e===h.Cw?"alert":"status";render=()=>{const{attributes:e,className:t,notices:n,noticeUI:o,setAttributes:a}=this.props,{audition:i,connected:u,connectURL:p,currentUserConnected:d}=this.state,{emailPlaceholder:h,consentText:b,interests:v,processingLabel:k,successLabel:y,errorLabel:w,preview:E,signupFieldTag:_,signupFieldValue:C}=e,S="wp-block-jetpack-mailchimp",j=(0,r.createElement)(c.Placeholder,{icon:g.qv,notices:n,className:"wp-block-jetpack-mailchimp",label:__("Mailchimp","jetpack")},(0,r.createElement)("div",{className:"align-center"},(0,r.createElement)(c.Spinner,null))),x=(0,r.createElement)(c.Placeholder,{className:"wp-block-jetpack-mailchimp",icon:g.qv,label:__("Mailchimp","jetpack"),notices:n,instructions:__("You need to connect your Mailchimp account and choose an audience in order to start collecting Email subscribers.","jetpack")},(0,r.createElement)(c.Button,{variant:"secondary",href:p,target:"_blank"},__("Set up Mailchimp form","jetpack")),(0,r.createElement)("div",{className:`${S}-recheck`},(0,r.createElement)(c.Button,{variant:"link",onClick:this.apiCall},__("Re-check Connection","jetpack")))),L=(0,r.createElement)(c.Placeholder,{className:"wp-block-jetpack-mailchimp",icon:g.qv,label:__("Mailchimp","jetpack"),notices:n,instructions:__("First, you'll need to connect your WordPress.com account.","jetpack")},(0,r.createElement)(c.Button,{variant:"secondary",href:p},__("Connect to WordPress.com","jetpack"))),P=(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(f.Q,{auditionNotification:this.auditionNotification,clearAudition:this.clearAudition,emailPlaceholder:h,processingLabel:k,successLabel:y,errorLabel:w,interests:v,setAttributes:this.props.setAttributes,signupFieldTag:_,signupFieldValue:C,connectURL:p})),A=m()(t,{[`${S}_notication-audition`]:i}),T=(0,r.createElement)("div",{className:A},(0,r.createElement)(c.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,r.createElement)(s.InnerBlocks,{template:[[g.Ss.name,g.Ss.attributes]],templateLock:"all"}),(0,r.createElement)(s.RichText,{tagName:"p",placeholder:__("Write consent text","jetpack"),value:b,onChange:e=>a({consentText:e}),inlineToolbar:!0}),i&&(0,r.createElement)("div",{className:`${S}_notification ${S}_${i}`,role:this.roleForAuditionType(i)},this.labelForAuditionType(i))),N=T;return(0,r.createElement)(l.Fragment,null,o,E&&N,!E&&0===u&&j,!E&&2===u&&d&&x,!E&&2===u&&!d&&L,!E&&1===u&&P,!E&&1===u&&T)}}t.Z=(0,c.withNotices)(b)},61204:function(e,t,n){"use strict";var r=n(31985),o=n(4495);(0,r.Z)(o.u2,o.Xd)},4495:function(e,t,n){"use strict";n.d(t,{Ss:function(){return m},Xd:function(){return h},qv:function(){return d},u2:function(){return p}});var r=n(51806),o=n(52175),a=n(55609),i=n(65736),s=n(70355),c=n(748),l=n(43818),u=n(84197);const __=i.__,_x=i._x,p="mailchimp",d=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(a.G,{transform:"translate(-45.478101,-100.73059)"},(0,r.createElement)(a.G,{transform:"matrix(0.26458333,0,0,0.26458333,15.6741,59.72)"},(0,r.createElement)(a.Path,{d:"m 176.433,197.529 c 0.657,-0.078 1.286,-0.082 1.865,0 0.335,-0.768 0.392,-2.091 0.091,-3.532 -0.447,-2.142 -1.053,-3.438 -2.305,-3.236 -1.252,0.202 -1.298,1.754 -0.85,3.895 0.252,1.205 0.7,2.235 1.199,2.873"}),(0,r.createElement)(a.Path,{d:"m 165.688,199.224 c 0.895,0.393 1.446,0.654 1.661,0.426 0.139,-0.142 0.097,-0.413 -0.117,-0.762 -0.442,-0.721 -1.351,-1.453 -2.316,-1.864 -1.972,-0.849 -4.325,-0.567 -6.14,0.737 -0.599,0.439 -1.167,1.047 -1.086,1.416 0.026,0.119 0.116,0.209 0.326,0.239 0.494,0.056 2.22,-0.816 4.209,-0.938 1.403,-0.086 2.566,0.353 3.462,0.746"}),(0,r.createElement)(a.Path,{d:"m 163.887,200.252 c -1.167,0.184 -1.81,0.569 -2.223,0.926 -0.352,0.308 -0.57,0.649 -0.568,0.888 0.001,0.114 0.05,0.18 0.089,0.213 0.053,0.047 0.116,0.073 0.192,0.073 0.263,0 0.854,-0.237 0.854,-0.237 1.623,-0.581 2.694,-0.51 3.755,-0.39 0.586,0.066 0.864,0.102 0.992,-0.099 0.038,-0.058 0.084,-0.183 -0.033,-0.373 -0.273,-0.443 -1.451,-1.192 -3.057,-1.001"}),(0,r.createElement)(a.Path,{d:"m 172.805,204.025 c 0.792,0.389 1.664,0.236 1.948,-0.341 0.284,-0.577 -0.128,-1.361 -0.92,-1.75 -0.792,-0.389 -1.664,-0.236 -1.948,0.341 -0.284,0.578 0.128,1.361 0.92,1.75"}),(0,r.createElement)(a.Path,{d:"m 177.896,199.576 c -0.643,-0.011 -1.177,0.695 -1.192,1.578 -0.015,0.883 0.495,1.606 1.138,1.617 0.643,0.011 1.177,-0.695 1.192,-1.578 0.015,-0.882 -0.495,-1.606 -1.138,-1.617"}),(0,r.createElement)(a.Path,{d:"m 134.683,215.485 c -0.16,-0.201 -0.423,-0.14 -0.678,-0.08 -0.178,0.042 -0.379,0.088 -0.6,0.085 -0.473,-0.009 -0.874,-0.211 -1.099,-0.557 -0.293,-0.45 -0.276,-1.121 0.047,-1.889 l 0.151,-0.344 c 0.516,-1.158 1.379,-3.095 0.41,-4.941 -0.73,-1.39 -1.92,-2.255 -3.351,-2.437 -1.374,-0.174 -2.788,0.335 -3.69,1.33 -1.423,1.57 -1.646,3.707 -1.371,4.462 0.101,0.276 0.259,0.353 0.373,0.369 0.242,0.032 0.6,-0.144 0.824,-0.747 l 0.064,-0.196 c 0.1,-0.319 0.286,-0.913 0.591,-1.389 0.368,-0.574 0.94,-0.969 1.612,-1.114 0.684,-0.147 1.384,-0.016 1.97,0.368 0.997,0.652 1.381,1.874 0.955,3.039 -0.22,0.603 -0.578,1.756 -0.499,2.703 0.16,1.917 1.339,2.687 2.398,2.769 1.03,0.039 1.75,-0.54 1.932,-0.962 0.107,-0.25 0.017,-0.402 -0.042,-0.467"}),(0,r.createElement)(a.Path,{d:"m 144.475,180.275 c 3.36,-3.882 7.495,-7.257 11.2,-9.152 0.128,-0.066 0.264,0.073 0.195,0.199 -0.294,0.533 -0.861,1.674 -1.04,2.539 -0.028,0.135 0.119,0.236 0.233,0.159 2.305,-1.571 6.314,-3.255 9.831,-3.471 0.151,-0.009 0.224,0.184 0.104,0.277 -0.535,0.41 -1.12,0.978 -1.547,1.552 -0.073,0.098 -0.004,0.238 0.118,0.239 2.469,0.018 5.95,0.882 8.219,2.155 0.153,0.086 0.044,0.383 -0.128,0.344 -3.433,-0.787 -9.052,-1.384 -14.89,0.04 -5.211,1.271 -9.189,3.234 -12.09,5.344 -0.147,0.107 -0.323,-0.087 -0.204,-0.224 z m 16.732,37.612 0.001,0.002 0.002,0.004 z m 13.854,1.635 c 0.1,-0.042 0.168,-0.155 0.157,-0.268 -0.014,-0.139 -0.138,-0.24 -0.277,-0.226 0,0 -7.169,1.061 -13.942,-1.418 0.738,-2.398 2.699,-1.532 5.664,-1.293 5.344,0.319 10.134,-0.462 13.674,-1.478 3.067,-0.88 7.096,-2.616 10.225,-5.086 1.055,2.318 1.428,4.87 1.428,4.87 0,0 0.817,-0.146 1.5,0.274 0.645,0.397 1.118,1.222 0.795,3.356 -0.658,3.986 -2.352,7.222 -5.2,10.199 -1.734,1.866 -3.838,3.488 -6.246,4.668 -1.279,0.672 -2.64,1.253 -4.079,1.722 -10.736,3.507 -21.726,-0.348 -25.268,-8.626 -0.283,-0.622 -0.522,-1.274 -0.71,-1.955 -1.509,-5.455 -0.228,-12 3.778,-16.12 v -0.002 c 0.247,-0.262 0.499,-0.571 0.499,-0.96 0,-0.325 -0.207,-0.668 -0.386,-0.912 -1.402,-2.033 -6.257,-5.497 -5.282,-12.201 0.7,-4.816 4.912,-8.208 8.839,-8.007 l 0.995,0.057 c 1.702,0.101 3.186,0.319 4.587,0.378 2.345,0.102 4.453,-0.239 6.951,-2.32 0.842,-0.702 1.518,-1.311 2.661,-1.504 0.12,-0.021 0.419,-0.128 1.016,-0.1 0.61,0.033 1.19,0.2 1.711,0.547 2.002,1.332 2.286,4.559 2.39,6.919 0.059,1.347 0.222,4.607 0.278,5.543 0.127,2.14 0.69,2.441 1.828,2.816 0.64,0.211 1.234,0.368 2.11,0.614 2.65,0.744 4.221,1.499 5.212,2.469 0.591,0.606 0.866,1.25 0.951,1.864 0.312,2.28 -1.77,5.096 -7.283,7.655 -6.026,2.797 -13.337,3.505 -18.388,2.942 l -1.77,-0.2 c -4.04,-0.544 -6.345,4.677 -3.92,8.255 1.563,2.306 5.82,3.806 10.079,3.807 9.765,0.001 17.271,-4.169 20.063,-7.77 l 0.223,-0.318 c 0.138,-0.207 0.024,-0.321 -0.147,-0.204 -2.281,1.561 -12.413,7.758 -23.251,5.893 0,0 -1.317,-0.217 -2.519,-0.684 -0.955,-0.372 -2.955,-1.292 -3.198,-3.343 8.746,2.705 14.253,0.148 14.253,0.148 z m -48.039,-20.785 c -3.042,0.591 -5.723,2.315 -7.362,4.697 -0.98,-0.817 -2.805,-2.399 -3.128,-3.016 -2.617,-4.97 2.856,-14.632 6.68,-20.089 9.45,-13.485 24.25,-23.692 31.101,-21.84 1.114,0.315 4.803,4.592 4.803,4.592 0,0 -6.849,3.8 -13.2,9.097 -8.558,6.589 -15.022,16.166 -18.895,26.559 z m 5.111,22.805 c -0.46,0.079 -0.93,0.11 -1.404,0.098 -4.577,-0.123 -9.52,-4.243 -10.011,-9.129 -0.543,-5.401 2.217,-9.557 7.103,-10.543 0.584,-0.118 1.29,-0.186 2.051,-0.146 2.738,0.15 6.772,2.252 7.693,8.216 0.816,5.282 -0.48,10.659 -5.432,11.503 z m 61.996,-9.564 c -0.039,-0.139 -0.295,-1.072 -0.646,-2.197 -0.351,-1.126 -0.714,-1.917 -0.714,-1.917 1.408,-2.107 1.433,-3.992 1.245,-5.059 -0.2,-1.323 -0.751,-2.45 -1.861,-3.616 -1.11,-1.165 -3.381,-2.359 -6.572,-3.255 l -1.674,-0.465 c -0.008,-0.069 -0.088,-3.947 -0.16,-5.612 -0.053,-1.204 -0.156,-3.083 -0.739,-4.933 -0.695,-2.505 -1.905,-4.697 -3.416,-6.099 4.17,-4.322 6.773,-9.084 6.766,-13.168 -0.012,-7.855 -9.659,-10.232 -21.548,-5.309 l -2.519,1.069 c -0.011,-0.011 -4.554,-4.468 -4.622,-4.528 -13.555,-11.823 -55.935,35.284 -42.386,46.725 l 2.961,2.509 c -0.768,1.99 -1.07,4.27 -0.823,6.721 0.316,3.149 1.94,6.167 4.573,8.499 2.499,2.214 5.785,3.616 8.973,3.613 5.273,12.151 17.321,19.605 31.447,20.025 15.153,0.45 27.873,-6.66 33.203,-19.432 0.349,-0.896 1.828,-4.935 1.828,-8.501 0,-3.583 -2.026,-5.068 -3.316,-5.068"})))),m={name:"jetpack/button",attributes:{element:"button",text:__("Join my Mailchimp audience","jetpack"),uniqueId:"mailchimp-widget-id"}},h={title:__("Mailchimp","jetpack"),icon:{src:d,foreground:(0,s.m)()},description:__("Allow readers to join a Mailchimp audience.","jetpack"),category:"grow",keywords:[_x("email","block search term","jetpack"),_x("subscription","block search term","jetpack"),_x("newsletter","block search term","jetpack")],supports:{align:["wide","full"],color:{gradients:!0},spacing:{padding:!0,margin:!0}},attributes:{emailPlaceholder:{type:"string",default:__("Enter your email","jetpack")},consentText:{type:"string",default:__("By clicking submit, you agree to share your email address with the site owner and Mailchimp to receive marketing, updates, and other emails from the site owner. Use the unsubscribe link in those emails to opt out at any time.","jetpack")},interests:{type:"array",default:[]},processingLabel:{type:"string",default:__("Processing…","jetpack")},signupFieldTag:{type:"string"},signupFieldValue:{type:"string"},successLabel:{type:"string",default:__("Success! You're on the list.","jetpack")},errorLabel:{type:"string",default:__("Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.","jetpack")},preview:{type:"boolean",default:!1}},edit:l.Z,save:()=>(0,r.createElement)(o.InnerBlocks.Content,null),example:{attributes:{preview:!0},innerBlocks:[m]},deprecated:[c.Z],transforms:u.Z}},24535:function(e,t,n){"use strict";var r=n(51806),o=n(86989),a=n.n(o),i=n(55609),s=n(69307);class c extends s.Component{state={interest_categories:[]};componentDidMount(){this.retrieveGroups()}retrieveGroups=()=>{a()({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:n}=this.props;return(0,r.createElement)(s.Fragment,null,e&&(e||[]).map((e=>e.interests.map((e=>(0,r.createElement)(i.CheckboxControl,{label:e.name,value:e.id,checked:t.includes(e.id),onChange:t=>n(e.id,t),key:e.id}))))))}}t.Z=c,c.defaultProps={interests:[],onChange:()=>null}},84197:function(e,t,n){"use strict";var r=n(4981);t.Z={to:[{type:"block",blocks:["jetpack/subscriptions"],transform:()=>(0,r.createBlock)("jetpack/subscriptions")}]}},2944:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(31852);const __=i.__;class c extends a.Component{render(){const{onClose:e,onAddPoint:t,onError:n,apiKey:a,mapProvider:i}=this.props;return(0,r.createElement)(o.Button,{className:"component__add-point"},__("Add marker","jetpack"),(0,r.createElement)(o.Popover,{className:"component__add-point__popover",position:"bottom center"},(0,r.createElement)(o.Button,{className:"component__add-point__close",onClick:e},(0,r.createElement)(o.Dashicon,{icon:"no"})),(0,r.createElement)(s.Z,{onAddPoint:t,label:__("Add a location","jetpack"),apiKey:a,onError:n,mapProvider:i})))}}c.defaultProps={onAddPoint:()=>{},onClose:()=>{},onError:()=>{},mapProvider:"mapbox"},t.Z=c},75890:function(e,t,n){"use strict";var r=n(82674),o=n.n(r),a=n(51806),i=n(69307),s=n(21035),c=n(99128);const l=(0,i.forwardRef)(((e,t)=>{if("mapkit"===e.mapProvider){const n={...e,ref:null};return(0,a.createElement)(c.Z,o()({},n,{ref:t}))}return(0,a.createElement)(s.Z,o()({},e,{ref:t}))}));t.Z=l},75385:function(e,t,n){"use strict";var r=n(51806),o=n(61323),a=n(82891);t.Z=e=>"mapkit"===e.mapProvider?(0,r.createElement)(a.Z,e):(0,r.createElement)(o.Z,e)},61323:function(e,t,n){"use strict";var r=n(69307),o=n(84634);class a extends r.Component{componentDidMount(){const{mapboxgl:e}=this.props;this.el=document.createElement("DIV"),this.infowindow=(0,o.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,r.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()}}a.defaultProps={unsetActiveMarker:()=>{},activeMarker:null,map:null,mapboxgl:null},t.Z=a},82891:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(72672);const __=i.__,c=()=>{const{activeMarker:e,setActiveMarker:t,calloutReference:n,admin:i,points:c,setPoints:l}=(0,s.qw)(),[u,p]=(0,a.useState)(c),[d,m]=(0,a.useState)(!1),{title:h,caption:f}=u.find((t=>t.id===e?.id))||{},g=t=>{const n=c.map((n=>n.id===e.id?{...n,...t}:n));p(n),m(!0)};return(0,a.useEffect)((()=>{!e&&d&&l(u)}),[e,d,u,l]),(0,a.useEffect)((()=>{p(c),m(!1)}),[c]),e&&n?(0,a.createPortal)((0,r.createElement)(a.Fragment,null,i&&(0,r.createElement)(a.Fragment,null,(0,r.createElement)(o.TextControl,{label:__("Marker Title","jetpack"),value:h,onChange:e=>g({title:e})}),(0,r.createElement)(o.TextareaControl,{className:"wp-block-jetpack-map__marker-caption",label:__("Marker Caption","jetpack"),value:f,rows:"2",tag:"textarea",onChange:e=>g({caption:e})}),(0,r.createElement)(o.Button,{onClick:()=>{const n=c.filter((t=>t.id!==e.id));p(n),m(!0),t(null)},className:"wp-block-jetpack-map__delete-btn"},(0,r.createElement)(o.Dashicon,{icon:"trash",size:"15"})," ",__("Delete Marker","jetpack"))),!i&&(0,r.createElement)(a.Fragment,null,(0,r.createElement)("h3",null,h),(0,r.createElement)("p",null,f))),n):null};c.defaultProps={},t.Z=c},32333:function(e,t,n){"use strict";var r=n(69307),o=n(85007),a=n(84634);class i extends r.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:n,markerColor:r,mapRef:i}=this.props,{handleClick:s}=this,c=[t.coordinates.longitude,t.coordinates.latitude],{currentDoc:l}=(0,o.bL)(i.current),u=this.marker?this.marker.getElement():l.createElement("div");this.marker?this.marker.setLngLat(c):(u.className="wp-block-jetpack-map-marker",this.marker=new n.Marker(u).setLngLat(c).setOffset([0,-19]).addTo(e),this.marker.getElement().addEventListener("click",s)),(0,a.zb)(u,r)}render(){return null}}i.defaultProps={point:{},map:null,markerColor:"#000000",mapboxgl:null,onClick:()=>{}},t.Z=i},21035:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(92819),c=n(85007),l=n(45388),u=n(90055),p=n(84634),d=n(51321),m=n(75385),h=n(32333);const __=i.__;class f extends a.Component{constructor(){super(...arguments),this.state={map:null,fit_to_bounds:!1,loaded:!1,mapboxgl:null},this.mapRef=(0,a.createRef)(),this.debouncedSizeMap=(0,s.debounce)(this.sizeMap,250)}render(){const{points:e,admin:t,children:n,markerColor:i}=this.props,{map:c,activeMarker:l,mapboxgl:u}=this.state,{onMarkerClick:p,deleteActiveMarker:d,updateActiveMarker:f}=this,g=(0,s.get)(l,"props.point")||{},{title:b,caption:v}=g,k=a.Children.map(n,(e=>{if("AddPoint"===(0,s.get)(e,"props.tagName"))return e})),y=c&&u&&e.map(((e,t)=>(0,r.createElement)(h.Z,{mapRef:this.mapRef,key:t,point:e,index:t,map:c,mapboxgl:u,markerColor:i,onClick:p}))),w=u&&(0,r.createElement)(m.Z,{activeMarker:l,map:c,mapboxgl:u,unsetActiveMarker:()=>this.setState({activeMarker:null})},l&&t&&(0,r.createElement)(a.Fragment,null,(0,r.createElement)(o.TextControl,{label:__("Marker Title","jetpack"),value:b,onChange:e=>f({title:e})}),(0,r.createElement)(o.TextareaControl,{className:"wp-block-jetpack-map__marker-caption",label:__("Marker Caption","jetpack"),value:v,rows:"2",tag:"textarea",onChange:e=>f({caption:e})}),(0,r.createElement)(o.Button,{onClick:d,className:"wp-block-jetpack-map__delete-btn"},(0,r.createElement)(o.Dashicon,{icon:"trash",size:"15"})," ",__("Delete Marker","jetpack"))),l&&!t&&(0,r.createElement)(a.Fragment,null,(0,r.createElement)("h3",null,b),(0,r.createElement)("p",null,v)));return(0,r.createElement)(a.Fragment,null,(0,r.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:n,children:r,points:o,mapStyle:a,mapDetails:i,scrollToZoom:s,showFullscreenButton:c}=this.props,{map:l,fullscreenControl:u}=this.state;n&&n.length>0&&n!==e.apiKey&&this.loadMapLibraries(),r!==e.children&&!1!==r&&this.clearCurrentMarker(),o!==e.points&&this.setBoundsByMarkers(),o.length!==e.points.length&&this.clearCurrentMarker(),a===e.mapStyle&&i===e.mapDetails||l.setStyle(this.getMapStyle()),s!==e.scrollToZoom&&(s?l.scrollZoom.enable():l.scrollZoom.disable()),c!==e.showFullscreenButton&&(c?(l.addControl(u),t&&u._fullscreenButton&&(u._fullscreenButton.disabled=!0)):l.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:n}=this.state,{index:r}=n.props,o=t.slice(0);(0,s.assign)(o[r],e),this.props.onSetPoints(o)};deleteActiveMarker=()=>{const{points:e}=this.props,{activeMarker:t}=this.state,{index:n}=t.props,r=e.slice(0);r.splice(n,1),this.props.onSetPoints(r),this.setState({activeMarker:null})};sizeMap=()=>{const{mapHeight:e}=this.props,{map:t}=this.state,n=this.mapRef.current;(0,d.Z)(n,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:n,points:r,zoom:o}=this.props,{map:a,activeMarker:i,mapboxgl:s,zoomControl:c,boundsSetProgrammatically:l}=this.state;if(!a)return;if(r.length&&e?a.dragPan.disable():a.dragPan.enable(),!r.length)return;if(i)return;const u=(0,p.YB)(s,r);if(t(u.getCenter()),r.length>1){(0,p.k)(a,u),this.setState({boundsSetProgrammatically:!0});try{a.removeControl(c)}catch(e){}}else{if(a.setCenter(u.getCenter()),l){const e=12;a.setZoom(e),n(e)}else a.setZoom(parseInt(o,10));a.addControl(c),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,c.bL)(this.mapRef.current),n={"mapbox-gl-js":()=>{(0,c.Dz)(t,"mapboxgl").then((t=>{t.accessToken=e,this.setState({mapboxgl:t},this.scriptsLoaded)}))}};(0,c.Pp)(l,n,this.mapRef.current)}initMap(e){const{mapboxgl:t}=this.state,{zoom:n,onMapLoaded:r,onError:o,scrollToZoom:a,showFullscreenButton:i,admin:s}=this.props;let c=null;try{c=new t.Map({container:this.mapRef.current,style:this.getMapStyle(),center:(0,p.b2)(e),zoom:parseInt(n,10),pitchWithRotate:!1,attributionControl:!1,dragRotate:!1})}catch(e){return void o("mapbox_error",e.message)}a||c.scrollZoom.disable();const l=new t.FullscreenControl;c.on("error",(e=>{o("mapbox_error",e.error.message)}));const u=new t.NavigationControl({showCompass:!1,showZoom:!0});c.on("zoomend",(()=>{this.props.onSetZoom(c.getZoom())})),c.on("moveend",(()=>{const{onSetMapCenter:e,points:t}=this.props;t.length<1&&e(c.getCenter())})),c.getCanvas().addEventListener("click",this.onMapClick),this.setState({map:c,zoomControl:u,fullscreenControl:l},(()=>{this.debouncedSizeMap(),c.addControl(u),i&&(c.addControl(l),s&&l._fullscreenButton&&(l._fullscreenButton.disabled=!0)),this.mapRef.current.addEventListener("alignmentChanged",this.debouncedSizeMap),c.resize(),r(),this.setState({loaded:!0}),window.addEventListener("resize",this.debouncedSizeMap)}))}}f.defaultProps={points:[],mapStyle:"default",zoom:13,onSetZoom:()=>{},onSetMapCenter:()=>{},onMapLoaded:()=>{},onMarkerClick:()=>{},onError:()=>{},markerColor:"red",apiKey:null,mapCenter:{},address:null},t.Z=f},99128:function(e,t,n){"use strict";var r=n(51806),o=n(69307),a=n(92819),i=n(32037),s=n(72672),c=n(96442),l=n(75385);const u=(0,o.forwardRef)(((e,t)=>{const{admin:n,points:c,onError:u,onSetPoints:d}=e,{loaded:m,error:h,mapkit:f,currentDoc:g,currentWindow:b}=(0,s.eV)(t),{map:v}=(0,s.$M)(f,m,t),k=o.Children.map(e.children,(e=>{if("AddPoint"===(0,a.get)(e,"props.tagName"))return e}));return(0,o.useEffect)((()=>{h&&u("mapkit_error",h)}),[h,u]),(0,r.createElement)(i.c,{value:{mapkit:f,map:v,loaded:m,currentDoc:g,currentWindow:b,admin:n,points:c,setPoints:d}},m&&f&&v?(0,r.createElement)(p,e):null,(0,r.createElement)("div",{style:{height:e.mapHeight?`${e.mapHeight}px`:"400px"},className:"wp-block-jetpack-map__gm-container",ref:t}),k,(0,r.createElement)(l.Z,{mapProvider:"mapkit"}))})),p=(0,o.memo)((e=>{let{address:t,mapCenter:n,mapStyle:r,zoom:a,onSetMapCenter:i,onSetZoom:l,onSetPoints:u,points:p,markerColor:d,onMarkerClick:m,onMapLoaded:h}=e;const{map:f,mapkit:g,setActiveMarker:b,setPreviousCenter:v,setCalloutReference:k,currentDoc:y}=(0,s.qw)(),w=(0,o.useRef)(m),E=(0,o.useRef)(u),_=(0,o.useCallback)((e=>{b(e),v(f.center),w.current&&w.current(e),f.setCenterAnimated(new g.Coordinate(e.coordinates.latitude,e.coordinates.longitude))}),[f,g,b,v,w]);return(0,s.LO)(n,i),(0,s.Xj)(r),(0,s.zZ)(a,l),(0,s.J2)(p,d,(0,c.eR)(y,k),_),(0,s.jo)(h),(0,s.mk)((e=>{b(null),e&&f.setCenterAnimated(e)})),(0,s.wd)(t,E),null}));u.defaultProps={points:[],mapStyle:"default",zoom:13,onSetZoom:()=>{},onSetMapCenter:()=>{},onMapLoaded:()=>{},onMarkerClick:()=>{},onError:()=>{},markerColor:"red",mapCenter:{},address:null},t.Z=u},53036:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(55609),i=n(65736),s=n(57897),c=n(82695);const __=i.__;t.Z=e=>{let{attributes:t,setAttributes:n,state:i,setState:l,context:u,mapRef:p,instanceId:d,minHeight:m,removeAPIKey:h,updateAPIKey:f,setPointVisibility:g,mapProvider:b}=e;const v=e=>{n({align:e}),p.current?.sizeMap&&setTimeout(p.current.sizeMap,0)};return"toolbar"===u?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BlockAlignmentToolbar,{value:t.align,onChange:v,controls:["center","wide","full"]}),(0,r.createElement)(a.ToolbarGroup,null,(0,r.createElement)(a.ToolbarButton,{icon:c.X.markerIcon,label:__("Add a marker","jetpack"),onClick:g}))):(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelColorSettings,{title:__("Colors","jetpack"),initialOpen:!0,colorSettings:[{value:t.markerColor,onChange:e=>n({markerColor:e}),label:__("Marker Color","jetpack")}]}),(0,r.createElement)(a.PanelBody,{title:__("Map Settings","jetpack")},(0,r.createElement)(a.BaseControl,{label:__("Height in pixels","jetpack"),id:`block-jetpack-map-height-input-${d}`},(0,r.createElement)("input",{type:"number",id:`block-jetpack-map-height-input-${d}`,className:"wp-block-jetpack-map__height_input",onChange:e=>{n({mapHeight:e.target.value}),e.target!==document.activeElement&&p.current&&setTimeout(p.current.sizeMap,0)},onBlur:e=>{const{mapHeight:r}=t;let o=parseInt(e.target.value,10);if(isNaN(o))o=null;else if(null==r){const e=p?.current?.mapRef??p;o=e?.current.offsetHeight}else o<m&&(o=m);n({mapHeight:o}),p.current.sizeMap&&setTimeout(p.current.sizeMap,0)},value:t.mapHeight||"",min:m,step:"10"})),(0,r.createElement)(a.RangeControl,{label:__("Zoom level","jetpack"),help:t.points.length>1&&__("The default zoom level cannot be changed when there are two or more markers on the map.","jetpack"),disabled:t.points.length>1,value:Math.round(t.zoom),onChange:e=>{n({zoom:e}),p.current&&p.current.updateZoom&&setTimeout(p.current.updateZoom,0)},min:0,max:22}),"mapbox"===b?(0,r.createElement)(a.ToggleControl,{label:__("Show street names","jetpack"),checked:t.mapDetails,onChange:e=>n({mapDetails:e})}):null,(0,r.createElement)(a.ToggleControl,{label:__("Scroll to zoom","jetpack"),help:__("Allow the map to capture scrolling, and zoom in or out.","jetpack"),checked:t.scrollToZoom,onChange:e=>n({scrollToZoom:e})}),"mapbox"===b?(0,r.createElement)(a.ToggleControl,{label:__("Show Fullscreen Button","jetpack"),help:__("Allow your visitors to display the map in fullscreen.","jetpack"),checked:t.showFullscreenButton,onChange:e=>n({showFullscreenButton:e})}):null),t.points.length?(0,r.createElement)(a.PanelBody,{title:__("Markers","jetpack"),initialOpen:!1},(0,r.createElement)(s.Z,{points:t.points,onChange:e=>{n({points:e})}})):null,"mapbox"===b?(0,r.createElement)(a.PanelBody,{title:__("Mapbox Access Token","jetpack"),initialOpen:!1},(0,r.createElement)(a.TextControl,{help:"wpcom"===i.apiKeySource&&(0,r.createElement)(r.Fragment,null,__("You can optionally enter your own access token.","jetpack")," ",(0,r.createElement)(a.ExternalLink,{href:"https://account.mapbox.com/access-tokens/"},__("Find it on Mapbox","jetpack"))),label:__("Mapbox Access Token","jetpack"),value:i.apiKeyControl,onChange:e=>l({apiKeyControl:e})}),(0,r.createElement)(a.ButtonGroup,null,(0,r.createElement)(a.Button,{type:"button",onClick:f,disabled:!i.apiKeyControl||i.apiKeyControl===i.apiKey},__("Update Token","jetpack")),(0,r.createElement)(a.Button,{type:"button",onClick:h,disabled:"wpcom"===i.apiKeySource,variant:"secondary"},__("Remove Token","jetpack")))):null)}},55109:function(e,t,n){"use strict";var r=n(85888);t.Z={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:n,...r}=e;return{...r,showFullscreenButton:!0,className:t}},save:r.Z}},85888:function(e,t,n){"use strict";var r=n(51806),o=n(69307);class a extends o.Component{render(){const{attributes:e}=this.props,{align:t,mapStyle:n,mapDetails:o,points:a,zoom:i,mapCenter:s,markerColor:c,scrollToZoom:l,mapHeight:u}=e,p=a.map(((e,t)=>{const{longitude:n,latitude:o}=e.coordinates,a="https://www.google.com/maps/search/?api=1&query="+o+","+n;return(0,r.createElement)("li",{key:t},(0,r.createElement)("a",{href:a},e.title))})),d=t?`align${t}`:null;return(0,r.createElement)("div",{className:d,"data-map-style":n,"data-map-details":o,"data-points":JSON.stringify(a),"data-zoom":i,"data-map-center":JSON.stringify(s),"data-marker-color":c,"data-scroll-to-zoom":l||null,"data-map-height":u||null},a.length>0&&(0,r.createElement)("ul",null,p))}}t.Z=a},45051:function(e,t,n){"use strict";var r=n(95382);t.Z={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:n,...r}=e;return{...r,className:t}},save:r.Z}},95382:function(e,t,n){"use strict";var r=n(51806),o=n(69307);class a extends o.Component{render(){const{attributes:e}=this.props,{align:t,mapStyle:n,mapDetails:o,points:a,zoom:i,mapCenter:s,markerColor:c,scrollToZoom:l,mapHeight:u,showFullscreenButton:p}=e,d=a.map(((e,t)=>{const{longitude:n,latitude:o}=e.coordinates,a="https://www.google.com/maps/search/?api=1&query="+o+","+n;return(0,r.createElement)("li",{key:t},(0,r.createElement)("a",{href:a},e.title))})),m=t?`align${t}`:null;return(0,r.createElement)("div",{className:m,"data-map-style":n,"data-map-details":o,"data-points":JSON.stringify(a),"data-zoom":i,"data-map-center":JSON.stringify(s),"data-marker-color":c,"data-scroll-to-zoom":l||null,"data-map-height":u||null,"data-show-fullscreen-button":p||null},a.length>0&&(0,r.createElement)("ul",null,d))}}t.Z=a},740:function(e,t,n){"use strict";var r=n(51806),o=n(86989),a=n.n(o),i=n(52175),s=n(55609),c=n(94333),l=n(9818),u=n(69307),p=n(65736),d=n(81518),m=n(2944),h=n(75890),f=n(53036),g=n(1555),b=n(96406),v=n(82695),k=n(32566);const __=p.__,y={top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1};class w extends u.Component{constructor(){super(...arguments),this.state={addPointVisibility:!1,apiState:0},this.mapRef=(0,u.createRef)()}geoCodeAddress=(e,t)=>{t&&"mapkit"!==this.getMapProvider()&&(0,g.P)(e,t).then((e=>{if(e.features?.length){const t=e.features[0],n=[{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:n})}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,n=e.attributes?.address,r=this.props.attributes?.className,o=e.attributes?.className;t&&n!==t&&this.geoCodeAddress(t,this.state.apiKey),r&&o!==r&&!this.state.apiKey&&(this.setState({apiState:0}),this.apiCall())};addPoint=e=>{const{attributes:t,setAttributes:n}=this.props,{points:r}=t,o=r.slice(0);let a=!1;r.map((t=>{t.id===e.id&&(a=!0)})),a||(o.push(e),n({points:o}),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(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET";return new Promise(((n,r)=>{const{noticeOperations:o}=this.props,i="/wpcom/v2/service-api-keys/mapbox",s=e?{path:i,method:t,data:{service_api_key:e}}:{path:i,method:t};this.setState({apiRequestOutstanding:!0},(()=>{a()(s).then((e=>{let{service_api_key:t,service_api_key_source:r}=e;o.removeAllNotices();const a=t?2:1,i="wpcom"===r?"":t;this.setState({apiState:a,apiKey:t,apiKeyControl:i,apiKeySource:r,apiRequestOutstanding:!1}),n()}),(e=>{let{message:t}=e;this.onError(null,t),this.setState({apiState:1,apiRequestOutstanding:!1}),r()}))}))}))}getMapProvider=()=>{const e=(0,d.t)(v.X.styles,this.props?.attributes?.className);return(0,k.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:n}=this.props;n.removeAllNotices(),n.createErrorNotice(t)};onMapResize=(e,t,n,r)=>{const{onResizeStop:o,setAttributes:a}=this.props;o();const i=this.mapRef?.current?.mapRef??this.mapRef;if(i){a({mapHeight:parseInt(i.current.offsetHeight+r.height,10)}),i.current.sizeMap&&setTimeout(i.current.sizeMap,0)}};render(){const{className:e,setAttributes:t,attributes:n,noticeUI:o,notices:a,isSelected:c,instanceId:l,onResizeStart:p}=this.props,{address:g,mapDetails:k,points:w,zoom:E,mapCenter:_,markerColor:C,preview:S,mapHeight:j,showFullscreenButton:x}=n,{addPointVisibility:L,apiKey:P,apiKeyControl:A,apiState:T,apiRequestOutstanding:N}=this.state,M=this.getMapProvider(),I=(0,r.createElement)(u.Fragment,null,(0,r.createElement)(i.BlockControls,null,(0,r.createElement)(f.Z,{attributes:n,setAttributes:t,state:this.state,setPointVisibility:this.setPointVisibility,context:"toolbar",mapRef:this.mapRef,mapProvider:M})),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(f.Z,{attributes:n,setAttributes:t,state:this.state,setState:this.setState,mapRef:this.mapRef,instanceId:l,minHeight:400,removeAPIKey:this.removeAPIKey,updateAPIKey:this.updateAPIKey,mapProvider:M}))),R=(0,r.createElement)(s.Placeholder,{icon:v.X.icon},(0,r.createElement)(s.Spinner,null)),Z=(0,r.createElement)(u.Fragment,null,__("To use the map block, you need an Access Token.","jetpack"),(0,r.createElement)("br",null),(0,r.createElement)(s.ExternalLink,{href:"https://www.mapbox.com"},__("Create an account or log in to Mapbox.","jetpack")),(0,r.createElement)("br",null),__("Locate and copy the default access token. Then, paste it into the field below.","jetpack")),D=(0,r.createElement)(s.Placeholder,{icon:v.X.icon,label:__("Map","jetpack"),notices:a,instructions:Z},(0,r.createElement)(u.Fragment,null,(0,r.createElement)("form",null,(0,r.createElement)("input",{type:"text",className:"components-placeholder__input",disabled:N,placeholder:__("Paste Token Here","jetpack"),value:A,onChange:this.updateAPIKeyControl}),(0,r.createElement)(s.Button,{variant:"secondary",disabled:N||!A||A.length<1,onClick:this.updateAPIKey},__("Set Token","jetpack"))))),B=c&&w.length<=1,F=(0,d.t)(v.X.styles,n.className),O=(0,r.createElement)(u.Fragment,null,I,(0,r.createElement)("div",{className:e},(0,r.createElement)(s.ResizableBox,{size:{height:j||"auto",width:"100%"},grid:[10,10],showHandle:c,minHeight:400,enable:y,onResizeStart:p,onResizeStop:this.onMapResize},(0,r.createElement)("div",{className:"wp-block-jetpack-map__map_wrapper"},(0,r.createElement)(h.Z,{ref:this.mapRef,address:g,scrollToZoom:B,showFullscreenButton:x,mapStyle:F||"default",mapDetails:k,mapHeight:j,points:w,zoom:E,mapCenter:_,markerColor:C,onSetZoom:e=>{t({zoom:e})},admin:!0,apiKey:P,onSetPoints:e=>t({points:e}),onSetMapCenter:e=>t({mapCenter:e}),onMapLoaded:()=>this.setState({addPointVisibility:!w.length}),onMarkerClick:()=>this.setState({addPointVisibility:!1}),onError:this.onError,mapProvider:M},c&&L&&(0,r.createElement)(m.Z,{onAddPoint:this.addPoint,onClose:()=>this.setState({addPointVisibility:!1}),apiKey:P,onError:this.onError,tagName:"AddPoint",mapProvider:M})))))),U=v.X.styles.find((e=>e.name===F)),z=(0,r.createElement)("div",null,(0,r.createElement)("img",{alt:__("Map Preview","jetpack"),src:U?U.preview:b}));return(0,r.createElement)(u.Fragment,null,o,S&&z,!S&&0===T&&R,!S&&1===T&&D,!S&&2===T&&O)}}t.Z=(0,c.compose)([s.withNotices,(0,l.withDispatch)((e=>{const{toggleSelection:t}=e("core/block-editor");return{onResizeStart:()=>t(!1),onResizeStop:()=>t(!0)}}))])(w)},22055:function(e,t,n){"use strict";var r=n(31985),o=n(85406);(0,r.Z)(o.u,o.X)},1555:function(e,t,n){"use strict";function r(e,t){return fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURIComponent(e)}.json?access_token=${encodeURIComponent(t)}`).then((e=>e.json()))}n.d(t,{P:function(){return r}})},85406:function(e,t,n){"use strict";n.d(t,{X:function(){return u},u:function(){return l}});var r=n(70355),o=n(55109),a=n(45051),i=n(740),s=n(19496),c=n(82695);const{name:l}=c.X,u={title:c.X.title,icon:{src:c.X.icon,foreground:(0,r.m)()},category:c.X.category,keywords:c.X.keywords,description:c.X.description,attributes:c.X.attributes,supports:c.X.supports,styles:c.X.styles,getEditWrapperProps(e){const{align:t}=e;if(-1!==c.X.validAlignments.indexOf(t))return{"data-align":t}},edit:i.Z,save:s.Z,example:c.X.example,deprecated:[a.Z,o.Z]}},31852:function(e,t,n){"use strict";var r=n(51806),o=n(3142),a=n(3156);t.Z=e=>{const t="mapbox"===e.mapProvider?o.Z:a.Z;return(0,r.createElement)(t,e)}},3142:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(96881);const c=(0,i.__)("Add a marker…","jetpack");class l extends a.Component{constructor(){super(...arguments),this.textRef=(0,a.createRef)(),this.containerRef=(0,a.createRef)(),this.state={isEmpty:!0},this.autocompleter={name:"placeSearch",options:this.search,isDebounced:!0,getOptionLabel:e=>(0,r.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,n={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(n),t.text};search=e=>{const{apiKey:t,onError:n}=this.props,r="https://api.mapbox.com/geocoding/v5/mapbox.places/"+encodeURI(e)+".json?access_token="+t;return new Promise((function(e,t){const o=new XMLHttpRequest;o.open("GET",r),o.onload=function(){if(200===o.status){const t=JSON.parse(o.responseText);e(t.features)}else{const e=JSON.parse(o.responseText);n(e.statusText,e.responseJSON.message),t(new Error("Mapbox Places Error"))}},o.send()}))};onReset=()=>{this.textRef.current.value=null};render(){const{label:e}=this.props;return(0,r.createElement)("div",{ref:this.containerRef},(0,r.createElement)(o.BaseControl,{label:e,className:"components-location-search"},(0,r.createElement)(s.Z,{completer:this.autocompleter,onReset:this.onReset},(e=>{let{isExpanded:t,listBoxId:n,activeId:a,onChange:i,onKeyDown:s}=e;return(0,r.createElement)(o.TextControl,{placeholder:c,ref:this.textRef,onChange:i,"aria-expanded":t,"aria-owns":n,"aria-activedescendant":a,onKeyDown:s})}))))}}l.defaultProps={onError:()=>{}},t.Z=l},3156:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(96881),c=n(72672);const l=(0,i.__)("Add a marker…","jetpack");t.Z=e=>{let{label:t,onAddPoint:n}=e;const i=(0,a.useRef)(),u=(0,a.useRef)(),{mapkit:p}=(0,c.qw)(),d={name:"placeSearch",options:async e=>new Promise((function(t,n){new p.Search({includePointsOfInterest:!1}).autocomplete(e,((e,r)=>{if(e)return void n(e);const o=(r?.results.filter((e=>e.coordinate))??[]).map((e=>({...e,placeName:e.displayLines?.join(", ")})));t(o)}))})),isDebounced:!0,getOptionLabel:e=>(0,r.createElement)("span",null,e.placeName),getOptionKeywords:e=>[e.placeName],getOptionCompletion:e=>{const{value:t}=e,r={placeTitle:t.placeName,title:t.placeName,caption:t.placeName,coordinates:{longitude:t.coordinate.longitude,latitude:t.coordinate.latitude},id:`${t.placeName} ${Number(t.coordinate.latitude).toFixed(2)} ${Number(t.coordinate.longitude).toFixed(2)}`};return n(r),t.placeName}};return(0,a.useEffect)((()=>{setTimeout((()=>{i.current.querySelector("input").focus()}),50)}),[]),(0,r.createElement)("div",{ref:i},(0,r.createElement)(o.BaseControl,{label:t,className:"components-location-search"},(0,r.createElement)(s.Z,{completer:d,onReset:()=>{u.current.value=""}},(e=>{let{isExpanded:t,listBoxId:n,activeId:a,onChange:i,onKeyDown:s}=e;return(0,r.createElement)(o.TextControl,{placeholder:l,ref:u,onChange:i,"aria-expanded":t,"aria-owns":n,"aria-activedescendant":a,onKeyDown:s})}))))}},57897:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307);class i extends a.Component{constructor(){super(...arguments),this.state={selectedCell:null}}onDeletePoint=e=>{const t=parseInt(e.target.getAttribute("data-id")),{points:n,onChange:r}=this.props,o=n.slice(0);o.splice(t,1),r(o)};setMarkerField(e,t,n){const{points:r,onChange:o}=this.props,a=r.slice(0);a[n][e]=t,o(a)}render(){const{points:e}=this.props,t=e.map(((e,t)=>(0,r.createElement)(o.PanelBody,{title:e.placeTitle,key:e.id,initialOpen:!1},(0,r.createElement)(o.TextControl,{label:"Marker Title",value:e.title,onChange:e=>this.setMarkerField("title",e,t)}),(0,r.createElement)(o.TextareaControl,{label:"Marker Caption",value:e.caption,rows:"3",onChange:e=>this.setMarkerField("caption",e,t)}),(0,r.createElement)(o.Button,{"data-id":t,onClick:this.onDeletePoint,className:"component__locations__delete-btn"},(0,r.createElement)(o.Dashicon,{icon:"trash",size:"15"})," Delete Marker"))));return(0,r.createElement)("div",{className:"component__locations"},(0,r.createElement)(o.Panel,{className:"component__locations__panel"},t))}}i.defaultProps={points:Object.freeze([]),onChange:()=>{}},t.Z=i},96881:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(94333),i=n(69307),s=n(65736),c=n(39630),l=n(65235),u=n.n(l),p=n(92819);const __=s.__,_n=s._n;function d(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const n=[];for(let r=0;r<e.length;r++){const o=e[r];let{keywords:a=[]}=o;if("string"==typeof o.label&&(a=[...a,o.label]),n.push(o),n.length===t)break}return n}class m extends i.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:n}=e,r=this.activePromise=Promise.resolve("function"==typeof n?n(t):n).then((t=>{if(r!==this.activePromise)return;const n=t.map(((t,n)=>({key:`${n}`,value:t,label:e.getOptionLabel(t),keywords:e.getOptionKeywords?e.getOptionKeywords(t):[]}))),o=d(n),a=o.length===this.state.filteredOptions.length?this.state.selectedIndex:0;this.setState({options:n,filteredOptions:o,selectedIndex:a,isOpen:o.length>0}),this.announce(o)}))}onChange=e=>{const{completer:t}=this.props,{options:n}=this.state;if(!e)return void this.reset();t&&(t.isDebounced?this.debouncedLoadOptions(t,e):this.loadOptions(t,e));const r=t?d(n):[];t&&this.setState({selectedIndex:0,filteredOptions:r,query:e})};onKeyDown=e=>{const{isOpen:t,selectedIndex:n,filteredOptions:r}=this.state;if(!t)return;let o;switch(e.keyCode){case c.UP:o=(0===n?r.length:n)-1,this.setState({selectedIndex:o});break;case c.DOWN:o=(n+1)%r.length,this.setState({selectedIndex:o});break;case c.ENTER:this.select(r[n]);break;case c.LEFT:case c.RIGHT:case c.ESCAPE:return void this.reset();default:return}e.preventDefault(),e.stopPropagation()};announce(e){const{debouncedSpeak:t}=this.props;t&&(e.length?t((0,s.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:n,instanceId:a,completer:i}=this.props,{selectedIndex:s,filteredOptions:c}=this.state,{key:l=""}=c[s]||{},{className:d}=i,m=c.length>0,h=m?`components-autocomplete-listbox-${a}`:null,f=m?`components-autocomplete-item-${a}-${l}`:null;return(0,r.createElement)("div",{className:"components-autocomplete"},n({isExpanded:m,listBoxId:h,activeId:f,onChange:e,onKeyDown:t}),m&&(0,r.createElement)(o.Popover,{focusOnMount:!1,onClose:this.reset,position:"top center",className:"components-autocomplete__popover",noArrow:!0},(0,r.createElement)("div",{id:h,role:"listbox",className:"components-autocomplete__results"},(0,p.map)(c,((e,t)=>(0,r.createElement)(o.Button,{key:e.key,id:`components-autocomplete-item-${a}-${e.key}`,role:"option","aria-selected":t===s,disabled:e.isDisabled,className:u()("components-autocomplete__result",d,{"is-selected":t===s}),onClick:()=>this.select(e)},e.label))))))}}t.Z=(0,a.compose)([o.withSpokenMessages,a.withInstanceId,o.withFocusOutside])(m)},90055:function(e,t,n){"use strict";function r(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"]}n.d(t,{h:function(){return r}})},84634:function(e,t,n){"use strict";n.d(t,{YB:function(){return o},b2:function(){return r},k:function(){return a},xt:function(){return s},zb:function(){return i}});const r=e=>e.hasOwnProperty("lat")&&e.hasOwnProperty("lng")?e:{lat:e.latitude||0,lng:e.longitude||0};function o(e,t){const n=new e.LngLatBounds;return t.forEach((e=>{n.extend([e.coordinates.longitude,e.coordinates.latitude])})),n}function a(e,t){e.fitBounds(t,{padding:{top:80,bottom:80,left:40,right:40}})}function i(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 s(e){return new e.Popup({closeButton:!0,closeOnClick:!1,offset:{left:[0,0],top:[0,5],right:[0,0],bottom:[0,-40]}})}},96442:function(e,t,n){"use strict";n.d(t,{E0:function(){return p},E_:function(){return s},F7:function(){return c},eR:function(){return l},ot:function(){return i},rZ:function(){return u}});var r=n(85007);const o=6371e3;function a(e){return Math.abs(o*Math.cos(e*Math.PI/180)*2*Math.PI/256)}function i(e,t){return 512/Math.pow(2,e)*.5*a(t)}function s(e,t){const n=e/a(t);return Math.log2(512/(n/.5))}function c(e,t){if(0===t.length)return null;const n=new e.Coordinate(-90,180),r=new e.Coordinate(90,-180);t.forEach((e=>{n.latitude=Math.max(n.latitude,e.coordinates.latitude),n.longitude=Math.min(n.longitude,e.coordinates.longitude),r.latitude=Math.min(r.latitude,e.coordinates.latitude),r.longitude=Math.max(r.longitude,e.coordinates.longitude)}));const o=new e.Coordinate(n.latitude-.5*(n.latitude-r.latitude),n.longitude+.5*(r.longitude-n.longitude)),a=new e.CoordinateSpan(1.3*Math.abs(n.latitude-r.latitude),1.3*Math.abs(r.longitude-n.longitude));return new e.CoordinateRegion(o,a)}function l(e,t){return()=>{const n=e.createElement("div");return n.classList.add("mapkit-popup-content"),t(n),n}}function u(e,t){return new Promise((n=>{if(t.mapkitScriptIsLoading)(0,r.Dz)(t,"mapkit").then((e=>{n(e)}));else{t.mapkitScriptIsLoading=!0;const o=e.createElement("script");o.addEventListener("load",(async()=>{const e=await(0,r.Dz)(t,"mapkit");t.mapkitScriptIsLoading=!1,n(e)}),{once:!0}),o.src="https://cdn.apple-mapkit.com/mk/5.x.x/mapkit.js",o.crossOrigin="anonymous",e.head.appendChild(o)}}))}function p(e,t,n){return new Promise(((t,r)=>{n.mapkitIsInitialized?t():n.mapkitIsInitializing?function(e){return new Promise(((t,n)=>{const r=()=>{void 0===e.mapkitIsInitializing?n():!1===e.mapkitIsInitializing?t():e.requestAnimationFrame(r)};r()}))}(n).then((()=>{t()})):(n.mapkitIsInitializing=!0,n.mapkitIsInitialized=!1,e.init({authorizationCallback:async e=>{try{const o=await fetch("https://public-api.wordpress.com/wpcom/v2/mapkit");if(200===o.status){e((await o.json()).wpcom_mapkit_access_token)}else r();n.mapkitIsInitializing=!1,n.mapkitIsInitialized=!0,t()}catch(e){r()}}}))}))}},32037:function(e,t,n){"use strict";n.d(t,{L:function(){return a},c:function(){return i}});var r=n(51806),o=n(69307);const a=(0,o.createContext)({map:null,mapkit:null,loaded:!1,activeMarker:null,calloutReference:null,currentDoc:null,currentWindow:null,admin:!1,setPoints:()=>{},points:[],previousCenter:null}),i=e=>{let{value:t,children:n}=e;const[i,s]=(0,o.useState)(null),[c,l]=(0,o.useState)(null),[u,p]=(0,o.useState)(null);return(0,r.createElement)(a.Provider,{value:{...t,activeMarker:i,setActiveMarker:s,calloutReference:c,setCalloutReference:l,previousCenter:u,setPreviousCenter:p}},n)}},72672:function(e,t,n){"use strict";n.d(t,{$M:function(){return m},J2:function(){return b},LO:function(){return h},Xj:function(){return f},eV:function(){return d},jo:function(){return v},mk:function(){return k},qw:function(){return p},wd:function(){return y},zZ:function(){return g}});var r=n(80428),o=n(9818),a=n(69307),i=n(65736),s=n(92819),c=n(85007),l=n(96442),u=n(32037);const __=i.__,p=()=>(0,a.useContext)(u.L),d=e=>{const[t,n]=(0,a.useState)(!1),[i,s]=(0,a.useState)(!1),[u,p]=(0,a.useState)(null),[d,m]=(0,a.useState)(null),[h,f]=(0,a.useState)(null);return(0,a.useEffect)((()=>{const t=(0,o.select)(r.t).getBlogId(),{currentDoc:a,currentWindow:i}=(0,c.bL)(e.current);if(e.current){m(i),f(a);const e=__("Failed to retrieve a Mapkit API token. Please try refreshing.","jetpack");i.mapkit?(p(i.mapkit),(0,l.E0)(i.mapkit,t,i).then((()=>{n(!0)}),(()=>{s(e)}))):(0,l.rZ)(a,i).then((r=>{p(r),(0,l.E0)(r,t,i).then((()=>{n(!0)}),(()=>{s(e)}))}))}}),[e]),{loaded:t,error:i,mapkit:u,currentDoc:h,currentWindow:d}},m=(e,t,n)=>{const[r,o]=(0,a.useState)(null);return(0,a.useEffect)((()=>{e&&t&&o(new e.Map(n.current,{showsMapTypeControl:!1}))}),[e,t,n]),{map:r}},h=(e,t)=>{const{mapkit:n,map:r}=p(),o=(0,a.useRef)(e),i=(0,a.useRef)(t);(0,a.useEffect)((()=>{if(!n||!r||!o.current)return;const e=o.current?.lat??o.current?.latitude,t=o.current?.lng??o.current?.longitude;"number"==typeof e&&"number"==typeof t&&(r.center=new n.Coordinate(e,t))}),[n,r,o]),(0,a.useEffect)((()=>{if(!n||!r)return;const e=()=>{if(r.center){const{latitude:e,longitude:t}=r.center;i.current({lat:e,lng:t})}};return r.addEventListener("region-change-end",(0,s.debounce)(e,1e3)),()=>{r.removeEventListener("region-change-end",e)}}),[n,r,i])},f=e=>{const{mapkit:t,map:n}=p();(0,a.useEffect)((()=>{t&&n&&(n.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,n,e])},g=(e,t)=>{const{mapkit:n,map:r,points:o}=p();(0,a.useEffect)((()=>{if(n&&r)if(o&&o.length<=1){const t=(0,l.ot)(13,r.center.latitude);if(e){const t=(0,l.ot)(e,r.center.latitude);t!==r.cameraDistance&&(r.cameraDistance=t)}else t!==r.cameraDistance&&(r.cameraDistance=t);r.isZoomEnabled=!0,r.isScrollEnabled=!0}else r.region=(0,l.F7)(n,o),r.isZoomEnabled=!1,r.isScrollEnabled=!1}),[n,r,e,o]),(0,a.useEffect)((()=>{const e=()=>{t((0,l.E_)(r.cameraDistance,r.center.latitude))};return r.addEventListener("zoom-end",e),()=>{r.removeEventListener("zoom-end",e)}}),[n,r,t])},b=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const{mapkit:o,map:i,loaded:s}=p(),c=(0,a.useRef)(n),l=(0,a.useRef)(r);(0,a.useEffect)((()=>{if(s){i.annotations.filter((t=>!e.find((e=>e.id===t.data.id)))).forEach((e=>i.removeAnnotation(e)));const n=e.map((e=>{const n=i.annotations.find((t=>t.data.id===e.id));if(n)return n.title=e.title,n.color=t,n;const r=new o.MarkerAnnotation(new o.Coordinate(e.coordinates.latitude,e.coordinates.longitude),{color:t,data:{id:e.id}});return r.calloutEnabled=!0,r.title=e.title,c.current&&(r.callout={calloutElementForAnnotation:c.current}),l.current&&r.addEventListener("select",(()=>l.current(e,i))),r}));i.annotations.length!==n.length&&i.showItems(n)}}),[e,s,i,o,t,c,l])},v=e=>{const{map:t,loaded:n}=p(),r=(0,a.useRef)(e);(0,a.useEffect)((()=>{n&&r.current(t)}),[n,t,r])},k=e=>{const{map:t,previousCenter:n,loaded:r}=p(),o=(0,a.useRef)(e);(0,a.useEffect)((()=>{r&&t.addEventListener("single-tap",(()=>{o.current(n)}))}),[r,t,n,o])},y=(e,t)=>{const{mapkit:n,map:r}=p();(0,a.useEffect)((()=>{if(n&&r&&e?.length){(new n.Geocoder).lookup(e,((e,n)=>{if(n?.results?.length){const e=n.results[0],r=e.formattedAddress,o={placeTitle:r,title:r,caption:r,coordinates:{longitude:e.coordinate.longitude,latitude:e.coordinate.latitude},id:`${r} ${Number(e.coordinate.latitude).toFixed(2)} ${Number(e.coordinate.longitude).toFixed(2)}`};t.current([o])}}))}}),[n,r,e,t])}},19496:function(e,t,n){"use strict";var r=n(51806),o=n(69307),a=n(81518),i=n(82695);class s extends o.Component{render(){const{attributes:e}=this.props,{align:t,className:n,mapDetails:o,points:s,zoom:c,mapCenter:l,markerColor:u,scrollToZoom:p,mapHeight:d,showFullscreenButton:m}=e,h=(0,a.t)(i.X.styles,n),f=s.map(((e,t)=>{const{longitude:n,latitude:o}=e.coordinates,a="https://www.google.com/maps/search/?api=1&query="+o+","+n;return(0,r.createElement)("li",{key:t},(0,r.createElement)("a",{href:a},e.title))})),g=t?`align${t}`:null;return(0,r.createElement)("div",{className:g,"data-map-style":h,"data-map-details":o,"data-points":JSON.stringify(s),"data-zoom":c,"data-map-center":JSON.stringify(l),"data-marker-color":u,"data-scroll-to-zoom":p||null,"data-map-height":d||null,"data-show-fullscreen-button":m||null},s.length>0&&(0,r.createElement)("ul",null,f))}}t.Z=s},82695:function(e,t,n){"use strict";n.d(t,{X:function(){return h}});var r=n(51806),o=n(65736),a=n(80469),i=n(7247),s=n(13925),c=n(24873),l=n(25685),u=n(81667),p=n(15387),d=n(32566);const __=o.__,_x=o._x,m=(0,d.Z)(),h={name:"map",prefix:"jetpack",title:__("Map","jetpack"),icon:(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},(0,r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)("path",{d:"M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM10 5.47l4 1.4v11.66l-4-1.4V5.47zm-5 .99l3-1.01v11.7l-3 1.16V6.46zm14 11.08l-3 1.01V6.86l3-1.16v11.84z"})),category:"embed",keywords:[_x("maps","block search term","jetpack"),_x("location","block search term","jetpack"),_x("navigation","block search term","jetpack")],description:__("Add an interactive map showing one or more locations.","jetpack"),attributes:{align:{type:"string"},points:{type:"array",default:[]},address:{type:"string",default:""},mapDetails:{type:"boolean",default:!0},zoom:{type:"integer",default:13},mapCenter:{type:"object",default:{longitude:-122.41941550000001,latitude:37.7749295}},markerColor:{type:"string",default:"red"},preview:{type:"boolean",default:!1},scrollToZoom:{type:"boolean",default:!1},mapHeight:{type:"integer"},showFullscreenButton:{type:"boolean",default:!0}},supports:{defaultStylePicker:!1,html:!1},styles:[{name:"default",label:__("Basic","jetpack"),preview:"mapkit"===m?c:s,isDefault:!0},{name:"black_and_white",label:"mapkit"===m?__("Muted","jetpack",0):__("Black & White","jetpack"),preview:"mapkit"===m?i:a},{name:"satellite",label:__("Satellite","jetpack"),preview:"mapkit"===m?u:l},{name:"terrain",label:__("Terrain","jetpack"),preview:p}],validAlignments:["center","wide","full"],markerIcon:(0,r.createElement)("svg",{width:"14",height:"20",viewBox:"0 0 14 20",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)("g",{id:"Page-1",fill:"none",fillRule:"evenodd"},(0,r.createElement)("g",{id:"outline-add_location-24px",transform:"translate(-5 -2)"},(0,r.createElement)("polygon",{id:"Shape",points:"0 0 24 0 24 24 0 24"}),(0,r.createElement)("path",{d:"M12,2 C8.14,2 5,5.14 5,9 C5,14.25 12,22 12,22 C12,22 19,14.25 19,9 C19,5.14 15.86,2 12,2 Z M7,9 C7,6.24 9.24,4 12,4 C14.76,4 17,6.24 17,9 C17,11.88 14.12,16.19 12,18.88 C9.92,16.21 7,11.85 7,9 Z M13,6 L11,6 L11,8 L9,8 L9,10 L11,10 L11,12 L13,12 L13,10 L15,10 L15,8 L13,8 L13,6 Z",id:"Shape",fill:"#000",fillRule:"nonzero"})))),example:{attributes:{preview:!0}}}},32566:function(e,t){"use strict";t.Z=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:function(e,t){"use strict";t.Z=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)e.style.height=t+"px";else{const t=e.offsetWidth,n=window.location.search.indexOf("map-block-counter")>-1?window.innerHeight:.8*window.innerHeight,r=Math.min(t*(3/4),n);e.style.height=r+"px"}}},461:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(94333),i=n(9818),s=n(69307),c=n(65736),l=n(65235),u=n.n(l),p=n(69283);const __=c.__,d="editor",m="preview";class h extends s.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:n}=this.props,{source:r}=t;8===e.keyCode&&""===r&&(n(),e.preventDefault())};toggleMode=e=>()=>this.setState({activePanel:e});renderToolbarButton(e,t){const{activePanel:n}=this.state,{className:o}=this.props,a=u()(o,"components-button components-tab-button",{"is-pressed":n===e});return(0,r.createElement)("button",{className:a,onClick:this.toggleMode(e)},(0,r.createElement)("span",null,t))}render(){const{attributes:e,className:t,isSelected:n}=this.props,{source:a}=e,{activePanel:i}=this.state;return!n&&this.isEmpty()?(0,r.createElement)("p",{className:`${t}__placeholder`},__("Write your _Markdown_ **here**…","jetpack")):(0,r.createElement)("div",{className:t},(0,r.createElement)(o.BlockControls,null,(0,r.createElement)("div",{className:"components-toolbar"},this.renderToolbarButton(d,__("Markdown","jetpack")),this.renderToolbarButton(m,__("Preview","jetpack")))),i!==m&&n?(0,r.createElement)(o.PlainText,{className:`${t}__editor`,onChange:this.updateSource,onKeyDown:this.handleKeyDown,"aria-label":__("Markdown","jetpack"),innerRef:this.bindInput,value:a}):(0,r.createElement)(p.Z,{className:`${t}__preview`,source:a}))}}t.Z=(0,a.compose)([(0,i.withSelect)((e=>({currentBlockId:e("core/block-editor").getSelectedBlockClientId()}))),(0,i.withDispatch)(((e,t)=>{let{currentBlockId:n}=t;return{removeBlock:()=>e("core/block-editor").removeBlocks(n)}}))])(h)},49702:function(e,t,n){"use strict";var r=n(31985),o=n(80723);(0,r.Z)(o.u,o.X)},80723:function(e,t,n){"use strict";n.d(t,{X:function(){return b},u:function(){return d}});var r=n(51806),o=n(13419),a=n(55609),i=n(69307),s=n(65736),c=n(70355),l=n(5820),u=n(461),p=n(2683);const __=s.__,_x=s._x,d="markdown",m=__("Try Markdown","jetpack"),h=__("Markdown is a text formatting syntax that is converted into HTML. You can _emphasize_ text or **make it strong** with just a few characters.","jetpack"),f=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 208 128"},(0,r.createElement)(a.Rect,{width:"198",height:"118",x:"5",y:"5",ry:"10",stroke:"currentColor",strokeWidth:"10",fill:"none"}),(0,r.createElement)(a.Path,{d:"M30 98v-68h20l20 25 20-25h20v68h-20v-39l-20 25-20-25v39zM155 98l-30-33h20v-35h20v35h20z"})),g=(0,o.Wp)()||(0,o.Ug)()?"https://en.support.wordpress.com/markdown-quick-reference/":"https://jetpack.com/support/jetpack-blocks/markdown-block/",b={title:__("Markdown","jetpack"),description:(0,r.createElement)(i.Fragment,null,(0,r.createElement)("p",null,__("Add headings, lists, or links to plain text with ease.","jetpack")),(0,r.createElement)(a.ExternalLink,{href:g},__("Support reference","jetpack"))),icon:{src:f,foreground:(0,c.m)()},category:(0,l.Z)("text","formatting"),keywords:[_x("formatting","block search term","jetpack"),_x("syntax","block search term","jetpack"),_x("markup","block search term","jetpack")],attributes:{source:{type:"string"}},supports:{align:["wide","full"],html:!1,spacing:{padding:!0,margin:!0,__experimentalDefaultControls:{padding:!0,margin:!0}}},edit:u.Z,save:p.Z,example:{attributes:{source:`## ## ${m}\n\n${h}`}}}},69283:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(69307),i=n(65736),s=n(10185),c=n.n(s),l=n(82339),u=n.n(l);const __=i.__,p=new(c())({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=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,o.__experimentalGetSpacingClassesAndStyles)?.(e);return t?.style?t.style:{}};t.Z=e=>{let{className:t,source:n="",attributes:o}=e;return(0,r.createElement)(a.RawHTML,{className:t,onClick:d,style:m(o)},n.length?p.render(n):"")}},2683:function(e,t,n){"use strict";var r=n(51806),o=n(69283);t.Z=e=>{let{attributes:t,className:n}=e;return(0,r.createElement)(o.Z,{className:n,source:t.source,attributes:t})}},31283:function(e,t,n){"use strict";n.d(t,{Eo:function(){return c},V1:function(){return a},ez:function(){return d},fL:function(){return l},jn:function(){return s},vW:function(){return i}});var r=n(65736),o=n(92819);const __=r.__,a=[{value:"en-US",label:"English"},{value:"fr-CA",label:"Français"},{value:"de-DE",label:"Deutsch"},{value:"es-MX",label:"Español"},{value:"ja-JP",label:"日本語"},{value:"nl-NL",label:"Nederlands"},{value:"it-IT",label:"Italiano"}],i=a.map((e=>e.value));const s={name:"button",label:__("Button (210 x 113 pixels)","jetpack")},c=e=>(0,o.compact)([{name:"standard",label:__("Standard (224 x 301 pixels)","jetpack"),isDefault:!0},{name:"tall",label:__("Tall (288 x 490 pixels)","jetpack")},{name:"wide",label:__("Wide (840 x 150 pixels)","jetpack")},(!e||1===e.length)&&s]),l=e=>c(e).map((e=>e.name)),u=window?.Jetpack_Editor_Initial_State?.siteLocale??"en-US",p=!(0,o.isEmpty)(u)&&i.includes(u)?u:"en-US",d={rid:{default:[],type:"array"},style:{default:"standard",type:"string",validValues:l()},iframe:{default:!0,type:"boolean"},domain:{default:"com",type:"string"},lang:{default:p,type:"string",validValues:i},newtab:{default:!1,type:"boolean"},negativeMargin:{default:!1,type:"boolean"}}},80452:function(e,t,n){"use strict";var r=n(51806),o=n(31283);t.Z={attributes:o.ez,supports:{align:!0,html:!1},save:e=>{let{attributes:{rid:t}}=e;return(0,r.createElement)(r.Fragment,null,t.map((e=>(0,r.createElement)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`},`https://www.opentable.com/restref/client/?rid=${e}`))))}}},70398:function(e,t,n){"use strict";var r=n(51806),o=n(31283);t.Z={attributes:o.ez,migrate:e=>{const{style:t,className:n}=e,r="standard"===t?"":`is-style-${t}`;return{...e,className:n?`${n} ${r}`:r}},isEligible:e=>{let{style:t,className:n}=e;return!(!t||"standard"===t)&&(!n||-1===n.indexOf("is-style-"))},save:e=>{let{attributes:{rid:t}}=e;return(0,r.createElement)("div",null,t.map((e=>(0,r.createElement)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`},`https://www.opentable.com/restref/client/?rid=${e}`))))}}},76851:function(e,t,n){"use strict";var r=n(51806),o=n(13419),a=n(52175),i=n(4981),s=n(55609),c=n(69307),l=n(65736),u=n(65235),p=n.n(u),d=n(92819),m=n(81518),h=n(4554),f=n(31283),g=n(15040),b=n(57087),v=n(41007),k=n(48769);const __=l.__;t.Z=(0,s.withNotices)((function(e){let{attributes:t,className:n,clientId:u,isSelected:y,name:w,noticeOperations:E,noticeUI:_,setAttributes:C}=e;const S=(0,i.getBlockDefaultClassName)(w),j=(0,h.S)(f.ez,t);(0,d.isEqual)(j,t)||C(j);const{align:x,rid:L,iframe:P,domain:A,lang:T,newtab:N,negativeMargin:M}=t,I=(0,d.isEmpty)(L),R=(0,m.t)((0,f.Eo)(),t.className),Z=(0,m.t)((0,f.Eo)(L),t.className),D=(0,v.Z)(Z),B=(0,d.isEqual)(L,["1"]);(0,c.useEffect)((()=>{if(E.removeAllNotices(),!I&&!B&&"wide"===Z&&"wide"!==x&&"full"!==x){const e=(0,r.createElement)(r.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"));E.createNotice({status:"warning",content:e})}}),[B,x,I,L,Z]),(0,c.useEffect)((()=>{"button"===R&&Array.isArray(L)&&L.length>1&&C({className:"",style:""})}),[L,R,C]),(0,c.useEffect)((()=>{y&&(Array.isArray(L)&&L.length>1?(0,i.unregisterBlockStyle)("jetpack/opentable",["button"]):(0,i.registerBlockStyle)("jetpack/opentable",f.jn))}),[y,L]),(0,c.useEffect)((()=>{"wide"===D&&"wide"===x&&C({align:""}),"wide"===Z&&D&&Z!==D&&C({align:"wide"}),C({style:Z})}),[Z]);const F=(0,f.fL)(L),O=e=>L.length>1?["multi","button"!==e?e:"standard"]:["button"===e?"button":"standard","button"===e?"standard":e],U=e=>{Array.isArray(e)?C({rid:e,style:e.length>1&&"button"===Z?"standard":Z}):(e=>{const t=(0,k.CC)(e);t||(E.removeAllNotices(),E.createErrorNotice((0,r.createElement)(r.Fragment,null,(0,r.createElement)("strong",null,__("We ran into an issue","jetpack")),(0,r.createElement)("br",null),__("Please ensure this embed matches the one from your OpenTable account","jetpack"))));const n=(0,h.S)(f.ez,t);C(n),E.removeAllNotices()})(e)},z=(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.InspectorAdvancedControls,null,(0,r.createElement)(s.ToggleControl,{label:__("Load the widget in an iFrame (Recommended)","jetpack"),checked:P,onChange:()=>C({iframe:!P}),className:"is-opentable"}),"button"===Z&&(0,r.createElement)(s.ToggleControl,{label:__("Remove button margin","jetpack"),checked:M,onChange:()=>C({negativeMargin:!M})})),(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(s.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(b.Z,{rids:L,onChange:U}),(0,r.createElement)(s.SelectControl,{label:__("Language","jetpack"),value:T,onChange:e=>C({lang:e}),options:f.V1}),(0,r.createElement)(s.ToggleControl,{label:__("Open in a new window","jetpack"),checked:N,onChange:()=>C({newtab:!N})})))),H=(0,o.Wp)()||(0,o.Ug)()?"https://en.support.wordpress.com/wordpress-editor/blocks/opentable-block/":"https://jetpack.com/support/jetpack-blocks/opentable-block/",$=(0,r.createElement)(s.Placeholder,{label:__("OpenTable Reservation","jetpack"),icon:g.Z,instructions:__("Enter your restaurant name, or paste an OpenTable Reservation Widget embed code.","jetpack"),notices:_},(0,r.createElement)(b.Z,{rids:L,onSubmit:U}),(0,r.createElement)("div",{className:`${S}-placeholder-links`},(0,r.createElement)(s.ExternalLink,{href:"https://restaurant.opentable.com/get-started/"},__("Sign up for OpenTable","jetpack")),(0,r.createElement)(s.ExternalLink,{href:H},__("Learn more","jetpack")))),q=p()(n,{[`is-style-${Z}`]:!I&&F.includes(Z)&&-1===n.indexOf("is-style"),"is-placeholder":I,"is-multi":"multi"===O(Z)[0],[`align${x}`]:x,"has-no-margin":M});return(0,r.createElement)(r.Fragment,null,_,(0,r.createElement)("div",{className:q},!I&&z,I?$:(e=>{const[t,n]=O(e||Z);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:`${S}-overlay`}),(0,r.createElement)("iframe",{title:(0,l.sprintf)(/* translators: Placeholder is a unique ID. */ __("Open Table Preview %s","jetpack"),u),scrolling:"no",src:`https://www.opentable.com/widget/reservation/canvas?rid=${(0,d.join)(L,"%2C")}&type=${t}&theme=${n}&overlay=false&domain=${A}&lang=${T&&f.vW.includes(T)?T:"en-US"}&newtab=${N}&disablega=true`}))})()))}))},92482:function(e,t,n){"use strict";var r=n(31985),o=n(69309);(0,r.Z)(o.u2,o.Xd)},15040:function(e,t,n){"use strict";var r=n(51806),o=n(55609);t.Z=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 16",fill:"none",height:"16",width:"22"},(0,r.createElement)(o.Path,{d:"m1.997 5.982c-.39457-.00039-.7804.11622-1.108699.33511-.328295.21888-.584312.5302-.735674.89459-.15136174.36439-.1912714.76548-.1146819 1.15254.0765899.38707.2662379.74274.5449639 1.02202.278726.27929.634011.46965 1.020921.54702.38692.07732.78809.03826 1.15278-.11238.36469-.15063.67652-.40602.89606-.73387.21954-.32786.33693-.71345.33733-1.10803v-.002c.001-1.1-.89-1.994-1.992-1.995zm12.006 3.988c-.3946.0004-.7805-.11625-1.1088-.33517-.3283-.21893-.5843-.53031-.7357-.89476-.1513-.36444-.1912-.76558-.1145-1.15268s.2664-.74276.5453-1.022c.2788-.27925.6342-.46953 1.0211-.54679.387-.07725.7882-.038 1.1529.11278.3647.15079.6764.40634.8959.73432.2194.32799.3366.71369.3368 1.1083v.003c.0003.52814-.2092 1.03477-.5824 1.4085s-.8795.58397-1.4076.5845zm0-9.96999843c-1.5777-.0009886-3.1203.46588743-4.43262 1.34158843-1.31236.8757-2.33558 2.1209-2.94025 3.57813-.60467 1.45722-.76365 3.06103-.45683 4.60861.30683 1.54757 1.06567 2.96947 2.18058 4.08577 1.1149 1.1163 2.53582 1.8769 4.08302 2.1856 1.5472.3088 3.1512.1518 4.6091-.451 1.458-.6028 2.7045-1.6245 3.5819-2.9358.8773-1.3112 1.3461-2.8532 1.3471-4.4309v-.005c.0008-2.11466-.8384-4.14304-2.3331-5.63899-1.4946-1.495952-3.5222-2.3369478-5.6369-2.33800843z"}))},69309:function(e,t,n){"use strict";n.d(t,{Xd:function(){return h},u2:function(){return m}});var r=n(51806),o=n(4981),a=n(65736),i=n(70355),s=n(31283),c=n(80452),l=n(70398),u=n(76851),p=n(15040),d=n(48769);const __=a.__,_x=a._x,m="opentable",h={title:__("OpenTable","jetpack"),description:__("Book a reservation with OpenTable.","jetpack"),icon:{src:p.Z,foreground:(0,i.m)()},category:"earn",keywords:[_x("booking","block search term","jetpack"),_x("reservation","block search term","jetpack"),_x("restaurant","block search term","jetpack")],supports:{align:!0,html:!1},edit:u.Z,save:e=>{let{attributes:{rid:t}}=e;return(0,r.createElement)("div",null,t.map(((e,t)=>(0,r.createElement)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`,key:`${e}-${t}`},`https://www.opentable.com/restref/client/?rid=${e}`))))},attributes:s.ez,styles:(0,s.Eo)(),example:{attributes:{rid:["1"],style:"standard",iframe:!0,domain:"com",lang:"en-US",newtab:!1,negativeMargin:!1}},transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&0===e.textContent.indexOf("http")&&(d.pU.test(e.textContent)||d.tC.test(e.textContent)),transform:e=>{const t=(0,d.CC)(e.textContent);return(0,o.createBlock)("jetpack/opentable",t)}}]},deprecated:[c.Z,l.Z]}},57087:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(82674),o=n.n(r),a=n(51806),i=n(55609),s=n(69307),c=n(65736),l=n(92819),u=n(25392);const __=c.__,_n=c._n,p=20;function d(e){const[t,n]=(0,s.useState)(""),r=(0,u.Z)(t,p),[c,d]=(0,s.useState)(e.rids||[]),m=/^(\d+)$|\(\#(\d+)\)$/,h=r.filter((e=>c.indexOf(e.rid.toString())<0)).map((e=>e.name+` (#${e.rid})`)),f=(0,a.createElement)(i.FormTokenField,o()({value:c,suggestions:h,saveTransform:e=>u.$.test(e)?"":e.trim(),onInputChange:n,maxSuggestions:p,label:_n("Restaurant","Restaurants",c.length,"jetpack")},e,{onChange:t=>{const n=t.map((e=>{const t=m.exec(e);return t[1]||t[2]}));d(n),e.onChange&&e.onChange(n)}}));return(0,a.createElement)("div",{className:"wp-block-jetpack-opentable-restaurant-picker"},e.onSubmit?(0,a.createElement)("form",{onSubmit:n=>{n.preventDefault(),e.onSubmit((0,l.isEmpty)(c)?t:c)}},f,(0,a.createElement)(i.Button,{variant:"secondary",type:"submit"},__("Embed","jetpack"))):f)}},41007:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307);function o(e){const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current}},25392:function(e,t,n){"use strict";n.d(t,{$:function(){return a},Z:function(){return i}});var r=n(69307),o=n(92819);const a=/^\s*(http[s]?:\/\/|\<script)/;function i(e,t){const[n,i]=(0,r.useState)([]),s=(0,r.useCallback)((0,o.throttle)((function(){fetch("https://www.opentable.com/widget/reservation/restaurant-search?pageSize="+t+"&query="+encodeURIComponent(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")).then((e=>e.json())).then((e=>i((0,o.unionBy)(n,e.items,"rid"))))}),500),[n]);return(0,r.useEffect)((()=>{(0,o.isEmpty)(e)||a.test(e)||s(e)}),[e]),n}},48769:function(e,t,n){"use strict";n.d(t,{CC:function(){return i},pU:function(){return a},tC:function(){return o}});const r=/<\s*script[^>]*src\s*=\s*["']?([^"']*)/i,o=/restref=([0-9]+)&/,a=/rid=([0-9]+)&/,i=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 n=new URLSearchParams(t.search);let r=n.get("theme");"button"===n.get("type")&&(r=n.get("type"));let o=n.getAll("rid");if(o&&0!==o.length||(o=n.getAll("restref")),!o||0===o.length)return;const a={};o&&(a.rid=o);const i=n.get("domain");i&&(a.domain=i);const s=n.get("iframe");s&&(a.iframe=s);const c=n.get("lang");c&&(a.lang=c);const l=n.get("newtab");return l&&(a.newtab=l),r&&(a.style=r),a})((e=>{const t=e.match(r);return t&&t[1]?t[1]:o.test(e)||a.test(e)?e:void 0})(e))}},15774:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(51806),o=n(55609),a=n(65736),i=n(66094);const __=a.__,_x=a._x;function s(e){let{className:t,onSubmit:n,noticeUI:a,url:s,setUrl:c}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(o.Placeholder,{label:__("Pinterest","jetpack"),icon:i.qv,notices:a},(0,r.createElement)("form",{onSubmit:e=>{e.preventDefault(),n()}},(0,r.createElement)("input",{type:"url",value:s,className:"components-placeholder__input","aria-label":__("Pinterest URL","jetpack"),placeholder:__("Enter URL to embed here…","jetpack"),onChange:e=>c(e.target.value)}),(0,r.createElement)(o.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))))}},89488:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(51806),o=n(4981),a=n(55609),i=n(69307),s=n(65736);const __=s.__,_x=s._x;function c(e){let{fallbackUrl:t,onClick:n}=e;return(0,r.createElement)(r.Fragment,null,__("Sorry, this content could not be embedded.","jetpack")," ",(0,r.createElement)(a.Button,{variant:"link",onClick:()=>{const e=(0,r.createElement)("a",{href:t},t);n((0,o.createBlock)("core/paragraph",{content:(0,i.renderToString)(e)}))}},_x("Convert block to link","button label","jetpack")))}},13647:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(51806),o=n(55609),a=n(65736);const __=a.__;function i(){return(0,r.createElement)("div",{className:"wp-block-embed is-loading"},(0,r.createElement)(o.Spinner,null),(0,r.createElement)("p",null,__("Embedding…","jetpack")))}},89852:function(e,t,n){"use strict";n.d(t,{C:function(){return i}});var r=n(51806),o=n(55609),a=n(65736);const __=a.__;function i(e){let{setEditingState:t}=e;return(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarButton,{className:"components-toolbar__control",label:__("Edit URL","jetpack"),icon:"edit",onClick:()=>t(!0)}))}},15479:function(e,t,n){"use strict";var r=n(51806),o=n(34098);t.Z={attributes:{url:{type:"string"}},supports:{align:!1,html:!1},save:e=>{let{attributes:t,className:n}=e;const{url:a}=t;return(0,o.t)(a)?(0,r.createElement)("div",{className:n},(0,r.createElement)("a",{"data-pin-do":(0,o.t)(a),href:a})):null}}},43529:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(55609),i=n(69307),s=n(15774),c=n(89488),l=n(13647),u=n(89852),p=n(18867),d=n(34098);t.Z=(0,a.withNotices)((function(e){let{attributes:t,isSelected:n,className:m,noticeOperations:h,noticeUI:f,setAttributes:g,onReplace:b}=e;const{url:v}=t,{isFetching:k,pinterestUrl:y,testUrl:w,hasTestUrlError:E}=(0,p.Z)(),[_,C]=(0,i.useState)(!1),[S,j]=(0,i.useState)(""),[x,L]=(0,i.useState)(!1),P=(0,i.useCallback)((()=>(0,r.createElement)(c.Z,{fallbackUrl:S,onClick:b})),[E]),A=()=>{k||(w(S),L(!1))},T=()=>{C(!0)};if((0,i.useEffect)((()=>{v&&w(v)}),[]),(0,i.useEffect)((()=>{!n&&_&&C(!1)}),[n,_]),(0,i.useEffect)((()=>{g({url:y}),h.removeAllNotices(),y&&j(y),E&&h.createErrorNotice(P())}),[y,E,g,P]),k)return(0,r.createElement)(l.Z,null);const N=(0,d.t)(v);if(x||!v||v&&!N)return(0,r.createElement)(s.Z,{className:m,onSubmit:A,noticeUI:f,url:S,setUrl:j});const M=`<a data-pin-do='${N}' href='${v}'></a>`;return(0,r.createElement)("div",{className:m},(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(u.C,{setEditingState:L})),(0,r.createElement)("div",null,(0,r.createElement)(a.SandBox,{html:M,scripts:["https://assets.pinterest.com/js/pinit.js"],onFocus:T}),!_&&(0,r.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:T})))}))},7414:function(e,t,n){"use strict";var r=n(31985),o=n(66094);(0,r.Z)(o.u2,o.Xd)},18867:function(e,t,n){"use strict";var r=n(69307),o=n(66094),a=n(23621);t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const[t,n]=(0,r.useState)(!1),[i,s]=(0,r.useState)(e),[c,l]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{i&&i!==o.a0&&(n(!0),(0,a.Z)(i).then((e=>{n(!1),s(e),l(!1)})).catch((()=>{n(!1),s(i||void 0),l(!0)})))}),[i]),{isFetching:t,pinterestUrl:i,hasTestUrlError:c,testUrl:s}}},66094:function(e,t,n){"use strict";n.d(t,{Wh:function(){return p},Xd:function(){return g},a0:function(){return d},qv:function(){return f},u2:function(){return m}});var r=n(51806),o=n(4981),a=n(55609),i=n(65736),s=n(70355),c=n(15479),l=n(43529),u=n(54709);const __=i.__,_x=i._x,p=/^\s*https?:\/\/(?:www\.)?(?:[a-z]{2}\.)?(?:pinterest\.[a-z.]+|pin\.it)\/([^/]+)(\/[^/]+)?/i,d="https://pinterest.com/anapinskywalker/",m="pinterest",h=__("Pinterest","jetpack"),f=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,r.createElement)(a.G,null,(0,r.createElement)(a.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"}))),g={title:h,description:__("Embed a Pinterest pin, board, or user.","jetpack"),icon:{src:f,foreground:(0,s.m)()},category:"embed",keywords:[_x("social","block search term","jetpack"),_x("pinboard","block search term","jetpack"),_x("pins","block search term","jetpack")],supports:{align:!1,html:!1},attributes:{url:{type:"string"}},edit:l.Z,save:u.Z,transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&p.test(e.textContent),transform:e=>(0,o.createBlock)("jetpack/pinterest",{url:e.textContent.trim()})}]},example:{attributes:{url:d}},deprecated:[c.Z]}},54709:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806);function o(e){let{attributes:t}=e;const{url:n}=t;return(0,r.createElement)("a",{href:n},n)}},34098:function(e,t,n){"use strict";n.d(t,{t:function(){return a}});var r=n(96483),o=n(66094);function a(e){if(!o.Wh.test(e))return"";const t=(0,r.getPath)(e);return t?t.startsWith("pin/")?"embedPin":t.match(/^([^/]+)\/?$/)?"embedUser":t.match(/^([^/]+)\/([^/]+)\/?$/)?"embedBoard":"":""}},10799:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(55609),i=n(65736),s=n(92819);const __=i.__,c=e=>{let{id:t,setRating:n,children:o}=e;return(0,r.createElement)("span",{className:"jetpack-ratings-button",tabIndex:0,role:"button",onKeyDown:(a=t,e=>{let{code:t}=e;return"Enter"===t?n(a):null}),onClick:(e=>()=>n(e))(t)},o);var a};t.Z=e=>function(t){let{className:n,setAttributes:i,attributes:{align:l,color:u,rating:p,maxRating:d}}=t;const m=e=>{e===p?Math.ceil(p)===p&&(e-=.5):.5===p&&1===e&&(e=0),i({rating:e})};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(o.AlignmentToolbar,{value:l,onChange:e=>i({align:e})})),(0,r.createElement)("div",{className:n,style:{textAlign:l}},(0,s.range)(1,d+1).map((t=>(0,r.createElement)(c,{key:t,id:t,setRating:m},(0,r.createElement)("span",null,(0,r.createElement)(e,{className:p>=t-.5?null:"is-rating-unfilled",color:u})),(0,r.createElement)("span",null,(0,r.createElement)(e,{className:p>=t?null:"is-rating-unfilled",color:u})))))),(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(a.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(a.RangeControl,{label:__("Highest rating","jetpack"),value:d,onChange:e=>i({maxRating:e}),min:2,max:10}),(0,r.createElement)(o.PanelColorSettings,{title:__("Color Settings","jetpack"),initialOpen:!0,colorSettings:[{value:u,onChange:e=>i({color:e}),label:__("Color","jetpack")}]}))))}},36836:function(e,t,n){"use strict";var r=n(31985),o=n(90362);(0,r.Z)(o.u,o.X)},5056:function(e,t,n){"use strict";n.d(t,{d:function(){return a},r:function(){return i}});var r=n(51806),o=n(55609);const a=()=>(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.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"})),i=e=>{const t=(e=>e&&e.color?e.color:"currentColor")(e),n=(e=>e&&e.className?e.className:"")(e);return(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",color:t},(0,r.createElement)(o.Path,{className:n,fill:t,stroke:t,d:"M12,17.3l6.2,3.7l-1.6-7L22,9.2l-7.2-0.6L12,2L9.2,8.6L2,9.2L7.5,14l-1.6,7L12,17.3z"}))}},90362:function(e,t,n){"use strict";n.d(t,{X:function(){return l},u:function(){return c}});var r=n(65736),o=n(70355),a=n(10799),i=n(5056),s=n(78403);const __=r.__,_x=r._x,c="rating-star",l={title:__("Star Rating","jetpack"),description:__("Rate movies, books, songs, recipes — anything you can put a number on.","jetpack"),icon:{src:i.d,foreground:(0,o.m)()},keywords:[_x("star","block search term","jetpack"),_x("rating","block search term","jetpack"),_x("review","block search term","jetpack")],category:"widgets",example:{},styles:[{name:"filled",label:_x("Filled","block style","jetpack"),isDefault:!0},{name:"outlined",label:_x("Outlined","block style","jetpack")}],attributes:{rating:{type:"number",default:1},maxRating:{type:"number",default:5},color:{type:"string"},align:{type:"string",default:"left"}},edit:(0,a.Z)(i.r),save:(0,s.Z)("★")}},78403:function(e,t,n){"use strict";var r=n(51806),o=n(92819);t.Z=e=>function(t){let{className:n,attributes:{align:a,rating:i,color:s}}=t;return(0,r.createElement)("figure",{className:n,style:{textAlign:a}},(0,o.range)(1,i+1).map((t=>(0,r.createElement)("span",{key:t,style:{color:s}},e))))}},53296:function(e,t,n){"use strict";n.d(t,{AP:function(){return c},Hj:function(){return s}});var r=n(51806),o=n(55609),a=n(65736);const __=a.__,i=6;function s(e){let{attributes:t,setAttributes:n}=e;const{displayAuthor:a,displayContext:s,displayDate:c,displayHeadline:l,displayThumbnails:u,headline:p,postsToShow:d}=t;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelBody,{title:__("Layout settings","jetpack")},(0,r.createElement)(o.ToggleControl,{label:__("Display headline","jetpack"),checked:l,onChange:e=>n({displayHeadline:e})}),l&&(0,r.createElement)(o.TextControl,{value:p,onChange:e=>n({headline:e}),label:__("Headline","jetpack")}),(0,r.createElement)(o.RangeControl,{label:__("Number of posts","jetpack"),value:d,onChange:e=>n({postsToShow:Math.min(e,i)}),min:1,max:i})),(0,r.createElement)(o.PanelBody,{title:__("Metadata settings","jetpack")},(0,r.createElement)(o.ToggleControl,{label:__("Display date","jetpack"),checked:c,onChange:e=>n({displayDate:e})}),(0,r.createElement)(o.ToggleControl,{label:__("Display author","jetpack"),checked:a,onChange:e=>n({displayAuthor:e})}),(0,r.createElement)(o.ToggleControl,{label:__("Display context (category or tag)","jetpack"),checked:s,onChange:e=>n({displayContext:e})}),(0,r.createElement)(o.ToggleControl,{label:__("Display thumbnail","jetpack"),checked:u,onChange:e=>n({displayThumbnails:e})})))}function c(e){let{attributes:t,setAttributes:n}=e;const{postLayout:a}=t,i=[{icon:"grid-view",title:__("Grid view","jetpack"),onClick:()=>n({postLayout:"grid"}),isActive:"grid"===a},{icon:"list-view",title:__("List view","jetpack"),onClick:()=>n({postLayout:"list"}),isActive:"list"===a}];return(0,r.createElement)(o.ToolbarGroup,{controls:i})}},86434:function(e,t,n){"use strict";n.d(t,{Z:function(){return k}});var r=n(51806),o=n(13419),a=n(52175),i=n(55609),s=n(94333),c=n(9818),l=n(12238),u=n(65736),p=n(53296),d=n(54797),m=n(17778),h=n(26700),f=n(92882);const __=u.__;function g(e){return(0,r.createElement)("div",{className:"jp-related-posts-i2__post",id:e.id,"aria-labelledby":e.id+"-heading"},(0,r.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,r.createElement)("figure",{className:"jp-related-posts-i2__post-image-placeholder","aria-label":__("Placeholder image","jetpack")},(0,r.createElement)(i.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,r.createElement)("title",null,__("Grey square","jetpack")),(0,r.createElement)(i.Path,{d:"M0 0h350v200H0z",fill:"#8B8B96","fill-opacity":".1"})),(0,r.createElement)(i.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,r.createElement)("title",null,__("Icon for image","jetpack")),(0,r.createElement)(i.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(i.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,r.createElement)("div",{className:"jp-related-posts-i2__post-date has-small-font-size"},__("August 3, 2018","jetpack")),e.displayAuthor&&(0,r.createElement)("div",{className:"jp-related-posts-i2__post-author has-small-font-size"},__("by John Doe","jetpack")),e.displayContext&&(0,r.createElement)("div",{className:"jp-related-posts-i2__post-context has-small-font-size"},__("In “Uncategorized”","jetpack")))}function b(e){const t=e.post?.block_context?.text||"",n=e.post?.block_context?.link||"",o=""!==t,a=""!==n;return(0,r.createElement)("div",{className:"jp-related-posts-i2__post",id:e.id,"aria-labelledby":e.id+"-heading"},(0,r.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,r.createElement)("a",{className:"jp-related-posts-i2__post-img-link",href:e.post.url},(0,r.createElement)("img",{className:"jp-related-posts-i2__post-img",src:e.post.img.src,alt:e.post.title,rel:"nofollow noopener noreferrer",target:"_blank"})),e.displayDate&&(0,r.createElement)("div",{className:"jp-related-posts-i2__post-date has-small-font-size"},e.post.date),e.displayAuthor&&(0,r.createElement)("div",{className:"jp-related-posts-i2__post-author has-small-font-size"},e.post.author),e.displayContext&&o&&(0,r.createElement)("div",{className:"jp-related-posts-i2__post-context has-small-font-size"},a&&(0,r.createElement)("a",{href:n},t),!1===a&&t))}function v(e){const t="jp-related-posts-i2__row";let n=0;const o=e.posts.length>3;switch(e.posts.length){case 2:case 4:case 5:n=2;break;default:n=3}return(0,r.createElement)("div",null,(0,r.createElement)("div",{className:t,"data-post-count":e.posts.slice(0,n).length},e.posts.slice(0,n)),o&&(0,r.createElement)("div",{className:t,"data-post-count":e.posts.slice(n).length},e.posts.slice(n)))}function k(e){const{isLoadingModules:t,isChangingStatus:n,isModuleActive:i,changeStatus:u}=(0,o.el)(f.u2),{isEnabled:y,enable:w,isFetchingStatus:E,isUpdatingStatus:_}=(0,d._)(),C=n||_,{posts:S,isInSiteEditor:j}=(0,c.useSelect)((e=>{const t=e(l.store).getCurrentPost();return{posts:t?.["jetpack-related-posts"]??[],isInSiteEditor:!t||0===Object.keys(t).length}})),{instanceId:x}=(0,s.useInstanceId)(k),{attributes:L,className:P,setAttributes:A}=e;if(t||E)return(0,r.createElement)(h.o,null);if(!i||!y)return(0,r.createElement)(m.v,{className:P,changeStatus:u,isLoading:C,enable:w});const{displayAuthor:T,displayContext:N,displayDate:M,displayHeadline:I,displayThumbnails:R,headline:Z,postLayout:D,postsToShow:B}=L,F="jp-relatedposts-i2",O=[];for(let e=0;e<B;e++)S[e]?O.push((0,r.createElement)(b,{id:`related-posts-${x}-post-${e}`,key:F+"-"+e,post:S[e],displayThumbnails:R,displayDate:M,displayContext:N,displayAuthor:T})):O.push((0,r.createElement)(g,{id:`related-posts-${x}-post-${e}`,key:"related-post-placeholder-"+e,displayThumbnails:R,displayDate:M,displayContext:N,isInSiteEditor:j,displayAuthor:T}));return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(p.Hj,{attributes:L,setAttributes:A})),(0,r.createElement)(a.BlockControls,null,(0,r.createElement)(p.AP,{attributes:L,setAttributes:A})),(0,r.createElement)("div",{className:P,id:`related-posts-${x}`},I&&(0,r.createElement)("h3",null,Z),(0,r.createElement)("div",{className:F,"data-layout":D},(0,r.createElement)(v,{posts:O}))))}},89517:function(e,t,n){"use strict";var r=n(31985),o=n(92882);(0,r.Z)(o.u2,o.Xd)},54797:function(e,t,n){"use strict";n.d(t,{_:function(){return i}});var r=n(86989),o=n.n(r),a=n(69307);const i=()=>{const[e,t]=(0,a.useState)(!1),[n,r]=(0,a.useState)(!1),[i,s]=(0,a.useState)(!1);(0,a.useEffect)((()=>{t(!0),async function(){try{const e=await o()({path:"/wpcom/v2/related-posts"});return e?.enabled??!1}catch(e){return!1}}().then((e=>{s(e),t(!1)})).catch((()=>{t(!1)}))}),[]);const c=(0,a.useCallback)((()=>{r(!0),async function(){try{return await o()({path:"/wpcom/v2/related-posts/enable",method:"POST"})}catch(e){return!1}}().then((e=>{s(e),r(!1)})).catch((()=>{r(!1)}))}),[]);return(0,a.useMemo)((()=>({isEnabled:i,enable:c,isFetchingStatus:e,isUpdatingStatus:n})),[i,c,e,n])}},17778:function(e,t,n){"use strict";n.d(t,{v:function(){return u}});var r=n(51806),o=n(6895),a=n(13419),i=n(55609),s=n(69307),c=n(65736),l=n(92882);const __=c.__,u=e=>{let{className:t,changeStatus:n,isLoading:c,enable:u}=e;const{tracks:p}=(0,a.z$)();(0,s.useEffect)((()=>{p.recordEvent("jetpack_editor_related_posts_placeholder_view")}),[p]);const d=(0,a.Wp)()||(0,a.Ug)()?"https://wordpress.com/support/related-posts/":(0,o.Z)("jetpack-support-related-posts");return(0,r.createElement)("div",{className:t},(0,r.createElement)(i.Placeholder,{icon:l.qv,instructions:__("You'll need to activate the Related Posts feature to use this block.","jetpack"),label:l.Xd.title},(0,r.createElement)(i.Button,{disabled:c,isBusy:c,onClick:()=>{let e=!1;return p.recordEvent("jetpack_editor_related_posts_enable"),(0,a.Wp)()||(e=n(!0)),e=u(),e},variant:"secondary"},c?__("Activating Related Posts","jetpack"):__("Activate Related Posts","jetpack",0)),(0,r.createElement)("div",{className:"components-placeholder__learn-more"},(0,r.createElement)(i.ExternalLink,{href:d},__("Learn more about the Related Posts feature.","jetpack")))))}},92882:function(e,t,n){"use strict";n.d(t,{Xd:function(){return u},qv:function(){return l},u2:function(){return c}});var r=n(51806),o=n(55609),a=n(65736),i=n(70355),s=n(86434);const __=a.__,_x=a._x,c="related-posts",l=(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.G,{stroke:"currentColor",strokeWidth:"2",strokeLinecap:"square"},(0,r.createElement)(o.Path,{d:"M4,4 L4,19 M4,4 L19,4 M4,9 L19,9 M4,14 L19,14 M4,19 L19,19 M9,4 L9,19 M19,4 L19,19"}))),u={title:__("Related Posts","jetpack"),description:__("Display a list of related posts.","jetpack"),icon:{src:l,foreground:(0,i.m)()},category:"embed",keywords:[_x("similar content","block search term","jetpack"),_x("linked","block search term","jetpack"),_x("connected","block search term","jetpack")],attributes:{postLayout:{type:"string",default:"grid"},displayAuthor:{type:"boolean",default:!1},displayDate:{type:"boolean",default:!0},displayHeadline:{type:"boolean",default:!1},displayThumbnails:{type:"boolean",default:!1},displayContext:{type:"boolean",default:!1},headline:{type:"string",default:""},postsToShow:{type:"number",default:3}},supports:{html:!1,multiple:!1,reusable:!1,color:{gradients:!0,link:!0},spacing:{margin:!0,padding:!0},typography:{__experimentalFontFamily:!0,fontSize:!0,lineHeight:!0},align:["wide","full"]},transforms:{from:[{type:"shortcode",tag:"jetpack-related-posts"}]},edit:s.Z,save:()=>null,example:{attributes:{postLayout:"grid",displayAuthor:!1,displayDate:!0,displayHeadline:!1,displayThumbnails:!0,displayContext:!1,headline:"",postsToShow:2}}}},26700:function(e,t,n){"use strict";n.d(t,{o:function(){return s}});var r=n(51806),o=n(88275),a=n(22636),i=n(55609);const s=()=>(0,r.createElement)(o.ZP,null,(0,r.createElement)(i.Placeholder,null,(0,r.createElement)(i.Flex,{gap:2,direction:"column",style:{flexBasis:"33.3%",padding:"0 1em"}},(0,r.createElement)(i.FlexItem,null,(0,r.createElement)(a.Z,{width:"100%",height:30})),(0,r.createElement)(i.FlexItem,null,(0,r.createElement)(a.Z,{width:"100%",height:90}))),(0,r.createElement)(i.Flex,{gap:2,direction:"column",style:{flexBasis:"33.3%",padding:"0 1em"}},(0,r.createElement)(i.FlexItem,null,(0,r.createElement)(a.Z,{width:"100%",height:30})),(0,r.createElement)(i.FlexItem,null,(0,r.createElement)(a.Z,{width:"100%",height:90}))),(0,r.createElement)(i.Flex,{gap:2,direction:"column",style:{flexBasis:"33.3%",padding:"0 1em"}},(0,r.createElement)(i.FlexItem,null,(0,r.createElement)(a.Z,{width:"100%",height:30})),(0,r.createElement)(i.FlexItem,null,(0,r.createElement)(a.Z,{width:"100%",height:90})))))},4498:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(55609),i=n(9818),s=n(69307),c=n(65736),l=n(65235),u=n.n(l),p=n(51100),d=n(30314);const __=c.__,_n=c._n,m=[{value:p.FV,label:__("Show after threshold","jetpack")},{value:p.Am,label:__("Show before threshold","jetpack")}];class h extends s.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===p.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,r.createElement)("div",{className:u()(this.props.className,{"wp-block-jetpack-repeat-visitor--is-unselected":!this.props.isSelected})},(0,r.createElement)(a.Placeholder,{icon:d.qv,label:__("Repeat Visitor","jetpack"),className:"wp-block-jetpack-repeat-visitor-placeholder"},(0,r.createElement)(a.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,r.createElement)(a.RadioControl,{label:__("Visibility","jetpack"),selected:this.props.attributes.criteria,options:m,onChange:this.setCriteria})),(0,r.createElement)(a.Notice,{status:"info",isDismissible:!1},this.getNoticeLabel()),(0,r.createElement)("div",{className:"wp-block-jetpack-repeat-visitor__inner-container"},(0,r.createElement)(o.InnerBlocks,null)))}}t.Z=(0,i.withSelect)(((e,t)=>{const{isBlockSelected:n,hasSelectedInnerBlock:r}=e("core/block-editor");return{isSelected:n(t.clientId)||r(t.clientId)}}))(h)},48516:function(e,t,n){"use strict";var r=n(51806),o=n(52175);t.Z=e=>{let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)("div",{className:"wp-block-jetpack-repeat-visitor__inner-container"},(0,r.createElement)(o.InnerBlocks.Content,null)))}},51100:function(e,t,n){"use strict";n.d(t,{Am:function(){return o},FV:function(){return r},Kv:function(){return a}});const r="after-visits",o="before-visits",a=3},50323:function(e,t,n){"use strict";var r=n(31985),o=n(30314);(0,r.Z)(o.u2,o.Xd)},30314:function(e,t,n){"use strict";n.d(t,{Xd:function(){return f},qv:function(){return h},u2:function(){return m}});var r=n(51806),o=n(52175),a=n(55609),i=n(65736),s=n(70355),c=n(36598),l=n(4498),u=n(48516),p=n(51100);const __=i.__,_x=i._x,d={attributes:{criteria:{type:"string",default:p.FV},threshold:{type:"number",default:p.Kv}},supports:{html:!1},save:e=>{let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(o.InnerBlocks.Content,null))}},m="repeat-visitor",h=(0,c.Z)((0,r.createElement)(a.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"})),f={attributes:{criteria:{type:"string",default:p.FV},threshold:{type:"number",default:p.Kv}},category:"widgets",description:__("Control block visibility based on how often a visitor has viewed the page.","jetpack"),icon:{src:h,foreground:(0,s.m)()},keywords:[_x("return","block search term","jetpack"),_x("visitors","block search term","jetpack"),_x("visibility","block search term","jetpack")],supports:{align:["wide","full"],html:!1},title:__("Repeat Visitor","jetpack"),edit:l.Z,save:u.Z,example:{attributes:{criteria:p.FV,threshold:p.Kv},innerBlocks:[{name:"core/paragraph",attributes:{content:__("This block will only appear to a visitor who visited the page three or more times.","jetpack")}}]},deprecated:[d]}},36825:function(e,t,n){"use strict";n.d(t,{LC:function(){return r},Rh:function(){return a},a7:function(){return o}});const r="jp_pay_product",o="USD",a=[o,"EUR","AUD","BRL","CAD","CZK","DKK","HKD","HUF","ILS","JPY","MYR","MXN","TWD","NZD","NOK","PHP","PLN","GBP","RUB","SGD","SEK","CHF","THB"]},65093:function(e,t,n){"use strict";n.d(t,{G:function(){return i}});var r=n(51806),o=n(55609),a=n(65736);const __=a.__;function i(e){let{setAttributes:t,postLinkText:n}=e;return(0,r.createElement)(o.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1},(0,r.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,r.createElement)(o.TextControl,{placeholder:__("Click here to purchase","jetpack"),onChange:e=>t({postLinkText:e}),value:n})))}},66763:function(e,t,n){"use strict";var r=n(51806),o=n(69307);t.Z={attributes:{currency:{type:"string",default:"USD"},content:{type:"string",default:""},email:{type:"string",default:""},featuredMediaId:{type:"number",default:0},featuredMediaUrl:{type:"string",default:null},featuredMediaTitle:{type:"string",default:null},multiple:{type:"boolean",default:!1},price:{type:"number"},productId:{type:"number"},title:{type:"string",default:""}},supports:{className:!1,customClassName:!1,html:!1,reusable:!1},save:e=>{let{attributes:t}=e;const{productId:n}=t;return n?(0,r.createElement)(o.RawHTML,null,`[simple-payment id="${n}"]`):null}}},21559:function(e,t,n){"use strict";var r=n(51806),o=n(43317),a=n(52175),i=n(55609),s=n(94333),c=n(9818),l=n(69307),u=n(65736),p=n(65235),d=n.n(p),m=n(92384),h=n(92819),f=n(59809),g=n(36825),b=n(39416),v=n(72802),k=n(96059);const __=u.__,_n=u._n;class y extends l.Component{state={fieldEmailError:null,fieldPriceError:null,fieldTitleError:null,isSavingProduct:!1};shouldInjectPaymentAttributes=!!this.props.attributes.productId;componentDidMount(){this.injectPaymentAttributes();const{attributes:e,hasPublishAction:t,postLinkUrl:n,setAttributes:r}=this.props,{productId:o}=e;!o&&t&&this.saveProduct();const a=n&&n!==this.props.attributes.postLinkUrl,i=!this.props.attributes.postLinkText;(a||i)&&r({...a&&{postLinkUrl:n},...i&&{postLinkText:__("Click here to purchase.","jetpack")}})}componentDidUpdate(e){const{hasPublishAction:t,isSelected:n,postLinkUrl:r,setAttributes:o}=this.props;(0,h.isEqual)(e.simplePayment,this.props.simplePayment)||this.injectPaymentAttributes(),!e.isSaving&&this.props.isSaving&&t&&this.validateAttributes()?this.saveProduct():e.isSelected&&!n&&this.validateAttributes();const a=r&&r!==this.props.attributes.postLinkUrl,i=!this.props.attributes.postLinkText;(a||i)&&o({...a&&{postLinkUrl:r},...i&&{postLinkText:__("Click here to purchase.","jetpack")}})}injectPaymentAttributes(){const{simplePayment:e,featuredMedia:t}=this.props;if(!this.shouldInjectPaymentAttributes||(0,h.isEmpty)(e))return;const{attributes:n,setAttributes:r}=this.props,{content:o,currency:a,email:i,featuredMediaId:s,featuredMediaUrl:c,featuredMediaTitle:l,multiple:u,price:p,title:d}=n;r({content:(0,h.get)(e,["content","raw"],o),currency:(0,h.get)(e,["meta","spay_currency"],a),email:(0,h.get)(e,["meta","spay_email"],i),featuredMediaId:(0,h.get)(e,["featured_media"],s),featuredMediaUrl:(0,h.get)(t,"url",c),featuredMediaTitle:(0,h.get)(t,"title",l),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:n,email:r,featuredMediaId:o,multiple:a,price:i,productId:s,title:c}=e;return{id:s,content:t,featured_media:o,meta:{spay_currency:n,spay_email:r,spay_multiple:a,spay_price:i},status:s?"publish":"draft",title:c}}saveProduct(){if(this.state.isSavingProduct)return;const{attributes:e,setAttributes:t}=this.props,{email:n}=e,{saveEntityRecord:r}=(0,c.dispatch)("core");this.setState({isSavingProduct:!0},(()=>{r("postType",g.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"),n):null,fieldPriceError:"spay_price"===t?__("Invalid price.","jetpack"):null})})).finally((()=>{this.setState({isSavingProduct:!1})}))}))}validateAttributes=()=>{const e=this.validatePrice(),t=this.validateTitle(),n=this.validateEmail(),r=this.validateCurrency();return e&&t&&n&&r};validateCurrency=()=>{const{currency:e}=this.props.attributes;return g.Rh.includes(e)};validatePrice=()=>{const{currency:e,price:t}=this.props.attributes,{precision:n}=(0,o.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)>n?0===n?(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.",n,"jetpack"),n)}),!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=g.Rh.map((e=>{const{symbol:t}=(0,o.X)(e);return{value:e,label:t===e?e:`${e} ${(0,h.trimEnd)(t,".")}`}}));renderSettings=()=>(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(i.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1},(0,r.createElement)(i.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,r.createElement)(i.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:n}=this.state,{attributes:o,instanceId:a,isSelected:s,setAttributes:c,simplePayment:l}=this.props,{content:u,currency:p,email:m,featuredMediaId:g,featuredMediaUrl:y,featuredMediaTitle:w,multiple:E,price:_,productId:C,title:S}=o,j=C&&(0,h.isEmpty)(l);if(!s&&j)return(0,r.createElement)("div",{className:"simple-payments__loading"},(0,r.createElement)(v.Z,{"aria-busy":"true",content:"█████",formattedPrice:"█████",title:"█████"}));if(!s&&m&&_&&S&&!e&&!t&&!n)return(0,r.createElement)(v.Z,{"aria-busy":"false",content:u,featuredMediaUrl:y,featuredMediaTitle:w,formattedPrice:(0,k.w)(_,p),multiple:E,title:S});const x=j?i.Disabled:"div";return(0,r.createElement)(x,{className:"wp-block-jetpack-simple-payments"},this.renderSettings(),(0,r.createElement)(b.Z,{featuredMediaId:g,featuredMediaUrl:y,featuredMediaTitle:w,setAttributes:c}),(0,r.createElement)("div",null,(0,r.createElement)(i.TextControl,{"aria-describedby":`${a}-title-error`,className:d()("simple-payments__field","simple-payments__field-title",{"simple-payments__field-has-error":n}),label:__("Item name","jetpack"),onChange:this.handleTitleChange,placeholder:__("Item name","jetpack"),required:!0,type:"text",value:S}),(0,r.createElement)(f.Z,{id:`${a}-title-error`,isError:!0},n),(0,r.createElement)(i.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,r.createElement)("div",{className:"simple-payments__price-container"},(0,r.createElement)(i.SelectControl,{className:"simple-payments__field simple-payments__field-currency",label:__("Currency","jetpack"),onChange:this.handleCurrencyChange,options:this.getCurrencyList,value:p}),(0,r.createElement)(i.TextControl,{"aria-describedby":`${a}-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,r.createElement)(f.Z,{id:`${a}-price-error`,isError:!0},t)),(0,r.createElement)("div",{className:"simple-payments__field-multiple"},(0,r.createElement)(i.ToggleControl,{checked:Boolean(E),label:__("Allow people to buy more than one item at a time","jetpack"),onChange:this.handleMultipleChange})),(0,r.createElement)(i.TextControl,{"aria-describedby":`${a}-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,r.createElement)(f.Z,{id:`${a}-email-error`,isError:!0},e),(0,r.createElement)(f.Z,{id:`${a}-email-help`},__("Enter the email address associated with your PayPal account. Don’t have an account?","jetpack")+" ",(0,r.createElement)(i.ExternalLink,{href:"https://www.paypal.com/"},__("Create one on PayPal","jetpack")))))}}const w=(0,c.withSelect)(((e,t)=>{const{getEntityRecord:n,getMedia:r}=e("core"),{isSavingPost:o,getCurrentPost:a}=e("core/editor"),{productId:i,featuredMediaId:s}=t.attributes,c=i?(0,h.pick)(n("postType",g.LC,i),[["content"],["meta","spay_currency"],["meta","spay_email"],["meta","spay_multiple"],["meta","spay_price"],["title","raw"],["featured_media"]]):void 0,l=a();return{hasPublishAction:!!(0,h.get)(l,["_links","wp:action-publish"]),isSaving:!!o(),simplePayment:c,featuredMedia:s?r(s):null,postLinkUrl:l.link}}));t.Z=(0,s.compose)(w,s.withInstanceId)(y)},24097:function(e,t,n){"use strict";var r=n(51806),o=n(13419),a=n(55609),i=n(69307),s=n(65736),c=n(70355),l=n(36825),u=n(21559),p=n(83080);const __=s.__,_x=s._x,d=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(a.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,o.Wp)()||(0,o.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,r.createElement)(i.Fragment,null,(0,r.createElement)("p",null,__("Lets you add credit and debit card payment buttons with minimal setup.","jetpack")),(0,r.createElement)("p",null,__("Good for collecting donations or payments for products and services.","jetpack")),(0,r.createElement)(a.ExternalLink,{href:m},__("Support reference","jetpack"))),icon:{src:d,foreground:(0,c.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:l.a7},content:{type:"string",source:"html",selector:".jetpack-simple-payments-description p",default:""},email:{type:"string",default:""},featuredMediaId:{type:"number",default:0},featuredMediaUrl:{type:"string",source:"attribute",selector:".jetpack-simple-payments-image img",attribute:"src",default:null},featuredMediaTitle:{type:"string",source:"attribute",selector:".jetpack-simple-payments-image img",attribute:"alt",default:null},multiple:{type:"boolean",default:!1},postLinkUrl:{type:"string",source:"attribute",selector:".jetpack-simple-payments-purchase",attribute:"href"},postLinkText:{type:"string",source:"html",selector:".jetpack-simple-payments-purchase",default:__("Click here to purchase.","jetpack")},price:{type:"number"},productId:{type:"number"},title:{type:"string",source:"html",selector:".jetpack-simple-payments-title p",default:""}},transforms:{from:[{type:"shortcode",tag:"simple-payment",attributes:{productId:{type:"number",shortcode:e=>{let{named:{id:t}}=e;if(!t)return;const n=parseInt(t,10);return n||void 0}}}}]},edit:u.Z,save:p.Z,supports:{className:!1,customClassName:!1,html:!1,reusable:!1}};t.Z=h},83080:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(51806),o=n(96059);function a(e){let{attributes:t}=e;const{content:n,currency:a,featuredMediaUrl:i,featuredMediaTitle:s,postLinkUrl:c,postLinkText:l,price:u,productId:p,title:d}=t;return p?(0,r.createElement)("div",{className:`jetpack-simple-payments-wrapper jetpack-simple-payments-${p}`},(0,r.createElement)("div",{className:"jetpack-simple-payments-product"},i&&(0,r.createElement)("div",{className:"jetpack-simple-payments-product-image"},(0,r.createElement)("div",{className:"jetpack-simple-payments-image"},(0,r.createElement)("figure",null,(0,r.createElement)("img",{src:i,alt:s})))),(0,r.createElement)("div",{className:"jetpack-simple-payments-details"},(0,r.createElement)("div",{className:"jetpack-simple-payments-title"},(0,r.createElement)("p",null,d)),(0,r.createElement)("div",{className:"jetpack-simple-payments-description"},(0,r.createElement)("p",null,n)),(0,r.createElement)("div",{className:"jetpack-simple-payments-price"},(0,r.createElement)("p",null,(0,o.w)(u,a))),(0,r.createElement)("a",{className:"jetpack-simple-payments-purchase",href:c,target:"_blank",rel:"noopener noreferrer"},l)))):null}},36239:function(e,t,n){"use strict";var r=n(51806),o=n(43317),a=n(52175),i=n(55609),s=n(94333),c=n(9818),l=n(69307),u=n(65736),p=n(6551),d=n(65235),m=n.n(d),h=n(92384),f=n(92819),g=n(59809),b=n(36825),v=n(65093),k=n(39416),y=n(72802),w=n(96059);const __=u.__,_n=u._n;class E extends l.Component{state={fieldEmailError:null,fieldPriceError:null,fieldTitleError:null,isSavingProduct:!1};shouldInjectPaymentAttributes=!!this.props.attributes.productId;componentDidMount(){this.injectPaymentAttributes();const{attributes:e,hasPublishAction:t,postLinkUrl:n,setAttributes:r,isPostEditor:o}=this.props,{productId:a}=e;(!a&&t||!o)&&this.saveProduct();const i=n&&n!==this.props.attributes.postLinkUrl,s=!this.props.attributes.postLinkText;(i||s)&&r({...i&&{postLinkUrl:n},...s&&{postLinkText:__("Click here to purchase.","jetpack")}}),window.wp?.customize?.bind("change",(e=>{let t;const n=e.id.match(/^widget_(.+)(?:\[(\d+)\])$/);if(n){t=`${n[1]}-${parseInt(n[2],10)}`}else t=e.id;t===(0,p.getWidgetIdFromBlock)(this.props.block)&&this.validateAttributes()&&this.saveProduct()}))}componentDidUpdate(e){const{hasPublishAction:t,isSelected:n,postLinkUrl:r,setAttributes:o,isPostEditor:a}=this.props;(0,f.isEqual)(e.simplePayment,this.props.simplePayment)||this.injectPaymentAttributes(),e.isSaving||!this.props.isSaving||!t&&a||!this.validateAttributes()?e.isSelected&&!n&&this.validateAttributes():this.saveProduct();const i=r&&r!==this.props.attributes.postLinkUrl,s=!this.props.attributes.postLinkText;(i||s)&&o({...i&&{postLinkUrl:r},...s&&{postLinkText:__("Click here to purchase.","jetpack")}})}injectPaymentAttributes(){const{simplePayment:e,featuredMedia:t}=this.props;if(!this.shouldInjectPaymentAttributes||(0,f.isEmpty)(e))return;const{attributes:n,setAttributes:r}=this.props,{content:o,currency:a,email:i,featuredMediaId:s,featuredMediaUrl:c,featuredMediaTitle:l,multiple:u,price:p,title:d}=n;r({content:(0,f.get)(e,["content","raw"],o),currency:(0,f.get)(e,["meta","spay_currency"],a),email:(0,f.get)(e,["meta","spay_email"],i),featuredMediaId:(0,f.get)(e,["featured_media"],s),featuredMediaUrl:(0,f.get)(t,"url",c),featuredMediaTitle:(0,f.get)(t,"title",l),multiple:Boolean((0,f.get)(e,["meta","spay_multiple"],Boolean(u))),price:(0,f.get)(e,["meta","spay_price"],p||void 0),title:(0,f.get)(e,["title","raw"],d)}),this.shouldInjectPaymentAttributes=!this.shouldInjectPaymentAttributes}toApi(){const{attributes:e}=this.props,{content:t,currency:n,email:r,featuredMediaId:o,multiple:a,price:i,productId:s,title:c}=e;return{id:s,content:t,featured_media:o,meta:{spay_currency:n,spay_email:r,spay_multiple:a,spay_price:i},status:s?"publish":"draft",title:c}}saveProduct(){if(this.state.isSavingProduct)return;const{attributes:e,setAttributes:t}=this.props,{email:n}=e,{saveEntityRecord:r}=(0,c.dispatch)("core");this.setState({isSavingProduct:!0},(()=>{r("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"),n):null,fieldPriceError:"spay_price"===t?__("Invalid price.","jetpack"):null})})).finally((()=>{this.setState({isSavingProduct:!1})}))}))}validateAttributes=()=>{const e=this.validatePrice(),t=this.validateTitle(),n=this.validateEmail(),r=this.validateCurrency();return e&&t&&n&&r};validateCurrency=()=>{const{currency:e}=this.props.attributes;return b.Rh.includes(e)};validatePrice=()=>{const{currency:e,price:t}=this.props.attributes,{precision:n}=(0,o.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)>n?0===n?(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.",n,"jetpack"),n)}),!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,o.X)(e);return{value:e,label:t===e?e:`${e} ${(0,f.trimEnd)(t,".")}`}}));renderSettings=()=>(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(v.G,{postLinkText:this.props.attributes.postLinkText,setAttributes:this.props.setAttributes}));render(){const{fieldEmailError:e,fieldPriceError:t,fieldTitleError:n}=this.state,{attributes:o,instanceId:a,isSelected:s,setAttributes:c,simplePayment:l}=this.props,{content:u,currency:p,email:d,featuredMediaId:h,featuredMediaUrl:b,featuredMediaTitle:v,multiple:E,price:_,productId:C,title:S}=o,j=C&&(0,f.isEmpty)(l);if(!s&&j)return(0,r.createElement)("div",{className:"simple-payments__loading"},(0,r.createElement)(y.Z,{"aria-busy":"true",content:"█████",formattedPrice:"█████",title:"█████"}));if(!s&&d&&_&&S&&!e&&!t&&!n)return(0,r.createElement)(y.Z,{"aria-busy":"false",content:u,featuredMediaUrl:b,featuredMediaTitle:v,formattedPrice:(0,w.T4)(_,p),multiple:E,title:S});const x=j?i.Disabled:"div";return(0,r.createElement)(x,{className:"wp-block-jetpack-simple-payments"},this.renderSettings(),(0,r.createElement)(k.Z,{featuredMediaId:h,featuredMediaUrl:b,featuredMediaTitle:v,setAttributes:c}),(0,r.createElement)("div",null,(0,r.createElement)(i.TextControl,{"aria-describedby":`${a}-title-error`,className:m()("simple-payments__field","simple-payments__field-title",{"simple-payments__field-has-error":n}),label:__("Item name","jetpack"),onChange:this.handleTitleChange,placeholder:__("Item name","jetpack"),required:!0,type:"text",value:S}),(0,r.createElement)(g.Z,{id:`${a}-title-error`,isError:!0},n),(0,r.createElement)(i.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,r.createElement)("div",{className:"simple-payments__price-container"},(0,r.createElement)(i.SelectControl,{className:"simple-payments__field simple-payments__field-currency",label:__("Currency","jetpack"),onChange:this.handleCurrencyChange,options:this.getCurrencyList,value:p}),(0,r.createElement)(i.TextControl,{"aria-describedby":`${a}-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,r.createElement)(g.Z,{id:`${a}-price-error`,isError:!0},t)),(0,r.createElement)("div",{className:"simple-payments__field-multiple"},(0,r.createElement)(i.ToggleControl,{checked:Boolean(E),label:__("Allow people to buy more than one item at a time","jetpack"),onChange:this.handleMultipleChange})),(0,r.createElement)(i.TextControl,{"aria-describedby":`${a}-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,r.createElement)(g.Z,{id:`${a}-email-error`,isError:!0},e),(0,r.createElement)(g.Z,{id:`${a}-email-help`},__("Enter the email address associated with your PayPal account. Don’t have an account?","jetpack")+" ",(0,r.createElement)(i.ExternalLink,{href:"https://www.paypal.com/"},__("Create one on PayPal","jetpack")))))}}const _=(0,c.withSelect)(((e,t)=>{const{getEntityRecord:n,getMedia:r}=e("core"),{getCurrentPost:o}=e("core/editor"),{__experimentalGetDirtyEntityRecords:a,isSavingEntityRecord:i}=e("core"),s=a,{productId:c,featuredMediaId:l}=t.attributes,u=c?(0,f.pick)(n("postType",b.LC,c),[["content"],["meta","spay_currency"],["meta","spay_email"],["meta","spay_multiple"],["meta","spay_price"],["title","raw"],["featured_media"]]):void 0,p=o();return{block:e("core/block-editor").getBlock(t.clientId),hasPublishAction:!!(0,f.get)(p,["_links","wp:action-publish"]),isSaving:s().some((e=>i(e.kind,e.name,e.key))),simplePayment:u,featuredMedia:l?r(l):null,postLinkUrl:p?.guid?.raw,isPostEditor:Object.keys(o()).length>0}}));t.Z=(0,s.compose)(_,s.withInstanceId)(E)},36227:function(e,t,n){"use strict";var r=n(31985),o=n(61390);(0,r.Z)(o.u2,o.Xd)},39416:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(55609),i=n(69307),s=n(65736),c=n(92819),l=n(94545);const __=s.__,u=e=>t=>e({featuredMediaId:(0,c.get)(t,"id",0),featuredMediaUrl:(0,c.get)(t,"url",null),featuredMediaTitle:(0,c.get)(t,"title",null)});t.Z=e=>{let{featuredMediaId:t,featuredMediaUrl:n,featuredMediaTitle:s,setAttributes:c}=e;return t?(0,r.createElement)("div",null,(0,r.createElement)(i.Fragment,null,(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(a.ToolbarGroup,null,(0,r.createElement)(a.ToolbarItem,null,(()=>(0,r.createElement)(o.MediaUpload,{onSelect:u(c),allowedTypes:["image"],value:t,render:e=>{let{open:t}=e;return(0,r.createElement)(l.Z,{label:__("Edit Image","jetpack"),onClick:t})}}))),(0,r.createElement)(a.ToolbarButton,{icon:"trash",title:__("Remove Image","jetpack"),onClick:()=>c({featuredMediaId:null,featuredMediaUrl:null,featuredMediaTitle:null})}))),(0,r.createElement)("figure",null,(0,r.createElement)("img",{src:n,alt:s})))):(0,r.createElement)(o.MediaPlaceholder,{icon:(0,r.createElement)(o.BlockIcon,{icon:"format-image"}),labels:{title:__("Product Image","jetpack")},accept:"image/*",allowedTypes:["image"],onSelect:u(c)})}},61390:function(e,t,n){"use strict";n.d(t,{Xd:function(){return v},u2:function(){return f}});var r=n(51806),o=n(13419),a=n(55609),i=n(69307),s=n(65736),c=n(70355),l=n(36825),u=n(66763),p=n(24097),d=n(36239),m=n(16376),h=n(60206);const __=s.__,_x=s._x,f="simple-payments",g=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(a.Path,{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"})),b=(0,o.Wp)()||(0,o.Ug)()?"https://wordpress.com/support/pay-with-paypal/":"https://jetpack.com/support/jetpack-blocks/pay-with-paypal/",v={title:__("Pay with PayPal","jetpack"),description:(0,r.createElement)(i.Fragment,null,(0,r.createElement)("p",null,__("Add credit and debit card payment buttons with minimal setup. Good for collecting donations or payments for products and services.","jetpack")),(0,r.createElement)("p",null,__("Good for collecting donations or payments for products and services.","jetpack")),(0,r.createElement)(a.ExternalLink,{href:b},__("Support reference","jetpack"))),icon:{src:g,foreground:(0,c.m)()},category:"earn",keywords:[_x("buy","block search term","jetpack"),_x("commerce","block search term","jetpack"),_x("credit card","block search term","jetpack"),_x("debit card","block search term","jetpack"),_x("earn","block search term","jetpack"),_x("ecommerce","block search term","jetpack"),_x("money","block search term","jetpack"),_x("paid","block search term","jetpack"),_x("payments","block search term","jetpack"),_x("products","block search term","jetpack"),_x("purchase","block search term","jetpack"),_x("sell","block search term","jetpack"),_x("shop","block search term","jetpack"),"square",_x("payments","block search term","jetpack")],attributes:{currency:{type:"string",default:l.a7},content:{type:"string",source:"html",selector:".jetpack-simple-payments-description p",default:""},email:{type:"string",default:""},featuredMediaId:{type:"number",default:0},featuredMediaUrl:{type:"string",source:"attribute",selector:".jetpack-simple-payments-image img",attribute:"src",default:null},featuredMediaTitle:{type:"string",source:"attribute",selector:".jetpack-simple-payments-image img",attribute:"alt",default:null},multiple:{type:"boolean",default:!1},postLinkUrl:{type:"string",source:"attribute",selector:".jetpack-simple-payments-purchase",attribute:"href"},postLinkText:{type:"string",source:"html",selector:".jetpack-simple-payments-purchase",default:__("Click here to purchase.","jetpack")},price:{type:"number"},productId:{type:"number"},title:{type:"string",source:"html",selector:".jetpack-simple-payments-title p",default:""}},transforms:{from:[{type:"shortcode",tag:"simple-payment",attributes:{productId:{type:"number",shortcode:e=>{let{named:{id:t}}=e;if(!t)return;const n=parseInt(t,10);return n||void 0}}}}]},edit:d.Z,save:m.Z,example:{attributes:{price:25,title:__("Jetpack t-shirt","jetpack"),content:__("Take flight in ultimate comfort with this stylish t-shirt featuring the Jetpack logo.","jetpack"),email:"jetpack@jetpack.com",featuredMediaUrl:h}},supports:{className:!1,customClassName:!1,html:!1,reusable:!1},deprecated:[u.Z,p.Z]}},72802:function(e,t,n){"use strict";var r=n(51806),o=n(65736),a=n(23879),i=n(22323);const __=o.__;t.Z=e=>{let{title:t="",content:n="",formattedPrice:o="",multiple:s=!1,featuredMediaUrl:c=null,featuredMediaTitle:l=null}=e;return(0,r.createElement)("div",{className:"jetpack-simple-payments-wrapper"},(0,r.createElement)("div",{className:"jetpack-simple-payments-product"},c&&(0,r.createElement)("div",{className:"jetpack-simple-payments-product-image"},(0,r.createElement)("figure",{className:"jetpack-simple-payments-image"},(0,r.createElement)("img",{src:c,alt:l}))),(0,r.createElement)("div",{className:"jetpack-simple-payments-details"},t&&(0,r.createElement)("div",{className:"jetpack-simple-payments-title"},(0,r.createElement)("p",null,t)),n&&(0,r.createElement)("div",{className:"jetpack-simple-payments-description"},(0,r.createElement)("p",null,n)),o&&(0,r.createElement)("div",{className:"jetpack-simple-payments-price"},(0,r.createElement)("p",null,o)),(0,r.createElement)("div",{className:"jetpack-simple-payments-purchase-box"},s&&(0,r.createElement)("div",{className:"jetpack-simple-payments-items"},(0,r.createElement)("input",{className:"jetpack-simple-payments-items-number",readOnly:!0,type:"number",value:"1"})),(0,r.createElement)("div",{className:"jetpack-simple-payments-button"},(0,r.createElement)("img",{alt:__("Pay with PayPal","jetpack"),src:i,srcSet:`${a} 2x`}))))))}},16376:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(51806),o=n(96059);function a(e){let{attributes:t}=e;const{content:n,currency:a,featuredMediaUrl:i,featuredMediaTitle:s,postLinkUrl:c,postLinkText:l,price:u,productId:p,title:d}=t;return p?(0,r.createElement)("div",{className:`jetpack-simple-payments-wrapper jetpack-simple-payments-${p}`},(0,r.createElement)("div",{className:"jetpack-simple-payments-product"},i&&(0,r.createElement)("div",{className:"jetpack-simple-payments-product-image"},(0,r.createElement)("div",{className:"jetpack-simple-payments-image"},(0,r.createElement)("figure",null,(0,r.createElement)("img",{src:i,alt:s})))),(0,r.createElement)("div",{className:"jetpack-simple-payments-details"},(0,r.createElement)("div",{className:"jetpack-simple-payments-title"},(0,r.createElement)("p",null,d)),(0,r.createElement)("div",{className:"jetpack-simple-payments-description"},(0,r.createElement)("p",null,n)),(0,r.createElement)("div",{className:"jetpack-simple-payments-price"},(0,r.createElement)("p",null,(0,o.T4)(u,a))),(0,r.createElement)("a",{className:"jetpack-simple-payments-purchase",href:c,target:"_blank",rel:"noopener noreferrer"},l)))):null}},96059:function(e,t,n){"use strict";n.d(t,{N3:function(){return a},T4:function(){return c},w:function(){return s}});var r=n(43317),o=n(92819);n(36825);const a=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},i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US";const t=window?.window?.navigator;return t?.languages?.length?t.languages[0]:t?.userLanguage??t?.language??t?.browserLanguage??e},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const{precision:a,symbol:i}=(0,r.X)(t),s=e.toFixed(a);return n?`${s} ${(0,o.trimEnd)(i,".")}`:s},c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!window.Intl||"function"!=typeof Intl.NumberFormat)return s(e,t,n);const r=[window?.Jetpack_Editor_Initial_State?.siteLocale??"en-US",i(),"en-US"];let o,a={};for(o of(n&&(a={style:"currency",currency:t}),r))try{return Intl.NumberFormat(o,a).format(e)}catch{continue}return s(e,t,n)}},20288:function(e,t,n){"use strict";n.d(t,{G:function(){return l},J:function(){return u}});var r=n(51806),o=n(52175),a=n(55609),i=n(69307),s=n(65736),c=n(92819);const __=s.__,_x=s._x;function l(e){let{attributes:{autoplay:t,delay:n,effect:o,images:s,sizeSlug:l},imageSizeOptions:u,onChangeImageSize:p,setAttributes:d}=e;const m="undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,h=[{label:_x("Slide","Slideshow transition effect","jetpack"),value:"slide"},{label:_x("Fade","Slideshow transition effect","jetpack"),value:"fade"}];return(0,r.createElement)(i.Fragment,null,(0,r.createElement)(a.PanelBody,{title:__("Autoplay","jetpack")},(0,r.createElement)(a.ToggleControl,{label:__("Autoplay","jetpack"),help:__("Autoplay between slides","jetpack"),checked:t,onChange:e=>{d({autoplay:e})}}),t&&(0,r.createElement)(a.RangeControl,{label:__("Delay between transitions (in seconds)","jetpack"),value:n,onChange:e=>{d({delay:e})},min:1,max:5}),t&&m&&(0,r.createElement)("span",null,__("The Reduce Motion accessibility option is selected, therefore autoplay will be disabled in this browser.","jetpack"))),(0,r.createElement)(a.PanelBody,{title:__("Effects","jetpack")},(0,r.createElement)(a.SelectControl,{label:__("Transition","jetpack"),value:o,onChange:e=>{d({effect:e})},options:h})),!(0,c.isEmpty)(s)&&!(0,c.isEmpty)(u)&&(0,r.createElement)(a.PanelBody,{title:__("Image Settings","jetpack")},(0,r.createElement)(a.SelectControl,{label:__("Size","jetpack"),value:l,options:u,onChange:e=>p(e)})))}function u(e){let{allowedMediaTypes:t,attributes:{images:n},onSelectImages:s}=e;return(0,r.createElement)(i.Fragment,null,!!n.length&&(0,r.createElement)(a.ToolbarGroup,null,(0,r.createElement)(a.ToolbarItem,null,(()=>(0,r.createElement)(o.MediaUpload,{onSelect:s,allowedTypes:t,multiple:!0,gallery:!0,value:n.map((e=>e.id)),render:e=>{let{open:t}=e;return(0,r.createElement)(a.Button,{label:__("Edit Slideshow","jetpack"),onClick:t},__("Edit","jetpack"))}})))))}},30847:function(e,t,n){"use strict";async function r(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:".swiper-container",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o={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(r||{}).map((e=>{let[t,n]=e;return[t,function(){n(this)}]})))},[{default:a}]=await Promise.all([Promise.all([n.e(958),n.e(390)]).then(n.t.bind(n,59101,23)),Promise.all([n.e(958),n.e(390)]).then(n.bind(n,89701))]);return new a(e,{...o,...t})}n.d(t,{Z:function(){return r}})},21233:function(e,t,n){"use strict";var r=n(51806),o=n(11313),a=n(52175),i=n(55609),s=n(94333),c=n(9818),l=n(12238),u=n(69307),p=n(65736),d=n(92819),m=n(20288),h=n(19486),f=n(19775);const __=p.__,g=["image"],b=(e,t)=>{const n=(0,d.pick)(e,["alt","id","link","caption"]);return n.url=(0,d.get)(e,["sizes",t,"url"])||(0,d.get)(e,["media_details","sizes",t,"source_url"])||e.url,n};class v extends u.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((e=>{let{id:t}=e;return parseInt(t,10)}))}),this.props.setAttributes(e)}onSelectImages=e=>{const{sizeSlug:t}=this.props.attributes,n=e.map((e=>b(e,t)));this.setAttributes({images:n})};onRemoveImage=e=>()=>{const t=(0,d.filter)(this.props.attributes.images,((t,n)=>e!==n));this.setState({selectedImage:null}),this.setAttributes({images:t})};addFiles=e=>{const t=this.props.attributes.images||[],n=this.props.attributes.sizeSlug,{lockPostSaving:r,unlockPostSaving:a,noticeOperations:i}=this.props,s="slideshowBlockLock";r(s),(0,l.mediaUpload)({allowedTypes:g,filesList:e,onFileChange:e=>{const r=e.map((e=>b(e,n)));this.setAttributes({images:[...t,...r]}),r.every((e=>(0,o.isBlobURL)(e.url)))||a(s)},onError:i.createErrorNotice})};uploadFromFiles=e=>this.addFiles(e.target.files);getImageSizeOptions(){const{imageSizes:e}=this.props;return(0,d.map)(e,(e=>{let{name:t,slug:n}=e;return{value:n,label:t}}))}updateImagesSize=e=>{const{images:t}=this.props.attributes,{resizedImages:n}=this.props,r=t.map((t=>{const r=n.find((e=>{let{id:n}=e;return parseInt(n,10)===parseInt(t.id,10)})),o=(0,d.get)(r,["sizes",e,"source_url"]);return{...t,...o&&{url:o}}}));this.setAttributes({images:r,sizeSlug:e})};render(){const{attributes:e,className:t,isSelected:n,noticeOperations:o,noticeUI:s}=this.props,{align:c,autoplay:l,delay:p,effect:d,images:b}=e,v=this.getImageSizeOptions(),k=(0,r.createElement)(u.Fragment,null,(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(m.G,{attributes:e,imageSizeOptions:v,onChangeImageSize:this.updateImagesSize,setAttributes:e=>this.setAttributes(e)})),(0,r.createElement)(a.BlockControls,null,(0,r.createElement)(m.J,{allowedMediaTypes:g,attributes:e,onSelectImages:this.onSelectImages})));return 0===b.length?(0,r.createElement)(u.Fragment,null,k,(0,r.createElement)(a.MediaPlaceholder,{icon:f.qv,className:t,labels:{title:__("Slideshow","jetpack"),instructions:__("Drag images, upload new ones or select files from your library.","jetpack")},onSelect:this.onSelectImages,accept:"image/*",allowedTypes:g,multiple:!0,notices:s,onError:o.createErrorNotice})):(0,r.createElement)(u.Fragment,null,k,s,(0,r.createElement)(h.Z,{align:c,autoplay:l,className:t,delay:p,effect:d,images:b,onError:o.createErrorNotice}),(0,r.createElement)(i.DropZone,{onFilesDrop:this.addFiles}),n&&(0,r.createElement)("div",{className:"wp-block-jetpack-slideshow__add-item"},(0,r.createElement)(i.FormFileUpload,{multiple:!0,className:"wp-block-jetpack-slideshow__add-item-button",onChange:this.uploadFromFiles,accept:"image/*",icon:"insert"},__("Upload an image","jetpack"))))}}t.ZP=(0,s.compose)((0,c.withSelect)(((e,t)=>({imageSizes:e("core/editor").getEditorSettings().imageSizes,resizedImages:t.attributes.ids.reduce(((t,n)=>{const r=e("core").getMedia(n);return[...t,{id:n,sizes:(0,d.get)(r,["media_details","sizes"])}]}),[])}))),(0,c.withDispatch)((e=>{const{lockPostSaving:t,unlockPostSaving:n}=e("core/editor");return{lockPostSaving:t,unlockPostSaving:n}})),i.withNotices)(v)},17013:function(e,t,n){"use strict";var r=n(31985),o=n(19775);(0,r.Z)(o.u2,o.Xd)},19775:function(e,t,n){"use strict";n.d(t,{Xd:function(){return b},qv:function(){return h},u2:function(){return g}});var r=n(51806),o=n(55609),a=n(65736),i=n(70355),s=n(5820),c=n(21233),l=n(67240),u=n(65784),p=n(6425),d=n(85983),m=n(81504);const __=a.__,_x=a._x,h=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},(0,r.createElement)(o.Path,{d:"M21 8V19C21 20.1046 20.1057 21 19.0011 21C15.8975 21 9.87435 21 6 21",fill:"none",stroke:"currentColor",strokeWidth:"1.5"}),(0,r.createElement)(o.Rect,{x:"3.75",y:"3.75",width:"13.5",height:"13.5",rx:"0.875",fill:"none",stroke:"currentColor",strokeWidth:"1.5"}),(0,r.createElement)(o.Path,{d:"M9 14L12 11L9 8",fill:"none",stroke:"currentColor",strokeWidth:"1.5"})),f={align:"center",autoplay:!0,ids:[22,23],images:[{alt:"",caption:"",id:22,url:u},{alt:"",caption:"",id:23,url:p},{alt:"",caption:"",id:23,url:d}],effect:"slide"},g="slideshow",b={title:__("Slideshow","jetpack"),category:(0,s.Z)("media","layout"),keywords:[_x("image","block search term","jetpack"),_x("gallery","block search term","jetpack"),_x("slider","block search term","jetpack")],description:__("Display multiple images in sequential order.","jetpack"),attributes:{align:{default:"center",type:"string"},autoplay:{type:"boolean",default:!1},delay:{type:"number",default:3},ids:{default:[],type:"array"},images:{type:"array",default:[],source:"query",selector:".swiper-slide",query:{alt:{source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},id:{source:"attribute",selector:"img",attribute:"data-id"},url:{source:"attribute",selector:"img",attribute:"src"}}},effect:{type:"string",default:"slide"},sizeSlug:{type:"string"}},supports:{align:["center","wide","full"],html:!1},icon:{src:h,foreground:(0,i.m)()},edit:c.ZP,save:l.Z,transforms:m.Z,example:{attributes:f}}},85575:function(e,t,n){"use strict";n.d(t,{D:function(){return o}});var r=n(65736);const __=r.__;function o(e,t,n){let o="";if(n<=5)for(let e=1;e<=n;e++){o+='<button class="'+`swiper-pagination-bullet${e===t?" swiper-pagination-bullet-active":""}`+'" tab-index="0" role="button" aria-label="'+(0,r.sprintf)(/* translators: placeholder is the the video number to navigate to */ __("Go to slide %s","jetpack"),e)+'"></button>'}else o+=`<div class="swiper-pagination-simple">${t} / ${n}</div>`;return o}},67240:function(e,t,n){"use strict";var r=n(51806),o=n(19486);t.Z=e=>{let{attributes:{align:t,autoplay:n,delay:a,effect:i,images:s},className:c}=e;return(0,r.createElement)(o.Z,{align:t,autoplay:n,className:c,delay:a,effect:i,images:s})}},19486:function(e,t,n){"use strict";var r=n(51806),o=n(11313),a=n(52175),i=n(55609),s=n(69307),c=n(65736),l=n(65235),u=n.n(l),p=n(92819),d=n(6209),m=n(30847),h=n(85575),f=n(17766);const __=c.__;class g extends s.Component{pendingRequestAnimationFrame=null;resizeObserver=null;static defaultProps={effect:"slide"};constructor(e){super(e),this.slideshowRef=(0,s.createRef)(),this.btnNextRef=(0,s.createRef)(),this.btnPrevRef=(0,s.createRef)(),this.paginationRef=(0,s.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:n,delay:r,effect:o,images:a,onError:i}=this.props;if(t===e.align&&(0,p.isEqual)(a,e.images)||this.swiperInstance&&this.swiperInstance.update(),o!==e.effect||n!==e.autoplay||r!==e.delay||a!==e.images){let t;t=this.swiperIndex?a.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((()=>{i(__("The Swiper library could not be loaded.","jetpack"))}))}}initializeResizeObserver=e=>{this.clearResizeObserver(),this.resizeObserver=new d.Z((()=>{this.clearPendingRequestAnimationFrame(),this.pendingRequestAnimationFrame=requestAnimationFrame((()=>{(0,f.$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:n,effect:s,images:c}=this.props;return(0,r.createElement)("div",{className:t,"data-autoplay":e||null,"data-delay":e?n:null,"data-effect":s},(0,r.createElement)("div",{className:"wp-block-jetpack-slideshow_container swiper-container",ref:this.slideshowRef},(0,r.createElement)("ul",{className:"wp-block-jetpack-slideshow_swiper-wrapper swiper-wrapper"},c.map((e=>{let{alt:t,caption:n,id:s,url:c}=e;return(0,r.createElement)("li",{className:u()("wp-block-jetpack-slideshow_slide","swiper-slide",(0,o.isBlobURL)(c)&&"is-transient"),key:s||c},(0,r.createElement)("figure",null,(0,r.createElement)("img",{alt:t,className:`wp-block-jetpack-slideshow_image wp-image-${s}`,"data-id":s,src:c}),(0,o.isBlobURL)(c)&&(0,r.createElement)(i.Spinner,null),n&&(0,r.createElement)(a.RichText.Content,{className:"wp-block-jetpack-slideshow_caption gallery-caption",tagName:"figcaption",value:n})))}))),(0,r.createElement)("a",{className:"wp-block-jetpack-slideshow_button-prev swiper-button-prev swiper-button-white",ref:this.btnPrevRef,role:"button"}),(0,r.createElement)("a",{className:"wp-block-jetpack-slideshow_button-next swiper-button-next swiper-button-white",ref:this.btnNextRef,role:"button"}),(0,r.createElement)("a",{"aria-label":"Pause Slideshow",className:"wp-block-jetpack-slideshow_button-pause",role:"button"}),(0,r.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=(()=>{var e=this;return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return(0,m.Z)(e.slideshowRef.current,{autoplay:!(!e.props.autoplay||e.prefersReducedMotion())&&{delay:1e3*e.props.delay,disableOnInteraction:!1},effect:e.props.effect,loop:!0,initialSlide:t,navigation:{nextEl:e.btnNextRef.current,prevEl:e.btnPrevRef.current},pagination:{clickable:!0,el:e.paginationRef.current,type:"custom",renderCustom:h.D}},{init:f.UA,imagesReady:f.$m,paginationRender:f.Wj,transitionEnd:f.HV})}})()}t.Z=g},17766:function(e,t,n){"use strict";n.d(t,{$m:function(){return l},HV:function(){return u},UA:function(){return c},Wj:function(){return p}});var r=n(81975);const o=16/9,a=.8,i=600,s="wp-block-jetpack-slideshow_autoplay-paused";function c(e){l(e),u(e);document.querySelector("body").dispatchEvent(new Event("jetpack-lazy-images-load")),e.el.querySelector(".wp-block-jetpack-slideshow_button-pause").addEventListener("click",(function(){e.el&&(e.el.classList.contains(s)?(e.el.classList.remove(s),e.autoplay.start(),this.setAttribute("aria-label","Pause Slideshow")):(e.el.classList.add(s),e.autoplay.stop(),this.setAttribute("aria-label","Play Slideshow")))}))}function l(e){if(!e||!e.el)return;const t=e.el.querySelector('.swiper-slide[data-swiper-slide-index="0"] img');if(!t)return;const n=t.clientWidth/t.clientHeight,r=Math.max(Math.min(n,o),1),s="undefined"!=typeof window?window.innerHeight*a:i,c=Math.min(e.width/r,s),l=`${Math.floor(c)}px`,u=`${Math.floor(c/2)}px`;e.el.classList.add("wp-swiper-initialized"),e.wrapperEl.style.height=l,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,n)=>{t.setAttribute("aria-hidden",n===e.activeIndex?"false":"true"),n===e.activeIndex?t.setAttribute("tabindex","-1"):t.removeAttribute("tabindex")})),function(e){const t=e.slides[e.activeIndex];if(!t)return;const n=t.getElementsByTagName("FIGCAPTION")[0],o=t.getElementsByTagName("IMG")[0];e.a11y.liveRegion&&(e.a11y.liveRegion[0].innerHTML=n?n.innerHTML:(0,r.escapeHTML)(o.alt))}(e)}function p(e){(e.pagination.bullets||[]).forEach((t=>{t.addEventListener("click",(()=>{const t=e.slides[e.realIndex];setTimeout((()=>{t.focus()}),500)}))}))}},81504:function(e,t,n){"use strict";var r=n(4981),o=n(92819);function a(e){return(0,o.filter)(e,(e=>{let{id:t,url:n}=e;return t&&n}))}const i={from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],isMatch:e=>a(e).length>0,transform:e=>{const t=a(e);return(0,r.createBlock)("jetpack/slideshow",{images:t.map((e=>{let{alt:t,caption:n,id:r,url:o}=e;return{alt:t,caption:n,id:r,url:o}})),ids:t.map((e=>{let{id:t}=e;return t}))})}},{type:"block",blocks:["core/gallery","jetpack/tiled-gallery"],transform:e=>{let{images:t}=e;const n=a(t);return n.length>0?(0,r.createBlock)("jetpack/slideshow",{images:n.map((e=>{let{alt:t,caption:n,id:r,url:o}=e;return{alt:t,caption:n,id:r,url:o}})),ids:n.map((e=>{let{id:t}=e;return t}))}):(0,r.createBlock)("jetpack/slideshow")}}],to:[{type:"block",blocks:["core/gallery"],transform:e=>{let{images:t,ids:n}=e;return(0,r.createBlock)("core/gallery",{images:t,ids:n})}},{type:"block",blocks:["core/image"],transform:e=>{let{images:t}=e;return t.length>0?t.map((e=>{let{id:t,url:n,alt:o,caption:a}=e;return(0,r.createBlock)("core/image",{id:t,url:n,alt:o,caption:a})})):(0,r.createBlock)("core/image")}}]};t.Z=i},3740:function(e,t,n){"use strict";n.d(t,{EU:function(){return u},GP:function(){return s},P0:function(){return d},RA:function(){return r},Z5:function(){return i},hI:function(){return a},q3:function(){return o},sw:function(){return l},xJ:function(){return c},yw:function(){return p}});const r=["image"],o=4,a=20,i=20,s=2e3,c="circle",l="columns",u="rectangular",p="square",d=[{isDefault:!0,name:u},{name:c},{name:p},{name:l}]},73463:function(e,t,n){"use strict";var r=n(76476),o=n(43125),a=n(67525),i=n(99504);t.Z=[i,a,o,r]},1377:function(e,t,n){"use strict";n.d(t,{EU:function(){return i},GP:function(){return a},P0:function(){return s},hI:function(){return o},q3:function(){return r}});const r=4,o=20,a=2e3,i="rectangular",s=[{isDefault:!0,name:i},{name:"circle"},{name:"square"},{name:"columns"}]},56005:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(51806),o=n(11313);function a(e){const{"aria-label":t,alt:n,height:a,id:i,link:s,linkTo:c,origUrl:l,url:u,width:p}=e;if((0,o.isBlobURL)(l))return null;let d;switch(c){case"media":d=u;break;case"attachment":d=s}const m=(0,r.createElement)("img",{alt:n,"aria-label":t,"data-height":a,"data-id":i,"data-link":s,"data-url":l,"data-width":p,src:u});return(0,r.createElement)("figure",{className:"tiled-gallery__item"},d?(0,r.createElement)("a",{href:d},m):m)}},76476:function(e,t,n){"use strict";n.r(t),n.d(t,{attributes:function(){return o},save:function(){return r.Z},support:function(){return a}});var r=n(91507);const o={align:{default:"center",type:"string"},className:{default:`is-style-${n(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"}},a={align:["center","wide","full"],customClassName:!1,html:!1}},52235:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806);function o(e){let{children:t}=e;return(0,r.createElement)("div",{className:"tiled-gallery__col"},t)}},89754:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806);function o(e){let{children:t,galleryRef:n}=e;return(0,r.createElement)("div",{className:"tiled-gallery__gallery",ref:n},t)}},15645:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(51806),o=n(11313),a=n(69307),i=n(65736),s=n(69424),c=n(1377),l=n(56005),u=n(30791),p=n(79313);const __=i.__;class d extends a.Component{photonize(e){let{height:t,width:n,url:r}=e;if(!r)return;if((0,o.isBlobURL)(r)||/^https?:\/\/localhost/.test(r))return r;const a=r.split("?",1)[0],i=function(e){const{host:t}=new URL(e,window.location.href);return/\.files\.wordpress\.com$/.test(t)}(r)?h:s.Z,{layoutStyle:l}=this.props;if(m(l)&&n&&t){const e=Math.min(c.GP,n,t);return i(a,{resize:`${e},${e}`})}return i(a)}renderImage(e,t){const{images:n,linkTo:o,selectedImage:a}=this.props,s=(0,i.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,n.length);return(0,r.createElement)(l.Z,{alt:e.alt,"aria-label":s,height:e.height,id:e.id,origUrl:e.url,isSelected:a===t,key:t,link:e.link,linkTo:o,url:this.photonize(e),width:e.width})}render(){const{align:e,children:t,className:n,columns:o,images:a,layoutStyle:i}=this.props,s=m(i)?p.Z:u.Z,c=this.props.images.map(this.renderImage,this);return(0,r.createElement)("div",{className:n},(0,r.createElement)(s,{align:e,columns:o,images:a,layoutStyle:i,renderedImages:c}),t)}}function m(e){return["circle","square"].includes(e)}function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},r=Object.assign(new URL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,o]of Object.entries(t))r.searchParams.set(n.hasOwnProperty(e)?n[e]:e,o);return r.toString()}},30791:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(51806),o=n(69307),a=n(6209),i=n(52235),s=n(89754),c=n(36472),l=n(6817),u=n(6648);class p extends o.Component{gallery=(0,o.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:n}of e){const{width:e}=t;(0,u.W)(n).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 a.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:n,layoutStyle:o,renderedImages:a}=this.props,u=(0,l.h9)(n),p="columns"===o?(0,l.sv)(u,t):(0,l.T9)(u,{isWide:["full","wide"].includes(e)});let d=0;return(0,r.createElement)(s.Z,{galleryRef:this.gallery},p.map(((e,t)=>(0,r.createElement)(c.Z,{key:t},e.map(((e,t)=>{const n=a.slice(d,d+e);return d+=e,(0,r.createElement)(i.Z,{key:t},n)}))))))}}},6817:function(e,t,n){"use strict";n.d(t,{T9:function(){return S},h9:function(){return o},sv:function(){return i}});var r=n(92819);function o(e){return(0,r.map)(e,a)}function a(e){let{height:t,width:n}=e;return t&&n?n/t:1}function i(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const n=(0,r.sum)(e)/t,o=[];let a=e,i=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(a,(t=>{const r=i<=(e+1)*n;return r&&(i+=t),r})).length;o.push(t),a=(0,r.drop)(a,t)}return o.push(a.length),[o]}const s=j([2,1,2],5),c=x([L,L,P,L,L]),l=x([L,L,L,P,L,L,L]),u=j([3,1,3],5),p=x([P,L,L,P]),d=j([1,2,1],5),m=x([P,L,L,L]),h=j([1,3],3),f=x([L,L,L,P]),g=j([3,1],3),b=x([T(1.6),(0,r.overEvery)(A(.9),T(2)),(0,r.overEvery)(A(.9),T(2))]),v=j([1,2],3),k=j([1,1,1,1,1],1),y=j([1,1,1,1],1),w=j([1,1,1],3),E=x([(0,r.overEvery)(A(.9),T(2)),(0,r.overEvery)(A(.9),T(2)),T(1.6)]),_=j([2,1],3),C=x([function(e){return e>=2}]);function S(e){let{isWide:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(e,o)=>{if(!o.length)return e;let a;a=o.length>15&&c(o)&&s(e)?[2,1,2]:o.length>15&&l(o)&&u(e)?[3,1,3]:5!==o.length&&p(o)&&d(e)?[1,2,1]:m(o)&&h(e)?[1,3]:f(o)&&g(e)?[3,1]:b(o)&&v(e)?[1,2]:t&&(5===o.length||10!==o.length&&o.length>6)&&k(e)&&(0,r.sum)((0,r.take)(o,5))<5?[1,1,1,1,1]:function(e,t){const n=(0,r.sum)((0,r.take)(t,4));return y(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,o)?[1,1,1,1]:function(e,t,n){const o=(0,r.sum)((0,r.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&w(e)&&(o<2.5||o<5&&t.length>=3&&t[0]===t[2]||n)}(e,o,t)?[1,1,1]:E(o)&&_(e)?[2,1]:C(o)?[1]:o.length>3?[1,1]:Array(o.length).fill(1);const i=e.concat([a]),S=(0,r.sum)(a),j=o.slice(S);return n(i,j)};return n([],e)}function j(e,t){return n=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}function x(e){return t=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function L(e){return e>=1&&e<2}function P(e){return e<1}function A(e){return t=>t>=e}function T(e){return t=>t<e}},6648:function(e,t,n){"use strict";n.d(t,{W:function(){return i},i:function(){return a}});var r=n(1377);function o(e,t){const n=(t-e.reduce(((e,t)=>e+t),0))/e.length;return e.map((e=>e+n))}function a(e,t){!function(e,t,n){let[a,i]=t;const p=1/a*(n-r.q3*(e.childElementCount-1)-i);!function(e,t){let{rawHeight:n,rowWidth:a}=t;const i=s(e),p=i.map((e=>(n-r.q3*(e.childElementCount-1))*l(e)[0])),d=o(p,a);i.forEach(((e,t)=>{const a=p[t],i=d[t];!function(e,t){let{colHeight:n,width:r,rawWidth:a}=t;const i=c(e).map((e=>a/u(e))),s=o(i,n);Array.from(e.children).forEach(((e,t)=>{const n=s[t];e.setAttribute("style",`height:${n}px;width:${r}px;`)}))}(e,{colHeight:n-r.q3*(e.childElementCount-1),width:i,rawWidth:a})}))}(e,{rawHeight:p,rowWidth:n-r.q3*(e.childElementCount-1)})}(e,function(e){const t=s(e).map(l).reduce(((e,t)=>{let[n,r]=e,[o,a]=t;return[n+o,r+a]}),[0,0]);return t}(e),t)}function i(e){return Array.from(e.querySelectorAll(".tiled-gallery__row"))}function s(e){return Array.from(e.querySelectorAll(".tiled-gallery__col"))}function c(e){return Array.from(e.querySelectorAll(".tiled-gallery__item > img, .tiled-gallery__item > a > img"))}function l(e){const t=c(e),n=t.length,r=1/t.map(u).reduce(((e,t)=>e+1/t),0);return[r,r*n||1]}function u(e){const t=parseInt(e.dataset.width,10),n=parseInt(e.dataset.height,10);return t&&!Number.isNaN(t)&&n&&!Number.isNaN(n)?t/n:1}},36472:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(51806),o=n(65235),a=n.n(o);function i(e){let{children:t,className:n}=e;return(0,r.createElement)("div",{className:a()("tiled-gallery__row",n)},t)}},79313:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),o=n(92819),a=n(1377),i=n(52235),s=n(89754),c=n(36472);function l(e){let{columns:t,renderedImages:n}=e;const l=Math.min(a.hI,t),u=n.length%l;return(0,r.createElement)(s.Z,null,[...u?[(0,o.take)(n,u)]:[],...(0,o.chunk)((0,o.drop)(n,u),l)].map(((e,t)=>(0,r.createElement)(c.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,r.createElement)(i.Z,{key:t},e)))))))}},91507:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(51806),o=n(81518),a=n(1377),i=n(15645);function s(e){return Math.min(3,e.images.length)}function c(e){let{attributes:t}=e;const{images:n}=t;if(!n.length)return null;const{align:c,className:l,columns:u=s(t),linkTo:p}=t;return(0,r.createElement)(i.Z,{align:c,className:l,columns:u,images:n,layoutStyle:(0,o.t)(a.P0,l),linkTo:p})}},86738:function(e,t,n){"use strict";n.d(t,{EU:function(){return s},GP:function(){return a},P0:function(){return c},Z5:function(){return o},hI:function(){return r},xJ:function(){return i}});const r=20,o=20,a=2e3,i="circle",s="rectangular",c=[{isDefault:!0,name:s},{name:i},{name:"square"},{name:"columns"}]},64931:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(51806),o=n(11313),a=n(65235),i=n.n(a);function s(e){const{alt:t,imageFilter:n,height:a,id:s,link:c,linkTo:l,origUrl:u,url:p,width:d}=e;if((0,o.isBlobURL)(u))return null;let m;switch(l){case"media":m=p;break;case"attachment":m=c}const h=(0,r.createElement)("img",{alt:t,"data-height":a,"data-id":s,"data-link":c,"data-url":u,"data-width":d,src:p});return(0,r.createElement)("figure",{className:i()("tiled-gallery__item",{[`filter__${n}`]:!!n})},m?(0,r.createElement)("a",{href:m},h):h)}},43125:function(e,t,n){"use strict";n.r(t),n.d(t,{attributes:function(){return a},save:function(){return o.Z},supports:function(){return i}});var r=n(86738),o=n(68405);const a={align:{default:"center",type:"string"},className:{default:`is-style-${r.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}},i={align:["center","wide","full"],customClassName:!1,html:!1}},85407:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806);function o(e){let{children:t}=e;return(0,r.createElement)("div",{className:"tiled-gallery__col"},t)}},40195:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806);function o(e){let{children:t,galleryRef:n}=e;return(0,r.createElement)("div",{className:"tiled-gallery__gallery",ref:n},t)}},73208:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(51806),o=n(69307),a=n(65736),i=n(65235),s=n.n(i),c=n(86738),l=n(64931),u=n(67091),p=n(84420),d=n(87178);const __=a.__;class m extends o.Component{renderImage(e,t){const{columns:n,imageFilter:o,images:i,linkTo:s,layoutStyle:c,selectedImage:p}=this.props,d=(0,a.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,i.length),{src:m,srcSet:h}=(0,u.z)(e,{layoutStyle:c});return(0,r.createElement)(l.Z,{alt:e.alt,"aria-label":d,columns:n,height:e.height,id:e.id,imageFilter:o,isFirstItem:0===t,isLastItem:t+1===i.length,isSelected:p===t,key:t,link:e.link,linkTo:s,origUrl:e.url,showMovers:i.length>1,srcSet:h,url:m,width:e.width})}render(){const{align:e,children:t,className:n,columns:o,images:a,layoutStyle:i,roundedCorners:l}=this.props,m=(0,u.v)(i)?d.Z:p.Z,h=this.props.images.map(this.renderImage,this),f=i!==c.xJ?Math.min(l,c.Z5):0;return(0,r.createElement)("div",{className:s()(n,{[`has-rounded-corners-${f}`]:f>0})},(0,r.createElement)(m,{align:e,columns:o,images:a,layoutStyle:i,renderedImages:h}),t)}}},84420:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),o=n(69307),a=n(85407),i=n(40195),s=n(56243),c=n(12126);class l extends o.Component{gallery=(0,o.createRef)();pendingRaf=null;render(){const{align:e,columns:t,images:n,layoutStyle:o,renderedImages:l}=this.props,u=(0,c.h9)(n),p="columns"===o?(0,c.sv)(u,t):(0,c.T9)(u,{isWide:["full","wide"].includes(e)});let d=0;return(0,r.createElement)(i.Z,{galleryRef:this.gallery},p.map(((e,t)=>(0,r.createElement)(s.Z,{key:t},e.map(((e,t)=>{const n=l.slice(d,d+e);return d+=e,(0,r.createElement)(a.Z,{key:t},n)}))))))}}},12126:function(e,t,n){"use strict";n.d(t,{T9:function(){return S},h9:function(){return o},sv:function(){return i}});var r=n(92819);function o(e){return(0,r.map)(e,a)}function a(e){let{height:t,width:n}=e;return t&&n?n/t:1}function i(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const n=(0,r.sum)(e)/t,o=[];let a=e,i=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(a,(t=>{const r=i<=(e+1)*n;return r&&(i+=t),r})).length;o.push(t),a=(0,r.drop)(a,t)}return o.push(a.length),[o]}const s=j([2,1,2],5),c=x([L,L,P,L,L]),l=x([L,L,L,P,L,L,L]),u=j([3,1,3],5),p=x([P,L,L,P]),d=j([1,2,1],5),m=x([P,L,L,L]),h=j([1,3],3),f=x([L,L,L,P]),g=j([3,1],3),b=x([T(1.6),(0,r.overEvery)(A(.9),T(2)),(0,r.overEvery)(A(.9),T(2))]),v=j([1,2],3),k=j([1,1,1,1,1],1),y=j([1,1,1,1],1),w=j([1,1,1],3),E=x([(0,r.overEvery)(A(.9),T(2)),(0,r.overEvery)(A(.9),T(2)),T(1.6)]),_=j([2,1],3),C=x([function(e){return e>=2}]);function S(e){let{isWide:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(e,o)=>{if(!o.length)return e;let a;a=o.length>15&&c(o)&&s(e)?[2,1,2]:o.length>15&&l(o)&&u(e)?[3,1,3]:5!==o.length&&p(o)&&d(e)?[1,2,1]:m(o)&&h(e)?[1,3]:f(o)&&g(e)?[3,1]:b(o)&&v(e)?[1,2]:t&&(5===o.length||10!==o.length&&o.length>6)&&k(e)&&(0,r.sum)((0,r.take)(o,5))<5?[1,1,1,1,1]:function(e,t){const n=(0,r.sum)((0,r.take)(t,4));return y(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,o)?[1,1,1,1]:function(e,t,n){const o=(0,r.sum)((0,r.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&w(e)&&(o<2.5||o<5&&t.length>=3&&t[0]===t[2]||n)}(e,o,t)?[1,1,1]:E(o)&&_(e)?[2,1]:C(o)?[1]:o.length>3?[1,1]:Array(o.length).fill(1);const i=e.concat([a]),S=(0,r.sum)(a),j=o.slice(S);return n(i,j)};return n([],e)}function j(e,t){return n=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}function x(e){return t=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function L(e){return e>=1&&e<2}function P(e){return e<1}function A(e){return t=>t>=e}function T(e){return t=>t<e}},56243:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(51806),o=n(65235),a=n.n(o);function i(e){let{children:t,className:n}=e;return(0,r.createElement)("div",{className:a()("tiled-gallery__row",n)},t)}},87178:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),o=n(92819),a=n(86738),i=n(85407),s=n(40195),c=n(56243);function l(e){let{columns:t,renderedImages:n}=e;const l=Math.min(a.hI,t),u=n.length%l;return(0,r.createElement)(s.Z,null,[...u?[(0,o.take)(n,u)]:[],...(0,o.chunk)((0,o.drop)(n,u),l)].map(((e,t)=>(0,r.createElement)(c.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,r.createElement)(i.Z,{key:t},e)))))))}},68405:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(51806),o=n(81518),a=n(86738),i=n(73208);function s(e){return Math.min(3,e.images.length)}function c(e){let{attributes:t}=e;const{imageFilter:n,images:c}=t;if(!c.length)return null;const{align:l,className:u,columns:p=s(t),linkTo:d,roundedCorners:m}=t;return(0,r.createElement)(i.Z,{align:l,className:u,columns:p,imageFilter:n,images:c,isSave:!0,layoutStyle:(0,o.t)(a.P0,u),linkTo:d,roundedCorners:m})}},67091:function(e,t,n){"use strict";n.d(t,{v:function(){return s},z:function(){return c}});var r=n(11313),o=n(92819),a=n(69424),i=n(86738);function s(e){return["circle","square"].includes(e)}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.height||!e.url||!e.width)return{};if((0,r.isBlobURL)(e.url)||/^https?:\/\/localhost/.test(e.url)||/^https?:\/\/.*\.local\//.test(e.url))return{src:e.url};const n=e.url.split("?",1)[0],{height:c,width:u}=e,{layoutStyle:p}=t,d=function(e){const{host:t}=new URL(e,window.location.href);return/\.files\.wordpress\.com$/.test(t)}(n)||!0===function(){if("undefined"!=typeof jetpack_plan&&"vip"===jetpack_plan.data)return!0}()?l:a.Z;let m;if(s(p)&&u&&c){const e=Math.min(i.GP,u,c);m=d(n,{resize:`${e},${e}`})}else m=d(n);let h;if(s(p)){const e=Math.min(600,u,c),t=Math.min(i.GP,u,c);h=(0,o.range)(e,t,300).map((e=>{const t=d(n,{resize:`${e},${e}`,strip:"info"});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}else{const e=Math.min(600,u),t=Math.min(i.GP,u);h=(0,o.range)(e,t,300).map((e=>{const t=d(n,{strip:"info",width:e});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}return Object.assign({src:m},h&&{srcSet:h})}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},r=Object.assign(new URL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,o]of Object.entries(t))r.searchParams.set(n.hasOwnProperty(e)?n[e]:e,o);return r.toString()}},13993:function(e,t,n){"use strict";n.d(t,{EU:function(){return s},GP:function(){return a},P0:function(){return c},Z5:function(){return o},hI:function(){return r},xJ:function(){return i}});const r=20,o=20,a=2e3,i="circle",s="rectangular",c=[{isDefault:!0,name:s},{name:i},{name:"square"},{name:"columns"}]},21959:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(51806),o=n(11313),a=n(65235),i=n.n(a);function s(e){const{alt:t,imageFilter:n,height:a,id:s,link:c,linkTo:l,origUrl:u,url:p,width:d}=e;if((0,o.isBlobURL)(u))return null;let m;switch(l){case"media":m=p;break;case"attachment":m=c}const h=(0,r.createElement)("img",{alt:t,"data-height":a,"data-id":s,"data-link":c,"data-url":u,"data-width":d,src:p});return(0,r.createElement)("figure",{className:i()("tiled-gallery__item",{[`filter__${n}`]:!!n})},m?(0,r.createElement)("a",{href:m},h):h)}},67525:function(e,t,n){"use strict";n.r(t),n.d(t,{attributes:function(){return a},migrate:function(){return s},save:function(){return o.Z},supports:function(){return i}});var r=n(13993),o=n(5826);const a={align:{default:"center",type:"string"},className:{default:`is-style-${r.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}},i={align:["center","wide","full"],customClassName:!1,html:!1},s=e=>{const t=Math.pow(10,5);return{...e,columnWidths:e.columnWidths.map((e=>e.map((e=>Math.round(e*t)/t))))}}},17410:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806);function o(e){let{children:t,width:n}=e;const o=Math.pow(10,12),a=Math.round(n*o)/o,i=n?{flexBasis:`${a}%`}:void 0;return(0,r.createElement)("div",{className:"tiled-gallery__col",style:i},t)}},46349:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806);function o(e){let{children:t,galleryRef:n}=e;return(0,r.createElement)("div",{className:"tiled-gallery__gallery",ref:n},t)}},178:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(51806),o=n(69307),a=n(65736),i=n(65235),s=n.n(i),c=n(13993),l=n(21959),u=n(11197),p=n(47510),d=n(65662);const __=a.__;class m extends o.Component{renderImage(e,t){const{columns:n,imageFilter:o,images:i,isSave:s,linkTo:c,layoutStyle:p,onMoveBackward:d,onMoveForward:m,onRemoveImage:h,onSelectImage:f,selectedImage:g,setImageAttributes:b}=this.props,v=(0,a.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,i.length),{src:k,srcSet:y}=(0,u.z)(e,{layoutStyle:p});return(0,r.createElement)(l.Z,{alt:e.alt,"aria-label":v,columns:n,height:e.height,id:e.id,imageFilter:o,isFirstItem:0===t,isLastItem:t+1===i.length,isSelected:g===t,key:t,link:e.link,linkTo:c,onMoveBackward:s?void 0:d(t),onMoveForward:s?void 0:m(t),onRemove:s?void 0:h(t),onSelect:s?void 0:f(t),origUrl:e.url,setAttributes:s?void 0:b(t),showMovers:i.length>1,srcSet:y,url:k,width:e.width})}render(){const{align:e,children:t,className:n,columns:o,images:a,layoutStyle:i,roundedCorners:l,onResize:m,isSave:h,columnWidths:f}=this.props,g=(0,u.v)(i)?d.Z:p.Z,b=this.props.images.map(this.renderImage,this),v=i!==c.xJ?Math.min(l,c.Z5):0;return(0,r.createElement)("div",{className:s()(n,{[`has-rounded-corners-${v}`]:v>0})},(0,r.createElement)(g,{align:e,columns:o,columnWidths:h?f:void 0,images:a,layoutStyle:i,renderedImages:b,onResize:h?void 0:m}),t)}}},47510:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),o=n(69307),a=n(17410),i=n(46349),s=n(78922),c=n(3453);class l extends o.Component{gallery=(0,o.createRef)();pendingRaf=null;render(){const{align:e,columns:t,images:n,layoutStyle:o,renderedImages:l,columnWidths:u}=this.props,p=(0,c.h9)(n),d="columns"===o?(0,c.sv)(p,t):(0,c.T9)(p,{isWide:["full","wide"].includes(e)});let m=0;return(0,r.createElement)(i.Z,{galleryRef:this.gallery},d.map(((e,t)=>(0,r.createElement)(s.Z,{key:t},e.map(((e,n)=>{const o=l.slice(m,m+e);return m+=e,(0,r.createElement)(a.Z,{key:n,width:u?.[t]?.[n]},o)}))))))}}},3453:function(e,t,n){"use strict";n.d(t,{T9:function(){return S},h9:function(){return o},sv:function(){return i}});var r=n(92819);function o(e){return(0,r.map)(e,a)}function a(e){let{height:t,width:n}=e;return t&&n?n/t:1}function i(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const n=(0,r.sum)(e)/t,o=[];let a=e,i=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(a,(t=>{const r=i<=(e+1)*n;return r&&(i+=t),r})).length;o.push(t),a=(0,r.drop)(a,t)}return o.push(a.length),[o]}const s=j([2,1,2],5),c=x([L,L,P,L,L]),l=x([L,L,L,P,L,L,L]),u=j([3,1,3],5),p=x([P,L,L,P]),d=j([1,2,1],5),m=x([P,L,L,L]),h=j([1,3],3),f=x([L,L,L,P]),g=j([3,1],3),b=x([T(1.6),(0,r.overEvery)(A(.9),T(2)),(0,r.overEvery)(A(.9),T(2))]),v=j([1,2],3),k=j([1,1,1,1,1],1),y=j([1,1,1,1],1),w=j([1,1,1],3),E=x([(0,r.overEvery)(A(.9),T(2)),(0,r.overEvery)(A(.9),T(2)),T(1.6)]),_=j([2,1],3),C=x([function(e){return e>=2}]);function S(e){let{isWide:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(e,o)=>{if(!o.length)return e;let a;a=o.length>15&&c(o)&&s(e)?[2,1,2]:o.length>15&&l(o)&&u(e)?[3,1,3]:5!==o.length&&p(o)&&d(e)?[1,2,1]:m(o)&&h(e)?[1,3]:f(o)&&g(e)?[3,1]:b(o)&&v(e)?[1,2]:t&&(5===o.length||10!==o.length&&o.length>6)&&k(e)&&(0,r.sum)((0,r.take)(o,5))<5?[1,1,1,1,1]:function(e,t){const n=(0,r.sum)((0,r.take)(t,4));return y(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,o)?[1,1,1,1]:function(e,t,n){const o=(0,r.sum)((0,r.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&w(e)&&(o<2.5||o<5&&t.length>=3&&t[0]===t[2]||n)}(e,o,t)?[1,1,1]:E(o)&&_(e)?[2,1]:C(o)?[1]:o.length>3?[1,1]:Array(o.length).fill(1);const i=e.concat([a]),S=(0,r.sum)(a),j=o.slice(S);return n(i,j)};return n([],e)}function j(e,t){return n=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}function x(e){return t=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function L(e){return e>=1&&e<2}function P(e){return e<1}function A(e){return t=>t>=e}function T(e){return t=>t<e}},78922:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(51806),o=n(65235),a=n.n(o);function i(e){let{children:t,className:n}=e;return(0,r.createElement)("div",{className:a()("tiled-gallery__row",n)},t)}},65662:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),o=n(92819),a=n(13993),i=n(17410),s=n(46349),c=n(78922);function l(e){let{columns:t,renderedImages:n}=e;const l=Math.min(a.hI,t),u=n.length%l;return(0,r.createElement)(s.Z,null,[...u?[(0,o.take)(n,u)]:[],...(0,o.chunk)((0,o.drop)(n,u),l)].map(((e,t)=>(0,r.createElement)(c.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,r.createElement)(i.Z,{key:t},e)))))))}},5826:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(51806),o=n(81518),a=n(13993),i=n(178);function s(e){return Math.min(3,e.images.length)}function c(e){let{attributes:t}=e;const{imageFilter:n,images:c}=t;if(!c.length)return null;const{align:l,className:u,columns:p=s(t),linkTo:d,roundedCorners:m,columnWidths:h}=t;return(0,r.createElement)(i.Z,{align:l,className:u,columns:p,imageFilter:n,images:c,isSave:!0,layoutStyle:(0,o.t)(a.P0,u),linkTo:d,roundedCorners:m,columnWidths:h})}},11197:function(e,t,n){"use strict";n.d(t,{v:function(){return s},z:function(){return c}});var r=n(11313),o=n(92819),a=n(69424),i=n(13993);function s(e){return["circle","square"].includes(e)}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.height||!e.url||!e.width)return{};if((0,r.isBlobURL)(e.url)||/^https?:\/\/localhost/.test(e.url)||/^https?:\/\/.*\.local\//.test(e.url))return{src:e.url};const n=e.url.split("?",1)[0],{height:c,width:u}=e,{layoutStyle:p}=t,d=function(e){const{host:t}=new URL(e,window.location.href);return/\.files\.wordpress\.com$/.test(t)}(n)||!0===function(){if("undefined"!=typeof jetpack_plan&&"vip"===jetpack_plan.data)return!0}()?l:a.Z;let m;if(s(p)&&u&&c){const e=Math.min(i.GP,u,c);m=d(n,{resize:`${e},${e}`})}else m=d(n);let h;if(s(p)){const e=Math.min(600,u,c),t=Math.min(i.GP,u,c);h=(0,o.range)(e,t,300).map((e=>{const t=d(n,{resize:`${e},${e}`,strip:"info"});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}else{const e=Math.min(600,u),t=Math.min(i.GP,u);h=(0,o.range)(e,t,300).map((e=>{const t=d(n,{strip:"info",width:e});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}return Object.assign({src:m},h&&{srcSet:h})}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},r=Object.assign(new URL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,o]of Object.entries(t))r.searchParams.set(n.hasOwnProperty(e)?n[e]:e,o);return r.toString()}},38698:function(e,t,n){"use strict";n.d(t,{EU:function(){return c},GP:function(){return i},P0:function(){return l},Z5:function(){return a},hI:function(){return o},q3:function(){return r},xJ:function(){return s}});const r=4,o=20,a=20,i=2e3,s="circle",c="rectangular",l=[{isDefault:!0,name:c},{name:s},{name:"square"},{name:"columns"}]},65597:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(51806),o=n(11313),a=n(65235),i=n.n(a);function s(e){const{alt:t,imageFilter:n,height:a,id:s,link:c,linkTo:l,origUrl:u,url:p,width:d}=e;if((0,o.isBlobURL)(u))return null;let m;switch(l){case"media":m=p;break;case"attachment":m=c}const h=(0,r.createElement)("img",{alt:t,"data-height":a,"data-id":s,"data-link":c,"data-url":u,"data-width":d,src:p,"data-amp-layout":"responsive"});return(0,r.createElement)("figure",{className:i()("tiled-gallery__item",{[`filter__${n}`]:!!n})},m?(0,r.createElement)("a",{href:m},h):h)}},99504:function(e,t,n){"use strict";n.r(t),n.d(t,{attributes:function(){return a},save:function(){return o.Z},supports:function(){return i}});var r=n(38698),o=n(26225);const a={align:{default:"center",type:"string"},className:{default:`is-style-${r.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}},i={align:["center","wide","full"],color:{gradients:!0,text:!1},customClassName:!1,html:!1,spacing:{margin:!0,padding:!0},__experimentalHideChildBlockControls:!0}},63866:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806);function o(e){let{children:t,width:n}=e;const o=n?{flexBasis:`${n}%`}:void 0;return(0,r.createElement)("div",{className:"tiled-gallery__col",style:o},t)}},750:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806);function o(e){let{children:t,galleryRef:n}=e;return(0,r.createElement)("div",{className:"tiled-gallery__gallery",ref:n},t)}},9230:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(51806),o=n(69307),a=n(65736),i=n(65235),s=n.n(i),c=n(38698),l=n(65597),u=n(74713),p=n(82265),d=n(72264);const __=a.__;class m extends o.Component{renderImage(e,t){const{columns:n,imageFilter:o,images:i,isSave:s,linkTo:c,layoutStyle:p,onMoveBackward:d,onMoveForward:m,onRemoveImage:h,onSelectImage:f,selectedImage:g,setImageAttributes:b}=this.props,v=(0,a.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,i.length),{src:k,srcSet:y}=(0,u.z)(e,{layoutStyle:p});return(0,r.createElement)(l.Z,{alt:e.alt,"aria-label":v,columns:n,height:e.height,id:e.id,imageFilter:o,isFirstItem:0===t,isLastItem:t+1===i.length,isSelected:g===t,key:t,link:e.link,linkTo:c,onMoveBackward:s?void 0:d(t),onMoveForward:s?void 0:m(t),onRemove:s?void 0:h(t),onSelect:s?void 0:f(t),origUrl:e.url,setAttributes:s?void 0:b(t),showMovers:i.length>1,srcSet:y,url:k,width:e.width})}render(){const{align:e,children:t,className:n,columns:o,images:a,layoutStyle:i,roundedCorners:l,onResize:m,style:h,isSave:f,columnWidths:g}=this.props,b=(0,u.v)(i)?d.Z:p.Z,v=this.props.images.map(this.renderImage,this),k=i!==c.xJ?Math.min(l,c.Z5):0;return(0,r.createElement)("div",{style:h,className:s()(n,{[`has-rounded-corners-${k}`]:k>0})},(0,r.createElement)(b,{align:e,columns:o,columnWidths:f?g:void 0,images:a,layoutStyle:i,renderedImages:v,onResize:f?void 0:m}),t)}}},82265:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(51806),o=n(69307),a=n(6209),i=n(63866),s=n(750),c=n(2911),l=n(76981),u=n(76187);class p extends o.Component{gallery=(0,o.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:n}of e){const{width:e}=t,r=[];(0,u.W)(n).forEach((t=>{r.push((0,u.i)(t,e))})),void 0!==this.props.onResize&&this.props.onResize(r)}}))};triggerResize(){this.gallery.current&&this.handleGalleryResize([{target:this.gallery.current,contentRect:{width:this.gallery.current.clientWidth}}])}observeResize(){this.triggerResize(),this.ro=new a.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,n){let r=0;return e.map((e=>e.map((e=>{const n=t.slice(r,r+e);return r+=e,n})))).map((e=>(0,u.i)(e,n)))}render(){const{align:e,columns:t,images:n,layoutStyle:a,renderedImages:u}=this.props,p=(0,l.h9)(n),d="columns"===a?(0,l.sv)(p,t):(0,l.T9)(p,{isWide:["full","wide"].includes(e)}),m=o.Platform.select({web:()=>this.props.columnWidths,native:()=>this.getColumnWidths(d,u,1e3)})();let h=0;return(0,r.createElement)(s.Z,{galleryRef:this.gallery},d.map(((e,t)=>(0,r.createElement)(c.Z,{key:t},e.map(((e,n)=>{const o=u.slice(h,h+e);return h+=e,(0,r.createElement)(i.Z,{key:n,width:m?.[t]?.[n]},o)}))))))}}},76981:function(e,t,n){"use strict";n.d(t,{T9:function(){return S},h9:function(){return o},sv:function(){return i}});var r=n(92819);function o(e){return(0,r.map)(e,a)}function a(e){let{height:t,width:n}=e;return t&&n?n/t:1}function i(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const n=(0,r.sum)(e)/t,o=[];let a=e,i=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(a,(t=>{const r=i<=(e+1)*n;return r&&(i+=t),r})).length;o.push(t),a=(0,r.drop)(a,t)}return o.push(a.length),[o]}const s=j([2,1,2],5),c=x([L,L,P,L,L]),l=x([L,L,L,P,L,L,L]),u=j([3,1,3],5),p=x([P,L,L,P]),d=j([1,2,1],5),m=x([P,L,L,L]),h=j([1,3],3),f=x([L,L,L,P]),g=j([3,1],3),b=x([T(1.6),(0,r.overEvery)(A(.9),T(2)),(0,r.overEvery)(A(.9),T(2))]),v=j([1,2],3),k=j([1,1,1,1,1],1),y=j([1,1,1,1],1),w=j([1,1,1],3),E=x([(0,r.overEvery)(A(.9),T(2)),(0,r.overEvery)(A(.9),T(2)),T(1.6)]),_=j([2,1],3),C=x([function(e){return e>=2}]);function S(e){let{isWide:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(e,o)=>{if(!o.length)return e;let a;a=o.length>15&&c(o)&&s(e)?[2,1,2]:o.length>15&&l(o)&&u(e)?[3,1,3]:5!==o.length&&p(o)&&d(e)?[1,2,1]:m(o)&&h(e)?[1,3]:f(o)&&g(e)?[3,1]:b(o)&&v(e)?[1,2]:t&&(5===o.length||10!==o.length&&o.length>6)&&k(e)&&(0,r.sum)((0,r.take)(o,5))<5?[1,1,1,1,1]:function(e,t){const n=(0,r.sum)((0,r.take)(t,4));return y(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,o)?[1,1,1,1]:function(e,t,n){const o=(0,r.sum)((0,r.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&w(e)&&(o<2.5||o<5&&t.length>=3&&t[0]===t[2]||n)}(e,o,t)?[1,1,1]:E(o)&&_(e)?[2,1]:C(o)?[1]:o.length>3?[1,1]:Array(o.length).fill(1);const i=e.concat([a]),S=(0,r.sum)(a),j=o.slice(S);return n(i,j)};return n([],e)}function j(e,t){return n=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}function x(e){return t=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function L(e){return e>=1&&e<2}function P(e){return e<1}function A(e){return t=>t>=e}function T(e){return t=>t<e}},76187:function(e,t,n){"use strict";n.d(t,{W:function(){return i},i:function(){return a}});var r=n(38698);function o(e,t){const n=(t-e.reduce(((e,t)=>e+t),0))/e.length;return e.map((e=>e+n))}function a(e,t){return function(e,t,n){let[a,i]=t;const p=1/a*(n-r.q3*(e.childElementCount-1)-i);return function(e,t){let{rawHeight:n,rowWidth:a}=t;const i=s(e),p=i.map((e=>(n-r.q3*(e.childElementCount-1))*l(e)[0])),d=o(p,a);i.forEach(((e,t)=>{const a=p[t],i=d[t];!function(e,t){let{colHeight:n,width:r,rawWidth:a}=t;const i=c(e).map((e=>a/u(e))),s=o(i,n);Array.from(e.children).forEach(((e,t)=>{const n=s[t];e.setAttribute("style",`height:${n}px;width:${r}px;`)}))}(e,{colHeight:n-r.q3*(e.childElementCount-1),width:i,rawWidth:a})}));return d.map((e=>parseFloat(e/a*100).toFixed(5)))}(e,{rawHeight:p,rowWidth:n-r.q3*(e.childElementCount-1)})}(e,function(e){const t=s(e).map(l).reduce(((e,t)=>{let[n,r]=e,[o,a]=t;return[n+o,r+a]}),[0,0]);return t}(e),t)}function i(e){return Array.from(e.querySelectorAll(".tiled-gallery__row"))}function s(e){return Array.from(e.querySelectorAll(".tiled-gallery__col"))}function c(e){return Array.from(e.querySelectorAll(".tiled-gallery__item > img, .tiled-gallery__item > a > img"))}function l(e){const t=c(e),n=t.length,r=1/t.map(u).reduce(((e,t)=>e+1/t),0);return[r,r*n||1]}function u(e){const t=parseInt(e.dataset.width,10),n=parseInt(e.dataset.height,10);return t&&!Number.isNaN(t)&&n&&!Number.isNaN(n)?t/n:1}},2911:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(51806),o=n(65235),a=n.n(o);function i(e){let{children:t,className:n}=e;return(0,r.createElement)("div",{className:a()("tiled-gallery__row",n)},t)}},72264:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),o=n(92819),a=n(38698),i=n(63866),s=n(750),c=n(2911);function l(e){let{columns:t,renderedImages:n}=e;const l=Math.min(a.hI,t),u=n.length%l;return(0,r.createElement)(s.Z,null,[...u?[(0,o.take)(n,u)]:[],...(0,o.chunk)((0,o.drop)(n,u),l)].map(((e,t)=>(0,r.createElement)(c.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,r.createElement)(i.Z,{key:t},e)))))))}},26225:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(51806),o=n(81518),a=n(38698),i=n(9230);function s(e){return Math.min(3,e.images.length)}function c(e){let{attributes:t}=e;const{imageFilter:n,images:c}=t;if(!c.length)return null;const{align:l,className:u,columns:p=s(t),linkTo:d,roundedCorners:m,columnWidths:h}=t;return(0,r.createElement)(i.Z,{align:l,className:u,columns:p,imageFilter:n,images:c,isSave:!0,layoutStyle:(0,o.t)(a.P0,u),linkTo:d,roundedCorners:m,columnWidths:h})}},74713:function(e,t,n){"use strict";n.d(t,{v:function(){return l},z:function(){return u}});var r=n(13419),o=n(11313),a=n(92819),i=n(69424),s=n(99621),c=n(38698);function l(e){return["circle","square"].includes(e)}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.height||!e.width)return e.url?{src:e.url}:{};if((0,s.Z)())return{src:e.url};if((0,o.isBlobURL)(e.url)||/^https?:\/\/localhost/.test(e.url)||/^https?:\/\/.*\.local\//.test(e.url)||(0,r.Ug)()&&(0,r.M6)())return{src:e.url};const n=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)}(n)||!0===function(){if("undefined"!=typeof jetpack_plan&&"vip"===jetpack_plan.data)return!0}()?p:i.Z;let f;if(l(m)&&d&&u){const e=Math.min(c.GP,d,u);f=h(n,{resize:`${e},${e}`})}else f=h(n);let g;if(l(m)){const e=Math.min(600,d,u),t=Math.min(c.GP,d,u);g=(0,a.range)(e,t,300).map((e=>{const t=h(n,{resize:`${e},${e}`,strip:"info"});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}else{const e=Math.min(600,d),t=Math.min(c.GP,d);g=(0,a.range)(e,t,300).map((e=>{const t=h(n,{strip:"info",width:e});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}return Object.assign({src:f},g&&{srcSet:g})}function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},r=Object.assign(new URL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,o]of Object.entries(t))r.searchParams.set(n.hasOwnProperty(e)?n[e]:e,o);return r.toString()}},15078:function(e,t,n){"use strict";n.d(t,{F:function(){return b}});var r=n(51806),o=n(52175),a=n(55609),i=n(12238),s=n(69307),c=n(65736),l=n(92819),u=n(81518),p=n(94545),d=n(3740),m=n(38897),h=n(21340),f=n(99602);const __=c.__,g=[{value:"attachment",label:__("Attachment Page","jetpack")},{value:"media",label:__("Media File","jetpack")},{value:"none",label:__("None","jetpack")}];function b(e){return Math.min(3,e.images.length)}const v=e=>{const t=(0,l.pick)(e,[["alt"],["id"],["link"]]);return t.url=(0,l.get)(e,["sizes","large","url"])||(0,l.get)(e,["media_details","sizes","large","source_url"])||e.url,t};class k extends s.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((e=>{let{id:t}=e;return parseInt(t,10)}))}),this.props.setAttributes(e)}addFiles=e=>{const t=this.props.attributes.images||[],{noticeOperations:n}=this.props;(0,i.mediaUpload)({allowedTypes:d.RA,filesList:e,onFileChange:e=>{const n=e.map((e=>v(e)));this.setAttributes({images:t.concat(n)})},onError:n.createErrorNotice}),this.setState({changed:!0})};onRemoveImage=e=>()=>{const t=(0,l.filter)(this.props.attributes.images,((t,n)=>e!==n)),{columns:n}=this.props.attributes;this.setState({selectedImage:null,changed:!0}),this.setAttributes({images:t,columns:n?Math.min(t.length,n):n})};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=>v(e)))}),this.setState({changed:!0})};onMove=(e,t)=>{const n=[...this.props.attributes.images];n.splice(t,1,this.props.attributes.images[e]),n.splice(e,1,this.props.attributes.images[t]),this.setState({selectedImage:t,changed:!0}),this.setAttributes({images:n})};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:n}}=this.props;n[e]&&this.setAttributes({images:[...n.slice(0,e),{...n[e],...t},...n.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:n,className:i,noticeOperations:c,noticeUI:l,setAttributes:v}=this.props,{align:k,columns:y=b(t),imageFilter:w,images:E,linkTo:_,roundedCorners:C}=t,S=(0,r.createElement)(a.DropZone,{onFilesDrop:this.addFiles}),j=(0,r.createElement)(o.BlockControls,null,!!E.length&&(0,r.createElement)(s.Fragment,null,(0,r.createElement)(a.ToolbarGroup,null,(0,r.createElement)(a.ToolbarItem,null,(()=>(0,r.createElement)(o.MediaUpload,{onSelect:this.onSelectImages,allowedTypes:d.RA,multiple:!0,gallery:!0,value:E.map((e=>e.id)),render:e=>{let{open:t}=e;return(0,r.createElement)(p.Z,{label:__("Edit Gallery","jetpack"),onClick:t})}})))),(0,r.createElement)(m.Z,{value:w,onChange:e=>{v({imageFilter:e}),this.setState({selectedImage:null})}})));if(0===E.length)return(0,r.createElement)(s.Fragment,null,j,(0,r.createElement)(o.MediaPlaceholder,{icon:f.qv,className:i,labels:{title:__("Tiled Gallery","jetpack"),name:__("images","jetpack")},onSelect:this.onSelectImages,accept:"image/*",allowedTypes:d.RA,multiple:!0,notices:l,onError:c.createErrorNotice}));const x=(0,u.t)(d.P0,t.className);return(0,r.createElement)(s.Fragment,null,j,(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(a.PanelBody,{title:__("Tiled Gallery settings","jetpack")},["columns","circle","square"].includes(x)&&E.length>1&&(0,r.createElement)(a.RangeControl,{label:__("Columns","jetpack"),value:y,onChange:this.setColumnsNumber,min:1,max:Math.min(d.hI,E.length)}),x!==d.xJ&&(0,r.createElement)(a.RangeControl,{label:__("Rounded corners","jetpack"),value:C,onChange:this.setRoundedCorners,min:0,max:d.Z5}),(0,r.createElement)(a.SelectControl,{label:__("Link To","jetpack"),value:_,onChange:this.setLinkTo,options:g}))),l,(0,r.createElement)(h.Z,{align:k,className:i,columns:y,imageFilter:w,images:E,layoutStyle:x,linkTo:_,onMoveBackward:this.onMoveBackward,onMoveForward:this.onMoveForward,onRemoveImage:this.onRemoveImage,onSelectImage:this.onSelectImage,onResize:this.onResize,roundedCorners:C,selectedImage:n?e:null,setImageAttributes:this.setImageAttributes},S,n&&(0,r.createElement)("div",{className:"tiled-gallery__add-item"},(0,r.createElement)(a.FormFileUpload,{multiple:!0,className:"tiled-gallery__add-item-button",onChange:this.uploadFromFiles,accept:"image/*",icon:"insert"},__("Upload an image","jetpack")))))}}t.ZP=(0,a.withNotices)(k)},47158:function(e,t,n){"use strict";var r=n(31985),o=n(99602);(0,r.Z)(o.u2,o.Xd)},38897:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(51806),o=n(55609),a=n(65736);const __=a.__,_x=a._x,i=[{icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.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,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.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,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.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,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.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,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.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,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0z"}),(0,r.createElement)(o.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"}],s=__("Pick an image filter","jetpack");function c(e){let{value:t,onChange:n}=e;return(0,r.createElement)(o.Dropdown,{placement:"bottom-start",className:"editor-block-switcher",contentClassName:"editor-block-switcher__popover",renderToggle:e=>{let{onToggle:t,isOpen:n}=e;return(0,r.createElement)(o.Toolbar,{controls:[{onClick:t,extraProps:{"aria-haspopup":"true","aria-expanded":n},title:s,tooltip:s,icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M19 10v9H4.98V5h9V3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-9h-2zm-2.94-2.06L17 10l.94-2.06L20 7l-2.06-.94L17 4l-.94 2.06L14 7zM12 8l-1.25 2.75L8 12l2.75 1.25L12 16l1.25-2.75L16 12l-2.75-1.25z"}))}]})},renderContent:e=>{let{onClose:a}=e;return(0,r.createElement)(o.NavigableMenu,{className:"tiled-gallery__filter-picker-menu"},i.map((e=>{let{icon:i,title:s,value:c}=e;return(0,r.createElement)(o.MenuItem,{className:t===c?"is-active":void 0,icon:i,isSelected:t===c,key:c||"original",onClick:(l=c,()=>{n(t===l?void 0:l),a()}),role:"menuitemcheckbox"},s);var l})))}})}},57773:function(e,t,n){"use strict";var r=n(51806),o=n(11313),a=n(55609),i=n(9818),s=n(69307),c=n(65736),l=n(39630),u=n(65235),p=n.n(u),d=n(62051);const __=c.__;class m extends s.Component{img=(0,s.createRef)();onImageClick=()=>{this.props.isSelected||this.props.onSelect()};onImageKeyDown=e=>{this.img.current===document.activeElement&&this.props.isSelected&&[l.BACKSPACE,l.DELETE].includes(e.keyCode)&&this.props.onRemove()};componentDidUpdate(){const{alt:e,height:t,image:n,link:r,url:o,width:a}=this.props;if(n){const i={};!e&&n.alt_text&&(i.alt=n.alt_text),!t&&n.media_details&&n.media_details.height&&(i.height=+n.media_details.height),!r&&n.link&&(i.link=n.link),!o&&n.source_url&&(i.url=n.source_url),!a&&n.media_details&&n.media_details.width&&(i.width=+n.media_details.width),Object.keys(i).length&&this.props.setAttributes(i)}}render(){const{"aria-label":e,alt:t,columns:n,height:i,id:c,imageFilter:l,isFirstItem:u,isLastItem:m,isSelected:h,link:f,linkTo:g,onMoveBackward:b,onMoveForward:v,onRemove:k,origUrl:y,showMovers:w,srcSet:E,url:_,width:C}=this.props;let S;switch(g){case"media":S=y;break;case"attachment":S=f}const j=(0,o.isBlobURL)(y),x=(0,r.createElement)(s.Fragment,null,(0,r.createElement)("img",{alt:t,"aria-label":e,"data-height":i,"data-id":c,"data-link":f,"data-url":y,"data-width":C,onClick:this.onImageClick,onKeyDown:this.onImageKeyDown,ref:this.img,src:j?void 0:_,srcSet:j?void 0:E,tabIndex:"0",style:j?{backgroundImage:`url(${y})`}:void 0}),j&&(0,r.createElement)(a.Spinner,null));return(0,r.createElement)("figure",{className:p()("tiled-gallery__item",{"is-selected":h,"is-transient":j,[`filter__${l}`]:!!l})},w&&(0,r.createElement)("div",{className:"tiled-gallery__item__move-menu"},(0,r.createElement)(a.Button,{icon:1===n?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,r.createElement)(a.Button,{icon:1===n?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,r.createElement)("div",{className:"tiled-gallery__item__inline-menu"},(0,r.createElement)(a.Button,{icon:d.xv,onClick:k,className:"tiled-gallery__item__remove",label:__("Remove image","jetpack"),disabled:!h})),S?(0,r.createElement)("a",null,x):x)}}t.Z=(0,i.withSelect)(((e,t)=>{const{getMedia:n}=e("core"),{id:r}=t;return{image:r?n(r):null}}))(m)},81921:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(51806),o=n(11313),a=n(65235),i=n.n(a);function s(e){const{alt:t,imageFilter:n,height:a,id:s,link:c,linkTo:l,origUrl:u,url:p,width:d}=e;if((0,o.isBlobURL)(u))return null;let m;switch(l){case"media":m=u;break;case"attachment":m=c}const h=(0,r.createElement)("img",{alt:t,"data-height":a,"data-id":s,"data-link":c,"data-url":u,"data-width":d,src:p,"data-amp-layout":"responsive"});return(0,r.createElement)("figure",{className:i()("tiled-gallery__item",{[`filter__${n}`]:!!n})},m?(0,r.createElement)("a",{href:m},h):h)}},62051:function(e,t,n){"use strict";n.d(t,{KT:function(){return a},WO:function(){return c},xf:function(){return s},xv:function(){return l},zz:function(){return i}});var r=n(51806),o=n(55609);const a=(0,r.createElement)(o.SVG,{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.Path,{d:"M5 8.70002L10.6 14.4L12 12.9L7.8 8.70002L12 4.50002L10.6 3.00002L5 8.70002Z"})),i=(0,r.createElement)(o.SVG,{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.Path,{d:"M13 8.7L7.4 3L6 4.5L10.2 8.7L6 12.9L7.4 14.4L13 8.7Z"})),s=(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.Path,{d:"M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"})),c=(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.Path,{d:"M12,8l-6,6l1.41,1.41L12,10.83l4.59,4.58L18,14L12,8z"})),l=(0,r.createElement)(o.SVG,{width:"18",height:"18",viewBox:"-2 -2 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.Path,{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},99602:function(e,t,n){"use strict";n.d(t,{Xd:function(){return L},qv:function(){return x},u2:function(){return j}});var r=n(51806),o=n(13419),a=n(4981),i=n(55609),s=n(65736),c=n(92819),l=n(70355),u=n(5820),p=n(3740),d=n(73463),m=n(15078),h=n(10745),f=n(96606),g=n(85472),b=n(79009),v=n(10742),k=n(52642),y=n(41145);const __=s.__,_x=s._x,w={[p.EU]:_x("Tiled mosaic","Tiled gallery layout","jetpack"),[p.xJ]:_x("Circles","Tiled gallery layout","jetpack"),[p.sw]:_x("Tiled columns","Tiled gallery layout","jetpack"),[p.yw]:_x("Square tiles","Tiled gallery layout","jetpack")},E=p.P0.map((e=>({...e,label:w[e.name]})));function _(e){return(0,c.filter)(e,(e=>{let{id:t,url:n}=e;return t&&n}))}const C={align:{default:"center",type:"string"},className:{default:`is-style-${p.EU}`,type:"string"},columns:{type:"number"},columnWidths:{default:[],type:"array"},ids:{default:[],type:"array"},imageFilter:{type:"string"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},height:{attribute:"data-height",selector:"img",source:"attribute",type:"number"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},imageCrop:{type:"boolean",default:!0},linkTo:{default:"none",type:"string"},roundedCorners:{type:"integer",default:0}},S={align:"center",className:"is-style-rectangular",images:[{alt:"",link:"",url:f,width:160,height:95},{alt:"",link:"",url:g,width:160,height:107},{alt:"",link:"",url:b,width:304,height:203},{alt:"",link:"",url:v,width:312,height:207},{alt:"",link:"",url:k,width:152,height:101},{alt:"",link:"",url:y,width:152,height:105}],linkTo:"none"},j="tiled-gallery",x=(0,r.createElement)(i.SVG,{viewBox:"0 0 24 24",width:24,height:24},(0,r.createElement)(i.Path,{d:"M19 5v2h-4V5h4M9 5v6H5V5h4m10 8v6h-4v-6h4M9 17v2H5v-2h4M21 3h-8v6h8V3zM11 3H3v10h8V3zm10 8h-8v10h8V11zm-10 4H3v6h8v-6z"})),L={attributes:C,category:(0,u.Z)("media","layout"),description:__("Display multiple images in an elegantly organized tiled layout.","jetpack")+((0,o.Wp)()?"":" "+__("Serves images using Jetpack's fast global network of servers.","jetpack")),icon:{src:x,foreground:(0,l.m)()},keywords:[_x("columns","block search term","jetpack"),_x("images","block search term","jetpack"),_x("photos","block search term","jetpack"),_x("pictures","block search term","jetpack"),_x("square","block search term","jetpack"),_x("circle","block search term","jetpack"),_x("mosaic","block search term","jetpack")],styles:E,supports:{align:["center","wide","full"],color:{gradients:!0,text:!1},customClassName:!1,html:!1,spacing:{margin:!0,padding:!0},__experimentalHideChildBlockControls:!0},title:__("Tiled Gallery","jetpack"),transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],isMatch:e=>_(e).length>0,transform:e=>{const t=_(e);return(0,a.createBlock)(`jetpack/${j}`,{images:t.map((e=>{let{id:t,url:n,link:r,alt:o}=e;return{id:t,url:n,link:r,alt:o}})),ids:t.map((e=>{let{id:t}=e;return t}))})}},{type:"block",blocks:["core/gallery","jetpack/slideshow"],transform:e=>{let{images:t}=e;const n=_(t);return n.length>0?(0,a.createBlock)(`jetpack/${j}`,{images:n.map((e=>{let{id:t,url:n,link:r,alt:o}=e;return{id:t,url:n,link:r,alt:o}})),ids:n.map((e=>{let{id:t}=e;return t}))}):(0,a.createBlock)(`jetpack/${j}`)}}],to:[{type:"block",blocks:["core/gallery"],transform:e=>{let{images:t,ids:n,columns:r,linkTo:o}=e;return(0,a.createBlock)("core/gallery",{images:t,ids:n,columns:r,imageCrop:!0,linkTo:o})}},{type:"block",blocks:["core/image"],transform:e=>{let{align:t,images:n}=e;return n.length>0?n.map((e=>{let{id:n,url:r,alt:o}=e;return(0,a.createBlock)("core/image",{align:t,id:n,url:r,alt:o})})):(0,a.createBlock)("core/image")}}]},edit:m.ZP,save:h.Z,providesContext:{imageCrop:"imageCrop"},deprecated:d.Z,example:{attributes:S}}},24639:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806);function o(e){let{children:t,width:n}=e;const o=n?{flexBasis:`${n}%`}:void 0;return(0,r.createElement)("div",{className:"tiled-gallery__col",style:o},t)}},75084:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806);function o(e){let{children:t,galleryRef:n}=e;return(0,r.createElement)("div",{className:"tiled-gallery__gallery",ref:n},t)}},21340:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(51806),o=n(69307),a=n(65736),i=n(65235),s=n.n(i),c=n(3740),l=n(57773),u=n(81921),p=n(13369),d=n(46438),m=n(70216);const __=a.__;class h extends o.Component{renderImage(e,t){const{columns:n,imageFilter:o,images:i,isSave:s,linkTo:c,layoutStyle:d,onMoveBackward:m,onMoveForward:h,onRemoveImage:f,onSelectImage:g,selectedImage:b,setImageAttributes:v}=this.props,k=(0,a.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,i.length),y=s?u.Z:l.Z,{src:w,srcSet:E}=(0,p.z)(e,{layoutStyle:d});return(0,r.createElement)(y,{alt:e.alt,"aria-label":k,columns:n,height:e.height,id:e.id,imageFilter:o,isFirstItem:0===t,isLastItem:t+1===i.length,isSelected:b===t,key:t,link:e.link,linkTo:c,onMoveBackward:s?void 0:m(t),onMoveForward:s?void 0:h(t),onRemove:s?void 0:f(t),onSelect:s?void 0:g(t),origUrl:e.url,setAttributes:s?void 0:v(t),showMovers:i.length>1,srcSet:E,url:w,width:e.width})}render(){const{align:e,children:t,className:n,columns:o,images:a,layoutStyle:i,roundedCorners:l,onResize:u,style:h,isSave:f,columnWidths:g}=this.props,b=(0,p.v)(i)?m.Z:d.Z,v=this.props.images.map(this.renderImage,this),k=i!==c.xJ?Math.min(l,c.Z5):0;return(0,r.createElement)("div",{style:h,className:s()(n,{[`has-rounded-corners-${k}`]:k>0})},(0,r.createElement)(b,{align:e,columns:o,columnWidths:f?g:void 0,images:a,layoutStyle:i,renderedImages:v,onResize:f?void 0:u}),t)}}},46438:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(51806),o=n(69307),a=n(6209),i=n(24639),s=n(75084),c=n(51309),l=n(96001),u=n(99856);class p extends o.Component{gallery=(0,o.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:n}of e){const{width:e}=t,r=[];(0,u.W)(n).forEach((t=>{r.push((0,u.i)(t,e))})),void 0!==this.props.onResize&&this.props.onResize(r)}}))};triggerResize(){this.gallery.current&&this.handleGalleryResize([{target:this.gallery.current,contentRect:{width:this.gallery.current.clientWidth}}])}observeResize(){this.triggerResize(),this.ro=new a.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,n){let r=0;return e.map((e=>e.map((e=>{const n=t.slice(r,r+e);return r+=e,n})))).map((e=>(0,u.i)(e,n)))}render(){const{align:e,columns:t,images:n,layoutStyle:a,renderedImages:u}=this.props,p=(0,l.h9)(n),d="columns"===a?(0,l.sv)(p,t):(0,l.T9)(p,{isWide:["full","wide"].includes(e)}),m=o.Platform.select({web:()=>this.props.columnWidths,native:()=>this.getColumnWidths(d,u,1e3)})();let h=0;return(0,r.createElement)(s.Z,{galleryRef:this.gallery},d.map(((e,t)=>(0,r.createElement)(c.Z,{key:t},e.map(((e,n)=>{const o=u.slice(h,h+e);return h+=e,(0,r.createElement)(i.Z,{key:n,width:m?.[t]?.[n]},o)}))))))}}},96001:function(e,t,n){"use strict";n.d(t,{T9:function(){return S},h9:function(){return o},sv:function(){return i}});var r=n(92819);function o(e){return(0,r.map)(e,a)}function a(e){let{height:t,width:n}=e;return t&&n?n/t:1}function i(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const n=(0,r.sum)(e)/t,o=[];let a=e,i=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(a,(t=>{const r=i<=(e+1)*n;return r&&(i+=t),r})).length;o.push(t),a=(0,r.drop)(a,t)}return o.push(a.length),[o]}const s=j([2,1,2],5),c=x([L,L,P,L,L]),l=x([L,L,L,P,L,L,L]),u=j([3,1,3],5),p=x([P,L,L,P]),d=j([1,2,1],5),m=x([P,L,L,L]),h=j([1,3],3),f=x([L,L,L,P]),g=j([3,1],3),b=x([T(1.6),(0,r.overEvery)(A(.9),T(2)),(0,r.overEvery)(A(.9),T(2))]),v=j([1,2],3),k=j([1,1,1,1,1],1),y=j([1,1,1,1],1),w=j([1,1,1],3),E=x([(0,r.overEvery)(A(.9),T(2)),(0,r.overEvery)(A(.9),T(2)),T(1.6)]),_=j([2,1],3),C=x([function(e){return e>=2}]);function S(e){let{isWide:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(e,o)=>{if(!o.length)return e;let a;a=o.length>15&&c(o)&&s(e)?[2,1,2]:o.length>15&&l(o)&&u(e)?[3,1,3]:5!==o.length&&p(o)&&d(e)?[1,2,1]:m(o)&&h(e)?[1,3]:f(o)&&g(e)?[3,1]:b(o)&&v(e)?[1,2]:t&&(5===o.length||10!==o.length&&o.length>6)&&k(e)&&(0,r.sum)((0,r.take)(o,5))<5?[1,1,1,1,1]:function(e,t){const n=(0,r.sum)((0,r.take)(t,4));return y(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,o)?[1,1,1,1]:function(e,t,n){const o=(0,r.sum)((0,r.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&w(e)&&(o<2.5||o<5&&t.length>=3&&t[0]===t[2]||n)}(e,o,t)?[1,1,1]:E(o)&&_(e)?[2,1]:C(o)?[1]:o.length>3?[1,1]:Array(o.length).fill(1);const i=e.concat([a]),S=(0,r.sum)(a),j=o.slice(S);return n(i,j)};return n([],e)}function j(e,t){return n=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}function x(e){return t=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function L(e){return e>=1&&e<2}function P(e){return e<1}function A(e){return t=>t>=e}function T(e){return t=>t<e}},99856:function(e,t,n){"use strict";n.d(t,{W:function(){return i},i:function(){return a}});var r=n(3740);function o(e,t){const n=(t-e.reduce(((e,t)=>e+t),0))/e.length;return e.map((e=>e+n))}function a(e,t){return function(e,t,n){let[a,i]=t;const p=1/a*(n-r.q3*(e.childElementCount-1)-i);return function(e,t){let{rawHeight:n,rowWidth:a}=t;const i=s(e),p=i.map((e=>(n-r.q3*(e.childElementCount-1))*l(e)[0])),d=o(p,a);i.forEach(((e,t)=>{const a=p[t],i=d[t];!function(e,t){let{colHeight:n,width:r,rawWidth:a}=t;const i=c(e).map((e=>a/u(e))),s=o(i,n);Array.from(e.children).forEach(((e,t)=>{const n=s[t];e.setAttribute("style",`height:${n}px;width:${r}px;`)}))}(e,{colHeight:n-r.q3*(e.childElementCount-1),width:i,rawWidth:a})}));return d.map((e=>parseFloat(e/a*100).toFixed(5)))}(e,{rawHeight:p,rowWidth:n-r.q3*(e.childElementCount-1)})}(e,function(e){const t=s(e).map(l).reduce(((e,t)=>{let[n,r]=e,[o,a]=t;return[n+o,r+a]}),[0,0]);return t}(e),t)}function i(e){return Array.from(e.querySelectorAll(".tiled-gallery__row"))}function s(e){return Array.from(e.querySelectorAll(".tiled-gallery__col"))}function c(e){return Array.from(e.querySelectorAll(".tiled-gallery__item > img, .tiled-gallery__item > a > img"))}function l(e){const t=c(e),n=t.length,r=1/t.map(u).reduce(((e,t)=>e+1/t),0);return[r,r*n||1]}function u(e){const t=parseInt(e.dataset.width,10),n=parseInt(e.dataset.height,10);return t&&!Number.isNaN(t)&&n&&!Number.isNaN(n)?t/n:1}},51309:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(51806),o=n(65235),a=n.n(o);function i(e){let{children:t,className:n}=e;return(0,r.createElement)("div",{className:a()("tiled-gallery__row",n)},t)}},70216:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),o=n(92819),a=n(3740),i=n(24639),s=n(75084),c=n(51309);function l(e){let{columns:t,renderedImages:n}=e;const l=Math.min(a.hI,t),u=n.length%l;return(0,r.createElement)(s.Z,null,[...u?[(0,o.take)(n,u)]:[],...(0,o.chunk)((0,o.drop)(n,u),l)].map(((e,t)=>(0,r.createElement)(c.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,r.createElement)(i.Z,{key:t},e)))))))}},10745:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(51806),o=n(81518),a=n(3740),i=n(15078),s=n(21340);function c(e){let{attributes:t}=e;const{imageFilter:n,images:c}=t;if(!c.length)return null;const{align:l,className:u,columns:p=(0,i.F)(t),linkTo:d,roundedCorners:m,columnWidths:h}=t;return(0,r.createElement)(s.Z,{align:l,className:u,columns:p,imageFilter:n,images:c,isSave:!0,layoutStyle:(0,o.t)(a.P0,u),linkTo:d,roundedCorners:m,columnWidths:h})}},13369:function(e,t,n){"use strict";n.d(t,{v:function(){return l},z:function(){return u}});var r=n(13419),o=n(11313),a=n(92819),i=n(69424),s=n(99621),c=n(3740);function l(e){return["circle","square"].includes(e)}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.height||!e.width)return e.url?{src:e.url}:{};if((0,s.Z)())return{src:e.url};if((0,o.isBlobURL)(e.url)||/^https?:\/\/localhost/.test(e.url)||/^https?:\/\/.*\.local\//.test(e.url)||(0,r.Ug)()&&(0,r.M6)())return{src:e.url};const n=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)}(n)||!0===function(){if("undefined"!=typeof jetpack_plan&&"vip"===jetpack_plan.data)return!0}()?p:i.Z;let f;if(l(m)&&d&&u){const e=Math.min(c.GP,d,u);f=h(n,{resize:`${e},${e}`})}else f=h(n);let g;if(l(m)){const e=Math.min(600,d,u),t=Math.min(c.GP,d,u);g=(0,a.range)(e,t,300).map((e=>{const t=h(n,{resize:`${e},${e}`,strip:"info"});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}else{const e=Math.min(600,d),t=Math.min(c.GP,d);g=(0,a.range)(e,t,300).map((e=>{const t=h(n,{strip:"info",width:e});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}return Object.assign({src:f},g&&{srcSet:g})}function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},r=Object.assign(new URL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,o]of Object.entries(t))r.searchParams.set(n.hasOwnProperty(e)?n[e]:e,o);return r.toString()}},97587:function(e,t){"use strict";t.Z={url:{type:"string"}}},44814:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(51806),o=n(52175),a=n(55609),i=n(69307),s=n(65736),c=n(75365),l=n(39630);const __=s.__,u=e=>{let{tockUrl:t,setEditedUrl:n,setUrl:o,cancel:s}=e;const u=(0,i.useRef)(!0),p=(0,i.useRef)(!1),d=e=>{o(),p.current=!0,e()};return(0,r.createElement)(a.ToolbarGroup,null,(0,r.createElement)(a.Dropdown,{popoverProps:{variant:"toolbar"},onClose:()=>p.current?p.current=!1:s(),placement:"bottom-start",renderToggle:e=>{let{isOpen:n,onToggle:o}=e;return!u.current||n||t||(u.current=!1,o()),(0,r.createElement)(a.ToolbarButton,{className:"components-toolbar__control",label:__("Edit Tock business name","jetpack"),onClick:()=>{o(),n&&s()}},__("Edit","jetpack"))},renderContent:e=>{let{onClose:o}=e;return(0,r.createElement)(a.BaseControl,{className:"jetpack-tock-url-settings",help:(0,i.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,r.createElement)("strong",null)})},(0,r.createElement)("div",{className:"jetpack-tock-url-input-wrapper"},(0,r.createElement)(a.TextControl,{placeholder:__("Add Tock business name","jetpack"),onChange:n,value:t,onKeyDownCapture:e=>((e,n)=>{const{keyCode:r}=e;r===l.ENTER&&""!==t&&(e.preventDefault(),d(n)),r===l.ESCAPE&&(e.preventDefault(),s(),n())})(e,o),className:"jetpack-tock-url-input"}),(0,r.createElement)("div",{className:"jetpack-tock-url-input-action"},(0,r.createElement)(a.Button,{type:"submit",label:__("Submit","jetpack"),icon:c.Z,className:"jetpack-tock-url-input-submit",onClick:()=>d(o)}))))}}))},p=e=>{let{url:t,popoverAnchor:n}=e;const o=`\n\t\t<div id="Tock_widget_container" data-tock-display-mode="Button" data-tock-color-mode="Blue" data-tock-locale="en-us" data-tock-timezone="America/New_York" style="display:inline-block;"></div>\n\t\t<script src="https://www.exploretock.com/tock.js" async><\/script>\n\t\t<script>\n\t\t\t!function(t,o){if(!t.tock){var e=t.tock=function(){e.callMethod?\n\t\t\t e.callMethod.apply(e,arguments):e.queue.push(arguments)};t._tock||(t._tock=e),\n\t\t\t e.push=e,e.loaded=!0,e.version='1.0',e.queue=[];}}(window,document);\n\t\t\ttock('init', '${t}');\n\t\t<\/script>\n\t`;return(0,r.createElement)("div",{ref:n},(0,r.createElement)(a.SandBox,{html:o,key:`tock-${t}`}),(0,r.createElement)("div",{className:"block-library-embed__interactive-overlay"}))};function d(e){let{attributes:t,setAttributes:n,isSelected:a}=e;const s=t.url??"",[c,l]=(0,i.useState)(s),d=(0,i.useCallback)((()=>{l(s)}),[s]);return(0,i.useEffect)((()=>{a||d()}),[a,d]),(0,r.createElement)("div",(0,o.useBlockProps)(),(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(u,{tockUrl:c,setEditedUrl:l,setUrl:()=>{const e=c.replace(/.*exploretock.com\//,"");l(e),n({url:e})},cancel:d})),(0,r.createElement)(p,{url:s}))}},14035:function(e,t,n){"use strict";var r=n(31985),o=n(60766);(0,r.Z)(o.u2,o.Xd)},81602:function(e,t,n){"use strict";var r=n(51806),o=n(55609);const a=(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24",width:"32",height:"32",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.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"}));t.Z=a},60766:function(e,t,n){"use strict";n.d(t,{Xd:function(){return u},u2:function(){return l}});var r=n(51806),o=n(65736),a=n(70355),i=n(97587),s=n(44814),c=n(81602);const __=o.__,_x=o._x,l="tock",u={apiVersion:2,title:__("Tock","jetpack"),description:__("Reserve a table at your restaurant with Tock.","jetpack"),icon:{src:c.Z,foreground:(0,a.m)()},category:"earn",keywords:[_x("booking","block search term","jetpack"),_x("reservation","block search term","jetpack"),_x("restaurant","block search term","jetpack")],supports:{align:!0,html:!1,multiple:!1},edit:s.Z,save:()=>(0,r.createElement)("div",{id:"Tock_widget_container","data-tock-display-mode":"Button","data-tock-color-mode":"Blue","data-tock-locale":"en-us","data-tock-timezone":"America/New_York"}),attributes:i.Z,example:{attributes:{url:"roister"},viewportWidth:250}}},10723:function(e,t,n){"use strict";n.d(t,{H:function(){return a},Z:function(){return i}});var r=n(51806),o=n(69307);const a=(0,o.createContext)(),i=e=>{let{onFilesSelected:t,onMediaItemSelected:n,onUploadFinished:o,children:i}=e;return(0,r.createElement)(a.Provider,{value:{onFilesSelected:t,onMediaItemSelected:n,onUploadFinished:o},children:i})}},90879:function(e,t,n){"use strict";n.d(t,{s:function(){return r},v:function(){return o}});const r=[{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"}],o={PUBLIC:0,PRIVATE:1,SITE_DEFAULT:2}},29899:function(e,t,n){"use strict";var r=n(4900);t.Z={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.Z,isDeprecation:!0}},4900:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(51806),o=n(52175);function a(e){let{attributes:t}=e;const{caption:n,guid:a}=t;if(!a)return null;const i=`https://videopress.com/v/${a}`;return(0,r.createElement)("figure",{className:"wp-block-embed is-type-video is-provider-videopress"},(0,r.createElement)("div",{className:"wp-block-embed__wrapper"},`\n${i}\n`),!o.RichText.isEmpty(n)&&(0,r.createElement)(o.RichText.Content,{tagName:"figcaption",value:n}))}},97504:function(e,t,n){"use strict";var r=n(30454),o=n(93512);t.Z={attributes:{autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},muted:{type:"boolean"},playsInline:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},src:{type:"string"},videoPressClassNames:{type:"string"},align:{type:"wide"}},support:{reusable:!1},isEligible:e=>{let{videoPressClassNames:t,guid:n}=e;return n&&void 0===t},migrate:e=>{const{className:t,videoPressClassNames:n}=e;return{...e,...(0,o.a)(t,n)}},save:r.Z,isDeprecation:!0}},30454:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(51806),o=n(52175),a=n(92490);function i(e){const{attributes:{autoplay:t,caption:n,controls:i,guid:s,loop:c,muted:l,poster:u,preload:p,videoPressClassNames:d}={}}=e;if(!s)return null;const m=(0,a.p)(s,{autoplay:t,controls:i,loop:c,muted:l,poster:u,preload:p});return(0,r.createElement)("figure",{className:d},(0,r.createElement)("div",{className:"wp-block-embed__wrapper"},`\n${m}\n`),!o.RichText.isEmpty(n)&&(0,r.createElement)(o.RichText.Content,{tagName:"figcaption",value:n}))}},92490:function(e,t,n){"use strict";n.d(t,{p:function(){return o}});var r=n(96483);const o=(e,t)=>{let{autoplay:n,controls:o,loop:a,muted:i,poster:s,preload:c}=t;if(!e)return null;const l={...n&&{autoPlay:!0},...!o&&{controls:!1},...a&&{loop:!0},...i&&{muted:!0,persistVolume:!1},...s&&{posterUrl:s},..."none"!==c&&{preloadContent:c}};return(0,r.addQueryArgs)(`https://videopress.com/v/${e}`,l)}},93512:function(e,t,n){"use strict";n.d(t,{a:function(){return c}});var r=n(29512),o=n.n(r),a=n(73320),i=n.n(a);const s=[{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"}],c=(e,t)=>{const n=s.reduce(((e,t)=>{let{className:n}=t;return e[n]=!1,e}),{"wp-has-aspect-ratio":!1}),r=i()(e,{...n,"wp-block-embed":!1,"is-type-video":!1,"is-provider-videopress":!1}),a=new(o())(r);let c=i()(e,t);return a.forEach((e=>{c=c.replace(e,"")})),{className:r,videoPressClassNames:c.trim()}}},34284:function(e,t,n){"use strict";var r=n(46721);t.Z={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.Z,isDeprecation:!0}},46721:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(51806),o=n(52175),a=n(65235),i=n.n(a),s=n(96931);function c(e){const{attributes:{autoplay:t,caption:n,controls:a,guid:c,loop:l,muted:u,playsinline:p,poster:d,preload:m,videoPressClassNames:h,className:f,align:g,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:k}={}}=e,y=o.useBlockProps.save({className:i()("wp-block-video",f,h,{[`align${g}`]:g})}),w=(0,s.p)(c,{autoplay:t,controls:a,loop:l,muted:u,playsinline:p,poster:d,preload:m,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:k});return(0,r.createElement)("figure",y,(0,r.createElement)("div",{className:"wp-block-embed__wrapper"},`\n${w}\n`),!o.RichText.isEmpty(n)&&(0,r.createElement)(o.RichText.Content,{tagName:"figcaption",value:n}))}},96931:function(e,t,n){"use strict";n.d(t,{p:function(){return o}});var r=n(96483);const o=(e,t)=>{let{autoplay:n,controls:o,loop:a,muted:i,playsinline:s,poster:c,preload:l,seekbarColor:u,seekbarPlayedColor:p,seekbarLoadingColor:d}=t;if(!e)return null;const m={resizeToParent:!0,...n&&{autoPlay:!0},...!o&&{controls:!1},...a&&{loop:!0},...i&&{muted:!0,persistVolume:!1},...s&&{playsinline:!0},...c&&{posterUrl:c},..."none"!==l&&{preloadContent:l},...""!==u&&{sbc:u},...""!==p&&{sbpc:p},...""!==d&&{sblc:d}};return(0,r.addQueryArgs)(`https://videopress.com/v/${e}`,m)}},58351:function(e,t,n){"use strict";var r=n(83619);t.Z={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.Z,isDeprecation:!0}},83619:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(51806),o=n(52175),a=n(65235),i=n.n(a),s=n(67502);function c(e){const{attributes:{autoplay:t,caption:n,controls:a,guid:c,loop:l,muted:u,playsinline:p,poster:d,preload:m,videoPressClassNames:h,className:f,align:g,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:k,maxWidth:y}={}}=e,w=o.useBlockProps.save({className:i()("wp-block-video",f,h,{[`align${g}`]:g})}),E=(0,s.p)(c,{autoplay:t,controls:a,loop:l,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,r.createElement)("figure",w,(0,r.createElement)("div",{className:"wp-block-embed__wrapper",style:_},`\n${E}\n`),!o.RichText.isEmpty(n)&&(0,r.createElement)(o.RichText.Content,{tagName:"figcaption",value:n}))}},67502:function(e,t,n){"use strict";n.d(t,{p:function(){return o}});var r=n(96483);const o=(e,t)=>{let{autoplay:n,controls:o,loop:a,muted:i,playsinline:s,poster:c,preload:l,seekbarColor:u,seekbarPlayedColor:p,seekbarLoadingColor:d}=t;if(!e)return null;const m={resizeToParent:!0,cover:!0,...n&&{autoPlay:!0},...!o&&{controls:!1},...a&&{loop:!0},...i&&{muted:!0,persistVolume:!1},...s&&{playsinline:!0},...c&&{posterUrl:c},..."none"!==l&&{preloadContent:l},...""!==u&&{sbc:u},...""!==p&&{sbpc:p},...""!==d&&{sblc:d}};return(0,r.addQueryArgs)(`https://videopress.com/v/${e}`,m)}},30053:function(e,t,n){"use strict";var r=n(82674),o=n.n(r),a=n(51806),i=n(86989),s=n.n(i),c=n(11313),l=n(52175),u=n(55609),p=n(94333),d=n(9818),m=n(69307),h=n(81975),f=n(65736),g=n(61074),b=n(65235),v=n.n(b),k=n(92819),y=n(99196),w=n(81427),E=n(10723),_=n(90879),C=n(31302),S=n(43774),j=n(75880),x=n(22081),L=n(32478),P=n(90953),A=n(77290);const __=f.__,_x=f._x,T=["image"],N=e=>{const t=(0,l.useBlockProps)({className:"resumable-upload"}),{onChangeTitle:n,title:r,filename:o,onSelectPoster:i,onRemovePoster:s,videoPosterImageData:c,fileForUpload:h,isUploadComplete:f,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,a.createElement)(E.Z,{onUploadFinished:e.uploadFinished},(0,a.createElement)(m.Fragment,null,e.blockSettings,(0,a.createElement)("div",t,(0,a.createElement)("div",{className:"uploader-block__logo"},(0,a.createElement)(g.Z,{icon:w.ll}),(0,a.createElement)("div",{className:"uploader-block__logo-text"},__("VideoPress","jetpack"))),(0,a.createElement)(L.$,{file:h,filename:o,title:r,onChangeTitle:n,onSelectPoster:i,onRemovePoster:s,videoPosterImageData:c,onVideoFrameSelected:k}),!f&&(0,a.createElement)(S.Z,{file:h}),f&&(0,a.createElement)("div",{className:"uploader-block__upload-complete"},(0,a.createElement)("span",null,__("Upload Complete!","jetpack")," 🎉"),(0,a.createElement)(u.Button,{variant:"primary",onClick:b},__("Done","jetpack"))))))},M=e=>{let{scripts:t}=e;const{html:n,interactive:r,caption:o,isSelected:i,hideOverlay:s,attributes:c,setAttributes:p}=e,{align:d,className:m,videoPressClassNames:h,maxWidth:f}=c,g=(0,l.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,a.createElement)("figure",g,(0,a.createElement)("div",{className:"wp-block-embed__wrapper"},(0,a.createElement)(u.ResizableBox,{enable:{top:!1,bottom:!1,left:!0,right:!0},maxWidth:"100%",size:{width:f},style:{margin:"auto"},onResizeStop:(e,t,n)=>{let r=getComputedStyle(n).width;if(null!==n.parentElement){r===getComputedStyle(n.parentElement).width&&(r="100%")}p({maxWidth:r})}},(0,a.createElement)(u.SandBox,{html:n,scripts:t,type:h}))),!r&&(0,a.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:s}),(!l.RichText.isEmpty(o)||i)&&(0,a.createElement)(l.RichText,{tagName:"figcaption",placeholder:__("Write caption…","jetpack"),value:o,onChange:e=>p({caption:e}),inlineToolbar:!0}))};t.Z=(0,p.createHigherOrderComponent)((0,p.compose)([(0,d.withSelect)(((e,t)=>{const{autoplay:n,controls:r,fileForImmediateUpload:o,guid:a,loop:i,muted:s,playsinline:l,poster:u,preload:p,seekbarColor:d,seekbarLoadingColor:m,seekbarPlayedColor:h,src:f,useAverageColor:g}=t.attributes,{getEmbedPreview:b,isRequestingEmbedPreview:v}=e("core"),k=(0,P.p)(a,{autoplay:n,controls:r,loop:i,muted:s,playsinline:l,poster:u,preload:p,seekbarColor:d,seekbarLoadingColor:m,seekbarPlayedColor:h,useAverageColor:g}),y=!!k&&b(k),w=!!k&&v(k),E=!!window.videoPressResumableEnabled;return{fileForImmediateUpload:o,isFetchingPreview:w,isUploading:!E&&(0,c.isBlobURL)(f),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 n={};if(!e.isSelected&&t.interactive&&(n.interactive=!1),t.fileForUpload&&!t.isEditingWhileUploading){null!==t.fileForUpload&&t.fileForUpload instanceof File&&(n.isEditingWhileUploading=!0)}return Object.keys(n).length?n: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 n=(0,k.get)(t,"jetpack_videopress.rating");const r=(0,k.get)(t,"jetpack_videopress.allow_download"),o=(0,k.get)(t,"jetpack_videopress.privacy_setting",_.v.SITE_DEFAULT);n&&("X-18"===n&&(n="R-17"),this.setState({rating:n})),void 0!==r&&this.setState({allowDownload:!!r}),void 0!==o&&this.setState({privacySetting:o})};async componentDidUpdate(e){const{attributes:t,invalidateCachedEmbedPreview:n,preview:r,setAttributes:o,url:a,isFetchingPreview:i}=this.props;t.id!==e.attributes.id&&(await this.setGuid(),this.setRatingAndAllowDownload());let s=!1;if(a&&a!==e.url&&(n(a),s=!0),r){const e=(0,A.f6)(r.html,v()("wp-block-embed","is-type-video","is-provider-videopress"),!1);this.previewFailuresCount=0,o({videoPressClassNames:e})}else i||s||!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:n}=e;if(n)try{const e=await this.requestMedia(n);if(null===e)return;const r=(0,k.get)(e,"jetpack_videopress.guid");r?(t({guid:r}),this.setTracks(r)):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 s()({path:`/wp/v2/media/${e}`}).catch((()=>(this.setState({fallback:!0}),null))).finally((()=>{this.setState({isFetchingMedia:!1})})),{id:n}=this.props.attributes;return e!==n?null:(this.setState({media:t,lastRequestedMediaId:e}),t)};setTracks=e=>{const{setAttributes:t}=this.props;e&&s()({url:`https://public-api.wordpress.com/rest/v1.1/videos/${e}`,credentials:"omit",global:!0}).then((e=>{const n=[];Object.keys(e.tracks).forEach((t=>{for(const r in e.tracks[t]){const o=e.tracks[t][r];n.push({src:o.src,kind:t,srcLang:r,label:o.label})}})),t({videoPressTracks:n})}))};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,a.createElement)(u.Tooltip,{text:t,position:"top"},(0,a.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,n,r)=>{const{invalidateCachedEmbedPreview:o,url:a}=this.props,{id:i}=this.props.attributes;if(!i)return;t();const c={id:i};Object.assign(c,e),s()({path:"/wpcom/v2/videopress/meta",method:"POST",data:c}).then((e=>{status in e&&200!==e.status&&n()})).catch((()=>n())).finally((()=>{r(),o(a)}))};render(){const{attributes:t,instanceId:n,isFetchingPreview:r,isUploading:i,preview:c,resumableUploadEnabled:p,setAttributes:d}=this.props,{fallback:g,fileForUpload:b,isFetchingMedia:v,isUpdatingRating:k,interactive:y,rating:w,allowDownload:S,privacySetting:L,isUpdatingAllowDownload:P,isUpdatingPrivacySetting:I,videoPosterImageData:R}=this.state,{autoplay:Z,caption:D,controls:B,guid:F,loop:O,muted:U,playsinline:z,poster:H,preload:$,useAverageColor:q,videoPressTracks:V,isVideoPressExample:G,src:W}=t;if(G&&W)return(0,a.createElement)("img",{src:W,alt:D});const J=`video-block__poster-image-description-${n}`,K=!(!H&&!R),Y=(0,a.createElement)(m.Fragment,null,(0,a.createElement)(l.BlockControls,{group:"block"},(0,a.createElement)(x.Z,{tracks:V,onChange:e=>{d({videoPressTracks:e})},guid:F})),(0,a.createElement)(l.BlockControls,null,(0,a.createElement)(u.ToolbarGroup,null,(0,a.createElement)(u.ToolbarButton,{className:"components-icon-button components-toolbar__control",text:__("Replace","jetpack"),onClick:this.switchToEditing}))),(0,a.createElement)(l.InspectorControls,null,(0,a.createElement)(u.PanelBody,{title:__("Video Settings","jetpack")},(0,a.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,a.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:O}),(0,a.createElement)(u.ToggleControl,{label:__("Muted","jetpack"),onChange:this.toggleAttribute("muted"),checked:U}),(0,a.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,a.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,a.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,a.createElement)(l.MediaUploadCheck,null,(0,a.createElement)(u.BaseControl,{className:"editor-video-poster-control",label:__("Poster Image","jetpack")},(0,a.createElement)(l.MediaUpload,{title:__("Select Poster Image","jetpack"),onSelect:this.onSelectPoster,allowedTypes:T,render:e=>{let{open:t}=e;return(0,a.createElement)(u.Button,{variant:"secondary",onClick:t,ref:this.posterImageButton,"aria-describedby":J},K?__("Replace image","jetpack",0):__("Select Poster Image","jetpack"))}}),(0,a.createElement)("p",{id:J,hidden:!0},K?(0,f.sprintf)(/* translators: Placeholder is an image URL. */ __("The current poster image url is %s","jetpack"),H??R):__("There is no poster image currently selected","jetpack")),K&&(0,a.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,a.createElement)(u.ExternalLink,{href:"https://automattic.survey.fm/videopress-feedback"})})),(0,a.createElement)(j.Z,{attributes:t,setAttributes:d,useAverageColor:q,toggleAttribute:this.toggleAttribute}),(0,a.createElement)(u.PanelBody,{title:__("Video File Settings","jetpack")},(0,a.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,a.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||P}),(0,a.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||I})))),X=e=>{this.setState({fileForUpload:e[0]})},Q=e=>{e&&e.url?(this.props.setAttributes({src:e.url,id:e.id,poster:e.image?.src!==e.icon?e.image?.src:void 0}),e.videopress_guid&&this.props.setAttributes({guid:e.videopress_guid})):d({src:void 0,id:void 0,poster:void 0})},ee=()=>"videoPressUploadPoster"in window,te=(0,h.escapeHTML)(b?(0,A.K8)(b.name):""),ne=e=>{let{mediaId:t,guid:n,src:r}=e;this.setState({title:this.state.title??te,fileForUpload:null,isUploadComplete:!!t,isEditingWhileUploading:!!t&&this.state.isEditingWhileUploading}),t&&n&&r&&d({id:t,guid:n,src:r})},re=e=>{this.setState({title:e})},oe=e=>{this.setState({videoFrameSelectedInMillis:e,videoPosterImageData:null})},ae=()=>{const e=this.state.title;this.updateMetaApiCall({title:e},(()=>this.setState({isUpdatingTitle:!0,title:e})),(()=>this.setState({title:e})),(()=>this.setState({isUpdatingTitle:!1})))},ie=()=>pe({at_time:this.state.videoFrameSelectedInMillis,is_millisec:!0}),se=()=>pe({poster_attachment_id:this.state.videoPosterImageData.id}),ce=e=>{e.generating?le():ue(e.poster)},le=()=>{setTimeout((()=>{(ee()?window.videoPressGetPoster(F):s()({path:`/videos/${F}/poster`,apiNamespace:"rest/v1.1",global:!0,method:"GET"})).then((e=>ce(e)))}),2e3)},ue=e=>{e&&d({poster:e})},pe=e=>{if(ee())return window.videoPressUploadPoster(F,e).then((e=>ce(e)));s()({path:`/videos/${F}/poster`,apiNamespace:"rest/v1.1",method:"POST",global:!0,data:e}).catch((e=>e))},de=()=>{const{title:e,videoFrameSelectedInMillis:t}=this.state;e&&ae(),R?se():null!=t&&ie()},me=()=>{this.setState({isEditingWhileUploading:!1}),de()};if(null!=b&&b.name||this.state.isEditingWhileUploading){const e=this.state.title??te;return(0,a.createElement)(N,{fileForUpload:b,filename:te,uploadFinished:ne,blockSettings:Y,onDismissEditor:me,isUploadComplete:this.state.isUploadComplete,onSelectPoster:this.onSelectPoster,onRemovePoster:this.onRemovePoster,onChangeTitle:re,title:e,videoPosterImageData:this.state.videoPosterImageData,onVideoFrameSelected:oe,onSave:de})}const he=v||r,fe=g||i||!F,ge=fe&&!i&&!he,be=(0,a.createElement)(m.Fragment,null,(0,a.createElement)("div",{className:i||he?"":"videopress-block-hide"},(0,a.createElement)(C.Z,{text:i?__("Uploading…","jetpack"):__("Generating preview…","jetpack",0)})),(0,a.createElement)("div",{className:ge?"":"videopress-block-hide"},(0,a.createElement)(e,this.props)));if(fe)return p?(0,a.createElement)(E.Z,{onFilesSelected:X,onMediaItemSelected:Q},be):(0,a.createElement)(m.Fragment,null,be);const{html:ve,scripts:ke}=c||{html:null,scripts:null},ye=he||!c;return(0,a.createElement)(m.Fragment,null,Y,ye&&(0,a.createElement)(C.Z,{text:__("Generating preview…","jetpack")}),!ye&&(0,a.createElement)(M,o()({},this.props,{hideOverlay:this.hideOverlay,html:ve,scripts:ke,interactive:y,caption:D})))}}]),"withVideoPressEdit")},37549:function(e,t,n){"use strict";var r=n(82674),o=n.n(r),a=n(51806),i=n(6975),s=n(13419),c=n(11313),l=n(52175),u=n(65391),p=n(4981),d=n(55609),m=n(94333),h=n(9818),f=n(12238),g=n(69307),b=n(92694),v=n(65736),k=n(92819),y=n(10723),w=n(29899),E=n(97504),_=n(34284),C=n(58351),S=n(30053),j=n(23096),x=n(77290),L=n(23062),P=n(84676),A=n(41194);const __=v.__,T=(0,m.createHigherOrderComponent)((e=>t=>{const{name:n}=(0,l.useBlockEditContext)();return"core/video"!==n?(0,a.createElement)(e,t):(0,a.createElement)(e,o()({},t,{disableDropZone:!0,className:"no-videopress-media-placeholder"}),(0,a.createElement)(d.Button,{disabled:!0,className:"components-button no-videopress-disabled-button",variant:"secondary"},__("Media Library","jetpack")),(0,a.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:n}=(0,l.useBlockEditContext)();if("core/video"!==n)return(0,a.createElement)(e,t);const{onFilesSelected:r,onMediaItemSelected:i}=(0,g.useContext)(y.H),s={...t,handleUpload:!1,disableDropZone:!0,onSelect:e=>{void 0!==e.length?r(e):i(e)}};return(0,a.createElement)(e,o()({},s,{className:"videopress-media-placeholder"}))}),"videoPressMediaPlaceholder"),M=(e,t,n)=>("core/video"!==t.name||!n.guid||n.className?.indexOf("wp-block-video")>=0||n.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,s.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:n,edit:r,save:o,supports:a,transforms:i}=e,{available:l,unavailableReason:u}=(0,s.OZ)("videopress"),d=((0,s.Wp)()||(0,s.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,s.T)("core/video"))):l&&(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:A}),(0,b.addFilter)("blocks.getSaveContent.extraProps","jetpack/videopress",M,20),l||["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}},s=/https?:\/\/v\.wordpress\.com\/([a-zA-Z\d]{8})(.+)?/i;return{...e,attributes:{...e.attributes,...t},transforms:{...i,from:[{type:"files",isMatch:e=>(0,k.every)(e,(e=>0===e.type.indexOf("video/"))),priority:9,transform:(e,t)=>{const n=[];return e.forEach((e=>{if(l&&m){const t=(0,p.createBlock)("core/video",{fileForImmediateUpload:e});n.push(t)}else{const r=(0,p.createBlock)("core/video",{src:(0,c.createBlobURL)(e)});(0,f.mediaUpload)({filesList:[e],onFileChange:e=>{let[{id:n,url:o}]=e;t(r.clientId,{id:n,src:o})},allowedTypes:["video"]}),n.push(r)}})),n}},{type:"raw",isMatch:e=>"P"===e.nodeName&&s.test(e.innerHTML),transform:e=>{const t=s.exec(e.innerHTML);return(0,p.createBlock)("core/embed",{url:"https://videopress.com/v/"+t[1].trim()})}}]},supports:{...a,reusable:!1},edit:(0,S.Z)(r),save:(0,j.Z)(o),deprecated:[...n||[],C.Z,_.Z,{attributes:t,isEligible:e=>!e.guid,save:o,supports:a,isDeprecation:!0},E.Z,w.Z]}}return e}),5),(0,b.addFilter)("blocks.registerBlockType","videopress/add-wp-chapters-support",P.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 n=(0,p.getBlockType)("videopress/video"),{available:r}=(0,s.OZ)("videopress/video");return n&&r?{...e,transforms:{from:[...e.transforms?.from||[],{type:"block",blocks:["core/video"],isMatch:e=>{const{src:t,guid:n}=e,r=(0,x.Zx)(t);return n||r},transform:e=>{const t=(0,h.select)(f.store).getCurrentPostId();return i.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 I=(0,m.createHigherOrderComponent)((e=>t=>{const{block:n}=t,{name:r,attributes:o,clientId:i,__unstableBlockSource:c}=n,{replaceBlock:u}=(0,h.useDispatch)(l.store),{url:d,guid:m,providerNameSlug:f}=o,{available:b}=((0,x.Kp)(o),(0,p.getBlockType)("videopress/video"),(0,s.OZ)("videopress/video")),v="core/embed"===r,k=(0,x.Zx)(d),y=v&&k?k:m;(0,s.Wp)();return(0,g.useEffect)((()=>{}),[i,false,o,c,u,y]),(0,a.createElement)(e,t)}),"convertVideoBlockToVideoPressVideoBlock");(0,b.addFilter)("editor.BlockListBlock","videopress/jetpack-convert-to-videopress-video-block",I);const R=(0,m.createHigherOrderComponent)((e=>t=>{const{block:n}=t,{name:r,attributes:o,clientId:i}=n,{replaceBlock:s}=(0,h.useDispatch)(l.store);return(0,g.useEffect)((()=>{if("core/missing"===r&&"videopress/video"===o?.originalName)try{const e=(0,u.parse)(o.originalContent),t=e?.[0];if(!t)return;const{attrs:n}=t;s(i,(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}(n)))}catch(e){console.error("Error converting VideoPress block to core/video",e)}}),[r,i,o,s]),(0,a.createElement)(e,t)}),"convertV6toV5");(0,b.addFilter)("editor.BlockListBlock","videopress/jetpack-convert-from-v6-to-v5",R)},31302:function(e,t,n){"use strict";var r=n(51806),o=n(55609);t.Z=e=>{let{text:t}=e;return(0,r.createElement)("div",{className:"wp-block-embed is-loading"},(0,r.createElement)(o.Spinner,null),(0,r.createElement)("p",null,t))}},43774:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(90861),c=n.n(s),l=n(10723),u=n(5482);const __=i.__;function p(e){let{file:t}=e;const[n,s]=(0,a.useState)(0),[p,d]=(0,a.useState)(!1),[m,h]=(0,a.useState)(null),[f,g]=(0,a.useState)(null),[b,v]=(0,a.useState)(null),{onUploadFinished:k}=(0,a.useContext)(l.H),y=(0,a.useRef)(null);y.current=m;const w=(0,a.useCallback)((()=>{const e=(0,u.J)({onError:e=>{g(e)},onProgress:(e,t)=>{s(e/t*100)},onSuccess:e=>{k(e)},onUploadUuidRetrieved:e=>{null===b&&v(e)}});(0,u.v)().then((n=>{const r=e(t,n);h(r)})).catch((e=>{g(e)}))}),[t,k,b]);(0,a.useEffect)((()=>(w(),()=>{null!==y.current&&y.current.abort()})),[]);const E=Math.round(n),_={width:`${E}%`},C=c()(t.size);return(0,r.createElement)(r.Fragment,null,null!==f?(0,r.createElement)("div",{className:"resumable-upload__error"},(0,r.createElement)("div",{className:"resumable-upload__error-text"},(()=>{let e=__("An error was encountered during the upload. Check your network connection.","jetpack");if("object"==typeof f){const t=f.toString().match(/message":"([^"]+)"/);if(t&&"object"==typeof t&&2===t.length){const n=t[1];if("Invalid Mime"!==n)return n;e=(0,r.createElement)(r.Fragment,null,__("The format of the video you uploaded is not supported.","jetpack")," ",(0,r.createElement)(o.ExternalLink,{href:"https://wordpress.com/support/videopress/recommended-video-settings/",target:"_blank",rel:"noreferrer"},__("Check the recommended video settings.","jetpack")))}}return e})()),(0,r.createElement)(o.Button,{variant:"primary",onClick:()=>(g(null),void w())},__("Try again","jetpack")),(0,r.createElement)(o.Button,{variant:"secondary",onClick:()=>k({mediaId:null}),className:"resumable-upload__error-cancel"},__("Cancel","jetpack"))):(0,r.createElement)("div",{className:"resumable-upload__status"},(0,r.createElement)("div",{className:"resumable-upload__progress"},(0,r.createElement)("div",{className:"resumable-upload__progress-loaded",style:_})),(0,r.createElement)("div",{className:"resumable-upload__file-info"},(0,r.createElement)("div",null,p?(0,i.sprintf)(/* translators: Placeholder is an upload progress percenatage number, from 0-100. */ __("Paused (%s%%)","jetpack"),E):(0,i.sprintf)(/* translators: Placeholder is an upload progress percenatage number, from 0-100. */ __("Uploading (%s%%)","jetpack"),E)),(0,r.createElement)("div",{className:"resumable-upload__file-size"},C)),(0,r.createElement)("div",{className:"resumable-upload__actions"},(0,r.createElement)(o.Button,{variant:"link",onClick:()=>{m&&(p?m.start():m.abort(),d(!p))}},p?"Resume":"Pause"))))}},5482:function(e,t,n){"use strict";n.d(t,{J:function(){return i},v:function(){return o}});var r=n(99537);const o=function(e){return new Promise((function(t,n){const r=e?{data:{key:e}}:{};wp.media.ajax("videopress-get-upload-jwt",{async:!0,...r}).done((function(e){t({token:e.upload_token,blogId:e.upload_blog_id,url:e.upload_action_url})})).fail((function(e){n(e)}))}))},a={},i=e=>{let{onUploadUuidRetrieved:t,onError:n,onProgress:i,onSuccess:s}=e;return(e,c)=>{const l=new r.gq(e,{onError:n,onProgress:i,endpoint:c.url,removeFingerprintOnSuccess:!0,withCredentials:!1,autoRetry:!0,overridePatchMethod:!1,chunkSize:1e7,allowedFileTypes:["video/*"],metadata:{filename:e.name,filetype:e.type},retryDelays:[0,1e3,3e3,5e3,1e4],onAfterResponse:function(e,n){if(n.getStatus()>=400)return;const r=n.getHeader("x-videopress-upload-guid"),o=n.getHeader("x-videopress-upload-media-id"),i=n.getHeader("x-videopress-upload-src-url");if(r&&o&&i)return void(s&&s({mediaId:Number(o),guid:r,src:i}));const c={"x-videopress-upload-key-token":"token","x-videopress-upload-key":"key"},l={};Object.keys(c).forEach((function(e){const t=n.getHeader(e);t&&(l[c[e]]=t)})),l.key&&l.token&&(a[l.key]=l.token),l.key&&t(l.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(!!!c.token)throw"should never happen";e.setHeader("x-videopress-upload-token",c.token)}if(["OPTIONS","GET","HEAD","DELETE","PUT","PATCH"].indexOf(t)>=0){const n=new URL(e._url).pathname.split("/"),r=n[n.length-1];if(a[r])e.setHeader("x-videopress-upload-token",a[r]);else if("HEAD"===t)return o(r).then((t=>(a[r]=t.token,e.setHeader("x-videopress-upload-token",t.token),e)))}return Promise.resolve(e)}});return l.findPreviousUploads().then((function(e){e.length&&l.resumeFromPreviousUpload(e[0]),l.start()})),l}}},23096:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(94333),i=n(65235),s=n.n(i),c=n(90953);t.Z=(0,a.createHigherOrderComponent)((e=>t=>{const{attributes:{autoplay:n,caption:a,controls:i,guid:l,loop:u,muted:p,playsinline:d,poster:m,preload:h,videoPressClassNames:f,className:g,align:b,seekbarColor:v,seekbarPlayedColor:k,seekbarLoadingColor:y,useAverageColor:w,maxWidth:E}={}}=t,_=o.useBlockProps.save({className:s()("wp-block-video",g,f,{[`align${b}`]:b})});if(!l)return e(t);const C=(0,c.p)(l,{autoplay:n,controls:i,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,r.createElement)("figure",_,(0,r.createElement)("div",{className:"wp-block-embed__wrapper",style:S},`\n${C}\n`),!o.RichText.isEmpty(a)&&(0,r.createElement)(o.RichText.Content,{tagName:"figcaption",value:a}))}),"withVideoPressSave")},75880:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(55609),i=n(69307),s=n(65736);n(99196);const __=s.__;class c extends i.Component{constructor(){super(...arguments);const{seekbarColor:e,seekbarPlayedColor:t,seekbarLoadingColor:n}=this.props.attributes;this.state={seekbarColor:e,seekbarPlayedColor:t,seekbarLoadingColor:n}}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:n}=this.state,{setAttributes:r}=this.props;r({seekbarColor:e,seekbarLoadingColor:t,seekbarPlayedColor:n})};render(){const{seekbarColor:e,seekbarPlayedColor:t,seekbarLoadingColor:n}=this.state,{toggleAttribute:i,useAverageColor:s}=this.props,c=!0;return(0,r.createElement)(a.PanelBody,{className:"seekbar-color-settings__panel",title:__("Progress Bar Colors","jetpack"),initialOpen:!1},(0,r.createElement)(a.ToggleControl,{label:__("Match video","jetpack"),help:__("Colors adapt to the video as it plays","jetpack"),onChange:i("useAverageColor"),checked:s}),(0,r.createElement)(o.PanelColorSettings,{opened:!s,showTitle:!1,colorSettings:[{value:e,onChange:this.handleChangeSeekbarColor,label:__("Main","jetpack"),showTitle:c},{value:n,onChange:this.handleChangeSeekbarLoadingColor,label:__("Loaded","jetpack"),showTitle:c},{value:t,onChange:this.handleChangeSeekbarPlayedColor,label:__("Progress","jetpack"),showTitle:c}]},(0,r.createElement)(a.Button,{variant:"secondary",onClick:this.saveColors},__("Save colors","jetpack"))))}}t.Z=c},22081:function(e,t,n){"use strict";n.d(t,{Z:function(){return w},n:function(){return b}});var r=n(51806),o=n(86989),a=n.n(o),i=n(52175),s=n(55609),c=n(9818),l=n(69307),u=n(65736),p=n(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"}],f=(0,r.createElement)(s.SVG,{width:"18",height:"14",viewBox:"0 0 18 14",role:"img",fill:"none"},(0,r.createElement)(s.Rect,{x:"0.75",y:"0.75",width:"16.5",height:"12.5",rx:"1.25",stroke:"black",strokeWidth:"1.5",fill:"none"}),(0,r.createElement)(s.Path,{d:"M3 7H15",stroke:"black",strokeWidth:"1.5"}),(0,r.createElement)(s.Path,{d:"M3 10L15 10",stroke:"black",strokeWidth:"1.5"})),g=()=>"videoPressUploadTrack"in window,b=(e,t)=>{if(g())return window.videoPressUploadTrack(t,e.kind,e.srcLang,e.label,e.tmpFile);const n={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 a()(n)},v=(e,t)=>{if(g())return window.videoPressDeleteTrack(t,e.kind,e.srcLang);const n={method:"POST",path:`/videos/${t}/tracks/delete`,apiNamespace:"rest/v1.1",global:!0,parse:!1,formData:[["kind",e.kind],["srclang",e.srcLang]]};return a()(n)};function k(e){let{tracks:t,onChange:n,guid:o}=e;const[a=-1,i]=(0,l.useState)();let c;return c=0===t.length?(0,r.createElement)("p",{className:"videopress-block-tracks-editor__tracks-informative-message"},__("Tracks can be subtitles, captions, chapters, or descriptions. They help make your content more accessible to a wider range of users.","jetpack")):t.map(((e,c)=>(0,r.createElement)("div",{key:c,className:"videopress-block-tracks-editor__track-list-track"},(0,r.createElement)("span",null,e.label),(0,r.createElement)("div",{className:"videopress-block-tracks-editor__track-list-track-delete"},(0,r.createElement)(s.Button,{variant:"link",isDestructive:!0,onClick:()=>{(e=>{const r=t[e];i(e),v(r,o).finally((()=>{n(t.filter(((t,n)=>n!==e))),i(-1)}))})(c)},"aria-label":(0,u.sprintf)(/* translators: %s: Label of the video text track e.g: "French subtitles" */ __("Delete %s","jetpack"),e.label),disabled:a===c},a===c?__("Deleting","jetpack"):__("Delete","jetpack",0)))))),(0,r.createElement)(s.MenuGroup,{label:__("Text tracks","jetpack"),className:"videopress-block-tracks-editor__track-list"},c)}function y(e){let{track:t,guid:n,onChange:o,onClose:a,onCancel:p,trackExists:f}=e;const[g,v]=(0,l.useState)(),[k=!1,y]=(0,l.useState)(),{label:w="",srcLang:E="",kind:_=d}=t,C=t.tmpFile?t.tmpFile.name:"";if(!(0,c.useSelect)((e=>e(i.store).getSettings().mediaUpload),[]))return null;return(0,r.createElement)(s.NavigableMenu,null,(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor"},(0,r.createElement)("span",{className:"videopress-block-tracks-editor__single-track-editor-label"},__("Edit track","jetpack")),(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file"},(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-label"},(0,r.createElement)("span",null,__("File","jetpack"),":"),""!==C&&(0,r.createElement)("span",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-label-name"},(0,r.createElement)("strong",null,C)),(0,r.createElement)(i.MediaUploadCheck,null,(0,r.createElement)(s.FormFileUpload,{onChange:e=>{const n=e.target.files;!n.length>0||(t.tmpFile=n[0],o(t))},accept:m,render:e=>{let{openFileDialog:t}=e;return(0,r.createElement)(s.Button,{variant:"link",onClick:()=>{t()}},""===C?__("Select track","jetpack"):__("Change track","jetpack",0))},disabled:k}))),(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-help"},/* translators: %s: The allowed file types to be uploaded as a video text track." */ (0,u.sprintf)(__("Allowed formats: %s","jetpack"),m))),(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-label-language"},(0,r.createElement)(s.TextControl,{onChange:e=>o({...t,label:e}),label:__("Label","jetpack"),value:w,help:__("Title of track","jetpack"),disabled:k}),(0,r.createElement)(s.TextControl,{onChange:e=>o({...t,srcLang:e}),label:__("Source language","jetpack"),value:E,help:__("Language tag (en, fr, etc.)","jetpack"),disabled:k})),(0,r.createElement)(s.SelectControl,{className:"videopress-block-tracks-editor__single-track-editor-kind-select",options:h,value:_,label:/* translators: %s: The kind of video text track e.g: "Subtitles, Captions" */ __("Kind","jetpack"),onChange:e=>{o({...t,kind:e})},disabled:k}),(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-buttons-container"},k?(0,r.createElement)(s.Spinner,null):(0,r.createElement)(s.Button,{variant:"secondary",disabled:!t.tmpFile,onClick:()=>{v(null),""===w&&(t.label=__("English","jetpack")),""===E&&(t.srcLang="en"),void 0===t.kind&&(t.kind=d),f(t)?v(__("A track already exists for that language and kind.","jetpack")):(y(!0),b(t,n).then((()=>{o(t),v(null),a()})).catch((e=>{e.message&&v(e.message)})).finally((()=>{y(!1)})))}},__("Save","jetpack")),(0,r.createElement)(s.Button,{variant:"link",onClick:p},__("Close","jetpack"))),g&&(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-error"},/* translators: %s: An error message returned after a failed video track file upload." */ (0,u.sprintf)(__("Error: %s","jetpack"),g))))}function w(e){let{tracks:t=[],onChange:n,guid:o}=e;const[a,i]=(0,l.useState)(null);return(0,r.createElement)(s.Dropdown,{contentClassName:"videopress-block-tracks-editor",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,r.createElement)(s.ToolbarButton,{label:__("Text tracks","jetpack"),showTooltip:!0,"aria-expanded":t,"aria-haspopup":"true",onClick:n,icon:f})},renderContent:()=>null!==a?(0,r.createElement)(y,{track:t[a],guid:o,onChange:e=>{const r=[...t];r[a]=e,n(r)},onClose:()=>i(null),onCancel:()=>{n(t.filter(((e,t)=>t!==a))),i(null)},trackExists:e=>-1!==t.filter(((e,t)=>t!==a)).findIndex((t=>t.kind===e.kind&&t.srcLang===e.srcLang))}):(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.NavigableMenu,null,(0,r.createElement)(k,{tracks:t,onChange:n,guid:o}),(0,r.createElement)(s.MenuGroup,{className:"videopress-block-tracks-editor__add-tracks-container",label:__("Add tracks","jetpack")},(0,r.createElement)(s.MenuItem,{icon:p.Z,onClick:()=>{(()=>{const e=t.length,r=[...t];r[e]||(r[e]={}),r[e]={...t[e]},n(r),i(e)})()}},__("Upload track","jetpack")))))})}},32478:function(e,t,n){"use strict";n.d(t,{$:function(){return f}});var r=n(51806),o=n(52175),a=n(55609),i=n(69307),s=n(65736),c=n(61074),l=n(65235),u=n.n(l),p=n(81427);const __=s.__,d=["image"],m=e=>{const{videoPosterImageUrl:t}=e;return(0,r.createElement)("div",{className:"resumable-upload__editor-thumb-placeholder"},t?(0,r.createElement)(r.Fragment,null,(0,r.createElement)("img",{src:t,alt:"Poster"}),(0,r.createElement)(c.Z,{className:"uploading-editor__play-icon",icon:p.o1})):(0,r.createElement)("span",null,"No Poster Selected"))},h=e=>{const{onSelectPoster:t,onRemovePoster:n}=e;return(0,r.createElement)(a.BaseControl,{className:u()(e.className,"editor-video-poster-control")},(0,r.createElement)(m,e),(0,r.createElement)(o.MediaUpload,{title:__("Select Poster Image","jetpack"),onSelect:t,allowedTypes:d,render:e=>{let{open:t}=e;return(0,r.createElement)("div",{className:"poster-selector__buttons"},(0,r.createElement)(a.Button,{onClick:n,variant:"link",isDestructive:!0},__("Remove Poster Image","jetpack")),(0,r.createElement)(a.Button,{variant:"secondary",onClick:t},__("Select Poster Image","jetpack")))}}))},f=e=>{const{file:t,onSelectPoster:n,onRemovePoster:s,videoPosterImageData:l,title:u,onChangeTitle:m,onVideoFrameSelected:f}=e,[g,b]=(0,i.useState)(0),[v,k]=(0,i.useState)(!0),y=(0,i.useRef)(null),w=(0,i.useRef)(null),E=()=>{k(!1)};(0,i.useEffect)((()=>{null!==t&&y&&(y.current.src=URL.createObjectURL(t))}),[t,y]);const _={};return l&&(_.display="none"),(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"uploading-editor"},(0,r.createElement)("div",{className:"uploading-editor__summary"}),(0,r.createElement)("div",{className:"uploading-editor__fields"},(0,r.createElement)(a.TextControl,{label:__("Video title","jetpack"),className:"uploading-editor__title",onChange:m,value:u}),(0,r.createElement)("div",{className:"uploading-editor__content"},(0,r.createElement)(a.BaseControl,{label:__("Video poster (optional)","jetpack")},v?(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"uploading-editor__video-container"},(0,r.createElement)("div",{className:"uploading-editor__video-poster-wrapper"},l&&(0,r.createElement)(h,{onSelectPoster:n,onRemovePoster:s,videoPosterImageUrl:l.url}),(0,r.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:_})),!l&&(0,r.createElement)(c.Z,{className:"uploading-editor__play-icon",icon:p.o1})),(0,r.createElement)("span",{style:_},(0,r.createElement)(a.RangeControl,{className:"uploading-editor__range",min:"0",step:"0.1",max:g,showTooltip:!1,withInputField:!1,onChange:e=>{f(1e3*e),y.current&&(y.current.currentTime=e)}})),(0,r.createElement)("span",{className:"uploading-editor__scrubber-help",style:_},(0,i.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,r.createElement)(o.MediaUpload,{title:__("Select Poster Image","jetpack"),onSelect:n,allowedTypes:d,render:e=>{let{open:t}=e;return(0,r.createElement)("a",{className:"uploading-editor__upload-link",onClick:t,onKeyDown:t,ref:w,role:"button",tabIndex:0},__("select a custom one","jetpack"))}})}))):(0,r.createElement)(h,{onSelectPoster:n,videoPosterImageUrl:l?l.url:null}))))))}},90953:function(e,t,n){"use strict";n.d(t,{p:function(){return o}});var r=n(96483);const o=(e,t)=>{let{autoplay:n,controls:o,loop:a,muted:i,playsinline:s,poster:c,preload:l,seekbarColor:u,seekbarPlayedColor:p,seekbarLoadingColor:d,useAverageColor:m}=t;if(!e)return null;const h={resizeToParent:!0,cover:!0,...n&&{autoPlay:!0},...!o&&{controls:!1},...a&&{loop:!0},...i&&{muted:!0,persistVolume:!1},...s&&{playsinline:!0},...c&&{posterUrl:c},...""!==l&&{preloadContent:l},...""!==u&&{sbc:u},...""!==p&&{sbpc:p},...""!==d&&{sblc:d},...m&&{useAverageColor:!0}};return(0,r.addQueryArgs)(`https://videopress.com/v/${e}`,h)}},77290:function(e,t,n){"use strict";n.d(t,{K8:function(){return c},Kp:function(){return u},Zx:function(){return l},f6:function(){return s}});var r=n(65235),o=n.n(r),a=n(90879);const i=e=>{const t=a.s.reduce(((e,t)=>{let{className:n}=t;return e[n]=!1,e}),{"wp-has-aspect-ratio":!1});return o()(e,t)};function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!(!(arguments.length>2&&void 0!==arguments[2])||arguments[2]))return i(t);const n=document.implementation.createHTMLDocument("");n.body.innerHTML=e;const r=n.body.querySelector("iframe");if(r&&r.height&&r.width){const e=(r.width/r.height).toFixed(2);for(let n=0;n<a.s.length;n++){const r=a.s[n];if(e>=r.ratio)return o()(i(t),r.className,"wp-has-aspect-ratio")}}return t}const c=e=>e.replace(/\.[^/.]+$/,""),l=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:n,isVideoPressExample:r}=e;if(!t?.length)return!1;if(!Array.isArray(n))return!1;return!(!Object.keys(e).includes("isVideoPressExample")||"boolean"!=typeof r)}},65192:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(51806),o=n(13419),a=n(52175),i=n(4981),s=n(55609),c=n(9818),l=n(12238),u=n(65736),p=(n(99196),n(77290)),d=n(5743);const __=u.__,m={instances:[]},h=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(m.instances=[]),e.forEach((e=>{if(e.innerBlocks.length)return void h(e.innerBlocks,!1,t+1);const{clientId:n,name:r,attributes:o}=e;"core/video"===r&&(0,p.Kp)(o)&&m.instances.push({clientId:n,name:r,attributes:o})})),0===t)return m.instances};function f(e){let{clientId:t,attributes:n}=e;const u=(0,c.useSelect)((e=>e(l.store).getCurrentPostId())),{getBlocks:m}=(0,c.useSelect)(a.store),{replaceBlock:f}=(0,c.useDispatch)(a.store),{tracks:g}=(0,o.z$)();return(0,r.createElement)("div",{className:d.Z.wrapper},(0,r.createElement)(s.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,r.createElement)(s.Button,{variant:"primary",onClick:()=>{const e=h(m(),!0);e?.length&&(e.find((e=>e.clientId===t))||e.push({clientId:t,name:"core/video",currentBlockAttributes:n}),e.forEach((e=>{const{clientId:t,name:n,attributes:r}=e;"core/video"===n&&(0,p.Kp)(r)&&(f(t,(0,i.createBlock)("videopress/video",r)),g.recordEvent("jetpack_editor_videopress_block_manual_conversion_click",{post_id:u}))})))}},__("Transform blocks to VideoPress","jetpack")))}},68938:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(94333),i=n(77290),s=n(65192);const c=(0,a.createHigherOrderComponent)((e=>t=>(0,i.Kp)(t.attributes)?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(s.Z,{clientId:t.clientId,attributes:t.attributes})),(0,r.createElement)(e,t)):(0,r.createElement)(e,t)));t.Z=c},23062:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(13419),o=n(68938);const a="videopress/video";function i(e,t){if("core/video"!==t)return e;const{available:n}=(0,r.OZ)(a);return n?{...e,edit:(0,o.Z)(e.edit)}:e}},73859:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(51806),o=n(55609),a=n(65736),i=n(78680),s=n(75255);const __=a.__,c="videopress/video-chapters",l=!!window?.Jetpack_Editor_Initial_State?.available_blocks[c],u=31;function p(e){let{isRequestingVideoItem:t}=e;const{attributes:n,setAttributes:a}=(0,s.Z)(),{title:p,description:d}=n,m=(0,i.L)(c),h=d?.length?d.split("\n").map((e=>Math.ceil(e.length/u)||1)).reduce(((e,t)=>e+t),0):4,f=Math.min(12,Math.max(h,4));if(!l)return null;return(0,r.createElement)(o.PanelBody,{title:__("Details","jetpack"),className:m?"is-beta":""},(0,r.createElement)(o.TextControl,{label:__("Title","jetpack"),value:p,placeholder:__("Video title","jetpack"),onChange:e=>{a({title:e})},disabled:t}),(0,r.createElement)(o.TextareaControl,{label:__("Description","jetpack"),value:d,placeholder:__("Video description","jetpack"),onChange:e=>{a({description:e})},disabled:t,rows:f}))}},24288:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(94333),i=n(69307),s=n(73859),c=n(67203),l=n(49664),u=n(84676);const p=(0,a.createHigherOrderComponent)((e=>t=>{const{attributes:n,setAttributes:a}=t,[p,d]=(0,c.Z)(n?.id),[m]=(0,l.v)(n);return(0,i.useEffect)((()=>{if(!p)return;const e={};p?.title&&(e.title=p.title),p?.description&&(e.description=p.description),Object.keys(e).length&&(a(e),m(e))}),[p,a,m]),u.d&&"core/video"!==!t.name&&t.attributes?.guid?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(s.Z,{isRequestingVideoItem:d})),(0,r.createElement)(e,t)):(0,r.createElement)(e,t)}));t.Z=p},75255:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(52175),o=n(9818);function a(){const{clientId:e,attributes:t}=(0,o.useSelect)((e=>{const t=e(r.store).getSelectedBlockClientId();return{clientId:t,attributes:t?e("core/block-editor").getBlockAttributes(t):void 0}})),{updateBlockAttributes:n}=(0,o.useDispatch)(r.store);return{clientId:e,attributes:t,setAttributes:t=>n(e,t)}}},49664:function(e,t,n){"use strict";n.d(t,{v:function(){return f}});var r=n(86989),o=n.n(r),a=n(94333),i=n(37798),s=n(9818),c=n(12238),l=n(69307),u=n(65736),p=n(22081),d=n(90953),m=n(6268),h=n(38871);const __=u.__;function f(e){const{id:t,title:n,description:r,guid:u}=e,f=(0,s.useSelect)((e=>e(c.store).isSavingPost()),[]),g=(0,a.usePrevious)(f),b=(0,s.useDispatch)(i.store).invalidateResolution,[v,k]=(0,l.useState)(),y=(0,l.useCallback)((e=>{k((t=>({...t,...e})))}),[]);(0,l.useEffect)((()=>{k({title:n,description:r})}),[]);const w=function(e){return t=>new Promise(((n,r)=>{o()({path:"/wpcom/v2/videopress/meta",method:"POST",data:{id:e,...t}}).then((e=>{if(200!==e?.data)return r(e);n(e)})).catch(r)}))}(t);return(0,l.useEffect)((()=>{if(!f||g)return;if(!t)return;const o={};if(v?.title!==n&&(o.title=n),v?.description!==r&&(o.description=r),!Object.keys(o).length)return;if(w(o).then((()=>y({title:n,description:r}))),!o?.description?.length)return;const a=(0,m.ZP)(o.description);if(!a?.length)return;const i={label:__("English","jetpack"),srcLang:"en",kind:"chapters",tmpFile:(0,h.ZP)(o.description)};(0,p.n)(i,u).then((()=>{const t=(0,d.p)(u,e);b("getEmbedPreview",[t])}))}),[f,g,n,v?.title,v?.description,r,w,y,e,b,t,u]),[y]}},67203:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(86989),o=n.n(r),a=n(69307);function i(e){const[t,n]=(0,a.useState)({}),[r,i]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{e&&(i(!0),async function(){try{const t=await o()({path:`/wp/v2/media/${e}`});n(t?.jetpack_videopress||{}),i(!1)}catch(e){throw i(!1),new Error(e)}}())}),[e]),[t,r]}},84676:function(e,t,n){"use strict";n.d(t,{Z:function(){return a},d:function(){return o}});var r=n(24288);const o=!!window?.Jetpack_Editor_Initial_State?.available_blocks["videopress/video-chapters"];function a(e,t){if(!o)return e;if("core/video"!==t)return e;const n={...e.attributes,title:{type:"string"},description:{type:"string"}};return{...e,attributes:n,edit:(0,r.Z)(e.edit)}}},6268:function(e,t,n){"use strict";function r(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:n,time:r}}=t,o=e.indexOf(n),a=(o<(e.length-n.length)/2?e.substring(o+n.length,e.length):e.substring(0,o)).trim().replace(/(\s-$)|(^-\s)/,""),i=r.split(":");return 1===i[0].length&&(i[0]=`0${i[0]}`),2===i.length&&i.unshift("00"),{startAt:i.join(":"),title:a}}(e))).filter((e=>null!==e)).sort(((e,t)=>e.startAt.localeCompare(t.startAt)))}n.d(t,{Tn:function(){return r},ZP:function(){return r}})},38871:function(e,t,n){"use strict";n.d(t,{ZP:function(){return a}});var r=n(6268);function o(e){const t=Math.floor(e/36e5);let n=e-36e5*t;const r=Math.floor(n/6e4);n-=6e4*r;return[t,r,Math.floor(n/1e3)].map((e=>e<10?`0${e}`:e)).join(":")}function a(e,t){const n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:359999e3;const n=(0,r.Tn)(e);if(0===n.length)return null;let a="WEBVTT\n",i=1;for(const[e,r]of n.entries()){const s=0===e?"000":"001",c=e<n.length-1?n[e+1].startAt:o(t);a+=`\n${i++}\n${r.startAt}.${s} --\x3e ${c}.000\n${r.title}\n`}return a}(e,t);return n?new File([n],"chapters.vtt",{type:"text/vtt"}):null}},50354:function(e,t,n){"use strict";n.d(t,{U:function(){return i},m:function(){return s}});var r=n(51806),o=n(55609),a=n(65736);const __=a.__,i="mrec",s=[{height:250,icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.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:i,width:300,editorPadding:30},{height:90,icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.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,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.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,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M.04 0h24v24h-24V0z"}),(0,r.createElement)(o.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:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(55609),i=n(65736),s=n(1020);const __=i.__,c=e=>{let{value:t,onChange:n}=e;return(0,r.createElement)(a.PanelBody,{title:__("Visibility","jetpack")},(0,r.createElement)(a.ToggleControl,{className:"jetpack-wordads__mobile-visibility",checked:!!t,label:__("Hide on mobile","jetpack"),help:__("Hides this block for site visitors on mobile devices.","jetpack"),onChange:n}))};t.Z=e=>{let{attributes:{format:t,hideMobile:n},setAttributes:a}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(s.Z,{value:t,onChange:e=>a({format:e})})),(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(c,{value:n,onChange:e=>a({hideMobile:!!e})})))}},53193:function(e,t,n){"use strict";var r=n(51806),o=n(50354),a=n(56565),i=n(80405),s=n(72473),c=n(38511),l=n(52203);t.Z=e=>{let{attributes:t,setAttributes:n}=e;const{format:u}=t,p=o.m.find((e=>{let{tag:t}=e;return t===u}));return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.Z,{attributes:t,setAttributes:n}),(0,r.createElement)("div",{className:`wp-block-jetpack-wordads jetpack-wordads-${u}`},(0,r.createElement)("div",{className:"jetpack-wordads__ad",style:{width:p.width,height:p.height,backgroundImage:`url( ${(e=>{switch(e){case"leaderboard":return l;case"mobile_leaderboard":return c;case"wideskyscraper":return i;default:return s}})(u)} )`,backgroundSize:"cover"}})))}},3432:function(e,t,n){"use strict";var r=n(31985),o=n(57795);(0,r.Z)(o.u2,o.Xd)},1020:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(51806),o=n(55609),a=n(65736),i=n(50354);const s=(0,a.__)("Pick an ad format","jetpack");function c(e){let{value:t,onChange:n}=e;return(0,r.createElement)(o.Dropdown,{placement:"bottom-start",renderToggle:e=>{let{onToggle:t,isOpen:n}=e;return(0,r.createElement)(o.ToolbarGroup,{controls:[{icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.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:s,onClick:t,extraProps:{"aria-expanded":n},className:"wp-block-jetpack-wordads__format-picker-icon"}]})},renderContent:e=>{let{onClose:a}=e;return(0,r.createElement)(o.NavigableMenu,{className:"wp-block-jetpack-wordads__format-picker"},i.m.map((e=>{let{tag:i,name:s,icon:c}=e;return(0,r.createElement)(o.MenuItem,{className:i===t?"is-active":void 0,icon:c,isSelected:i===t,key:i,onClick:()=>{n(i),a()},role:"menuitemcheckbox"},s)})))}})}},57795:function(e,t,n){"use strict";n.d(t,{Xd:function(){return m},u2:function(){return u}});var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(70355),c=n(50354),l=n(53193);const __=i.__,_x=i._x,u="wordads",p=__("Ad","jetpack"),d=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{fill:"currentColor",d:"M12,8H4A2,2 0 0,0 2,10V14A2,2 0 0,0 4,16H5V20A1,1 0 0,0 6,21H8A1,1 0 0,0 9,20V16H12L17,20V4L12,8M15,15.6L13,14H4V10H13L15,8.4V15.6M21.5,12C21.5,13.71 20.54,15.26 19,16V8C20.53,8.75 21.5,10.3 21.5,12Z"})),m={title:p,description:(0,r.createElement)(a.Fragment,null,(0,r.createElement)("p",null,__("Earn income by adding high quality ads to your post","jetpack")),(0,r.createElement)(o.ExternalLink,{href:"https://wordads.co/"},__("Learn all about WordAds","jetpack"))),icon:{src:d,foreground:(0,s.m)()},attributes:{align:{type:"string",default:"center"},format:{type:"string",default:c.U},hideMobile:{type:"boolean",default:!1}},example:{attributes:{}},category:"earn",keywords:[_x("ads","block search term","jetpack"),"WordAds",_x("advertisement","block search term","jetpack")],supports:{align:["left","center","right"],alignWide:!1,className:!1,customClassName:!1,html:!1,reusable:!1},edit:l.Z,save:()=>null}},78680:function(e,t,n){"use strict";n.d(t,{L:function(){return p}});var r=n(82674),o=n.n(r),a=n(51806),i=n(86989),s=n.n(i),c=n(94333),l=n(92694),u=(n(80425),n(85921),n(63066),n(92713),n(54414),n(36215),n(31657),n(23984),n(14688),n(7652),n(1949));function p(e){if(!u)return!1;const t=u.beta||[],n=e.replace(/jetpack\//,"");return t.includes(e)||t.includes(n)}s().use(((e,t)=>{if("cors"===e.mode)return t(e);if(e.url)try{const n=new URL(e.url,location.href);if(n.protocol!==location.protocol||n.hostname!==location.hostname||n.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,l.addFilter)("blocks.registerBlockType","jetpack/label-beta-blocks-title",(function(e,t){if(!p(t))return e;const{title:n,keywords:r}=e,o="(beta)",a="beta",i={...e};return n&&(i.title=n.toLowerCase().endsWith(o)?n:`${e.title} ${o}`),Array.isArray(r)&&(i.keywords=r.includes(a)?r:[...r,a]),i}));const d=(0,c.createHigherOrderComponent)((e=>t=>{if(t?.clientRootId)return(0,a.createElement)(e,t);const{name:n}=t;return p(n)?(0,a.createElement)(e,o()({},t,{className:"is-beta-extension"})):(0,a.createElement)(e,t)}),"withBetaClassName");(0,l.addFilter)("editor.BlockListBlock","jetpack/label-beta-extensions",d)},6460:function(e,t,n){"use strict";var r=n(4981),o=n(65736),a=n(81427);const __=o.__,i={name:"descript",title:"Descript",icon:a.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,r.registerBlockVariation)("core/embed",i)},5166:function(e,t,n){"use strict";var r=n(92694),o=n(65736),a=n(70355),i=n(81427);const __=o.__,_x=o._x,s={name:"facebook",title:"Facebook",icon:{src:i.Vq,foreground:(0,a.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,r.addFilter)("blocks.registerBlockType","reactivateFacebookEmbedBlockVariation",(function(e,t){if("core/embed"!==t||!e.variations)return e;const n=e.variations.filter((e=>e.name!==s.name));return e.variations=[...n,s],e}))},36215:function(e,t,n){"use strict";n(5166),n(20970),n(25467),n(91128),n(6460)},20970:function(e,t,n){"use strict";var r=n(92694),o=n(65736),a=n(70355),i=n(81427),s=n(12923);const __=o.__,_x=o._x,c={name:"instagram",title:"Instagram",icon:{src:i.yu,foreground:(0,a.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,r.addFilter)("blocks.registerBlockType","reactivateInstagramEmbedBlockVariation",(function(e,t){if("core/embed"!==t||!e.variations||!(0,s.Z)())return e;const n=e.variations.filter((e=>e.name!==c.name));return e.variations=[...n,c],e}))},25467:function(e,t,n){"use strict";var r=n(4981),o=n(65736),a=n(81427);const __=o.__,i={name:"loom",title:"Loom",icon:a.zf,keywords:[__("video","jetpack")],description:__("Embed a Loom video.","jetpack"),patterns:[/^https?:\/\/(www\.)?loom\.com\/share\/.+/i],attributes:{providerNameSlug:"loom",responsive:!0}};(0,r.registerBlockVariation)("core/embed",i)},91128:function(e,t,n){"use strict";var r=n(4981),o=n(65736),a=n(81427);const __=o.__,i={name:"smartframe",title:"SmartFrame",icon:a.Ae,keywords:[__("smartframe","jetpack")],description:__("Embed a SmartFrame Image.","jetpack"),patterns:[/^https?:\/\/(.*?).smartframe.(io|net)\/.*/i],attributes:{providerNameSlug:"smartframe",responsive:!0}};(0,r.registerBlockVariation)("core/embed",i)},31657:function(e,t,n){"use strict";var r=n(4981),o=n(92694),a=n(6512);const i={from:[{type:"block",isMultiBlock:!1,blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:n}=e;return!!n?.raw&&"jetpack_widget_social_icons"===t},transform:e=>{let{instance:t}=e,n=[];return t.raw.icons.forEach((e=>{const t=new URL(e.url.includes(":")?e.url:"https://"+e.url),o=t.hostname?t.hostname:t.protocol,i=a.Z.find((e=>o.includes(e.url)||e.url.includes(o))),s=(0,r.createBlock)("core/social-link",{service:i?i.name:"chain",url:e.url});n=[...n,s]})),(0,r.createBlock)("core/social-links",{},n)}}]};(0,o.addFilter)("blocks.registerBlockType","addTransformToSocialLinksWidget",(function(e,t){return"core/social-links"!==t||(e.transforms=i),e}))},6512:function(e,t){"use strict";t.Z=[{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:function(e,t,n){"use strict";n.d(t,{L:function(){return i},x:function(){return a}});var r=n(51806),o=n(69307);const a=(0,o.createContext)(),i=e=>{let{onBannerVisibilityChange:t,hasParentBanner:n,children:o}=e;return(0,r.createElement)(a.Provider,{value:{onBannerVisibilityChange:t,hasParentBanner:n},children:o})}},23984:function(e,t,n){"use strict";var r=n(13419),o=n(47701),a=n.n(o),i=n(92694),s=n(65736),c=n(92819),l=n(30371),u=n(7832),p=n(42770),d=n(27003);const __=s.__,m=[];(0,i.addFilter)("blocks.registerBlockType","jetpack/paid-block",((e,t)=>((0,r.X1)(t)&&(m.includes(t)||m.push(t),e.keywords=(0,c.uniq)([...e.keywords,"premium",__("premium","jetpack")]),(0,r.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,i.addFilter)("editor.BlockEdit","jetpack/paid-block-with-warning",d.Z),(0,i.addFilter)("editor.MediaPlaceholder","jetpack/paid-block-media-placeholder",l.Z),(0,i.addFilter)("editor.MediaReplaceFlow","jetpack/paid-block-media-placeholder",u.Z),a()((function(){(0,r.FK)()&&document.body.classList.add("jetpack-enable-upgrade-nudge")}))},30371:function(e,t,n){"use strict";var r=n(82674),o=n.n(r),a=n(51806),i=n(13419),s=n(52175),c=n(94333),l=n(69307),u=n(11317),p=n(87950);t.Z=(0,c.createHigherOrderComponent)((e=>t=>{const{name:n}=(0,s.useBlockEditContext)(),r=(0,i.m3)(n);if(!r?.mediaPlaceholder||!(0,i.X1)(n))return(0,a.createElement)(e,t);const{fileType:c}=r,{onError:d}=t,{onBannerVisibilityChange:m}=(0,l.useContext)(p.x),h=(0,l.useCallback)((e=>m(e?.length&&(0,u.Qu)(e[0],c))),[c,m]),f=(0,l.useCallback)((e=>{const t=e?.[0]?.props?.children;return(0,u.Qu)(t,c)?h([t]):d(e)}),[h,c,d]);return(0,a.createElement)("div",{className:"paid-block-media-placeholder"},(0,a.createElement)(e,o()({},t,{onFilesPreUpload:h,onError:f})))}),"withMediaPlaceholderUpgradable")},7832:function(e,t,n){"use strict";var r=n(82674),o=n.n(r),a=n(51806),i=n(13419),s=n(52175),c=n(94333),l=n(69307),u=n(11317),p=n(87950);t.Z=(0,c.createHigherOrderComponent)((e=>t=>{const{name:n}=(0,s.useBlockEditContext)(),r=(0,i.m3)(n),c=(0,l.useRef)();if(!r?.mediaReplaceFlow||!(0,i.X1)(n))return(0,a.createElement)(e,t);const{fileType:d}=r,{onBannerVisibilityChange:m}=(0,l.useContext)(p.x);return(0,a.createElement)(e,o()({},t,{onFilesUpload:e=>{c.current=e?.length?e[0]:null,m(e?.length&&(0,u.Qu)(e[0],d))},createNotice:(e,n,r)=>{if((0,u.Qu)(c.current,d))return c.current=null,null;t.createNotice(e,n,r)}}))}),"withMediaReplaceFlowUpgradable")},95796:function(e,t,n){"use strict";var r=n(51806),o=n(55609);t.Z=e=>{let{cx:t=23,cy:n=3,r:a=4,fill:i="#e34c84",stroke:s="#ffffff",strokeWidth:c="2"}=e;return(0,r.createElement)(o.Circle,{className:"jetpack-paid-block-symbol",cx:t,cy:n,r:a,fill:i,stroke:s,strokeWidth:c})}},42770:function(e,t,n){"use strict";var r=n(51806),o=(n(13419),n(69307)),a=n(95796);const i=e=>(e?.src?e={...e,src:(0,o.cloneElement)(e.src,{children:[e.src.props.children,(0,r.createElement)(a.Z,{key:"paid-symbol"})]})}:e?.props?.children&&(e=(0,o.cloneElement)(e,{children:[e.props.children,(0,r.createElement)(a.Z,{key:"paid-symbol"})]})),e);t.Z=i},66316:function(e,t,n){"use strict";var r=n(51806),o=n(9818),a=n(65736),i=n(26546),s=n(78798);const __=a.__,_x=a._x,c=__("Premium Block","jetpack"),/** translators: %s: name of the plan. */ l=__("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"));t.ZP=e=>{let{onRedirect:t,align:n,className:p,title:d=c,description:m=null,buttonText:h=u,visible:f=!0,requiredPlan:g,context:b}=e;const[v,k,y]=(0,s.Z)(g,t),w=(0,o.useSelect)((e=>{if(m)return m;const t=e("wordpress-com/plans"),n=t&&t.getPlan(g);return n?(0,a.sprintf)(l,n.product_name_short):null}),[m]);return w&&(0,r.createElement)(i.p,{align:n,buttonText:h,checkoutUrl:v,className:p,context:b,description:w,goToCheckoutPage:k,isRedirecting:y,title:d,visible:f})}},38140:function(e,t,n){"use strict";n.d(t,{W:function(){return o},v:function(){return r}});const r=e=>{let{plan:t,blockName:n,context:r,tracks:o}=e;o.recordEvent("jetpack_editor_block_upgrade_click",{plan:t,block:n,context:r})},o=e=>{let{plan:t,blockName:n,context:r,tracks:o}=e;o.recordEvent("jetpack_editor_block_upgrade_banner_impression",{plan:t,block:n,context:r})}},27003:function(e,t,n){"use strict";var r=n(51806),o=n(13419),a=n(52175),i=n(94333),s=n(9818),c=n(69307),l=n(87950),u=n(66316),p=n(38140);t.Z=(0,i.createHigherOrderComponent)((e=>t=>{const{name:n,clientId:i,isSelected:d,attributes:m,setAttributes:h}=t||{},{hasParentBanner:f}=(0,c.useContext)(l.x)||{},{tracks:g}=(0,o.z$)(),b=(0,o.Rl)(n);if(!b)return(0,r.createElement)(e,t);const v=(0,o.HD)(n),k=(0,o.m3)(n),[y,w]=(0,c.useState)(!v),[E,_]=(0,c.useState)(!1),C="editor-canvas",S=(0,s.useSelect)((e=>e("core/block-editor").hasSelectedInnerBlock(i,!0)),[]),j=(d||S)&&y&&!f,x=(0,c.useMemo)((()=>({plan:b,blockName:n,context:C,tracks:g})),[b,n,g]);(0,c.useEffect)((()=>{j&&_(!0)}),[j,_]),(0,c.useEffect)((()=>{!E&&j&&(0,p.W)(x)}),[E,x,j]),(0,c.useEffect)((()=>w(!v)),[m,w,v]),(0,c.useEffect)((()=>{h({shouldDisplayFrontendBanner:!f})}),[h,f]);const L=(0,a.useBlockProps)();return(0,r.createElement)(l.L,{onBannerVisibilityChange:w,hasParentBanner:j},(0,r.createElement)("div",{ref:L.ref},(0,r.createElement)(u.ZP,{className:`is-${n.replace(/\//,"-")}-paid-block`,title:null,align:m?.align,visible:j,description:k?.description,requiredPlan:b,context:C,onRedirect:()=>(0,p.v)(x)}),(0,r.createElement)(e,t)))}),"withUpgradeBanner")},85921:function(e,t,n){"use strict";var r=n(51806),o=n(13419),a=n(4981),i=n(65736),s=n(81427);const __=i.__;(0,o.Wp)()||(0,o.Ug)()||(0,a.registerBlockCollection)("jetpack",{title:"Jetpack",icon:(0,r.createElement)(s.IM,null)}),(0,a.setCategories)([...(0,a.getCategories)().filter((e=>{let{slug:t}=e;return"contact-form"!==t})),{slug:"contact-form",title:__("Forms","jetpack"),icon:(0,r.createElement)(s.IM,null)}]),(0,a.setCategories)([...(0,a.getCategories)().filter((e=>{let{slug:t}=e;return"earn"!==t})),{slug:"earn",title:__("Earn","jetpack"),icon:(0,r.createElement)(s.IM,null)}]),(0,a.setCategories)([...(0,a.getCategories)().filter((e=>{let{slug:t}=e;return"grow"!==t})),{slug:"grow",title:__("Grow","jetpack"),icon:(0,r.createElement)(s.IM,null)}])},85007:function(e,t,n){"use strict";function r(e){const t=e.ownerDocument;return{currentDoc:t,currentWindow:t.defaultView||t.parentWindow}}function o(e,t,n){const o=`${window.Jetpack_Block_Assets_Base_Url.url}editor-assets`,{currentDoc:a}=r(n),i=a.getElementsByTagName("head")[0];e.forEach((e=>{const[n,r]=e.file.split("/").pop().split(".");if("css"===r){if(a.getElementById(e.id))return;const t=a.createElement("link");t.id=e.id,t.rel="stylesheet",t.href=`${o}/${n}-${e.version}.${r}`,i.appendChild(t)}if("js"===r){const s=t[e.id]?t[e.id]:null;if(a.getElementById(e.id))return s();const c=a.createElement("script");c.id=e.id,c.type="text/javascript",c.src=`${o}/${n}-${e.version}.${r}`,c.onload=s,i.appendChild(c)}}))}function a(e,t){return new Promise((n=>{const r=()=>{e[t]?n(e[t]):e.requestAnimationFrame(r)};r()}))}n.d(t,{Dz:function(){return a},Pp:function(){return o},bL:function(){return r}})},70355:function(e,t,n){"use strict";n.d(t,{m:function(){return i}});var r=n(80550),o=n(13419);const a=r.O["Jetpack Green 40"];function i(){return(0,o.Ug)()||(0,o.Wp)()?null:a}},81518:function(e,t,n){"use strict";n.d(t,{t:function(){return i}});var r=n(29512),o=n.n(r),a=n(92819);function i(e,t){const n=function(e,t){for(const n of new(o())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),r=(0,a.find)(e,{name:t});if(r)return r}return(0,a.find)(e,"isDefault")}(e,t);return n?n.name:null}},24381:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});const r=/^#?[A-Fa-f0-9]{6}$/;function o(e){return r.test(e)}},44738:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(51806),o=n(52175),a=n(55609),i=n(65736),s=n(65235),c=n.n(s),l=n(46867);const __=i.__;function u(e){let{blockName:t,buttonLabel:n,className:i,href:s,icon:u,onClick:p,readMoreUrl:d,subtitle:m,title:h}=e;const{autosaveAndRedirect:f}=(0,l.Z)(s);return(0,r.createElement)(o.Warning,{actions:s&&[(0,r.createElement)(a.Button,{href:s,onClick:e=>{e.preventDefault(),p(t),f(e)},target:"_top",variant:"secondary",className:"jetpack-stripe-nudge__link"},n)],className:c()(i,"jetpack-block-nudge wp-block")},(0,r.createElement)("span",{className:"jetpack-block-nudge__info"},u,(0,r.createElement)("span",{className:"jetpack-block-nudge__text-container"},(0,r.createElement)("span",{className:"jetpack-block-nudge__title"},h),m&&(0,r.createElement)("span",{className:"jetpack-block-nudge__message"},m,d&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("br",null),(0,r.createElement)(a.ExternalLink,{href:d},__("Learn more about the block and fees","jetpack")))))))}},57538:function(e,t,n){"use strict";n.d(t,{Z:function(){return g}});var r=n(51806),o=n(52175),a=n(4981),i=n(55609),s=n(9818),c=n(69307),l=n(65736),u=n(39630),p=n(65235),d=n.n(p),m=n(92819);const __=l.__,h=e=>{let{attributes:t,styleOption:n,viewportWidth:i,blockName:s}=e;const c=(0,a.getBlockType)(s);return(0,r.createElement)(o.BlockPreview,{viewportWidth:i,blocks:(l=c.example?(0,a.getBlockFromExample)(s,{attributes:{...c.example.attributes,style:n.value},innerBlocks:c.example.innerBlocks}):(0,a.createBlock)(s,t),{...l,attributes:{...l.attributes,__isBlockPreview:!0}})});var l},f=c.memo?(0,c.memo)(h,((e,t)=>(0,m.isEqual)(e,t))):h;function g(e){let t,{attributes:n,clientId:a,styleOptions:c,onSelectStyle:l,activeStyle:p,viewportWidth:m,title:h}=e;return s.useSelect&&(t=(0,s.useSelect)((e=>{const{getBlock:t}=e("core/block-editor");return t(a)}))),(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(i.ToolbarGroup,{isCollapsed:!0,icon:"admin-appearance",label:__("Style","jetpack"),controls:c.map((e=>({title:e.label,isActive:e.value===p,onClick:()=>l({style:e.value})}))),popoverProps:{className:"jetpack-block-styles-selector-toolbar"}})),(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(i.PanelBody,{title:h||__("Styles","jetpack")},(0,r.createElement)("div",{className:"block-editor-block-styles jetpack-block-styles-selector"},c.map((e=>{const o={...n,style:e.value};return(0,r.createElement)("div",{key:e.value,className:d()("block-editor-block-styles__item",{"is-active":e.value===p}),onClick:()=>{l({style:e.value})},onKeyDown:t=>{u.ENTER!==t.keyCode&&u.SPACE!==t.keyCode||(t.preventDefault(),l({style:e.value}))},role:"button",tabIndex:"0","aria-label":e.label},(0,r.createElement)("div",{className:"block-editor-block-styles__item-preview"},e.preview?e.preview:s.useSelect&&t&&(0,r.createElement)(f,{blockName:t.name,styleOption:e,attributes:o,viewportWidth:m})),(0,r.createElement)("div",{className:"block-editor-block-styles__item-label"},e.label))}))))))}},20769:function(e,t,n){"use strict";var r=n(82674),o=n.n(r),a=n(51806),i=n(55609);const s=i.NumberControl||i.__experimentalNumberControl||function(e){return(0,a.createElement)(i.TextControl,o()({type:"number",inputMode:"numeric"},e))};t.Z=s},14436:function(e,t,n){"use strict";n.d(t,{Bn:function(){return r},DM:function(){return o}});const r="payment-plan",o="subscription"},51585:function(e,t,n){"use strict";n.d(t,{l:function(){return i}});var r=n(65736),o=n(14436);const __=r.__,a={"add a new product":{[o.Bn]:__("Add a new payment plan","jetpack"),[o.DM]:__("Add a new subscription","jetpack")},"product not found":{[o.Bn]:__("Payment plan not found","jetpack"),[o.DM]:__("Subscription not found","jetpack")},"select a product":{[o.Bn]:__("Select a payment plan","jetpack"),[o.DM]:__("Select a subscription","jetpack")},"default new product title":{[o.Bn]:__("Monthly Subscription","jetpack"),[o.DM]:__("Monthly Subscription","jetpack")},"manage your products":{[o.Bn]:__("Manage your payment plans.","jetpack"),[o.DM]:__("Manage your subscriptions.","jetpack")},"saving product":{[o.Bn]:__("Saving payment plan…","jetpack"),[o.DM]:__("Saving subscription…","jetpack")},"add product":{[o.Bn]:__("Add payment plan","jetpack"),[o.DM]:__("Add subscription","jetpack")},"product requires a name":{[o.Bn]:__("Payment plan requires a name","jetpack"),[o.DM]:__("Subscription requires a name","jetpack")},"product requires a valid price":{[o.Bn]:__("Payment plan requires a valid price","jetpack"),[o.DM]:__("Subscription requires a valid price","jetpack")},"successfully created product":{[o.Bn]:__("Successfully created payment plan","jetpack"),[o.DM]:__("Successfully created subscription","jetpack")},"there was an error when adding the product":{[o.Bn]:__("There was an error when adding the payment plan.","jetpack"),[o.DM]:__("There was an error when adding the subscription.","jetpack")},"invalid product configured for this block":{[o.Bn]:__("Invalid payment plan configured for this block.","jetpack"),[o.DM]:__("Invalid subscription configured for this block.","jetpack")},"the button will be hidden from your visitors until you select a valid product":{[o.Bn]:__("The button will be hidden from your visitors until you select a valid payment plan.","jetpack"),[o.DM]:__("The subscribe button will be hidden from your visitors until you select a valid subscription.","jetpack")},"mark this product as a donation":{[o.Bn]:__("Mark this payment plan as a donation","jetpack"),[o.DM]:__("Mark this subscription as a donation","jetpack")}};function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.Bn;return a?.[e]?.[t]||null}__("Monthly Subscription","jetpack"),__("Yearly Subscription","jetpack"),__("Subscription","jetpack")},16367:function(e,t,n){"use strict";n.d(t,{U:function(){return p}});var r=n(51806),o=n(6895),a=n(13419),i=n(9818),s=n(65736),c=n(89933),l=n(7652),u=n(44738);const __=s.__,p=e=>{let{blockName:t}=e;const n=(0,i.select)(l.h).getConnectUrl(),{tracks:s}=(0,a.z$)(),p=(0,a.Ug)()||(0,a.Wp)();if(!n)return null;let d;switch(t){case"payment-buttons":d=p?(0,o.Z)("wpcom-support-wordpress-editor-blocks-payments-block"):(0,o.Z)("jetpack-support-jetpack-blocks-payments-block");break;case"donations":d=p?(0,o.Z)("wpcom-support-wordpress-editor-blocks-donations-block"):(0,o.Z)("jetpack-support-jetpack-blocks-donations-block");break;case"premium-content":d=p?(0,o.Z)("wpcom-support-wordpress-editor-blocks-premium-content-block"):(0,o.Z)("jetpack-support-jetpack-blocks-premium-content-block");break;default:d=p?(0,o.Z)("wpcom-support-payments-button-block"):(0,o.Z)("jetpack-support-jetpack-blocks-payments-block")}return(0,r.createElement)(u.Z,{className:"jetpack-stripe-nudge__banner",buttonLabel:__("Connect","jetpack"),icon:(0,r.createElement)(c.Z,{className:"jetpack-stripe-nudge__icon",size:18,"aria-hidden":"true",role:"img",focusable:"false"}),href:n,readMoreUrl:d,onClick:()=>s.recordEvent("jetpack_editor_block_stripe_connect_click",{block:t}),title:__("Connect to Stripe to use this block on your site","jetpack"),subtitle:__("This block will be hidden from your visitors until you connect to Stripe.","jetpack")})}},26546:function(e,t,n){"use strict";n.d(t,{p:function(){return c}});var r=n(51806),o=n(55609),a=n(65736),i=n(65235),s=n.n(i);const __=a.__,c=e=>{let{align:t,className:n,title:a,description:i,buttonText:c=null,visible:l=!0,context:u,checkoutUrl:p=null,goToCheckoutPage:d=null,isRedirecting:m=!1,showButton:h=!0}=e;const f=s()(n,"jetpack-upgrade-plan-banner",{"wp-block":"editor-canvas"===u,"block-editor-block-list__block":"editor-canvas"===u,"jetpack-upgrade-plan__hidden":!l}),g=__("Redirecting…","jetpack");return(0,r.createElement)("div",{className:f,"data-align":t},(0,r.createElement)("div",{className:"jetpack-upgrade-plan-banner__wrapper"},a&&(0,r.createElement)("strong",{className:s()("banner-title",{[`${n}__title`]:n})},a),i&&(0,r.createElement)("span",{className:`${n}__description banner-description`},i),h&&(0,r.createElement)(o.Button,{href:m?null:p,onClick:d,target:"_top",className:s()("is-primary",{"jetpack-upgrade-plan__hidden":!p}),isBusy:m},m?g:c)))}},87553:function(e,t,n){"use strict";var r=n(9818);const o={setPlans:e=>({type:"SET_PLANS",plans:e}),fetchFromAPI:e=>({type:"FETCH_FROM_API",url:e})};(0,r.registerStore)("wordpress-com/plans",{reducer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return"SET_PLANS"===t.type?t.plans:e},actions:o,selectors:{getPlan:(e,t)=>e.find((e=>e.product_slug===t))},controls:{FETCH_FROM_API(e){let{url:t}=e;return fetch(t).then((e=>e.json()))}},resolvers:{*getPlan(){const e=yield o.fetchFromAPI("https://public-api.wordpress.com/rest/v1.5/plans");return o.setPlans(e)}}})},79162:function(e,t,n){"use strict";n.d(t,{Vm:function(){return c},ck:function(){return o},hj:function(){return a},li:function(){return i},vs:function(){return s}});var r=n(43317);const o={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(o).map((e=>{const{symbol:t}=(0,r.X)(e);var n;return{value:e,label:t===e?e:`${e} ${n=t,String(n||"").replace(/\.+$/,"")}`}}));function a(e){return o[e]}function i(e){const t=a(e);return[10*t,30*t,200*t]}function s(e,t){return!isNaN(t)&&t>=a(e)}function c(e,t){if(!e)return null;if("number"==typeof e)return e;let n=e;return r.M[t].grouping&&(n=e.replace(new RegExp("\\"+r.M[t].grouping,"g"),"")),e=parseFloat(n.replace(new RegExp("\\"+r.M[t].decimal,"g"),".")),isNaN(e)?null:e}},94545:function(e,t,n){"use strict";var r=n(51806),o=n(55609);t.Z=e=>{let{label:t,onClick:n}=e;return(0,r.createElement)(o.Button,{className:"components-toolbar__control",label:t,icon:"edit",onClick:n})}},73905:function(e,t){"use strict";const n=new Map,r=e=>n.has(e);t.Z={acquire:e=>{if(r(e))return null;const t=Math.random();return n.set(e,t),[e,t]},blockExecution:async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;for(;r(e);)await new Promise((e=>setTimeout(e,t)))},clearAll:()=>n.clear(),isLocked:r,release:e=>{const[t,o]=e;return!(!r(t)||n.get(t)!==o)&&(n.delete(t),!0)}}},20982:function(e,t,n){"use strict";n.d(t,{Bb:function(){return b},CY:function(){return h},Eh:function(){return s},En:function(){return v},OG:function(){return p},QU:function(){return y},Qh:function(){return g},Tu:function(){return u},Wm:function(){return f},h9:function(){return m},iT:function(){return i},l5:function(){return E},oI:function(){return l},tY:function(){return d},wk:function(){return c},yD:function(){return k},zs:function(){return w}});var r=n(69771),o=n(65736),a=n(92819);const __=o.__,i="google_photos",s="openverse",c="pexels",l="recent",u="/",p=[{value:l,label:__("Photos","jetpack")},{value:u,label:__("Albums","jetpack")}],d=[{value:"", /* translators: category of images */ label:__("All categories","jetpack")},{value:"animals", /* translators: category of images */ label:__("Animals","jetpack")},{value:"arts", /* translators: category of images */ label:__("Arts","jetpack")},{value:"birthdays", /* translators: category of images */ label:__("Birthdays","jetpack")},{value:"cityscapes", /* translators: category of images */ label:__("Cityscapes","jetpack")},{value:"crafts", /* translators: category of images */ label:__("Crafts","jetpack")},{value:"fashion", /* translators: category of images */ label:__("Fashion","jetpack")},{value:"food", /* translators: category of images */ label:__("Food","jetpack")},{value:"flowers", /* translators: category of images */ label:__("Flowers","jetpack")},{value:"gardens", /* translators: category of images */ label:__("Gardens","jetpack")},{value:"holidays", /* translators: category of images */ label:__("Holidays","jetpack")},{value:"houses", /* translators: category of images */ label:__("Houses","jetpack")},{value:"landmarks", /* translators: category of images */ label:__("Landmarks","jetpack")},{value:"landscapes", /* translators: category of images */ label:__("Landscapes","jetpack")},{value:"night", /* translators: category of images */ label:__("Night","jetpack")},{value:"people", /* translators: category of images */ label:__("People","jetpack")},{value:"pets", /* translators: category of images */ label:__("Pets","jetpack")},{value:"selfies", /* translators: category of images */ label:__("Selfies","jetpack")},{value:"sport", /* translators: category of images */ label:__("Sport","jetpack")},{value:"travel", /* translators: category of images */ label:__("Travel","jetpack")},{value:"weddings", /* translators: category of images */ label:__("Weddings","jetpack")}],m=["mountain","ocean","river","clouds","pattern","abstract","sky"],h="ANY",f="LAST_7_DAYS",g="LAST_30_DAYS",b="LAST_6_MONTHS",v="LAST_12_MONTHS",k="CUSTOM",y=[{value:h,label:__("Any time","jetpack")},{value:f,label:__("Last 7 days","jetpack")},{value:g,label:__("Last 30 days","jetpack")},{value:b,label:__("Last 6 months","jetpack")},{value:v,label:__("Last 12 months","jetpack")},{value:k,label:__("Specific Month/Year","jetpack")}],w=(new Date).getFullYear(),E=[{label:__("Any Month","jetpack"),value:-1},...(0,a.map)((0,a.range)(0,12),(e=>({label:(0,r.dateI18n)("F",new Date(0,e)),value:e})))]},54414:function(e,t,n){"use strict";var r=n(82674),o=n.n(r),a=n(51806),i=n(13419),s=n(52175),c=n(92694),l=n(10892),u=n(1285),p=n(38457);if((0,i.Dp)()&&"function"==typeof s.useBlockEditContext){(0,u.HO)(),(0,u.on)();const e=e=>e.unstableFeaturedImageFlow||e.modalClass&&e.modalClass.indexOf("featured-image")>-1,t=(e,t)=>["core/cover","core/image","core/gallery","core/media-text","jetpack/image-compare","jetpack/slideshow","jetpack/story","jetpack/tiled-gallery","videopress/video"].indexOf(e)>-1&&-1===t.toString().indexOf("coblocks");(0,c.addFilter)("editor.MediaUpload","external-media/replace-media-upload",(n=>r=>{const{name:i}=(0,s.useBlockEditContext)();let{render:c}=r;if(t(i,c)||e(r)){const{allowedTypes:e,gallery:t=!1,value:n=[]}=r;e.indexOf("image")>-1&&!(t&&n.length>0)&&(c=e=>(0,a.createElement)(l.Z,o()({},e,{mediaProps:r})))}return(0,a.createElement)(n,o()({},r,{render:c}))}),100),(0,c.addFilter)("blocks.registerBlockType","external-media/individual-blocks",(function(e,t){return"core/image"!==t?e:{...e,keywords:[...e.keywords,...p.Dv.map((e=>e.keyword))]}}))}},11583:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(39630),c=n(65235),l=n.n(c),u=n(92819),p=n(46406),d=n(9827);const __=i.__,m=(0,a.memo)((()=>(0,r.createElement)("div",{className:"jetpack-external-media-browser__empty"},(0,r.createElement)("p",null,__("Sorry, but nothing matched your search criteria.","jetpack")))));t.Z=function(e){const{media:t,isCopying:n,isLoading:i,pageHandle:c,className:h,multiple:f,setPath:g,nextPage:b,onCopy:v}=e,[k,y]=(0,a.useState)([]),[w,E]=(0,a.useState)(-1),_=(0,a.useRef)(-1),C=(0,a.useRef)(null),S=(0,a.useCallback)((e=>{let t=[e];"folder"===e.type?g(e.ID):f?(t=k.slice(0,9).concat(e),k.find((t=>e.ID===t.ID))&&(t=k.filter((t=>t.ID!==e.ID)))):1===k.length&&e.ID===k[0].ID&&(t=[]),y(t)}),[k,f,g]),j=(0,a.useCallback)((()=>{v(k)}),[k,v]),x=t.filter((e=>"folder"!==e.type)).length>0,L=l()({"jetpack-external-media-browser__media":!0,"jetpack-external-media-browser__media__loading":i}),P=l()({"jetpack-external-media-browser":!0,[h]:!0}),A=()=>{let e=1;const t=C.current.children;if(t.length>0){const n=t[0].offsetTop;for(;e<t.length&&t[e].offsetTop===n;)++e}_.current=e},T=(0,u.debounce)(A,400);(0,a.useEffect)((()=>(window.addEventListener("resize",T),()=>{window.removeEventListener("resize",T)})),[]),(0,a.useEffect)((()=>{t.length&&-1===_.current&&A()}),[t]);const N=(e,t)=>{let{item:n}=t;S(n)},M=(e,n)=>{let{item:r,index:o}=n;[s.LEFT,s.RIGHT,s.UP,s.DOWN].includes(e.keyCode)?((e,n)=>{switch(e){case s.LEFT:n>=1&&E(n-1);break;case s.RIGHT:n<t.length&&E(n+1);break;case s.UP:n>=_.current&&E(n-_.current);break;case s.DOWN:n<t.length-_.current&&E(n+_.current)}})(e.keyCode,o):s.SPACE===e.keyCode?(S(r),e.preventDefault()):s.ENTER===e.keyCode&&S(r),[s.LEFT,s.RIGHT,s.UP,s.DOWN,s.SPACE,s.ENTER].includes(e.keyCode)&&e.stopPropagation()};return(0,r.createElement)("div",{className:P},(0,r.createElement)("ul",{ref:C,className:L},t.map(((e,t)=>(0,r.createElement)(p.Z,{item:e,index:t,key:e.ID,onClick:N,onKeyDown:M,focus:t===w,isSelected:k.find((t=>t.ID===e.ID)),isCopying:n}))),0===t.length&&!i&&(0,r.createElement)(m,null),i&&(0,r.createElement)(d.Z,null),c&&!i&&(0,r.createElement)(o.Button,{variant:"secondary",className:"jetpack-external-media-browser__loadmore",disabled:i||n,onClick:()=>{t.length&&E(t.length),b()}},__("Load More","jetpack"))),x&&(0,r.createElement)((()=>{const e=0===k.length||n,t=n?__("Inserting…","jetpack"):__("Select","jetpack",0);return(0,r.createElement)("div",{className:"jetpack-external-media-browser__media__toolbar"},(0,r.createElement)(o.Button,{variant:"primary",isBusy:n,disabled:e,onClick:j},t))}),null))}},46406:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(65235),c=n.n(s);const __=i.__;t.Z=function(e){const{item:t,focus:n,isSelected:i,isCopying:s=!1}=e,{thumbnails:l,caption:u,name:p,title:d,type:m,children:h=0}=t,{medium:f=null,fmt_hd:g=null,thumbnail:b=null}=l,v=d||u||p,k=c()({"jetpack-external-media-browser__media__item":!0,"jetpack-external-media-browser__media__item__selected":i,"jetpack-external-media-browser__media__folder":"folder"===m,"is-transient":s}),y=(0,a.useRef)(null);return(0,a.useEffect)((()=>{n&&y.current.focus()}),[n]),(0,r.createElement)("li",{ref:y,className:k,onClick:s?void 0:t=>{const{item:n,index:r}=e;e.onClick&&e.onClick(t,{item:n,index:r})},onKeyDown:s?void 0:t=>{const{item:n,index:r}=e;e.onKeyDown&&e.onKeyDown(t,{item:n,index:r})},role:"checkbox",tabIndex:"0","aria-checked":!!i,"aria-disabled":!!s},i&&s&&(0,r.createElement)("div",{className:"jetpack-external-media-browser__media__copying_indicator"},(0,r.createElement)(o.Spinner,null),(0,r.createElement)("div",{className:"jetpack-external-media-browser__media__copying_indicator__label"},__("Inserting Image…","jetpack"))),(0,r.createElement)("img",{src:f||g||b,alt:v}),"folder"===m&&(0,r.createElement)("div",{className:"jetpack-external-media-browser__media__info"},(0,r.createElement)("div",{className:"jetpack-external-media-browser__media__name"},p),(0,r.createElement)("div",{className:"jetpack-external-media-browser__media__count"},h)))}},9827:function(e,t,n){"use strict";var r=n(51806),o=n(69307);t.Z=(0,o.memo)((function(){const e="jetpack-external-media-browser__media__item jetpack-external-media-browser__media__placeholder";return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:e}),(0,r.createElement)("div",{className:e}),(0,r.createElement)("div",{className:e}))}))},10892:function(e,t,n){"use strict";var r=n(82674),o=n.n(r),a=n(51806),i=n(69307),s=n(38457),c=n(95833);const l=e=>e.unstableFeaturedImageFlow||e.modalClass&&-1!==e.modalClass.indexOf("featured-image"),u=e=>void 0===e.multiple&&!l(e);t.Z=function(e){const{mediaProps:t}=e,[n,r]=(0,i.useState)(null),p=(0,s.ZR)(n);return(0,a.createElement)("div",{onClick:e=>e.stopPropagation()},(0,a.createElement)(c.Z,o()({},e,{setSelectedSource:r,isReplace:u(t),isFeatured:l(t),hasImage:t.value>0})),p&&(0,a.createElement)(p,o()({},t,{onClose:e=>{e&&(e.stopPropagation(),e.target.closest(".jetpack-external-media-header__dropdown"))||(r(null),t.onClose?.())}})))}},95833:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(65736),i=n(61074),s=n(20843),c=n(13959);const __=a.__;t.Z=function(e){const{mediaProps:t,open:n,setSelectedSource:a,isFeatured:l,isReplace:u,hasImage:p}=e,d=t.render;let m="tertiary";if(u)return(0,r.createElement)(c.Z,{originalButton:d,open:n,setSource:a});let h=__("Select Image","jetpack");return t.multiple&&(h=__("Select Images","jetpack")),t.allowedTypes.length>1&&(h=__("Select Media","jetpack")),l&&(h=__("Replace Image","jetpack"),m="secondary"),(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.Dropdown,{placement:"bottom-start",className:"jetpack-external-media-button-menu__dropdown",contentClassName:"jetpack-external-media-button-menu__options",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;const a=d&&d({open:n});return l&&p||a&&"string"!=typeof a.props.children?a:(0,r.createElement)(o.Button,{variant:m,className:"jetpack-external-media-button-menu","aria-haspopup":"true","aria-expanded":t,onClick:n},(0,r.createElement)("div",{className:"jetpack-external-media-button-menu__label"},h),(0,r.createElement)(i.Z,{icon:s.Z}))},renderContent:e=>{let{onClose:t}=e;return(0,r.createElement)(o.NavigableMenu,{"aria-label":h},(0,r.createElement)(o.MenuGroup,null,(0,r.createElement)(o.MenuItem,{icon:s.Z,onClick:()=>{t(),n()}},__("Media Library","jetpack")),(0,r.createElement)(c.Z,{open:n,setSource:a,onClick:t})))}}))}},13959:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(38457);t.Z=function(e){let{originalButton:t=null,onClick:n=(()=>{}),open:s,setSource:c}=e;return(0,r.createElement)(a.Fragment,null,t&&t({open:s}),i.Dv.map((e=>{let{icon:t,id:a,label:i}=e;return(0,r.createElement)(o.MenuItem,{icon:t,key:a,onClick:()=>{n(),c(a)}},i)})))}},1285:function(e,t,n){"use strict";n.d(t,{HO:function(){return L},on:function(){return x},uk:function(){return P}});var r=n(6975),o=n(86989),a=n.n(o),i=n(9818),s=n(65736),c=n(96483),l=n(67194),u=n(94841),p=n(29755);const __=s.__,d=__("Pexels Free Photos","jetpack"),m=__("Search Pexels Free Photos","jetpack"),h={per_page:10,search:"mountain"},f=__("Google Photos","jetpack"),g=__("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,c.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,n,o,i)=>({name:e,labels:{name:t,search_items:n},mediaType:"image",fetch:async e=>await a()({path:y(o,{per_page:i.per_page,search:""===e?.search?i.search:e.search}),method:"GET"}).then((t=>{const n=t.media.filter((e=>e.type===k.Image)).map(w);return r.Z.tracks.recordEvent("jetpack_editor_media_inserter_external_source",{mediaSource:o.toString(),results:n.length,search:""===e?.search?i.search:e.search}),n})).catch((()=>[])),getReportUrl:null,isExternalResource:!0}),_=()=>E("google_photos",f,g,p.Y.GooglePhotos,b),C=()=>(0,i.select)("core/edit-post")?.isInserterOpened()||(0,i.select)("core/edit-site")?.isInserterOpened()||(0,i.select)("core/edit-widgets")?.isInserterOpened?.(),S=e=>(0,i.dispatch)("core/block-editor")?.registerInserterMediaCategory?.(e()),j=()=>E("pexels",d,m,p.Y.Pexels,h),x=async()=>{const e=await(async e=>a()({path:y(e,h),method:"GET"}).then((e=>e)).catch((()=>!1)))(p.Y.GooglePhotos);(0,l.X)(C).then((()=>{e?S(_):(0,l.X)((()=>{return e=p.Y.GooglePhotos,!!(0,i.select)(u.j).isAuthenticated(e);var e})).then((()=>S(_)))}))},L=()=>{(0,l.X)(C).then((()=>S(j)))},P=(e,t)=>{(0,i.dispatch)(u.j).setAuthenticated(e,t)}},29755:function(e,t,n){"use strict";n.d(t,{Y:function(){return r}});let r=function(e){return e.Pexels="pexels",e.GooglePhotos="google_photos",e.Openverse="openverse",e.Unknown="unknown",e}({})},47285:function(e,t,n){"use strict";n.d(t,{k:function(){return i}});var r=n(13419),o=n(96483);const a={list:"/wpcom/v2/external-media/list/",copy:(0,r.Wp)()?"/rest/v1.1/external-media-upload?service=":"/wpcom/v2/external-media/copy/",connection:"/wpcom/v2/external-media/connection/"};function i(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return a[e]?(0,o.addQueryArgs)(a[e]+t,n):null}},53463:function(e,t,n){"use strict";var r=n(51806),o=n(69307),a=n(65736),i=n(81427);const __=a.__;t.Z=(0,o.memo)((function(){return(0,r.createElement)(o.Fragment,null,(0,r.createElement)(i.JO,null),(0,r.createElement)("p",null,__("To get started, connect your site to your Google Photos library.","jetpack")),(0,r.createElement)("p",null,__("You can remove the connection in either of these places:","jetpack")),(0,r.createElement)("ul",null,(0,r.createElement)("li",null,(0,r.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://myaccount.google.com/security"},__("Google Security page","jetpack"))),(0,r.createElement)("li",null,(0,r.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://wordpress.com/marketing/connections/"},__("WordPress.com Connections","jetpack")))))}))},5890:function(e,t,n){"use strict";var r=n(51806),o=n(69307),a=n(65736);const __=a.__;t.Z=(0,o.memo)((function(){return(0,r.createElement)("p",null,__("Awaiting authorization","jetpack"))}))},86167:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(20982);const __=i.__;t.Z=(0,a.memo)((function(e){let{path:t,setPath:n}=e;return(0,r.createElement)(a.Fragment,null,(0,r.createElement)(o.Button,{variant:"tertiary",onClick:()=>n(s.Tu)},__("Albums","jetpack")),"→ ",t.name)}))},4819:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(92819),c=n(20769),l=n(20982);const __=i.__;function u(e){let{value:t,updateFilter:n}=e;return(0,r.createElement)(o.SelectControl,{label:__("Category","jetpack"),value:t,options:l.tY,onChange:n})}function p(e){let{value:t,updateFilter:n}=e;const i=t?.range||l.CY,[s,u]=(0,a.useState)(-1),[p,d]=(0,a.useState)(l.zs);return(0,r.createElement)("div",{className:"jetpack-external-media-date-filter"},(0,r.createElement)(o.SelectControl,{label:__("Filter by time period","jetpack"),value:i,options:l.QU,onChange:e=>n({range:e})}),i===l.yD&&(0,r.createElement)(a.Fragment,null,(0,r.createElement)(o.SelectControl,{label:__("Month","jetpack"),value:s,options:l.l5,onChange:u}),(0,r.createElement)(c.Z,{className:"components-base-control",label:__("Year","jetpack"),value:p,min:1970,onChange:d}),(0,r.createElement)(o.Button,{variant:"secondary",disabled:t?.month===s&&t?.year===p,onClick:()=>{n({range:i,month:s,year:p})}},__("Apply","jetpack"))))}function d(){return(0,r.createElement)("span",null,__("Favorites","jetpack"))}function m(e){let{value:t,updateFilter:n}=e;const a=[{label:__("All","jetpack"),value:""},{label:__("Images","jetpack"),value:"photo"},{label:__("Videos","jetpack"),value:"video"}];return(0,r.createElement)(o.SelectControl,{label:__("Type","jetpack"),value:t,options:a,onChange:n})}function h(e){let{children:t,removeFilter:n,isRemovable:a=!1}=e;return(0,r.createElement)("div",{className:"jetpack-external-media-googlephotos-filter"},t,!!a&&(0,r.createElement)(o.Button,{onClick:n,isSmall:!0},__("Remove Filter","jetpack")))}t.Z=function(e){let{filters:t,setFilters:n,canChangeMedia:o}=e;const a=Object.keys(t).filter((e=>o||"mediaType"!==e)).map((e=>{return(0,r.createElement)(h,{key:e,removeFilter:()=>n((0,s.omit)(t,e))},(o=e,a=t[e],i=r=>n(function(e,t,n){const r={...e,[t]:n};return"mediaType"===t&&"video"===n?delete r.category:"category"===t&&"video"===r.mediaType&&delete r.mediaType,r}(t,e,r)),"category"===o?(0,r.createElement)(u,{value:a,updateFilter:i}):"date"===o?(0,r.createElement)(p,{value:a,updateFilter:i}):"favorite"===o?(0,r.createElement)(d,{value:a}):"mediaType"===o?(0,r.createElement)(m,{value:a,updateFilter:i}):null));var o,a,i}));return 0===a.length?null:a}},58912:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(76292),o=n.n(r),a=n(20982);const i=o()();function s(e){const{mediaType:t,category:n,favorite:r,date:s}=e,c=[];if(t&&c.push("mediaType="+t),n&&"video"!==t&&c.push("categoryInclude="+n),void 0!==r&&c.push("feature=favorite"),s){let e=null,t=null;switch(s.range){case a.Wm:e=o()(i).subtract(7,"days"),t=i;break;case a.Qh:e=o()(i).subtract(30,"days"),t=i;break;case a.Bb:e=o()(i).subtract(6,"months"),t=i;break;case a.En:e=o()(i).subtract(1,"year"),t=i;break;case a.yD:const n=parseInt(s.month),r=parseInt(s.year);isNaN(n)||isNaN(r)||(-1===n?(e=o()([r,0]),t=o()(e).endOf("year")):(e=o()([r,n]),t=o()(e).endOf("month")))}const n=e?e.format("YYYY-MM-DD"):"0000-00-00",r=t?t.format("YYYY-MM-DD"):"0000-00-00";c.push(`dateRange=${n}:${r}`)}return c.length>0?c:null}},53800:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736);const __=i.__,s=[{label:__("Category","jetpack"),value:"category"},{label:__("Date","jetpack"),value:"date"},{label:__("Favorites","jetpack"),value:"favorite"},{label:__("Media Type","jetpack"),value:"mediaType"}];function c(e){return s.filter((t=>void 0===e[t.value]))}function l(e){const t=c(e);return t.length>0?t[0].value:""}t.Z=function(e){const[t,n]=(0,a.useState)(l([])),{isLoading:i,isCopying:s,filters:u,canChangeMedia:p}=e,d=function(e,t){return t?e:e.filter((e=>"mediaType"!==e.value))}(c(u),p);return 0===d.length?null:(0,r.createElement)(a.Fragment,null,(0,r.createElement)(o.SelectControl,{label:__("Filters","jetpack"),value:t,disabled:i||s,options:d,onChange:n}),(0,r.createElement)(o.Button,{disabled:i||s,variant:"secondary",isSmall:!0,onClick:()=>{const r=(o=u,a=t,{...o,[a]:"favorite"===a||""});var o,a;e.setFilters(r),n(l(r))}},__("Add Filter","jetpack")))}},64034:function(e,t,n){"use strict";var r=n(51806),o=n(2772);t.Z=e=>{let{account:t,setAuthenticated:n}=e;const{image:a,name:i}=t||{};return(0,r.createElement)("div",{className:"jetpack-external-media-header__account"},(0,r.createElement)("div",{className:"jetpack-external-media-header__account-info"},a&&(0,r.createElement)("img",{className:"jetpack-external-media-header__account-image",src:a,alt:"",height:"18",width:"18"}),i&&(0,r.createElement)("div",{className:"jetpack-external-media-header__account-name"},i)),(0,r.createElement)(o.Z,{setAuthenticated:n}))}},62494:function(e,t,n){"use strict";var r=n(51806),o=n(39229),a=n(86989),i=n.n(a),s=n(55609),c=n(69307),l=n(65736),u=n(20982),p=n(47285),d=n(53463),m=n(5890);const __=l.__;t.Z=function(e){const{setAuthenticated:t}=e,[n,a]=(0,c.useState)(!1),l=(0,c.useCallback)((()=>{a(!0),i()({path:(0,p.k)("connection",u.iT)}).then((e=>{if(e.error)throw e.message;(0,o.Z)(e.connect_URL,(()=>{a(!1),t(!0)}))})).catch((()=>{a(!1)}))}),[t]);return(0,r.createElement)("div",{className:"jetpack-external-media-auth"},n?(0,r.createElement)(m.Z,null):(0,r.createElement)(d.Z,null),(0,r.createElement)(s.Button,{variant:"primary",disabled:n,onClick:l},__("Connect to Google Photos","jetpack")))}},2772:function(e,t,n){"use strict";var r=n(51806),o=n(86989),a=n.n(o),i=n(55609),s=n(69307),c=n(65736),l=n(20982),u=n(47285);const __=c.__;t.Z=e=>{let{setAuthenticated:t}=e;const[n,o]=(0,s.useState)(!1),c=(0,s.useCallback)((()=>{o(!0),a()({method:"DELETE",path:(0,u.k)("connection",l.iT)}).then((()=>t(!1))).catch((()=>o(!1)))}),[t]);return(0,r.createElement)(i.Button,{variant:"secondary",className:"jetpack-external-media-browser__disconnect",onClick:c,disabled:n,isBusy:n},__("Disconnect from Google Photos","jetpack"))}},20107:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(20982),c=n(11583),l=n(47285),u=n(86167),p=n(4819),d=n(58912),m=n(53800),h=n(64034);const __=i.__;t.Z=function(e){const{account:t,allowedTypes:n,copyMedia:i,getMedia:f,isCopying:g,isLoading:b,media:v,multiple:k,onChangePath:y,pageHandle:w,path:E,setAuthenticated:_,showAdditionalFilters:C=!1}=e,S=(j=n)&&1===j.length&&"image"===j[0];var j;const[x,L]=(0,a.useState)(S?{mediaType:"photo",date:{range:s.CY}}:{date:{range:s.CY}}),P=(0,a.useRef)(""),A=(0,a.useRef)(""),T=E.ID===s.oI?(0,d.Z)(x):null,N={number:20,path:E.ID};T&&(N.filter=T);const M=(0,l.k)("list",s.iT,N),I=(0,a.useCallback)((function(e){f(M,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}),[f,M]),R=(0,a.useCallback)((e=>{const t=v.find((t=>t.ID===e));A.current=E,y(t||{ID:e})}),[v,y,A,E]),Z=(0,a.useCallback)((e=>{i(e,(0,l.k)("copy",s.iT),s.iT)}),[i]);return(0,a.useEffect)((()=>{P!==M&&(P.current=M,I({},E!==A.current))}),[P,M,I,E]),(0,r.createElement)("div",{className:"jetpack-external-media-wrapper__google"},(0,r.createElement)("div",{className:"jetpack-external-media-header__view"},(0,r.createElement)(o.SelectControl,{className:"jetpack-external-media-header__select",label:__("View","jetpack"),value:E.ID!==s.oI?s.Tu:s.oI,disabled:b||g,options:s.OG,onChange:R}),C&&E.ID===s.oI&&(0,r.createElement)(m.Z,{filters:x,isLoading:b,setFilters:L,canChangeMedia:!S}),(0,r.createElement)("div",{className:"jetpack-external-media-header__filter"},E.ID===s.oI&&(0,r.createElement)(p.Z,{filters:x,isLoading:b,setFilters:L,canChangeMedia:!S}),E.ID!==s.oI&&E.ID!==s.Tu&&(0,r.createElement)(u.Z,{path:E,setPath:R})),(!b||v.length>0)&&(0,r.createElement)(h.Z,{account:t,setAuthenticated:_})),(0,r.createElement)(c.Z,{className:"jetpack-external-media-browser__google",key:M,media:v,isCopying:g,isLoading:b,nextPage:I,onCopy:Z,pageHandle:w,multiple:k,setPath:R}))}},77453:function(e,t,n){"use strict";var r=n(51806),o=n(29755),a=n(97893),i=n(62494),s=n(20107);t.Z=(0,a.Z)(o.Y.GooglePhotos)((function(e){return e.isAuthenticated?(0,r.createElement)(s.Z,e):(0,r.createElement)(i.Z,e)}))},38457:function(e,t,n){"use strict";n.d(t,{Dv:function(){return u},ZR:function(){return p}});var r=n(51806),o=n(65736),a=n(81427),i=n(20982),s=n(77453),c=n(41214),l=n(12533);const __=o.__,u=[{id:i.iT,label:__("Google Photos","jetpack"),icon:(0,r.createElement)(a.He,{className:"components-menu-items__item-icon"}),keyword:"google photos"},{id:i.wk,label:__("Pexels Free Photos","jetpack"),icon:(0,r.createElement)(a.yk,{className:"components-menu-items__item-icon"}),keyword:"pexels"},{id:i.Eh,label:__("Openverse","jetpack"),icon:(0,r.createElement)(a.FG,{className:"components-menu-items__item-icon"}),keyword:"openverse"}];function p(e){return e===i.wk?l.Z:e===i.iT?s.Z:e===i.Eh?c.Z:null}},41214:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(92819),c=n(20982),l=n(11583),u=n(29755),p=n(47285),d=n(97893);const __=i.__;t.Z=(0,d.Z)(u.Y.Openverse)((function(e){const{media:t,isCopying:n,isLoading:i,pageHandle:u,multiple:d,copyMedia:m,getMedia:h}=e,[f,g]=(0,a.useState)((0,s.sample)(c.h9)),[b,v]=(0,a.useState)(""),k=(0,a.useCallback)((e=>{m(e,(0,p.k)("copy",c.Eh),c.Eh)}),[m]),y=(0,a.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];f&&h((0,p.k)("list",c.Eh,{number:20,search:f}),t)}),[h,f]),w=(0,a.useRef)(),E=(0,a.useCallback)((e=>{e.preventDefault(),v(f),y(e,!0),w.current=f}),[y,f]);(0,a.useEffect)(y,[]);const _=(0,a.useRef)(null);return(0,a.useEffect)((()=>{if(!_?.current)return;const e=_.current.querySelector("input[type='search']");e&&(e.focus(),e.select())}),[]),(0,r.createElement)("div",{className:"jetpack-external-media-wrapper__openverse"},(0,r.createElement)("form",{ref:_,className:"jetpack-external-media-header__openverse",onSubmit:E},(0,r.createElement)(o.TextControl,{"aria-label":__("Search","jetpack"),type:"search",value:f,onChange:g,disabled:!!n}),(0,r.createElement)(o.Button,{isPrimary:!0,onClick:E,type:"submit",disabled:!f.length||f===w.current||n},__("Search","jetpack"))),(0,r.createElement)(l.Z,{key:b,className:"jetpack-external-media-browser__openverse",media:t,isCopying:n,isLoading:i,nextPage:y,onCopy:k,pageHandle:u,multiple:d}))}))},12533:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(92819),c=n(20982),l=n(11583),u=n(29755),p=n(47285),d=n(97893);const __=i.__;t.Z=(0,d.Z)(u.Y.Pexels)((function(e){const{media:t,isCopying:n,isLoading:i,pageHandle:u,multiple:d,copyMedia:m,getMedia:h}=e,[f,g]=(0,a.useState)((0,s.sample)(c.h9)),[b,v]=(0,a.useState)(""),k=(0,a.useCallback)((e=>{m(e,(0,p.k)("copy",c.wk),c.wk)}),[m]),y=(0,a.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];f&&h((0,p.k)("list",c.wk,{number:20,path:"recent",search:f}),t)}),[h,f]),w=(0,a.useRef)(),E=(0,a.useCallback)((e=>{e.preventDefault(),v(f),y(e,!0),w.current=f}),[y,f]);(0,a.useEffect)(y,[]);const _=(0,a.useRef)(null);return(0,a.useEffect)((()=>{if(!_.current)return;const e=Array.from(_.current.elements).find((e=>"search"===e.type));e&&(e.focus(),e.select())}),[]),(0,r.createElement)("div",{className:"jetpack-external-media-wrapper__pexels"},(0,r.createElement)("form",{ref:_,className:"jetpack-external-media-header__pexels",onSubmit:E},(0,r.createElement)(o.TextControl,{"aria-label":__("Search","jetpack"),type:"search",value:f,onChange:g,disabled:!!n}),(0,r.createElement)(o.Button,{variant:"primary",onClick:E,type:"submit",disabled:!f.length||f===w.current||n},__("Search","jetpack"))),(0,r.createElement)(l.Z,{key:b,className:"jetpack-external-media-browser__pexels",media:t,isCopying:n,isLoading:i,nextPage:y,onCopy:k,pageHandle:u,multiple:d}))}))},97893:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(51806),o=n(86989),a=n.n(o),i=n(55609),s=n(94333),c=n(9818),l=n(69307),u=n(65736),p=n(39630),d=n(65235),m=n.n(d),h=n(92819),f=n(20982),g=n(1285),b=n(29755);const __=u.__;function v(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b.Y.Unknown;return(0,s.createHigherOrderComponent)((t=>{class n extends l.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:f.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,g.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=(()=>{var e=this;return function(t){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.state.isLoading||(n&&e.props.noticeOperations.removeAllNotices(),e.setState({account:n?e.defaultAccount:e.state.account,isLoading:!0,media:n?[]:e.state.media,nextHandle:!n&&e.state.nextHandle},(()=>e.getMediaRequest(t))))}})();handleApiError=e=>{if("authorization_required"===e.code)return this.setAuthenticated(!1),void this.setState({isLoading:!1,isCopying:!1});e.errors?.length&&(e={code:e.errors[0].error,message:e.errors[0].message});const{noticeOperations:t}=this.props;t.createErrorNotice("internal_server_error"===e.code?"Internal server error":e.message),this.setState({isLoading:!1,isCopying:!1})};getMediaRequest=e=>{const{nextHandle:t,media:n}=this.state;if(!1===t&&n.length>0)return void this.setState({isLoading:!1});const r=this.getRequestUrl(e);a()({path:r,method:"GET",parse:void 0===window.wpcomFetch}).then((e=>{this.setState({account:e.meta.account,media:this.mergeMedia(n,e.media),nextHandle:e.meta.next_page,isLoading:!1}),this.setAuthenticated(!0)})).catch(this.handleApiError)};copyMedia=(e,t,n)=>{this.setState({isCopying:e}),this.props.noticeOperations.removeAllNotices(),this.modalElement&&this.modalElement.focus(),a()({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:n,post_id:this.props.postId??0}}).then((e=>{e.media&&(e=e.media.map((e=>({alt:e.alt,caption:e.caption,id:e.ID,type:"image",url:e.URL}))));const{value:t,addToGallery:n,multiple:r}=this.props,o=r?e:e[0],a=e.find((e=>e.errors));if(a){const{errors:e}=a,t=Object.keys(e)[0];this.handleApiError({code:t,message:e[t]})}else this.props.onClose(),this.props.onSelect(n?t.concat(e):o)})).catch(this.handleApiError)};onChangePath=(e,t)=>{this.setState({path:e},t)};render(){const{account:e,isAuthenticated:n,isCopying:o,isLoading:a,media:s,nextHandle:c,path:l}=this.state,{allowedTypes:u,multiple:p=!1,noticeUI:d,onClose:h}=this.props,f=o?__("Inserting media","jetpack"):__("Select media","jetpack",0),g=o?__("When the media is finished copying and inserting, you will be returned to the editor.","jetpack"):__("Select the media you would like to insert into the editor.","jetpack",0),b="jetpack-external-media-browser__description",v=m()({"jetpack-external-media-browser":!0,"jetpack-external-media-browser--is-copying":o});return(0,r.createElement)(i.Modal,{onRequestClose:h,title:f,aria:{describedby:b},className:v},(0,r.createElement)("div",{ref:this.contentRef},d,(0,r.createElement)("p",{id:b,className:"jetpack-external-media-browser--visually-hidden"},g),(0,r.createElement)(t,{account:e,getMedia:this.getMedia,copyMedia:this.copyMedia,isCopying:o,isLoading:a,media:s,pageHandle:c,allowedTypes:u,isAuthenticated:n,setAuthenticated:this.setAuthenticated,multiple:p,path:l,onChangePath:this.onChangePath})))}}return(0,c.withSelect)((e=>({postId:e("core/editor").getCurrentPostId()})))((0,i.withNotices)(n))}))}},42232:function(e,t,n){"use strict";n.d(t,{A:function(){return r}});const r="SET_AUTHENTICATED";t.Z={setAuthenticated:(e,t)=>({type:r,payload:{isAuthenticated:t,mediaSource:e}})}},94841:function(e,t,n){"use strict";n.d(t,{j:function(){return s}});var r=n(9818),o=n(42232),a=n(57805),i=n(38972);const s="jetpack-media",c={actions:o.Z,reducer:a.Z,selectors:i.Z},l=(0,r.createReduxStore)(s,c);(0,r.register)(l)},57805:function(e,t,n){"use strict";var r=n(42232),o=n(2790);t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.F,t=arguments.length>1?arguments[1]:void 0;return t.type===r.A?{...e,mediaSourceIsAuthenticated:e.mediaSourceIsAuthenticated.set(t.payload.mediaSource,t.payload.isAuthenticated)}:e}},38972:function(e,t){"use strict";t.Z={isAuthenticated:(e,t)=>e.mediaSourceIsAuthenticated.get(t)??!1}},2790:function(e,t,n){"use strict";n.d(t,{F:function(){return o}});var r=n(29755);const o={mediaSourceIsAuthenticated:new Map([[r.Y.Pexels,!1],[r.Y.GooglePhotos,!1],[r.Y.Openverse,!1],[r.Y.Unknown,!1]])}},11317:function(e,t,n){"use strict";n.d(t,{Qu:function(){return i}});var r=n(13419),o=n(92819);function a(){return(0,o.get)((0,r.Pb)(),["allowedMimeTypes"],[])}function i(e,t){if(!e||!t)return!1;if(!a())return!1;const n=(r=t)?(0,o.pickBy)(a(),(e=>(0,o.startsWith)(e,`${r}/`))):{};var r;const i=(s=n)?(0,o.flatten)((0,o.map)((0,o.keys)(s),(e=>e.split("|")))):[];var s;if("string"==typeof e){const t=e.split(".").pop();return t&&i.includes(t)}return"object"==typeof e&&(e.type&&(0,o.values)(n).includes(e.type))}},5820:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(4981);function o(){const e=(0,r.getCategories)();for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];for(const t of n)if(e.some((e=>{let{slug:n}=e;return n===t})))return t;throw new Error(`Could not find a category from the provided list: ${n.join(",")}`)}},74251:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(96483);function o(e,t){if(!(0,r.isURL)(t))return null;let n=t;try{const o=(0,r.getQueryArg)(t,"state"),a=JSON.parse(atob(o));if(e)a.from_editor_post_id=e;else{const e=new URLSearchParams(window.location.search);a.from_site_editor_post_id=e.get("postId"),a.from_site_editor_post_type=e.get("postType")}n=(0,r.addQueryArgs)(t,{state:btoa(JSON.stringify(a))})}catch(e){0}return n}},4554:function(e,t,n){"use strict";n.d(t,{S:function(){return o}});var r=n(92819);const o=(e,t)=>(0,r.reduce)(t,((t,n,r)=>{if(void 0===e[r])return t;const{type:o,validator:a,validValues:i,default:s}=e[r];return t[r]="boolean"===o?"false"!==n&&!!n:a?a(n)?n:s:i?i.includes(n)?n:s:n,t}),{})},59809:function(e,t,n){"use strict";var r=n(82674),o=n.n(r),a=n(51806),i=n(65235),s=n.n(i),c=n(73139);t.Z=e=>{let{children:t=null,isError:n=!1,...r}=e;const i=s()("help-message",{"help-message-is-error":n});return t&&(0,a.createElement)("div",o()({className:i},r),n&&(0,a.createElement)(c.Z,{size:"24","aria-hidden":"true",role:"img",focusable:"false"}),(0,a.createElement)("span",null,t))}},81427:function(e,t,n){"use strict";n.d(t,{Ae:function(){return v},FG:function(){return m},He:function(){return d},IM:function(){return g},JO:function(){return f},K9:function(){return y},Vq:function(){return _},h:function(){return k},ll:function(){return w},o1:function(){return E},yk:function(){return h},yu:function(){return C},zf:function(){return b}});var r=n(82674),o=n.n(r),a=n(51806),i=n(80550),s=n(55609),c=n(65235),l=n.n(c),u=n(70355);const p=i.O["Jetpack Green 40"],d=e=>(0,a.createElement)(s.SVG,o()({height:"24",width:"24",viewBox:"1.2 10.8 169.6 169.6",xmlns:"http://www.w3.org/2000/svg"},e),(0,a.createElement)(s.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,a.createElement)(s.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,a.createElement)(s.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,a.createElement)(s.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,a.createElement)(s.SVG,o()({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,a.createElement)(s.G,null,(0,a.createElement)(s.Path,{d:"M0 9.3975C0 14.5687 4.1722 18.795 9.3353 18.795V0C4.1722 0 0 4.2 0 9.3975Z"}),(0,a.createElement)(s.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,a.createElement)(s.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,a.createElement)(s.Path,{d:"M0 32.6025C0 37.8 4.1722 42 9.3353 42V23.2312C4.1722 23.2312 0 27.4312 0 32.6025Z"}),(0,a.createElement)(s.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,a.createElement)(s.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,a.createElement)(s.SVG,o()({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),(0,a.createElement)(s.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,a.createElement)(s.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"})),f=()=>{const e="#757575";return(0,a.createElement)(s.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,a.createElement)(s.G,{id:"Icon"},(0,a.createElement)(s.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,a.createElement)(s.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,a.createElement)(s.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,a.createElement)(s.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,a.createElement)(s.G,{id:"Photos"},(0,a.createElement)(s.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,a.createElement)(s.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,a.createElement)(s.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,a.createElement)(s.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,a.createElement)(s.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,a.createElement)(s.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,a.createElement)(s.G,{id:"Google"},(0,a.createElement)(s.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,a.createElement)(s.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,a.createElement)(s.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,a.createElement)(s.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,a.createElement)(s.Rect,{x:"679.2",y:"172.7",class:"st4",fill:e,width:"14.8",height:"99.3"}),(0,a.createElement)(s.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"})))},g=e=>{let{size:t=24,border:n=0,className:r,color:o=p}=e;const i=n?-n/t*32:0;return(0,a.createElement)(s.SVG,{className:l()("jetpack-logo",r),width:t,height:t,viewBox:`${i} ${i} ${32-2*i} ${32-2*i}`},(0,a.createElement)(s.Path,{className:"jetpack-logo__icon-circle",fill:o,stroke:n?"#fff":"transparent",strokeWidth:n,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z"}),(0,a.createElement)(s.Polygon,{className:"jetpack-logo__icon-triangle",fill:"#fff",points:`15,19 ${7-.5*i},19 15,${3-i}`}),(0,a.createElement)(s.Polygon,{className:"jetpack-logo__icon-triangle",fill:"#fff",points:`17,${29+i} 17,13 ${25+.5*i},13`}))},b={foreground:(0,u.m)(),src:(0,a.createElement)(s.SVG,{viewBox:"0 0 100 100"},(0,a.createElement)(s.Path,{d:"M100,44H72.4l23.9-13.8l-6-10.4L66.4,33.6L80.2,9.7l-10.4-6L56,27.59V0H44v27.6L30.2,3.7l-10.4,6l13.8,23.9 L9.7,19.8l-6,10.4L27.6,44H0V56h27.6L3.7,69.8l6,10.4l23.9-13.8L19.8,90.3l10.4,6L44,72.4V100H56V72.41l13.8,23.9l10.4-6L66.4,66.4 l23.9,13.8l6-10.4L72.4,56H100V44z M50,65.23c-8.41,0-15.23-6.82-15.23-15.23c0-8.41,6.82-15.23,15.23-15.23S65.23,41.59,65.23,50 C65.23,58.41,58.41,65.23,50,65.23z"}))},v={foreground:(0,u.m)(),src:(0,a.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20.7 17",xmlSpace:"preserve"},(0,a.createElement)(s.Path,{d:"m20.7 12.9-.9-11c0-.5-.2-.9-.5-1.3-.3-.3-.8-.5-1.3-.5L1.9 0h-.1c-.2 0-.5 0-.7.1C.9.2.7.4.5.5.4.7.2.9.1 1.1c-.1.2-.1.5-.1.7v.1l.9 13.4c0 .5.2.9.5 1.3.3.2.8.4 1.3.4H3l16.1-2c.4 0 .9-.3 1.1-.6.3-.3.5-.8.5-1.2v-.3zm-3.1.8L4.2 15.3H4c-.4 0-.8-.1-1-.4-.3-.3-.4-.6-.5-1L1.7 3.2v-.1c0-.4.2-.8.5-1 .3-.3.7-.4 1-.4h.1l13.5.1c.4 0 .8.1 1 .4.3.3.4.6.5 1L19 12v.3c0 .4-.2.7-.4 1-.3.2-.6.4-1 .4z"}))},k={foreground:(0,u.m)(),src:(0,a.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43",xmlSpace:"preserve"},(0,a.createElement)(s.Path,{transform:"translate(-25)",fillRule:"evenodd",d:"M37 31.908c0 1.376.893 2.268 2.27 2.268H45.9c3.956 0 7.192-1.337 9.392-3.68H37v1.412zM45.901 9H39.27C37.893 9 37 9.893 37 11.269v1.411h18.294C53.093 10.338 49.857 9 45.9 9zm5.787 16.176c0 1.113.726 1.835 1.845 1.835h3.973c.45-1.117.753-2.345.894-3.671h-4.867c-1.119 0-1.845.722-1.845 1.836zm-5.507-7.166c0 1.113.725 1.836 1.844 1.836H58.4a13.644 13.644 0 00-.894-3.672h-9.481c-1.119 0-1.844.723-1.844 1.836zm1.843 7.166c0-1.114-.726-1.836-1.845-1.836H37v3.671h9.18c1.118 0 1.843-.722 1.843-1.835zm-5.508-7.166c0-1.113-.726-1.836-1.844-1.836H37v3.672h3.672c1.118 0 1.844-.723 1.844-1.836zM83.667 21.209c.296-1.437",clipRule:"evenodd"}))},y={foreground:(0,u.m)(),src:(0,a.createElement)(s.SVG,{viewBox:"0 0 24 24"},(0,a.createElement)(s.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,a.createElement)(s.G,null,(0,a.createElement)(s.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"})))},w=((0,u.m)(),(0,a.createElement)(s.SVG,{viewBox:"0 0 24 24"},(0,a.createElement)(s.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,a.createElement)(s.G,null,(0,a.createElement)(s.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,a.createElement)(s.SVG,{viewBox:"0 0 24 24"},(0,a.createElement)(s.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,a.createElement)(s.G,null,(0,a.createElement)(s.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,a.createElement)(s.SVG,{viewBox:"0 0 24 24"},(0,a.createElement)(s.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,a.createElement)(s.G,null,(0,a.createElement)(s.Path,{d:"M11.1114 8H20.0002M11.1113 15H20.0002",stroke:(0,u.m)(),strokeWidth:"1.5"}),(0,a.createElement)(s.Path,{d:"M4 10V6L8 8L4 10Z",fill:(0,u.m)()}),(0,a.createElement)(s.Path,{d:"M4 17V13L8 15L4 17Z",fill:(0,u.m)()}))),(0,u.m)(),(0,a.createElement)(s.SVG,{viewBox:"0 0 24 24"},(0,a.createElement)(s.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,a.createElement)(s.G,null,(0,a.createElement)(s.Path,{d:"M4 12V4L11 8L4 12Z"}),(0,a.createElement)(s.Path,{d:"M4 14.5H20V16H4V14.5Z"}),(0,a.createElement)(s.Path,{d:"M4 18.5H13V20H4V18.5Z"}))),(0,a.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(s.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,a.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(s.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,a.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(s.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,a.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(s.Path,{d:"M0 0h24v24H0z",fill:"none"}),(0,a.createElement)(s.Path,{d:"M7 2v11h3v9l7-12h-4l4-8z",fill:"currentColor"})),(0,a.createElement)(s.SVG,{width:"29",height:"21",viewBox:"0 0 29 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(s.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"}))),E=(0,a.createElement)(s.SVG,{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(s.Path,{d:"M4.75725 2.075C4.60279 1.97745 4.41041 1.97489 4.25365 2.06832C4.09689 2.16174 4 2.3367 4 2.52632V21.4737C4 21.6633 4.09689 21.8383 4.25365 21.9317C4.41041 22.0251 4.60279 22.0226 4.75725 21.925L19.7573 12.4513C19.9079 12.3562 20 12.1849 20 12C20 11.8151 19.9079 11.6438 19.7573 11.5487L4.75725 2.075Z",fill:"white"})),_=((0,a.createElement)(s.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",style:{fill:"none"}},(0,a.createElement)(s.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,a.createElement)("line",{x1:"9.75",y1:"9",x2:"9.75",y2:"4",stroke:"currentColor",strokeWidth:"1.5"}),(0,a.createElement)("line",{x1:"14.25",y1:"9",x2:"14.25",y2:"4",stroke:"currentColor",strokeWidth:"1.5"})),(0,a.createElement)(s.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(s.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,a.createElement)(s.Path,{d:"M5 7L12 13L19 7",stroke:"currentColor",strokeWidth:"1.5"})),(0,a.createElement)(s.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(s.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,a.createElement)(s.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(s.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,a.createElement)(s.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(s.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"}))),C=(0,a.createElement)(s.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(s.G,null,(0,a.createElement)(s.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:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(13419),o=n(92819);function a(){return(0,o.get)((0,r.Pb)(),["jetpack","is_active"],!1)}},99621:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(13419),o=n(92819);function a(){return(0,o.get)((0,r.Pb)(),["jetpack","is_offline_mode"],!1)}},63066:function(e,t,n){"use strict";var r=n(13419),o=n(86989),a=n.n(o),i=n(9818),s=n(65736);n(53961);const __=s.__;function c(){const e=(0,r.lQ)();return void 0!==typeof window&&window.location&&e?(0,r.Wp)()||(0,r.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,r.Wp)())break e;const t=await a()({path:"/jetpack/v4/site"});e=JSON.parse(t.data).plan.product_name}finally{const t=c();(0,i.dispatch)("core/notices").createNotice("success",e?(0,s.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:c(),label:__("View my plan","jetpack")}]}})}}}})()},80425:function(e,t,n){"object"==typeof window&&window.Jetpack_Block_Assets_Base_Url&&window.Jetpack_Block_Assets_Base_Url.url&&(n.p=window.Jetpack_Block_Assets_Base_Url.url)},31985:function(e,t,n){"use strict";n.d(t,{S:function(){return c},Z:function(){return s}});var r=n(13419),o=n(4981),a=n(92694);const i="jetpack/";function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const c=e.startsWith(i),l=c?e.slice(i.length):e,{available:u,details:p,unavailableReason:d}=(0,r.OZ)(l),m=(0,r._D)(d,p),h=s||c?i:"";if(!u&&!m)return!1;const f=h+l,g=(0,o.registerBlockType)(f,t);return m&&(0,a.addFilter)("editor.BlockListBlock",`${f}-with-has-warning-is-interactive-class-names`,(0,r.T)(f)),n.forEach((e=>(0,o.registerBlockType)(h+e.name,e.settings))),g}function c(e,t,n,o){const a={...t,icon:(0,r.lt)(e)},{variations:i}=e;return Array.isArray(i)&&i.length>0&&(a.variations=i.map((e=>({...e,icon:(0,r.lt)(e)})))),s(e.name,a,n,o)}},36598:function(e,t,n){"use strict";var r=n(51806),o=n(70444);t.Z=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:24,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"0 0 24 24";return(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:t,height:n,viewBox:a},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z",className:"icon-filler"}),e)}},66425:function(e,t,n){"use strict";var r=n(51806),o=n(52175);t.Z=(e,t,n,a,i)=>{const{isSelected:s}=t,c=t.attributes[e];return(0,r.createElement)("div",{className:s?`jetpack-${e}-block is-selected`:`jetpack-${e}-block`},!s&&""!==c&&a(t),(s||""===c)&&(0,r.createElement)(o.PlainText,{value:c,placeholder:n,"aria-label":n,onChange:i}))}},92713:function(e,t,n){"use strict";var r=n(9818),o=n(65736);n(53961);const __=o.__;if("undefined"!=typeof window&&window.location){const e=new URLSearchParams(window.location.search);e.get("stripe_connect_success")?(0,r.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,r.dispatch)("core/notices").createNotice("error",__("You cancelled connecting your site to Stripe.","jetpack"))}},23621:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(86989),o=n.n(r),a=n(92819);function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.noop;return t(!0),new Promise(((n,r)=>{o()({path:`/wpcom/v2/resolve-redirect/?url=${encodeURIComponent(e)}`}).then((o=>{t(!1);const a=o.status?parseInt(o.status,10):null;a&&a>=400?r():n(o.url||e)}),(()=>{t(!1),r()}))}))}},46867:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(9818),o=n(69307),a=n(92819);function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.noop;const[n,i]=(0,o.useState)(!1),{isAutosaveablePost:s,isDirtyPost:c,currentPost:l}=(0,r.useSelect)((e=>{const t=e("core/editor");return{isAutosaveablePost:t.isEditedPostAutosaveable(),isDirtyPost:t.isEditedPostDirty(),currentPost:t.getCurrentPost()}}),[]),u=Object.keys(l).length>0,p=(0,r.useSelect)((e=>!!window.wp?.customize||!!e("core/edit-widgets"))),d=(0,r.dispatch)("core/editor").savePost,m=(0,r.useSelect)((e=>e("core").__experimentalGetDirtyEntityRecords())),h=async e=>{e.preventDefault(),u?c&&s&&await d(e):await(async()=>{for(let e=0;e<m.length;e++)await(0,r.dispatch)("core").saveEditedEntityRecord(m[e].kind,m[e].name,m[e].key)})()};return{autosave:h,autosaveAndRedirect:async r=>{r.preventDefault(),n||(i(!0),h(r).then((()=>{!function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t&&t(e),n?window.open(e,"_blank"):window.top.location.href=e}(e,t,p)})))},isRedirecting:n}}},78798:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(13419),o=n(9818),a=n(92694),i=n(92819),s=(n(87553),n(46867));const c="a8c.wpcom-block-editor.openCheckoutModal";function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.noop;const{checkoutUrl:n,planData:l}=(0,o.useSelect)((t=>{const n=t("core/editor"),o=t("wordpress-com/plans"),{id:a,type:i}=n.getCurrentPost(),s=o&&o.getPlan(e);return{checkoutUrl:(0,r.Qq)({plan:s,planSlug:e,postId:a,postType:i}),planData:s}}),[]),{autosave:u,autosaveAndRedirect:p,isRedirecting:d}=(0,s.Z)(n,t);return[n,async e=>{if(e.preventDefault(),(0,a.hasAction)(c))return e.preventDefault(),u(e),void(0,a.doAction)(c,{products:[l]});p(e)},d,l]}},81673:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);const o=e=>{const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current};function a(e){let{attributes:t,disableEffects:n=!1,setAttributes:a}=e;const{align:i,width:s}=t,c=o(i);(0,r.useEffect)((()=>{if(n)return;c!==i&&("left"===i||"right"===i)&&s?.includes("%")&&a({width:void 0})}),[i,n,c,a,s])}},67194:function(e,t,n){"use strict";n.d(t,{X:function(){return o}});var r=n(9818);const o=async e=>new Promise((t=>{const n=(0,r.subscribe)((()=>{e()&&(n(),t())}))}))},30429:function(e,t,n){"use strict";n.d(t,{G:function(){return h}});var r=n(82674),o=n.n(r),a=n(51806),i=n(55609),s=n(69307),c=n(65736),l=n(65235),u=n.n(l);const __=c.__,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,a.createElement)(i.PanelBody,{title:__("Width settings","jetpack")},(0,a.createElement)(f,o()({showLabel:!1},e)))}function f(e){let{align:t,width:n,onChange:r,showLabel:o=!0}=e;const[c,l]=(0,s.useState)("%");(0,s.useEffect)((()=>{void 0===n&&l("px")}),[n]);const h="left"===t||"right"===t;return(0,a.createElement)(i.BaseControl,{label:o&&__("Width","jetpack")},(0,a.createElement)("div",{className:u()("jetpack-block-width-controls",{"is-aligned":h})},!h&&(0,a.createElement)(i.ButtonGroup,{"aria-label":__("Percentage Width","jetpack")},m.map((e=>(0,a.createElement)(i.Button,{key:e,isSmall:!0,variant:e===n?"primary":void 0,onClick:()=>function(e){const t=n===e?void 0:e;l("%"),r(t)}(e)},e)))),(0,a.createElement)(i.__experimentalUnitControl,{isResetValueOnUnitChange:!0,max:"%"===c||n?.includes("%")?100:void 0,min:0,onChange:e=>r(e),onUnitChange:e=>l(e),size:"small",units:h?d:p,value:n})))}},97115:function(e,t,n){"use strict";n.d(t,{Vy:function(){return a},Wp:function(){return o},_5:function(){return i},tT:function(){return r}});const r="jetpack/media-source",o="is-playing",a="is-error",i="is-paused"},14688:function(e,t,n){"use strict";var r=n(9818),o=n(97115),a=n(66858);if(void 0!==r.createReduxStore){const e=(0,r.createReduxStore)(o.tT,a.Z);(0,r.register)(e)}else(0,r.registerStore)(o.tT,a.Z)},66858:function(e,t,n){"use strict";var r=n(97115);const o={sources:{},default:null},a={getDefaultMediaSource(e){let t=null;const n=Object.keys(e.sources);if(e.default?t=e.default:n?.length&&(t=e.sources[n[0]].id),t)return e.sources[t]},getMediaPlayerState(e,t){const n=t?e.sources?.[t]:a.getDefaultMediaSource(e);return n?.state},getMediaSourceCurrentTime(e,t){const n=t?e.sources?.[t]:a.getDefaultMediaSource(e);return n?.currentTime},getMediaSourceDuration(e,t){if(!t){const t=a.getDefaultMediaSource(e);return t?.duration}return e.sources?.[t]?.duration},getMediaSourceDomReference(e,t){const n=t?e.sources?.[t]:a.getDefaultMediaSource(e);if(!n)return;const r=n?.domId;return r?document.getElementById(r):void 0}},i={reducer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o,t=arguments.length>1?arguments[1]:void 0;const n=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 n=Object.assign({},e);return n.sources[t.id]&&delete n.sources[t.id],t.id===e.default&&(n.default=Object.keys(e.sources)?.[0]),n}case"SET_DEFAULT_MEDIA_SOURCE":return{...e,default:t.id};case"SET_MEDIA_PLAYER_STATE":return{...e,sources:{...e.sources,[n]:{...e.sources[n],state:t.state}}};case"TOGGLE_MEDIA_PLAYER_STATE":return{...e,sources:{...e.sources,[n]:{...e.sources[n],state:e.sources[n].state===r.Wp?r._5:r.Wp}}};case"SET_MEDIA_PLAYER_CURRENT_TIME":return{...e,sources:{...e.sources,[n]:{...e.sources[n],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:r.Wp}),toggleMediaSource:e=>({type:"TOGGLE_MEDIA_PLAYER_STATE",id:e}),pauseMediaSource:e=>({type:"SET_MEDIA_PLAYER_STATE",id:e,state:r._5}),errorMediaSource:e=>({type:"SET_MEDIA_PLAYER_STATE",id:e,state:r.Vy}),setMediaSourceCurrentTime:(e,t)=>({type:"SET_MEDIA_PLAYER_CURRENT_TIME",id:e,currentTime:t})},selectors:a};t.Z=i},6247:function(e,t,n){"use strict";n.r(t),n.d(t,{saveProduct:function(){return b},setApiState:function(){return f},setConnectUrl:function(){return m},setConnectedAccountDefaultCurrency:function(){return h},setProducts:function(){return d},setSiteSlug:function(){return g},setSubscriberCounts:function(){return v}});var r=n(25607),o=n(86989),a=n.n(o),i=n(65736),s=n(14436),c=n(51585),l=n(79162),u=n(23267),p=n(46529);const __=i.__,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}),f=e=>({type:"SET_API_STATE",apiState:e}),g=e=>({type:"SET_SITE_SLUG",siteSlug:e}),b=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.Bn,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:()=>{},m=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return async s=>{let{dispatch:h,registry:f}=s;const{title:g,price:b,currency:v}=e;if(!g||0===g.length)return(0,p.q)((0,c.l)("product requires a name",t),f),void o(!1);const k=parseFloat(b),y=(0,l.hj)(v);if(k<y)return(0,p.q)((0,i.sprintf)( // translators: %s: Price __("Minimum allowed price is %s.","jetpack"),(0,r.ZP)(y,v)),f),void o(!1);if(!(0,l.vs)(v,k))return(0,p.q)((0,c.l)("product requires a valid price",t),f),void o(!1);try{const r=await a()({path:"/wpcom/v2/memberships/product",method:"POST",data:e}),i={id:r.id,title:r.title,interval:r.interval,price:r.price,currency:r.currency},s=f.select(u.G4).getProducts();h(d(s.concat([i]))),n(i.id),m&&(0,p.w)((0,c.l)("successfully created product",t),f),o(!0)}catch(e){(0,p.q)((0,c.l)("there was an error when adding the product",t),f),o(!1)}}},v=e=>({type:"SET_SUBSCRIBER_COUNTS",subscriberCounts:e})},23267:function(e,t,n){"use strict";n.d(t,{G4:function(){return r},P:function(){return i},cH:function(){return a},lp:function(){return o}});const r="jetpack/membership-products",o=0,a=1,i=2},7652:function(e,t,n){"use strict";n.d(t,{h:function(){return l}});var r=n(9818),o=n(6247),a=n(23267),i=n(93100),s=n(20360),c=n(93245);const l=(0,r.createReduxStore)(a.G4,{actions:o,reducer:i.Z,resolvers:s,selectors:c,__experimentalUseThunks:!0});(0,r.register)(l)},93100:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});const r={products:[],apiState:n(23267).lp,connectUrl:null,siteSlug:"",connectedAccountDefaultCurrency:"",subscriberCounts:{socialFollowers:null,emailSubscribers:null,paidSubscribers:null}};function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_PRODUCTS":return{...e,products:t.products};case"SET_CONNECT_URL":return{...e,connectUrl:t.connectUrl};case"SET_API_STATE":return{...e,apiState:t.apiState};case"SET_SITE_SLUG":return{...e,siteSlug:t.siteSlug};case"SET_CONNECTED_ACCOUNT_DEFAULT_CURRENCY":return{...e,connectedAccountDefaultCurrency:t.connectedAccountDefaultCurrency};case"SET_SUBSCRIBER_COUNTS":return{...e,subscriberCounts:t.subscriberCounts}}return e}},20360:function(e,t,n){"use strict";n.r(t),n.d(t,{getNewsletterProducts:function(){return v},getProducts:function(){return k},getSubscriberCounts:function(){return y}});var r=n(86989),o=n.n(r),a=n(12238),i=n(96483),s=n(14436),c=n(51585),l=n(73905),u=n(74251),p=n(6247),d=n(23267),m=n(46529);const h="membership-products-resolver-getProducts",f="membership-products-resolver-getSubscriberCounts";let g=!1;const b=(e,t,n)=>{if(e)return;const r=n.getProductsNoResolver()[0]?.id;r&&t(r)},v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.Bn;return k(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{},!1)},k=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.Bn,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{},r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return async s=>{let{dispatch:f,registry:v,select:k}=s;if(await l.Z.blockExecution(h),g)return void b(t,n,k);const y=l.Z.acquire(h);try{const s=await(async()=>{const e=(0,i.getQueryArg)(window.location.href,"origin"),t=(0,i.addQueryArgs)("/wpcom/v2/memberships/status",{source:"https://wordpress.com"===e?"gutenberg-wpcom":"gutenberg",type:"all",is_editable:!0}),n=await o()({path:t,method:"GET"});if(!n&&"object"!=typeof n)throw new Error("Unexpected API response");const r=n?.errors&&Object.values(n.errors)?.[0]?.[0];if(r)throw new Error(r);return n})();((e,t,n)=>{const r=t.select(a.store).getCurrentPostId();n((0,p.setConnectUrl)((0,u.Z)(r,e.connect_url))),n((0,p.setSiteSlug)(e.site_slug)),n((0,p.setProducts)(e.products)),n((0,p.setConnectedAccountDefaultCurrency)(e.connected_account_default_currency)),n((0,p.setApiState)(e.connected_account_id?d.cH:d.P))})(s,v,f),(e=>!e.products.length&&e.connected_account_id)(s)&&await(async(e,t,n,r)=>{await n((0,p.saveProduct)({title:(0,c.l)("default new product title",e),currency:"USD",price:5,interval:"1 month"},e,t,(()=>{}),r))})(e,n,f,r),b(t,n,k),g=!0}catch(e){f((0,p.setConnectUrl)(null)),f((0,p.setApiState)(d.P)),(0,m.q)(e.message,v)}l.Z.release(y)}},y=()=>async e=>{let{dispatch:t,registry:n}=e;await l.Z.blockExecution(f);const r=l.Z.acquire(f);try{const e=await(async()=>{const e=await o()({path:"/wpcom/v2/subscribers/counts"});if(!e||"object"!=typeof e)throw new Error("Unexpected API response");const t=e?.errors&&Object.values(e.errors)?.[0]?.[0];if(t)throw new Error(t);return e})();t((0,p.setSubscriberCounts)({socialFollowers:e.counts.social_followers,emailSubscribers:e.counts.email_subscribers,paidSubscribers:e.counts.paid_subscribers}))}catch(e){t((0,p.setApiState)(d.P)),(0,m.q)(e.message,n)}l.Z.release(r)}},93245:function(e,t,n){"use strict";n.r(t),n.d(t,{getApiState:function(){return o},getConnectUrl:function(){return a},getConnectedAccountDefaultCurrency:function(){return i},getNewsletterProducts:function(){return u},getProduct:function(){return l},getProducts:function(){return s},getProductsNoResolver:function(){return c},getSiteSlug:function(){return p},getSubscriberCounts:function(){return f},isApiStateConnected:function(){return d},isApiStateLoading:function(){return m},isInvalidProduct:function(){return h}});var r=n(23267);const o=e=>e.apiState,a=e=>e.connectUrl,i=e=>e.connectedAccountDefaultCurrency,s=e=>e.products,c=e=>s(e),l=(e,t)=>s(e).find((e=>e.id===t)),u=e=>e.products.filter((e=>e.subscribe_as_site_subscriber)),p=e=>e.siteSlug,d=e=>e.apiState===r.cH,m=e=>e.apiState===r.lp,h=(e,t)=>!!t&&!l(e,t),f=e=>e.subscriberCounts},46529:function(e,t,n){"use strict";n.d(t,{q:function(){return o},w:function(){return a}});var r=n(53961);const o=(e,t)=>t.dispatch(r.store).createErrorNotice(e,{type:"snackbar"}),a=(e,t)=>t.dispatch(r.store).createSuccessNotice(e,{type:"snackbar"})},43317:function(e,t,n){"use strict";n.d(t,{M:function(){return r},X:function(){return o}});const r={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 o(e){return r[e]||{symbol:"$",grouping:",",decimal:".",precision:2}}},25607:function(e,t,n){"use strict";n.d(t,{ZP:function(){return a}});var r=n(43317),o=n(5375);function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(0,r.X)(t);if(!a||isNaN(e))return null;const{decimal:i,grouping:s,precision:c,symbol:l}={...a,...n},u=e<0?"-":"";let p=(0,o.Z)(Math.abs(e),c,i,s);return n.stripZeros&&(p=function(e,t){const n=new RegExp(`\\${t}0+$`);return e.replace(n,"")}(p,i)),`${u}${l}${p}`}},5375:function(e,t,n){"use strict";function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:",";const o=(e+"").replace(/[^0-9+\-Ee.]/g,""),a=isFinite(+o)?+o:0,i=isFinite(+t)?Math.abs(t):0,s=(i?function(e,t){const n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)}(a,i):""+Math.round(a)).split(".");return s[0].length>3&&(s[0]=s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,r)),(s[1]||"").length<i&&(s[1]=s[1]||"",s[1]+=new Array(i-s[1].length+1).join("0")),s.join(n)}n.d(t,{Z:function(){return r}})},7211:function(e,t,n){"use strict";var r,o=n(53184);function a(){this.intervals={},this.monitorInterval=null,this.windowInstance=null,this.onMessage=e=>{e.source===this.windowInstance&&this.emit("message",e.data)}}r=a.prototype,Object.assign(r,o.EventEmitter.prototype),r.emitChange=function(){this.emit("change")},r.off=r.removeListener,a.prototype.open=function(e,t,n){return t=t||Date.now(),this.windowInstance=window.open(e,t,n),this.startMonitoring(t,this.windowInstance),window.addEventListener("message",this.onMessage,!1),this},a.prototype.getScreenCenterSpecs=function(e,t){const n=void 0!==window.screenTop?window.screenTop:window.screenY,r=void 0!==window.screenLeft?window.screenLeft:window.screenX;return["width="+e,"height="+t,"top="+(n+window.innerHeight/2-t/2),"left="+(r+window.innerWidth/2-e/2)].join()},a.prototype.isOpen=function(e){let t=!1;try{t=this.intervals[e]&&this.intervals[e].closed}catch(e){}return!t},a.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))},a.prototype.startMonitoring=function(e,t){this.monitorInterval||(this.monitorInterval=setInterval(this.checkStatus.bind(this),100)),this.intervals[e]=t},t.Z=a},39229:function(e,t,n){"use strict";var r=n(7211);t.Z=function(e,t){var n,o=new r.Z;o.open(e,null,"toolbar=0,location=0,status=0,menubar=0,"+o.getScreenCenterSpecs(780,700)),o.once("close",(function(){var e={};n&&n.keyring_id&&(e.keyring_id=Number(n.keyring_id),e.id_token=n.id_token,e.user=n.user),t(e)})),o.on("message",(function(e){return n=e}))}},51128:function(e,t,n){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 n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},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=n(62942)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},62942:function(e,t,n){e.exports=function(e){function t(e){let n,o,a,i=null;function s(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];if(!s.enabled)return;const a=s,i=Number(new Date),c=i-(n||i);a.diff=c,a.prev=n,a.curr=i,n=i,r[0]=t.coerce(r[0]),"string"!=typeof r[0]&&r.unshift("%O");let l=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,((e,n)=>{if("%%"===e)return"%";l++;const o=t.formatters[n];if("function"==typeof o){const t=r[l];e=o.call(a,t),r.splice(l,1),l--}return e})),t.formatArgs.call(a,r);(a.log||t.log).apply(a,r)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==i?i:(o!==t.namespaces&&(o=t.namespaces,a=t.enabled(e)),a),set:e=>{i=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(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(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].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 n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(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((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},73139:function(e,t,n){"use strict";t.Z=function(e){var t=e.size,n=void 0===t?24:t,r=e.onClick,s=(e.icon,e.className),c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],0<=t.indexOf(n)||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,a),l=["gridicon","gridicons-notice-outline",s,!!function(e){return 0==e%18}(n)&&"needs-offset",!1,!1].filter(Boolean).join(" ");return o.default.createElement("svg",i({className:l,height:n,width:n,onClick:r},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.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 r,o=(r=n(99196))&&r.__esModule?r:{default:r},a=["size","onClick","icon","className"];function i(){return i=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)}},89933:function(e,t,n){"use strict";t.Z=function(e){var t=e.size,n=void 0===t?24:t,r=e.onClick,s=(e.icon,e.className),c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],0<=t.indexOf(n)||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,a),l=["gridicon","gridicons-star",s,!!function(e){return 0==e%18}(n)&&"needs-offset",!1,!1].filter(Boolean).join(" ");return o.default.createElement("svg",i({className:l,height:n,width:n,onClick:r},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.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 r,o=(r=n(99196))&&r.__esModule?r:{default:r},a=["size","onClick","icon","className"];function i(){return i=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)}},60300:function(e,t,n){"use strict";n.r(t),n.d(t,{decode:function(){return b},encode:function(){return v},toASCII:function(){return y},toUnicode:function(){return k},ucs2decode:function(){return m},ucs2encode:function(){return h}});const r=2147483647,o=36,a=/^xn--/,i=/[^\0-\x7F]/,s=/[\x2E\u3002\uFF0E\uFF61]/g,c={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},l=Math.floor,u=String.fromCharCode;function p(e){throw new RangeError(c[e])}function d(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]);const o=function(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}((e=e.replace(s,".")).split("."),t).join(".");return r+o}function m(e){const t=[];let n=0;const r=e.length;for(;n<r;){const o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){const r=e.charCodeAt(n++);56320==(64512&r)?t.push(((1023&o)<<10)+(1023&r)+65536):(t.push(o),n--)}else t.push(o)}return t}const h=e=>String.fromCodePoint(...e),f=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},g=function(e,t,n){let r=0;for(e=n?l(e/700):e>>1,e+=l(e/t);e>455;r+=o)e=l(e/35);return l(r+36*e/(e+38))},b=function(e){const t=[],n=e.length;let a=0,i=128,s=72,c=e.lastIndexOf("-");c<0&&(c=0);for(let n=0;n<c;++n)e.charCodeAt(n)>=128&&p("not-basic"),t.push(e.charCodeAt(n));for(let d=c>0?c+1:0;d<n;){const c=a;for(let t=1,i=o;;i+=o){d>=n&&p("invalid-input");const c=(u=e.charCodeAt(d++))>=48&&u<58?u-48+26:u>=65&&u<91?u-65:u>=97&&u<123?u-97:o;c>=o&&p("invalid-input"),c>l((r-a)/t)&&p("overflow"),a+=c*t;const m=i<=s?1:i>=s+26?26:i-s;if(c<m)break;const h=o-m;t>l(r/h)&&p("overflow"),t*=h}const m=t.length+1;s=g(a-c,m,0==c),l(a/m)>r-i&&p("overflow"),i+=l(a/m),a%=m,t.splice(a++,0,i)}var u;return String.fromCodePoint(...t)},v=function(e){const t=[],n=(e=m(e)).length;let a=128,i=0,s=72;for(const n of e)n<128&&t.push(u(n));const c=t.length;let d=c;for(c&&t.push("-");d<n;){let n=r;for(const t of e)t>=a&&t<n&&(n=t);const m=d+1;n-a>l((r-i)/m)&&p("overflow"),i+=(n-a)*m,a=n;for(const n of e)if(n<a&&++i>r&&p("overflow"),n===a){let e=i;for(let n=o;;n+=o){const r=n<=s?1:n>=s+26?26:n-s;if(e<r)break;const a=e-r,i=o-r;t.push(u(f(r+a%i,0))),e=l(a/i)}t.push(u(f(e,0))),s=g(i,m,d===c),i=0,++d}++i,++a}return t.join("")},k=function(e){return d(e,(function(e){return a.test(e)?b(e.slice(4).toLowerCase()):e}))},y=function(e){return d(e,(function(e){return i.test(e)?"xn--"+v(e):e}))},w={version:"2.1.0",ucs2:{decode:m,encode:h},decode:b,encode:v,toASCII:y,toUnicode:k};t.default=w},38697:function(e,t,n){"use strict";n.d(t,{pi:function(){return r}});var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.create;Object.create},92213:function(e,t){"use strict";function n(e,t){return Array(t+1).join(e)}var r=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function o(e){return c(e,r)}var a=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function i(e){return c(e,a)}var s=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function c(e,t){return t.indexOf(e.nodeName)>=0}function l(e,t){return e.getElementsByTagName&&t.some((function(t){return e.getElementsByTagName(t).length}))}var u={};function p(e){return e?e.replace(/(\n+\s*)+/g,"\n"):""}function d(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 m(e,t,n){for(var r=0;r<e.length;r++){var o=e[r];if(h(o,t,n))return o}}function h(e,t,n){var r=e.filter;if("string"==typeof r){if(r===t.nodeName.toLowerCase())return!0}else if(Array.isArray(r)){if(r.indexOf(t.nodeName.toLowerCase())>-1)return!0}else{if("function"!=typeof r)throw new TypeError("`filter` needs to be a string, array, or function");if(r.call(e,t,n))return!0}}function f(e){var t=e.nextSibling||e.parentNode;return e.parentNode.removeChild(e),t}function g(e,t,n){return e&&e.parentNode===t||n(t)?t.nextSibling||t.parentNode:t.firstChild||t.nextSibling||t.parentNode}u.paragraph={filter:"p",replacement:function(e){return"\n\n"+e+"\n\n"}},u.lineBreak={filter:"br",replacement:function(e,t,n){return n.br+"\n"}},u.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function(e,t,r){var o=Number(t.nodeName.charAt(1));return"setext"===r.headingStyle&&o<3?"\n\n"+e+"\n"+n(1===o?"=":"-",e.length)+"\n\n":"\n\n"+n("#",o)+" "+e+"\n\n"}},u.blockquote={filter:"blockquote",replacement:function(e){return"\n\n"+(e=(e=e.replace(/^\n+|\n+$/g,"")).replace(/^/gm,"> "))+"\n\n"}},u.list={filter:["ul","ol"],replacement:function(e,t){var n=t.parentNode;return"LI"===n.nodeName&&n.lastElementChild===t?"\n"+e:"\n\n"+e+"\n\n"}},u.listItem={filter:"li",replacement:function(e,t,n){e=e.replace(/^\n+/,"").replace(/\n+$/,"\n").replace(/\n/gm,"\n ");var r=n.bulletListMarker+" ",o=t.parentNode;if("OL"===o.nodeName){var a=o.getAttribute("start"),i=Array.prototype.indexOf.call(o.children,t);r=(a?Number(a)+i:i+1)+". "}return r+e+(t.nextSibling&&!/\n$/.test(e)?"\n":"")}},u.indentedCodeBlock={filter:function(e,t){return"indented"===t.codeBlockStyle&&"PRE"===e.nodeName&&e.firstChild&&"CODE"===e.firstChild.nodeName},replacement:function(e,t,n){return"\n\n "+t.firstChild.textContent.replace(/\n/g,"\n ")+"\n\n"}},u.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 o,a=((t.firstChild.getAttribute("class")||"").match(/language-(\S+)/)||[null,""])[1],i=t.firstChild.textContent,s=r.fence.charAt(0),c=3,l=new RegExp("^"+s+"{3,}","gm");o=l.exec(i);)o[0].length>=c&&(c=o[0].length+1);var u=n(s,c);return"\n\n"+u+a+"\n"+i.replace(/\n$/,"")+"\n"+u+"\n\n"}},u.horizontalRule={filter:"hr",replacement:function(e,t,n){return"\n\n"+n.hr+"\n\n"}},u.inlineLink={filter:function(e,t){return"inlined"===t.linkStyle&&"A"===e.nodeName&&e.getAttribute("href")},replacement:function(e,t){var n=t.getAttribute("href"),r=p(t.getAttribute("title"));return r&&(r=' "'+r+'"'),"["+e+"]("+n+r+")"}},u.referenceLink={filter:function(e,t){return"referenced"===t.linkStyle&&"A"===e.nodeName&&e.getAttribute("href")},replacement:function(e,t,n){var r,o,a=t.getAttribute("href"),i=p(t.getAttribute("title"));switch(i&&(i=' "'+i+'"'),n.linkReferenceStyle){case"collapsed":r="["+e+"][]",o="["+e+"]: "+a+i;break;case"shortcut":r="["+e+"]",o="["+e+"]: "+a+i;break;default:var s=this.references.length+1;r="["+e+"]["+s+"]",o="["+s+"]: "+a+i}return this.references.push(o),r},references:[],append:function(e){var t="";return this.references.length&&(t="\n\n"+this.references.join("\n")+"\n\n",this.references=[]),t}},u.emphasis={filter:["em","i"],replacement:function(e,t,n){return e.trim()?n.emDelimiter+e+n.emDelimiter:""}},u.strong={filter:["strong","b"],replacement:function(e,t,n){return e.trim()?n.strongDelimiter+e+n.strongDelimiter:""}},u.code={filter:function(e){var t=e.previousSibling||e.nextSibling,n="PRE"===e.parentNode.nodeName&&!t;return"CODE"===e.nodeName&&!n},replacement:function(e){if(!e)return"";e=e.replace(/\r?\n|\r/g," ");for(var t=/^`|^ .*?[^ ].* $|`$/.test(e)?" ":"",n="`",r=e.match(/`+/gm)||[];-1!==r.indexOf(n);)n+="`";return n+t+e+t+n}},u.image={filter:"img",replacement:function(e,t){var n=p(t.getAttribute("alt")),r=t.getAttribute("src")||"",o=p(t.getAttribute("title"));return r?"+")":""}},d.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=m(this.array,e,this.options))||(t=m(this._keep,e,this.options))||(t=m(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 b="undefined"!=typeof window?window:{};var v,k,y=function(){var e=b.DOMParser,t=!1;try{(new e).parseFromString("","text/html")&&(t=!0)}catch(e){}return t}()?b.DOMParser:(v=function(){},function(){var e=!1;try{document.implementation.createHTMLDocument("").open()}catch(t){window.ActiveXObject&&(e=!0)}return e}()?v.prototype.parseFromString=function(e){var t=new window.ActiveXObject("htmlfile");return t.designMode="on",t.open(),t.write(e),t.close(),t}:v.prototype.parseFromString=function(e){var t=document.implementation.createHTMLDocument("");return t.open(),t.write(e),t.close(),t},v);function w(e,t){var n;"string"==typeof e?n=(k=k||new y).parseFromString('<x-turndown id="turndown-root">'+e+"</x-turndown>","text/html").getElementById("turndown-root"):n=e.cloneNode(!0);return function(e){var t=e.element,n=e.isBlock,r=e.isVoid,o=e.isPre||function(e){return"PRE"===e.nodeName};if(t.firstChild&&!o(t)){for(var a=null,i=!1,s=null,c=g(s,t,o);c!==t;){if(3===c.nodeType||4===c.nodeType){var l=c.data.replace(/[ \r\n\t]+/g," ");if(a&&!/ $/.test(a.data)||i||" "!==l[0]||(l=l.substr(1)),!l){c=f(c);continue}c.data=l,a=c}else{if(1!==c.nodeType){c=f(c);continue}n(c)||"BR"===c.nodeName?(a&&(a.data=a.data.replace(/ $/,"")),a=null,i=!1):r(c)||o(c)?(a=null,i=!0):a&&(i=!1)}var u=g(s,c,o);s=c,c=u}a&&(a.data=a.data.replace(/ $/,""),a.data||f(a))}}({element:n,isBlock:o,isVoid:i,isPre:t.preformattedCode?E:null}),n}function E(e){return"PRE"===e.nodeName||"CODE"===e.nodeName}function _(e,t){return e.isBlock=o(e),e.isCode="CODE"===e.nodeName||e.parentNode.isCode,e.isBlank=function(e){return!i(e)&&!function(e){return c(e,s)}(e)&&/^\s*$/i.test(e.textContent)&&!function(e){return l(e,a)}(e)&&!function(e){return l(e,s)}(e)}(e),e.flankingWhitespace=function(e,t){if(e.isBlock||t.preformattedCode&&e.isCode)return{leading:"",trailing:""};var n=(r=e.textContent,o=r.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/),{leading:o[1],leadingAscii:o[2],leadingNonAscii:o[3],trailing:o[4],trailingNonAscii:o[5],trailingAscii:o[6]});var r,o;n.leadingAscii&&C("left",e,t)&&(n.leading=n.leadingNonAscii);n.trailingAscii&&C("right",e,t)&&(n.trailing=n.trailingNonAscii);return{leading:n.leading,trailing:n.trailing}}(e,t),e}function C(e,t,n){var r,a,i;return"left"===e?(r=t.previousSibling,a=/ $/):(r=t.nextSibling,a=/^ /),r&&(3===r.nodeType?i=a.test(r.nodeValue):n.preformattedCode&&"CODE"===r.nodeName?i=!1:1!==r.nodeType||o(r)||(i=a.test(r.textContent))),i}var S=Array.prototype.reduce,j=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function x(e){if(!(this instanceof x))return new x(e);var t={rules:u,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 n=arguments[t];for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},t,e),this.rules=new d(this.options)}function L(e){var t=this;return S.call(e.childNodes,(function(e,n){var r="";return 3===(n=new _(n,t.options)).nodeType?r=n.isCode?n.nodeValue:t.escape(n.nodeValue):1===n.nodeType&&(r=A.call(t,n)),T(e,r)}),"")}function P(e){var t=this;return this.rules.forEach((function(n){"function"==typeof n.append&&(e=T(e,n.append(t.options)))})),e.replace(/^[\t\r\n]+/,"").replace(/[\t\r\n\s]+$/,"")}function A(e){var t=this.rules.forNode(e),n=L.call(this,e),r=e.flankingWhitespace;return(r.leading||r.trailing)&&(n=n.trim()),r.leading+t.replacement(n,e,this.options)+r.trailing}function T(e,t){var n=function(e){for(var t=e.length;t>0&&"\n"===e[t-1];)t--;return e.substring(0,t)}(e),r=t.replace(/^\n*/,""),o=Math.max(e.length-n.length,t.length-r.length);return n+"\n\n".substring(0,o)+r}x.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=L.call(this,new w(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)}},t.Z=x},23427:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(75908),o=n(9106),a=n(85016),i=n(11662);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}var u=function(){function e(t){s(this,e),this._file=t,this.size=t.size}return l(e,[{key:"slice",value:function(e,t){if((0,a.Z)())return(0,i.Z)(this._file.slice(e,t));var n=this._file.slice(e,t);return Promise.resolve({value:n})}},{key:"close",value:function(){}}]),e}(),p=function(){function e(t,n){s(this,e),this._chunkSize=n,this._buffer=void 0,this._bufferOffset=0,this._reader=t,this._done=!1}return l(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 n=this,r=t<=this._bufferOffset+d(this._buffer);if(this._done||r){var o=this._getDataFromBuffer(e,t),a=null==o&&this._done;return Promise.resolve({value:o,done:a})}return this._reader.read().then((function(r){var o=r.value;return r.done?n._done=!0:void 0===n._buffer?n._buffer=o:n._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 n=new e.constructor(e.length+t.length);return n.set(e),n.set(t,e.length),n}throw new Error("Unknown data type")}(n._buffer,o),n._readUntilEnoughDataOrDone(e,t)}))}},{key:"_getDataFromBuffer",value:function(e,t){e>this._bufferOffset&&(this._buffer=this._buffer.slice(e-this._bufferOffset),this._bufferOffset=e);var n=0===d(this._buffer);return this._done&&n?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(){s(this,e)}return l(e,[{key:"openFile",value:function(e,t){return(0,r.Z)()&&e&&void 0!==e.uri?(0,o.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:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(75908);function o(e,t){return(0,r.Z)()?Promise.resolve(function(e,t){var n=e.exif?function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++){t=(t<<5)-t+e.charCodeAt(n),t&=t}return t}(JSON.stringify(e.exif)):"noexif";return["tus-rn",e.name||"noname",e.size||"nosize",n,t.endpoint].join("/")}(e,t)):Promise.resolve(["tus-br",e.name,e.type,e.size,e.lastModified,t.endpoint].join("-"))}},56940:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}n.d(t,{Z:function(){return i}});var i=function(){function e(){r(this,e)}return a(e,[{key:"createRequest",value:function(e,t){return new s(e,t)}},{key:"getName",value:function(){return"XHRHttpStack"}}]),e}(),s=function(){function e(t,n){r(this,e),this._xhr=new XMLHttpRequest,this._xhr.open(t,n,!0),this._method=t,this._url=n,this._headers={}}return a(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(n,r){e._xhr.onload=function(){n(new c(e._xhr))},e._xhr.onerror=function(e){r(e)},e._xhr.send(t)}))}},{key:"abort",value:function(){return this._xhr.abort(),Promise.resolve()}},{key:"getUnderlyingObject",value:function(){return this._xhr}}]),e}(),c=function(){function e(t){r(this,e),this._xhr=t}return a(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:function(e,t,n){"use strict";n.d(t,{gq:function(){return v}});var r=n(63620),o=n(85799),a=n(15866),i=n(56940),s=n(23427),c=n(41264);function l(e){return l="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},l(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}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,n=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 r=m(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return function(e,t){if(t&&("object"===l(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 n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b=f({},r.Z.defaultOptions,{httpStack:new i.Z,fileReader:new s.Z,urlStorage:a.H?new a.n:new o.Z,fingerprint:c.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)}(i,e);var t,n,o,a=d(i);function i(){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,i),t=f({},b,{},t),a.call(this,e,t)}return t=i,o=[{key:"terminate",value:function(e,t,n){return t=f({},b,{},t),r.Z.terminate(e,t,n)}}],(n=null)&&u(t.prototype,n),o&&u(t,o),i}(r.Z),k=window,y=k.XMLHttpRequest,w=k.Blob;y&&w&&w.prototype.slice},85016:function(e,t){"use strict";t.Z=function(){return"undefined"!=typeof window&&(void 0!==window.PhoneGap||void 0!==window.Cordova||void 0!==window.cordova)}},75908:function(e,t){"use strict";t.Z=function(){return"undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase()}},11662:function(e,t,n){"use strict";function r(e){return new Promise((function(t,n){var r=new FileReader;r.onload=function(){var e=new Uint8Array(r.result);t({value:e})},r.onerror=function(e){n(e)},r.readAsArrayBuffer(e)}))}n.d(t,{Z:function(){return r}})},9106:function(e,t,n){"use strict";function r(e){return new Promise((function(t,n){var r=new XMLHttpRequest;r.responseType="blob",r.onload=function(){var e=r.response;t(e)},r.onerror=function(e){n(e)},r.open("GET",e),r.send()}))}n.d(t,{Z:function(){return r}})},15866:function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n.d(t,{H:function(){return i},n:function(){return s}});var o=!1;try{o="localStorage"in window;var a="tusSupport";localStorage.setItem(a,localStorage.getItem(a))}catch(e){if(e.code!==e.SECURITY_ERR&&e.code!==e.QUOTA_EXCEEDED_ERR)throw e;o=!1}var i=o,s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,o;return t=e,n=[{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 n=Math.round(1e12*Math.random()),r="tus::".concat(e,"::").concat(n);return localStorage.setItem(r,JSON.stringify(t)),Promise.resolve(r)}},{key:"_findEntries",value:function(e){for(var t=[],n=0;n<localStorage.length;n++){var r=localStorage.key(n);if(0===r.indexOf(e))try{var o=JSON.parse(localStorage.getItem(r));o.urlStorageKey=r,t.push(o)}catch(e){}}return t}}],n&&r(t.prototype,n),o&&r(t,o),e}()},56971:function(e,t){"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 r(e){return function(){var t,r=c(e);if(i()){var o=c(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,t)}}function o(e){var t="function"==typeof Map?new Map:void 0;return o=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;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,r)}function r(){return a(e,arguments,c(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),s(r,e)},o(e)}function a(e,t,n){return a=i()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&s(o,n.prototype),o},a.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 s(e,t){return s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},s(e,t)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}var l=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&&s(e,t)}(n,e);var t=r(n);function n(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=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,n),(r=t.call(this,e)).originalRequest=a,r.originalResponse=i,r.causingError=o,null!=o&&(e+=", caused by ".concat(o.toString())),null!=a){var s=a.getHeader("X-Request-ID")||"n/a",c=a.getMethod(),l=a.getURL(),u=i?i.getStatus():"n/a",p=i?i.getBody()||"":"n/a";e+=", originated from request (method: ".concat(c,", url: ").concat(l,", response code: ").concat(u,", response text: ").concat(p,", request id: ").concat(s,")")}return r.message=e,r}return n}(o(Error));t.Z=l},51336:function(e,t,n){"use strict";n.d(t,{c:function(){return o}});var r=!1;function o(e){r&&console.log(e)}},85799:function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n.d(t,{Z:function(){return o}});var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,o;return t=e,(n=[{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)}}])&&r(t.prototype,n),o&&r(t,o),e}()},63620:function(e,t,n){"use strict";var r=n(84097),o=n(41294),a=n.n(o),i=n(56971),s=n(51336),c=n(98184);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}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,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"resume"in n&&console.log("tus: The `resume` option has been removed in tus-js-client v2. Please use the URL storage API instead."),this.options=n,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,n,r;return t=e,n=[{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 n=this.options.retryDelays;null==n||"[object Array]"===Object.prototype.toString.call(n)?(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(n){return null==n?(0,s.c)("No fingerprint was calculated meaning that the upload cannot be stored in the URL storage."):(0,s.c)("Calculated fingerprint: ".concat(n)),e._fingerprint=n,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,n=this._size=this._source.size,r=0;this._parallelUploads=[];var o=null!=this._parallelUploadUrls?this._parallelUploadUrls.length:this.options.parallelUploads,a=function(e,t,n){for(var r=Math.floor(e/t),o=[],a=0;a<t;a++)o.push({start:r*a,end:r*(a+1)});return o[t-1].end=e,n&&o.forEach((function(e,t){e.uploadUrl=n[t]||null})),o}(this._source.size,o,this._parallelUploadUrls);this._parallelUploadUrls=new Array(a.length);var i,c=a.map((function(o,i){var s=0;return t._source.slice(o.start,o.end).then((function(c){var l=c.value;return new Promise((function(c,p){var d=u({},t.options,{uploadUrl:o.uploadUrl||null,storeFingerprintForResuming:!1,removeFingerprintOnSuccess:!1,parallelUploads:1,metadata:{},headers:u({},t.options.headers,{"Upload-Concat":"partial"}),onSuccess:c,onError:p,onProgress:function(e){r=r-s+e,s=e,t._emitProgress(r,n)},_onUploadUrlAvailable:function(){t._parallelUploadUrls[i]=m.url,t._parallelUploadUrls.filter((function(e){return!!e})).length===a.length&&t._saveUploadInUrlStorage()}}),m=new e(l,d);m.start(),t._parallelUploads.push(m)}))}))}));Promise.all(c).then((function(){(i=t._openRequest("POST",t.options.endpoint)).setHeader("Upload-Concat","final;".concat(t._parallelUploadUrls.join(" ")));var e=f(t.options.metadata);return""!==e&&i.setHeader("Upload-Metadata",e),t._sendRequest(i,null)})).then((function(e){if(g(e.getStatus(),200)){var n=e.getHeader("Location");null!=n?(t.url=y(t.options.endpoint,n),(0,s.c)("Created upload at ".concat(t.url)),t._emitSuccess()):t._emitHttpError(i,e,"tus: invalid or missing Location header")}else t._emitHttpError(i,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,s.c)("Resuming upload from previous URL: ".concat(this.url)),void this._resumeUpload()):null!=this.options.uploadUrl?((0,s.c)("Resuming upload from provided URL: ".concat(this.options.url)),this.url=this.options.uploadUrl,void this._resumeUpload()):((0,s.c)("Creating a new upload"),void this._createUpload())}},{key:"abort",value:function(t){var n=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 n._removeFromUrlStorage()})):Promise.resolve()}},{key:"_emitHttpError",value:function(e,t,n,r){this._emitError(new i.Z(n,r,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 n=this.options.retryDelays[this._retryAttempt++];return this._offsetBeforeRetry=this._offset,void(this._retryTimeout=setTimeout((function(){t.start()}),n))}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,n){"function"==typeof this.options.onChunkComplete&&this.options.onChunkComplete(e,t,n)}},{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 n,r=f(this.options.metadata);""!==r&&t.setHeader("Upload-Metadata",r),this.options.uploadDataDuringCreation&&!this.options.uploadLengthDeferred?(this._offset=0,n=this._addChunkToRequest(t)):n=this._sendRequest(t,null),n.then((function(n){if(g(n.getStatus(),200)){var r=n.getHeader("Location");if(null!=r){if(e.url=y(e.options.endpoint,r),(0,s.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,n):(e._offset=0,e._performUpload())}else e._emitHttpError(t,n,"tus: invalid or missing Location header")}else e._emitHttpError(t,n,"tus: unexpected response while creating upload")})).catch((function(n){e._emitHttpError(t,null,"tus: failed to create upload",n)}))}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(n){var r=n.getStatus();if(!g(r,200))return g(r,400)&&e._removeFromUrlStorage(),423===r?void e._emitHttpError(t,n,"tus: upload is currently locked; retry later"):e.options.endpoint?(e.url=null,void e._createUpload()):void e._emitHttpError(t,n,"tus: unable to resume upload (new upload cannot be created without an endpoint)");var o=parseInt(n.getHeader("Upload-Offset"),10);if(isNaN(o))e._emitHttpError(t,n,"tus: invalid or missing offset value");else{var a=parseInt(n.getHeader("Upload-Length"),10);if(!isNaN(a)||e.options.uploadLengthDeferred){if("function"==typeof e.options._onUploadUrlAvailable&&e.options._onUploadUrlAvailable(),o===a)return e._emitProgress(a,a),void e._emitSuccess();e._offset=o,e._performUpload()}else e._emitHttpError(t,n,"tus: invalid or missing length value")}})).catch((function(n){e._emitHttpError(t,null,"tus: failed to resume upload",n)}))}},{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(n){g(n.getStatus(),200)?t._handleUploadResponse(e,n):t._emitHttpError(e,n,"tus: unexpected response while uploading chunk")})).catch((function(n){t._aborted||t._emitHttpError(e,null,"tus: failed to upload chunk at offset ".concat(t._offset),n)})))}},{key:"_addChunkToRequest",value:function(e){var t=this,n=this._offset,r=this._offset+this.options.chunkSize;return e.setProgressHandler((function(e){t._emitProgress(n+e,t._size)})),e.setHeader("Content-Type","application/offset+octet-stream"),(r===1/0||r>this._size)&&!this.options.uploadLengthDeferred&&(r=this._size),this._source.slice(n,r).then((function(n){var r=n.value,o=n.done;return t.options.uploadLengthDeferred&&o&&(t._size=t._offset+(r&&r.size?r.size:0),e.setHeader("Upload-Length",t._size)),null===r?t._sendRequest(e):(t._emitProgress(t._offset,t._size),t._sendRequest(e,r))}))}},{key:"_handleUploadResponse",value:function(e,t){var n=parseInt(t.getHeader("Upload-Offset"),10);if(isNaN(n))this._emitHttpError(e,t,"tus: invalid or missing offset value");else{if(this._emitProgress(n,this._size),this._emitChunkComplete(n-this._offset,n,this._size),this._offset=n,n==this._size)return this._emitSuccess(),void this._source.close();this._performUpload()}}},{key:"_openRequest",value:function(e,t){var n=b(e,t,this.options);return this._req=n,n}},{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)}}],r=[{key:"terminate",value:function(t,n){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===n&&(n={});var r=b("DELETE",t,n);return v(r,null,n).then((function(e){if(204!==e.getStatus())throw new i.Z("tus: unexpected response while terminating upload",null,r,e)})).catch((function(o){if(o instanceof i.Z||(o=new i.Z("tus: failed to terminate upload",o,r,null)),!k(o,0,n))throw o;var a=n.retryDelays[0],s=n.retryDelays.slice(1),c=u({},n,{retryDelays:s});return new Promise((function(e){return setTimeout(e,a)})).then((function(){return e.terminate(t,c)}))}))}}],n&&d(t.prototype,n),r&&d(t,r),e}();function f(e){var t=[];for(var n in e)t.push("".concat(n," ").concat(r.Base64.encode(e[n])));return t.join(",")}function g(e,t){return e>=t&&e<t+100}function b(e,t,n){var r=n.httpStack.createRequest(e,t);r.setHeader("Tus-Resumable","1.0.0");var o=n.headers||{};for(var a in o)r.setHeader(a,o[a]);if(n.addRequestId){var i=(0,c.Z)();r.setHeader("X-Request-ID",i)}return r}function v(e,t,n){return("function"==typeof n.onBeforeRequest?Promise.resolve(n.onBeforeRequest(e)):Promise.resolve()).then((function(){return e.send(t).then((function(t){return("function"==typeof n.onAfterResponse?Promise.resolve(n.onAfterResponse(e,t)):Promise.resolve()).then((function(){return t}))}))}))}function k(e,t,n){if(null==n.retryDelays||t>=n.retryDelays.length||null==e.originalRequest)return!1;if(n&&"function"==typeof n.onShouldRetry)return n.onShouldRetry(e,t,n);var r,o=e.originalResponse?e.originalResponse.getStatus():0;return(!g(o,400)||409===o||423===o)&&(r=!0,"undefined"!=typeof window&&"navigator"in window&&!1===window.navigator.onLine&&(r=!1),r)}function y(e,t){return new(a())(t,e).toString()}h.defaultOptions=m,t.Z=h},98184:function(e,t,n){"use strict";function r(){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)}))}n.d(t,{Z:function(){return r}})},19590:function(e){e.exports=/[\0-\x1F\x7F-\x9F]/},20994:function(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:function(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:function(e){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},84353:function(e,t,n){"use strict";t.Any=n(44957),t.Cc=n(19590),t.Cf=n(20994),t.P=n(95162),t.Z=n(59939)},44957:function(e){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},83078:function(e,t,n){"use strict";function r(e){return e.charAt(0).toUpperCase()+e.substr(1)}n.d(t,{l:function(){return r}})},48936:function(e,t,n){"use strict";n.d(t,{L:function(){return r}});function r(e){return e.toUpperCase()}},41294:function(e,t,n){"use strict";var r=n(82298),o=n(40142),a=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,i=/[\n\r\t]/g,s=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=/:\d+$/,l=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,u=/^[a-zA-Z]:/;function p(e){return(e||"").toString().replace(a,"")}var d=[["#","hash"],["?","query"],function(e,t){return f(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,n=("undefined"!=typeof window||"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).location||{},r={},o=typeof(e=e||n);if("blob:"===e.protocol)r=new b(unescape(e.pathname),{});else if("string"===o)for(t in r=new b(e,{}),m)delete r[t];else if("object"===o){for(t in e)t in m||(r[t]=e[t]);void 0===r.slashes&&(r.slashes=s.test(e.href))}return r}function f(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function g(e,t){e=(e=p(e)).replace(i,""),t=t||{};var n,r=l.exec(e),o=r[1]?r[1].toLowerCase():"",a=!!r[2],s=!!r[3],c=0;return a?s?(n=r[2]+r[3]+r[4],c=r[2].length+r[3].length):(n=r[2]+r[4],c=r[2].length):s?(n=r[3]+r[4],c=r[3].length):n=r[4],"file:"===o?c>=2&&(n=n.slice(2)):f(o)?n=r[4]:o?a&&(n=n.slice(2)):c>=2&&f(t.protocol)&&(n=r[4]),{protocol:o,slashes:a||f(o),slashesCount:c,rest:n}}function b(e,t,n){if(e=(e=p(e)).replace(i,""),!(this instanceof b))return new b(e,t,n);var a,s,c,l,m,v,k=d.slice(),y=typeof t,w=this,E=0;for("object"!==y&&"string"!==y&&(n=t,t=null),n&&"function"!=typeof n&&(n=o.parse),a=!(s=g(e||"",t=h(t))).protocol&&!s.slashes,w.slashes=s.slashes||a&&t.slashes,w.protocol=s.protocol||t.protocol||"",e=s.rest,("file:"===s.protocol&&(2!==s.slashesCount||u.test(e))||!s.slashes&&(s.protocol||s.slashesCount<2||!f(w.protocol)))&&(k[3]=[/(.*)/,"pathname"]);E<k.length;E++)"function"!=typeof(l=k[E])?(c=l[0],v=l[1],c!=c?w[v]=e:"string"==typeof c?~(m="@"===c?e.lastIndexOf(c):e.indexOf(c))&&("number"==typeof l[2]?(w[v]=e.slice(0,m),e=e.slice(m+l[2])):(w[v]=e.slice(m),e=e.slice(0,m))):(m=c.exec(e))&&(w[v]=m[1],e=e.slice(0,m.index)),w[v]=w[v]||a&&l[3]&&t[v]||"",l[4]&&(w[v]=w[v].toLowerCase())):e=l(e,w);n&&(w.query=n(w.query)),a&&t.slashes&&"/"!==w.pathname.charAt(0)&&(""!==w.pathname||""!==t.pathname)&&(w.pathname=function(e,t){if(""===e)return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=n.length,o=n[r-1],a=!1,i=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),i++):i&&(0===r&&(a=!0),n.splice(r,1),i--);return a&&n.unshift(""),"."!==o&&".."!==o||n.push(""),n.join("/")}(w.pathname,t.pathname)),"/"!==w.pathname.charAt(0)&&f(w.protocol)&&(w.pathname="/"+w.pathname),r(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&&f(w.protocol)&&w.host?w.protocol+"//"+w.host:"null",w.href=w.toString()}b.prototype={set:function(e,t,n){var a=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(n||o.parse)(t)),a[e]=t;break;case"port":a[e]=t,r(t,a.protocol)?t&&(a.host=a.hostname+":"+t):(a.host=a.hostname,a[e]="");break;case"hostname":a[e]=t,a.port&&(t+=":"+a.port),a.host=t;break;case"host":a[e]=t,c.test(t)?(t=t.split(":"),a.port=t.pop(),a.hostname=t.join(":")):(a.hostname=t,a.port="");break;case"protocol":a.protocol=t.toLowerCase(),a.slashes=!n;break;case"pathname":case"hash":if(t){var i="pathname"===e?"/":"#";a[e]=t.charAt(0)!==i?i+t:t}else a[e]=t;break;case"username":case"password":a[e]=encodeURIComponent(t);break;case"auth":var s=t.indexOf(":");~s?(a.username=t.slice(0,s),a.username=encodeURIComponent(decodeURIComponent(a.username)),a.password=t.slice(s+1),a.password=encodeURIComponent(decodeURIComponent(a.password))):a.username=encodeURIComponent(decodeURIComponent(t))}for(var l=0;l<d.length;l++){var u=d[l];u[4]&&(a[u[1]]=a[u[1]].toLowerCase())}return a.auth=a.password?a.username+":"+a.password:a.username,a.origin="file:"!==a.protocol&&f(a.protocol)&&a.host?a.protocol+"//"+a.host:"null",a.href=a.toString(),a},toString:function(e){e&&"function"==typeof e||(e=o.stringify);var t,n=this,r=n.host,a=n.protocol;a&&":"!==a.charAt(a.length-1)&&(a+=":");var i=a+(n.protocol&&n.slashes||f(n.protocol)?"//":"");return n.username?(i+=n.username,n.password&&(i+=":"+n.password),i+="@"):n.password?(i+=":"+n.password,i+="@"):"file:"!==n.protocol&&f(n.protocol)&&!r&&"/"!==n.pathname&&(i+="@"),(":"===r[r.length-1]||c.test(n.hostname)&&!n.port)&&(r+=":"),i+=r+n.pathname,(t="object"==typeof n.query?e(n.query):n.query)&&(i+="?"!==t.charAt(0)?"?"+t:t),n.hash&&(i+=n.hash),i}},b.extractProtocol=g,b.location=h,b.trimLeft=p,b.qs=o,e.exports=b},8964:function(e,t,n){"use strict";e.exports=n.p+"images/eventbrite-in-page-example-c351ec80e4dd5d39433d.png"},96406:function(e,t,n){"use strict";e.exports=n.p+"images/map-preview-97bda80ebb6981457630.jpg"},80469:function(e,t,n){"use strict";e.exports=n.p+"images/map-theme_black_and_white-b6ad81a7dd09d09fb34d.jpg"},7247:function(e,t,n){"use strict";e.exports=n.p+"images/map-theme_black_and_white_mapkit-50e9383d59f6ad6a44ed.jpg"},13925:function(e,t,n){"use strict";e.exports=n.p+"images/map-theme_default-b53ccdf170e5ac873ff0.jpg"},24873:function(e,t,n){"use strict";e.exports=n.p+"images/map-theme_default_mapkit-0ed10cab18f62edff74e.jpg"},25685:function(e,t,n){"use strict";e.exports=n.p+"images/map-theme_satellite-cc50c608e244f90d18dc.jpg"},81667:function(e,t,n){"use strict";e.exports=n.p+"images/map-theme_satellite_mapkit-6062205f7c3804fae12c.jpg"},15387:function(e,t,n){"use strict";e.exports=n.p+"images/map-theme_terrain-ac291441b3461820747d.jpg"},23879:function(e,t,n){"use strict";e.exports=n.p+"images/paypal-button-2x-62cd99bcc3acbd1ff504.png"},22323:function(e,t,n){"use strict";e.exports=n.p+"images/paypal-button-a51d6c3207b0a904edb7.png"},60206:function(e,t,n){"use strict";e.exports=n.p+"images/simple-payments_example-1-0273eeccd8d120df4984.jpg"},65784:function(e,t,n){"use strict";e.exports=n.p+"images/slideshow_example-1-07a3f164621235df0419.jpg"},6425:function(e,t,n){"use strict";e.exports=n.p+"images/slideshow_example-2-2ee401e47066229bdac5.jpg"},85983:function(e,t,n){"use strict";e.exports=n.p+"images/slideshow_example-3-0682afca66c485f17ff6.jpg"},96606:function(e,t,n){"use strict";e.exports=n.p+"images/tiled-gallery_example-1-d2817eb0e669267ab3eb.jpg"},85472:function(e,t,n){"use strict";e.exports=n.p+"images/tiled-gallery_example-2-7d8f0cf8e262f0112691.jpg"},79009:function(e,t,n){"use strict";e.exports=n.p+"images/tiled-gallery_example-3-07a3f164621235df0419.jpg"},10742:function(e,t,n){"use strict";e.exports=n.p+"images/tiled-gallery_example-4-2ee401e47066229bdac5.jpg"},52642:function(e,t,n){"use strict";e.exports=n.p+"images/tiled-gallery_example-5-a1935fd9cf1181168d90.jpg"},41145:function(e,t,n){"use strict";e.exports=n.p+"images/tiled-gallery_example-6-9f9d39c6af0fb4b0d99c.jpg"},41194:function(e,t,n){"use strict";e.exports=n.p+"images/videopress-block-example-image-da9ef73787adca8896f2.jpg"},80405:function(e,t,n){"use strict";e.exports=n.p+"images/example_160x600-ccbc594f54431dafa70d.png"},72473:function(e,t,n){"use strict";e.exports=n.p+"images/example_300x250-5b93e8174f02d48c40b7.png"},38511:function(e,t,n){"use strict";e.exports=n.p+"images/example_320x50-7110edf045141630a222.png"},52203:function(e,t,n){"use strict";e.exports=n.p+"images/example_728x90-d9de384932330b92e1c3.png"},92787:function(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:function(e){"use strict";e.exports=window.React},91850:function(e){"use strict";e.exports=window.ReactDOM},92819:function(e){"use strict";e.exports=window.lodash},76292:function(e){"use strict";e.exports=window.moment},86989:function(e){"use strict";e.exports=window.wp.apiFetch},11313:function(e){"use strict";e.exports=window.wp.blob},52175:function(e){"use strict";e.exports=window.wp.blockEditor},65391:function(e){"use strict";e.exports=window.wp.blockSerializationDefaultParser},4981:function(e){"use strict";e.exports=window.wp.blocks},55609:function(e){"use strict";e.exports=window.wp.components},94333:function(e){"use strict";e.exports=window.wp.compose},37798:function(e){"use strict";e.exports=window.wp.coreData},9818:function(e){"use strict";e.exports=window.wp.data},69771:function(e){"use strict";e.exports=window.wp.date},47701:function(e){"use strict";e.exports=window.wp.domReady},12238:function(e){"use strict";e.exports=window.wp.editor},69307:function(e){"use strict";e.exports=window.wp.element},81975:function(e){"use strict";e.exports=window.wp.escapeHtml},92694:function(e){"use strict";e.exports=window.wp.hooks},65736:function(e){"use strict";e.exports=window.wp.i18n},39630:function(e){"use strict";e.exports=window.wp.keycodes},53961:function(e){"use strict";e.exports=window.wp.notices},98817:function(e){"use strict";e.exports=window.wp.plugins},70444:function(e){"use strict";e.exports=window.wp.primitives},29512:function(e){"use strict";e.exports=window.wp.tokenList},96483:function(e){"use strict";e.exports=window.wp.url},90162:function(e){"use strict";e.exports=window.wp.viewport},6551:function(e){"use strict";e.exports=window.wp.widgets},82674:function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}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:function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},80550:function(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:function(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":""}')},22023:function(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"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":[]}]}}}')},45388:function(e){"use strict";e.exports=JSON.parse('[{"id":"mapbox-gl-js","file":"node_modules/mapbox-gl/dist/mapbox-gl.js","version":"1.13.0"},{"id":"mapbox-gl-css","file":"node_modules/mapbox-gl/dist/mapbox-gl.css","version":"1.13.0"}]')},1949:function(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","gathering-tweetstorms","gif","google-calendar","image-compare","instagram-gallery","likes","mailchimp","map","markdown","opentable","payments","pinterest","podcast-player","premium-content","publicize","rating-star","recurring-payments","related-posts","repeat-visitor","send-a-message","whatsapp-button","seo","sharing","shortlinks","simple-payments","slideshow","social-previews","story","subscriptions","tiled-gallery","tock","videopress","wordads","payments-intro","post-publish-qr-post-panel","payment-buttons","site-editor-snackbars","videopress/video","ai-assistant-support","ai-assistant-form-support","paywall","ai-content-lens","blogroll","blogroll-item"],"beta":["amazon","google-docs-embed","launchpad-save-modal","recipe","v6-video-frame-poster","videopress/video-chapters","create-with-voice","ai-assistant-backend-prompts"],"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"]}')}},s={};function c(e){var t=s[e];if(void 0!==t)return t.exports;var n=s[e]={exports:{}};return i[e].call(n.exports,n,n.exports,c),n.exports}c.m=i,c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,{a:t}),t},t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},c.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var o=Object.create(null);c.r(o);var a={};e=e||[null,t({}),t([]),t(t)];for(var i=2&r&&n;"object"==typeof i&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach((function(e){a[e]=function(){return n[e]}}));return a.default=function(){return n},c.d(o,a),o},c.d=function(e,t){for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.f={},c.e=function(e){return Promise.all(Object.keys(c.f).reduce((function(t,n){return c.f[n](e,t),t}),[]))},c.u=function(e){return(390===e?"swiper":e)+".js?minify=false&ver="+{390:"877c79f823fab2121f3c",958:"66c366212c053723820f"}[e]},c.miniCssF=function(e){return"swiper.css?minify=false&ver=250f2a70eef2093db46f"},function(){if(!c.miniCssF)throw new Error("MiniCSSWithRTLPlugin was loaded before MiniCSSExtractPlugin");var e;c.miniCssF=(e=c.miniCssF,function(t){var n="rtl"===document.dir,r=e(t);return n?r.replace(/\.css(?:$|\?)/,".rtl$&"):r})}(),c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n={},r="Jetpack:",c.l=function(e,t,o,a){if(n[e])n[e].push(t);else{var i,s;if(void 0!==o)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var p=l[u];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==r+o){i=p;break}}i||(s=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,c.nc&&i.setAttribute("nonce",c.nc),i.setAttribute("data-webpack",r+o),i.src=e),n[e]=[t];var d=function(t,r){i.onerror=i.onload=null,clearTimeout(m);var o=n[e];if(delete n[e],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((function(e){return e(r)})),t)return t(r)},m=setTimeout(d.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=d.bind(null,i.onerror),i.onload=d.bind(null,i.onload),s&&document.head.appendChild(i)}},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;c.g.importScripts&&(e=c.g.location+"");var t=c.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=e}(),o=function(e){return new Promise((function(t,n){var r=c.miniCssF(e),o=c.p+r;if(function(e,t){for(var n=document.getElementsByTagName("link"),r=0;r<n.length;r++){var o=(i=n[r]).getAttribute("data-href")||i.getAttribute("href");if("stylesheet"===i.rel&&(o===e||o===t))return i}var a=document.getElementsByTagName("style");for(r=0;r<a.length;r++){var i;if((o=(i=a[r]).getAttribute("data-href"))===e||o===t)return i}}(r,o))return t();!function(e,t,n,r){var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",o.onerror=o.onload=function(a){if(o.onerror=o.onload=null,"load"===a.type)n();else{var i=a&&("load"===a.type?"missing":a.type),s=a&&a.target&&a.target.href||t,c=new Error("Loading CSS chunk "+e+" failed.\n("+s+")");c.code="CSS_CHUNK_LOAD_FAILED",c.type=i,c.request=s,o.parentNode.removeChild(o),r(c)}},o.href=t,document.head.appendChild(o)}(e,o,t,n)}))},a={486:0},c.f.miniCss=function(e,t){a[e]?t.push(a[e]):0!==a[e]&&{390:1}[e]&&t.push(a[e]=o(e).then((function(){a[e]=0}),(function(t){throw delete a[e],t})))},function(){var e={486:0};c.f.j=function(t,n){var r=c.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else if(390!=t){var o=new Promise((function(n,o){r=e[t]=[n,o]}));n.push(r[2]=o);var a=c.p+c.u(t),i=new Error;c.l(a,(function(n){if(c.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;i.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",i.name="ChunkLoadError",i.type=o,i.request=a,r[1](i)}}),"chunk-"+t,t)}else e[t]=0};var t=function(t,n){var r,o,a=n[0],i=n[1],s=n[2],l=0;if(a.some((function(t){return 0!==e[t]}))){for(r in i)c.o(i,r)&&(c.m[r]=i[r]);if(s)s(c)}for(t&&t(n);l<a.length;l++)o=a[l],c.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=self.webpackChunkJetpack=self.webpackChunkJetpack||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}(),c(78680),c(27559),c(60866),c(48887),c(52020),c(82566),c(67140),c(83772),c(63139),c(58710),c(34575),c(61204),c(22055),c(49702),c(92482),c(7414),c(36836),c(89517),c(50323),c(36227),c(17013),c(47158),c(14035),c(37549);c(3432)}();
Save Changes
Rename File
Rename