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-beta.js
/*! For license information please see editor-beta.js.LICENSE.txt */ !function(){var e,t,n,r,a,o,i={60400:function(e,t,n){"use strict";n.d(t,{L:function(){return c}});var r=n(2615),a=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 a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};const o="text/event-stream",i=1e3,s="last-event-id";function c(e,t){var{signal:n,headers:c,onopen:u,onmessage:d,onclose:p,onerror:m,openWhenHidden:h,fetch:g}=t,f=a(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise(((t,a)=>{const b=Object.assign({},c);let v;function k(){v.abort(),document.hidden||S()}b.accept||(b.accept=o),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!=g?g:window.fetch,C=null!=u?u:l;async function S(){var n;v=new AbortController;try{const n=await _(e,Object.assign(Object.assign({},f),{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}),d))),null==p||p(),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(),a(e)}}}S()}))}function l(e){const t=e.headers.get("content-type");if(!(null==t?void 0:t.startsWith(o)))throw new Error(`Expected content-type to be ${o}, Actual: ${t}`)}},2615: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 a(e){let t,n,r,a=!1;return function(o){void 0===t?(t=o,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,o);const i=t.length;let s=0;for(;n<i;){a&&(10===t[n]&&(s=++n),a=!1);let o=-1;for(;n<i&&-1===o;++n)switch(t[n]){case 58:-1===r&&(r=n-s);break;case 13:a=!0;case 10:o=n}if(-1===o)break;e(t.subarray(s,o),r),s=n,r=-1}s===i?t=void 0:0!==s&&(t=t.subarray(s),n-=s)}}function o(e,t,n){let r=i();const a=new TextDecoder;return function(o,s){if(0===o.length)null==n||n(r),r=i();else if(s>0){const n=a.decode(o.subarray(0,s)),i=s+(32===o[s+1]?2:1),c=a.decode(o.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 a},_U:function(){return o}})},45416:function(e,t,n){"use strict";var r,a=n(99196);function o(){return o=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},o.apply(this,arguments)}t.Z=e=>a.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),r||(r=a.createElement("path",{d:"M14.344 19.344H9.656a.157.157 0 0 0-.156.156v.625c0 .346.28.625.625.625h3.75c.346 0 .625-.28.625-.625V19.5a.157.157 0 0 0-.156-.156ZM12 3.25a6.407 6.407 0 0 0-3.203 11.955v2.264c0 .345.28.625.625.625h5.156c.346 0 .625-.28.625-.625v-2.264A6.407 6.407 0 0 0 12 3.25Zm2.498 10.738-.701.407v2.293h-3.594v-2.293l-.701-.407a5 5 0 1 1 4.996 0Z"})))},84788:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(2378);let a,o,i,s;const c=/<(\/)?(\w+)\s*(\/)?>/g;function l(e,t,n,r,a){return{element:e,tokenStart:t,tokenLength:n,prevOffset:r,leadingTextStart:a,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 d(e){const t=function(){const e=c.exec(a);if(null===e)return["no-more-tokens"];const t=e.index,[n,r,o,i]=e,s=n.length;if(i)return["self-closed",o,t,s];if(r)return["closer",o,t,s];return["opener",o,t,s]}(),[n,u,d,h]=t,g=s.length,f=d>o?o:null;if(!e[u])return p(),!1;switch(n){case"no-more-tokens":if(0!==g){const{leadingTextStart:e,tokenStart:t}=s.pop();i.push(a.substr(e,t))}return p(),!1;case"self-closed":return 0===g?(null!==f&&i.push(a.substr(f,d-f)),i.push(e[u]),o=d+h,!0):(m(l(e[u],d,h)),o=d+h,!0);case"opener":return s.push(l(e[u],d,h,d+h,f)),o=d+h,!0;case"closer":if(1===g)return function(e){const{element:t,leadingTextStart:n,prevOffset:o,tokenStart:c,children:l}=s.pop(),u=e?a.substr(o,e-o):a.substr(o);u&&l.push(u);null!==n&&i.push(a.substr(n,c-n));i.push((0,r.cloneElement)(t,null,...l))}(d),o=d+h,!0;const t=s.pop(),n=a.substr(t.prevOffset,d-t.prevOffset);t.children.push(n),t.prevOffset=d+h;const c=l(t.element,t.tokenStart,t.tokenLength,d+h);return c.children=t.children,m(c),o=d+h,!0;default:return p(),!1}}function p(){const e=a.length-o;0!==e&&i.push(a.substr(o,e))}function m(e){const{element:t,tokenStart:n,tokenLength:o,prevOffset:i,children:c}=e,l=s[s.length-1],u=a.substr(l.prevOffset,n-l.prevOffset);u&&l.children.push(u),l.children.push((0,r.cloneElement)(t,null,...c)),l.prevOffset=i||n+o}var h=(e,t)=>{if(a=e,o=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(d(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 a={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 d.default}}),Object.defineProperty(t,"createInterpolateElement",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"renderToString",{enumerable:!0,get:function(){return u.default}});var o=r(n(84788)),i=n(2378);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var s=n(29115);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var c=n(82986);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,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)),d=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 a.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 a.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),a=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,a)=>{t&&"string"!=typeof t&&(t=(0,r.cloneElement)(t,{key:[n,a].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:a,...o}=e.props;return(0,r.createElement)(t,{key:n,...o},a)}))},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=L,t.renderComponent=P,t.renderElement=j,t.renderNativeComponent=x,t.renderStyle=T;var a=n(62313),o=n(28132),i=n(81975),s=n(2378),c=r(n(74745));const{Provider:l,Consumer:u}=(0,s.createContext)(void 0),d=(0,s.forwardRef)((()=>null)),p=new Set(["string","boolean","number"]),m=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),h=new Set(["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"]),g=new Set(["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"]),f=new Set(["animation","animationIterationCount","baselineShift","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","cx","cy","fillOpacity","flexGrow","flexShrink","floodOpacity","fontWeight","gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart","lineHeight","opacity","order","orphans","r","rx","ry","shapeImageThreshold","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","x","y","zIndex","zoom"]);function b(e,t){return t.some((t=>0===e.indexOf(t)))}function v(e){return"key"===e||"children"===e}function k(e,t){return"style"===e?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,o.paramCase)(y[t]):E[t]?E[t]:t}function C(e){return e.startsWith("--")?e:b(e,["ms","O","Moz","Webkit"])?"-"+(0,o.paramCase)(e):(0,o.paramCase)(e)}function S(e,t){return"number"!=typeof t||0===t||f.has(e)?t:t+"px"}function j(e,t,n={}){if(null==e||!1===e)return"";if(Array.isArray(e))return N(e,t,n);switch(typeof e){case"string":return(0,i.escapeHTML)(e);case"number":return e.toString()}const{type:r,props:a}=e;switch(r){case s.StrictMode:case s.Fragment:return N(a.children,t,n);case c.default:const{children:e,...r}=a;return x(Object.keys(r).length?"div":null,{...r,dangerouslySetInnerHTML:{__html:e}},t,n)}switch(typeof r){case"string":return x(r,a,t,n);case"function":return r.prototype&&"function"==typeof r.prototype.render?P(r,a,t,n):j(r(a,n),t,n)}switch(r&&r.$$typeof){case l.$$typeof:return N(a.children,a.value,n);case u.$$typeof:return j(a.children(t||r._currentValue),t,n);case d.$$typeof:return j(r.render(a),t,n)}return""}function x(e,t,n,r={}){let a="";if("textarea"===e&&t.hasOwnProperty("value")){a=N(t.value,n,r);const{value:e,...o}=t;t=o}else t.dangerouslySetInnerHTML&&"string"==typeof t.dangerouslySetInnerHTML.__html?a=t.dangerouslySetInnerHTML.__html:void 0!==t.children&&(a=N(t.children,n,r));if(!e)return a;const o=L(t);return m.has(e)?"<"+e+o+"/>":"<"+e+o+">"+a+"</"+e+">"}function P(e,t,n,r={}){const a=new e(t,r);"function"==typeof a.getChildContext&&Object.assign(r,a.getChildContext());return j(a.render(),n,r)}function N(e,t,n={}){let r="";e=Array.isArray(e)?e:[e];for(let a=0;a<e.length;a++){r+=j(e[a],t,n)}return r}function L(e){let t="";for(const n in e){const r=_(n);if(!(0,i.isValidAttributeName)(r))continue;let a=k(n,e[n]);if(!p.has(typeof a))continue;if(v(n))continue;const o=h.has(r);if(o&&!1===a)continue;const s=o||b(n,["data-","aria-"])||g.has(r);("boolean"!=typeof a||s)&&(t+=" "+r,o||("string"==typeof a&&(a=(0,i.escapeAttribute)(a)),t+='="'+a+'"'))}return t}function T(e){if(!(0,a.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 A=j;t.default=A},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},a){return(0,r.cloneElement)(e,{width:t,height:t,...n,ref:a})}))},79404:function(e,t,n){"use strict";var r=n(99196),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"}));t.Z=o},90986:function(e,t,n){"use strict";var r=n(99196),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"}));t.Z=o},58829:function(e,t,n){"use strict";var r=n(99196),a=n(70444);const o=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M8 12.5h8V11H8v1.5Z M19 6.5H5a2 2 0 0 0-2 2V15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a2 2 0 0 0-2-2ZM5 8h14a.5.5 0 0 1 .5.5V15a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V8.5A.5.5 0 0 1 5 8Z"}));t.Z=o},23435:function(e,t,n){"use strict";var r=n(99196),a=n(70444);const o=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21ZM15.5303 8.46967C15.8232 8.76256 15.8232 9.23744 15.5303 9.53033L13.0607 12L15.5303 14.4697C15.8232 14.7626 15.8232 15.2374 15.5303 15.5303C15.2374 15.8232 14.7626 15.8232 14.4697 15.5303L12 13.0607L9.53033 15.5303C9.23744 15.8232 8.76256 15.8232 8.46967 15.5303C8.17678 15.2374 8.17678 14.7626 8.46967 14.4697L10.9393 12L8.46967 9.53033C8.17678 9.23744 8.17678 8.76256 8.46967 8.46967C8.76256 8.17678 9.23744 8.17678 9.53033 8.46967L12 10.9393L14.4697 8.46967C14.7626 8.17678 15.2374 8.17678 15.5303 8.46967Z"}));t.Z=o},79201:function(e,t,n){"use strict";var r=n(99196),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));t.Z=o},46936:function(e,t,n){"use strict";var r=n(99196),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));t.Z=o},6163:function(e,t,n){"use strict";var r=n(99196),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));t.Z=o},39517:function(e,t,n){"use strict";var r=n(99196),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.Z=o},64967:function(e,t,n){"use strict";var r=n(99196),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zm-1.338 4.877c-.314.22-.412.452-.412.623 0 .171.098.403.412.623.312.218.783.377 1.338.377.825 0 1.605.233 2.198.648.59.414 1.052 1.057 1.052 1.852 0 .795-.461 1.438-1.052 1.852-.41.286-.907.486-1.448.582v.316a.75.75 0 01-1.5 0v-.316a3.64 3.64 0 01-1.448-.582c-.59-.414-1.052-1.057-1.052-1.852a.75.75 0 011.5 0c0 .171.098.403.412.623.312.218.783.377 1.338.377s1.026-.159 1.338-.377c.314-.22.412-.452.412-.623 0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377-.825 0-1.605-.233-2.198-.648-.59-.414-1.052-1.057-1.052-1.852 0-.795.461-1.438 1.052-1.852a3.64 3.64 0 011.448-.582V7.5a.75.75 0 011.5 0v.316c.54.096 1.039.296 1.448.582.59.414 1.052 1.057 1.052 1.852a.75.75 0 01-1.5 0c0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377s-1.026.159-1.338.377z"}));t.Z=o},71063:function(e,t,n){"use strict";var r=n(77840);t.Z=r.Z},15381:function(e,t,n){"use strict";var r=n(99196),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"}));t.Z=o},43618:function(e,t,n){"use strict";var r=n(99196),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"}));t.Z=o},75022:function(e,t,n){"use strict";var r=n(99196),a=n(70444);const o=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"}));t.Z=o},90496:function(e,t,n){"use strict";var r=n(99196),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}));t.Z=o},75365:function(e,t,n){"use strict";var r=n(99196),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,r.createElement)(a.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"}));t.Z=o},1078:function(e,t,n){"use strict";var r=n(99196),a=n(70444);const o=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"}));t.Z=o},20843:function(e,t,n){"use strict";var r=n(99196),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,r.createElement)(a.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"}));t.Z=o},77840:function(e,t,n){"use strict";var r=n(99196),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"}));t.Z=o},24955:function(e,t,n){"use strict";var r=n(99196),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M15.5 9.5a1 1 0 100-2 1 1 0 000 2zm0 1.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5zm-2.25 6v-2a2.75 2.75 0 00-2.75-2.75h-4A2.75 2.75 0 003.75 15v2h1.5v-2c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v2h1.5zm7-2v2h-1.5v-2c0-.69-.56-1.25-1.25-1.25H15v-1.5h2.5A2.75 2.75 0 0120.25 15zM9.5 8.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z",fillRule:"evenodd"}));t.Z=o},11908:function(e,t,n){"use strict";var r=n(99196),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));t.Z=o},58532:function(e,t,n){"use strict";var r=n(99196),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z"}));t.Z=o},92710:function(e,t,n){"use strict";var r=n(99196),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M12.75 9.333c0 .521-.102.977-.327 1.354-.23.386-.555.628-.893.774-.545.234-1.183.227-1.544.222l-.12-.001v-1.5h.123c.414.001.715.002.948-.099a.395.395 0 00.199-.166c.05-.083.114-.253.114-.584V7.2H8.8V4h3.95v5.333zM7.95 9.333c0 .521-.102.977-.327 1.354-.23.386-.555.628-.893.774-.545.234-1.183.227-1.544.222l-.12-.001v-1.5h.123c.414.001.715.002.948-.099a.394.394 0 00.198-.166c.05-.083.115-.253.115-.584V7.2H4V4h3.95v5.333zM13 20H4v-1.5h9V20zM20 16H4v-1.5h16V16z"}));t.Z=o},3639:function(e,t,n){"use strict";var r=n(99196),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"}));t.Z=o},586:function(e,t,n){"use strict";var r=n(99196),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M6.08 10.103h2.914L9.657 12h1.417L8.23 4H6.846L4 12h1.417l.663-1.897Zm1.463-4.137.994 2.857h-2l1.006-2.857ZM11 16H4v-1.5h7V16Zm1 0h8v-1.5h-8V16Zm-4 4H4v-1.5h4V20Zm7-1.5V20H9v-1.5h6Z"}));t.Z=o},32677:function(e,t,n){"use strict";var r=n(99196),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"m4 5.5h2v6.5h1.5v-6.5h2v-1.5h-5.5zm16 10.5h-16v-1.5h16zm-7 4h-9v-1.5h9z"}));t.Z=o},48381:function(e,t,n){"use strict";var r=n(99196),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"m11.3 17.2-5-5c-.1-.1-.1-.3 0-.4l2.3-2.3-1.1-1-2.3 2.3c-.7.7-.7 1.8 0 2.5l5 5H7.5v1.5h5.3v-5.2h-1.5v2.6zm7.5-6.4-5-5h2.7V4.2h-5.2v5.2h1.5V6.8l5 5c.1.1.1.3 0 .4l-2.3 2.3 1.1 1.1 2.3-2.3c.6-.7.6-1.9-.1-2.5z"}));t.Z=o},47659:function(e,t,n){"use strict";var r=n(99196),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));t.Z=o},30797:function(e,t,n){"use strict";var r=n(99196),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,r.createElement)(a.Path,{d:"M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z"}));t.Z=o},59823:function(e,t,n){"use strict";n.d(t,{AG:function(){return i},Ti:function(){return o},eV:function(){return s}});var r=n(38697),a=n(72867);function o(e,t){return 0===t?e.toLowerCase():(0,a.By)(e,t)}function i(e,t){return 0===t?e.toLowerCase():(0,a.Pv)(e)}function s(e,t){return void 0===t&&(t={}),(0,a.Ho)(e,(0,r.pi)({transform:o},t))}},81338:function(e,t,n){"use strict";n.d(t,{I:function(){return s},w:function(){return i}});var r=n(38697),a=n(68308),o=n(83078);function i(e){return(0,o.l)(e.toLowerCase())}function s(e,t){return void 0===t&&(t={}),(0,a.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 a.I},capitalCaseTransform:function(){return a.w},constantCase:function(){return o.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 d.Y},sentenceCase:function(){return p.G},sentenceCaseTransform:function(){return p.a},snakeCase:function(){return m.f}});var r=n(59823),a=n(81338),o=n(56233),i=n(77352),s=n(20025),c=n(68308),l=n(76854),u=n(72867),d=n(76559),p=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)a(e,t[r])}e.prototype=Object.create(null);var n={}.hasOwnProperty;var r=/\s+/;function a(e,a){if(a){var o=typeof a;"string"===o?function(e,t){for(var n=t.split(r),a=n.length,o=0;o<a;++o)e[n[o]]=!0}(e,a):Array.isArray(a)?t(e,a):"object"===o?function(e,t){if(t.toString===Object.prototype.toString||t.toString.toString().includes("[native code]"))for(var r in t)n.call(t,r)&&(e[r]=!!t[r]);else e[t.toString()]=!0}(e,a):"number"===o&&function(e,t){e[t]=!0}(e,a)}}return function(){for(var n=arguments.length,r=Array(n),a=0;a<n;a++)r[a]=arguments[a];var o=new e;t(o,r);var i=[];for(var s in o)o[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 a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var i=a.apply(null,n);i&&e.push(i)}}else if("object"===o){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?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},56233:function(e,t,n){"use strict";n.d(t,{c:function(){return i}});var r=n(38697),a=n(68308),o=n(48936);function i(e,t){return void 0===t&&(t={}),(0,a.B)(e,(0,r.pi)({delimiter:"_",transform:o.L},t))}},94273:function(e){!function(){"use strict";var t=[],n=3988292384;function r(e){var t,r,a,o,i=-1;for(t=0,a=e.length;t<a;t+=1){for(o=255&(i^e[t]),r=0;r<8;r+=1)1==(1&o)?o=o>>>1^n:o>>>=1;i=i>>>8^o}return-1^i}function a(e,n){var r,o,i;if(void 0!==a.crc&&n&&e||(a.crc=-1,e)){for(r=a.crc,o=0,i=e.length;o<i;o+=1)r=r>>>8^t[255&(r^e[o])];return a.crc=r,-1^r}}!function(){var e,r,a;for(r=0;r<256;r+=1){for(e=r,a=0;a<8;a+=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):a(e))>>>0).toString(16)},e.exports.direct=r,e.exports.table=a}()},77352:function(e,t,n){"use strict";n.d(t,{$:function(){return o}});var r=n(38697),a=n(68308);function o(e,t){return void 0===t&&(t={}),(0,a.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 a=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,r){function a(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",a),n([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&g(e,"error",t,n)}(e,a,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.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?o.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var a,o,i,l;if(s(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),i=o[t]),void 0===i)i=o[t]=n,++e._eventsCount;else if("function"==typeof i?i=o[t]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),(a=c(e))>0&&i.length>a&&!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 d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=u.bind(r);return a.listener=n,r.wrapFn=a,a}function p(e,t,n){var r=e._events;if(void 0===r)return[];var a=r[t];return void 0===a?[]:"function"==typeof a?n?[a.listener||a]:[a]: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}(a):h(a,a.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 g(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 a(o){r.once&&e.removeEventListener(t,a),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");i=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var a="error"===e,o=this._events;if(void 0!==o)a=a&&void 0===o.error;else if(!a)return!1;if(a){var 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=o[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},o.prototype.addListener=function(e,t){return l(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return l(this,e,t,!0)},o.prototype.once=function(e,t){return s(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,a,o,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(a=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){i=n[o].listener,a=o;break}if(a<0)return this;0===a?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,a),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,i||t)}return this},o.prototype.off=o.prototype.removeListener,o.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 a,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(a=o[r])&&this.removeAllListeners(a);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},o.prototype.listeners=function(e){return p(this,e,!0)},o.prototype.rawListeners=function(e){return p(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},o.prototype.listenerCount=m,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},90861:function(e){e.exports=function(){"use strict";var e=/^(b|B)$/,t={iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},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 a(a){var o,i,s,c,l,u,d,p,m,h,g,f,b,v,k,y,w,E,_,C,S,j=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},x=[],P=0;if(isNaN(a))throw new TypeError("Invalid number");if(s=!0===j.bits,k=!0===j.unix,f=!0===j.pad,i=j.base||10,b=void 0!==j.round?j.round:k?1:2,d=void 0!==j.locale?j.locale:"",p=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",g=j.output||"string",l=!0===j.fullform,u=j.fullforms instanceof Array?j.fullforms:[],o=void 0!==j.exponent?j.exponent:-1,C=r[j.roundingMethod]||Math.round,m=(h=Number(a))<0,c=i>2?1e3:1024,S=!1===isNaN(j.precision)?parseInt(j.precision,10):0,m&&(h=-h),(-1===o||isNaN(o))&&(o=Math.floor(Math.log(h)/Math.log(c)))<0&&(o=0),o>8&&(S>0&&(S+=8-o),o=8),"exponent"===g)return o;if(0===h)x[0]=0,v=x[1]=k?"":t[E][s?"bits":"bytes"][o];else{P=h/(2===i?Math.pow(2,10*o):Math.pow(1e3,o)),s&&(P*=8)>=c&&o<8&&(P/=c,o++);var N=Math.pow(10,o>0?b:0);x[0]=C(P*N)/N,x[0]===c&&o<8&&void 0===j.exponent&&(x[0]=1,o++),v=x[1]=10===i&&1===o?s?"kbit":"kB":t[E][s?"bits":"bytes"][o],k&&(x[1]=x[1].charAt(0),e.test(x[1])&&(x[0]=Math.floor(x[0]),x[1]=""))}if(m&&(x[0]=-x[0]),S>0&&(x[0]=x[0].toPrecision(S)),x[1]=_[x[1]]||x[1],!0===d?x[0]=x[0].toLocaleString():d.length>0?x[0]=x[0].toLocaleString(d,p):y.length>0&&(x[0]=x[0].toString().replace(".",y)),f&&!1===Number.isInteger(x[0])&&b>0){var L=y||".",T=x[0].toString().split(L),A=T[1]||"",I=A.length,R=b-I;x[0]="".concat(T[0]).concat(L).concat(A.padEnd(I+R,"0"))}return l&&(x[1]=u[o]?u[o]:n[E][o]+(s?"bit":"byte")+(1===x[0]?"":"s")),"array"===g?x:"object"===g?{value:x[0],symbol:x[1],exponent:o,unit:v}:x.join(w)}return a.partial=function(e){return function(t){return a(t,e)}},a}()},20025:function(e,t,n){"use strict";n.d(t,{e:function(){return o}});var r=n(38697),a=n(81338);function o(e,t){return void 0===t&&(t={}),(0,a.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 a,o=(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)},d=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,p=function(e){return e.replace(d,u)},m=function(e){var t=[0,2,1][e.length%3],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)},g=function(e){return h(p(String(e)))},f=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},b=function(e,t){return t?f(g(e)):g(e)},v=function(e){return b(e,!0)};r.Uint8Array&&(a=function(e,t){for(var n="",r=0,a=e.length;r<a;r+=3){var o=e[r],i=e[r+1],c=e[r+2],l=o<<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?f(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),a=[l(r>>>16),l(r>>>8&255),l(255&r)];return a.length-=[0,0,2,1][n],a.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,"")},P=function(e){return j(x(e))};r.Uint8Array&&(k=function(e){return Uint8Array.from(S(x(e)),(function(e){return e.charCodeAt(0)}))});var N=function(){var e=r.Base64;return r.Base64=o,e};if(r.Base64={VERSION:i,atob:S,btoa:h,fromBase64:P,toBase64:b,utob:p,encode:b,encodeURI:v,btou:E,decode:P,noConflict:N,fromUint8Array:a,toUint8Array:k},"function"==typeof Object.defineProperty){var L=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};r.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",L((function(){return P(this)}))),Object.defineProperty(String.prototype,"toBase64",L((function(e){return b(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",L((function(){return b(this,!0)})))}}return 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 a(e){return Object.prototype.toString.call(e)}function o(e){return"[object Function]"===a(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 d(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]"===a(n))return!function(e){return"[object RegExp]"===a(e)}(n.validate)?o(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(o(n.normalize)?r.normalize=n.normalize:n.normalize?u(t,n):r.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===a(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 d=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+"))("+d+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+d+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function p(e,t){var n=e.__index__,r=e.__last_index__,a=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=a,this.text=a,this.url=a}function m(e,t){var n=new p(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={},d(this)}h.prototype.add=function(e,t){return this.__schemas__[e]=t,d(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,a,o,i,s,c;if(this.re.schema_test.test(e))for((s=this.re.schema_search).lastIndex=0;null!==(t=s.exec(e));)if(a=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+a;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))&&(o=n.index+n[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,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))&&(o=r.index+r[1].length,i=r.index+r[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&i>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,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(),d(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,d(this),this)},h.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},h.prototype.onCompile=function(){},e.exports=h},95843: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 a=Number(e[t].meta.id+1).toString(),o="";return"string"==typeof r.docId&&(o="-"+r.docId+"-"),o+a}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,a){var o=a.rules.footnote_anchor_name(e,t,n,r,a),i=a.rules.footnote_caption(e,t,n,r,a),s=o;return e[t].meta.subId>0&&(s+=":"+e[t].meta.subId),'<sup class="footnote-ref"><a href="#fn'+o+'" id="fnref'+s+'">'+i+"</a></sup>"}function a(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 o(){return"</ol>\n</section>\n"}function i(e,t,n,r,a){var o=a.rules.footnote_anchor_name(e,t,n,r,a);return e[t].meta.subId>0&&(o+=":"+e[t].meta.subId),'<li id="fn'+o+'" class="footnote-item">'}function s(){return"</li>\n"}function c(e,t,n,r,a){var o=a.rules.footnote_anchor_name(e,t,n,r,a);return e[t].meta.subId>0&&(o+=":"+e[t].meta.subId),' <a href="#fnref'+o+'" class="footnote-backref">↩︎</a>'}e.exports=function(e){var l=e.helpers.parseLinkLabel,u=e.utils.isSpace;e.renderer.rules.footnote_ref=r,e.renderer.rules.footnote_block_open=a,e.renderer.rules.footnote_block_close=o,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 a,o,i,s,c,l,d,p,m,h,g,f=e.bMarks[t]+e.tShift[t],b=e.eMarks[t];if(f+4>b)return!1;if(91!==e.src.charCodeAt(f))return!1;if(94!==e.src.charCodeAt(f+1))return!1;for(c=f+2;c<b;c++){if(32===e.src.charCodeAt(c))return!1;if(93===e.src.charCodeAt(c))break}if(c===f+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(f+2,c-2),e.env.footnotes.refs[":"+l]=-1,(d=new e.Token("footnote_reference_open","",1)).meta={label:l},d.level=e.level++,e.tokens.push(d),a=e.bMarks[t],o=e.tShift[t],i=e.sCount[t],s=e.parentType,g=c,p=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-g,e.sCount[t]=m-p,e.bMarks[t]=g,e.blkIndent+=4,e.parentType="footnote",e.sCount[t]<e.blkIndent&&(e.sCount[t]+=e.blkIndent),e.md.block.tokenize(e,t,n,!0),e.parentType=s,e.blkIndent-=4,e.tShift[t]=o,e.sCount[t]=i,e.bMarks[t]=a,(d=new e.Token("footnote_reference_close","",-1)).level=--e.level,e.tokens.push(d),!0}),{alt:["paragraph","reference"]}),e.inline.ruler.after("image","footnote_inline",(function(e,t){var n,r,a,o,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=[]),a=e.env.footnotes.list.length,e.md.inline.parse(e.src.slice(n,r),e.md,e.env,o=[]),e.push("footnote_ref","",0).meta={id:a},e.env.footnotes.list[a]={content:e.src.slice(n,r),tokens:o}),e.pos=r+1,e.posMax=i,!0))))})),e.inline.ruler.after("footnote_inline","footnote_ref",(function(e,t){var n,r,a,o,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?(a=e.env.footnotes.list.length,e.env.footnotes.list[a]={label:n,count:0},e.env.footnotes.refs[":"+n]=a):a=e.env.footnotes.refs[":"+n],o=e.env.footnotes.list[a].count,e.env.footnotes.list[a].count++,e.push("footnote_ref","",0).meta={id:a,subId:o,label:n}),e.pos=r,e.posMax=i,!0)))})),e.core.ruler.after("inline","footnote_tail",(function(e){var t,n,r,a,o,i,s,c,l,u,d=!1,p={};if(e.env.footnotes&&(e.tokens=e.tokens.filter((function(e){return"footnote_reference_open"===e.type?(d=!0,l=[],u=e.meta.label,!1):"footnote_reference_close"===e.type?(d=!1,p[":"+u]=l,!1):(d&&l.push(e),!d)})),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=p[":"+i[t].label]),c&&(e.tokens=e.tokens.concat(c)),o="paragraph_close"===e.tokens[e.tokens.length-1].type?e.tokens.pop():null,a=i[t].count>0?i[t].count:1,r=0;r<a;r++)(s=new e.Token("footnote_anchor","",0)).meta={id:t,subId:r,label:i[t].label},e.tokens.push(s);o&&e.tokens.push(o),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]*?\\]\\]>)"),a=new RegExp("^(?:"+t+"|"+n+")");e.exports.n=r,e.exports.q=a},39615:function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function a(e,t){return r.call(e,t)}function o(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function 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 d=/[&<>"]/,p=/[&<>"]/g,m={"&":"&","<":"<",">":">",'"':"""};function h(e){return m[e]}var g=/[.?*+^$[\]\\(){}|-]/g;var f=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=a,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 a(u,t)?u[t]:35===t.charCodeAt(0)&&l.test(t)&&o(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?i(n):e}(e,n)}))},t.isValidEntityCode=o,t.fromCodePoint=i,t.escapeHtml=function(e){return d.test(e)?e.replace(p,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 f.test(e)},t.escapeRE=function(e){return e.replace(g,"\\$&")},t.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}},57007: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 a,o,i=t,s={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(t)){for(t++;t<n;){if(10===(a=e.charCodeAt(t)))return s;if(60===a)return s;if(62===a)return s.pos=t+1,s.str=r(e.slice(i+1,t)),s.ok=!0,s;92===a&&t+1<n?t+=2:t++}return s}for(o=0;t<n&&32!==(a=e.charCodeAt(t))&&!(a<32||127===a);)if(92===a&&t+1<n){if(32===e.charCodeAt(t+1))break;t+=2}else{if(40===a&&++o>32)return s;if(41===a){if(0===o)break;o--}t++}return i===t||0!==o||(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,a,o,i,s=-1,c=e.posMax,l=e.pos;for(e.pos=t+1,r=1;e.pos<c;){if(93===(o=e.src.charCodeAt(e.pos))&&0===--r){a=!0;break}if(i=e.pos,e.md.inline.skipToken(e),91===o)if(i===e.pos-1)r++;else if(n)return e.pos=l,-1}return a&&(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 a,o,i=0,s=t,c={ok:!1,pos:0,lines:0,str:""};if(t>=n)return c;if(34!==(o=e.charCodeAt(t))&&39!==o&&40!==o)return c;for(t++,40===o&&(o=41);t<n;){if((a=e.charCodeAt(t))===o)return c.pos=t+1,c.lines=i,c.str=r(e.slice(s+1,t)),c.ok=!0,c;if(40===a&&41===o)return c;10===a?i++:92===a&&t+1<n&&(t++,10===e.charCodeAt(t)&&i++),t++}return c}},9702:function(e,t,n){"use strict";var r=n(39615),a=n(57007),o=n(42403),i=n(17742),s=n(99575),c=n(37487),l=n(62232),u=n(49236),d=n(60300),p={default:n(66223),zero:n(11582),commonmark:n(9372)},m=/^(vbscript|javascript|file|data):/,h=/^data:image\/(gif|png|jpeg|webp);/;function g(e){var t=e.trim().toLowerCase();return!m.test(t)||!!h.test(t)}var f=["http:","https:","mailto:"];function b(e){var t=u.parse(e,!0);if(t.hostname&&(!t.protocol||f.indexOf(t.protocol)>=0))try{t.hostname=d.toASCII(t.hostname)}catch(e){}return u.encode(u.format(t))}function v(e){var t=u.parse(e,!0);if(t.hostname&&(!t.protocol||f.indexOf(t.protocol)>=0))try{t.hostname=d.toUnicode(t.hostname)}catch(e){}return u.decode(u.format(t),u.decode.defaultChars+"%")}function k(e,t){if(!(this instanceof k))return new k(e,t);t||r.isString(e)||(t=e||{},e="default"),this.inline=new c,this.block=new s,this.core=new i,this.renderer=new o,this.linkify=new l,this.validateLink=g,this.normalizeLink=b,this.normalizeLinkText=v,this.utils=r,this.helpers=r.assign({},a),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=p[t=e]))throw new Error('Wrong `markdown-it` preset "'+t+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&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),a=[["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 o(){this.ruler=new r;for(var e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1],{alt:(a[e][2]||[]).slice()})}o.prototype.tokenize=function(e,t,n){for(var r,a=this.ruler.getRules(""),o=a.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<o&&!a[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)}},o.prototype.parse=function(e,t,n,r){var a;e&&(a=new this.State(e,t,n,r),this.tokenize(a,a.line,a.lineMax))},o.prototype.State=n(75355),e.exports=o},17742:function(e,t,n){"use strict";var r=n(81377),a=[["normalize",n(13837)],["block",n(30884)],["inline",n(25334)],["linkify",n(64756)],["replacements",n(60555)],["smartquotes",n(28867)]];function o(){this.ruler=new r;for(var e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1])}o.prototype.process=function(e){var t,n,r;for(t=0,n=(r=this.ruler.getRules("")).length;t<n;t++)r[t](e)},o.prototype.State=n(30727),e.exports=o},37487:function(e,t,n){"use strict";var r=n(81377),a=[["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)]],o=[["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<a.length;e++)this.ruler.push(a[e][0],a[e][1]);for(this.ruler2=new r,e=0;e<o.length;e++)this.ruler2.push(o[e][0],o[e][1])}i.prototype.skipToken=function(e){var t,n,r=e.pos,a=this.ruler.getRules(""),o=a.length,i=e.md.options.maxNesting,s=e.cache;if(void 0===s[r]){if(e.level<i)for(n=0;n<o&&(e.level++,t=a[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(""),a=r.length,o=e.posMax,i=e.md.options.maxNesting;e.pos<o;){if(e.level<i)for(n=0;n<a&&!(t=r[n](e,!1));n++);if(t){if(e.pos>=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},i.prototype.parse=function(e,t,n,r){var a,o,i,s=new this.State(e,t,n,r);for(this.tokenize(s),i=(o=this.ruler2.getRules("")).length,a=0;a<i;a++)o[a](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,a=n(39615).unescapeAll,o=n(39615).escapeHtml,i={};function s(){this.rules=r({},i)}i.code_inline=function(e,t,n,r,a){var i=e[t];return"<code"+a.renderAttrs(i)+">"+o(e[t].content)+"</code>"},i.code_block=function(e,t,n,r,a){var i=e[t];return"<pre"+a.renderAttrs(i)+"><code>"+o(e[t].content)+"</code></pre>\n"},i.fence=function(e,t,n,r,i){var s,c,l,u,d,p=e[t],m=p.info?a(p.info).trim():"",h="",g="";return m&&(h=(l=m.split(/(\s+)/g))[0],g=l.slice(2).join("")),0===(s=n.highlight&&n.highlight(p.content,h,g)||o(p.content)).indexOf("<pre")?s+"\n":m?(c=p.attrIndex("class"),u=p.attrs?p.attrs.slice():[],c<0?u.push(["class",n.langPrefix+h]):(u[c]=u[c].slice(),u[c][1]+=" "+n.langPrefix+h),d={attrs:u},"<pre><code"+i.renderAttrs(d)+">"+s+"</code></pre>\n"):"<pre><code"+i.renderAttrs(p)+">"+s+"</code></pre>\n"},i.image=function(e,t,n,r,a){var o=e[t];return o.attrs[o.attrIndex("alt")][1]=a.renderInlineAsText(o.children,n,r),a.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 o(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+=" "+o(e.attrs[t][0])+'="'+o(e.attrs[t][1])+'"';return r},s.prototype.renderToken=function(e,t,n){var r,a="",o=!1,i=e[t];return i.hidden?"":(i.block&&-1!==i.nesting&&t&&e[t-1].hidden&&(a+="\n"),a+=(-1===i.nesting?"</":"<")+i.tag,a+=this.renderAttrs(i),0===i.nesting&&n.xhtmlOut&&(a+=" /"),i.block&&(o=!0,1===i.nesting&&t+1<e.length&&("inline"===(r=e[t+1]).type||r.hidden||-1===r.nesting&&r.tag===i.tag)&&(o=!1)),a+=o?">\n":">")},s.prototype.renderInline=function(e,t,n){for(var r,a="",o=this.rules,i=0,s=e.length;i<s;i++)void 0!==o[r=e[i].type]?a+=o[r](e,i,t,n,this):a+=this.renderToken(e,i,t);return a},s.prototype.renderInlineAsText=function(e,t,n){for(var r="",a=0,o=e.length;a<o;a++)"text"===e[a].type?r+=e[a].content:"image"===e[a].type?r+=this.renderInlineAsText(e[a].children,t,n):"softbreak"===e[a].type&&(r+="\n");return r},s.prototype.render=function(e,t,n){var r,a,o,i="",s=this.rules;for(r=0,a=e.length;r<a;r++)"inline"===(o=e[r].type)?i+=this.renderInline(e[r].children,t,n):void 0!==s[o]?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),a=n||{};if(-1===r)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=a.alt||[],this.__cache__=null},t.prototype.before=function(e,t,n,r){var a=this.__find__(e),o=r||{};if(-1===a)throw new Error("Parser rule not found: "+e);this.__rules__.splice(a,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null},t.prototype.after=function(e,t,n,r){var a=this.__find__(e),o=r||{};if(-1===a)throw new Error("Parser rule not found: "+e);this.__rules__.splice(a+1,0,{name:t,enabled:!0,fn:n,alt:o.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,a){var o,i,s,c,l,u,d,p,m,h,g,f,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(a)return!0;for(c=m=e.sCount[t]+1,32===e.src.charCodeAt(j)?(j++,c++,m++,o=!1,y=!0):9===e.src.charCodeAt(j)?(y=!0,(e.bsCount[t]+m)%4==3?(j++,c++,m++,o=!1):o=!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]+(o?1:0))%4:m++,j++;for(g=[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",p=t+1;p<n&&(C=e.sCount[p]<e.blkIndent,!((j=e.bMarks[p]+e.tShift[p])>=(x=e.eMarks[p])));p++)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,p,n,!0)){w=!0;break}if(w){e.lineMax=p,0!==e.blkIndent&&(h.push(e.bMarks[p]),g.push(e.bsCount[p]),k.push(e.tShift[p]),v.push(e.sCount[p]),e.sCount[p]-=e.blkIndent);break}h.push(e.bMarks[p]),g.push(e.bsCount[p]),k.push(e.tShift[p]),v.push(e.sCount[p]),e.sCount[p]=-1}else{for(c=m=e.sCount[p]+1,32===e.src.charCodeAt(j)?(j++,c++,m++,o=!1,y=!0):9===e.src.charCodeAt(j)?(y=!0,(e.bsCount[p]+m)%4==3?(j++,c++,m++,o=!1):o=!0):y=!1,h.push(e.bMarks[p]),e.bMarks[p]=j;j<x&&(i=e.src.charCodeAt(j),r(i));)9===i?m+=4-(m+e.bsCount[p]+(o?1:0))%4:m++,j++;u=j>=x,g.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+(y?1:0),v.push(e.sCount[p]),e.sCount[p]=m-c,k.push(e.tShift[p]),e.tShift[p]=j-e.bMarks[p]}for(f=e.blkIndent,e.blkIndent=0,(_=e.push("blockquote_open","blockquote",1)).markup=">",_.map=d=[t,0],e.md.block.tokenize(e,t,p),(_=e.push("blockquote_close","blockquote",-1)).markup=">",e.lineMax=S,e.parentType=b,d[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]=g[s];return e.blkIndent=f,!0}},99334:function(e){"use strict";e.exports=function(e,t,n){var r,a,o;if(e.sCount[t]-e.blkIndent<4)return!1;for(a=r=t+1;r<n;)if(e.isEmpty(r))r++;else{if(!(e.sCount[r]-e.blkIndent>=4))break;a=++r}return e.line=a,(o=e.push("code_block","code",0)).content=e.getLines(t,a,4+e.blkIndent,!1)+"\n",o.map=[t,e.line],!0}},79783:function(e){"use strict";e.exports=function(e,t,n,r){var a,o,i,s,c,l,u,d=!1,p=e.bMarks[t]+e.tShift[t],m=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(p+3>m)return!1;if(126!==(a=e.src.charCodeAt(p))&&96!==a)return!1;if(c=p,(o=(p=e.skipChars(p,a))-c)<3)return!1;if(u=e.src.slice(c,p),i=e.src.slice(p,m),96===a&&i.indexOf(String.fromCharCode(a))>=0)return!1;if(r)return!0;for(s=t;!(++s>=n)&&!((p=c=e.bMarks[s]+e.tShift[s])<(m=e.eMarks[s])&&e.sCount[s]<e.blkIndent);)if(e.src.charCodeAt(p)===a&&!(e.sCount[s]-e.blkIndent>=4||(p=e.skipChars(p,a))-c<o||(p=e.skipSpaces(p))<m)){d=!0;break}return o=e.sCount[t],e.line=s+(d?1:0),(l=e.push("fence","code",0)).info=i,l.content=e.getLines(t+1,s,o,!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,a){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(35!==(o=e.src.charCodeAt(l))||l>=u)return!1;for(i=1,o=e.src.charCodeAt(++l);35===o&&l<u&&i<=6;)i++,o=e.src.charCodeAt(++l);return!(i>6||l<u&&!r(o))&&(a||(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,a){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(42!==(o=e.src.charCodeAt(l++))&&45!==o&&95!==o)return!1;for(i=1;l<u;){if((s=e.src.charCodeAt(l++))!==o&&!r(s))return!1;s===o&&i++}return!(i<3)&&(a||(e.line=t+1,(c=e.push("hr","hr",0)).map=[t,e.line],c.markup=Array(i+1).join(String.fromCharCode(o))),!0)}},33869:function(e,t,n){"use strict";var r=n(43093),a=n(36570).q,o=[[/^<(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(a.source+"\\s*$"),/^$/,!1]];e.exports=function(e,t,n,r){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(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(l))return!1;for(c=e.src.slice(l,u),a=0;a<o.length&&!o[a][0].test(c);a++);if(a===o.length)return!1;if(r)return o[a][2];if(i=t+1,!o[a][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),o[a][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,a,o,i,s,c,l,u,d,p,m=t+1,h=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(p=e.parentType,e.parentType="paragraph";m<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===(d=e.src.charCodeAt(c))||61===d)&&(c=e.skipChars(c,d),(c=e.skipSpaces(c))>=l)){u=61===d?1:2;break}if(!(e.sCount[m]<0)){for(a=!1,o=0,i=h.length;o<i;o++)if(h[o](e,m,n,!0)){a=!0;break}if(a)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(d),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(d),e.parentType=p,!0)}},46388:function(e,t,n){"use strict";var r=n(39615).isSpace;function a(e,t){var n,a,o,i;return a=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],42!==(n=e.src.charCodeAt(a++))&&45!==n&&43!==n||a<o&&(i=e.src.charCodeAt(a),!r(i))?-1:a}function o(e,t){var n,a=e.bMarks[t]+e.tShift[t],o=a,i=e.eMarks[t];if(o+1>=i)return-1;if((n=e.src.charCodeAt(o++))<48||n>57)return-1;for(;;){if(o>=i)return-1;if(!((n=e.src.charCodeAt(o++))>=48&&n<=57)){if(41===n||46===n)break;return-1}if(o-a>=10)return-1}return o<i&&(n=e.src.charCodeAt(o),!r(n))?-1:o}e.exports=function(e,t,n,r){var i,s,c,l,u,d,p,m,h,g,f,b,v,k,y,w,E,_,C,S,j,x,P,N,L,T,A,I,R=!1,M=!0;if(e.sCount[t]-e.blkIndent>=4)return!1;if(e.listIndent>=0&&e.sCount[t]-e.listIndent>=4&&e.sCount[t]<e.blkIndent)return!1;if(r&&"paragraph"===e.parentType&&e.sCount[t]>=e.blkIndent&&(R=!0),(P=o(e,t))>=0){if(p=!0,L=e.bMarks[t]+e.tShift[t],v=Number(e.src.slice(L,P-1)),R&&1!==v)return!1}else{if(!((P=a(e,t))>=0))return!1;p=!1}if(R&&e.skipSpaces(P)>=e.eMarks[t])return!1;if(b=e.src.charCodeAt(P-1),r)return!0;for(f=e.tokens.length,p?(I=e.push("ordered_list_open","ol",1),1!==v&&(I.attrs=[["start",v]])):I=e.push("bullet_list_open","ul",1),I.map=g=[t,0],I.markup=String.fromCharCode(b),y=t,N=!1,A=e.md.block.ruler.getRules("list"),_=e.parentType,e.parentType="list";y<n;){for(x=P,k=e.eMarks[y],d=w=e.sCount[y]+P-(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-d)>4&&(u=1),l=d+u,(I=e.push("list_item_open","li",1)).markup=String.fromCharCode(b),I.map=m=[t,0],p&&(I.info=e.src.slice(L,P-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&&!N||(M=!1),N=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,(I=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=A.length;c<h;c++)if(A[c](e,y,n,!0)){T=!0;break}if(T)break;if(p){if((P=o(e,y))<0)break;L=e.bMarks[y]+e.tShift[y]}else if((P=a(e,y))<0)break;if(b!==e.src.charCodeAt(P-1))break}return(I=p?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1)).markup=String.fromCharCode(b),g[1]=y,e.line=y,e.parentType=_,M&&function(e,t){var n,r,a=e.level+2;for(n=t+2,r=e.tokens.length-2;n<r;n++)e.tokens[n].level===a&&"paragraph_open"===e.tokens[n].type&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}(e,f),!0}},24934:function(e){"use strict";e.exports=function(e,t){var n,r,a,o,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,a=0,o=l.length;a<o;a++)if(l[a](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,a=n(39615).isSpace;e.exports=function(e,t,n,o){var i,s,c,l,u,d,p,m,h,g,f,b,v,k,y,w,E=0,_=e.bMarks[t]+e.tShift[t],C=e.eMarks[t],S=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(91!==e.src.charCodeAt(_))return!1;for(;++_<C;)if(93===e.src.charCodeAt(_)&&92!==e.src.charCodeAt(_-1)){if(_+1===C)return!1;if(58!==e.src.charCodeAt(_+1))return!1;break}for(l=e.lineMax,y=e.md.block.ruler.getRules("reference"),g=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,d=0,p=y.length;d<p;d++)if(y[d](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(!a(i))break;if(!(f=e.md.helpers.parseLinkDestination(v,_,C)).ok)return!1;if(u=e.md.normalizeLink(f.str),!e.md.validateLink(u))return!1;for(s=_=f.pos,c=E+=f.lines,b=_;_<C;_++)if(10===(i=v.charCodeAt(_)))E++;else if(!a(i))break;for(f=e.md.helpers.parseLinkTitle(v,_,C),_<C&&b!==_&&f.ok?(w=f.str,_=f.pos,E+=f.lines):(w="",_=s,E=c);_<C&&(i=v.charCodeAt(_),a(i));)_++;if(_<C&&10!==v.charCodeAt(_)&&w)for(w="",_=s,E=c;_<C&&(i=v.charCodeAt(_),a(i));)_++;return!(_<C&&10!==v.charCodeAt(_))&&(!!(m=r(v.slice(1,h)))&&(o||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[m]&&(e.env.references[m]={title:w,href:u}),e.parentType=g,e.line=t+E+1),!0))}},75355:function(e,t,n){"use strict";var r=n(71872),a=n(39615).isSpace;function o(e,t,n,r){var o,i,s,c,l,u,d,p;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="",p=!1,s=c=u=d=0,l=(i=this.src).length;c<l;c++){if(o=i.charCodeAt(c),!p){if(a(o)){u++,9===o?d+=4-d%4:d++;continue}p=!0}10!==o&&c!==l-1||(10!==o&&c++,this.bMarks.push(s),this.eMarks.push(c),this.tShift.push(u),this.sCount.push(d),this.bsCount.push(0),p=!1,u=0,d=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}o.prototype.push=function(e,t,n){var a=new r(e,t,n);return a.block=!0,n<0&&this.level--,a.level=this.level,n>0&&this.level++,this.tokens.push(a),a},o.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},o.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},o.prototype.skipSpaces=function(e){for(var t,n=this.src.length;e<n&&(t=this.src.charCodeAt(e),a(t));e++);return e},o.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!a(this.src.charCodeAt(--e)))return e+1;return e},o.prototype.skipChars=function(e,t){for(var n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},o.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},o.prototype.getLines=function(e,t,n,r){var o,i,s,c,l,u,d,p=e;if(e>=t)return"";for(u=new Array(t-e),o=0;p<t;p++,o++){for(i=0,d=c=this.bMarks[p],l=p+1<t||r?this.eMarks[p]+1:this.eMarks[p];c<l&&i<n;){if(s=this.src.charCodeAt(c),a(s))9===s?i+=4-(i+this.bsCount[p])%4:i++;else{if(!(c-d<this.tShift[p]))break;i++}c++}u[o]=i>n?new Array(i-n+1).join(" ")+this.src.slice(c,l):this.src.slice(c,l)}return u.join("")},o.prototype.Token=r,e.exports=o},12592:function(e,t,n){"use strict";var r=n(39615).isSpace;function a(e,t){var n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.substr(n,r-n)}function o(e){var t,n=[],r=0,a=e.length,o=!1,i=0,s="";for(t=e.charCodeAt(r);r<a;)124===t&&(o?(s+=e.substring(i,r-1),i=r):(n.push(s+e.substring(i,r)),s="",i=r+1)),o=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,d,p,m,h,g,f,b,v,k,y,w,E,_,C;if(t+2>n)return!1;if(p=t+1,e.sCount[p]<e.blkIndent)return!1;if(e.sCount[p]-e.blkIndent>=4)return!1;if((l=e.bMarks[p]+e.tShift[p])>=e.eMarks[p])return!1;if(124!==(_=e.src.charCodeAt(l++))&&45!==_&&58!==_)return!1;if(l>=e.eMarks[p])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[p];){if(124!==(s=e.src.charCodeAt(l))&&45!==s&&58!==s&&!r(s))return!1;l++}for(m=(c=a(e,t+1)).split("|"),f=[],u=0;u<m.length;u++){if(!(b=m[u].trim())){if(0===u||u===m.length-1)continue;return!1}if(!/^:?-+:?$/.test(b))return!1;58===b.charCodeAt(b.length-1)?f.push(58===b.charCodeAt(0)?"center":"right"):58===b.charCodeAt(0)?f.push("left"):f.push("")}if(-1===(c=a(e,t).trim()).indexOf("|"))return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;if((m=o(c)).length&&""===m[0]&&m.shift(),m.length&&""===m[m.length-1]&&m.pop(),0===(h=m.length)||h!==f.length)return!1;if(i)return!0;for(y=e.parentType,e.parentType="table",E=e.md.block.ruler.getRules("blockquote"),(g=e.push("table_open","table",1)).map=v=[t,0],(g=e.push("thead_open","thead",1)).map=[t,t+1],(g=e.push("tr_open","tr",1)).map=[t,t+1],u=0;u<m.length;u++)g=e.push("th_open","th",1),f[u]&&(g.attrs=[["style","text-align:"+f[u]]]),(g=e.push("inline","",0)).content=m[u].trim(),g.children=[],g=e.push("th_close","th",-1);for(g=e.push("tr_close","tr",-1),g=e.push("thead_close","thead",-1),p=t+2;p<n&&!(e.sCount[p]<e.blkIndent);p++){for(w=!1,u=0,d=E.length;u<d;u++)if(E[u](e,p,n,!0)){w=!0;break}if(w)break;if(!(c=a(e,p).trim()))break;if(e.sCount[p]-e.blkIndent>=4)break;for((m=o(c)).length&&""===m[0]&&m.shift(),m.length&&""===m[m.length-1]&&m.pop(),p===t+2&&((g=e.push("tbody_open","tbody",1)).map=k=[t+2,0]),(g=e.push("tr_open","tr",1)).map=[p,p+1],u=0;u<h;u++)g=e.push("td_open","td",1),f[u]&&(g.attrs=[["style","text-align:"+f[u]]]),(g=e.push("inline","",0)).content=m[u]?m[u].trim():"",g.children=[],g=e.push("td_close","td",-1);g=e.push("tr_close","tr",-1)}return k&&(g=e.push("tbody_close","tbody",-1),k[1]=p),g=e.push("table_close","table",-1),v[1]=p,e.parentType=y,e.line=p,!0}},30884: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,a=e.tokens;for(n=0,r=a.length;n<r;n++)"inline"===(t=a[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 a(e){return/^<\/a\s*>/i.test(e)}e.exports=function(e){var t,n,o,i,s,c,l,u,d,p,m,h,g,f,b,v,k,y,w=e.tokens;if(e.md.options.linkify)for(n=0,o=w.length;n<o;n++)if("inline"===w[n].type&&e.md.linkify.pretest(w[n].content))for(g=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)&&g>0&&g--,a(c.content)&&g++),!(g>0)&&"text"===c.type&&e.md.linkify.test(c.content)){for(d=c.content,k=e.md.linkify.match(d),l=[],h=c.level,m=0,u=0;u<k.length;u++)f=k[u].url,b=e.md.normalizeLink(f),e.md.validateLink(b)&&(v=k[u].text,v=k[u].schema?"mailto:"!==k[u].schema||/^mailto:/i.test(v)?e.md.normalizeLinkText(v):e.md.normalizeLinkText("mailto:"+v).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+v).replace(/^http:\/\//,""),(p=k[u].index)>m&&((s=new e.Token("text","",0)).content=d.slice(m,p),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<d.length&&((s=new e.Token("text","",0)).content=d.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,a={c:"©",r:"®",p:"§",tm:"™"};function o(e,t){return a[t.toLowerCase()]}function i(e){var t,n,a=0;for(t=e.length-1;t>=0;t--)"text"!==(n=e[t]).type||a||(n.content=n.content.replace(r,o)),"link_open"===n.type&&"auto"===n.info&&a--,"link_close"===n.type&&"auto"===n.info&&a++}function s(e){var n,r,a=0;for(n=e.length-1;n>=0;n--)"text"!==(r=e[n]).type||a||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&&a--,"link_close"===r.type&&"auto"===r.info&&a++}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,a=n(39615).isPunctChar,o=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,d,p,m,h,g,f,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){d=0,p=(l=i.content).length;e:for(;d<p&&(s.lastIndex=d,u=s.exec(l));){if(w=E=!0,d=u.index+1,C="'"===u[0],g=32,u.index-1>=0)g=l.charCodeAt(u.index-1);else for(_=n-1;_>=0&&("softbreak"!==e[_].type&&"hardbreak"!==e[_].type);_--)if(e[_].content){g=e[_].content.charCodeAt(e[_].content.length-1);break}if(f=32,d<p)f=l.charCodeAt(d);else for(_=n+1;_<e.length&&("softbreak"!==e[_].type&&"hardbreak"!==e[_].type);_++)if(e[_].content){f=e[_].content.charCodeAt(0);break}if(b=o(g)||a(String.fromCharCode(g)),v=o(f)||a(String.fromCharCode(f)),k=r(g),(y=r(f))?w=!1:v&&(k||b||(w=!1)),k?E=!1:b&&(y||v||(E=!1)),34===f&&'"'===u[0]&&g>=48&&g<=57&&(E=w=!1),w&&E&&(w=b,E=v),w||E){if(E)for(_=S.length-1;_>=0&&(h=S[_],!(S[_].level<m));_--)if(h.single===C&&S[_].level===m){h=S[_],C?(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),d+=x.length-1,h.token===n&&(d+=j.length-1),p=(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 a(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}a.prototype.Token=r,e.exports=a},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 a,o,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 a=e.src.slice(c+1,u),n.test(a)?(o=e.md.normalizeLink(a),!!e.md.validateLink(o)&&(r||((i=e.push("link_open","a",1)).attrs=[["href",o]],i.markup="autolink",i.info="auto",(i=e.push("text","",0)).content=e.md.normalizeLinkText(a),(i=e.push("link_close","a",-1)).markup="autolink",i.info="auto"),e.pos+=a.length+2,!0)):!!t.test(a)&&(o=e.md.normalizeLink("mailto:"+a),!!e.md.validateLink(o)&&(r||((i=e.push("link_open","a",1)).attrs=[["href",o]],i.markup="autolink",i.info="auto",(i=e.push("text","",0)).content=e.md.normalizeLinkText(a),(i=e.push("link_close","a",-1)).markup="autolink",i.info="auto"),e.pos+=a.length+2,!0))}},7912:function(e){"use strict";e.exports=function(e,t){var n,r,a,o,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=(a=e.src.slice(n,u)).length,e.backticksScanned&&(e.backticks[c]||0)<=n)return t||(e.pending+=a),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||((o=e.push("code_inline","code",0)).markup=a,o.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+=a),e.pos+=c,!0}},76399:function(e){"use strict";function t(e,t){var n,r,a,o,i,s,c,l,u={},d=t.length;if(d){var p=0,m=-2,h=[];for(n=0;n<d;n++)if(a=t[n],h.push(0),t[p].marker===a.marker&&m===a.token-1||(p=n),m=a.token,a.length=a.length||0,a.close){for(u.hasOwnProperty(a.marker)||(u[a.marker]=[-1,-1,-1,-1,-1,-1]),i=u[a.marker][(a.open?3:0)+a.length%3],s=r=p-h[p]-1;r>i;r-=h[r]+1)if((o=t[r]).marker===a.marker&&o.open&&o.end<0&&(c=!1,(o.close||a.open)&&(o.length+a.length)%3==0&&(o.length%3==0&&a.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,a.open=!1,o.end=n,o.close=!1,s=-1,m=-2;break}-1!==s&&(u[a.marker][(a.open?3:0)+(a.length||0)%3]=s)}}}e.exports=function(e){var n,r=e.tokens_meta,a=e.tokens_meta.length;for(t(0,e.delimiters),n=0;n<a;n++)r[n]&&r[n].delimiters&&t(0,r[n].delimiters)}},56141:function(e){"use strict";function t(e,t){var n,r,a,o,i,s;for(n=t.length-1;n>=0;n--)95!==(r=t[n]).marker&&42!==r.marker||-1!==r.end&&(a=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===a.token+1,i=String.fromCharCode(r.marker),(o=e.tokens[r.token]).type=s?"strong_open":"em_open",o.tag=s?"strong":"em",o.nesting=1,o.markup=s?i+i:i,o.content="",(o=e.tokens[a.token]).type=s?"strong_close":"em_close",o.tag=s?"strong":"em",o.nesting=-1,o.markup=s?i+i:i,o.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,a=e.pos,o=e.src.charCodeAt(a);if(t)return!1;if(95!==o&&42!==o)return!1;for(r=e.scanDelims(e.pos,42===o),n=0;n<r.length;n++)e.push("text","",0).content=String.fromCharCode(o),e.delimiters.push({marker:o,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,a=e.tokens_meta.length;for(t(e,e.delimiters),n=0;n<a;n++)r[n]&&r[n].delimiters&&t(e,r[n].delimiters)}},54408:function(e,t,n){"use strict";var r=n(38337),a=n(39615).has,o=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,d=e.posMax;if(38!==e.src.charCodeAt(u))return!1;if(u+1<d)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+=o(n)?i(n):i(65533)),e.pos+=l[0].length,!0}else if((l=e.src.slice(u).match(c))&&a(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,a=[],o=0;o<256;o++)a.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(e){a[e.charCodeAt(0)]=1})),e.exports=function(e,t){var n,o=e.pos,i=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(++o<i){if((n=e.src.charCodeAt(o))<256&&0!==a[n])return t||(e.pending+=e.src[o]),e.pos+=2,!0;if(10===n){for(t||e.push("hardbreak","br",0),o++;o<i&&(n=e.src.charCodeAt(o),r(n));)o++;return e.pos=o,!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,a,o,i=e.pos;return!!e.md.options.html&&(o=e.posMax,!(60!==e.src.charCodeAt(i)||i+2>=o)&&(!(33!==(n=e.src.charCodeAt(i+1))&&63!==n&&47!==n&&!function(e){var t=32|e;return t>=97&&t<=122}(n))&&(!!(a=e.src.slice(i).match(r))&&(t||(e.push("html_inline","",0).content=e.src.slice(i,i+a[0].length)),e.pos+=a[0].length,!0))))}},92560:function(e,t,n){"use strict";var r=n(39615).normalizeReference,a=n(39615).isSpace;e.exports=function(e,t){var n,o,i,s,c,l,u,d,p,m,h,g,f,b="",v=e.pos,k=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(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&&(o=e.src.charCodeAt(u),a(o)||10===o);u++);if(u>=k)return!1;for(f=u,(p=e.md.helpers.parseLinkDestination(e.src,u,e.posMax)).ok&&(b=e.md.normalizeLink(p.str),e.md.validateLink(b)?u=p.pos:b=""),f=u;u<k&&(o=e.src.charCodeAt(u),a(o)||10===o);u++);if(p=e.md.helpers.parseLinkTitle(e.src,u,e.posMax),u<k&&f!==u&&p.ok)for(m=p.str,u=p.pos;u<k&&(o=e.src.charCodeAt(u),a(o)||10===o);u++);else m="";if(u>=k||41!==e.src.charCodeAt(u))return e.pos=v,!1;u++}else{if(void 0===e.env.references)return!1;if(u<k&&91===e.src.charCodeAt(u)?(f=u+1,(u=e.md.helpers.parseLinkLabel(e,u))>=0?s=e.src.slice(f,u++):u=c+1):u=c+1,s||(s=e.src.slice(l,c)),!(d=e.env.references[r(s)]))return e.pos=v,!1;b=d.href,m=d.title}return t||(i=e.src.slice(l,c),e.md.inline.parse(i,e.md,e.env,g=[]),(h=e.push("image","img",0)).attrs=n=[["src",b],["alt",""]],h.children=g,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,a=n(39615).isSpace;e.exports=function(e,t){var n,o,i,s,c,l,u,d,p="",m="",h=e.pos,g=e.posMax,f=e.pos,b=!0;if(91!==e.src.charCodeAt(e.pos))return!1;if(c=e.pos+1,(s=e.md.helpers.parseLinkLabel(e,e.pos,!0))<0)return!1;if((l=s+1)<g&&40===e.src.charCodeAt(l)){for(b=!1,l++;l<g&&(o=e.src.charCodeAt(l),a(o)||10===o);l++);if(l>=g)return!1;if(f=l,(u=e.md.helpers.parseLinkDestination(e.src,l,e.posMax)).ok){for(p=e.md.normalizeLink(u.str),e.md.validateLink(p)?l=u.pos:p="",f=l;l<g&&(o=e.src.charCodeAt(l),a(o)||10===o);l++);if(u=e.md.helpers.parseLinkTitle(e.src,l,e.posMax),l<g&&f!==l&&u.ok)for(m=u.str,l=u.pos;l<g&&(o=e.src.charCodeAt(l),a(o)||10===o);l++);}(l>=g||41!==e.src.charCodeAt(l))&&(b=!0),l++}if(b){if(void 0===e.env.references)return!1;if(l<g&&91===e.src.charCodeAt(l)?(f=l+1,(l=e.md.helpers.parseLinkLabel(e,l))>=0?i=e.src.slice(f,l++):l=s+1):l=s+1,i||(i=e.src.slice(c,s)),!(d=e.env.references[r(i)]))return e.pos=h,!1;p=d.href,m=d.title}return t||(e.pos=c,e.posMax=s,e.push("link_open","a",1).attrs=n=[["href",p]],m&&n.push(["title",m]),e.md.inline.tokenize(e),e.push("link_close","a",-1)),e.pos=l,e.posMax=g,!0}},62378:function(e,t,n){"use strict";var r=n(39615).isSpace;e.exports=function(e,t){var n,a,o,i=e.pos;if(10!==e.src.charCodeAt(i))return!1;if(n=e.pending.length-1,a=e.posMax,!t)if(n>=0&&32===e.pending.charCodeAt(n))if(n>=1&&32===e.pending.charCodeAt(n-1)){for(o=n-1;o>=1&&32===e.pending.charCodeAt(o-1);)o--;e.pending=e.pending.slice(0,o),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(i++;i<a&&r(e.src.charCodeAt(i));)i++;return e.pos=i,!0}},25240:function(e,t,n){"use strict";var r=n(71872),a=n(39615).isWhiteSpace,o=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 a=new r(e,t,n),o=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),a.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(a),this.tokens_meta.push(o),a},s.prototype.scanDelims=function(e,t){var n,r,s,c,l,u,d,p,m,h=e,g=!0,f=!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,d=i(n)||o(String.fromCharCode(n)),m=i(r)||o(String.fromCharCode(r)),u=a(n),(p=a(r))?g=!1:m&&(u||d||(g=!1)),u?f=!1:d&&(p||m||(f=!1)),t?(c=g,l=f):(c=g&&(!f||d),l=f&&(!g||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,a,o,i,s=[],c=t.length;for(n=0;n<c;n++)126===(a=t[n]).marker&&-1!==a.end&&(o=t[a.end],(i=e.tokens[a.token]).type="s_open",i.tag="s",i.nesting=1,i.markup="~~",i.content="",(i=e.tokens[o.token]).type="s_close",i.tag="s",i.nesting=-1,i.markup="~~",i.content="","text"===e.tokens[o.token-1].type&&"~"===e.tokens[o.token-1].content&&s.push(o.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,a,o,i=e.pos,s=e.src.charCodeAt(i);if(t)return!1;if(126!==s)return!1;if(a=(r=e.scanDelims(e.pos,!0)).length,o=String.fromCharCode(s),a<2)return!1;for(a%2&&(e.push("text","",0).content=o,a--),n=0;n<a;n+=2)e.push("text","",0).content=o+o,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,a=e.tokens_meta.length;for(t(e,e.delimiters),n=0;n<a;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,a=e.tokens,o=e.tokens.length;for(t=n=0;t<o;t++)a[t].nesting<0&&r--,a[t].level=r,a[t].nesting>0&&r++,"text"===a[t].type&&t+1<o&&"text"===a[t+1].type?a[t+1].content=a[t].content+a[t+1].content:(t!==n&&(a[n]=a[t]),n++);t!==n&&(a.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 a;return"string"!=typeof r&&(r=n.defaultChars),a=function(e){var n,r,a=t[e];if(a)return a;for(a=t[e]=[],n=0;n<128;n++)r=String.fromCharCode(n),a.push(r);for(n=0;n<e.length;n++)a[r=e.charCodeAt(n)]="%"+("0"+r.toString(16).toUpperCase()).slice(-2);return a}(r),e.replace(/(%[a-f0-9]{2})+/gi,(function(e){var t,n,r,o,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+=a[r]:192==(224&r)&&t+3<n&&128==(192&(o=parseInt(e.slice(t+4,t+6),16)))?(l+=(c=r<<6&1984|63&o)<128?"��":String.fromCharCode(c),t+=3):224==(240&r)&&t+6<n&&(o=parseInt(e.slice(t+4,t+6),16),i=parseInt(e.slice(t+7,t+9),16),128==(192&o)&&128==(192&i))?(l+=(c=r<<12&61440|o<<6&4032|63&i)<2048||c>=55296&&c<=57343?"���":String.fromCharCode(c),t+=6):240==(248&r)&&t+9<n&&(o=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&o)&&128==(192&i)&&128==(192&s))?((c=r<<18&1835008|o<<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,a){var o,i,s,c,l,u="";for("string"!=typeof r&&(a=r,r=n.defaultChars),void 0===a&&(a=!0),l=function(e){var n,r,a=t[e];if(a)return a;for(a=t[e]=[],n=0;n<128;n++)r=String.fromCharCode(n),/^[0-9a-z]$/i.test(r)?a.push(r):a.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2));for(n=0;n<e.length;n++)a[e.charCodeAt(n)]=e[n];return a}(r),o=0,i=e.length;o<i;o++)if(s=e.charCodeAt(o),a&&37===s&&o+2<i&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3)))u+=e.slice(o,o+3),o+=2;else if(s<128)u+=l[s];else if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&o+1<i&&(c=e.charCodeAt(o+1))>=56320&&c<=57343){u+=encodeURIComponent(e[o]+e[o+1]),o++;continue}u+="%EF%BF%BD"}else u+=encodeURIComponent(e[o]);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]*$/,a=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,o=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),i=["'"].concat(o),s=["%","/","?",";","#"].concat(i),c=["/","?","#"],l=/^[+a-z0-9A-Z_-]{0,63}$/,u=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,d={javascript:!0,"javascript:":!0},p={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};t.prototype.parse=function(e,t){var r,o,i,m,h,g=e;if(g=g.trim(),!t&&1===e.split("#").length){var f=a.exec(g);if(f)return this.pathname=f[1],f[2]&&(this.search=f[2]),this}var b=n.exec(g);if(b&&(i=(b=b[0]).toLowerCase(),this.protocol=b,g=g.substr(b.length)),(t||b||g.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(h="//"===g.substr(0,2))||b&&d[b]||(g=g.substr(2),this.slashes=!0)),!d[b]&&(h||b&&!p[b])){var v,k,y=-1;for(r=0;r<c.length;r++)-1!==(m=g.indexOf(c[r]))&&(-1===y||m<y)&&(y=m);for(-1!==(k=-1===y?g.lastIndexOf("@"):g.lastIndexOf("@",y))&&(v=g.slice(0,k),g=g.slice(k+1),this.auth=v),y=-1,r=0;r<s.length;r++)-1!==(m=g.indexOf(s[r]))&&(-1===y||m<y)&&(y=m);-1===y&&(y=g.length),":"===g[y-1]&&y--;var w=g.slice(0,y);g=g.slice(y),this.parseHost(w),this.hostname=this.hostname||"";var E="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!E){var _=this.hostname.split(/\./);for(r=0,o=_.length;r<o;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 P=_.slice(0,r),N=_.slice(r+1),L=C.match(u);L&&(P.push(L[1]),N.unshift(L[2])),N.length&&(g=N.join(".")+g),this.hostname=P.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),E&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var T=g.indexOf("#");-1!==T&&(this.hash=g.substr(T),g=g.slice(0,T));var A=g.indexOf("?");return-1!==A&&(this.search=g.substr(A),g=g.slice(0,A)),g&&(this.pathname=g),p[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}},1488:function(){},56878:function(){},40888:function(){},59961:function(){},73443:function(){},78296:function(){},44046:function(){},7679:function(){},15184:function(){},9170:function(){},32295:function(){},61154:function(){},46154:function(){},91680:function(){},49304:function(){},27212:function(){},5609:function(){},58449:function(){},62103:function(e,t){"use strict";t.Z={button:"zI5tJ_qhWE6Oe6Lk75GY","is-icon-button":"tuBt2DLqimiImoqVzPqo",small:"Na39I683LAaSA99REg14",normal:"ipS7tKy9GntCS4R3vekF",icon:"paGLQwtPEaJmtArCcmyK",regular:"lZAo6_oGfclXOO9CC6Rd","full-width":"xJDOiJxTt0R_wSl8Ipz_",loading:"q_tVWqMjl39RcY6WtQA6","external-icon":"CDuBjJp_8jxzx5j6Nept"}},45460:function(e,t){"use strict";t.Z={"star-icon":"cuoSlhSNrqf1dozY22Xb",jetpack:"lAIiifeLMmZAPlQ9n9ZR","checkmark-icon":"JLquNpQVlysAamuh5lJO",socialIcon:"cbOwD8Y4tFjwimmtchQI",facebook:"aHOlEBGD5EA8NKRw3xTw",instagram:"cL3m0xBYTYhIKI7lCqDB",twitter:"af4Y_zItXvLAOEoSDPSv",linkedin:"f68aqF3XSD1OBvXR1get",tumblr:"xFI0dt3UiXRlRQdqPWkx",google:"q7JEoyymveP6kF747M43",mastodon:"DKOBOTVmTLbh26gUH_73",whatsapp:"fftumuc_lJ6v0tq4UMVR"}},49710:function(e,t){"use strict";t.Z={sm:"(max-width: 599px)",md:"(min-width: 600px) and (max-width: 959px)",lg:"(min-width: 960px)"}},46409:function(e,t){"use strict";t.Z={placeholder:"NisihrgiIKl_knpYJtfg",pulse:"R2i0K45dEF157drbVRPI"}},48026:function(){},85837:function(e,t){"use strict";t.Z={reset:"WQVtrU6q0L1Igcj7wCrQ","headline-medium":"UujoBFTnQNY2cWU2SIsH","headline-small":"TeGO5V_thHw5lDAm1_2M","headline-small-regular":"WolQzb2MsSgiNmLtc7_j","title-medium":"hUB0JT8p1T2Hw28N6qC8","title-medium-semi-bold":"gKZWDv5chz3_O3Syp74H","title-small":"zY2No8Ga4b8shbOQGhnv",body:"tIj0D1t8Cc892ikmgFPZ","body-small":"KdcN0BnOaVeVhyLRKqhS","body-extra-small":"dso3Rh3tl3Xv1GumBktz","body-extra-small-bold":"mQ1UlbN9u4Mg9byO8m7v",label:"PItlW5vRExLnTj4a8eLE","m-0":"TwRpPlktzxhmFVeua7P5","mx-0":"zVfqx7gyb3o9mxfGynn1","my-0":"iSHVzNiB9iVleGljaQxy","mt-0":"xqDIp6cNVr_E6RXaiPyD","mr-0":"S8EwaXk1kyPizt6x4WH2","mb-0":"ODX5Vr1TARoLFkDDFooD","ml-0":"cphJ8dCpfimnky7P2FHg","m-1":"PFgIhNxIyiSuNvQjAIYj","mx-1":"M2jKmUzDxvJjjVEPU3zn","my-1":"io15gAh8tMTNbSEfwJKk","mt-1":"rcTN5uw9xIEeMEGL3Xi_","mr-1":"CQSkybjq2TcRM1Xo9COV","mb-1":"hfqOWgq6_MEGdFE82eOY","ml-1":"I8MxZQYTbuu595yfesWA","m-2":"kQkc6rmdpvLKPkyoJtVQ","mx-2":"j6vFPxWuu4Jan2ldoxpp","my-2":"hqr39dC4H_AbactPAkCG","mt-2":"c3dQnMi16C6J6Ecy4283","mr-2":"YNZmHOuRo6hU7zzKfPdP","mb-2":"Db8lbak1_wunpPk8NwKU","ml-2":"ftsYE5J9hLzquQ0tA5dY","m-3":"Det4MHzLUW7EeDnafPzq","mx-3":"h_8EEAztC29Vve1datb5","my-3":"YXIXJ0h1k47u6hzK8KcM","mt-3":"soADBBkcIKCBXzCTuV9_","mr-3":"zSX59ziEaEWGjnpZa4uV","mb-3":"yrVTnq_WBMbejg89c2ZQ","ml-3":"UKtHPJnI2cXBWtPDm5hM","m-4":"guexok_Tqd5Tf52hRlbT","mx-4":"oS1E2KfTBZkJ3F0tN7T6","my-4":"DN1OhhXi6AoBgEdDSbGd","mt-4":"ot2kkMcYHv53hLZ4LSn0","mr-4":"A1krOZZhlQ6Sp8Cy4bly","mb-4":"pkDbXXXL32237M0hokEh","ml-4":"XXv4kDTGvEnQeuGKOPU3","m-5":"yGqHk1a57gaISwkXwXe6","mx-5":"X8cghM358X3DkXLc9aNK","my-5":"GdfSmGwHlFnN2S6xBn1f","mt-5":"yqeuzwyGQ7zG0avrGqi_","mr-5":"g9emeCkuHvYhveiJbfXO","mb-5":"Lvk3dqcyHbZ07QCRlrUQ","ml-5":"r3yQECDQ9qX0XZzXlVAg","m-6":"aQhlPwht2Cz1X_63Miw0","mx-6":"JyHb0vK3wJgpblL9s5j8","my-6":"cY2gULL1lAv6WPNIRuf3","mt-6":"NBWQ9Lwhh_fnry3lg_p7","mr-6":"yIOniNe5E40C8fWvBm5V","mb-6":"t30usboNSyqfQWIwHvT3","ml-6":"Nm_TyFkYCMhOoghoToKJ","m-7":"C4qJKoBXpgKtpmrqtEKB","mx-7":"S93Srbu6NQ_PBr7DmTiD","my-7":"fJj8k6gGJDks3crUZxOS","mt-7":"cW6D6djs7Ppm7fD7TeoV","mr-7":"DuCnqNfcxcP3Z__Yo5Ro","mb-7":"im8407m2fw5vOg7O2zsw","ml-7":"G0fbeBgvz2sh3uTP9gNl","m-8":"kvW3sBCxRxUqz1jrVMJl","mx-8":"tOjEqjLONQdkiYx_XRnw","my-8":"op5hFSx318zgxsoZZNLN","mt-8":"c9WfNHP6TFKWIfLxv52J","mr-8":"sBA75QqcqRwwYSHJh2wc","mb-8":"GpL6idrXmSOM6jB8Ohsf","ml-8":"HbtWJoQwpgGycz8dGzeT","p-0":"uxX3khU88VQ_Ah49Ejsa","px-0":"KX0FhpBKwKzs9fOUdbNz","py-0":"PfK8vKDyN32dnimlzYjz","pt-0":"emxLHRjQuJsImnPbQIzE","pr-0":"kJ8WzlpTVgdViXt8ukP9","pb-0":"tg_UIUI11VBzrTAn2AzJ","pl-0":"uczvl8kaz84oPQJ2DB2R","p-1":"o7UHPcdVK3lt7q3lqV4o","px-1":"IDqEOxvDoYrFYxELPmtX","py-1":"DdywPW2qSYlu2pt8tpO2","pt-1":"npy3hw4A5QSkDicb2CJJ","pr-1":"LgbptTApNY5NwLQvEFAt","pb-1":"WZQy2SZuZso59bUsXXyl","pl-1":"o331apInxNunbYB3SfPE","p-2":"fMPIyD9Vqki1Lrc_yJnG","px-2":"i2pMcTcdrr10IQoiSm_L","py-2":"eA702gn32kwptiI1obXH","pt-2":"o9bGieUKcYc8o0Ij9oZX","pr-2":"SwZcFez1RDqWsOFjB5iG","pb-2":"eHpLc_idmuEqeqCTvqkN","pl-2":"vU39i2B4P1fUTMB2l6Vo","p-3":"JHWNzBnE29awhdu5BEh1","px-3":"X72lGbb56L3KFzC2xQ9N","py-3":"BzfNhRG8wXdCEB5ocQ6e","pt-3":"srV0KSDC83a2fiimSMMQ","pr-3":"lUWfkmbQjCskhcNwkyCm","pb-3":"Ts0dIlc3aTSL7V4cIHis","pl-3":"CzlqQXXhX6MvorArFZ8B","p-4":"TqMPkQtR_DdZuKb5vBoV","px-4":"a7UrjhI69Vetlcj9ZVzz","py-4":"StEhBzGs2Gi5dDEkjhAv","pt-4":"FGneZfZyvYrt1dG0zcnm","pr-4":"APEH216rpdlJWgD2fHc8","pb-4":"oGwXC3ohCic9XnAj6x69","pl-4":"U6gnT9y42ViPNOcNzBwb","p-5":"IpdRLBwnHqbqFrixgbYC","px-5":"HgNeXvkBa9o3bQ5fvFZm","py-5":"tJtFZM3XfPG9v9TSDfN1","pt-5":"PdifHW45QeXYfK568uD8","pr-5":"mbLkWTTZ0Za_BBbFZ5b2","pb-5":"vVWpZpLlWrkTt0hMk8XU","pl-5":"RxfaJj5a1Nt6IavEo5Zl","p-6":"SppJULDGdnOGcjZNCYBy","px-6":"palY2nLwdoyooPUm9Hhk","py-6":"WYw1JvZC0ppLdvSAPhr_","pt-6":"YEEJ9b90ueQaPfiU8aeN","pr-6":"QE0ssnsKvWJMqlhPbY5u","pb-6":"n8yA3jHlMRyLd5UIfoND","pl-6":"tXHmxYnHzbwtfxEaG51n","p-7":"kBTsPKkO_3g_tLkj77Um","px-7":"RyhrFx6Y1FGDrGAAyaxm","py-7":"CBwRpB0bDN3iEdQPPMJO","pt-7":"vQVSq6SvWKbOMu6r4H6b","pr-7":"oBy5__aEADMsH46mrgFX","pb-7":"KVEXoJqf1s92j0JMdNmN","pl-7":"ZMXGNrNaKW3k_3TLz0Fq","p-8":"tuiR9PhkHXhGyEgzRZRI","px-8":"U7454qyWkQNa2iaSJziu","py-8":"VLYIv2GVocjuN93e8HC8","pt-8":"X1rm9DQ1zLGLfogja5Gn","pr-8":"JS7G6kAuqJo5GIuF8S5t","pb-8":"Y8F9ga1TDCMbM1lj4gUz","pl-8":"AJuyNGrI63BOWql719H8"}},93468:function(e,t){"use strict";t.Z={global:"_fUXxnSp5pagKBp9gSN7"}},91853:function(e,t){"use strict";t.Z={"connection-container":"KQcQQLxH5fI08DfOlKwL"}},75631:function(e,t){"use strict";t.Z={"connections-list":"Ua6eKcnk_tQQpFlgXMSn","components-notice":"SHqrIEguRfCILRHPyxE9","upgrade-link":"ABTyknbLXdzwcEZeSGzL","more-link":"ejyuBjiLmHz_UTFmBnjA","change-settings-button":"smqXe_da1eoP4Agql_Cs"}},58487:function(e,t){"use strict";t.Z={container:"OWstrHF6QZdaosKs0b6j",hidden:"HJMFrbZ0khdkKKkocrIK"}},69339:function(e,t){"use strict";t.Z={"preview-wrapper":"cZuW54OEuUN9yvuE_rNU","preview-image":"vCs0BOExDMOystFhG2wa",container:"sKpch49QzrpontC0DvF7",subtitle:"vOO47kVjHn7i63fQ0bx0",preview:"ziE_jq4PmQmGBedGskf_",remove:"qqGj0rmSJvZs9dyr0u_I","remove-loading":"TJGgifcTHqUtknPqVQpH"}},45811:function(e,t){"use strict";t.Z={wrapper:"f92zWdEJJIwBvwH5rRzn",disabled:"rBTOWyeewE4VxAqYgjoI","preview-wrapper":"PykCvaqoL7AIDzVKJAtg",notice:"SSMDWFYkP44va5KqPpTP"}},82283:function(e,t){"use strict";t.Z={notice:"ptn8jt555LOvMXWaoLxs","notice--default":"IVzciZv5S5E8XgR5EsLp","notice--highlight":"OpbDsm3F65Z4K5Bz43cz","notice--warning":"dlrSwB0tyuf1TYcypDec","notice--error":"hkpqil8E11PObwu7TVU2",content:"AeqtA3GRe7sFjKaC9SqL",dismiss:"IArBTmNL2K4du5WPBUhg",actions:"T7E2eJJN4qjwPpv3mcjV"}},57304:function(e,t){"use strict";t.Z={content:"Vawsi8FJj0_bwDlmqOFF","one-click-sharing-dropdown":"OZwNgZ0dZRVWXlt2mh0b",description:"CUTafeONRhrdQ9eTKheK",divider:"H_Wm8jQNtitcC_Vqw13g",icon:"jDdO0nGpRT4oo_SZXcCm","icon-button":"L5QzIP0Ci1eKzZJWJlef"}},16184:function(e,t){"use strict";t.Z={modal:"XmuCNrGsLYQByhJnp67p",title:"k0DEuc7JicCz84H9KVFG",description:"bMaVKxkshd3CxoxGyuUb",container:"jJba3ncltxUL8pBRzXf4",column:"Xyr79UzajLuZhUDjce5m","second-column":"NglToroViB0KfIbRmgrA",sharing:"Rd3gXgqLYgt9HmUbLIWN",background:"oNDRCEJEClomzbVKdSit",illustration:"tZBSPoQkl7sbPqND1_AN"}},23761:function(e,t){"use strict";t.Z={"one-click-share-dropdown":"KJEP5lX2FUqB3qX8M6k2",panel:"U_WW2qLSQA71SJYyITOq"}},67454:function(e,t){"use strict";t.Z={description:"hLWF3k_vdozDEd6U746R"}},2097:function(e,t){"use strict";t.Z={prompt:"CW7R8fRQqVKfyXFYiNWR",buttons:"n34j0qWq2EZzYl1jAiej",button:"aIuCL8MdydCJGcrOqp4x",header:"qegtnlYWDc3UnIGPRlQb"}},78619:function(e,t){"use strict";t.Z={"settings-link":"ZuktxapayvvIV1xDFrTG"}},30664:function(e,t){"use strict";t.Z={"share-buttons":"JUeclE9CucaXRlTL5K9H",x:"rhyZKz4FQtFOFAMwLgLj",whatsapp:"DDRhGoqXUOM6Jug54nEB",clipboard:"tvNWJpaNzPro4QaItBae",vertical:"p_VTpBCFklSkcb0iiD0K",container:"DyIAUIn_2bkciyB_XtgH",label:"Lx8xScOApJmJdhJF9JWd"}},40088:function(e,t){"use strict";t.Z={templateControl:"tfWupx32Rn5hHqVjTzui",customText:"qu9UsV1EEFeFxhU3Wgt5",mediaPicker:"nZhgKYFn6MQoIDGcKrUG"}},15214:function(){"use strict"},47320:function(e,t){"use strict";t.Z={templates:"m9360_cMWKFHTNk9xpNz",template:"j4EvSJfKIJLGEIAETiEY","template--active":"dQb3Zpl0puk4V6ezZslo"}},89696:function(e,t){"use strict";t.Z={checkbox:"NWFjHxAKqZPzk0O6w4IF",disabled:"gLaHzq2GjbiHJ5It_wy3"}},28161:function(e,t){"use strict";t.Z={"publicize-notice":"__nV49on4_ijaV8Brnsw","components-notice":"zZ3Pu7E87XyYIdPR2WTt","components-button":"fLC8AaLf3xcKaoJ4Opax"}},87728:function(e,t){"use strict";t.Z={wrapper:"sP1aklNMfj7lCDxuhWaq",progress:"a6tcXi51GAewl3qx0AVi",duration:"uFtCCGeycoI94JbCnJh8"}},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,a=24*r,o=7*a,i=365.25*a;function s(e,t,n,r){var a=t>=1.5*n;return Math.round(e/n)+" "+r+(a?"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*o;case"days":case"day":case"d":return c*a;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 o=Math.abs(e);if(o>=a)return s(e,o,a,"day");if(o>=r)return s(e,o,r,"hour");if(o>=n)return s(e,o,n,"minute");if(o>=t)return s(e,o,t,"second");return e+" ms"}(e):function(e){var o=Math.abs(e);if(o>=a)return Math.round(e/a)+"d";if(o>=r)return Math.round(e/r)+"h";if(o>=n)return Math.round(e/n)+"m";if(o>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},68308:function(e,t,n){"use strict";n.d(t,{B:function(){return i}});var r=n(97740),a=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],o=/[^A-Z0-9]+/gi;function i(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,i=void 0===n?a:n,c=t.stripRegexp,l=void 0===c?o:c,u=t.transform,d=void 0===u?r.U:u,p=t.delimiter,m=void 0===p?" ":p,h=s(s(e,i,"$1\0$2"),l,"\0"),g=0,f=h.length;"\0"===h.charAt(g);)g++;for(;"\0"===h.charAt(f-1);)f--;return h.slice(g,f).split("\0").map(d).join(m)}function 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 o}});var r=n(38697),a=n(77352);function o(e,t){return void 0===t&&(t={}),(0,a.$)(e,(0,r.pi)({delimiter:"-"},t))}},72867:function(e,t,n){"use strict";n.d(t,{By:function(){return o},Ho:function(){return s},Pv:function(){return i}});var r=n(38697),a=n(68308);function o(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,a.B)(e,(0,r.pi)({delimiter:"",transform:o},t))}},76559:function(e,t,n){"use strict";n.d(t,{Y:function(){return o}});var r=n(38697),a=n(77352);function o(e,t){return void 0===t&&(t={}),(0,a.$)(e,(0,r.pi)({delimiter:"/"},t))}},69424:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(94273),a=n.n(r),o=n(53191),i=n.n(o),s=n(51128),c=n.n(s)()("photon"),l={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},u="__domain__.invalid",d="http://".concat(u),p="https://i0.wp.com";function m(e,t){var n;try{n=new URL(e,d)}catch(e){return null}var r,o,s,m,h,g="https:"===n.protocol,f=new URL(p);if(h=n.host,/^i[0-2]\.wp\.com$/.test(h))f.pathname=n.pathname,f.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),f.pathname=b,f.hostname=(r=b,o=a()(r),s=i()(o),m="i"+Math.floor(3*s()),c('determined server "%s" to use with "%s"',m,r),m+".wp.com"),g&&f.searchParams.set("ssl",1)}if(t)for(var v in t)"host"!==v&&"hostname"!==v?"secure"!==v||t[v]?f.searchParams.set(l[v]||v,t[v]):f.protocol="http:":f.hostname=t[v];return c("generated Photon URL: %s",f.href),f.href}},469:function(e,t,n){"use strict";var r=n(90758);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,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:o,resetWarningCache:a};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"},28918:function(e,t,n){"use strict";n.d(t,{ZP:function(){return P}});var r,a=n(99196),o=n.n(a),i=Object.defineProperty,s=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,u=(e,t,n)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,d=(e,t)=>{for(var n in t||(t={}))c.call(t,n)&&u(e,n,t[n]);if(s)for(var n of s(t))l.call(t,n)&&u(e,n,t[n]);return e},p=(e,t)=>{var n={};for(var r in e)c.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&s)for(var r of s(e))t.indexOf(r)<0&&l.call(e,r)&&(n[r]=e[r]);return n};(e=>{const t=class{constructor(e,n,r,a){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(a<-1||a>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let i=[];for(let e=0;e<this.size;e++)i.push(!1);for(let e=0;e<this.size;e++)this.modules.push(i.slice()),this.isFunction.push(i.slice());this.drawFunctionPatterns();const s=this.addEccAndInterleave(r);if(this.drawCodewords(s),-1==a){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const n=this.getPenaltyScore();n<e&&(a=t,e=n),this.applyMask(t)}}o(0<=a&&a<=7),this.mask=a,this.applyMask(a),this.drawFormatBits(a),this.isFunction=[]}static encodeText(n,r){const a=e.QrSegment.makeSegments(n);return t.encodeSegments(a,r)}static encodeBinary(n,r){const a=e.QrSegment.makeBytes(n);return t.encodeSegments([a],r)}static encodeSegments(e,n,a=1,i=40,c=-1,l=!0){if(!(t.MIN_VERSION<=a&&a<=i&&i<=t.MAX_VERSION)||c<-1||c>7)throw new RangeError("Invalid value");let u,d;for(u=a;;u++){const r=8*t.getNumDataCodewords(u,n),a=s.getTotalBits(e,u);if(a<=r){d=a;break}if(u>=i)throw new RangeError("Data too long")}for(const e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])l&&d<=8*t.getNumDataCodewords(u,e)&&(n=e);let p=[];for(const t of e){r(t.mode.modeBits,4,p),r(t.numChars,t.mode.numCharCountBits(u),p);for(const e of t.getData())p.push(e)}o(p.length==d);const m=8*t.getNumDataCodewords(u,n);o(p.length<=m),r(0,Math.min(4,m-p.length),p),r(0,(8-p.length%8)%8,p),o(p.length%8==0);for(let e=236;p.length<m;e^=253)r(e,8,p);let h=[];for(;8*h.length<p.length;)h.push(0);return p.forEach(((e,t)=>h[t>>>3]|=e<<7-(7&t))),new t(u,n,h,c)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let r=0;r<t;r++)0==n&&0==r||0==n&&r==t-1||n==t-1&&0==r||this.drawAlignmentPattern(e[n],e[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let n=t;for(let e=0;e<10;e++)n=n<<1^1335*(n>>>9);const r=21522^(t<<10|n);o(r>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,a(r,e));this.setFunctionModule(8,7,a(r,6)),this.setFunctionModule(8,8,a(r,7)),this.setFunctionModule(7,8,a(r,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,a(r,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,a(r,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,a(r,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;o(t>>>18==0);for(let e=0;e<18;e++){const n=a(t,e),r=this.size-11+e%3,o=Math.floor(e/3);this.setFunctionModule(r,o,n),this.setFunctionModule(o,r,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){const a=Math.max(Math.abs(r),Math.abs(n)),o=e+r,i=t+n;0<=o&&o<this.size&&0<=i&&i<this.size&&this.setFunctionModule(o,i,2!=a&&4!=a)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)this.setFunctionModule(e+r,t+n,1!=Math.max(Math.abs(r),Math.abs(n)))}setFunctionModule(e,t,n){this.modules[t][e]=n,this.isFunction[t][e]=!0}addEccAndInterleave(e){const n=this.version,r=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(n,r))throw new RangeError("Invalid argument");const a=t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][n],i=t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][n],s=Math.floor(t.getNumRawDataModules(n)/8),c=a-s%a,l=Math.floor(s/a);let u=[];const d=t.reedSolomonComputeDivisor(i);for(let n=0,r=0;n<a;n++){let a=e.slice(r,r+l-i+(n<c?0:1));r+=a.length;const o=t.reedSolomonComputeRemainder(a,d);n<c&&a.push(0),u.push(a.concat(o))}let p=[];for(let e=0;e<u[0].length;e++)u.forEach(((t,n)=>{(e!=l-i||n>=c)&&p.push(t[e])}));return o(p.length==s),p}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let r=0;r<this.size;r++)for(let o=0;o<2;o++){const i=t-o,s=0==(t+1&2)?this.size-1-r:r;!this.isFunction[s][i]&&n<8*e.length&&(this.modules[s][i]=a(e[n>>>3],7-(7&n)),n++)}}o(n==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let n=0;n<this.size;n++){let r;switch(e){case 0:r=(n+t)%2==0;break;case 1:r=t%2==0;break;case 2:r=n%3==0;break;case 3:r=(n+t)%3==0;break;case 4:r=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:r=n*t%2+n*t%3==0;break;case 6:r=(n*t%2+n*t%3)%2==0;break;case 7:r=((n+t)%2+n*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][n]&&r&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let e=0;for(let n=0;n<this.size;n++){let r=!1,a=0,o=[0,0,0,0,0,0,0];for(let i=0;i<this.size;i++)this.modules[n][i]==r?(a++,5==a?e+=t.PENALTY_N1:a>5&&e++):(this.finderPenaltyAddHistory(a,o),r||(e+=this.finderPenaltyCountPatterns(o)*t.PENALTY_N3),r=this.modules[n][i],a=1);e+=this.finderPenaltyTerminateAndCount(r,a,o)*t.PENALTY_N3}for(let n=0;n<this.size;n++){let r=!1,a=0,o=[0,0,0,0,0,0,0];for(let i=0;i<this.size;i++)this.modules[i][n]==r?(a++,5==a?e+=t.PENALTY_N1:a>5&&e++):(this.finderPenaltyAddHistory(a,o),r||(e+=this.finderPenaltyCountPatterns(o)*t.PENALTY_N3),r=this.modules[i][n],a=1);e+=this.finderPenaltyTerminateAndCount(r,a,o)*t.PENALTY_N3}for(let n=0;n<this.size-1;n++)for(let r=0;r<this.size-1;r++){const a=this.modules[n][r];a==this.modules[n][r+1]&&a==this.modules[n+1][r]&&a==this.modules[n+1][r+1]&&(e+=t.PENALTY_N2)}let n=0;for(const e of this.modules)n=e.reduce(((e,t)=>e+(t?1:0)),n);const r=this.size*this.size,a=Math.ceil(Math.abs(20*n-10*r)/r)-1;return o(0<=a&&a<=9),e+=a*t.PENALTY_N4,o(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2));let n=[6];for(let r=this.size-7;n.length<e;r-=t)n.splice(1,0,r);return n}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return o(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let n=[];for(let t=0;t<e-1;t++)n.push(0);n.push(1);let r=1;for(let a=0;a<e;a++){for(let e=0;e<n.length;e++)n[e]=t.reedSolomonMultiply(n[e],r),e+1<n.length&&(n[e]^=n[e+1]);r=t.reedSolomonMultiply(r,2)}return n}static reedSolomonComputeRemainder(e,n){let r=n.map((e=>0));for(const a of e){const e=a^r.shift();r.push(0),n.forEach(((n,a)=>r[a]^=t.reedSolomonMultiply(n,e)))}return r}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw new RangeError("Byte out of range");let n=0;for(let r=7;r>=0;r--)n=n<<1^285*(n>>>7),n^=(t>>>r&1)*e;return o(n>>>8==0),n}finderPenaltyCountPatterns(e){const t=e[1];o(t<=3*this.size);const n=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(n&&e[0]>=4*t&&e[6]>=t?1:0)+(n&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};let n=t;function r(e,t,n){if(t<0||t>31||e>>>t!=0)throw new RangeError("Value out of range");for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function a(e,t){return 0!=(e>>>t&1)}function o(e){if(!e)throw new Error("Assertion error")}n.MIN_VERSION=1,n.MAX_VERSION=40,n.PENALTY_N1=3,n.PENALTY_N2=3,n.PENALTY_N3=40,n.PENALTY_N4=10,n.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],n.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=n;const i=class{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw new RangeError("Invalid argument");this.bitData=n.slice()}static makeBytes(e){let t=[];for(const n of e)r(n,8,t);return new i(i.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!i.isNumeric(e))throw new RangeError("String contains non-numeric characters");let t=[];for(let n=0;n<e.length;){const a=Math.min(e.length-n,3);r(parseInt(e.substr(n,a),10),3*a+1,t),n+=a}return new i(i.Mode.NUMERIC,e.length,t)}static makeAlphanumeric(e){if(!i.isAlphanumeric(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let t,n=[];for(t=0;t+2<=e.length;t+=2){let a=45*i.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t));a+=i.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t+1)),r(a,11,n)}return t<e.length&&r(i.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t)),6,n),new i(i.Mode.ALPHANUMERIC,e.length,n)}static makeSegments(e){return""==e?[]:i.isNumeric(e)?[i.makeNumeric(e)]:i.isAlphanumeric(e)?[i.makeAlphanumeric(e)]:[i.makeBytes(i.toUtf8ByteArray(e))]}static makeEci(e){let t=[];if(e<0)throw new RangeError("ECI assignment value out of range");if(e<128)r(e,8,t);else if(e<16384)r(2,2,t),r(e,14,t);else{if(!(e<1e6))throw new RangeError("ECI assignment value out of range");r(6,3,t),r(e,21,t)}return new i(i.Mode.ECI,0,t)}static isNumeric(e){return i.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return i.ALPHANUMERIC_REGEX.test(e)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let n=0;for(const r of e){const e=r.mode.numCharCountBits(t);if(r.numChars>=1<<e)return 1/0;n+=4+e+r.bitData.length}return n}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)"%"!=e.charAt(n)?t.push(e.charCodeAt(n)):(t.push(parseInt(e.substr(n+1,2),16)),n+=2);return t}};let s=i;s.NUMERIC_REGEX=/^[0-9]*$/,s.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,s.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",e.QrSegment=s})(r||(r={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};let n=t;n.LOW=new t(0,1),n.MEDIUM=new t(1,0),n.QUARTILE=new t(2,3),n.HIGH=new t(3,2),e.Ecc=n})(t=e.QrCode||(e.QrCode={}))})(r||(r={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};let n=t;n.NUMERIC=new t(1,[10,12,14]),n.ALPHANUMERIC=new t(2,[9,11,13]),n.BYTE=new t(4,[8,16,16]),n.KANJI=new t(8,[8,10,12]),n.ECI=new t(7,[0,0,0]),e.Mode=n})(t=e.QrSegment||(e.QrSegment={}))})(r||(r={}));var m=r,h={L:m.QrCode.Ecc.LOW,M:m.QrCode.Ecc.MEDIUM,Q:m.QrCode.Ecc.QUARTILE,H:m.QrCode.Ecc.HIGH},g=128,f="L",b="#FFFFFF",v="#000000",k=!1,y=4,w=.1;function E(e,t=0){const n=[];return e.forEach((function(e,r){let a=null;e.forEach((function(o,i){if(!o&&null!==a)return n.push(`M${a+t} ${r+t}h${i-a}v1H${a+t}z`),void(a=null);if(i!==e.length-1)o&&null===a&&(a=i);else{if(!o)return;null===a?n.push(`M${i+t},${r+t} h1v1H${i+t}z`):n.push(`M${a+t},${r+t} h${i+1-a}v1H${a+t}z`)}}))})),n.join("")}function _(e,t){return e.slice().map(((e,n)=>n<t.y||n>=t.y+t.h?e:e.map(((e,n)=>(n<t.x||n>=t.x+t.w)&&e))))}function C(e,t,n,r){if(null==r)return null;const a=n?y:0,o=e.length+2*a,i=Math.floor(t*w),s=o/t,c=(r.width||i)*s,l=(r.height||i)*s,u=null==r.x?e.length/2-c/2:r.x*s,d=null==r.y?e.length/2-l/2:r.y*s;let p=null;if(r.excavate){let e=Math.floor(u),t=Math.floor(d);p={x:e,y:t,w:Math.ceil(c+u-e),h:Math.ceil(l+d-t)}}return{x:u,y:d,h:l,w:c,excavation:p}}var S=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}();function j(e){const t=e,{value:n,size:r=g,level:i=f,bgColor:s=b,fgColor:c=v,includeMargin:l=k,style:u,imageSettings:w}=t,j=p(t,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),x=null==w?void 0:w.src,P=(0,a.useRef)(null),N=(0,a.useRef)(null),[L,T]=(0,a.useState)(!1);(0,a.useEffect)((()=>{if(null!=P.current){const e=P.current,t=e.getContext("2d");if(!t)return;let a=m.QrCode.encodeText(n,h[i]).getModules();const o=l?y:0,u=a.length+2*o,d=C(a,r,l,w),p=N.current,g=null!=d&&null!==p&&p.complete&&0!==p.naturalHeight&&0!==p.naturalWidth;g&&null!=d.excavation&&(a=_(a,d.excavation));const f=window.devicePixelRatio||1;e.height=e.width=r*f;const b=r/u*f;t.scale(b,b),t.fillStyle=s,t.fillRect(0,0,u,u),t.fillStyle=c,S?t.fill(new Path2D(E(a,o))):a.forEach((function(e,n){e.forEach((function(e,r){e&&t.fillRect(r+o,n+o,1,1)}))})),g&&t.drawImage(p,d.x+o,d.y+o,d.w,d.h)}})),(0,a.useEffect)((()=>{T(!1)}),[x]);const A=d({height:r,width:r},u);let I=null;return null!=x&&(I=o().createElement("img",{src:x,key:x,style:{display:"none"},onLoad:()=>{T(!0)},ref:N})),o().createElement(o().Fragment,null,o().createElement("canvas",d({style:A,height:r,width:r,ref:P},j)),I)}function x(e){const t=e,{value:n,size:r=g,level:a=f,bgColor:i=b,fgColor:s=v,includeMargin:c=k,imageSettings:l}=t,u=p(t,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let w=m.QrCode.encodeText(n,h[a]).getModules();const S=c?y:0,j=w.length+2*S,x=C(w,r,c,l);let P=null;null!=l&&null!=x&&(null!=x.excavation&&(w=_(w,x.excavation)),P=o().createElement("image",{xlinkHref:l.src,height:x.h,width:x.w,x:x.x+S,y:x.y+S,preserveAspectRatio:"none"}));const N=E(w,S);return o().createElement("svg",d({height:r,width:r,viewBox:`0 0 ${j} ${j}`},u),o().createElement("path",{fill:i,d:`M0,0 h${j}v${j}H0z`,shapeRendering:"crispEdges"}),o().createElement("path",{fill:s,d:N,shapeRendering:"crispEdges"}),P)}var P=e=>{const t=e,{renderAs:n}=t,r=p(t,["renderAs"]);return"svg"===n?o().createElement(x,d({},r)):o().createElement(j,d({},r))}},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 a(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var r,o,i=[];for(o in"string"!=typeof t&&(t="?"),e)if(n.call(e,o)){if((r=e[o])||null!=r&&!isNaN(r)||(r=""),o=a(o),r=a(r),null===o||null===r)continue;i.push(o+"="+r)}return i.length?t+i.join("&"):""},t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,a={};t=n.exec(e);){var o=r(t[1]),i=r(t[2]);null===o||null===i||o in a||(a[o]=i)}return a}},51516:function(e,t,n){"use strict";var r=n(91850);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},22552:function(e,t,n){"use strict";var r=n(99196),a=n(19905),o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],_n=!0,r=!1,a=void 0;try{for(var o,i=e[Symbol.iterator]();!(_n=(o=i.next()).done)&&(n.push(o.value),!t||n.length!==t);_n=!0);}catch(e){r=!0,a=e}finally{try{!_n&&i.return&&i.return()}finally{if(r)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=a.Gb&&a.WD;t.Z=function(){var e=(0,a.XO)(),t=o(e,1)[0],n=(0,r.useState)(t),s=o(n,2),c=s[0],l=s[1];return(0,r.useEffect)((function(){if(i){var e=function(){var e=(0,a.XO)(),t=o(e,1)[0];l(t)};return document.addEventListener(a.WD.event,e),function(){document.removeEventListener(a.WD.event,e)}}}),[]),c}},19905:function(e,t,n){"use strict";n.d(t,{Gb:function(){return o},WD:function(){return i},XO:function(){return s}});var r="undefined"!=typeof document,a=[{hidden:"hidden",event:"visibilitychange",state:"visibilityState"},{hidden:"webkitHidden",event:"webkitvisibilitychange",state:"webkitVisibilityState"},{hidden:"mozHidden",event:"mozvisibilitychange",state:"mozVisibilityState"},{hidden:"msHidden",event:"msvisibilitychange",state:"msVisibilityState"},{hidden:"oHidden",event:"ovisibilitychange",state:"oVisibilityState"}],o=r&&Boolean(document.addEventListener),i=function(){if(!o)return null;var e=!0,t=!1,n=void 0;try{for(var r,i=a[Symbol.iterator]();!(e=(r=i.next()).done);e=!0){var s=r.value;if(s.hidden in document)return s}}catch(e){t=!0,n=e}finally{try{!e&&i.return&&i.return()}finally{if(t)throw n}}return null}(),s=function(){if(!i)return[!0,"visible"];var e=i.hidden,t=i.state;return[!document[e],document[t]]}},24561:function(e,t,n){"use strict";var r=n(99196),a=Symbol.for("react.element"),o=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var r,o={},l=null,u=null;for(r in void 0!==n&&(l=""+n),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.call(t,r)&&!c.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:a,type:e,key:l,ref:u,props:o,_owner:s.current}}t.Fragment=o,t.jsx=l,t.jsxs=l},30275:function(e,t,n){"use strict";e.exports=n(24561)},24274:function(e){"use strict";function t(e,n){var r;if(Array.isArray(n))for(r=0;r<n.length;r++)t(e,n[r]);else for(r in n)e[r]=(e[r]||[]).concat(n[r])}e.exports=function(e){var n,r={};return t(r,e),(n=function(e){return function(t){return function(n){var a,o,i=r[n.type],s=t(n);if(i)for(a=0;a<i.length;a++)(o=i[a](n,e))&&e.dispatch(o);return s}}}).effects=r,n}},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 a=r[n];e.call(t,a[1],a[0])}},t}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,a="undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(a):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,a=0;function i(){n&&(n=!1,e()),r&&c()}function s(){o(i)}function c(){var e=Date.now();if(n){if(e-a<2)return;r=!0}else n=!0,r=!1,setTimeout(s,t);a=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 a=r[n];Object.defineProperty(e,a,{value:t[a],enumerable:!1,writable:!1,configurable:!0})}return e},u=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||a},d=b(0,0,0,0);function p(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+p(e["border-"+n+"-width"])}),0)}function h(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return d;var r=u(e).getComputedStyle(e),a=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var a=r[n],o=e["padding-"+a];t[a]=p(o)}return t}(r),o=a.left+a.right,i=a.top+a.bottom,s=p(r.width),c=p(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==t&&(s-=m(r,"left","right")+o),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+o)-t,h=Math.round(c+i)-n;1!==Math.abs(l)&&(s-=l),1!==Math.abs(h)&&(c-=h)}return b(a.left,a.top,s,c)}var g="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof u(e).SVGGraphicsElement}:function(e){return e instanceof u(e).SVGElement&&"function"==typeof e.getBBox};function f(e){return r?g(e)?function(e){var t=e.getBBox();return b(0,0,t.width,t.height)}(e):h(e):d}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=f(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,a,o,i,s,c,u=(r=(n=t).x,a=n.y,o=n.width,i=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,c=Object.create(s.prototype),l(c,{x:r,y:a,width:o,height:i,top:a,right:r+o,bottom:i+a,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!==a.ResizeObserver?a.ResizeObserver:E;t.Z=_},53191:function(e){"use strict";var t=256,n=[],r=window,a=Math.pow(t,6),o=Math.pow(2,52),i=2*o,s=255,c=Math.random;function l(e){var n,r=e.length,a=this,o=0,i=a.i=a.j=0,c=a.S=[];for(r||(e=[r++]);o<t;)c[o]=o++;for(o=0;o<t;o++)c[o]=c[i=s&i+e[o%r]+(n=c[o])],c[i]=n;(a.g=function(e){for(var n,r=0,o=a.i,i=a.j,c=a.S;e--;)n=c[o=s&o+1],r=r*t+c[s&(c[o]=c[i=s&i+n])+(c[i]=n)];return a.i=o,a.j=i,r})(t)}function u(e,t){var n,r=[],a=(typeof e)[0];if(t&&"o"==a)for(n in e)try{r.push(u(e[n],t-1))}catch(e){}return r.length?r:"s"==a?e:e+"\0"}function d(e,t){for(var n,r=e+"",a=0;a<r.length;)t[s&a]=s&(n^=19*t[s&a])+r.charCodeAt(a++);return p(t)}function p(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=(d(u(c&&c.entropy||!1?[s,p(n)]:0 in arguments?s:function(e){try{return r.crypto.getRandomValues(e=new Uint8Array(t)),p(e)}catch(e){return[+new Date,r,r.navigator&&r.navigator.plugins,r.screen,p(n)]}}(),3),m),new l(m));return d(p(h.S),n),function(){for(var e=h.g(6),n=a,r=0;e<o;)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},d(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),a=n(68308),o=n(83078);function i(e,t){var n=e.toLowerCase();return 0===t?(0,o.l)(n):n}function s(e,t){return void 0===t&&(t={}),(0,a.B)(e,(0,r.pi)({delimiter:" ",transform:i},t))}},59491:function(e,t,n){"use strict";n.d(t,{f:function(){return o}});var r=n(38697),a=n(77352);function o(e,t){return void 0===t&&(t={}),(0,a.$)(e,(0,r.pi)({delimiter:"_"},t))}},36222:function(e,t,n){"use strict";n.d(t,{$L:function(){return l.$L},BU:function(){return l.BU},Eo:function(){return s.Eo},Qf:function(){return i.Qf},Qr:function(){return i.Qr},X_:function(){return c.X_},ZK:function(){return s.ZK},_T:function(){return o.Z},bP:function(){return l.bP},jt:function(){return r.Z},oN:function(){return c.oN},pw:function(){return a.Z},rp:function(){return s.rp},tK:function(){return s.tK},u_:function(){return i.u_},v_:function(){return i.v_}});n(2890),n(56694);var r=n(67742),a=n(42194),o=n(13109),i=n(59822),s=n(58890),c=n(20281),l=n(16700)},67742:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(51128),a=n.n(r),o=n(56694);const i=a()("jetpack-ai-client:ask-question");async function s(e){let{postId:t=null,fromCache:n=!1,feature:r,functions:a,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:a,model:s}),new o.Z({question:e,options:{postId:t,feature:r,fromCache:n,functions:a,model:s}})}},4437:function(e,t,n){"use strict";var r=n(52175),a=n(55609),o=n(94333),i=n(69307),s=n(65736),c=n(6163),l=n(61074),u=n(90986),d=n(79201),p=n(65235),m=n.n(p),h=n(99196),g=n.n(h),f=n(11928),b=n(22291);const __=s.__,v=()=>{};t.Z=(0,i.forwardRef)((function(e,t){let{disabled:n=!1,value:s="",placeholder:p="",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:P=v}=e;const N=(0,i.useRef)(null),L="requesting"===E||"suggesting"===E;(0,i.useImperativeHandle)(t,(()=>N.current)),(0,o.useKeyboardShortcut)("mod+enter",(()=>{h&&P?.()}),{target:N}),(0,o.useKeyboardShortcut)("enter",(e=>{e.preventDefault(),j?.(s)}),{target:N});const T=m()("jetpack-components-ai-control__controls-prompt_button",{"has-label":y});return g().createElement("div",{className:"jetpack-components-ai-control__container"},g().createElement("div",{className:m()("jetpack-components-ai-control__wrapper",{"is-transparent":w})},g().createElement(f.Z,{state:E}),g().createElement("div",{className:"jetpack-components-ai-control__input-wrapper"},g().createElement(r.PlainText,{value:s,onChange:S,placeholder:p,className:"jetpack-components-ai-control__input",disabled:L||n,ref:N})),s?.length>0&&_&&g().createElement(a.Button,{icon:c.Z,className:"jetpack-components-ai-control__clear",onClick:()=>S("")}),g().createElement("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper"},L?g().createElement(a.Button,{className:T,onClick:x,isSmall:!0,label:__("Stop request","jetpack")},g().createElement(l.Z,{icon:c.Z}),y&&__("Stop (ESC)","jetpack")):g().createElement(a.Button,{className:T,onClick:()=>j?.(s),isSmall:!0,disabled:!s?.length||n,label:__("Send request","jetpack")},g().createElement(l.Z,{icon:u.Z}),y&&__("Send","jetpack"))),h&&g().createElement("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper"},g().createElement(a.Button,{className:T,onClick:P,isSmall:!0,label:k},g().createElement(l.Z,{icon:d.Z}),y&&k))),C&&g().createElement(b.Eo,null))}))},22291:function(e,t,n){"use strict";n.d(t,{Eo:function(){return b}});var r=n(55609),a=n(69307),o=n(65736),i=n(30797),s=n(23435),c=n(79201),l=n(90496),u=n(61074);const __=o.__,d="warning",p="error",m="success",h="info",g={[d]:i.Z,[p]:s.Z,[m]:c.Z,[h]:l.Z};function f(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:g[t]||n}),React.createElement("div",{className:"jetpack-ai-assistant__message-content"},r))}function b(){return React.createElement(f,{severity:h},(0,a.createInterpolateElement)(__("AI-generated content could be inaccurate or biased. <link>Learn more</link>","jetpack"),{link:React.createElement(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),a=n(65235),o=n.n(a),i=n(59822);function s(e){let{state:t,size:n=24}=e;return React.createElement("div",{className:o()("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.d(t,{Z:function(){return o}});var r=n(69307),a=n(55392);function o(e){let{url:t}=e;const[n,o]=(0,r.useState)(0);return(0,r.useEffect)((()=>{t&&(0,a.g)(t).then(o)}),[t]),React.createElement("span",null,(0,a.m)(n,{addDecimalPart:!1}))}},55392:function(e,t,n){"use strict";function r(e){return new Promise((t=>{const n=new Audio(e);n.addEventListener("durationchange",(function(){if(this.duration===1/0)return;const e=this.duration;n.remove(),t(e)}),!1),n.load(),n.currentTime=86400,n.volume=0,n.play()}))}function a(e){let{addDecimalPart:t=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e*=1e3;const n=Math.floor(e/36e5),r=Math.floor(e/6e4)%60,a=Math.floor(e/1e3)%60,o=Math.floor(e/10)%100,i=[n>0?n.toString().padStart(2,"0")+":":"",n>0||r>0?r.toString().padStart(2,"0")+":":"",a.toString().padStart(2,"0")];return t&&i.push("."+o.toString().padStart(2,"0")),i.join("")}n.d(t,{g:function(){return r},m:function(){return a}})},58890:function(e,t,n){"use strict";n.d(t,{Eo:function(){return i.Eo},ZK:function(){return o.Z},rp:function(){return a.Z},tK:function(){return r.Z}});var r=n(4437),a=n(11928),o=n(590),i=n(22291)},62282:function(e,t,n){"use strict";n.d(t,{h:function(){return s},u:function(){return i}});var r=n(69307),a=n(99196),o=n.n(a);const i=(0,r.createContext)({}),s=e=>{let{value:t,children:n}=e;return o().createElement(i.Provider,{value:t,children:n})}},20281:function(e,t,n){"use strict";n.d(t,{X_:function(){return o.Z},hE:function(){return r.h},oN:function(){return a.Z},uE:function(){return r.u}});var r=n(62282),a=n(3669),o=n(79466)},79466:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(16700),o=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)(o.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(a.vF,u),()=>{s.removeEventListener("done",c),s.removeEventListener("suggestion",l),s.removeEventListener(a.vF,u)}}),[s]),i}},3669:function(e,t,n){"use strict";var r=n(94333),a=n(69307),o=n(99196),i=n.n(o),s=n(36222),c=n(20281);const l=(0,r.createHigherOrderComponent)((e=>t=>{const{suggestion:n,error:r,requestingState:o,request:l,stopSuggestion:u,eventSource:d}=(0,s.pw)(),p=(0,a.useMemo)((()=>({suggestion:n,requestingError:r,requestingState:o,eventSource:d,requestSuggestion:l,stopSuggestion:u})),[n,r,o,d,l,u]);return i().createElement(c.hE,{value:p},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 d}});var r=n(69307),a=n(65736),o=n(51128),i=n.n(o),s=n(67742),c=n(16700);const __=a.__,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 d(){let{prompt:e,autoRequest:t=!1,askQuestionOptions:n={},onSuggestion:a,onDone:o,onError:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[d,p]=(0,r.useState)("init"),[m,h]=(0,r.useState)(""),[g,f]=(0,r.useState)(),b=(0,r.useRef)(void 0),v=(0,r.useCallback)((e=>{h(e?.detail),a?.(e?.detail)}),[a]),k=(0,r.useCallback)((e=>{o?.(e?.detail),p("done")}),[o]),y=(0,r.useCallback)((e=>{b?.current?.close(),p("error"),f(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:a}=t;return l("(%s/%s) %o\n%s",n+1,e.length,`[${r}]`,a)})):l("%o",e),p("requesting");try{if(b.current=await(0,s.Z)(e,t),!b?.current)return;const n=b.current;p("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)((()=>{p("init"),h(""),f(void 0)}),[]),P=(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),p("done")}),[b,v,w,E,_,C,S,k]);return(0,r.useEffect)((()=>{if(e?.length)return t&&j(e,n),()=>{P()}}),[t,e,j,P]),{suggestion:m,error:g,requestingState:d,request:j,stopSuggestion:P,reset:x,eventSource:b.current}}},13109:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(){let{onDone:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,r.useRef)(null),[n,a]=(0,r.useState)("inactive"),[o,i]=(0,r.useState)(null),s=(0,r.useRef)([]).current;function c(){return new Blob(s,{type:"audio/webm"})}const l=(0,r.useCallback)((e=>{if(!e)return t?.current?.start();e<100&&(e=100),t?.current?.start(e)}),[]),u=(0,r.useCallback)((()=>{t?.current?.pause()}),[]),d=(0,r.useCallback)((()=>{t?.current?.resume()}),[]),p=(0,r.useCallback)((()=>{t?.current?.stop()}),[]);function m(){a("recording")}function h(){a("inactive"),e?.(c()),s.length=0}function g(){a("paused")}function f(){a("recording")}function b(e){const{data:t}=e;t?.size&&(s.push(t),i(c()))}return(0,r.useEffect)((()=>{if(!navigator.mediaDevices?.getUserMedia)return;return navigator.mediaDevices.getUserMedia({audio:!0}).then((e=>{t.current=new MediaRecorder(e),t.current.addEventListener("start",m),t.current.addEventListener("stop",h),t.current.addEventListener("pause",g),t.current.addEventListener("resume",f),t.current.addEventListener("dataavailable",b)})).catch((e=>{throw e})),()=>{t?.current&&(t.current.removeEventListener("start",m),t.current.removeEventListener("stop",h),t.current.removeEventListener("pause",g),t.current.removeEventListener("resume",f),t.current.removeEventListener("dataavailable",b))}}),[]),{state:n,blob:o,url:o?URL.createObjectURL(o):null,start:l,pause:u,resume:d,stop:p}}},61317:function(e,t,n){"use strict";var r=n(55609),a=n(99196),o=n.n(a);const i=o().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"},o().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"}),o().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"}),o().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,{Qf:function(){return a.Z},Qr:function(){return o.Z},u_:function(){return r.Z},v_:function(){return i.Z}});var r=n(61317),a=n(81204),o=(n(4454),n(71893),n(52887),n(96083)),i=n(50500)},81204:function(e,t,n){"use strict";var r=n(55609),a=n(99196),o=n.n(a);const i=o().createElement(r.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/SVG"},o().createElement(r.Rect,{x:"8.75",y:"2.75",width:"6.5",height:"11.5",rx:"3.25",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),o().createElement(r.Line,{x1:"12",y1:"17",x2:"12",y2:"21",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),o().createElement(r.Path,{d:"M18 11C18 11.7879 17.8448 12.5681 17.5433 13.2961C17.2417 14.0241 16.7998 14.6855 16.2426 15.2426C15.6855 15.7998 15.0241 16.2418 14.2961 16.5433C13.5681 16.8448 12.7879 17 12 17C11.2121 17 10.4319 16.8448 9.7039 16.5433C8.97595 16.2417 8.31451 15.7998 7.75736 15.2426C7.20021 14.6855 6.75825 14.0241 6.45672 13.2961C6.15519 12.5681 6 11.7879 6 11",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}));t.Z=i},4454:function(e,t,n){"use strict";var r=n(55609),a=n(99196),o=n.n(a);r.SVG,r.Path,r.Path},96083:function(e,t,n){"use strict";var r=n(55609),a=n(99196),o=n.n(a);const i=o().createElement(r.SVG,{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o().createElement(r.Path,{d:"M16 6.33325C14.7306 6.33325 13.4736 6.58329 12.3007 7.06908C11.1279 7.55488 10.0623 8.26692 9.16464 9.16455C8.26701 10.0622 7.55497 11.1278 7.06917 12.3006C6.58338 13.4735 6.33334 14.7305 6.33334 15.9999C6.33334 17.2694 6.58338 18.5264 7.06917 19.6992C7.55497 20.872 8.26701 21.9377 9.16464 22.8353C10.0623 23.7329 11.1279 24.445 12.3007 24.9308C13.4736 25.4165 14.7306 25.6666 16 25.6666C18.5638 25.6666 21.0225 24.6481 22.8354 22.8353C24.6482 21.0224 25.6667 18.5637 25.6667 15.9999C25.6667 13.4362 24.6482 10.9774 22.8354 9.16455C21.0225 7.3517 18.5638 6.33325 16 6.33325ZM4.33334 15.9999C4.33334 12.9057 5.56251 9.93826 7.75043 7.75034C9.93836 5.56242 12.9058 4.33325 16 4.33325C19.0942 4.33325 22.0617 5.56242 24.2496 7.75034C26.4375 9.93826 27.6667 12.9057 27.6667 15.9999C27.6667 19.0941 26.4375 22.0616 24.2496 24.2495C22.0617 26.4374 19.0942 27.6666 16 27.6666C12.9058 27.6666 9.93836 26.4374 7.75043 24.2495C5.56251 22.0616 4.33334 19.0941 4.33334 15.9999Z",fill:"currentColor"}),o().createElement(r.Rect,{x:"17",y:"12",width:"3",height:"8",fill:"currentColor"}),o().createElement(r.Rect,{x:"12",y:"12",width:"3",height:"8",fill:"currentColor"}));t.Z=i},71893:function(e,t,n){"use strict";var r=n(55609),a=n(99196),o=n.n(a);r.SVG,r.Path,r.Path},52887:function(e,t,n){"use strict";var r=n(55609),a=n(99196),o=n.n(a);r.SVG,r.Path,r.Rect},50500:function(e,t,n){"use strict";var r=n(55609),a=n(99196),o=n.n(a);const i=o().createElement(r.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o().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"}),o().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),a=n(86989),o=n.n(a),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 a=(0,r.Wp)(),i=localStorage.getItem(c);let u,d=null;if(i)try{d=JSON.parse(i)}catch(e){s("Error parsing token",e)}if(d&&d?.expire>Date.now())return s("Using cached token"),d;u=a?await o()({path:"/wpcom/v2/sites/"+t+"/jetpack-openai-query/jwt",method:"POST"}):await o()({path:"/jetpack/v4/jetpack-ai-jwt?_cacheBuster="+Date.now(),credentials:"same-origin",headers:{"X-WP-Nonce":e},method:"POST"});const p={token:u.token,blogId:a?t:u.blog_id,expire:Date.now()+n};return s("Storing new token"),localStorage.setItem(c,JSON.stringify(p)),p}},56694:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(60400),a=n(51128),o=n.n(a),i=n(42194),s=n(2890),c=n(16700);const l=o()("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:a,options:o={}}=e;if(!a)try{l("Token was not provided, requesting one..."),a=(await(0,s.Z)()).token}catch(e){return void this.processErrorEvent(e)}const u={};if(o?.postId&&(u.post_id=o.postId),!t){const e=new URL("https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query");o?.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,o?.feature?.length&&(l("Feature: %o",o.feature),u.feature=o.feature),o?.functions?.length&&(l("Functions: %o",o.functions),u.functions=o.functions),o?.model?.length&&(l("Model: %o",o.model),u.model=o.model),await(0,r.L)(t,{openWhenHidden:!0,method:"POST",headers:{"Content-type":"application/json",Authorization:"Bearer "+a},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,a=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})))),a&&(null!=a.name&&(this.fullFunctionCall.name+=a.name),null!=a.arguments&&(this.fullFunctionCall.arguments+=a.arguments),this.dispatchEvent(new CustomEvent("functionCallChunk",{detail:this.fullFunctionCall})))}processConnectionError(e){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 a},$u:function(){return r},BU:function(){return u},bC:function(){return c},bP:function(){return d},co:function(){return s},cv:function(){return i},q4:function(){return o},vF:function(){return l}});const r="error_service_unavailable",a="error_quota_exceeded",o="error_moderation",i="error_context_too_large",s="error_network",c="error_unclear_prompt",l="error_response",u="gpt-3.5-turbo-16k",d="gpt-4"},6975:function(e,t,n){"use strict";var r=n(51128);const a=n.n(r)()("dops:analytics");let o,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){o=e},assignSuperProps:function(e){o=Object.assign(o||{},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]);a("Bumping stats %o",e)}else n="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),a('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]);a("Built stats %o",e)}else n="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),a('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,a,o,i){s.ga.recordPurchase(e,t,n,r,a,o,i)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(o&&(a("- Super Props: %o",o),t=Object.assign(t,o)),a('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):a('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){const t="object"==typeof e?e:{target:e};s.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){s.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){a("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){let e={};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(),a("Recording Page View ~ [URL: "+e+"] [Title: "+t+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",e),window.ga("send",{hitType:"pageview",page:e,title:t}))},recordEvent:function(e,t,n,r){s.ga.initialize();let o="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==n&&(o+=" [Option Label: "+n+"]"),void 0!==r&&(o+=" [Option Value: "+r+"]"),a(o),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,n,r)},recordPurchase:function(e,t,n,r,a,o,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:a,quantity:o}),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),a=n(96483);function o(e){class t extends Error{constructor(){super(...arguments),this.name=e}}return t}const i=o("JsonParseError"),s=o("JsonParseAfterRedirectError"),c=o("Api404Error"),l=o("Api404AfterRedirectError"),u=o("FetchNetworkError");const d=new function(e,t){let n=e,o=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){o=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 a={registration_nonce:e,no_iframe:!0};return(0,r.jetpackConfigHas)("consumer_slug")&&(a.plugin_slug=(0,r.jetpackConfigGet)("consumer_slug")),null!==t&&(a.redirect_uri=t),h(`${n}jetpack/v4/connection/register`,c,{body:JSON.stringify(a)}).then(p).then(m)},fetchAuthorizationUrl:e=>d((0,a.addQueryArgs)(`${n}jetpack/v4/connection/authorize_url`,{no_iframe:"1",redirect_uri:e}),s).then(p).then(m),fetchSiteConnectionData:()=>d(`${n}jetpack/v4/connection/data`,s).then(m),fetchSiteConnectionStatus:()=>d(`${n}jetpack/v4/connection`,s).then(m),fetchSiteConnectionTest:()=>d(`${n}jetpack/v4/connection/test`,s).then(p).then(m),fetchUserConnectionData:()=>d(`${n}jetpack/v4/connection/data`,s).then(m),fetchUserTrackingSettings:()=>d(`${n}jetpack/v4/tracking/settings`,s).then(p).then(m),updateUserTrackingSettings:e=>h(`${n}jetpack/v4/tracking/settings`,c,{body:JSON.stringify(e)}).then(p).then(m),disconnectSite:()=>h(`${n}jetpack/v4/connection`,c,{body:JSON.stringify({isActive:!1})}).then(p).then(m),fetchConnectUrl:()=>d(`${n}jetpack/v4/connection/url`,s).then(p).then(m),unlinkUser:()=>h(`${n}jetpack/v4/connection/user`,c,{body:JSON.stringify({linked:!1})}).then(p).then(m),reconnect:()=>h(`${n}jetpack/v4/connection/reconnect`,c).then(p).then(m),fetchConnectedPlugins:()=>d(`${n}jetpack/v4/connection/plugins`,s).then(p).then(m),setHasSeenWCConnectionModal:()=>h(`${n}jetpack/v4/seen-wc-connection-modal`,c).then(p).then(m),fetchModules:()=>d(`${n}jetpack/v4/module/all`,s).then(p).then(m),fetchModule:e=>d(`${n}jetpack/v4/module/${e}`,s).then(p).then(m),activateModule:e=>h(`${n}jetpack/v4/module/${e}/active`,c,{body:JSON.stringify({active:!0})}).then(p).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(p).then(m),updateSettings:e=>h(`${n}jetpack/v4/settings`,c,{body:JSON.stringify(e)}).then(p).then(m),getProtectCount:()=>d(`${n}jetpack/v4/module/protect/data`,s).then(p).then(m),resetOptions:e=>h(`${n}jetpack/v4/options/${e}`,c,{body:JSON.stringify({reset:!0})}).then(p).then(m),activateVaultPress:()=>h(`${n}jetpack/v4/plugins`,c,{body:JSON.stringify({slug:"vaultpress",status:"active"})}).then(p).then(m),getVaultPressData:()=>d(`${n}jetpack/v4/module/vaultpress/data`,s).then(p).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(p).then(m)},activateAkismet:()=>h(`${n}jetpack/v4/plugins`,c,{body:JSON.stringify({slug:"akismet",status:"active"})}).then(p).then(m),getAkismetData:()=>d(`${n}jetpack/v4/module/akismet/data`,s).then(p).then(m),checkAkismetKey:()=>d(`${n}jetpack/v4/module/akismet/key/check`,s).then(p).then(m),checkAkismetKeyTyped:e=>h(`${n}jetpack/v4/module/akismet/key/check`,c,{body:JSON.stringify({api_key:e})}).then(p).then(m),fetchStatsData:e=>d(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(p).then(m).then(f),getPluginUpdates:()=>d(`${n}jetpack/v4/updates/plugins`,s).then(p).then(m),getPlans:()=>d(`${n}jetpack/v4/plans`,s).then(p).then(m),fetchSettings:()=>d(`${n}jetpack/v4/settings`,s).then(p).then(m),updateSetting:e=>h(`${n}jetpack/v4/settings`,c,{body:JSON.stringify(e)}).then(p).then(m),fetchSiteData:()=>d(`${n}jetpack/v4/site`,s).then(p).then(m).then((e=>JSON.parse(e.data))),fetchSiteFeatures:()=>d(`${n}jetpack/v4/site/features`,s).then(p).then(m).then((e=>JSON.parse(e.data))),fetchSiteProducts:()=>d(`${n}jetpack/v4/site/products`,s).then(p).then(m),fetchSitePurchases:()=>d(`${n}jetpack/v4/site/purchases`,s).then(p).then(m).then((e=>JSON.parse(e.data))),fetchSiteBenefits:()=>d(`${n}jetpack/v4/site/benefits`,s).then(p).then(m).then((e=>JSON.parse(e.data))),fetchSiteDiscount:()=>d(`${n}jetpack/v4/site/discount`,s).then(p).then(m).then((e=>e.data)),fetchSetupQuestionnaire:()=>d(`${n}jetpack/v4/setup/questionnaire`,s).then(p).then(m),fetchRecommendationsData:()=>d(`${n}jetpack/v4/recommendations/data`,s).then(p).then(m),fetchRecommendationsProductSuggestions:()=>d(`${n}jetpack/v4/recommendations/product-suggestions`,s).then(p).then(m),fetchRecommendationsUpsell:()=>d(`${n}jetpack/v4/recommendations/upsell`,s).then(p).then(m),fetchRecommendationsConditional:()=>d(`${n}jetpack/v4/recommendations/conditional`,s).then(p).then(m),saveRecommendationsData:e=>h(`${n}jetpack/v4/recommendations/data`,c,{body:JSON.stringify({data:e})}).then(p),fetchProducts:()=>d(`${n}jetpack/v4/products`,s).then(p).then(m),fetchRewindStatus:()=>d(`${n}jetpack/v4/rewind`,s).then(p).then(m).then((e=>JSON.parse(e.data))),fetchScanStatus:()=>d(`${n}jetpack/v4/scan`,s).then(p).then(m).then((e=>JSON.parse(e.data))),dismissJetpackNotice:e=>h(`${n}jetpack/v4/notice/${e}`,c,{body:JSON.stringify({dismissed:!0})}).then(p).then(m),fetchPluginsData:()=>d(`${n}jetpack/v4/plugins`,s).then(p).then(m),fetchIntroOffers:()=>d(`${n}jetpack/v4/intro-offers`,s).then(p).then(m),fetchVerifySiteGoogleStatus:e=>d(null!==e?`${n}jetpack/v4/verify-site/google/${e}`:`${n}jetpack/v4/verify-site/google`,s).then(p).then(m),verifySiteGoogle:e=>h(`${n}jetpack/v4/verify-site/google`,c,{body:JSON.stringify({keyring_id:e})}).then(p).then(m),submitSurvey:e=>h(`${n}jetpack/v4/marketing/survey`,c,{body:JSON.stringify(e)}).then(p).then(m),saveSetupQuestionnaire:e=>h(`${n}jetpack/v4/setup/questionnaire`,c,{body:JSON.stringify(e)}).then(p).then(m),updateLicensingError:e=>h(`${n}jetpack/v4/licensing/error`,c,{body:JSON.stringify(e)}).then(p).then(m),updateLicenseKey:e=>h(`${n}jetpack/v4/licensing/set-license`,c,{body:JSON.stringify({license:e})}).then(p).then(m),getUserLicensesCounts:()=>d(`${n}jetpack/v4/licensing/user/counts`,s).then(p).then(m),getUserLicenses:()=>d(`${n}jetpack/v4/licensing/user/licenses`,s).then(p).then(m),updateLicensingActivationNoticeDismiss:e=>h(`${n}jetpack/v4/licensing/user/activation-notice-dismiss`,c,{body:JSON.stringify({last_detached_count:e})}).then(p).then(m),updateRecommendationsStep:e=>h(`${n}jetpack/v4/recommendations/step`,c,{body:JSON.stringify({step:e})}).then(p),confirmIDCSafeMode:()=>h(`${n}jetpack/v4/identity-crisis/confirm-safe-mode`,c).then(p),startIDCFresh:e=>h(`${n}jetpack/v4/identity-crisis/start-fresh`,c,{body:JSON.stringify({redirect_uri:e})}).then(p).then(m),migrateIDC:()=>h(`${n}jetpack/v4/identity-crisis/migrate`,c).then(p),attachLicenses:e=>h(`${n}jetpack/v4/licensing/attach-licenses`,c,{body:JSON.stringify({licenses:e})}).then(p).then(m),fetchSearchPlanInfo:()=>d(`${o}jetpack/v4/search/plan`,s).then(p).then(m),fetchSearchSettings:()=>d(`${o}jetpack/v4/search/settings`,s).then(p).then(m),updateSearchSettings:e=>h(`${o}jetpack/v4/search/settings`,c,{body:JSON.stringify(e)}).then(p).then(m),fetchSearchStats:()=>d(`${o}jetpack/v4/search/stats`,s).then(p).then(m),fetchWafSettings:()=>d(`${n}jetpack/v4/waf`,s).then(p).then(m),updateWafSettings:e=>h(`${n}jetpack/v4/waf`,c,{body:JSON.stringify(e)}).then(p).then(m),fetchWordAdsSettings:()=>d(`${n}jetpack/v4/wordads/settings`,s).then(p).then(m),updateWordAdsSettings:e=>h(`${n}jetpack/v4/wordads/settings`,c,{body:JSON.stringify(e)}),fetchSearchPricing:()=>d(`${o}jetpack/v4/search/pricing`,s).then(p).then(m),fetchMigrationStatus:()=>d(`${n}jetpack/v4/migration/status`,s).then(p).then(m),fetchBackupUndoEvent:()=>d(`${n}jetpack/v4/site/backup/undo-event`,s).then(p).then(m)};function d(e,t){return fetch(l(e),t)}function h(e,t,n){return fetch(e,Object.assign({},t,n)).catch(g)}function f(e){return e.general&&void 0===e.general.response||e.week&&void 0===e.week.response||e.month&&void 0===e.month.response?e:{}}Object.assign(this,u)};function p(e){return e.status>=200&&e.status<300?e:404===e.status?new Promise((()=>{throw e.redirected?new 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 g(){throw new u}t.ZP=d},90526:function(e,t,n){"use strict";var r=n(82674),a=n.n(r),o=n(55609),i=n(61074),s=n(15381),c=n(65235),l=n.n(c),u=n(99196),d=n.n(u),p=n(62103);const m=(0,u.forwardRef)(((e,t)=>{const{children:n,variant:r="primary",size:c="normal",weight:u="bold",icon:m,iconSize:h,disabled:g,isDestructive:f,isLoading:b,isExternalLink:v,className:k,text:y,fullWidth:w,...E}=e,_=l()(p.Z.button,k,{[p.Z.normal]:"normal"===c,[p.Z.small]:"small"===c,[p.Z.icon]:Boolean(m),[p.Z.loading]:b,[p.Z.regular]:"regular"===u,[p.Z["full-width"]]:w,[p.Z["is-icon-button"]]:Boolean(m)&&!n});E.ref=t;const C="normal"===c?20:16,S=v&&d().createElement(i.Z,{size:C,icon:s.Z,className:p.Z["external-icon"]}),j=v?"_blank":void 0,x=n?.[0]&&null!==n[0]&&"components-tooltip"!==n?.[0]?.props?.className;return d().createElement(o.Button,a()({target:j,variant:r,className:l()(_,{"has-text":!!m&&x}),icon:v?void 0:m,iconSize:h,disabled:g,"aria-disabled":g,isDestructive:f,text:y},E),b&&d().createElement(o.Spinner,null),d().createElement("span",null,n),S)}));m.displayName="Button",t.Z=m},14203:function(e,t,n){"use strict";var r=n(82674),a=n.n(r),o=n(94333),i=n(69307),s=n(65736),c=n(90526),l=n(3396);const __=s.__;t.Z=e=>{let{buttonStyle:t="icon",textToCopy:n,onCopy:r,...s}=e;const[u,d]=(0,i.useState)(!1),p=(0,i.useRef)(),m=(0,o.useCopyToClipboard)(n,(()=>{p.current&&clearTimeout(p.current),d(!0),r?.(),p.current=setTimeout((()=>{d(!1),p.current=void 0}),3e3)}));(0,i.useEffect)((()=>()=>{p.current&&clearTimeout(p.current)}),[]);let h=null,g=null;"text"!==t&&(h=u?React.createElement(l.KM,null):React.createElement(l.Km,null));const f=__("Copy to clipboard","jetpack");return"icon"!==t&&(g=u?__("Copied!","jetpack"):f),React.createElement(c.Z,a()({"aria-label":f,icon:h,children:g,ref:m},s))}},3396:function(e,t,n){"use strict";n.d(t,{KM:function(){return u},Km:function(){return d},aA:function(){return p},av:function(){return g}});var r=n(82674),a=n.n(r),o=n(55609),i=n(65235),s=n.n(i),c=n(45460);const l=e=>{let{className:t,size:n=24,viewBox:r="0 0 24 24",opacity:i=1,color:l="#2C3338",children:u}=e;const d={className:s()(c.Z.iconWrapper,t),width:n,height:n,viewBox:r,opacity:i,fill:void 0};return l&&(d.fill=l),React.createElement(o.SVG,a()({},d,{fillRule:"evenodd",clipRule:"evenodd",xmlns:"http://www.w3.org/2000/svg"}),React.createElement(o.G,{opacity:i},u))},u=e=>{let{size:t,className:n=c.Z["checkmark-icon"],color:r}=e;return React.createElement(l,{className:n,size:t,color:r},React.createElement(o.Path,{d:"M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z"}))},d=e=>{let{size:t,className:n=c.Z["clipboard-icon"],color:r}=e;return React.createElement(l,{className:n,size:t,color:r},React.createElement(o.Path,{d:"M5.625 5.5H15.375C15.444 5.5 15.5 5.55596 15.5 5.625V15.375C15.5 15.444 15.444 15.5 15.375 15.5H5.625C5.55596 15.5 5.5 15.444 5.5 15.375V5.625C5.5 5.55596 5.55596 5.5 5.625 5.5ZM4 5.625C4 4.72754 4.72754 4 5.625 4H15.375C16.2725 4 17 4.72754 17 5.625V10V15.375C17 16.2725 16.2725 17 15.375 17C15.375 17 6.52246 17 5.625 17C4.72754 17 4 16.2725 4 15.375V5.625ZM18.5 17.2812V8.28125H20V17.2812C20 18.7995 18.7704 20 17.2511 20H6.25V18.5H17.2511C17.9409 18.5 18.5 17.9721 18.5 17.2812Z"}))},p=e=>{let{size:t=16,className:n,color:r}=e;return React.createElement(l,{className:n,size:t,color:r,viewBox:"0 0 16 16"},React.createElement(o.Path,{fill:"#161722",fillRule:"evenodd",d:"M8.3 4.66C3.85 5.308.727 9.75.034 13.69l-.02.117c-.137.842.809 1.232 1.446.68 2.013-1.745 3.648-2.475 5.318-2.719a10.482 10.482 0 011.524-.103v2.792c0 .694.82 1.041 1.3.55l6.176-6.307a.79.79 0 00.012-1.088L9.614 1.004C9.14.496 8.301.84 8.301 1.542v3.117zm1.525-1.175v1.85a.773.773 0 01-.654.77l-.655.096c-2.133.311-3.987 1.732-5.295 3.672-.472.7-.854 1.44-1.143 2.18a12.32 12.32 0 011.675-.972c1.58-.75 3.048-.972 4.548-.972h.762a.77.77 0 01.762.779v1.69l4.347-4.44-4.347-4.653z",clipRule:"evenodd"}))},m=e=>{let{className:t,fill:n="none",size:r,children:a}=e;return React.createElement(l,{className:s()(c.Z.socialIcon,t),size:r,color:n},a)},h={...{"anti-spam":e=>{let{opacity:t=1,size:n,color:r}=e;return React.createElement(l,{size:n,opacity:t,color:r},React.createElement(o.Path,{d:"M13.2,4.7l4.7,12.8c0.4,1.1,1,1.5,2.1,1.6c0.1,0,0.1,0,0.1,0l0.1,0.1l0.1,0.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.1 s0,0.1-0.1,0.1c-0.1,0-0.1,0.1-0.1,0.1s-0.1,0-0.2,0h-5.1c-0.1,0-0.1,0-0.2,0c-0.1,0-0.1-0.1-0.1-0.1l-0.1-0.1c0-0.1,0-0.1,0-0.1 c0-0.1,0-0.1,0-0.2s0-0.1,0.1-0.1l0.1-0.1c0,0,0.1,0,0.2,0c0.5,0,1.1-0.2,1.1-0.8c0-0.3-0.1-0.5-0.2-0.8l-1.1-3.1 c-0.1-0.2-0.1-0.2-0.2-0.2h-4.3c-0.7,0-1.5,0-1.9,0.9l-1.1,2.4C7.1,17.6,7,17.8,7,18.1c0,0.8,1,0.9,1.6,0.9c0.1,0,0.1,0,0.2,0 L8.8,19l0.1,0.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.1s-0.1,0.1-0.1,0.1l-0.1,0.1c-0.1,0-0.1,0-0.2,0H4.1c-0.1,0-0.1,0-0.1,0 c-0.1,0-0.1-0.1-0.1-0.1l-0.1-0.1c0-0.1,0-0.1,0-0.1c0-0.1,0-0.1,0-0.2s0-0.1,0.1-0.1L4,19c0,0,0.1,0,0.1,0C5.2,19,5.5,18.5,6,17.5 l5.4-12.4c0.2-0.5,0.8-1,1.3-1C13,4.2,13.1,4.4,13.2,4.7z M9.1,13.1c0,0.1-0.1,0.1-0.1,0.2c0,0.1,0.1,0.1,0.1,0.1h4.4 c0.3,0,0.4-0.1,0.4-0.3c0-0.1,0-0.2-0.1-0.3l-1.2-3.5c-0.3-0.8-0.8-1.9-0.8-2.7c0-0.1,0-0.1-0.1-0.1c0,0-0.1,0-0.1,0.1 c-0.1,0.6-0.4,1.2-0.7,1.7L9.1,13.1z"}),React.createElement(o.Path,{d:"M13.2,4.7l4.7,12.8c0.4,1.1,1,1.5,2.1,1.6c0.1,0,0.1,0,0.1,0l0.1,0.1l0.1,0.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.1 s0,0.1-0.1,0.1c-0.1,0-0.1,0.1-0.1,0.1s-0.1,0-0.2,0h-5.1c-0.1,0-0.1,0-0.2,0c-0.1,0-0.1-0.1-0.1-0.1l-0.1-0.1c0-0.1,0-0.1,0-0.1 c0-0.1,0-0.1,0-0.2s0-0.1,0.1-0.1l0.1-0.1c0,0,0.1,0,0.2,0c0.5,0,1.1-0.2,1.1-0.8c0-0.3-0.1-0.5-0.2-0.8l-1.1-3.1 c-0.1-0.2-0.1-0.2-0.2-0.2h-4.3c-0.7,0-1.5,0-1.9,0.9l-1.1,2.4C7.1,17.6,7,17.8,7,18.1c0,0.8,1,0.9,1.6,0.9c0.1,0,0.1,0,0.2,0 L8.8,19l0.1,0.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.1s-0.1,0.1-0.1,0.1l-0.1,0.1c-0.1,0-0.1,0-0.2,0H4.1c-0.1,0-0.1,0-0.1,0 c-0.1,0-0.1-0.1-0.1-0.1l-0.1-0.1c0-0.1,0-0.1,0-0.1c0-0.1,0-0.1,0-0.2s0-0.1,0.1-0.1L4,19c0,0,0.1,0,0.1,0C5.2,19,5.5,18.5,6,17.5 l5.4-12.4c0.2-0.5,0.8-1,1.3-1C13,4.2,13.1,4.4,13.2,4.7z M9.1,13.1c0,0.1-0.1,0.1-0.1,0.2c0,0.1,0.1,0.1,0.1,0.1h4.4 c0.3,0,0.4-0.1,0.4-0.3c0-0.1,0-0.2-0.1-0.3l-1.2-3.5c-0.3-0.8-0.8-1.9-0.8-2.7c0-0.1,0-0.1-0.1-0.1c0,0-0.1,0-0.1,0.1 c-0.1,0.6-0.4,1.2-0.7,1.7L9.1,13.1z"}),React.createElement(o.Path,{d:"M21.6,12.5c0,0.6-0.3,1-0.9,1c-0.6,0-0.8-0.3-0.8-0.8c0-0.6,0.4-1,0.9-1C21.3,11.7,21.6,12.1,21.6,12.5z"}),React.createElement(o.Path,{d:"M4.1,12.5c0,0.6-0.3,1-0.9,1s-0.8-0.3-0.8-0.8c0-0.6,0.4-1,0.9-1S4.1,12.1,4.1,12.5z"}))},backup:e=>{let{opacity:t=1,size:n,color:r}=e;return React.createElement(l,{size:n,opacity:t,color:r},React.createElement(o.Path,{d:"M2.1,5.8c0-0.1,0-0.1,0-0.2c0-0.2,0.1-0.5,0.1-0.7c0.1-0.4,0.4-0.6,0.7-0.8l8.3-2.9c0.1-0.1,0.3-0.1,0.4-0.1l0.5,0.1 l8.3,2.9c0.3,0.2,0.5,0.4,0.7,0.7c0.2,0.2,0.2,0.4,0.2,0.7c0,0.1,0,0.1,0,0.2v0.1c-0.1,0.5-0.2,0.9-0.3,1.4 c-0.2,0.4-0.3,1.2-0.7,2.2c-0.3,1-0.7,2.1-1.1,3.1c-0.5,1-1,2.1-1.6,3.3s-1.4,2.3-2.2,3.5c-0.9,1.1-1.8,2.2-2.8,3.1 c-0.2,0.2-0.5,0.4-0.9,0.4c-0.3,0-0.6-0.1-0.9-0.4c-1.2-1.1-2.4-2.4-3.5-4c-1-1.6-1.9-3-2.5-4.3c-0.6-1.3-1.1-2.7-1.6-4 C2.8,8.7,2.5,7.6,2.3,7C2.3,6.5,2.1,6.1,2.1,5.8z M2.9,5.9c0,0.2,0.1,0.4,0.1,0.8C3.1,7,3.2,7.5,3.5,8.2C3.7,9,3.9,9.7,4.2,10.6 c0.3,0.7,0.7,1.7,1.1,2.7c0.4,1,1,2,1.5,2.9c0.5,1,1.2,1.9,1.9,2.9c0.8,1,1.6,1.9,2.4,2.6c0.2,0.2,0.4,0.2,0.5,0.2 c0.2,0,0.4-0.1,0.5-0.2c1.2-1,2.2-2.3,3.2-3.8c1-1.5,1.8-2.8,2.3-4c0.6-1.3,1.1-2.5,1.5-3.9c0.4-1.3,0.7-2.2,0.9-2.8 c0.1-0.5,0.2-1,0.3-1.3c0-0.1,0-0.1,0-0.1c0-0.2,0-0.3-0.1-0.4C20.3,5.2,20.2,5.1,20,5L12,2.1c0,0-0.1,0-0.2,0s-0.1,0-0.1,0h-0.2 l-8,2.8C3.2,5,3.1,5.2,3,5.3C2.9,5.5,2.9,5.6,2.9,5.8C2.9,5.8,2.9,5.8,2.9,5.9z M5.9,6.7h3l2.8,7l2.8-7h3c-0.1,0.1-0.2,0.5-0.3,0.8 C17,7.8,17,8.2,16.8,8.4c-0.1,0.3-0.2,0.5-0.4,0.8c0,0.1-0.1,0.1-0.1,0.1s-0.1,0.1-0.2,0.1c-0.1,0-0.1,0-0.1,0 c-0.1,0-0.2,0.1-0.2,0.2c0,0-0.1,0.1-0.1,0.1s-0.1,0.1-0.1,0.1c0,0,0,0.1-0.1,0.2c0,0.1-0.1,0.1-0.1,0.1l-0.4,1.1 c-1.3,3.3-2.1,5.2-2.3,5.8h-2.2l-1-2.4c-0.1-0.3-0.3-0.8-0.5-1.3c-0.1-0.3-0.3-0.8-0.5-1.3L8,10.8c-0.1-0.1-0.1-0.2-0.1-0.4 C7.8,10.2,7.7,10,7.7,9.8C7.6,9.7,7.5,9.5,7.4,9.4C7.3,9.3,7.3,9.3,7.3,9.3c-0.1,0-0.2,0-0.2,0s-0.1,0-0.1,0 C6.6,8.5,6.3,7.6,5.9,6.7z"}))},boost:e=>{let{opacity:t=1,size:n,color:r}=e;return React.createElement(l,{size:n,opacity:t,color:r},React.createElement(o.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M4.19505 16.2545C4.47368 16.561 4.94802 16.5836 5.25451 16.3049L10.2595 11.7549L14.2842 15.2765L19 10.5607V13.75H20.5V9.5V8.75239V8.7476V8H19.7529H19.7471H19H14.75V9.5H17.9393L14.2158 13.2235L10.2405 9.74507L4.2455 15.195C3.93901 15.4737 3.91642 15.948 4.19505 16.2545Z"}))},crm:e=>{let{opacity:t=1,size:n,color:r}=e;return React.createElement(l,{size:n,opacity:t,color:r},React.createElement(o.Path,{d:"M15.5 9.5a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 1.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Zm-2.25 6v-2a2.75 2.75 0 0 0-2.75-2.75h-4A2.75 2.75 0 0 0 3.75 15v2h1.5v-2c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v2h1.5Zm7-2v2h-1.5v-2c0-.69-.56-1.25-1.25-1.25H15v-1.5h2.5A2.75 2.75 0 0 1 20.25 15ZM9.5 8.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm1.5 0a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0Z"}))},extras:e=>{let{opacity:t=1,size:n,color:r}=e;return React.createElement(l,{size:n,opacity:t,color:r},React.createElement(o.Path,{d:"M18.5 5.5V8H20V5.5h2.5V4H20V1.5h-1.5V4H16v1.5h2.5ZM12 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-6h-1.5v6a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h6V4Z"}))},protect:e=>{let{opacity:t=1,size:n,className:r,color:a}=e;return React.createElement(l,{className:r,size:n,opacity:t,color:a},React.createElement(o.Path,{d:"M12 3.17627L18.75 6.24445V10.8183C18.75 14.7173 16.2458 18.4089 12.7147 19.5735C12.2507 19.7265 11.7493 19.7265 11.2853 19.5735C7.75416 18.4089 5.25 14.7173 5.25 10.8183V6.24445L12 3.17627ZM6.75 7.21032V10.8183C6.75 14.1312 8.89514 17.2057 11.7551 18.149C11.914 18.2014 12.086 18.2014 12.2449 18.149C15.1049 17.2057 17.25 14.1312 17.25 10.8183V7.21032L12 4.82396L6.75 7.21032Z"}),React.createElement(o.Path,{d:"M15.5291 10.0315L11.1818 14.358L8.47095 11.66L9.52907 10.5968L11.1818 12.2417L14.4709 8.96826L15.5291 10.0315Z"}))},scan:e=>{let{opacity:t=1,size:n,color:r}=e;return React.createElement(l,{size:n,opacity:t,color:r},React.createElement(o.Path,{d:"m12 3.176 6.75 3.068v4.574c0 3.9-2.504 7.59-6.035 8.755a2.283 2.283 0 0 1-1.43 0c-3.53-1.164-6.035-4.856-6.035-8.755V6.244L12 3.176ZM6.75 7.21v3.608c0 3.313 2.145 6.388 5.005 7.33.159.053.331.053.49 0 2.86-.942 5.005-4.017 5.005-7.33V7.21L12 4.824 6.75 7.21Z"}))},search:e=>{let{opacity:t=1,size:n,color:r}=e;return React.createElement(l,{size:n,opacity:t,color:r},React.createElement(o.Path,{d:"M17.5 11.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm1.5 0a5.5 5.5 0 0 1-9.142 4.121l-3.364 2.943-.988-1.128 3.373-2.952A5.5 5.5 0 1 1 19 11.5Z"}))},social:e=>{let{opacity:t=1,size:n,color:r}=e;return React.createElement(l,{size:n,opacity:t,color:r},React.createElement(o.Path,{d:"M15.5 3.97809V18.0219L7.5 15.5977V20H6V15.1431L3.27498 14.3173C2.22086 13.9979 1.5 13.0262 1.5 11.9248V10.0752C1.5 8.97375 2.22087 8.00207 3.27498 7.68264L15.5 3.97809ZM14 16L7.5 14.0303L7.5 7.96969L14 5.99999V16ZM6 8.42423L6 13.5757L3.70999 12.8818C3.28835 12.754 3 12.3654 3 11.9248V10.0752C3 9.63462 3.28835 9.24595 3.70999 9.11818L6 8.42423ZM17.5 11.75H21.5V10.25H17.5V11.75ZM21.5 16L17.5 15V13.5L21.5 14.5V16ZM17.5 8.5L21.5 7.5V6L17.5 7V8.5Z"}))},star:e=>{let{size:t,className:n=c.Z["star-icon"],color:r}=e;return React.createElement(l,{className:n,size:t,color:r},React.createElement(o.Path,{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.89 5.82 21l2.002-7.14L2 9.256l7.418-.304"}))},videopress:e=>{let{opacity:t=1,size:n,color:r}=e;return React.createElement(l,{size:n,opacity:t,color:r},React.createElement(o.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M4.3,6.2c0.8,0,1.6,0.6,1.8,1.4l2.3,7.9c0,0,0,0,0,0l2.7-9.3h1.5h4.2c2.9,0,4.9,1.9,4.9,4.7c0,2.9-2,4.7-5,4.7 h-2h-2.5l-0.5,1.5c-0.4,1.4-1.7,2.3-3.2,2.3c-1.4,0-2.7-0.9-3.2-2.3L2.5,8.7C2.1,7.4,3,6.2,4.3,6.2z M13,12.8h2.9c1.3,0,2-0.7,2-1.9 c0-1.2-0.8-1.8-2-1.8h-1.7L13,12.8z"}))},jetpack:e=>{let{size:t,className:n=c.Z.jetpack,color:r}=e;return React.createElement(l,{className:n,size:t,color:r,viewBox:"0 0 32 32"},React.createElement(o.Path,{className:"jetpack-logo__icon-circle",d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z"}),React.createElement(o.Polygon,{fill:"#fff",points:"15,19 7,19 15,3"}),React.createElement(o.Polygon,{fill:"#fff",points:"17,29 17,13 25,13"}))},share:p},...{facebook:e=>{let{fill:t,size:n,className:r}=e;return React.createElement(m,{fill:t,size:n,className:s()(c.Z.facebook,r)},React.createElement(o.Path,{d:"M12,2C6.5,2,2,6.5,2,12c0,5,3.7,9.1,8.4,9.9v-7H7.9V12h2.5V9.8c0-2.5,1.5-3.9,3.8-3.9c1.1,0,2.2,0.2,2.2,0.2v2.5h-1.3 c-1.2,0-1.6,0.8-1.6,1.6V12h2.8l-0.4,2.9h-2.3v7C18.3,21.1,22,17,22,12C22,6.5,17.5,2,12,2z"}))},instagram:e=>{let{fill:t,size:n,className:r}=e;return React.createElement(m,{fill:t,size:n,className:s()(c.Z.instagram,r)},React.createElement(o.Path,{d:"M12,4.622c2.403,0,2.688,0.009,3.637,0.052c0.877,0.04,1.354,0.187,1.671,0.31c0.42,0.163,0.72,0.358,1.035,0.673 c0.315,0.315,0.51,0.615,0.673,1.035c0.123,0.317,0.27,0.794,0.31,1.671c0.043,0.949,0.052,1.234,0.052,3.637 s-0.009,2.688-0.052,3.637c-0.04,0.877-0.187,1.354-0.31,1.671c-0.163,0.42-0.358,0.72-0.673,1.035 c-0.315,0.315-0.615,0.51-1.035,0.673c-0.317,0.123-0.794,0.27-1.671,0.31c-0.949,0.043-1.233,0.052-3.637,0.052 s-2.688-0.009-3.637-0.052c-0.877-0.04-1.354-0.187-1.671-0.31c-0.42-0.163-0.72-0.358-1.035-0.673 c-0.315-0.315-0.51-0.615-0.673-1.035c-0.123-0.317-0.27-0.794-0.31-1.671C4.631,14.688,4.622,14.403,4.622,12 s0.009-2.688,0.052-3.637c0.04-0.877,0.187-1.354,0.31-1.671c0.163-0.42,0.358-0.72,0.673-1.035 c0.315-0.315,0.615-0.51,1.035-0.673c0.317-0.123,0.794-0.27,1.671-0.31C9.312,4.631,9.597,4.622,12,4.622 M12,3 C9.556,3,9.249,3.01,8.289,3.054C7.331,3.098,6.677,3.25,6.105,3.472C5.513,3.702,5.011,4.01,4.511,4.511 c-0.5,0.5-0.808,1.002-1.038,1.594C3.25,6.677,3.098,7.331,3.054,8.289C3.01,9.249,3,9.556,3,12c0,2.444,0.01,2.751,0.054,3.711 c0.044,0.958,0.196,1.612,0.418,2.185c0.23,0.592,0.538,1.094,1.038,1.594c0.5,0.5,1.002,0.808,1.594,1.038 c0.572,0.222,1.227,0.375,2.185,0.418C9.249,20.99,9.556,21,12,21s2.751-0.01,3.711-0.054c0.958-0.044,1.612-0.196,2.185-0.418 c0.592-0.23,1.094-0.538,1.594-1.038c0.5-0.5,0.808-1.002,1.038-1.594c0.222-0.572,0.375-1.227,0.418-2.185 C20.99,14.751,21,14.444,21,12s-0.01-2.751-0.054-3.711c-0.044-0.958-0.196-1.612-0.418-2.185c-0.23-0.592-0.538-1.094-1.038-1.594 c-0.5-0.5-1.002-0.808-1.594-1.038c-0.572-0.222-1.227-0.375-2.185-0.418C14.751,3.01,14.444,3,12,3L12,3z M12,7.378 c-2.552,0-4.622,2.069-4.622,4.622S9.448,16.622,12,16.622s4.622-2.069,4.622-4.622S14.552,7.378,12,7.378z M12,15 c-1.657,0-3-1.343-3-3s1.343-3,3-3s3,1.343,3,3S13.657,15,12,15z M16.804,6.116c-0.596,0-1.08,0.484-1.08,1.08 s0.484,1.08,1.08,1.08c0.596,0,1.08-0.484,1.08-1.08S17.401,6.116,16.804,6.116z"}))},twitter:e=>{let{fill:t,size:n,className:r}=e;return React.createElement(m,{fill:t,size:n,className:s()(c.Z.twitter,r)},React.createElement(o.Path,{d:"M22.23,5.924c-0.736,0.326-1.527,0.547-2.357,0.646c0.847-0.508,1.498-1.312,1.804-2.27 c-0.793,0.47-1.671,0.812-2.606,0.996C18.324,4.498,17.257,4,16.077,4c-2.266,0-4.103,1.837-4.103,4.103 c0,0.322,0.036,0.635,0.106,0.935C8.67,8.867,5.647,7.234,3.623,4.751C3.27,5.357,3.067,6.062,3.067,6.814 c0,1.424,0.724,2.679,1.825,3.415c-0.673-0.021-1.305-0.206-1.859-0.513c0,0.017,0,0.034,0,0.052c0,1.988,1.414,3.647,3.292,4.023 c-0.344,0.094-0.707,0.144-1.081,0.144c-0.264,0-0.521-0.026-0.772-0.074c0.522,1.63,2.038,2.816,3.833,2.85 c-1.404,1.1-3.174,1.756-5.096,1.756c-0.331,0-0.658-0.019-0.979-0.057c1.816,1.164,3.973,1.843,6.29,1.843 c7.547,0,11.675-6.252,11.675-11.675c0-0.178-0.004-0.355-0.012-0.531C20.985,7.47,21.68,6.747,22.23,5.924z"}))},linkedin:e=>{let{fill:t,size:n,className:r}=e;return React.createElement(m,{fill:t,size:n,className:s()(c.Z.linkedin,r)},React.createElement(o.Path,{d:"M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"}))},tumblr:e=>{let{fill:t,size:n,className:r,invert:a}=e;return React.createElement(m,{fill:t,size:n,className:s()(c.Z.tumblr,r)},a?React.createElement(o.Path,{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zm-5.57 14.265c-2.445.042-3.37-1.742-3.37-2.998V10.6H8.922V9.15c1.703-.615 2.113-2.15 2.21-3.026.006-.06.053-.084.08-.084h1.645V8.9h2.246v1.7H12.85v3.495c.008.476.182 1.13 1.08 1.107.3-.008.698-.094.907-.194l.54 1.6c-.205.297-1.12.642-1.946.657z"}):React.createElement(o.Path,{d:"M17.04 21.28h-3.28c-2.84 0-4.94-1.37-4.94-5.02v-5.67H6.08V7.5c2.93-.73 4.11-3.3 4.3-5.48h3.01v4.93h3.47v3.65H13.4v4.93c0 1.47.73 2.01 1.92 2.01h1.73v3.75z"}))},google:e=>{let{fill:t,size:n,className:r}=e;return React.createElement(m,{fill:t,size:n,className:s()(c.Z.google,r)},React.createElement(o.Path,{d:"M12.02 10.18v3.73h5.51c-.26 1.57-1.67 4.22-5.5 4.22-3.31 0-6.01-2.75-6.01-6.12s2.7-6.12 6.01-6.12c1.87 0 3.13.8 3.85 1.48l2.84-2.76C16.99 2.99 14.73 2 12.03 2c-5.52 0-10 4.48-10 10s4.48 10 10 10c5.77 0 9.6-4.06 9.6-9.77 0-.83-.11-1.42-.25-2.05h-9.36z"}))},mastodon:e=>{let{fill:t,size:n,className:r}=e;return React.createElement(m,{fill:t,size:n,className:s()(c.Z.mastodon,r)},React.createElement(o.Path,{d:"M 19.997205,6.2868955 C 19.729197,4.3162778 17.992912,2.7633017 15.93468,2.4623753 15.587434,2.4115195 14.271759,2.2264681 11.224008,2.2264681 h -0.02277 c -3.0485688,0 -3.7026204,0.1850577 -4.0498676,0.2359072 C 5.1504449,2.7549655 3.3231548,4.1503966 2.879815,6.1443318 2.6665754,7.1263038 2.6438193,8.2149794 2.6834329,9.2136207 c 0.056471,1.4321143 0.067433,2.8617113 0.1989115,4.2879943 0.090908,0.947406 0.2494696,1.887266 0.4745239,2.812521 0.4214237,1.708868 2.1273496,3.130966 3.7987144,3.71116 1.7894479,0.605052 3.7138403,0.705478 5.5577463,0.290088 0.202828,-0.04667 0.403445,-0.100873 0.601781,-0.162549 0.447558,-0.140863 0.972662,-0.298434 1.358683,-0.575188 0.0052,-0.004 0.0097,-0.0089 0.01266,-0.01471 0.0031,-0.0056 0.0047,-0.01218 0.005,-0.01866 v -1.382076 c -9.4e-5,-0.006 -0.0016,-0.01202 -0.0043,-0.01754 -0.0027,-0.0054 -0.0067,-0.01028 -0.01155,-0.01392 -0.0049,-0.0038 -0.01044,-0.0063 -0.01648,-0.0078 -0.006,-0.0013 -0.01218,-0.0013 -0.01825,7.1e-5 -1.181368,0.279106 -2.391962,0.419012 -3.606552,0.416801 -2.0902554,0 -2.6524392,-0.981126 -2.8134375,-1.3896 -0.1293933,-0.353009 -0.2115739,-0.721231 -0.2444221,-1.095331 -3.29e-4,-0.0063 8.463e-4,-0.0125 0.00348,-0.01832 0.00253,-0.0056 0.00649,-0.01077 0.011389,-0.01471 0.0049,-0.004 0.010755,-0.0068 0.016957,-0.0081 0.00617,-0.0014 0.012655,-0.0012 0.018808,3.52e-4 1.1616831,0.277201 2.3525266,0.417106 3.5475526,0.416801 0.287408,0 0.573966,0 0.861395,-0.0074 1.201893,-0.03335 2.468685,-0.0942 3.6512,-0.322606 0.02952,-0.0058 0.059,-0.01091 0.0843,-0.01833 1.865209,-0.354279 3.640245,-1.466278 3.820617,-4.282163 0.0068,-0.110869 0.0236,-1.161191 0.0236,-1.276219 8.46e-4,-0.390958 0.127273,-2.7733487 -0.01856,-4.2371335 z m -2.87074,7.0263315 H 15.165179 V 8.5617567 c 0,-1.0003116 -0.421434,-1.5104614 -1.278618,-1.5104614 -0.942305,0 -1.414292,0.6035217 -1.414292,1.7955379 V 11.44764 H 10.522764 V 8.8468332 c 0,-1.1920162 -0.472832,-1.7955379 -1.4151372,-1.7955379 -0.8521293,0 -1.2777701,0.5101498 -1.2786179,1.5104614 V 13.313227 H 5.8693944 V 8.4175496 c 0,-1.0003133 0.2582014,-1.7949986 0.7745804,-2.3840846 0.5326766,-0.587672 1.2314038,-0.8894211 2.0986981,-0.8894211 1.003817,0 1.7623841,0.3817657 2.2680911,1.1445204 l 0.488023,0.8102521 0.488846,-0.8102521 c 0.505705,-0.7627547 1.264275,-1.1445204 2.26642,-1.1445204 0.866449,0 1.565152,0.3017491 2.099521,0.8894211 0.516404,0.5885211 0.774583,1.3832066 0.774583,2.3840846 z"}))},whatsapp:e=>{let{fill:t,size:n,className:r}=e;return React.createElement(m,{fill:t,size:n,className:s()(c.Z.whatsapp,r)},React.createElement(o.Path,{d:"M 12.011719 2 C 6.5057187 2 2.0234844 6.478375 2.0214844 11.984375 C 2.0204844 13.744375 2.4814687 15.462563 3.3554688 16.976562 L 2 22 L 7.2324219 20.763672 C 8.6914219 21.559672 10.333859 21.977516 12.005859 21.978516 L 12.009766 21.978516 C 17.514766 21.978516 21.995047 17.499141 21.998047 11.994141 C 22.000047 9.3251406 20.962172 6.8157344 19.076172 4.9277344 C 17.190172 3.0407344 14.683719 2.001 12.011719 2 z M 12.009766 4 C 14.145766 4.001 16.153109 4.8337969 17.662109 6.3417969 C 19.171109 7.8517969 20.000047 9.8581875 19.998047 11.992188 C 19.996047 16.396187 16.413812 19.978516 12.007812 19.978516 C 10.674812 19.977516 9.3544062 19.642812 8.1914062 19.007812 L 7.5175781 18.640625 L 6.7734375 18.816406 L 4.8046875 19.28125 L 5.2851562 17.496094 L 5.5019531 16.695312 L 5.0878906 15.976562 C 4.3898906 14.768562 4.0204844 13.387375 4.0214844 11.984375 C 4.0234844 7.582375 7.6067656 4 12.009766 4 z M 8.4765625 7.375 C 8.3095625 7.375 8.0395469 7.4375 7.8105469 7.6875 C 7.5815469 7.9365 6.9355469 8.5395781 6.9355469 9.7675781 C 6.9355469 10.995578 7.8300781 12.182609 7.9550781 12.349609 C 8.0790781 12.515609 9.68175 15.115234 12.21875 16.115234 C 14.32675 16.946234 14.754891 16.782234 15.212891 16.740234 C 15.670891 16.699234 16.690438 16.137687 16.898438 15.554688 C 17.106437 14.971687 17.106922 14.470187 17.044922 14.367188 C 16.982922 14.263188 16.816406 14.201172 16.566406 14.076172 C 16.317406 13.951172 15.090328 13.348625 14.861328 13.265625 C 14.632328 13.182625 14.464828 13.140625 14.298828 13.390625 C 14.132828 13.640625 13.655766 14.201187 13.509766 14.367188 C 13.363766 14.534188 13.21875 14.556641 12.96875 14.431641 C 12.71875 14.305641 11.914938 14.041406 10.960938 13.191406 C 10.218937 12.530406 9.7182656 11.714844 9.5722656 11.464844 C 9.4272656 11.215844 9.5585938 11.079078 9.6835938 10.955078 C 9.7955938 10.843078 9.9316406 10.663578 10.056641 10.517578 C 10.180641 10.371578 10.223641 10.267562 10.306641 10.101562 C 10.389641 9.9355625 10.347156 9.7890625 10.285156 9.6640625 C 10.223156 9.5390625 9.737625 8.3065 9.515625 7.8125 C 9.328625 7.3975 9.131125 7.3878594 8.953125 7.3808594 C 8.808125 7.3748594 8.6425625 7.375 8.4765625 7.375 z"}))},x:e=>{let{fill:t="black",size:n,className:r}=e;return React.createElement(m,{fill:t,size:n,className:r},React.createElement(o.Path,{d:"M14.117 9.622L20.446 2h-1.5l-5.495 6.618L9.062 2H4l6.637 10.007L4 20h1.5l5.803-6.989L15.938 20H21L14.117 9.622zm-2.054 2.474l-.672-.997-5.35-7.93h2.303l4.318 6.4.672.996 5.613 8.319h-2.304l-4.58-6.788z"}))}}};const g=e=>{let{serviceName:t,className:n,invert:r}=e;const a=h[o=t]?h[o]:null;var o;return a?React.createElement(a,{className:n,invert:r}):null}},78868:function(e,t,n){"use strict";var r=n(82674),a=n.n(r),o=n(65736),i=n(65235),s=n.n(i),c=n(99196),l=n.n(c);const __=o.__;t.Z=e=>{let{logoColor:t="#069e08",showText:n=!0,className:r,height:o=32,...i}=e;const c=n?"0 0 118 32":"0 0 32 32";return l().createElement("svg",a()({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:c,className:s()("jetpack-logo",r),"aria-labelledby":"jetpack-logo-title",height:o},i),l().createElement("desc",{id:"jetpack-logo-title"},__("Jetpack Logo","jetpack")),l().createElement("path",{fill:t,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z M15,19H7l8-16V19z M17,29V13h8L17,29z"}),n&&l().createElement(l().Fragment,null,l().createElement("path",{d:"M41.3,26.6c-0.5-0.7-0.9-1.4-1.3-2.1c2.3-1.4,3-2.5,3-4.6V8h-3V6h6v13.4C46,22.8,45,24.8,41.3,26.6z"}),l().createElement("path",{d:"M65,18.4c0,1.1,0.8,1.3,1.4,1.3c0.5,0,2-0.2,2.6-0.4v2.1c-0.9,0.3-2.5,0.5-3.7,0.5c-1.5,0-3.2-0.5-3.2-3.1V12H60v-2h2.1V7.1 H65V10h4v2h-4V18.4z"}),l().createElement("path",{d:"M71,10h3v1.3c1.1-0.8,1.9-1.3,3.3-1.3c2.5,0,4.5,1.8,4.5,5.6s-2.2,6.3-5.8,6.3c-0.9,0-1.3-0.1-2-0.3V28h-3V10z M76.5,12.3 c-0.8,0-1.6,0.4-2.5,1.2v5.9c0.6,0.1,0.9,0.2,1.8,0.2c2,0,3.2-1.3,3.2-3.9C79,13.4,78.1,12.3,76.5,12.3z"}),l().createElement("path",{d:"M93,22h-3v-1.5c-0.9,0.7-1.9,1.5-3.5,1.5c-1.5,0-3.1-1.1-3.1-3.2c0-2.9,2.5-3.4,4.2-3.7l2.4-0.3v-0.3c0-1.5-0.5-2.3-2-2.3 c-0.7,0-2.3,0.5-3.7,1.1L84,11c1.2-0.4,3-1,4.4-1c2.7,0,4.6,1.4,4.6,4.7L93,22z M90,16.4l-2.2,0.4c-0.7,0.1-1.4,0.5-1.4,1.6 c0,0.9,0.5,1.4,1.3,1.4s1.5-0.5,2.3-1V16.4z"}),l().createElement("path",{d:"M104.5,21.3c-1.1,0.4-2.2,0.6-3.5,0.6c-4.2,0-5.9-2.4-5.9-5.9c0-3.7,2.3-6,6.1-6c1.4,0,2.3,0.2,3.2,0.5V13 c-0.8-0.3-2-0.6-3.2-0.6c-1.7,0-3.2,0.9-3.2,3.6c0,2.9,1.5,3.8,3.3,3.8c0.9,0,1.9-0.2,3.2-0.7V21.3z"}),l().createElement("path",{d:"M110,15.2c0.2-0.3,0.2-0.8,3.8-5.2h3.7l-4.6,5.7l5,6.3h-3.7l-4.2-5.8V22h-3V6h3V15.2z"}),l().createElement("path",{d:"M58.5,21.3c-1.5,0.5-2.7,0.6-4.2,0.6c-3.6,0-5.8-1.8-5.8-6c0-3.1,1.9-5.9,5.5-5.9s4.9,2.5,4.9,4.9c0,0.8,0,1.5-0.1,2h-7.3 c0.1,2.5,1.5,2.8,3.6,2.8c1.1,0,2.2-0.3,3.4-0.7C58.5,19,58.5,21.3,58.5,21.3z M56,15c0-1.4-0.5-2.9-2-2.9c-1.4,0-2.3,1.3-2.4,2.9 C51.6,15,56,15,56,15z"})))}},32054:function(e,t,n){"use strict";var r=n(94333),a=n(49710);const o=["sm","md","lg"];t.Z=(e,t)=>{const n=Array.isArray(e)?e:[e],i=Array.isArray(t)?t:[t],[s,c,l]=o,u={sm:(0,r.useMediaQuery)(a.Z[s]),md:(0,r.useMediaQuery)(a.Z[c]),lg:(0,r.useMediaQuery)(a.Z[l])};return n.map(((e,t)=>{const n=i[t];return n?((e,t,n)=>{const r=o.indexOf(e),a=r+1,i=t.includes("=");let s=[];return t.startsWith("<")&&(s=o.slice(0,i?a:r)),t.startsWith(">")&&(s=o.slice(i?r:a)),s?.length?s.some((e=>n[e])):n[e]})(e,n,u):u[e]}))}},22636:function(e,t,n){"use strict";var r=n(65235),a=n.n(r),o=n(99196),i=n.n(o),s=n(46409);t.Z=e=>{let{children:t=null,width:n=null,height:r=null,className:o=""}=e;return i().createElement("div",{className:a()(s.Z.placeholder,o),style:{width:n,height:r}},t)}},52947:function(e,t,n){"use strict";var r=n(98709);t.Z=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(0,r.X)();return new Intl.NumberFormat(n,t).format(e)}},49777:function(e,t,n){"use strict";var r=n(28918);t.Z=e=>{let{value:t="https://jetpack.com",bgColor:n,fgColor:a,level:o,includeMargin:i,imageSettings:s,renderAs:c="canvas",size:l=248}=e;return React.createElement(r.ZP,{value:t,size:l,bgColor:n,fgColor:a,level:o,includeMargin:i,imageSettings:s,renderAs:c})}},45033:function(e,t,n){"use strict";var r=n(25162),a=n.n(r),o=n(99196),i=n.n(o);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:a().string,className:a().string,size:a().number},s.defaultProps={color:"#FFFFFF",className:"",size:20},t.Z=s},66017:function(e,t,n){"use strict";n.d(t,{h:function(){return r},s:function(){return a}});const r={"headline-medium":"h1","headline-small":"h2","headline-small-regular":"h2","title-medium":"h3","title-medium-semi-bold":"h3","title-small":"h4",body:"p","body-small":"p","body-extra-small":"p","body-extra-small-bold":"p",label:"p"},a=["mt","mr","mb","ml","mx","my","m","pt","pr","pb","pl","px","py","p"]},45106:function(e,t,n){"use strict";var r=n(82674),a=n.n(r),o=n(65235),i=n.n(o),s=n(99196),c=n.n(s),l=n(66017),u=n(85837);const d=(0,s.forwardRef)(((e,t)=>{let{variant:n="body",children:r,component:o,className:d,...p}=e;const m=o||l.h[n]||"span",h=(0,s.useMemo)((()=>l.s.reduce(((e,t)=>(void 0!==p[t]&&(e+=u.Z[`${t}-${p[t]}`]+" ",delete p[t]),e)),"")),[p]);return p.ref=t,c().createElement(m,a()({className:i()(u.Z.reset,u.Z[n],d,h)},p),r)}));d.displayName="Text",t.ZP=d},88275:function(e,t,n){"use strict";var r=n(99196),a=n.n(r),o=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={},d=(e,t,n)=>{const r={...i,...s,...c,...l};for(const t in r)e.style.setProperty(t,r[t]);n&&e.classList.add(o.Z.global),t&&(u[t]={provided:!0,root:e})};t.ZP=e=>{let{children:t=null,targetDom:n,id:o,withGlobalStyles:i=!0}=e;const s=(0,r.useRef)(),c=u?.[o]?.provided;return(0,r.useLayoutEffect)((()=>{if(!c)return n?d(n,o,i):void(s?.current&&d(s.current,o,i))}),[n,s,c,o,i]),n?t:a().createElement("div",{ref:s},t)}},98709:function(e,t,n){"use strict";n.d(t,{X:function(){return a}});var r=n(69771);const a=()=>{const{l10n:{locale:e}}=(0,r.getSettings)();if(e)return(e=>{const t=e.match(/^([a-z]{2,3})(_[a-z]{2}|_[a-z][a-z0-9]{4,7})?(?:_.*)?$/i);return t?`${t[1]}${t[2]?t[2]:""}`.replace("_","-"):"en-US"})(e);return window?.window?.navigator?.language??"en-US"}},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 a=e=>r.hasOwnProperty(e);e.exports={jetpackConfigHas:a,jetpackConfigGet:e=>{if(!a(e))throw'This app requires the "'+e+'" Jetpack Config to be defined in your webpack configuration file. See details in @automattic/jetpack-config package docs.';return r[e]}}},31294:function(e,t,n){"use strict";var r=n(64743),a=n(9818),o=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:d}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{registerSite:p,connectUser:m,refreshConnectedPlugins:h}=(0,a.useDispatch)(i.t),g=(0,a.useSelect)((e=>e(i.t).getRegistrationError())),{siteIsRegistering:f,userIsConnecting:b,userConnectionData:v,connectedPlugins:k,connectionErrors:y,isRegistered:w,isUserConnected:E,hasConnectedOwner:_,isOfflineMode:C}=(0,a.useSelect)((e=>({siteIsRegistering:e(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=()=>d?c?(window.location=c,Promise.resolve(c)):Promise.resolve():m({from:u,redirectUri:c}),j=t=>(t&&t.preventDefault(),w?S():p({registrationNonce:e,redirectUri:c}).then((()=>S())));return(0,o.useEffect)((()=>{r.ZP.setApiRoot(t),r.ZP.setApiNonce(n)}),[t,n]),(0,o.useEffect)((()=>{!l||f||b||j()}),[]),{handleRegisterSite:j,handleConnectUser:S,refreshConnectedPlugins:h,isRegistered:w,isUserConnected:E,siteIsRegistering:f,userIsConnecting:b,registrationError:g,userConnectionData:v,hasConnectedOwner:_,connectedPlugins:k,connectionErrors:y,isOfflineMode:C}}},27523:function(e,t,n){"use strict";n.d(t,{LI:function(){return o},N4:function(){return s},Qo:function(){return d},T1:function(){return l},TS:function(){return u},ZP:function(){return E},b5:function(){return m},i6:function(){return a},qJ:function(){return h},qV:function(){return c},r7:function(){return i},wQ:function(){return p}});var r=n(64743);const a="SET_CONNECTION_STATUS",o="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",d="DISCONNECT_USER_SUCCESS",p="SET_CONNECTED_PLUGINS",m="SET_CONNECTION_ERRORS",h="SET_IS_OFFLINE_MODE",g=e=>({type:a,connectionStatus:e}),f=e=>({type: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:p,connectedPlugins:e});const E={setConnectionStatus:g,setConnectionStatusIsFetching:e=>({type:o,isFetching:e}),fetchConnectionStatus:()=>({type:"FETCH_CONNECTION_STATUS"}),fetchAuthorizationUrl:e=>({type:"FETCH_AUTHORIZATION_URL",redirectUri:e}),setSiteIsRegistering:f,setUserIsConnecting:b,setRegistrationError:v,clearRegistrationError:k,setAuthorizationUrl:y,registerSite:function(e){let{registrationNonce:t,redirectUri:n}=e;return function*(){yield k(),yield f(!0);try{const e=yield{type:"REGISTER_SITE",registrationNonce:t,redirectUri:n};return yield g({isRegistered:!0}),yield y(e.authorizeUrl),yield f(!1),Promise.resolve(e)}catch(e){return yield v(e),yield f(!1),Promise.reject(e)}}()},connectUser:function(){let{from:e,redirectFunc:t,redirectUri: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:d}),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),a=n(9818),o=n(27057);const i=(0,a.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(((a,i)=>{t(o.Z).getAuthorizationUrl(r).then((t=>{const r=n||(e=>window.location.assign(e)),o=new URL(t);e&&o.searchParams.set("from",encodeURIComponent(e));const i=o.toString();r(i),a(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),a=n(27523);const o=(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 a.i6:return{...e,...t.connectionStatus};case a.Qo:return{...e,isUserConnected:!1}}return e},connectionStatusIsFetching:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===a.LI?t.isFetching:e},siteIsRegistering:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===a.r7?t.isRegistering:e},userIsConnecting:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===a.N4?t.isConnecting:e},registrationError:(e,t)=>{switch(t.type){case a.T1:return!1;case a.qV:return t.registrationError;default:return e}},authorizationUrl:(e,t)=>t.type===a.TS?t.authorizationUrl:e,userConnectionData:(e,t)=>(t.type,e),connectedPlugins:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.type===a.wQ?t.connectedPlugins:e},connectionErrors:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.type===a.b5?t.connectionErrors:e},isOfflineMode:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===a.qJ?t.isConnecting:e}});t.Z=o},77728:function(e,t,n){"use strict";var r=n(9818),a=n(27523),o=n(27057);const i={getAuthorizationUrl:{isFulfilled:function(e){const t=Boolean(e.authorizationUrl);for(var n=arguments.length,a=new Array(n>1?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];const s=(0,r.select)(o.Z).hasFinishedResolution("getAuthorizationUrl",a);return t&&!s&&(0,r.dispatch)(o.Z).finishResolution("getAuthorizationUrl",a),t},*fulfill(e){const t=yield a.ZP.fetchAuthorizationUrl(e);yield a.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 a{static store=null;static mayBeInit(e,t){null===a.store&&(a.store=(0,r.createReduxStore)(e,t),(0,r.register)(a.store))}}t.Z=a},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),a=n(31432),o=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:o.Z,actions:r.ZP,selectors:s.Z,resolvers:i.Z,controls:a.Z,initialState:u||{}})},81050:function(e,t,n){"use strict";n.d(t,{$R:function(){return c.Z},$S:function(){return s.Z},Nh:function(){return d.Z},i$:function(){return i.Z},iS:function(){return r.ZP},mJ:function(){return o.Z},oL:function(){return u.Z},pD:function(){return a.Z},pz:function(){return l.Z}});n(77771),n(23177),n(4277),n(49021),n(95788);var r=n(68407),a=(n(63609),n(8454)),o=n(74140),i=n(54005),s=(n(8350),n(76848),n(92116),n(79631),n(8714)),c=(n(19649),n(52403)),l=n(82087),u=n(37568),d=(n(48751),n(14085));n(45579),n(75323),n(91474),n(86419),n(22917)},92116:function(e,t,n){"use strict";n(9818),n(69307),n(99196),n(23177)},85761:function(e,t,n){"use strict";var r=n(3396),a=n(69307),o=n(65235),i=n.n(o),s=n(25162),c=n.n(s);const l=e=>{const{checked:t,serviceName:n,label:o,onClick:s,profilePicture:c}=e,[l,u]=(0,a.useState)(!!c),d=(0,a.useCallback)((()=>u(!1)),[]),p=(0,a.useCallback)((e=>{13===e.keyCode&&s()}),[s]);return React.createElement("div",{onClick:s,onKeyDown:p,role:"switch","aria-checked":t,tabIndex:"0",className:i()("components-connection-icon",{"components-connection-icon__picture":l})},l&&React.createElement("img",{src:c,alt:o,onError:d}),React.createElement(r.av,{alt:o,serviceName:"instagram-business"===n?"instagram":"twitter"===n?"x":n,className:"jetpack-publicize-gutenberg-social-icon",invert:"tumblr"===n}))};l.propTypes={serviceName:c().string,label:c().string,profilePicture:c().string},t.Z=l},24479:function(e,t,n){"use strict";var r=n(65235),a=n.n(r),o=n(25162),i=n.n(o),s=n(85761);const c=e=>{const{checked:t,disabled:n,onChange:r,serviceName:o,label:i,profilePicture:c}=e,l=a()("components-connection-toggle",{"is-not-checked":!t,"is-disabled":n});return React.createElement("div",{className:l,title:i},React.createElement(s.Z,{checked:t,label:i,onClick:r,serviceName:o,profilePicture:c}))};c.propTypes={className:i().string,checked:i().bool,id:i().string.isRequired,disabled:i().bool,onChange:i().func,serviceName:i().string,label:i().string,profilePicture:i().string},t.Z=c},49021:function(e,t,n){"use strict";var r=n(55609),a=n(94333),o=n(9818),i=n(69307),s=n(65736);const __=s.__;class c extends i.Component{componentDidMount(){this.props.refreshConnections()}refreshConnectionClick=e=>{const{href:t,title:n}=e.target;e.preventDefault();const r=window.open(t,n,""),a=window.setInterval((()=>{!1!==r.closed&&(window.clearInterval(a),this.props.refreshConnections())}),500)};renderRefreshableConnections(){const{failedConnections:e}=this.props,t=e.filter((e=>e.can_refresh));return t.length?React.createElement(r.Notice,{className:"jetpack-publicize-notice",isDismissible:!1,status:"error"},React.createElement("p",null,__("Before you hit Publish, please refresh the following connection(s) to make sure we can share your post:","jetpack")),t.map((e=>React.createElement(r.Button,{href:e.refresh_url,isSmall:!0,key:e.id,onClick:this.refreshConnectionClick,title:e.refresh_text},e.refresh_text)))):null}renderNonRefreshableConnections(){const{failedConnections:e}=this.props,t=e.filter((e=>!e.can_refresh));return t.length?t.map((e=>React.createElement(r.Notice,{className:"jetpack-publicize-notice",isDismissible:!1,status:"error"},React.createElement("p",null,e.test_message)))):null}render(){return React.createElement(i.Fragment,null,this.renderRefreshableConnections(),this.renderNonRefreshableConnections())}}t.Z=(0,a.compose)([(0,o.withSelect)((e=>({failedConnections:e("jetpack/publicize").getFailedConnections()}))),(0,o.withDispatch)((e=>({refreshConnections:e("jetpack/publicize").refreshConnectionTestResults})))])(c)},4277:function(e,t,n){"use strict";var r=n(13419),a=n(55609),o=n(9818),i=n(69307),s=n(65736),c=n(92819),l=n(24479),u=n(28161),d=n(91853);const __=s.__;class p extends i.Component{maybeDisplayLinkedInNotice=()=>this.connectionNeedsReauth()&&React.createElement(a.Notice,{className:u.Z["publicize-notice"],isDismissible:!1,status:"error"},React.createElement("p",null,__("Your LinkedIn connection needs to be reauthenticated to continue working – head to Sharing to take care of it.","jetpack")),React.createElement(a.ExternalLink,{href:`https://wordpress.com/marketing/connections/${(0,r.lQ)()}`},__("Go to Sharing settings","jetpack")));connectionNeedsReauth=()=>(0,c.includes)(this.props.mustReauthConnections,this.props.name);onConnectionChange=()=>{const{id:e}=this.props;this.props.toggleConnection(e)};connectionIsFailing(){const{failedConnections:e,name:t}=this.props;return e.some((e=>e.service_name===t))}render(){const{disabled:e,enabled:t,id:n,label:r,name:a,profilePicture:o}=this.props,i="connection-"+a+"-"+n,s=a.replace("_","-"),c=React.createElement(l.Z,{id:i,className:d.Z["connection-toggle"],checked:t,onChange:this.onConnectionChange,disabled:e||this.connectionIsFailing()||this.connectionNeedsReauth(),serviceName:s,label:r,profilePicture:o});return React.createElement("li",null,this.maybeDisplayLinkedInNotice(),React.createElement("div",{className:d.Z["connection-container"]},c))}}t.Z=(0,o.withSelect)((e=>({failedConnections:e("jetpack/publicize").getFailedConnections(),mustReauthConnections:e("jetpack/publicize").getMustReauthConnections()})))(p)},95788:function(e,t,n){"use strict";n.d(t,{Z:function(){return N}});var r=n(6895),a=n(13419),o=n(55609),i=n(9818),s=n(69307),c=n(65736),l=n(88219),u=n(75323),d=n(39118),p=n(75263),m=n(98811),h=n(46791),g=n(6230),f=n(96672),b=n(37568),v=n(48751),k=n(23177),y=n(4277),w=n(29753),E=n(71961),_=n(62578),C=n(69709),S=n(75631);const _n=c._n,__=c.__,j="jetpack/publicize",x=2592e3,P=(e,t)=>!1===e.is_healthy&&t===(e.error_code??"broken");function N(e){let{isPublicizeEnabled:t,isPublicizeDisabledBySitePlan:n,numberOfSharesRemaining:N=null,isEnhancedPublishingEnabled:L=!1,shouldShowAdvancedPlanNudge:T=!1,isSocialImageGeneratorAvailable:A=!1,jetpackSharingSettingsUrl:I,connectionsAdminUrl:R,adminUrl:M}=e;const{connections:Z,toggleById:B,hasConnections:D,enabledConnections:F}=(0,b.Z)(),z=(0,f.Z)(),{message:O,updateMessage:U,maxLength:H}=(0,v.Z)(),{isEnabled:V}=(0,p.Z)(),{dismissNotice:G,shouldShowNotice:q,NOTICES:$}=(0,u.Z)(),{isInstagramConnectionSupported:W}=(0,i.useSelect)((e=>({isInstagramConnectionSupported:e(j).isInstagramConnectionSupported()}))),J=!Z.some((e=>"instagram-business"===e.service_name))&&W&&q($.instagram),K=(0,s.useCallback)((()=>{G($.instagram)}),[G,$]),X=A&&V,Y=n?o.Disabled:s.Fragment,Q=Z.filter((e=>P(e,"broken"))),ee=Z.filter((e=>P(e,"unsupported"))),te=null!==N&&N<=F.length,{isEditedPostDirty:ne}=(0,i.useSelect)("core/editor"),{autosave:re}=(0,i.useDispatch)("core/editor"),ae=(0,s.useCallback)((async e=>{const t=e.target.getAttribute("target");ne()&&!t&&(e.preventDefault(),await re(),window.location.href=e.target.href),t&&(e.preventDefault(),window.open(e.target.href,t,"noreferrer"))}),[re,ne]),oe=(0,s.useCallback)((()=>G($.advancedUpgradeEditor,3*x)),[G,$]),ie=(0,s.useCallback)((()=>G($.autoConversion)),[G,$]),se=(0,i.useSelect)((e=>e(k.E).isAutoConversionEnabled()),[]),{attachedMedia:ce,shouldUploadAttachedMedia:le}=(0,l.Z)(),ue=(0,d.Z)(),de=ce[0]?.id||ue,{validationErrors:pe,isConvertible:me}=(0,h.ZP)(Z,(0,m.Z)(de)[0],{isSocialImageGeneratorEnabledForPost:V,shouldUploadAttachedMedia:le}),he=se&&me,ge=(0,s.useMemo)((()=>Object.keys(pe)),[pe]),fe=0!==N&&ge.length>0,be=(0,s.useCallback)((e=>{let{enabled:t,is_healthy:r=!0,connection_id:a}=e;return t&&!n&&!1!==r&&(!pe[a]||he)&&pe[a]!==h.rs}),[n,pe,he]),{refreshAutoConversionSettings:ve}=(0,g.Z)();he&&fe&&de&&q($.autoConversion)&&ve();return z(),React.createElement(Y,null,D?React.createElement(React.Fragment,null,React.createElement(o.PanelRow,null,React.createElement("ul",{className:S.Z["connections-list"]},Z.map((e=>{const{display_name:n,enabled:r,id:a,service_name:o,toggleable:i,profile_picture:s,is_healthy:c,connection_id:l}=e,u=l||a;return React.createElement(y.Z,{disabled:!t||!r&&i&&te||!1===c||void 0!==pe[u]&&!he||pe[u]===h.rs,enabled:be(e),key:u,id:u,label:n,name:o,toggleConnection:B,profilePicture:s})})),React.createElement("li",null,React.createElement(C.Z,null)))),null!==N&&React.createElement(o.PanelRow,null,React.createElement(_.Z,{type:N<Z.length?"warning":"default"},React.createElement(s.Fragment,null,(0,s.createInterpolateElement)((0,c.sprintf)(/* translators: %d is the number of shares remaining, upgradeLink is the link to upgrade to a different plan */ _n("You have %d share remaining in the next 30 days. <upgradeLink>Upgrade now</upgradeLink> to share more.","You have %d shares remaining in the next 30 days. <upgradeLink>Upgrade now</upgradeLink> to share more.",N,"jetpack"),N),{upgradeLink:React.createElement("a",{className:S.Z["upgrade-link"],href:(0,r.Z)("jetpack-social-basic-plan-block-editor",{site:(0,a.lQ)(),query:"redirect_to="+encodeURIComponent(window.location.href)}),onClick:ae})}),React.createElement("br",null),React.createElement("a",{className:S.Z["more-link"],href:(0,r.Z)("jetpack-social-block-editor-more-info",{site:(0,a.lQ)(),...M?{query:"redirect_to="+encodeURIComponent(M)}:{}}),target:"_blank",rel:"noopener noreferrer",onClick:ae},__("More about Jetpack Social.","jetpack"))))),React.createElement(React.Fragment,null,Q.length>0&&React.createElement(_.Z,{type:"error"},(0,s.createInterpolateElement)(_n("One of your social connections is broken. Reconnect them on the <fixLink>connection management</fixLink> page.","Some of your social connections are broken. Reconnect them on the <fixLink>connection management</fixLink> page.",Q.length,"jetpack"),{fixLink:React.createElement(o.ExternalLink,{href:R})})),ee.length>0&&React.createElement(_.Z,{type:"error"},(0,s.createInterpolateElement)(__("Twitter is not supported anymore. <moreInfo>Learn more here</moreInfo>.","jetpack"),{moreInfo:React.createElement(o.ExternalLink,{href:R})})),he&&fe&&de&&q($.autoConversion)&&React.createElement(_.Z,{type:"warning",actions:[React.createElement(o.Button,{onClick:ie,key:"dismiss",variant:"primary"},__("Got it","jetpack")),React.createElement(o.Button,{className:S.Z["change-settings-button"],key:"change-settings",href:M||I,target:"_blank",rel:"noreferrer noopener"},__("Change settings","jetpack"))]},__("When your post is published, the selected image will be converted for maximum compatibility across your connected social networks.","jetpack"))),fe&&(Object.values(pe).includes(h.rs)?L?React.createElement(_.Z,{type:"warning"},__("To share to Instagram, add an image/video, or enable Social Image Generator.","jetpack"),React.createElement("br",null),React.createElement(o.ExternalLink,{href:(0,r.Z)("jetpack-social-media-support-information")},__("Learn more","jetpack"))):React.createElement(_.Z,{type:"warning"},__("You need a featured image to share to Instagram.","jetpack"),React.createElement("br",null),React.createElement(o.ExternalLink,{href:(0,r.Z)("jetpack-social-media-support-information")},__("Learn more","jetpack"))):he?null:React.createElement(_.Z,{type:"warning"},React.createElement("p",null,ge.length===Z.length?_n("The selected media cannot be shared to this platform.","The selected media cannot be shared to any of these platforms.",Z.length,"jetpack"):_n("The selected media cannot be shared to one of these platforms.","The selected media cannot be shared to some of these platforms.",ge.length,"jetpack")),React.createElement(o.ExternalLink,{href:(0,r.Z)("jetpack-social-media-support-information")},__("Troubleshooting tips","jetpack"))))):!J&&React.createElement(o.PanelRow,null,React.createElement(o.ExternalLink,{href:R},__("Connect an account","jetpack"))),!n&&React.createElement(s.Fragment,null,J&&React.createElement(_.Z,{onDismiss:K,type:"highlight",actions:[React.createElement(o.Button,{key:"connect",href:R,target:"_blank",rel:"noreferrer noopener",variant:"primary"},__("Connect now","jetpack")),React.createElement(o.Button,{key:"learn-more",href:(0,r.Z)("jetpack-social-connecting-to-social-networks"),target:"_blank",rel:"noreferrer noopener"},__("Learn more","jetpack"))]},__("You can now share directly to your Instagram account!","jetpack")),t&&Z.some((e=>e.enabled))&&React.createElement(React.Fragment,null,React.createElement(E.Z,{maxLength:H,onChange:U,message:O}),L&&React.createElement(w.Z,{disabled:X,socialPostDisabled:!de&&!V,connections:Z,disabledNoticeMessage:X?__("It is not possible to add an image or video when Social Image Generator is enabled.","jetpack"):null})),T&&q($.advancedUpgradeEditor)&&React.createElement(_.Z,{onDismiss:oe,type:"highlight"},(0,s.createInterpolateElement)(__("Need more reach? Unlock custom media sharing with the <upgradeLink>Advanced Plan</upgradeLink>","jetpack"),{upgradeLink:React.createElement(o.ExternalLink,{href:(0,r.Z)("jetpack-social-advanced-site-checkout",{site:(0,a.lQ)(),query:"redirect_to="+encodeURIComponent(window.location.href)})})}))))}},9888:function(e,t,n){"use strict";n.d(t,{ZP:function(){return k}});var r=n(88275),a=n(86989),o=n.n(a),i=n(55609),s=n(9818),c=n(12238),l=n(65736),u=n(65235),d=n.n(u),p=n(99196),m=n.n(p),h=n(75263),g=n(58487),f=n(90785);const __=l.__,_x=l._x,b="featured-image-still-loading",v=(e,t,n,r)=>{if("none"===e||"custom"===e&&!t||"featured"===(e??"featured")&&!n)return null;const a=r("custom"===e?t:n);return a?(e=>e?.media_details?.sizes?.large?.source_url||e?.source_url)(a):b};function k(e){let{shouldDebounce:t=!0,...n}=e;const[a,l]=(0,p.useState)(null),[u,k]=(0,p.useState)(!0),{customText:y,imageType:w,imageId:E,template:_,setToken:C}={...(0,h.Z)(),...n},{title:S,imageUrl:j}=(0,s.useSelect)((e=>{const t=e(c.store).getEditedPostAttribute("featured_media");return{title:e(c.store).getEditedPostAttribute("title"),imageUrl:v(w,E,t,e("core").getMedia)}})),x=(0,p.useMemo)((()=>y||S||" "),[y,S]),P=(0,p.useRef)(x),N=(0,p.useRef)(a);(0,p.useEffect)((()=>{N.current=a})),(0,p.useEffect)((()=>{const e=setTimeout((async()=>{if(k(!0),j===b)return;const e=await o()({path:"/jetpack/v4/social-image-generator/generate-preview-token",method:"POST",data:{text:x,image_url:j,template:_}});C?.(e);const t=(0,f.t)(e);t!==N.current?l(t):k(!1)}),x!==P.current&&t?1500:0);return()=>{clearTimeout(e),P.current=x}}),[x,_,j]);const L=(0,p.useCallback)((()=>{k(!1)}),[]);return m().createElement(r.ZP,null,m().createElement(i.BaseControl,{label:_x("Preview","Heading for the generated preview image","jetpack")},m().createElement("div",{className:g.Z.container},m().createElement("img",{className:d()({[g.Z.hidden]:u}),src:a,alt:__("Generated preview","jetpack"),onLoad:L}),u&&m().createElement(i.Spinner,{"data-testid":"spinner"}))))}},90785:function(e,t,n){"use strict";n.d(t,{t:function(){return a}});var r=n(6895);function a(e){return e?(0,r.Z)("sigenerate",{query:`t=${e}`}):""}},88649:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(90526),a=n(88275),o=n(52175),i=n(55609),s=n(69307),c=n(65736),l=n(61074),u=n(6163),d=n(65235),p=n.n(d),m=n(46791),h=n(1795),g=n(13858),f=n(69339);const __=c.__,b=e=>t=>{t.currentTarget.focus(),e()};function v(e){let{buttonLabel:t,subTitle:n,mediaId:c=null,mediaDetails:d={},onChange:v,wrapperClassName:k}=e;const{mediaData:{width:y,height:w,sourceUrl:E}={},metaData:{mime:_,length:C=null}={}}=d,S=!(E&&y&&w&&_),j=(0,s.useCallback)((()=>v(null)),[v]),x=(0,s.useCallback)((e=>{v(e)}),[v]),P=(0,s.useCallback)((e=>{const t=(0,m.Wv)(_);return t&&!C?null:React.createElement("div",{className:p()(f.Z["preview-wrapper"],k)},React.createElement("button",{className:f.Z.remove,onClick:j},React.createElement(i.VisuallyHidden,null,__("Remove media","jetpack")),React.createElement(l.Z,{icon:u.Z})),React.createElement("button",{className:f.Z.preview,onClick:b(e),"data-unstable-ignore-focus-outside-for-relatedtarget":".media-modal"},t?React.createElement(g.Z,{sourceUrl:E,mime:_,duration:C}):React.createElement(i.ResponsiveWrapper,{naturalWidth:y,naturalHeight:w,isInline:!0},React.createElement("img",{src:E,alt:"",className:f.Z["preview-image"]}))))}),[w,C,_,j,E,y,k]),N=(0,s.useCallback)((e=>React.createElement("div",{className:f.Z.container},c?React.createElement(React.Fragment,null,React.createElement("button",{className:f.Z["remove-loading"],onClick:j},React.createElement(i.VisuallyHidden,null,__("Remove media","jetpack")),React.createElement(l.Z,{icon:u.Z})),React.createElement(i.Spinner,{"data-testid":"spinner"})):React.createElement(React.Fragment,null,React.createElement(r.Z,{variant:"secondary",size:"small",className:f.Z.preview,onClick:b(e),"data-unstable-ignore-focus-outside-for-relatedtarget":".media-modal"},t),n&&React.createElement("span",null,n)))),[t,c,j,n]),L=(0,s.useCallback)((e=>{let{open:t}=e;return c&&!S?P(t):N(t)}),[c,S,P,N]);return React.createElement(a.ZP,null,React.createElement(o.MediaUploadCheck,null,React.createElement(o.MediaUpload,{allowedTypes:h.fl,title:t,onSelect:x,render:L,value:c})))}},29753:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(88275),a=n(6895),o=n(55609),i=n(69307),s=n(65736),c=n(99196),l=n.n(c),u=n(88219),d=n(98811),p=n(88649),m=n(53513),h=n(45811);const __=s.__,g=__("Choose Media","jetpack");function f(e){let{disabled:t=!1,disabledNoticeMessage:n="",CustomNotice:s=null,socialPostDisabled:f=!1}=e;const{attachedMedia:b,updateAttachedMedia:v}=(0,u.Z)(),[k]=(0,d.Z)(b[0]?.id),y=(0,i.useCallback)((e=>{if(e){const{id:t,url:n}=e;v([{id:t,url:n}])}else v([])}),[v]),w=t?o.Disabled:c.Fragment,E=t?{className:h.Z.disabled,"data-testid":"disabled"}:{};return l().createElement(r.ZP,null,l().createElement(o.BaseControl,{label:__("Media","jetpack"),className:h.Z.wrapper},s||(n?l().createElement(o.Notice,{className:h.Z.notice,isDismissible:!1,status:"warning"},l().createElement("p",{"data-testid":"notice"},n)):l().createElement("p",{className:h.Z.subtitle},__("Choose a visual to accompany your post.","jetpack"))),l().createElement(w,E,l().createElement(p.Z,{buttonLabel:g,subTitle:__("Add an image or video","jetpack"),mediaId:b[0]?.id,mediaDetails:k,onChange:y}),l().createElement(o.ExternalLink,{href:(0,a.Z)("jetpack-social-media-support-information")},__("Learn photo and video best practices","jetpack")))),l().createElement(m.Z,{disabled:f}))}},71961:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(55609),a=n(65736);const __=a.__,_n=a._n;function o(e){let{message:t="",onChange:n,disabled:o,maxLength:i}=e;const s=i-t.length;return React.createElement(r.TextareaControl,{value:t,label:__("Message","jetpack"),onChange:n,disabled:o,maxLength:i,placeholder:__("Write a message for your audience here.","jetpack"),rows:4,help:(0,a.sprintf)(/* translators: placeholder is a number. */ _n("%d character remaining","%d characters remaining",s,"jetpack"),s)})}},62578:function(e,t,n){"use strict";var r=n(55609),a=n(65736),o=n(61074),i=n(6163),s=n(65235),c=n.n(s),l=n(25162),u=n.n(l),d=n(82283);const __=a.__,p=e=>{let{children:t,type:n="default",actions:a=[],onDismiss:s}=e;const l=c()(d.Z.notice,d.Z[`notice--${n}`]);return React.createElement("div",{className:l},React.createElement("div",{className:d.Z.content}," ",t," "),s&&React.createElement("button",{className:d.Z.dismiss,onClick:s},React.createElement(r.VisuallyHidden,null,__("Dismiss notice","jetpack")),React.createElement(o.Z,{icon:i.Z})),a&&a.length>0&&React.createElement("div",{className:d.Z.actions},a.map((e=>e))))};p.propTypes={children:u().node.isRequired,type:u().oneOf(["default","highlight","warning","error"]),actions:u().arrayOf(u().element),onDismiss:u().func},t.Z=p},574:function(e,t,n){"use strict";var r=n(3396),a=n(88275),o=n(45106),i=n(55609),s=n(65736),c=n(99196),l=n(34607),u=n(57304);const __=s.__,d=e=>{let{isOpen:t,onToggle:n}=e;return React.createElement(i.Button,{className:u.Z["icon-button"],onClick:n,"aria-expanded":t},React.createElement(r.aA,{className:u.Z.icon}))};t.Z=e=>{let{className:t,onClickLearnMore:n}=e;const r=(0,c.useCallback)((e=>{let{onToggle:t}=e;return React.createElement("div",{className:"one-click-sharing-dropdown"},React.createElement(a.ZP,null,React.createElement(l.n,{buttonStyle:"icon-text"}),React.createElement("hr",{className:u.Z.divider}),React.createElement(o.ZP,{className:u.Z.description,variant:"body-small"},__("Share with a Single Click!✨ Just tap the Social icons or the 'Copy to Clipboard' icon, and we'll format your content for sharing.","jetpack")," ",React.createElement(i.Button,{variant:"link",onClick:()=>{n(),t(!1)}},__("Learn more…","jetpack")))))}),[n]);return React.createElement(i.Dropdown,{focusOnMount:!0,contentClassName:u.Z.content,className:t,popoverProps:{placement:"bottom-start"},renderToggle:d,renderContent:r})}},23519:function(e,t,n){"use strict";var r=n(32054),a=n(88275),o=n(45106),i=n(55609),s=n(65736),c=n(34607),l=n(77551),u=n(54066),d=n(16184);const __=s.__;t.Z=e=>{let{onClose:t}=e;const[n]=(0,r.Z)("sm");return React.createElement(i.Modal,{className:d.Z.modal,onRequestClose:t},React.createElement(a.ZP,null,React.createElement("div",{className:d.Z.container},React.createElement("img",{className:d.Z.background,src:l,alt:""}),React.createElement("div",{className:d.Z.column},React.createElement(o.ZP,{className:d.Z.title},__("Introducing Simplified Sharing ","jetpack")),React.createElement(o.ZP,{className:d.Z.description,variant:"body-small"},__("Hey there! Quick update for you. You can now effortlessly share your new posts on X, WhatsApp, or any other platform.","jetpack"),React.createElement("br",null),React.createElement("br",null),__("We'll auto-format your shareable content. Just click on the Social icons, or the 'Copy to Clipboard' icon, and you're set. This way, you can share on any social platform you like.","jetpack"),React.createElement("br",null),React.createElement("br",null),__("Simplifying social sharing, one click at a time!","jetpack")),React.createElement("hr",null),React.createElement("div",{className:d.Z.sharing},React.createElement(o.ZP,{variant:"title-small"},__("One-Click Sharing","jetpack")),React.createElement(c.n,null)),React.createElement("hr",null)),!n&&React.createElement("div",{className:d.Z["second-column"]},React.createElement(i.ResponsiveWrapper,{naturalWidth:350},React.createElement("img",{className:d.Z.illustration,src:u,alt:""}))))))}},8714:function(e,t,n){"use strict";var r=n(82674),a=n.n(r),o=n(55609),i=n(9818),s=n(12238),c=n(69307),l=n(65736),u=n(99196),d=n(14085),p=n(86419),m=n(37568),h=n(49021),g=n(95788),f=n(574),b=n(23519),v=n(91474),k=n(63609),y=n(23761);const __=l.__;t.Z=e=>{let{prePublish:t,enableTweetStorm:n,children:r}=e;const{refresh:l,hasConnections:w,hasEnabledConnections:E}=(0,m.Z)(),_=(0,i.useSelect)((e=>e(s.store).isCurrentPostPublished()),[]),{isPublicizeEnabled:C,hidePublicizeFeature:S,isPublicizeDisabledBySitePlan:j,togglePublicizeFeature:x,isShareLimitEnabled:P,numberOfSharesRemaining:N,hasPaidPlan:L,connectionsAdminUrl:T,adminUrl:A,isEnhancedPublishingEnabled:I,isSocialImageGeneratorAvailable:R,shouldShowAdvancedPlanNudge:M,jetpackSharingSettingsUrl:Z}=(0,d.Z)();(0,p.M1)((function(){E&&l()}),[E,l]);const B=t?c.Fragment:o.PanelBody,D=t?{}:{title:__("Share this post","jetpack")},[F,z]=(0,u.useReducer)((e=>!e),!1);return React.createElement(B,a()({className:y.Z.panel},D),_&&React.createElement(f.Z,{onClickLearnMore:z,className:y.Z["one-click-share-dropdown"]}),F&&React.createElement(b.Z,{onClose:z}),r,!S&&React.createElement(c.Fragment,null,!_&&React.createElement(o.ToggleControl,{label:C?__("Share when publishing","jetpack"):__("Sharing is disabled","jetpack",0),onChange:x,checked:C,disabled:!w}),React.createElement(h.Z,null),React.createElement(g.Z,{isPublicizeEnabled:C,isPublicizeDisabledBySitePlan:j,connectionsAdminUrl:T,numberOfSharesRemaining:P&&!L?N:null,isEnhancedPublishingEnabled:I,isSocialImageGeneratorAvailable:R,adminUrl:A,shouldShowAdvancedPlanNudge:M,jetpackSharingSettingsUrl:Z}),n&&C&&React.createElement(k.Z,{prePublish:t}),React.createElement(v.o,null)))}},82087:function(e,t,n){"use strict";var r=n(88275),a=n(45106),o=n(13419),i=n(55609),s=n(72067),c=n(69307),l=n(65736),u=n(23519),d=n(34607),p=n(67454);const __=l.__;t.Z=()=>{const[e,t]=(0,c.useState)(!1),n=(0,c.useCallback)((()=>t(!0)),[]),l=(0,c.useCallback)((()=>t(!1)),[]);return React.createElement(s.PluginPostPublishPanel,{initialOpen:!0,title:__("One-Click sharing","jetpack"),id:"publicize-manual-sharing",icon:React.createElement(o.Pm,null)},React.createElement(r.ZP,null,React.createElement(a.ZP,{className:p.Z.description,variant:"body-small"},__("Share with a Single Click!✨ Just tap the Social icons or the 'Copy to Clipboard' icon, and we'll format your content for sharing.","jetpack")," ",React.createElement(i.Button,{variant:"link",onClick:n},__("Learn more..","jetpack"))),React.createElement(d.n,null)),e&&React.createElement(u.Z,{onClose:l}))}},52403:function(e,t,n){"use strict";var r=n(6895),a=n(13419),o=n(86989),i=n.n(o),s=n(72067),c=n(69307),l=n(14085),u=n(86419),d=n(37568),p=n(19649);t.Z=()=>{const[e,t]=(0,c.useState)((0,a.Pb)()?.social?.reviewRequestDismissed??!0),[n,o]=(0,c.useState)(!1),{hasEnabledConnections:m}=(0,d.Z)(),{isPublicizeEnabled:h,isPostAlreadyShared:g}=(0,l.Z)();(0,u.e3)((()=>{o(!g&&h&&m)}),[g,m,h]);const f=(0,c.useCallback)((()=>{const e=(0,a.Pb)()?.social?.dismissReviewRequestPath??null;i()({path:e,method:"POST",data:{dismissed:!0}}).catch((e=>{throw e})),t(!0)}),[]);return e||!n?null:React.createElement(s.PluginPostPublishPanel,{id:"publicize-title"},React.createElement(p.Z,{href:(0,r.Z)("jetpack-social-plugin-reviews"),onClose:f}))}},19649:function(e,t,n){"use strict";var r=n(88275),a=n(90526),o=n(13419),i=n(65736),s=n(99196),c=n(2097);const __=i.__;t.Z=e=>{let{href:t,onClose:n}=e;const{recordEvent:l}=(0,o.z$)({pageViewEventName:"social_plugin_review_prompt",pageViewNamespace:"jetpack",pageViewSuffix:"view"}),u=(0,s.useCallback)((()=>{l("jetpack_social_plugin_review_prompt_new_review_click")}),[l]),d=(0,s.useCallback)((()=>{l("jetpack_social_plugin_review_prompt_dismiss_click"),n()}),[l,n]);return React.createElement(r.ZP,null,React.createElement("div",{className:c.Z.prompt},React.createElement("h2",{className:c.Z.header},/* translators: %s is the celebration emoji */ (0,i.sprintf)(__("Presto! %s","jetpack"),String.fromCodePoint(127881))),React.createElement("p",null,__("Just like that, Jetpack Social has shared your post to your connected social accounts.","jetpack")),React.createElement("p",null,__("Please leave a review to let others know how easy getting your posts on social media can be!","jetpack")),React.createElement("div",{className:c.Z.buttons},React.createElement(a.Z,{onClick:u,isExternalLink:!0,href:t,className:c.Z.button},__("Leave a Review","jetpack")),React.createElement(a.Z,{onClick:d,variant:"link",className:c.Z.button},__("Dismiss","jetpack")))))}},69709:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(65736),a=n(14085),o=n(78619);const __=r.__;function i(){const{connectionsAdminUrl:e}=(0,a.Z)();return React.createElement("a",{className:o.Z["settings-link"],href:e,target:"_blank",rel:"noreferrer",title:__("Connect an account","jetpack")},React.createElement("svg",{width:"24",height:"24",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("rect",{x:"0.375",y:"0.375",width:"27.25",height:"27.25",rx:"1.125",fill:"#F6F7F7"}),React.createElement("path",{d:"M19 13.3333H14.6667V9H13.3333V13.3333H9V14.6667H13.3333V19H14.6667V14.6667H19V13.3333Z",fill:"black"}),React.createElement("rect",{x:"0.375",y:"0.375",width:"27.25",height:"27.25",rx:"1.125",stroke:"#A7AAAD",strokeWidth:"0.75",strokeDasharray:"2 2"})))}},2817:function(e,t,n){"use strict";n.d(t,{o:function(){return a}});var r=n(65736);const __=r.__,a=[{label:__("X","jetpack"),networkName:"x",url:"https://x.com/intent/tweet?text={{text}}&url={{url}}"},{label:__("WhatsApp","jetpack"),networkName:"whatsapp",url:"https://api.whatsapp.com/send?text={{text}}"}]},22917:function(e,t,n){"use strict";n(34607)},34607:function(e,t,n){"use strict";n.d(t,{n:function(){return g}});var r=n(3396),a=n(90526),o=n(45106),i=n(14203),s=n(13419),c=n(69307),l=n(65736),u=n(65235),d=n.n(u),p=n(2817),m=n(30664),h=n(38730);const __=l.__;function g(e){let{buttonStyle:t="icon",buttonVariant:n}=e;const u=(0,h.S)(),{recordEvent:g}=(0,s.z$)(),f=(0,c.useCallback)((()=>{g("jetpack_social_share_button_clicked",{network:"clipboard"})}),[g]),b=(0,c.useCallback)((()=>u("{{text}}\n{{url}}",!1)),[u]),v=(0,c.useCallback)((function(e,t){return function(n){n.preventDefault(),g("jetpack_social_share_button_clicked",t),window.open(e,"","menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600")}}),[g]);return React.createElement("div",{className:d()(m.Z["share-buttons"],{[m.Z.vertical]:t.includes("text")})},p.o.map((e=>{let{label:i,networkName:s,url:c}=e;const d=u(c),p="icon"===t?React.createElement(r.av,{serviceName:s}):null,h=(0,l.sprintf)(/* translators: %s is the name of a social network, e.g. Twitter. */ __("Share on %s","jetpack"),i);return React.createElement("div",{className:m.Z.container,key:s},React.createElement(a.Z,{icon:p,variant:n,"aria-label":h,href:d,target:"_blank",rel:"noopener noreferrer",onClick:v(d),"data-network":s,className:"icon"===t?m.Z[s]:"has-text"},"icon"===t?null:React.createElement(React.Fragment,null,"icon-text"===t&&React.createElement(r.av,{className:m.Z[s],serviceName:s}),React.createElement(o.ZP,{className:m.Z.label,component:"span"},h))))})),React.createElement("div",{className:m.Z.container},React.createElement(i.Z,{buttonStyle:t,onCopy:f,textToCopy:b,className:"icon"===t?m.Z.clipboard:" has-text",variant:n},"icon"===t?null:React.createElement(o.ZP,{className:m.Z.label,component:"span"},__("Copy to clipboard","jetpack")))))}},38730:function(e,t,n){"use strict";n.d(t,{S:function(){return o}});var r=n(9818),a=n(69307);function o(){const{message:e,link:t}=(0,r.useSelect)((e=>{const t=e("core/editor").getEditedPostAttribute;return{link:t("link"),message:e("jetpack/publicize").getShareMessage()||t("meta")?.jetpack_seo_html_title||t("title")}}),[]);return(0,a.useCallback)((function(n){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=e,o=t;return n.includes("{{url}}")||(a=a+"\n\n"+o,o=""),r&&(a=encodeURIComponent(a),o=encodeURIComponent(o)),n.replace("{{text}}",a).replace("{{url}}",o)}),[t,e])}},91474:function(e,t,n){"use strict";n.d(t,{o:function(){return h}});var r=n(55609),a=n(9818),o=n(12238),i=n(69307),s=n(65736),c=n(53961),l=n(14085),u=n(45579),d=n(37568);const __=s.__;function p(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:__("Unable to share the Post","jetpack");const{createErrorNotice:t}=(0,a.dispatch)(c.store);t(e,{id:"publicize-post-share-message"})}function m(){const{hasEnabledConnections:e}=(0,d.Z)(),{isPublicizeEnabled:t}=(0,l.Z)(),{isFetching:n,isError:s,isSuccess:m,doPublicize:h}=(0,u.Z)(),g=(0,a.useSelect)((e=>e(o.store).isCurrentPostPublished()),[]);(0,i.useEffect)((()=>{if(!n)return s?p():void(m&&function(){const{createSuccessNotice:e}=(0,a.dispatch)(c.store);e(__("Post shared","jetpack"),{id:"publicize-post-share-message",type:"snackbar"})}())}),[n,s,m]);const f=!t||!e||!g||n,b=(0,i.useCallback)((()=>{if(!g)return p(__("You must publish your post before you can share it.","jetpack"));(0,a.dispatch)(c.store).removeNotice("publicize-post-share-message"),h()}),[h,g]);return React.createElement(r.Button,{variant:"secondary",onClick:b,disabled:f,isBusy:n},__("Share post","jetpack"))}function h(){const{isRePublicizeUpgradableViaUpsell:e}=(0,l.Z)();return(0,a.useSelect)((e=>e(o.store).isCurrentPostPublished()),[])?e?null:React.createElement(r.PanelRow,null,React.createElement(m,null)):null}},54005:function(e,t,n){"use strict";var r=n(55609),a=n(69307),o=n(65736),i=n(75263),s=n(9888),c=n(81469);const __=o.__;t.Z=e=>{let{prePublish:t=!1}=e;const n=t?a.Fragment:r.PanelBody,o=t?{}:{title:__("Social Image Generator","jetpack")},{isEnabled:l,setIsEnabled:u}=(0,i.Z)(),[d,p]=(0,a.useState)(!1),m=(0,a.useCallback)((()=>p(!0)),[]),h=(0,a.useCallback)((()=>p(!1)),[]);return React.createElement(n,o,d&&React.createElement(c.Z,{onClose:h}),React.createElement(r.ToggleControl,{label:__("Enable Social Image","jetpack"),help:l?"":__("Social Image is disabled for this post.","jetpack"),checked:l,onChange:u}),l&&React.createElement(React.Fragment,null,React.createElement("hr",null),React.createElement(s.ZP,{shouldDebounce:!1}),React.createElement("hr",null),React.createElement(r.Button,{variant:"secondary",onClick:m,label:__("Open the Social Image Generator settings","jetpack")},__("Settings","jetpack"))))}},81469:function(e,t,n){"use strict";var r=n(88275),a=n(55609),o=n(69307),i=n(65736),s=n(75263),c=n(98811),l=n(9888),u=n(88649),d=n(39356),p=n(40088);const __=i.__,m=["image/jpeg","image/png"],h=__("Choose Image","jetpack");t.Z=e=>{let{onClose:t}=e;const{customText:n,imageType:i,imageId:g,template:f,updateSettings:b}=(0,s.Z)(),[v,k]=(0,o.useState)(g),[y,w]=(0,o.useState)(i||"featured"),[E,_]=(0,o.useState)(n),[C,S]=(0,o.useState)(f),[j]=(0,c.Z)(v),x=(0,o.useCallback)((()=>{b({template:C,image_type:y,custom_text:E||"",..."custom"===y&&{image_id:v}}),t()}),[b,C,y,v,E,t]),P=(0,o.useCallback)((e=>{k(e?.id)}),[k]);return React.createElement(r.ZP,{targetDom:document.body},React.createElement(a.Modal,{onRequestClose:t},React.createElement(l.ZP,{className:p.Z.preview,imageId:v,customText:E,imageType:y,template:C}),React.createElement(a.SelectControl,{label:__("Image Type","jetpack"),value:y||"featured",options:[{label:__("Featured Image","jetpack"),value:"featured"},{label:__("Custom Image","jetpack"),value:"custom"},{label:__("No Image","jetpack"),value:"none"}],onChange:w}),"custom"===y&&React.createElement(u.Z,{buttonLabel:h,subTitle:__("Add a custom image","jetpack"),mediaId:v,mediaDetails:j,onChange:P,allowedMediaTypes:m,wrapperClassName:p.Z.mediaPicker}),React.createElement(a.TextControl,{className:p.Z.customText,value:E||"",onChange:_,label:__("Custom Header","jetpack"),help:__("By default the post title is used for the image. You can use this field to set your own text.","jetpack")}),React.createElement(a.BaseControl,{label:__("Templates","jetpack"),className:p.Z.templateControl},React.createElement(d.Z,{value:C,onTemplateSelected:S})),React.createElement(a.Button,{onClick:t,variant:"tertiary"},__("Cancel","jetpack")),React.createElement(a.Button,{onClick:x,variant:"primary"},__("Save","jetpack"))))}},79631:function(e,t,n){"use strict";n(9818),n(69307),n(65736),n(99196),n(23177),n(8350)},8350:function(e,t,n){"use strict";n(55609),n(69307),n(65736),n(39356),n(15214)},39356:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(65235),i=n.n(o),s=n(47320),c=n(57227);const __=a.__;t.Z=e=>{let{value:t=null,onTemplateSelected:n=null}=e;const o=(0,r.useCallback)((e=>{const t=e.target.id;n?.(t)}),[n]);return React.createElement("div",{className:s.Z.templates},c.Z.map((e=>React.createElement("button",{onClick:o,id:e.name,key:e.name,className:i()(s.Z.template,{[s.Z["template--active"]]:e.name===t})},React.createElement("img",{src:e.image,alt:e.label}),React.createElement("span",{className:"screen-reader-text"},/* translators: %s is the name of the template */ (0,a.sprintf)(__("Pick the %s template","jetpack"),e.label))))))}},57227:function(e,t,n){"use strict";var r=n(30253),a=n(91948),o=n(5353);const i=[{name:"highway",label:"Highway",image:n(27956)},{name:"dois",label:"Dois",image:r},{name:"edge",label:"Edge",image:a},{name:"fullscreen",label:"Fullscreen",image:o}];t.Z=i},76848:function(e,t,n){"use strict";n(9818),n(69307),n(99196),n(23177)},53513:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(88275),a=n(55609),o=n(69307),i=n(65736),s=n(88219),c=n(89696);const __=i.__,l=__("You need a featured image or media attached to your post to be able to share as a social post.","jetpack"),u=__("By default, the image and text appear on social media as a link preview. To optimize engagement, share as a social post.","jetpack");function d(e){let{disabled:t=!1}=e;const{shouldUploadAttachedMedia:n,updateShouldUploadAttachedMedia:i}=(0,s.Z)(),d=(0,o.useCallback)((e=>{i(e)}),[i]),p=t?a.Disabled:o.Fragment,m=t?{className:c.Z.disabled}:{};return React.createElement(r.ZP,null,React.createElement(p,m,React.createElement(a.CheckboxControl,{className:c.Z.checkbox,checked:n,onChange:d,label:__("Share as a social post","jetpack"),help:t?l:u})))}},63855:function(e,t,n){"use strict";var r=n(82674),a=n.n(r),o=n(13477),i=n(9818),s=n(37568),c=n(48751);t.Z=(0,i.withSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor");return{excerpt:t("excerpt"),content:t("content").split("\x3c!--more")[0]}}))((e=>{const{connections:t}=(0,s.Z)(),{message:n}=(0,c.Z)(),{title:r,excerpt:i,content:l}=e,u=t?.find((e=>"facebook"===e.service_name));let d;return u&&(d={displayName:u.display_name,avatarUrl:u.profile_picture}),React.createElement(o.S,a()({},e,{type:"article",user:d,customText:n||i||l||r}))}))},83704:function(e,t,n){"use strict";var r=n(82674),a=n.n(r),o=n(17915),i=n(9818),s=n(22629),c=n(99196),l=n.n(c);t.Z=function(e){const t=(0,i.useSelect)((e=>{const{getEntityRecord:t}=e("core");return(0,s.decodeEntities)(t("root","site").title)}));return l().createElement(o.X,a()({},e,{siteTitle:t}))}},4124:function(e,t,n){"use strict";n.d(t,{m:function(){return c}});var r=n(4049),a=n(99196),o=n.n(a),i=n(48751),s=n(34074);function c(e){const{title:t,image:n,media:a}=e,{name:c,profileImage:l}=(0,s.getInstagramDetails)(),{message:u}=(0,i.Z)(),d=u||t;return o().createElement(r.V,{image:n,media:a,name:c,profileImage:l,caption:d})}},27725:function(e,t,n){"use strict";n.d(t,{y:function(){return l}});var r=n(93453),a=n(65736),o=n(99196),i=n.n(o),s=n(48751),c=n(34074);const __=a.__;function l(e){const{title:t,url:n,image:a,media:o}=e,{name:l,profileImage:u}=(0,c.getLinkedInDetails)(),{message:d}=(0,s.Z)(),p=`${d||t} ${o.length?n:""}`.trim();return i().createElement(r.S,{jobTitle:__("Job Title (Company Name)","jetpack"),image:a,name:l,profileImage:u,title:t,description:p,url:n,media:o})}},28586:function(e,t,n){"use strict";var r=n(82674),a=n.n(r),o=n(60312),i=n(9818),s=n(22629),c=n(37568),l=n(48751),u=n(34074);t.Z=e=>{const{connections:t}=(0,c.Z)(),{message:n}=(0,l.Z)(),{content:r,siteName:d}=(0,i.useSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor"),{getSite:n}=e("core");return{content:t("content").split("\x3c!--more")[0],siteName:(0,s.decodeEntities)(n().title)}})),p=(0,u.shouldUploadAttachedMedia)(),m=t?.find((e=>"mastodon"===e.service_name));let h;m&&(h={displayName:m.display_name,avatarUrl:m.profile_picture,address:m.username});const g=e.media?.[0],f=g?.type.startsWith("image/")?g.url:null;return React.createElement(o.I,a()({},e,{siteName:d,user:h,description:r,customText:n,customImage:f,isSocialPost:p}))}},8454:function(e,t,n){"use strict";var r=n(55609),a=n(9818),o=n(65736),i=n(39517),s=n(34074),c=n(90785),l=n(81694),u=n(25399);const __=o.__;t.Z=(0,a.withSelect)((e=>{const{getMedia:t}=e("core"),{getEditedPostAttribute:n}=e("core/editor"),{isTweetStorm:r}=e("jetpack/publicize"),a=n("featured_media");let o=a?(0,u.i)(t(a)):"";const i=(0,s.getImageGeneratorPostSettings)(),l=i.enabled?(0,c.t)(i.token):"",d=(0,s.getAttachedMedia)();if(l)o=l;else if(d?.[0]?.id){const[e]=d;!!e.id&&t(e.id)?.mime_type?.startsWith("image/")&&e.url&&(o=e.url)}const p=[];if((0,s.shouldUploadAttachedMedia)())if(l)p.push({type:"image/jpeg",url:l,alt:""});else{const e=e=>{const n=t(e);return n?{type:n.mime_type,url:(0,u.i)(n),alt:n.alt_text}:null};for(const{id:t}of d){const n=e(t);n&&p.push(n)}0===p.length&&a&&p.push(e(a))}return{title:n("meta")?.jetpack_seo_html_title||n("title"),description:n("meta")?.advanced_seo_description||n("excerpt")||n("content").split("\x3c!--more")[0]||__("Visit the post for more.","jetpack"),url:n("link"),image:o,media:p,initialTabName:r()?"twitter":null}}))((function(e){let{onClose:t,image:n,media:a,title:o,description:s,url:c,initialTabName:u}=e;const d=(0,l.P)();return React.createElement(r.Modal,{onRequestClose:t,className:"jetpack-social-previews__modal",__experimentalHideHeader:!0},React.createElement(r.Button,{className:"jetpack-social-previews__modal--close-btn",onClick:t,icon:i.Z,label:__("Close","jetpack")}),React.createElement(r.TabPanel,{className:"jetpack-social-previews__modal-previews",tabs:d,initialTabName:u},(e=>React.createElement("div",null,React.createElement(e.preview,{title:o,description:s,url:c,image:n,media:a})))))}))},74140:function(e,t,n){"use strict";var r=n(55609),a=n(65736),o=n(81694);const __=a.__,_x=a._x;t.Z=e=>{let{openModal:t}=e;const n=(0,o.P)();return React.createElement("div",{className:"jetpack-social-previews__panel"},React.createElement("p",null,__("Preview what this will look like on social networks and Google search.","jetpack")),React.createElement("div",{className:"jetpack-gutenberg-social-icons"},n.map((e=>React.createElement(e.icon,{key:e.name,className:"jetpack-social-previews__icon"})))),React.createElement(r.Button,{variant:"secondary",onClick:t,label:__("Open Social Previews","jetpack")},_x("Preview","Button label that opens the social previews modal","jetpack")))}},94714:function(e,t,n){"use strict";var r=n(82674),a=n.n(r),o=n(1044),i=n(9818),s=n(37568),c=n(48751);t.Z=e=>{const{content:t,author:n}=(0,i.useSelect)((e=>{const{getUser:t}=e("core"),{getEditedPostAttribute:n}=e("core/editor"),r=n("author"),a=r&&t(r);return{content:n("content").split("\x3c!--more")[0],author:a?.name}})),{connections:r}=(0,s.Z)(),{message:l}=(0,c.Z)(),u=r?.find((e=>"tumblr"===e.service_name));let d;return u&&(d={displayName:u.display_name||n,avatarUrl:u.profile_picture}),React.createElement(o.b,a()({},e,{user:d,description:t,customText:l}))}},24766:function(e,t,n){"use strict";var r=n(835),a=n(9818),o=n(99196),i=n.n(o);t.Z=(0,a.withSelect)(((e,t)=>{let{title:n,description:r,image:a,url:o,media:i}=t;const{getTweetTemplate:s,getTweetStorm:c,getShareMessage:l,isTweetStorm:u}=e("jetpack/publicize");let d=[];return u()?d=c():d.push({...s(),text:l()+(i.length?` ${o}`:""),cardType:a?"summary_large_image":"summary",title:n,description:r,image:a,media:i,url:o}),{tweets:d}}))((function(e){let{tweets:t}=e;return i().createElement(r.c,{tweets:t,hidePostPreview:!0})}))},81694:function(e,t,n){"use strict";n.d(t,{P:function(){return b}});var r=n(82674),a=n.n(r),o=n(3396),i=n(9818),s=n(65736),c=n(99196),l=n.n(c),u=n(63855),d=n(83704),p=n(4124),m=n(27725),h=n(28586),g=n(94714),f=n(24766);const __=s.__;function b(){const{isInstagramSupported:e,isMastodonSupported:t}=(0,i.useSelect)((e=>{const t=e("jetpack/publicize");return{isInstagramSupported:t.isInstagramConnectionSupported(),isMastodonSupported:t.isMastodonConnectionSupported()}}));return(0,c.useMemo)((()=>[{title:__("Google Search","jetpack"),icon:e=>l().createElement(o.av,a()({serviceName:"google"},e)),name:"google",preview:d.Z},{title:__("Twitter","jetpack"),icon:e=>l().createElement(o.av,a()({serviceName:"twitter"},e)),name:"twitter",preview:f.Z},{title:__("Facebook","jetpack"),icon:e=>l().createElement(o.av,a()({serviceName:"facebook"},e)),name:"facebook",preview:u.Z},e?{title:__("Instagram","jetpack"),icon:e=>l().createElement(o.av,a()({serviceName:"instagram"},e)),name:"instagram",preview:p.m}:null,{title:__("LinkedIn","jetpack"),icon:e=>l().createElement(o.av,a()({serviceName:"linkedin"},e)),name:"linkedin",preview:m.y},{title:__("Tumblr","jetpack"),icon:e=>l().createElement(o.av,a()({serviceName:"tumblr"},e)),name:"tumblr",preview:g.Z},t?{title:__("Mastodon","jetpack"),icon:e=>l().createElement(o.av,a()({serviceName:"mastodon"},e)),name:"mastodon",preview:h.Z}:null].filter(Boolean)),[e,t])}},25399:function(e,t,n){"use strict";function r(e){return e?e.media_details?.sizes?.large?.source_url||e.source_url:null}n.d(t,{i:function(){return r}})},68407:function(e,t,n){"use strict";n.d(t,{H8:function(){return c},nE:function(){return s}});var r=n(94333),a=n(9818),o=n(92694),i=n(36797);const s={"core/gallery":{contentAttributes:["images"]},"core/heading":{contentAttributes:["content"]},"core/image":{contentAttributes:["alt","url"]},"core/list":{contentAttributes:["values"]},"core/paragraph":{contentAttributes:["content"]},"core/quote":{contentAttributes:["value","citation"]},"core/separator":{contentAttributes:[]},"core/spacer":{contentAttributes:[]},"core/verse":{contentAttributes:["content"]},"core/video":{contentAttributes:["src"]},"core/embed":{contentAttributes:["url"]},"jetpack/gif":{contentAttributes:["giphyUrl"]}},c=["core/column","core/columns","core/group"];(0,o.addFilter)("blocks.registerBlockType","jetpack/publishing-tweetstorms",(e=>{const{edit:t}=e;return{...e,edit:e=>React.createElement(i.Z,{ChildEdit:t,childProps:e})}}));t.ZP=(0,r.compose)([(0,a.withSelect)((e=>({isTweetStorm:e("jetpack/publicize").isTweetStorm(),isTyping:e("core/block-editor").isTyping()})))])((e=>{let{isTweetStorm:t,isTyping:n}=e;return t?document.body.classList.add("jetpack-tweetstorm"):document.body.classList.remove("jetpack-tweetstorm"),t&&n?document.body.classList.add("jetpack-tweetstorm-is-typing"):document.body.classList.remove("jetpack-tweetstorm-is-typing"),null}))},63609:function(e,t,n){"use strict";var r=n(55609),a=n(94333),o=n(9818),i=n(69307),s=n(65736);n(42998);const __=s.__;t.Z=(0,a.compose)([(0,o.withSelect)((e=>{const{isTweetStorm:t,getTweetStorm:n}=e("jetpack/publicize");return{connections:e("core/editor").getEditedPostAttribute("jetpack_publicize_connections"),isTweetStorm:t(),tweetStormLength:n().length}})),(0,o.withDispatch)((e=>({setTweetstorm:t=>{e("core/editor").editPost({meta:{jetpack_is_tweetstorm:t}}),t?e("jetpack/publicize").refreshTweets():(e("core/annotations").__experimentalRemoveAnnotationsBySource("jetpack-tweetstorm"),e("core/annotations").__experimentalRemoveAnnotationsBySource("jetpack-tweetstorm-line-break"))}})))])((e=>{let{connections:t,isTweetStorm:n,tweetStormLength:a,setTweetstorm:o,prePublish:s}=e;const c=(0,i.useCallback)((e=>{o("tweetstorm"===e)}),[o]);if(!t?.some((e=>"twitter"===e.service_name&&e.enabled&&!1!==e.is_healthy)))return null;const l=(e,t)=>React.createElement(React.Fragment,null,React.createElement("strong",null,e),React.createElement("br",null),t),u=[];return a>=102?u.push({id:"jetpack-publicize-twitter-tweetstorm-too-long",status:"error",content:__("Only the first 100 tweets of this post will be published in the Twitter thread.","jetpack"),isDismissible:!1}):a>=22?u.push({id:"jetpack-publicize-twitter-tweetstorm-a-bit-long",status:"warning",content:__("This post will create a Twitter thread more than 20 tweets long.","jetpack"),isDismissible:!1}):s&&a<=2&&u.push({id:"jetpack-publicize-twitter-tweetstorm-too-short",status:"warning",content:__("None of the content in this post could be transformed into tweets, it may be better to share as a single tweet.","jetpack"),isDismissible:!1}),React.createElement(r.PanelRow,null,React.createElement(r.RadioControl,{label:__("Twitter settings","jetpack"),selected:n?"tweetstorm":"single",options:[{label:l(__("Single Tweet","jetpack"),__("Share a link to this post to Twitter.","jetpack")),value:"single"},{label:l(__("Twitter Thread","jetpack"),__("Share the content of this post as a Twitter thread.","jetpack")),value:"tweetstorm"}],onChange:c}),n&&React.createElement(r.NoticeList,{className:"jetpack-publicize-twitter-options__notices",notices:u}))}))},36797:function(e,t,n){"use strict";var r=n(3396),a=n(55609),o=n(94333),i=n(9818),s=n(69307),c=n(92819);n(42998);class l extends s.Component{componentDidMount(){const{isTweetStorm:e,updateTweets:t}=this.props;e&&t()}componentDidUpdate(e){const{boundaries:t,childProps:n,currentAnnotations:r,isTweetStorm:a,updateAnnotations:o,updateTweets:i,supportedBlockType:s,contentAttributesChanged:l}=this.props;a&&s&&(l(e.childProps,n)&&i(),r.length===t.filter((e=>["normal","line-break"].includes(e.type))).length&&(0,c.isEqual)(e.boundaries,t)||o())}render(){const{ChildEdit:e,childProps:t,isTweetStorm:n,isSelectedTweetBoundary:o,boundaryStylesSelectors:i,popoverWarnings:s}=this.props;return n?React.createElement(React.Fragment,null,React.createElement(e,t),o&&React.createElement("div",{className:"jetpack-publicize-twitter__tweet-divider"},React.createElement("div",{className:"jetpack-publicize-twitter__tweet-divider-icon"},React.createElement(r.av,{serviceName:"twitter"})),s.length>0&&React.createElement(a.Popover,{className:"jetpack-publicize-twitter__tweet-divider-popover",focusOnMount:!1,position:"bottom center"},React.createElement("ol",null,s.map(((e,t)=>React.createElement("li",{key:`jetpack-publicize-twitter__tweet-divider-popover-warning-${t}`},e)))))),i&&React.createElement("style",{type:"text/css"},i.map((e=>`${e}::after {\n\t\t\t\t\t\t\t\tcontent: "";\n\t\t\t\t\t\t\t\tbackground: #0009;\n\t\t\t\t\t\t\t\twidth: 3px;\n\t\t\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\t\t\tmargin: 0 1px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t.is-dark-theme ${e}::after {\n\t\t\t\t\t\t\t\tbackground: #fff9;\n\t\t\t\t\t\t\t}`)))):React.createElement(e,t)}}t.Z=(0,o.compose)([(0,i.withSelect)(((e,t)=>{let{childProps:n}=t;const{isTweetStorm:r,getPopoverWarnings:a,getBoundariesForBlock:o,getBoundaryStyleSelectors:i,isSelectedTweetBoundary:s,getSupportedBlockType:c,contentAttributesChanged:l}=e("jetpack/publicize"),u=e("core/annotations").__experimentalGetAllAnnotationsForBlock(n.clientId);return{isTweetStorm:r(),isSelectedTweetBoundary:s(n),boundaries:o(n.clientId),boundaryStylesSelectors:i(n.clientId),popoverWarnings:a(n),currentAnnotations:u,supportedBlockType:c(n.name),contentAttributesChanged:l}})),(0,i.withDispatch)(((e,t,n)=>{let{childProps:r}=t,{select:a}=n;return{updateTweets:()=>e("jetpack/publicize").refreshTweets(),updateAnnotations:()=>{const{contentAttributesChanged:t,getTweetsForBlock:n}=a("jetpack/publicize"),o=n(r.clientId);if(!o||0===o.length)return;if(t(o.reduce(((e,t)=>e||t.blocks.find((e=>e.clientId===r.clientId))),!1),r))return;a("core/annotations").__experimentalGetAllAnnotationsForBlock(r.clientId).forEach((t=>{["jetpack-tweetstorm","jetpack-tweetstorm-line-break"].includes(t.source)&&e("core/annotations").__experimentalRemoveAnnotation(t.id)}));o.filter((e=>e.boundary)).map((e=>e.boundary)).forEach((t=>{const{container:n,type:a,start:o,end:i}=t;"normal"===a?e("core/annotations").__experimentalAddAnnotation({blockClientId:r.clientId,source:"jetpack-tweetstorm",richTextIdentifier:n,range:{start:o,end:i}}):"line-break"===a&&e("core/annotations").__experimentalAddAnnotation({blockClientId:r.clientId,source:"jetpack-tweetstorm-line-break",richTextIdentifier:n,range:{start:o,end:i}})}))}}}))])(l)},13858:function(e,t,n){"use strict";var r=n(69307),a=n(87728);t.Z=e=>{let{sourceUrl:t,mime:n,duration:o}=e;const[i,s]=(0,r.useState)(!1),[c,l]=(0,r.useState)(0),u=(0,r.useRef)(null),d=(0,r.useRef)(null),p=(0,r.useRef)(null);(0,r.useEffect)((()=>{u.current?.load()}),[t]);const m=(0,r.useCallback)((()=>{u.current.pause(),u.current.currentTime=0,clearInterval(d.current),clearTimeout(p.current),l(0),s(!1)}),[]),h=(0,r.useCallback)((()=>{p.current=setTimeout((()=>{i||(u.current.play(),s(!0),d.current=setInterval((()=>{l((e=>e+1))}),1e3))}),500)}),[i]),g=()=>{const e=o-c,t=Math.floor(e/60),n=String(Math.floor(e%60)).padStart(2,"0");return React.createElement("div",{className:a.Z.progress},React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"6",height:"8",fill:"none"},React.createElement("path",{fill:"#fff",d:"M5.25 3.567a.5.5 0 0 1 0 .866L.75 7.031A.5.5 0 0 1 0 6.598V1.402A.5.5 0 0 1 .75.969l4.5 2.598Z"})),React.createElement("span",{className:a.Z.duration},`${t}:${n}`))};return React.createElement("div",{className:a.Z.wrapper,onMouseEnter:h,onMouseLeave:m},React.createElement("video",{ref:u,onEnded:m,muted:!0},React.createElement("source",{src:t,type:n})),React.createElement(g,null))}},88219:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(9818),a=n(12238),o=n(69307);const i="jetpack/publicize";function s(){const{editPost:e}=(0,r.useDispatch)(a.store),{shouldUploadAttachedMedia:t,attachedMedia:n,currentOptions:s}=(0,r.useSelect)((e=>({shouldUploadAttachedMedia:e(i).shouldUploadAttachedMedia(),attachedMedia:e(i).getAttachedMedia(),currentOptions:e(i).getJetpackSocialOptions()}))),c=(0,o.useCallback)(((t,n)=>{e({meta:{jetpack_social_options:{...s,[t]:n}}})}),[s,e]);return{attachedMedia:n,shouldUploadAttachedMedia:t,updateAttachedMedia:e=>c("attached_media",e),updateShouldUploadAttachedMedia:e=>c("should_upload_attached_media",e)}}},75323:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(13419),a=n(86989),o=n.n(a),i=n(69307);const s={instagram:"instagram",advancedUpgradeEditor:"advanced-upgrade-nudge-editor",advancedUpgradeAdmin:"advanced-upgrade-nudge-admin",autoConversion:"auto-conversion-editor-notice"},c=e=>-1===e?0:new Date(Date.now()+1e3*e).getTime();function l(){const[e,t]=(0,i.useState)((()=>(0,r.Pb)()?.social?.dismissedNotices??window?.jetpackSocialInitialState?.jetpackSettings?.dismissedNotices??{})),n=(0,i.useCallback)((function(e){const n=c(arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1);t((t=>({...t,[e]:n}))),o()({path:"jetpack/v4/social/dismiss-notice",method:"POST",data:{notice:e,reappearance_time:n}})}),[]),a=(0,i.useCallback)((t=>{const n=e[t];return!(0===n||n>Date.now())}),[e]);return(0,i.useMemo)((()=>({dismissedNotices:e,shouldShowNotice:a,dismissNotice:n,NOTICES:s})),[e,a,n])}},39118:function(e,t,n){"use strict";var r=n(9818),a=n(12238);t.Z=()=>(0,r.useSelect)((e=>e(a.store).getEditedPostAttribute("featured_media")))},75263:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(9818),a=n(12238),o=n(69307);const i="jetpack/publicize",s=(e,t)=>({isEnabled:e?.enabled??!t,customText:e?.custom_text??null,imageType:e?.image_type??null,imageId:e?.image_id??null,template:e?.template??null,token:e?.token??null});function c(){const{editPost:e}=(0,r.useDispatch)(a.store),{postSettings:t,currentOptions:n}=(0,r.useSelect)((e=>({postSettings:e(i).getImageGeneratorPostSettings(),currentOptions:e(i).getJetpackSocialOptions()}))),{isPostPublished:c}=(0,r.useSelect)((e=>({isPostPublished:e(a.store).isCurrentPostPublished()}))),l=(0,o.useCallback)((t=>{e({meta:{jetpack_social_options:{...n,image_generator_settings:t}}})}),[n,e]),u=(0,o.useCallback)(((e,n)=>{const r={...t,[e]:n};l(r)}),[t,l]),d=(0,o.useCallback)((e=>{const n={...t,...e};l(n)}),[t,l]);return{...s(n?.image_generator_settings,c),setIsEnabled:e=>u("enabled",e),setToken:e=>u("token",e),updateSettings:d}}},98811:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(9818),a=n(69307);const o=async e=>{if(!e)return{};let t={mime:e.mime_type,fileSize:e.media_details.filesize,length:e.media_details?.length};"video/videopress"===e.mime_type&&(t=await(async e=>{if(!e?.media_details?.videopress?.original||!e?.media_details?.videopress?.duration)return{};const t=await fetch(e?.media_details?.videopress?.original,{method:"HEAD"}),n=t.headers.get("content-length"),r=t.headers.get("content-type");return n&&r?{mime:r,fileSize:n,length:Math.round(e.media_details.videopress.duration/1e3)}:{}})(e));const n=e?.media_details?.sizes??{};if(0===Object.keys(n).length)return{mediaData:{width:e.media_details.width,height:e.media_details.height,sourceUrl:e.source_url},metaData:t};const r=n.large||n.thumbnail;return{mediaData:{width:r.width,height:r.height,sourceUrl:r.source_url},metaData:t}};function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const[t,n]=(0,a.useState)([{}]),i=(0,r.useSelect)((t=>t("core").getMedia(e,{context:"view"})),[e]),s=(0,a.useCallback)((async()=>{try{const e=await o(i);n([e??{}])}catch{n([{}])}}),[i]);return(0,a.useEffect)((()=>{s()}),[s]),t}},46791:function(e,t,n){"use strict";n.d(t,{Wv:function(){return s},rs:function(){return o}});var r=n(69307),a=n(1795);const o="NO_MEDIA_ERROR",i="FILE_SIZE_ERROR";function s(e){return"video"===e.split("/")[0]}const c=e=>{if(!e?.mime||!e?.fileSize)return!1;const{mime:t,fileSize:n}=e;if(s(t))return!1;if(!a.bD.includes(t))return!1;return!((n?n/Math.pow(1e3,2):null)>=55)},l=(e,t,n,r)=>{const c=a.$8[n]??a.ay;if(!e||0===Object.keys(e).length)return c.requiresMedia?o:null;if(!c.requiresMedia&&!r)return null;const{mime:l,fileSize:u}=e;if(!l||!c.allowedMediaTypes.includes(l.toLowerCase()))return"FILE_TYPE_ERROR";const d=u?u/Math.pow(1e3,2):null;return s(l)?((e,t,n,r,o)=>{const{minSize:s=0,maxSize:c=a.zc,minLength:l=0,maxLength:u=a.zc,maxWidth:d=a.zc,aspectRatio:p=a.ay.video.aspectRatio}=o;if(!e||e>c||e<s)return i;if(!t||t<l)return"VIDEO_LENGTH_TOO_SHORT_ERROR";if(t>u)return"VIDEO_LENGTH_TOO_LONG_ERROR";const m=n/r;return m<p.min||m>p.max||n>d?"DIMENSION_ERROR":null})(d,e.length,t?.width,t?.height,c.video):((e,t)=>!e||e>t?i:null)(d,c.image.maxSize)};t.ZP=(e,t,n)=>{let{isSocialImageGeneratorEnabledForPost:a,shouldUploadAttachedMedia:o}=n;const i=(0,r.useRef)({});return(0,r.useMemo)((()=>{const n=a?{}:e.reduce(((e,n)=>{let{connection_id:r,service_name:a}=n;const i=l(t.metaData,t.mediaData,a,o);return i&&(e[r]=i),e}),{});return JSON.stringify(n)!==JSON.stringify(i.current)&&(i.current=n),{validationErrors:i.current,isConvertible:c(t.metaData)}}),[a,e,t.metaData,t.mediaData,o])}},1795:function(e,t,n){"use strict";n.d(t,{$8:function(){return d},ay:function(){return u},bD:function(){return p},fl:function(){return m},zc:function(){return l}});const r="video/mp4",a="video/mov",o="video/videopress",i=["image/jpeg","image/jpg","image/png"],s=i.concat(["image/gif","image/bmp"]),c=i.concat(["image/gif","image/heic","image/heif","image/webp","image/avif"]),l=1e5,u={requiresMedia:!1,allowedMediaTypes:i.concat([r,o,a]),image:{maxSize:4},video:{minLength:0,minSize:0,maxSize:l,maxLength:l,maxWidth:l,aspectRatio:{min:0,max:l}}},d={twitter:{allowedMediaTypes:i.concat([r,o]),image:{maxSize:5},video:{maxSize:512,maxLength:140}},facebook:{allowedMediaTypes:s.concat([o,"video/3g2","video/3gp","video/3gpp","video/asf","video/avi","video/dat","video/divx","video/dv","video/f4v","video/flv","video/gif","video/m2ts","video/m4v","video/mkv","video/mod","video/mov","video/mp4","video/mpe","video/mpeg","video/mpeg4","video/mpg","video/mts","video/nsv","video/ogm","video/ogv","video/qt","video/tod","video/ts","video/vob","video/wmv"]),image:{maxSize:8},video:{maxSize:1e4,maxLength:14400}},tumblr:{allowedMediaTypes:i.concat([r,a,o]),image:{maxSize:20},video:{maxSize:500,maxLength:600}},linkedin:{allowedMediaTypes:i.concat([r,o]),image:{maxSize:20},video:{minSize:.075,maxSize:200,maxLength:600,minLength:3}},"instagram-business":{requiresMedia:!0,allowedMediaTypes:["image/jpg","image/jpeg",r,a,o],image:{maxSize:8},video:{maxLength:90,minLength:3,maxSize:1e3,maxWidth:1920,aspectRatio:{min:.01,max:10}}},mastodon:{allowedMediaTypes:c.concat(["video/webm","video/quicktime","video/ogg",r,o]),image:{maxSize:10},video:{maxSize:40}}},p=["image/png","image/jpeg","image/jpg","image/heic","image/heif","image/webp"],m=[...new Set([...i,...s,...c,...p])]},14085:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(13419),a=n(9818),o=n(12238);const i="republicize";function s(){const{togglePublicizeFeature:e}=(0,a.useDispatch)("jetpack/publicize"),t=(0,r.Pb)()?.social?.sharesData??{},n=t.is_share_limit_enabled,s=(0,r.OZ)(i)?.available||n,c=(0,a.useSelect)((e=>e(o.store).isCurrentPostPublished()),[]),l=(0,a.useSelect)((e=>e("jetpack/publicize").getJetpackSocialPostAlreadyShared()),[]),u=(0,r.Pb)()?.social?.publicizeConnectionsUrl??"https://wordpress.com/marketing/connections/",d=(0,a.useSelect)((e=>e("jetpack/publicize").getFeatureEnableState()),[]),p=(0,r.X1)(i)&&!s,m=c?s:d,h=c&&p,g=c&&!s,f=!!(0,r.Pb)()?.social?.hasPaidPlan,b=!!(0,r.Pb)()?.social?.isEnhancedPublishingEnabled,v=!!(0,r.Pb)()?.social?.isAutoConversionEnabled;return{isPublicizeEnabledMeta:d,isPublicizeEnabled:m,togglePublicizeFeature:e,isPublicizeDisabledBySitePlan:h,isRePublicizeFeatureAvailable:s,isRePublicizeUpgradableViaUpsell:p,hidePublicizeFeature:g,isShareLimitEnabled:n,isPostAlreadyShared:l,numberOfSharesRemaining:t.shares_remaining,shouldShowAdvancedPlanNudge:t.show_advanced_plan_upgrade_nudge,hasPaidPlan:f,isEnhancedPublishingEnabled:b,isSocialImageGeneratorAvailable:!!(0,r.Pb)()?.social?.isSocialImageGeneratorAvailable,isSocialImageGeneratorEnabled:!!(0,r.Pb)()?.social?.isSocialImageGeneratorEnabled,connectionsAdminUrl:u+(0,r.lQ)(),adminUrl:(0,r.Pb)()?.social?.adminUrl,isAutoConversionEnabled:v,jetpackSharingSettingsUrl:(0,r.Pb)()?.social?.jetpackSharingSettingsUrl}}},6230:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(9818),a=n(69307),o=n(22552),i=n(23177);function s(){const e=(0,o.Z)(),t=(0,a.useRef)(!1),n=(0,r.useDispatch)(i.E).refreshAutoConversionSettings;return{refreshAutoConversionSettings:()=>{e||(t.current=!0),e&&t.current&&(n(),t.current=!1)}}}},96672:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(94333),a=n(69307),o=n(22552),i=n(37568);function s(){const e=(0,a.useRef)(!1),t=(0,o.Z)(),{refresh:n}=(0,i.Z)(),s=(0,r.useDebounce)(n,2e3);return()=>{t||(e.current=!0,s.cancel()),t&&e.current&&(s(),e.current=!1)}}},86419:function(e,t,n){"use strict";n.d(t,{M1:function(){return s},e3:function(){return c}});var r=n(94333),a=n(9818),o=n(12238),i=n(69307);function s(e,t){const n=(0,a.useSelect)((e=>e(o.store).isPublishingPost()),[]),s=(0,r.usePrevious)(n);(0,i.useEffect)((()=>{s&&!n&&e()}),[n,s,e,t])}function c(e,t){const n=(0,a.useSelect)((e=>e(o.store).isPublishingPost()),[]),s=(0,r.usePrevious)(n);(0,i.useEffect)((()=>{!s&&n&&e()}),[n,s,e,t])}},45579:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(13419),a=n(86989),o=n.n(a),i=n(9818),s=n(12238),c=n(69307),l=n(65736),u=n(37568),d=n(48751);const __=l.__;function p(e){const t=e?.code,n=e?.errors?.length;if(!t&&!n)return!1;let r="";return t&&(r=__("Unable to share the Post","jetpack")),n&&(r=__("Unable to share the Post","jetpack")),{message:r,result:e}}function m(e){const{message:t}=(0,d.Z)(),{skippedConnections:n}=(0,u.Z)(),a=(0,i.useSelect)((e=>e(s.store).getCurrentPostId()),[]);e=e||a;const[l,m]=(0,c.useState)({data:[],error:{}}),h=((0,r.Pb)()?.social?.resharePath??"/wpcom/v2/posts/{postId}/publicize").replace("{postId}",e),g=(0,c.useCallback)((function(){const r={isFetching:!1,isError:!1,isSuccess:!1,data:[],error:{},postId:e};if(!l.isFetching)return m({...r,isFetching:!0}),o()({path:h,method:"POST",data:{message:t,skipped_connections:n}}).then((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=p(e);if(t)return m((e=>({...e,isFetching:!1,isSuccess:!1,isError:!0,data:[],error:t})));m((t=>({...t,isFetching:!1,isSuccess:!0,isError:!1,data:e?.results,error:{}})))})).catch((e=>{m((t=>({...t,isFetching:!1,isSuccess:!1,isError:!0,data:[],error:p(e)})))})),function(){m(r)}}),[e,t,n,l.isFetching,h]);return{...l,doPublicize:g}}},37568:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(9818);function a(){const{refreshConnectionTestResults:e,toggleConnectionById:t}=(0,r.useDispatch)("jetpack/publicize"),n=(0,r.useSelect)((e=>e("jetpack/publicize").getConnections()),[]),a=n.filter((e=>!e.enabled)).map((e=>e.id)),o=n.filter((e=>e.enabled));return{connections:n,hasConnections:n.length>0,hasEnabledConnections:n&&n.some((e=>e.enabled)),skippedConnections:a,enabledConnections:o,toggleById:t,refresh:e}}},48751:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(9818),a=n(12238);function o(){const{editPost:e}=(0,r.useDispatch)(a.store),{message:t,maxLength:n}=(0,r.useSelect)((e=>({message:e("jetpack/publicize").getShareMessage(),maxLength:e("jetpack/publicize").getShareMessageMaxLength()})),[]);return{message:t,maxLength:n,updateMessage:function(t){e({meta:{jetpack_publicize_message:t}})}}}},21052:function(e,t,n){"use strict";n.d(t,{Wh:function(){return s},wO:function(){return i}});var r=n(9818),a=n(23177),o=n(4957);const i="SET_AUTO_CONVERSION_SETTINGS";function s(e){return{type:i,options:e}}t.ZP={updateAutoConversionSettings:function*(e){try{yield s({isUpdating:!0}),yield s(e),yield(0,o.Fl)(e);const t=yield(0,o.wi)();return yield s(t),!0}catch(e){const t=(0,r.select)(a.E).getAutoConversionSettings();return yield s(t),!1}finally{yield s({isUpdating:!1})}},setAutoConversionSettings:s,refreshAutoConversionSettings:function*(){try{const e=yield(0,o.wi)();return yield s(e),!0}catch(e){return!1}}}},54725:function(e,t,n){"use strict";var r=n(21052),a=n(371),o=n(4462);const i={...a.ZP,...o.ZP,...r.ZP};t.Z=i},371:function(e,t,n){"use strict";n.d(t,{dz:function(){return i},ff:function(){return s}});var r=n(9818),a=n(23177),o=n(4957);const i="SET_JETPACK_SETTINGS";function s(e){return{type:i,options:e}}t.ZP={updateJetpackSettings:function*(e){try{yield s({is_updating:!0}),yield s(e),yield(0,o.RF)(e);const t=yield(0,o.es)();return yield s(t),!0}catch(e){const t=(0,r.select)(a.E).getJetpackSettings();return yield s(t),!1}finally{yield s({is_updating:!1})}},setJetpackSettings:s}},4462:function(e,t,n){"use strict";n.d(t,{ch:function(){return s},kg:function(){return i}});var r=n(9818),a=n(23177),o=n(4957);const i="SET_SOCIAL_IMAGE_GENERATOR_SETTINGS";function s(e){return{type:i,options:e}}t.ZP={updateSocialImageGeneratorSettings:function*(e){try{yield s({isUpdating:!0}),yield s(e),yield(0,o.Ux)(e);const t=yield(0,o.oB)();return yield s(t),!0}catch(e){const t=(0,r.select)(a.E).getSocialImageGeneratorSettings();return yield s(t),!1}finally{yield s({isUpdating:!1})}},setSocialImageGeneratorSettings:s}},4957:function(e,t,n){"use strict";n.d(t,{Fl:function(){return f},RF:function(){return p},Ux:function(){return h},es:function(){return d},oB:function(){return m},wi:function(){return g}});var r=n(86989),a=n.n(r);const o="FETCH_JETPACK_SETTINGS",i="UPDATE_JETPACK_SETTINGS",s="FETCH_SOCIAL_IMAGE_GENERATOR_SETTINGS",c="UPDATE_SOCIAL_IMAGE_GENERATOR_SETTINGS",l="FETCH_AUTO_CONVERSION_SETTINGS",u="UPDATE_AUTO_CONVERSION_SETTINGS",d=()=>({type:o}),p=e=>({type:i,settings:e}),m=()=>({type:s}),h=e=>({type:c,settings:e}),g=()=>({type:l}),f=e=>({type:u,settings:e});t.ZP={[o]:function(){return a()({path:"/jetpack/v4/social/settings"})},[i]:function(e){return a()({path:"/jetpack/v4/social/settings",method:"POST",data:e.settings})},[s]:function(){return a()({path:"/jetpack/v4/social-image-generator/settings"})},[c]:function(e){return a()({path:"/jetpack/v4/social-image-generator/settings",method:"POST",data:e.settings})},[l]:function(){return a()({path:"/jetpack/v4/auto-conversion/settings"})},[u]:function(e){return a()({path:"/jetpack/v4/auto-conversion/settings",method:"POST",data:e.settings})}}},23177:function(e,t,n){"use strict";n.d(t,{E:function(){return l}});var r=n(9818),a=n(54725),o=n(4957),i=n(45272),s=n(15781),c=n(22987);const l="jetpack-social-plugin",u={reducer:i.Z,actions:a.Z,selectors:c.Z,resolvers:s.ZP,controls:o.ZP,initialState:window?.jetpackSocialInitialState||window?.Initial_State?.socialInitialState||window?.Jetpack_Editor_Initial_State?.social||{}},d=(0,r.createReduxStore)(l,u);(0,r.register)(d)},20750:function(e,t,n){"use strict";var r=n(21052);t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.type===r.wO?{...e,...t.options}:e}},71837:function(e,t){"use strict";t.Z=function(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}},45272:function(e,t,n){"use strict";var r=n(9818),a=n(20750),o=n(71837),i=n(80697),s=n(35652),c=n(28696),l=n(54489);const u=(0,r.combineReducers)({sharesData:s.Z,siteData:c.Z,connectionData:o.Z,jetpackSettings:i.Z,socialImageGeneratorSettings:l.Z,autoConversionSettings:a.Z});t.Z=u},80697:function(e,t,n){"use strict";var r=n(371);t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.type===r.dz?{...e,...t.options}:e}},35652:function(e,t){"use strict";t.Z=function(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}},28696:function(e,t){"use strict";t.Z=function(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}},54489:function(e,t,n){"use strict";var r=n(4462);t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.type===r.kg?{...e,...t.options}:e}},15781:function(e,t,n){"use strict";var r=n(21052),a=n(371),o=n(4462),i=n(4957);t.ZP={getJetpackSettings:function*(){try{const e=yield(0,i.es)();if(e)return(0,a.ff)(e)}catch(e){console.log(e)}},getSocialImageGeneratorSettings:function*(){try{const e=yield(0,i.oB)();if(e)return(0,o.ch)(e)}catch(e){console.log(e)}},getAutoConversionSettings:function*(){try{const e=yield(0,i.wi)();if(e)return(0,r.Wh)(e)}catch(e){console.log(e)}}}},68113:function(e,t){"use strict";t.Z={getAutoConversionSettings:e=>e.autoConversionSettings,isAutoConversionAvailable:e=>e.autoConversionSettings.available,isAutoConversionEnabled:e=>e.autoConversionSettings.image,isAutoConversionSettingsUpdating:e=>e.autoConversionSettings.isUpdating}},43354:function(e,t){"use strict";const n=e=>e.connectionData?.connections??{},r={getConnections:n,getConnectionsAdminUrl:e=>e.connectionData?.adminUrl??null,hasConnections:e=>Object.keys(n(e)).length>0};t.Z=r},22987:function(e,t,n){"use strict";var r=n(68113),a=n(43354),o=n(82836),i=n(66450),s=n(85675),c=n(45073);const l={...s.Z,...a.Z,...o.Z,...i.Z,...c.Z,...r.Z};t.Z=l},82836:function(e,t){"use strict";t.Z={getJetpackSettings:e=>e.jetpackSettings,isModuleEnabled:e=>e.jetpackSettings.publicize_active,showPricingPage:e=>e.jetpackSettings.show_pricing_page,isUpdatingJetpackSettings:e=>e.jetpackSettings.is_updating,hasPaidPlan:e=>!(e.jetpackSettings?.showNudge??1),isEnhancedPublishingEnabled:e=>e.jetpackSettings?.isEnhancedPublishingEnabled??!1,getDismissedNotices:e=>e.jetpackSettings?.dismissedNotices,isInstagramConnectionSupported:e=>e.jetpackSettings?.isInstagramConnectionSupported,isMastodonConnectionSupported:e=>e.jetpackSettings?.isMastodonConnectionSupported}},66450:function(e,t){"use strict";t.Z={getSharesCount:e=>(e.sharesData?.publicized_count??0)+(e.sharesData?.to_be_publicized_count??0),getPostsCount:e=>e.sharesData?.shared_posts_count??0,isShareLimitEnabled:e=>e.sharesData?.is_share_limit_enabled??!1,numberOfSharesRemaining:e=>e.sharesData?.shares_remaining??null,shouldShowAdvancedPlanNudge:e=>e.sharesData?.show_advanced_plan_upgrade_nudge??!1}},85675:function(e,t){"use strict";t.Z={getAdminUrl:e=>e.siteData?.adminUrl??null,getAPIRootUrl:e=>e.siteData?.apiRoot??null,getAPINonce:e=>e.siteData?.apiNonce??null,getRegistrationNonce:e=>e.siteData?.registrationNonce??null,getSiteSuffix:e=>e.siteData?.siteSuffix??null,getPluginVersion:e=>e.siteData?.pluginVersion??null}},45073:function(e,t){"use strict";t.Z={getSocialImageGeneratorSettings:e=>e.socialImageGeneratorSettings,isSocialImageGeneratorAvailable:e=>e.socialImageGeneratorSettings.available,isSocialImageGeneratorEnabled:e=>e.socialImageGeneratorSettings.enabled,isUpdatingSocialImageGeneratorSettings:e=>e.socialImageGeneratorSettings.isUpdating,getSocialImageGeneratorDefaultTemplate:e=>e.socialImageGeneratorSettings.defaultTemplate}},13530:function(e,t,n){"use strict";n.r(t),n.d(t,{fetchFromAPI:function(){return s},getTwitterCards:function(){return u},refreshConnectionTestResults:function(){return a},refreshTweets:function(){return c},setTweets:function(){return l},setTwitterCards:function(){return d},toggleConnectionById:function(){return o},togglePublicizeFeature:function(){return i}});var r=n(9818);function a(){return{type:"REFRESH_CONNECTION_TEST_RESULTS"}}function o(e){return{type:"TOGGLE_CONNECTION_BY_ID",connectionId:e}}function i(){return{type:"TOGGLE_PUBLICIZE_FEATURE"}}function s(e){return{type:"FETCH_FROM_API",path:e}}function c(){return{type:"REFRESH_TWEETS"}}function l(e){return{type:"SET_TWEETS",tweets:e}}function u(e){const{twitterCardIsCached:t}=(0,r.select)("jetpack/publicize");return{type:"GET_TWITTER_CARDS",urls:e.filter((e=>!t(e)))}}function d(e){return{type:"SET_TWITTER_CARDS",cards:e}}},99376:function(e,t,n){"use strict";var r=n(86989),a=n.n(r);t.Z={FETCH_FROM_API:e=>{let{path:t}=e;return a()({path:t})}}},43785:function(e,t,n){"use strict";var r=n(13419),a=n(86989),o=n.n(a),i=n(4981),s=n(9818),c=n(12238),l=n(92819),u=n(68407);const d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const{getSupportedBlockType:t}=(0,s.select)("jetpack/publicize");return(0,l.flatMap)(e,(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t(e.name)||e.name.startsWith("core-embed/")?e:u.H8.includes(e.name)?d(e.innerBlocks):[]}))};const p=(0,l.throttle)((async function(){const e=(0,s.select)("core/block-editor").getBlocks(),t=d(e);try{const e=await o()({path:"/wpcom/v2/tweetstorm/parse",data:{blocks:t.map((e=>({attributes:e.attributes,block:(0,i.serialize)(e),clientId:e.clientId})))},method:"POST"}),n=(0,l.flatMap)(e,(e=>e.urls));return(0,s.dispatch)("jetpack/publicize").getTwitterCards(n),(0,s.dispatch)("jetpack/publicize").setTweets(e)}catch(e){}}),2e3,{leading:!0,trailing:!0});t.ZP={REFRESH_CONNECTION_TEST_RESULTS:async function(){try{const e=(0,r.Pb)()?.social||{},t=e.connectionRefreshPath??"/wpcom/v2/publicize/connection-test-results",n=await o()({path:t}),a=(0,s.select)("jetpack/publicize").getConnections(),i=n,l=[],u={done:!1,enabled:Boolean(e.sharesData?.shares_remaining),toggleable:!0};for(const e of i){const t=a.find((t=>t.connection_id?t.connection_id===e.connection_id:t.id===e.id)),{done:n,enabled:r,toggleable:o}=t??u,i={display_name:e.display_name,username:e.username,service_name:e.service_name,id:e.id,profile_picture:e.profile_picture,done:n,enabled:r,toggleable:o,is_healthy:e.test_success,error_code:e.error_code,connection_id:e.connection_id};l.push(i)}return(0,s.dispatch)(c.store).editPost({jetpack_publicize_connections:l})}catch(e){}},TOGGLE_CONNECTION_BY_ID:async function(e){let{connectionId:t}=e;const n=(0,s.select)("jetpack/publicize").getConnections().map((e=>({...e,enabled:(e.connection_id?e.connection_id===t:e.id===t)?!e.enabled:e.enabled})));return(0,s.dispatch)(c.store).editPost({jetpack_publicize_connections:n})},TOGGLE_PUBLICIZE_FEATURE:async function(){const e=(0,s.select)("jetpack/publicize").getFeatureEnableState();return(0,s.dispatch)(c.store).editPost({meta:{jetpack_publicize_feature_enabled:!e}})},REFRESH_TWEETS:p,GET_TWITTER_CARDS:async function(e){if(0===e.urls.length)return(0,s.dispatch)("jetpack/publicize").setTwitterCards([]);try{const t=await o()({path:"/wpcom/v2/tweetstorm/generate-cards",data:{urls:e.urls},method:"POST"});return(0,s.dispatch)("jetpack/publicize").setTwitterCards(t)}catch(e){}}}},77771:function(e,t,n){"use strict";var r=n(9818),a=n(13530),o=n(99376),i=n(92479),s=n(82726),c=n(34074);const l=(0,r.registerStore)("jetpack/publicize",{actions:a,controls:o.Z,reducer:s.Z,selectors:c});(0,i.Z)(l)},92479:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(92819),a=n(24274),o=n.n(a),i=n(43785);function s(e){const t=[o()(i.ZP)];let n=()=>{throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},a=[];const s={getState:e.getState,dispatch:function(){return n(...arguments)}};return a=t.map((e=>e(s))),n=(0,r.flowRight)(...a)(e.dispatch),e.dispatch=n,e}},82726:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});const r={tweets:[],twitterCards:[]};function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REFRESH_CONNECTION_TEST_RESULTS":case"TOGGLE_CONNECTION_BY_ID":case"TOGGLE_PUBLICIZE_FEATURE":return e;case"SET_TWEETS":return{...e,tweets:t.tweets};case"GET_TWITTER_CARDS":{const n={};return t.urls.forEach((e=>n[e]={error:"loading"})),{...e,twitterCards:{...e.twitterCards,...n}}}case"SET_TWITTER_CARDS":return{...e,twitterCards:{...e.twitterCards,...t.cards}}}return e}},34074:function(e,t,n){"use strict";n.r(t),n.d(t,{checkForTagsInContentAttributes:function(){return L},contentAttributesChanged:function(){return I},getAttachedMedia:function(){return D},getBoundariesForBlock:function(){return x},getBoundaryStyleSelectors:function(){return N},getConnections:function(){return R},getFailedConnections:function(){return p},getFeatureEnableState:function(){return M},getFirstTweet:function(){return v},getImageGeneratorPostSettings:function(){return z},getInstagramDetails:function(){return g},getJetpackSocialOptions:function(){return Z},getJetpackSocialPostAlreadyShared:function(){return B},getLastTweet:function(){return k},getLinkedInDetails:function(){return h},getMustReauthConnections:function(){return m},getPopoverWarnings:function(){return T},getShareMessage:function(){return C},getShareMessageMaxLength:function(){return S},getSupportedBlockType:function(){return y},getTweetStorm:function(){return b},getTweetTemplate:function(){return f},getTweetsForBlock:function(){return w},getTwitterCardForURLs:function(){return E},isInstagramConnectionSupported:function(){return O},isMastodonConnectionSupported:function(){return U},isSelectedTweetBoundary:function(){return A},isTweetStorm:function(){return j},shouldUploadAttachedMedia:function(){return F},twitterCardIsCached:function(){return _}});var r=n(13419),a=n(9818),o=n(12238),i=n(65736),s=n(92819),c=n(96524),l=n(68407);const __=i.__,u=255,d="\n\n"+__("A thread ⬇️","jetpack");function p(){return R().filter((e=>!1===e.test_success))}function m(){return R().filter((e=>"must_reauth"===e.test_success)).map((e=>e.service_name))}function h(){let{forceDefaults:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e){const e=R().find((e=>{let{service_name:t}=e;return"linkedin"===t}));if(e)return{name:e.display_name,profileImage:e.profile_picture}}return{name:"",profileImage:""}}function g(){const e=R().find((e=>{let{service_name:t}=e;return"instagram-business"===t}));return e?{name:e.username,profileImage:e.profile_picture}:{name:"username",profileImage:""}}function f(e){const t=e.connections||R(),n=t?.find((e=>"twitter"===e.service_name));return{name:n?.profile_display_name,profileImage:n?.profile_picture,screenName:n?.display_name}}function b(e){const t=f(e),n=[v(e),...e.tweets.slice(0,100).map((n=>({...t,text:n.text,media:n.media,tweet:n.tweet,urls:n.urls,...E(e,n.urls)})))];return n.length>1&&n.push(k(e)),n}function v(e){if(!(0,a.select)("core"))return;const t=f(e),{getMedia:n}=(0,a.select)("core"),{getEditedPostAttribute:r}=(0,a.select)("core/editor"),o=r("featured_media"),i=r("link"),s=o&&n(o),c=s?.media_details?.sizes?.large?.source_url||s?.source_url;return{...t,text:C()+` ${i}`,urls:[i],title:r("title"),description:r("meta")?.advanced_seo_description||r("excerpt")||r("content").split("\x3c!--more")[0]||__("Visit the post for more.","jetpack"),url:i,image:c,cardType:c?"summary_large_image":"summary"}}function k(e){if(!(0,a.select)("core/editor"))return;const{getEditedPostAttribute:t}=(0,a.select)("core/editor"),n=t("link"),r=e.tweets.length>100?__("The rest of this thread can be read here:","jetpack"):__("This thread can be read here:","jetpack");return{...v(e),text:`${r} ${n}`}}function y(e,t){if(l.nE[t])return l.nE[t]}const w=(0,c.Z)(((e,t)=>e.tweets.filter((e=>!!e.blocks.find((e=>e.clientId===t))))),(e=>[e.tweets]));function E(e,t){if(t)return t.reduce(((t,n)=>t||(e.twitterCards[n]&&!e.twitterCards[n].error?{url:n,...e.twitterCards[n]}:void 0)),void 0)}function _(e,t){return!!e.twitterCards[t]}function C(){const{getEditedPostAttribute:e}=(0,a.select)("core/editor"),t=e("meta"),n=e("title"),r=(0,s.get)(t,["jetpack_publicize_message"],"");return r?r.substr(0,S()):j()&&n?n.substr(0,S())+d:""}function S(){return j()?u-d.length:u}function j(){return!!(0,a.select)("core/editor").getEditedPostAttribute("meta")?.jetpack_is_tweetstorm}const x=(0,c.Z)(((e,t)=>{if(!j())return[];const n=w(e,t);return n&&0!==n.length?n.filter((e=>e.boundary)).map((e=>e.boundary)):[]}),(e=>[e.tweets]));function P(e,t){if(`block-${t}`===e.id)return`#block-${t}`;const n=e.parentNode,r=Array.prototype.indexOf.call(n.children,e);return P(n,t)+` > :nth-child( ${r+1} )`}const N=(0,c.Z)(((e,t)=>{const n=x(e,t),r=document.getElementById(`block-${t}`);return n.filter((e=>"end-of-line"===e.type)).map((e=>{if(!r)return!1;const n=r.getElementsByTagName("li").item(e.line);return!!n&&P(n,t)})).filter((e=>!!e))}),(e=>[e.tweets]));function L(e,t,n){if(0===n.length)return!1;if(!y(0,t.name)?.contentAttributes)return!1;const r=new RegExp(`<(${n.join("|")})( |>|/>)`,"gi");return y(0,t.name).contentAttributes.reduce(((e,n)=>!!e||r.test(t.attributes[n])),!1)}const T=(0,c.Z)(((e,t)=>{const{isTyping:n,isDraggingBlocks:r,isMultiSelecting:o,hasMultiSelection:i,isCaretWithinFormattedText:s}=(0,a.select)("core/block-editor");if(!j())return[];if(n()||r()||o()||i()||s())return[];const c=[];return y(0,t.name)||l.H8[t.name]?("core/gallery"===t.name&&t.attributes.images.length>4&&c.push(__("Twitter displays the first four images.","jetpack")),L(0,t,["strong","bold","em","i","sup","sub","span","s"])&&c.push(__("Twitter removes all text formatting.","jetpack")),L(0,t,["a"])&&c.push(__("Links will be posted seperately.","jetpack"))):c.push(__("This block is not exportable to Twitter","jetpack")),c}),(e=>[e.tweets]));function A(e,t){const{isBlockSelected:n}=(0,a.select)("core/block-editor");if(!j())return!1;const r=y(0,t.name),o=w(e,t.clientId);if(!o||0===o.length)return!1;const i=o[o.length-1];return n(t.clientId)&&!r||i.blocks[i.blocks.length-1].clientId===t.clientId&&o.some((e=>e.blocks.some((e=>n(e.clientId)))))}function I(e,t,n){const r=y(0,n.name);if(!r)return!1;const a=r.contentAttributes;return!(0,s.isEqual)(a.map((e=>({attribute:e,content:t.attributes[e]}))),a.map((e=>({attribute:e,content:n.attributes[e]}))))}function R(){return(0,a.select)(o.store).getEditedPostAttribute("jetpack_publicize_connections")||[]}function M(){const{getEditedPostAttribute:e}=(0,a.select)(o.store),t=e("meta");return(0,s.get)(t,["jetpack_publicize_feature_enabled"],!0)}function Z(){const{getEditedPostAttribute:e}=(0,a.select)(o.store),t=e("meta");return(0,s.get)(t,["jetpack_social_options"],{})}function B(){const{getEditedPostAttribute:e}=(0,a.select)(o.store),t=e("meta");return(0,s.get)(t,["jetpack_social_post_already_shared"],{})}function D(){return(0,s.get)(Z(),["attached_media"],[])}function F(){return Z()?.should_upload_attached_media??!1}function z(){return Z()?.image_generator_settings??{}}function O(){return!!(0,r.Pb)()?.social?.isInstagramConnectionSupported}function U(){return!!(0,r.Pb)()?.social?.isMastodonConnectionSupported}},13419:function(e,t,n){"use strict";n.d(t,{Dp:function(){return u.Z},FK:function(){return l.FK},HD:function(){return l.HD},M6:function(){return o.M6},OZ:function(){return i.Z},Pb:function(){return r.Z},Pm:function(){return m.Z},Qq:function(){return l.Qq},Rl:function(){return l.Rl},T:function(){return c.Z},Ug:function(){return o.Ug},Wp:function(){return o.Wp},X1:function(){return l.X1},_D:function(){return l._D},aQ:function(){return o.aQ},dM:function(){return h.d},el:function(){return p.Z},lQ:function(){return a.Z},lt:function(){return h.l},m3:function(){return l.m3},o_:function(){return s.Z},z$:function(){return d.Z}});var r=n(50148),a=n(35004),o=n(99505),i=n(48052),s=n(76714),c=n(80354),l=n(75404),u=n(68586),d=n(61053),p=n(11380),m=n(6342),h=n(96959)},6342:function(e,t,n){"use strict";var r=n(78868),a=n(99196),o=n.n(a);t.Z=()=>o().createElement(r.Z,{className:"jetpack-editor-panel-logo",height:16,logoColor:"#1E1E1E",showText:!1})},96959:function(e,t,n){"use strict";n.d(t,{d:function(){return o},l:function(){return i}});var r=n(69307),a=n(12953);function o(e){const t={};let n="span",a=e.icon;const o=document.createElement("div");o.innerHTML=e.icon;const i=o.querySelector("svg");return i&&(n="svg",a=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:a||""}})}function i(e){return{src:o(e),foreground:(0,a.Z)()}}},12953:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(99505);const a="#069e08";function o(){return(0,r.Ug)()||(0,r.Wp)()?null:a}},50148:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});const r="Jetpack_Editor_Initial_State";function a(){return"object"==typeof window?window?.[r]??null:null}},48052:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(50148);function a(e){const t=(0,r.Z)(),n=t?.available_blocks?.[e]?.available??!1,a=t?.available_blocks?.[e]?.unavailable_reason??"unknown";return{available:n,...!n&&{details:t?.available_blocks?.[e]?.details??[],unavailableReason:a}}}},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),a=n(31294),o=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,o.useState)(!1),{isUserConnected:d,isRegistered:p,userConnectionData:m={}}=(0,a.Z)(),{wpcomUser:{login:h,ID:g}={},blogId:f}=m.currentUser||{},b=(0,o.useCallback)((async function(e){d&&g&&h&&s(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}),[d,g,h]);return(0,o.useEffect)((()=>{d&&g&&h&&f&&r.Z.initialize(g,h,{blog_id:f})}),[f,g,h,d]),(0,o.useEffect)((()=>{const r=e?`${t}_${e}_${n}`:null;p&&r&&(l||(b(r,c),u(!0)))}),[l,t,e,n,p,c,b]),{recordEvent:b,tracks:i}}},11380:function(e,t,n){"use strict";var r=n(86989),a=n.n(r),o=n(69307),i=n(99505);async function s(e){if((0,i.Wp)())return!0;try{const t=await async function(){try{return await a()({path:"/jetpack/v4/module/all",method:"GET"})}catch(e){return e.message}}();return!(!t||!t.hasOwnProperty(e))&&!!t[e].activated}catch(e){return!1}}t.Z=e=>{const[t,n]=(0,o.useState)(Boolean(e)),[r,i]=(0,o.useState)(!1),[c,l]=(0,o.useState)(!1);(0,o.useEffect)((()=>{e&&(n(!0),s(e).then((e=>{l(e),n(!1)})))}),[e]);const u=(0,o.useCallback)((t=>{e&&c!==t&&(i(!0),async function(e,t){return await a()({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,o.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 a}});var r=n(50148);function a(){return(0,r.Z)()?.jetpack?.is_current_user_connected??!1}},75404:function(e,t,n){"use strict";n.d(t,{FK:function(){return g},HD:function(){return f},Qq:function(){return u},Rl:function(){return m},X1:function(){return d},_D:function(){return p},m3:function(){return b}});var r=n(65736),a=n(96483),o=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,o.startsWith)(t,"jetpack_")?t:(0,o.get)(n,["path_slug"]),u=(void 0===i?()=>{const e=new URLSearchParams(window.location.search);return(0,a.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,a.addQueryArgs)("/"+(0,o.compact)([e,i,(0,c.Z)(),r]).join("/"),{plan_upgraded:1}):(0,a.addQueryArgs)(window.location.protocol+`//${(0,c.Z)().replace("::","/")}/wp-admin/post.php`,{action:"edit",post:r,plan_upgraded:1})})();return(0,l.Ug)()?(0,a.addQueryArgs)(`https://wordpress.com/plans/${(0,c.Z)()}`,{redirect_to:u,customerType:"business"}):s&&(0,a.addQueryArgs)(`https://wordpress.com/checkout/${(0,c.Z)()}/${s}`,{redirect_to:u})}function d(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 p(e,t){return"missing_plan"===e&&t.required_plan}function m(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{details:n,unavailableReason:r}=(0,s.Z)(t);return p(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 g(){return(0,o.get)((0,i.Z)(),"jetpack.enable_upgrade_nudge",!1)}const f=e=>(0,o.map)(h,"name").includes(e),b=e=>(0,o.head)((0,o.filter)(h,(t=>{let{name:n}=t;return n===e})))},76714:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(98817),a=n(48052);function o(e,t){const{available:n,unavailableReason:o}=(0,a.Z)(e);return!!n&&(0,r.registerPlugin)(`jetpack-${e}`,t)}},99505:function(e,t,n){"use strict";n.d(t,{M6:function(){return s},Ug:function(){return i},Wp:function(){return o},aQ:function(){return c}});var r=n(50148);function a(){return"object"==typeof window&&"string"==typeof window._currentSiteType?window._currentSiteType:null}function o(){return"simple"===a()}function i(){return"atomic"===a()}function s(){const e=(0,r.Z)();return e?.jetpack?.is_private_site??!1}function c(){const e=(0,r.Z)();return e?.jetpack?.is_coming_soon??!1}},80354:function(e,t,n){"use strict";var r=n(82674),a=n.n(r),o=n(94333);t.Z=e=>(0,o.createHigherOrderComponent)((t=>n=>React.createElement(t,a()({},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),a=n(36222),o=n(55609),i=n(65736),s=n(586),c=n(3639),l=n(92710),u=n(58532),d=n(65235),p=n.n(d),m=(n(99196),n(63634)),h=n(81612),g=n(27298);const __=i.__,f="correct-spelling",b="simplify",v="summarize",k="make-longer",y="ask-ai-assistant",w=[{name:__("Correct spelling and grammar","jetpack"),key:f,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 d=w.filter((e=>!i.includes(e.key))),f="suggesting"===s?null:n||__("AI Assistant","jetpack");return(0,r.createElement)(o.Dropdown,{popoverProps:{variant:"toolbar"},renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,r.createElement)(o.ToolbarButton,{className:p()("jetpack-ai-assistant__button",{[`is-${s}`]:!0}),showTooltip:!0,onClick:n,"aria-haspopup":"true","aria-expanded":t,label:f,icon:a.u_,disabled:c})},renderContent:e=>{let{onClose:s}=e;return(0,r.createElement)(o.MenuGroup,{label:n},!i.includes(y)&&(0,r.createElement)(o.MenuItem,{icon:a.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"))),d.map((e=>(0,r.createElement)(o.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)(g.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),a=n(65736),o=n(26546),i=n(46867);const __=a.__;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)(o.p,{buttonText:__("Reconnect Jetpack","jetpack"),checkoutUrl:e,className:"jetpack-ai-connect-banner",description:__("Your account is not connected to Jetpack at the moment.","jetpack"),goToCheckoutPage:e=>{t(e)},isRedirecting:n,visible:!0,align:null,title:null,context:null})}},81612:function(e,t,n){"use strict";n.d(t,{QA:function(){return m},ZP:function(){return g},xK:function(){return f}});var r=n(51806),a=n(55609),o=n(65736),i=n(61074),s=n(46936),c=n(43618);n(99196);const __=o.__,l=["en","es","fr","de","it","pt","ru","zh","ja","ar","hi","ko"],u=window?.Jetpack_Editor_Initial_State?.siteLocale||navigator?.language,d=__("Translate","jetpack"),p=u?.split("-")[0]||"en",m=(u?.split("-"),{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 o=[...l.filter((e=>e!==p))];return l.includes(p)&&o.unshift(p),(0,r.createElement)(a.MenuGroup,{label:__("Select language","jetpack")},o.map((e=>(0,r.createElement)(a.MenuItem,{key:`key-${e}`,onClick:()=>n(e+" ("+m[e].label+")"),isSelected:t===e},m[e].label))))};function g(e){let{value:t=p,label:n=d,onChange:o}=e;return(0,r.createElement)(a.ToolbarDropdownMenu,{icon:c.Z,label:n,popoverProps:{variant:"toolbar"}},(()=>(0,r.createElement)(h,{value:t,onChange:o})))}function f(e){let{value:t=p,label:n=d,disabled:o=!1,onChange:l}=e;return(0,r.createElement)(a.DropdownMenu,{className:"ai-assistant__i18n-dropdown",icon:c.Z,label:n,disabled:o,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),a=n(55609),o=n(65736);const __=o.__;t.Z=e=>{let{image:t,inModal:n=!1,saveImage:o,setImageModal:i}=e;return(0,r.createElement)(a.Flex,{direction:"column"},n&&(0,r.createElement)(a.FlexItem,{style:{textAlign:"center"}},(0,r.createElement)(a.Button,{variant:"primary",onClick:()=>o(t)},__("Use this image","jetpack"))),(0,r.createElement)(a.FlexBlock,null,(0,r.createElement)("input",{type:"image",className:"wp-block-ai-image-image",src:t,alt:"",onClick:()=>i(t)})),!n&&(0,r.createElement)(a.FlexBlock,null,(0,r.createElement)(a.Flex,{direction:"column",style:{alignItems:"center"}},(0,r.createElement)(a.FlexItem,null,(0,r.createElement)(a.Button,{variant:"primary",onClick:()=>o(t)},__("Use this image","jetpack"))))))}},24404:function(e,t,n){"use strict";n.d(t,{ZP:function(){return h}});var r=n(51806),a=n(55609),o=n(65736),i=n(77840);n(99196);const __=o.__,s="make-longer",c="makeLonger",l="make-shorter",u="makeShorter",d="summarize",p="summarize",m=[{name:__("Summarize","jetpack"),key:d,aiSuggestion:p},{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:o=[],onChange:s}=e;return(0,r.createElement)(a.ToolbarDropdownMenu,{icon:i.Z,label:n||__("Improve","jetpack"),popoverProps:{variant:"toolbar"}},(()=>{const e=m.filter((e=>!o.includes(e.key)));return(0,r.createElement)(a.MenuGroup,{label:n},e.map((e=>(0,r.createElement)(a.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 p},ZP:function(){return m}});var r=n(51806),a=n(55609),o=n(65736),i=n(58532),s=n(586),c=n(3639),l=n(92710),u=n(32677),d=n(77840);n(99196);const __=o.__,p=[{label:__("Post about…","jetpack"),description:{original:"Write a post about ",translated:__("Write a post about ","jetpack")}},{label:__("Informative article on…","jetpack"),description:{original:"Craft an informative article explaining ",translated:__("Craft an informative article explaining ","jetpack")}},{label:__("Step-by-step tutorial on…","jetpack"),description:{original:"Write a step-by-step tutorial on ",translated:__("Write a step-by-step tutorial on ","jetpack")}},{label:__("Motivational post on…","jetpack"),description:{original:"Create a motivational post on ",translated:__("Create a motivational post on ","jetpack")}}];function m(e){let{hasContentBefore:t,hasContent:n,hasPostTitle:o,onPromptSelect:m,onSuggestionSelect:h}=e;const g=__("Write with AI…","jetpack");return(0,r.createElement)(a.ToolbarDropdownMenu,{className:"jetpack-ai-assistant__templates-control",icon:null,label:g,text:g},(e=>{let{onClose:g}=e;return(0,r.createElement)(r.Fragment,null,t&&(0,r.createElement)(a.MenuGroup,{label:__("Based on preceding content…","jetpack")},(0,r.createElement)(a.MenuItem,{icon:i.Z,iconPosition:"left",onClick:()=>h("continue")},__("Continue writing","jetpack")),(0,r.createElement)(a.MenuItem,{icon:s.Z,iconPosition:"left",onClick:()=>h("correctSpelling")},__("Correct spelling and grammar","jetpack")),(0,r.createElement)(a.MenuItem,{icon:c.Z,iconPosition:"left",onClick:()=>h("simplify")},__("Simplify","jetpack"))),n&&(0,r.createElement)(a.MenuGroup,{label:__("Based on entire content…","jetpack")},n&&(0,r.createElement)(a.MenuItem,{icon:l.Z,iconPosition:"left",onClick:()=>h("summarize")},__("Summarize","jetpack")),n&&(0,r.createElement)(a.MenuItem,{icon:u.Z,iconPosition:"left",onClick:()=>h("generateTitle")},__("Generate a post title","jetpack"))),(0,r.createElement)(a.MenuGroup,{label:__("Write…","jetpack")},o&&(0,r.createElement)(a.MenuItem,{icon:d.Z,iconPosition:"left",onClick:()=>h("titleSummary")},__("Summary based on title","jetpack")),p.map(((e,t)=>(0,r.createElement)(a.MenuItem,{icon:d.Z,iconPosition:"left",key:`key-${t}`,onClick:()=>{g(),m(e.description)}},e.label)))))}))}},27298:function(e,t,n){"use strict";n.d(t,{IP:function(){return p},Nj:function(){return l},ZP:function(){return m},bu:function(){return u}});var r=n(51806),a=n(36222),o=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:"🔥"}},d=e=>{let{value:t,onChange:n}=e;return(0,r.createElement)(o.MenuGroup,{label:__("Select tone","jetpack")},c.map((e=>(0,r.createElement)(o.MenuItem,{key:`key-${e}`,onClick:()=>n(e),isSelected:t===e},`${u[e].emoji} ${u[e].label}`))))};function p(e){let{label:t=__("Change tone","jetpack"),value:n=l,onChange:i}=e;return(0,r.createElement)(o.DropdownMenu,{icon:a.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)(o.Icon,{icon:s.Z}))}},(e=>{let{onClose:t}=e;return(0,r.createElement)(d,{value:n,onChange:e=>{i(e),t()}})}))}function m(e){let{value:t=l,onChange:n}=e;return(0,r.createElement)(o.ToolbarDropdownMenu,{icon:a.v_,label:__("Change tone","jetpack"),popoverProps:{variant:"toolbar"}},(()=>(0,r.createElement)(d,{value:t,onChange:n})))}},4965:function(e,t,n){"use strict";var r=n(51806),a=n(52175),o=n(55609),i=n(65736),s=n(79201),c=n(48381),l=(n(75022),n(63634)),u=n(81612),d=n(24404),p=n(85642),m=n(27298);const __=i.__;t.Z=e=>{let{contentIsLoaded:t,getSuggestionFromOpenAI:n,retryRequest:i,handleAcceptContent:h,handleImageRequest:g,handleTryAgain:f,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)(a.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)(d.ZP,{onChange:n,exclude:_?["summarize"]:[]})),(0,r.createElement)(a.BlockControls,null,!b&&!t&&(0,r.createElement)(p.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)(o.ToolbarGroup,null,!b&&t&&(0,r.createElement)(o.ToolbarButton,{onClick:f},__("Try Again","jetpack")),!b&&!t&&!!y?.length&&(0,r.createElement)(a.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)(o.ToolbarButton,{icon:s.Z,onClick:h},__("Accept","jetpack")),b&&(0,r.createElement)(o.ToolbarButton,{icon:c.Z,onClick:i},__("Retry","jetpack"))),false))}},5246:function(e,t,n){"use strict";var r=n(51806),a=n(69307),o=n(65736),i=(n(99196),n(26546)),s=n(63206),c=n(18135),l=n(71449);const __=o.__;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,a.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,a.createInterpolateElement)(__("Congratulations on exploring Jetpack AI and reaching the free requests limit!<br /><strong>Upgrade now to keep using it.</strong>","jetpack"),{br:(0,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,a.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 R}});var r=n(82674),a=n.n(r),o=n(51806),i=n(36222),s=n(13419),c=n(52175),l=n(4981),u=n(55609),d=n(94333),p=n(9818),m=n(69307),h=n(65736),g=n(65235),f=n.n(g),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),P=n(71449),N=n(3687),L=n(63634);const __=h.__,T=new(v())({breaks:!0}),A="post"===window?.Jetpack_Editor_Initial_State?.screenBase,I=window?.Jetpack_Editor_Initial_State?.["ai-assistant"]?.["is-playground-visible"];function R(e){let{attributes:t,setAttributes:n,clientId:r}=e;const[h,g]=(0,m.useState)(),[b,v]=(0,m.useState)({}),[R,M]=(0,m.useState)(!1),[Z,B]=(0,m.useState)([]),[D,F]=(0,m.useState)(null),[z,O]=(0,m.useState)(null),{tracks:U}=(0,s.z$)(),H=(0,p.useSelect)((e=>e("core/editor").getCurrentPostId())),V=(0,p.useSelect)((e=>()=>e("core/block-editor").getBlock(r)),[r]),G=(0,k.useRef)(null),q=(0,k.useRef)(null),{replaceBlocks:$,replaceBlock:W,removeBlock:J}=(0,p.useDispatch)("core/block-editor"),{editPost:K}=(0,p.useDispatch)("core/editor"),{mediaUpload:X}=(0,p.useSelect)((e=>{const{getSettings:t}=e("core/block-editor");return{mediaUpload:t().mediaUpload}}),[]),Y=()=>{setTimeout((()=>{G.current?.focus?.()}),100)},Q=(0,d.useViewportMatch)("medium","<"),{requireUpgrade:ee,refresh:te}=(0,j.ZP)(),ne=ee||"error_quota_exceeded"===b?.code,{isLoadingCategories:re,isLoadingCompletion:ae,wasCompletionJustRequested:oe,getSuggestionFromOpenAI:ie,stopSuggestion:se,showRetry:ce,contentBefore:le,postTitle:ue,retryRequest:de,wholeContent:pe,requestingState:me}=(0,x.Z)({onSuggestionDone:Y,onUnclearPrompt:Y,onModeration:Y,attributes:t,clientId:r,content:t.content,setError:v,tracks:U,userPrompt:h,refreshFeatureData:te,requireUpgrade:ne}),he=(0,P.b)(),ge=(0,S.$M)(r);(0,k.useEffect)((()=>{if(!ge)return;const e=JSON.parse(localStorage.getItem(ge));if(!e)return;const{type:t,options:n}=e;localStorage.removeItem(ge),ie(t,n)}),[ge,ie]),(0,k.useEffect)((()=>{b&&O(!1)}),[b]);const fe=(0,k.useRef)(t?.content);(0,k.useEffect)((()=>{if(!t?.useGutenbergSyntax)return;if(!fe?.current?.length)return;const e=V();if(e?.innerBlocks?.length)return;const n=(0,l.parse)(fe.current);n?.length&&$(r,n)}),[fe,r,$,V,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(R)return;M(!0),v({});const n=await fetch(e),a=await n.blob(),o=new File([a],"jetpack_ai_image.png",{type:"image/png"});X({filesList:[o],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),M(!1)}}),U.recordEvent("jetpack_ai_dalle_generation_upload",{post_id:H})},Ee=t?.useGutenbergSyntax,_e=ae||re,Ce=!!t.content,Se="generateTitle"===t.promptType,je=__("Accept","jetpack"),xe=__("Accept title","jetpack"),Pe=Se?xe:je,Ne=function(){ie(...arguments),setTimeout((()=>{q.current?.focus?.()}),100)},Le=async()=>{let e=[];if(Ee)e=V(),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 $(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=()=>{A?(K({title:t.content.trim()}),J(r)):Le()},Ae=()=>{se(),Y()},[Ie,Re]=(0,m.useState)(!1),Me=()=>{Re(!Ie)},Ze=(0,c.useBlockProps)({ref:q,className:f()({"is-waiting-response":oe})}),Be=(0,c.useInnerBlocksProps)(Ze);return(0,o.createElement)(u.KeyboardShortcuts,{bindGlobal:!0,shortcuts:{esc:()=>{["requesting","suggesting"].includes(me)&&Ae()}}},(0,o.createElement)("div",Ze,b?.message&&!z&&"error_quota_exceeded"!==b?.code&&(0,o.createElement)(u.Notice,{status:b.status,isDismissible:!1,className:"jetpack-ai-assistant__error"},b.message),Ce&&!Ee&&(0,o.createElement)("div",{className:"jetpack-ai-assistant__content"},(0,o.createElement)(m.RawHTML,null,T.render(t.content))),Ce&&Ee&&(0,o.createElement)("div",a()({className:"jetpack-ai-assistant__content is-layout-building-mode"},Be)),I&&(0,o.createElement)(c.InspectorControls,null,(0,o.createElement)(u.PanelBody,{title:__("AI Playground","jetpack"),initialOpen:!0},(0,o.createElement)(u.PanelRow,null,(0,o.createElement)(u.ToggleControl,{label:__("Gutenberg Syntax","jetpack"),onChange:e=>n({useGutenbergSyntax:e}),checked:t.useGutenbergSyntax})),(0,o.createElement)(u.PanelRow,null,(0,o.createElement)(u.ToggleControl,{label:__("GPT-4","jetpack"),onChange:e=>n({useGpt4:e}),checked:t.useGpt4})),(0,o.createElement)(u.PanelRow,null,Ie&&(0,o.createElement)(u.Modal,{title:__("Custom System Prompt","jetpack"),onRequestClose:Me},(0,o.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,L.t4)({useGutenbergSyntax:t.useGutenbergSyntax,useGpt4:t.useGpt4})?.content}),(0,o.createElement)("div",{className:"jetpack-ai-assistant__custom-prompt__footer"},(0,o.createElement)(u.Button,{onClick:()=>n({customSystemPrompt:""}),variant:"secondary"},__("Restore the prompt","jetpack")),(0,o.createElement)(u.Button,{onClick:Me,variant:"secondary"},__("Close","jetpack")))),(0,o.createElement)(u.Button,{onClick:Me,variant:"secondary"},__("Set system custom prompt","jetpack"))))),ne&&(0,o.createElement)(C.Z,null),!he&&(0,o.createElement)(y.Z,null),!_e&&he&&!ne&&(0,o.createElement)(_.Z,{isWaitingState:_e,contentIsLoaded:Ce,getSuggestionFromOpenAI:ie,retryRequest:de,handleAcceptContent:Le,handleAcceptTitle:Te,handleGetSuggestion:Ne,handleImageRequest:()=>{B([]),v({}),(0,N.b)(""===h.trim()?__("What would you like to see?","jetpack"):h,n,M,B,v,H),U.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:pe,promptType:t.promptType,setUserPrompt:e=>{if(!G?.current)return;G.current.focus();for(let t=0;t<e.length;t++)setTimeout((()=>{g(e.slice(0,t+1))}),25*t)},recordEvent:U.recordEvent,isGeneratingTitle:Se}),(0,o.createElement)(i.tK,{ref:G,disabled:ne||!he,value:h,placeholder:be||__("Ask Jetpack AI","jetpack"),onChange:e=>{O(!0),g(e)},onSend:()=>{Ne("userPrompt")},onStop:Ae,onAccept:()=>{Se?Te():Le()},state:me,isTransparent:ne||!he,showButtonLabels:!Q,showAccept:Ce&&!_e,acceptLabel:Pe,showClearButton:!_e,showGuideLine:Ce}),!R&&Z.length>0&&(0,o.createElement)(u.Flex,{direction:"column",style:{width:"100%"}},(0,o.createElement)(u.FlexBlock,{style:{textAlign:"center",margin:"12px",fontStyle:"italic",width:"100%"}},t.requestedPrompt),(0,o.createElement)(u.FlexBlock,{style:{fontSize:"20px",lineHeight:"38px"}},__("Please choose your image","jetpack")),(0,o.createElement)(u.Flex,{direction:"row",wrap:!0},Z.map((e=>(0,o.createElement)(w.Z,{setImageModal:F,saveImage:we,image:e,key:e}))))),!R&&D&&(0,o.createElement)(u.Modal,{onRequestClose:()=>F(null)},(0,o.createElement)(w.Z,{saveImage:we,setImageModal:F,image:D,inModal:!0}))))}},27559:function(e,t,n){"use strict";var r=n(31985),a=n(29137);(0,r.Z)(a.u2,a.Xd)},54765:function(e,t,n){"use strict";n.d(t,{J7:function(){return d},NP:function(){return l}});var r=n(4981),a=n(9818),o=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 d(){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,a.select)("core/edit-post")||{};return!(e?.()||[]).includes(i.pG)}(0,o.addFilter)("blocks.registerBlockType","jetpack/ai-assistant-support",(function(e,t){return l.includes(t)&&d()?{...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),a=n(13419),o=n(52175),i=n(94333),s=n(9818),c=n(69307),l=(n(99196),n(83059)),u=n(15064),d=n(854),p=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:g,clientIds:f,blocks:b}=(0,u.Z)(),{tracks:v}=(0,a.z$)(),k=[];"core/list-item"===n&&k.push(l.B3);const y=(0,c.useCallback)(((e,t)=>{const[r]=b,[a,...o]=f,s={...r?.attributes||{},content:g},c=(0,p.b)(n,s),l={clientId:a,type:e,options:{...t,contentType:"generated",fromExtension:!0}};localStorage.setItem(m(c.clientId),JSON.stringify(l)),h(a,c),i(o)}),[b,f,g,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]=f,[r]=b,a={...r?.attributes||{},content:g};h(e,(0,p.b)(n,a)),i(t)}),[b,n,g,h,f,i]),_=(0,d.t$)(g);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(e,t),(0,r.createElement)(o.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),a=n(36222),o=n(4981),i=n(55609),s=n(94333),c=n(9818),l=n(69307),u=n(65736),d=n(53961),p=n(65235),m=n.n(p),h=(n(99196),n(3180)),g=n(5246),f=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,o.serialize)(t)+"\n\n"),""):""}function _(e){let{clientId:t,className:n=""}=e;const o=(0,l.useRef)(null),u=(0,l.useRef)(null),p=(0,b.b)(),{inputValue:_,setInputValue:C,isVisible:S,assistantAnchor:j}=(0,l.useContext)(k.D),x=()=>{setTimeout((()=>{u.current?.focus?.()}),100)},{requestSuggestion:P,requestingState:N,stopSuggestion:L,requestingError:T}=(0,a.X_)({onDone:x}),{requireUpgrade:A}=(0,f.ZP)(),I=T?.code===a.$L||A,R="requesting"===N||"suggesting"===N,M="suggesting"===N||"done"===N,Z=__("Ask Jetpack AI to create your form","jetpack"),B=__("Creating your form. Please wait a few moments.","jetpack"),{removeNotice:D}=(0,c.useDispatch)(d.store),F=(0,l.useCallback)((()=>{if(!_?.length)return;D(y.uu);const e=(0,v.r1)(v.Re,{request:_,content:E(t)});P(e,{feature:"jetpack-form-ai-extension"}),o?.current?.focus()}),[t,_,D,P]),z=(0,l.useCallback)((()=>{L(),x()}),[L]),O=(0,s.useViewportMatch)("medium","<"),U=O&&j,H=(0,l.useRef)(null),V=(0,l.useRef)(O),[G,q]=(0,l.useState)(O);if((0,l.useEffect)((()=>{const e=o?.current;if(e)return H?.current||(H.current=new ResizeObserver((e=>{if(!S)return;if(U)return;const t=e[0].contentRect.width<w.mobile;t!==V.current&&(V.current=t,q(t))}))),H.current.observe(e),()=>{H?.current?.disconnect()}}),[U,S]),(0,l.useEffect)((()=>{const e=setTimeout((()=>{S&&u?.current&&u.current.focus()}),300);return function(){clearTimeout(e)}}),[]),!S)return null;const $=(0,r.createElement)(i.KeyboardShortcuts,{bindGlobal:!0,shortcuts:{esc:()=>{["requesting","suggesting"].includes(N)&&z()}}},(0,r.createElement)("div",{ref:o,className:m()("jetpack-ai-assistant__bar",{[n]:n,"is-fixed":U,"is-mobile-mode":G}),tabIndex:-1},I&&(0,r.createElement)(g.Z,null),!p&&(0,r.createElement)(h.Z,null),(0,r.createElement)(a.tK,{ref:u,disabled:I||!p,value:R?void 0:_,placeholder:R?B:Z,onChange:C,onSend:F,onStop:z,state:N,isTransparent:I||!p,showButtonLabels:!G,showGuideLine:M})));return U?(0,l.createPortal)($,j):$}},81732:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(51806),a=n(36222),o=n(55609),i=n(94333),s=n(69307),c=n(65736),l=n(99196),u=n(79817),d=n(44110);const __=c.__,p="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:g}=(0,a.X_)(),f=(0,s.useRef)(null),b=(0,i.useViewportMatch)("medium","<");(0,l.useEffect)((()=>{if(!f.current)return;const e=f.current.closest(".block-editor-block-contextual-toolbar");if(!e)return;let t=e.parentElement?.querySelector(`.${p}`);if(t)return m(t);t=document.createElement("div"),t.setAttribute("role","toolbar"),t.setAttribute("aria-label",__("AI Assistant","jetpack")),t.setAttribute("aria-orientation","horizontal"),t.className=p,e.after(t);const 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,d.Vl)(t,c)}),[t,c]),k="requesting"===g||"suggesting"===g;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.KeyboardShortcuts,{bindGlobal:!0,shortcuts:{"mod+/":c}}),(0,r.createElement)(o.ToolbarButton,{ref:f,showTooltip:!0,onClick:v,"aria-haspopup":"true","aria-expanded":n,label:__("Ask AI Assistant","jetpack"),icon:a.u_,disabled:k}))}},59090:function(e,t,n){"use strict";n.d(t,{aE:function(){return r},nB:function(){return a}});const r=window?.Jetpack_Editor_Initial_State.available_blocks?.["ai-assistant-form-support"]?.available,a=["jetpack/field-name","jetpack/field-email","jetpack/field-text","jetpack/field-textarea","jetpack/field-checkbox","jetpack/field-date","jetpack/field-telephone","jetpack/field-url","jetpack/field-checkbox-multiple","jetpack/field-radio","jetpack/field-select","jetpack/field-consent","jetpack/button"]},94662:function(e,t,n){"use strict";n.d(t,{V:function(){return g}});var r=n(51806),a=n(36222),o=n(52175),i=n(4981),s=n(94333),c=n(9818),l=n(69307),u=n(92694),d=n(79191),p=n(81732),m=n(59090),h=n(44110);function g(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:a}=(0,c.select)("core/edit-post")||{};return!(a?.()||[]).includes(e)}const f=(0,s.createHigherOrderComponent)((e=>t=>{if(!g(t?.name,{clientId:t.clientId}))return(0,r.createElement)(e,t);const{eventSource:n}=(0,a.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)(d.Z,{clientId:t.clientId}),(0,r.createElement)(o.BlockControls,{group:"block"},(0,r.createElement)(p.Z,null)))}),"withAiAssistantComponents");(0,u.addFilter)("editor.BlockEdit","jetpack/jetpack-form-block-edit",f,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(!g(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)(o.BlockControls,{group:"parent"},(0,r.createElement)(p.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",a.oN,110)},79817:function(e,t,n){"use strict";n.d(t,{D:function(){return o},v:function(){return i}});var r=n(51806),a=n(69307);const o=(0,a.createContext)({}),i=e=>{let{value:t,children:n}=e;return(0,r.createElement)(o.Provider,{value:t,children:n})}},44110:function(e,t,n){"use strict";n.d(t,{Vl:function(){return b},uu:function(){return f}});var r=n(51806),a=n(36222),o=n(4981),i=n(55609),s=n(94333),c=n(9818),l=n(69307),u=n(65736),d=n(53961),p=(n(99196),n(94662)),m=n(5863),h=n(56359),g=n(79817);const __=u.__,f="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,P]=(0,l.useState)(!1),[N,L]=(0,l.useState)(null),T=(0,l.useRef)([]),A=(0,l.useCallback)((()=>{j(!0)}),[]),I=(0,l.useCallback)((()=>{j(!1)}),[]),R=(0,l.useCallback)((()=>{j(!S)}),[S]),M=(0,l.useCallback)((e=>{L(e)}),[]),{createNotice:Z}=(0,c.useDispatch)(d.store),B=(0,l.useCallback)((e=>{let{severity:t,message:n,code:r}=e;r!==a.$L&&Z(t,n,{isDismissible:!0,id:f})}),[Z]);(0,l.useEffect)((()=>{s||I()}),[s,I]);const D=(0,l.useMemo)((()=>({inputValue:E,setInputValue:_,isVisible:S,show:A,hide:I,toggle:R,isFixed:x,setAssistantFixed:P,assistantAnchor:N,setAnchor:M})),[E,S,A,I,R,x,N,M]),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,""),a=(0,h.J)(r),i=(0,o.parse)(a).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,o.createBlock)("jetpack/button",{label:__("Submit","jetpack"),element:"button",text:__("Submit","jetpack"),borderRadius:8,lock:{remove:!0}})]);T.current=[]}}),[n,u]);return(0,a.X_)({askQuestionOptions:{postId:y},onDone:e=>{F(e,!0),_("")},onSuggestion:F,onError:B}),(0,p.V)(t.name,{clientId:t.clientId})?(0,r.createElement)(g.v,{value:D},(0,r.createElement)(i.KeyboardShortcuts,{shortcuts:{"mod+/":()=>b(n,A)}},(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),a=n(13419),o=n(46867);function i(){const e=(0,r.Z)("jetpack-ai-monthly-plan-ai-assistant-block-banner",{site:(0,a.lQ)()}),t=(0,a.Ug)()||(0,a.Wp)()?e:`${window?.Jetpack_Editor_Initial_State?.adminUrl}admin.php?page=my-jetpack#/add-jetpack-ai`,{autosaveAndRedirect:n,isRedirecting:i}=(0,o.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),a=n.n(r),o=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 a()({path:"/wpcom/v2/jetpack-ai/ai-assistant-feature"});try{return{hasFeature:!!e["has-feature"],isOverLimit:!!e["is-over-limit"],requestsCount:e["requests-count"],requestsLimit:e["requests-limit"],requireUpgrade:!!e["site-require-upgrade"],errorMessage:e["error-message"],errorCode:e["error-code"],upgradeType:e["upgrade-type"]}}catch(e){console.error(e)}}function l(){const[e,t]=(0,o.useState)(s);return(0,o.useEffect)((()=>{c().then(t)}),[]),{...e,refresh:()=>c().then(t)}}},63010:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(9818);function a(){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),a=n(4981),o=n(9818),i=n(69307),s=n(65736),c=n(51128),l=n.n(c),u=n(27298),d=n(63634),p=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:g,onSuggestionDone:f,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,P]=(0,i.useState)(!1),[N,L]=(0,i.useState)(""),{updateBlockAttributes:T}=(0,o.useDispatch)("core/block-editor"),[A,I]=(0,i.useState)("init"),R=(0,i.useRef)(),M=(0,o.useSelect)((e=>e("core/editor").getEditedPostAttribute("title")));let Z=!1;const B=(0,o.useSelect)((e=>e("core/editor").getEditedPostAttribute("categories")))||[],D=(0,o.useSelect)((e=>B.map((t=>{const n=e("core").getEntityRecord("taxonomy","category",t);if(n)return n;Z=!0})).filter(Boolean)),[B]),F=(0,o.useSelect)((e=>e("core/editor").getEditedPostAttribute("tags")),[])||[],z=(0,o.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),()=>{R?.current&&(m("Cleaning things up..."),R?.current?.close())})),[Z,R]);const O=(0,o.useSelect)((e=>e("core/editor").getCurrentPostId())),U=(D.filter((e=>1!==e.id)).map((e=>{let{name:t}=e;return t})).join(", "),z.map((e=>{let{name:t}=e;return t})).join(", "),async function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const f=i?.functions?.reduce(((e,t)=>{let{name:n,implementation:r}=t;return{...e,[n]:r}}),{});if(y)return I("error"),C(!1),j(!1),P(!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;P(!1),c({});let w=N;l.recordEvent("jetpack_ai_chat_completion",{post_id:O});const E=[...t.messages]??[];let S={};if(i.retryRequest)S=w[w.length-1];else{const r=t?.isLayoutBuldingModeEnable?(0,p.WN)(n):(0,p.xN)();w=(0,d.Iq)({generatedContent:s,allPostContent:r,postContentAbove:(0,p.h7)(n),currentPostTitle:M,options:i,userPrompt:g,type:e,isGeneratingTitle:"generateTitle"===t.promptType,useGutenbergSyntax:!!t?.useGutenbergSyntax,customSystemPrompt:t?.customSystemPrompt}),S=w.pop(),w=[...w,...E],w.push(S),L(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)})),I("requesting"),R.current=await(0,r.jt)(w,{postId:O,requireUpgrade:y,feature:t?.useGpt4?"ai-assistant-experimental":"ai-assistant",functions:i?.functions}),I("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"}),P(!0),C(!1),j(!1)}const x=async e=>{const{detail:n}=e,a={role:"assistant",content:null,function_call:n},o=await(f[n.name]?.(JSON.parse(n.arguments))),s={role:"function",name:n?.name,content:JSON.stringify(o)};w=[...w,a,s],R?.current?.removeEventListener("function_done",x),R?.current?.removeEventListener("done",A),R?.current?.removeEventListener("error_unclear_prompt",Z),R?.current?.removeEventListener("error_network",D),R?.current?.removeEventListener("error_context_too_large",B),R?.current?.removeEventListener("error_service_unavailable",F),R?.current?.removeEventListener("error_quota_exceeded",z),R?.current?.removeEventListener("error_moderation",U),R?.current?.removeEventListener("suggestion",V),R.current=await(0,r.jt)(w,{postId:O,requireUpgrade:y,feature:t?.useGpt4?"ai-assistant-experimental":null,functions:i.functions}),R?.current?.addEventListener("function_done",x),R?.current?.addEventListener("done",A),R?.current?.addEventListener("error_unclear_prompt",Z),R?.current?.addEventListener("error_network",D),R?.current?.addEventListener("error_context_too_large",B),R?.current?.addEventListener("error_service_unavailable",F),R?.current?.addEventListener("error_quota_exceeded",z),R?.current?.addEventListener("error_moderation",U),R?.current?.addEventListener("suggestion",V)},A=e=>{const{detail:r}=e;I("done");const i=r.replaceAll(d._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,o.dispatch)("core/block-editor"),u=(0,a.parse)(r).filter((e=>e.isValid));l(n,u),k()},Z=()=>{I("error"),R?.current?.close(),C(!1),j(!1),c({code:"error_unclear_prompt",message:__("Your request was unclear. Mind trying again?","jetpack"),status:"info"}),b?.()},B=()=>{I("error"),R?.current?.close(),C(!1),j(!1),P(!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"})},D=r=>{let{detail:a}=r;I("error");const{name:o,message:l}=a;"TypeError"===o&&"Failed to fetch"===l&&(E.splice(0,8),T(n,{messages:E}),w=(0,d.Iq)({generatedContent:s,allPostContent:(0,p.xN)(),postContentAbove:(0,p.h7)(n),currentPostTitle:M,options:i,userPrompt:g,type:e,isGeneratingTitle:"generateTitle"===t.promptType,useGutenbergSyntax:!!t?.useGutenbergSyntax,customSystemPrompt:t?.customSystemPrompt}),L([...w,...E,S])),R?.current?.close(),C(!1),j(!1),P(!0),c({code:"error_network",message:__("It was not possible to process your request. Mind trying again?","jetpack"),status:"info"})},F=()=>{I("error"),R?.current?.close(),C(!1),j(!1),P(!0),c({code:"error_service_unavailable",message:__("Jetpack AI services are currently unavailable. Sorry for the inconvenience.","jetpack"),status:"info"})},z=()=>{I("error"),R?.current?.close(),C(!1),j(!1),P(!1),c({code:"error_quota_exceeded",message:__("You have reached the limit of requests for this site.","jetpack"),status:"info"})},U=()=>{I("error"),R?.current?.close(),C(!1),j(!1),P(!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?.()},V=e=>{j(!1),m("(suggestion)",e?.detail),T(n,{content:e?.detail?.replaceAll(d._W,"")})};return R?.current?.addEventListener("function_done",x),R?.current?.addEventListener("done",A),R?.current?.addEventListener("error_unclear_prompt",Z),R?.current?.addEventListener("error_network",D),R?.current?.addEventListener("error_context_too_large",B),R?.current?.addEventListener("error_service_unavailable",F),R?.current?.addEventListener("error_quota_exceeded",z),R?.current?.addEventListener("error_moderation",U),R?.current?.addEventListener("suggestion",V),R?.current});function H(){R?.current&&(R?.current?.close(),C(!1),j(!1),f?.(),I("done"))}return{isLoadingCategories:w,isLoadingCompletion:_,wasCompletionJustRequested:S,setIsLoadingCategories:E,setShowRetry:P,showRetry:x,postTitle:M,contentBefore:(0,p.h7)(n),wholeContent:(0,p.xN)(),requestingState:A,getSuggestionFromOpenAI:U,stopSuggestion:H,retryRequest:()=>U("",{retryRequest:!0})}}},15064:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(854),a=n(63010);function o(){const e=(0,a.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 g},pG:function(){return h},u2:function(){return m}});var r=n(51806),a=n(36222),o=n(6895),i=n(55609),s=n(69307),c=n(65736),l=n(70355),u=n(84005),d=n(45624),p=n(6747);n(81765),n(54765),n(94662);const __=c.__,_x=c._x,m="ai-assistant",h=`jetpack/${m}`,g={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,o.Z)("jetpack_ai_feedback")},__("Share your feedback.","jetpack"))),icon:{src:a.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:d.Z,save:()=>null,attributes:u.Z,transforms:p.Z,example:{attributes:{content:__("With **Jetpack AI Assistant**, you can provide a prompt, and it will generate high-quality blog posts, informative pages, well-organized lists, and thorough tables that meet your specific requirements.\n\nTo start using the **Jetpack AI Assistant**, type `/AI` in the block editor.","jetpack")}}}},71449:function(e,t,n){"use strict";n.d(t,{b:function(){return u},d:function(){return d}});var r=n(13419),a=n(51128),o=n.n(a);const i=window?.JP_CONNECTION_INITIAL_STATE,s=o()("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 d(){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),a=n.n(r),o=n(65736);const __=o.__;function i(e,t,n,r,o,i){n(!0),o(null),t({requestedPrompt:e}),a()({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?o(e.message):o(__("Whoops, we have encountered an error. AI is like really, really hard and this is an experimental feature. Please try again later.","jetpack")),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 a="title",o="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:a,currentPostTitle:o,options:i,type:s,userPrompt:c,isGeneratingTitle:u}=e;const d=[],p="generated"===i?.contentType;let m=null;switch(s){case r.qA:m=o;break;case r.sz:case r.hI:case r.Hd:m=a;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=p?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:p,m);return h&&d.push(h),d.push({role:"jetpack-ai",context:l({generatedContent:t,allPostContent:n,postContentAbove:a,currentPostTitle:o,options:i,type:s,userPrompt:c,isGeneratingTitle:u})}),d}function l(e){let{options:t,type:n,userPrompt:s,isGeneratingTitle:c}=e;const l=function(e,t,n){return e?a:!t||n?o: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 p},Gh:function(){return f},Hd:function(){return l},Iq:function(){return A},Lg:function(){return m},Lq:function(){return h},Nw:function(){return g},Re:function(){return b},SV:function(){return k},TV:function(){return d},_W:function(){return w},hI:function(){return c},jf:function(){return u},qA:function(){return i},r1:function(){return I},sz:function(){return s},t4:function(){return E}});var r=n(51128),a=n.n(r),o=n(57832);const i="titleSummary",s="continue",c="simplify",l="correctSpelling",u="generateTitle",d="makeLonger",p="makeShorter",m="changeTone",h="summarize",g="changeLanguage",f="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=a()("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:a=!0,customSystemPrompt:o=null}=e,i="";n?.length&&(i=n.map((e=>`- ${e}.`)).join("\n")+"\n");let s=`${t}. Strictly follow these rules:\n\n${i}${a?"- Format your responses in Markdown syntax, ready to be published.":""}\n- Execute the request without any acknowledgement to the user.\n- Avoid sensitive or controversial topics and ensure your responses are grammatically correct and coherent.\n- If you cannot generate a meaningful response to a user's request, reply with “__JETPACK_AI_ERROR__“. This term should only be used in this context, it is used to generate user facing errors.\n`;return 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`),o&&(s=o),{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 P(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 N(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 L(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:a=!1,isGeneratingTitle:o=!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,"");a||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 o&&(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 A(e){let{generatedContent:t,allPostContent:n,postContentAbove:r,currentPostTitle:a,options:b,type:v,userPrompt:y,isGeneratingTitle:w,useGutenbergSyntax:E,customSystemPrompt:_}=e;if(k){return[(0,o.v_)(v,_),...(0,o.x1)({generatedContent:t,allPostContent:n,postContentAbove:r,currentPostTitle:a,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 a="the title";t||(a=r?"your last answer":"the content");const o=`. Do not switch to any language other than the language of ${a} in your response`;switch(e){case i:return{request:`Write a short piece for a blog post based on ${a}, keeping the same language`};case s:return{request:`Continue writing from ${a}${o}.`,rules:r?[]:["Only output the continuation of the content, without repeating it"]};case c:return{request:`Simplify ${a}${o}.`,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 ${a}, correcting any spelling and grammar mistakes, and do not add new content${o}.`};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 d:return{request:`Make ${a} longer${o}.`};case p:return{request:`Make ${a} shorter${o}.`};case m:return{request:`Rewrite ${a} with ${/^[aeiou]/i.test(n.tone)?"an":"a"} ${n.tone} tone${o}.`};case h:return{request:`Summarize ${a}${o}.`};case g:return{request:`Translate ${a} to the following language: ${n.language}.`};default:return null}}(v,w,b);if(v!==f){let e;switch(v){case i:e=a;break;case s:case c:case l:e=r;break;case u:e=n;break;case d:case p:e=t;break;case m:case h:case g: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 I(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"},a=[...n];switch(a.push(r),e){case l:return[...a,...C(t)];case c:return[...a,...S(t)];case h:return[...a,...j(t)];case d:return[...a,...x(t)];case g:return[...a,...P(t)];case m:return[...a,...N(t)];case b:return[...n,...L(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),a=n(9818);const o=new(n(92213).Z);function i(e){if(!e)return"";const t=(0,a.select)("core/block-editor"),n=t.getBlockIndex(e),i=t.getBlocks().slice(0,n)??[];return i?.length?o.turndown((0,r.serialize)(i)):""}function s(){const e=(0,a.select)("core/block-editor").getBlocks();return e?.length?o.turndown((0,r.serialize)(e)):""}function c(e){const t=(0,a.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,a.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 o}});const r=e=>{delete e.clientId;for(const t of e.innerBlocks??[])r(t);return e},a=e=>r((e=>JSON.parse(JSON.stringify(e)))(e));function o(e,t){const n=a(e),r=a(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),a=n(92694),o=n(54765),i=n(49259);(0,a.addFilter)("blocks.registerBlockType","jetpack/handle-jetpack-ai-supports",(function(e){const t=(0,r.getBlockSupport)(e,"jetpack/ai");return t&&t?.assistant&&(0,o.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),a=n(92213),o=n(29137),i=n(54765),s=n(63634);const c=new a.Z({emDelimiter:"_",headingStyle:"atx"}),l=[];function u(e,t){const{content:n,...a}=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)(o.pG,{...a,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 a=(0,r.getSaveContent)(e,t,n);return u(e,{...t,content:a})}});t.Z={from:l}},98825:function(e,t,n){"use strict";var r=n(51806),a=n(65736),o=n(26546),i=n(46867);const __=a.__;t.Z=()=>{const e=`${window?.Jetpack_Editor_Initial_State?.adminUrl}admin.php?page=my-jetpack#/connection`,{autosaveAndRedirect:t,isRedirecting:n}=(0,i.Z)(e);if(window?.Jetpack_Editor_Initial_State?.jetpack?.is_current_user_connected)return null;return(0,r.createElement)(o.p,{buttonText:__("Reconnect Jetpack","jetpack"),checkoutUrl:e,className:"jetpack-ai-connect-banner",description:__("Your account is not connected to Jetpack at the moment.","jetpack"),goToCheckoutPage:e=>{t(e)},isRedirecting:n,visible:!0,align:null,title:null,context:null})}},56352:function(e,t,n){"use strict";var r=n(51806),a=n(65736),o=n(26546),i=n(46867);const __=a.__;t.Z=()=>{let e=window?.Jetpack_Editor_Initial_State?.adminUrl||"";e=e.replace(/wp-admin\/\?frame-nonce=[a-z0-9]+/,"wp-admin/");const t=`${e}admin.php?page=jetpack-search`,{autosaveAndRedirect:n,isRedirecting:a}=(0,i.Z)(t);if(window?.Jetpack_AIChatBlock?.jetpackSettings?.instant_search_enabled)return null;return(0,r.createElement)(o.p,{buttonText:__("Enable Jetpack Search","jetpack"),checkoutUrl:t,className:"jetpack-ai-connect-banner",description:__("You need to enable Jetpack Search so that Jetpack AI can index your site.","jetpack"),goToCheckoutPage:e=>{n(e)},isRedirecting:a,visible:!0,align:null,title:null,context:null})}},23719:function(e,t,n){"use strict";n.d(t,{V:function(){return c}});var r=n(51806),a=n(52175),o=n(55609),i=n(37798),s=n(65736);const __=s.__;function c(e){let{setAttributes:t,placeholder:n,showCopy:s,showFeedback:c,showSources:l}=e;const[u,d]=(0,i.useEntityProp)("root","site","jetpack_search_ai_prompt_override");return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(o.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1},(0,r.createElement)(o.BaseControl,{label:__("Placeholder Text","jetpack"),className:"jetpack-ai-chat__ask-button-text"},(0,r.createElement)(o.TextControl,{placeholder:__("Ask a question about this site.","jetpack"),onChange:e=>t({placeholder:e}),value:n})))),(0,r.createElement)(a.InspectorAdvancedControls,null,(0,r.createElement)(o.BaseControl,{label:__("Additional instructions","jetpack"),help:__("Give Jetpack AI additional instructions for answer length, format, and tone.","jetpack")},(0,r.createElement)(o.TextareaControl,{value:u,onChange:d})),(0,r.createElement)(o.ToggleControl,{label:__("Show copy answer button.","jetpack"),help:__("Allow users to easily copy the answer.","jetpack"),checked:s,onChange:e=>t({showCopy:e})}),(0,r.createElement)(o.ToggleControl,{label:__("Show rating button.","jetpack"),help:__("Allow users to rate the answer and give feedback.","jetpack"),checked:c,onChange:e=>t({showFeedback:e})}),(0,r.createElement)(o.ToggleControl,{label:__("Show list of sources.","jetpack"),help:__("Show used sources at the bottom of the answer.","jetpack"),checked:l,onChange:e=>t({showSources:e})})))}},74021:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(51806),a=n(36222),o=n(52175),i=n(55609),s=n(9818),c=n(98825),l=n(56352),u=n(23719);function d(e){let{attributes:t,setAttributes:n,clientId:d}=e;const p=(0,o.useBlockProps)(),m=(0,s.useSelect)((e=>e("core/block-editor").isBlockSelected(d)),[d]);return(0,r.createElement)("div",p,(0,r.createElement)(c.Z,null),(0,r.createElement)(l.Z,null),(0,r.createElement)("div",{className:"jetpack-ai-chat-question-wrapper"},(0,r.createElement)(i.TextControl,{className:"jetpack-ai-chat-question-input",placeholder:t.placeholder,disabled:!0}),(0,r.createElement)(o.RichText,{className:"wp-block-button__link jetpack-ai-chat-question-button",onChange:e=>n({askButtonLabel:e}),value:t.askButtonLabel,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/strikethrough"]})),m&&(0,r.createElement)(a.Eo,null),(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(u.V,{askButtonLabel:t.askButtonLabel,placeholder:t.placeholder,setAttributes:n,showCopy:t.showCopy,showFeedback:t.showFeedback,showSources:t.showSources})))}},86116:function(e,t,n){"use strict";var r=n(31985),a=n(21540),o=n(74021),i=n(148);(0,r.S)(a,{apiVersion:a.apiVersion,edit:o.Z,save:i.Z})},148:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806),a=n(52175);function o(e){let{attributes:t}=e;const n=a.useBlockProps.save({"data-ask-button-label":t.askButtonLabel});return(0,r.createElement)("div",n)}},77567:function(e,t,n){"use strict";n.d(t,{K:function(){return r}});const r=["A digital Illustration of the a purely mechanical television, 4k, detailed, fantasy vivid colors","3D render of a floating futuristic castle in a clear sky, digital art","Hedgehog smelling a flower | clear blue sky | intricate artwork by Beatrix Potter | cottagecore aesthetic | 8K | highly detailed | wide angle |","Hyper realistic photo of a high end futuristic single-level house where walls are made of windows, light coming through the window, mid century modern style, cinematic lighting","Pink ape Astronaut in space holding a claymate in a photorealistic style, digital art","Studio photography set of high detail irregular marble stones with gold lines stacked in impossible balance, perfect composition, cinematic light photo studio, beige color scheme, indirect lighting, 8k, elegant and luxury style","Ultrawide, highway, with golden ratio style, 4K , sides are prairies, light is Golden hour, sky with red Clouds, ultrarealistic, CinémaScope, ultra wide format, ratio 16/9, 1/1000 sec, maximum resolution, Sharp details","A photo of cat flying out to space as an astronaut, digital art","A hyper realistic rilakkuma enjoying an icecream in the snow","A lush tropical forest with a waterfall.","A majestic snowy mountain peak.","A beautiful sunset over a beach.","A serene lake surrounded by trees.","A picturesque countryside with rolling hills.","A colorful hot air balloon in the sky.","A peaceful Zen garden.","A grand castle on a hill.","A lively street market in a bustling city.","A delightful flower garden in full bloom.","A cozy cabin in the woods.","A vibrant coral reef teeming with sea life.","A classic European city with cobblestone streets.","A stunning waterfall cascading into a crystal clear pool.","A secluded cabin on the edge of a lake.","A beautiful desert landscape with sand dunes.","A majestic elephant in its natural habitat.","A charming countryside village with thatched roof cottages.","A dreamy castle floating on a cloud.","A whimsical tree house in a forest.","A vibrant city skyline at night.","A picturesque vineyard with rows of grapevines.","A peaceful Japanese garden with a koi pond.","A charming lighthouse on a rocky coastline.","A beautiful waterfall surrounded by greenery.","A dreamy castle with a moat and drawbridge.","A colorful hot air balloon festival.","A beautiful garden with a fountain and sculptures.","A picturesque countryside with a windmill.","A stunning mountain landscape with a rainbow."]},84295:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(51806),a=n(13419),o=n(86989),i=n.n(o),s=n(52175),c=n(4981),l=n(55609),u=n(9818),d=n(69307),p=n(65736),m=n(77567);const __=p.__;function h(e){let{attributes:t,setAttributes:n,clientId:o}=e;const[p,h]=(0,d.useState)(!1),[g,f]=(0,d.useState)([]),[b,v]=(0,d.useState)(null),[k,y]=(0,d.useState)(""),{replaceBlock:w}=(0,u.useDispatch)(s.store),[E,_]=(0,d.useState)(null),[C]=(0,d.useState)((S=m.K)[Math.floor(Math.random()*S.length)]);var S;const j=__("Retry","jetpack"),x=__("Submit","jetpack"),P=E?j:x,{tracks:N}=(0,a.z$)(),{mediaUpload:L}=(0,u.useSelect)((e=>{const{getSettings:t}=e(s.store);return{mediaUpload:t().mediaUpload}}),[]),T=(0,u.useSelect)((e=>e("core/editor").getCurrentPostId())),A=e=>{let{image:t,inModal:n=!1}=e;return(0,r.createElement)(l.Flex,{direction:"column"},n&&(0,r.createElement)(l.FlexItem,{style:{"text-align":"center"}},(0,r.createElement)(l.Button,{variant:"primary",onClick:()=>I(t)},__("Use this image","jetpack"))),(0,r.createElement)(l.FlexBlock,null,(0,r.createElement)("img",{className:"wp-block-ai-image-image",src:t,alt:"",onClick:()=>v(t)})),!n&&(0,r.createElement)(l.FlexBlock,null,(0,r.createElement)(l.Flex,{direction:"column",style:{"align-items":"center"}},(0,r.createElement)(l.FlexItem,null,(0,r.createElement)(l.Button,{variant:"primary",onClick:()=>I(t)},__("Use this image","jetpack"))))))},I=async e=>{if(p)return;h(!0),_(null);const n=await fetch(e),r=await n.blob(),a=new File([r],"jetpack_ai_image.png",{type:"image/png"});L({filesList:[a],onFileChange:e=>{let[n]=e;n.id&&w(o,(0,c.createBlock)("core/image",{url:n.url,caption:t.requestedPrompt,alt:t.requestedPrompt}))},allowedTypes:["image"],onError:e=>{console.error(e),h(!1)}}),N.recordEvent("jetpack_ai_dalle_generation_upload",{post_id:T})};return(0,r.createElement)("div",(0,s.useBlockProps)(),(0,r.createElement)(l.Placeholder,{label:__("AI Image","jetpack"),notices:E&&[(0,r.createElement)("div",null,E)]},!p&&0===g.length&&(0,r.createElement)(l.Flex,{expanded:!0},(0,r.createElement)(l.FlexBlock,null,(0,r.createElement)(l.TextareaControl,{label:__("What would you like to see?","jetpack"),placeholder:C,allowedFormats:[],onChange:y,rows:6}),(0,r.createElement)(l.Button,{variant:"primary",onClick:()=>{h(!1),f([]),_(null),function(e,t,n,r,a,o){n(!0),a(null),t({requestedPrompt:e}),i()({path:"/wpcom/v2/jetpack-ai/images/generations",method:"POST",data:{prompt:e,post_id:o}}).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)}))}(""===k.trim()?C:k,n,h,f,_,T),N.recordEvent("jetpack_ai_dalle_generation",{post_id:T})}},P))),!p&&g.length>0&&(0,r.createElement)(l.Flex,{direction:"column",style:{width:"100%"}},(0,r.createElement)(l.FlexBlock,{style:{textAlign:"center",margin:"12px",fontStyle:"italic",width:"100%"}},t.requestedPrompt),(0,r.createElement)(l.FlexBlock,{style:{fontSize:"20px",lineHeight:"38px"}},__("Please choose your image","jetpack")),(0,r.createElement)(l.Flex,{direction:"row",wrap:!0},g.map((e=>(0,r.createElement)(A,{image:e}))))),!p&&b&&(0,r.createElement)(l.Modal,{onRequestClose:()=>v(null)},(0,r.createElement)(A,{image:b,inModal:!0})),t.content&&(0,r.createElement)("div",{className:"content"},t.content),p&&(0,r.createElement)(l.FlexBlock,{style:{padding:"10px",textAlign:"center"}},(0,r.createElement)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}}))))}},6454:function(e,t,n){"use strict";var r=n(31985),a=n(41107),o=n(84295);(0,r.S)(a,{edit:o.Z,save:()=>""})},55410:function(e,t,n){"use strict";n.d(t,{ZP:function(){return g}});var r=n(51806),a=n(13419),o=n(86989),i=n.n(o),s=n(52175),c=n(55609),l=n(9818),u=n(69307),d=n(65736),p=n(59958);const __=d.__,m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";const r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).filter((function(e){return e&&e.attributes&&e.attributes.content})).map((function(e){return e.attributes.content.replaceAll("<br/>","\n")})).join("\n").slice(-1024);if(!(e||r||t||n))return!1;let a="";return a=e?(0,d.sprintf)(/** translators: This will be the beginning of a prompt that will be sent to OpenAI based on the post title. */ __("Please help me write a short piece of a blog post titled '%1$s'","jetpack"),e):__("Please help me write a short piece of a blog post","jetpack"),t&&( /** translators: This will be the follow up of a prompt that will be sent to OpenAI based on comma-seperated category names. */ a+=(0,d.sprintf)(__(", published in categories '%1$s'","jetpack"),t)),n&&( /** translators: This will be the follow up of a prompt that will be sent to OpenAI based on comma-seperated category names. */ a+=(0,d.sprintf)(__(" and tagged '%1$s'","jetpack"),n)),a+=__(". Please only output generated content ready for publishing.","jetpack"),r&&( /** translators: This will be the end of a prompt that will be sent to OpenAI with the last MAXIMUM_NUMBER_OF_CHARACTERS_SENT_FROM_CONTENT characters of content.*/ a+=(0,d.sprintf)(__(" Please continue from here:\n\n … %s","jetpack"),r)),a.trim()};function h(e){let{html:t,showAnimation:n,onAnimationDone:a}=e;const[o,i]=(0,u.useState)("");return(0,u.useEffect)((()=>{if(n){const e=t.split(" ");for(let t=1;t<e.length;t++){const n=e.slice(0,t).join(" ");setTimeout((()=>i(n)),50*t)}setTimeout((()=>{i(t),a()}),50*e.length)}else i(t)}),[]),(0,r.createElement)("div",{className:"content"},(0,r.createElement)(u.RawHTML,null,o))}function g(e){let{attributes:t,setAttributes:n,clientId:o}=e;const[d,g]=(0,u.useState)(!1),[f,b]=(0,u.useState)(!1),[v,k]=(0,u.useState)(!1),[y,w]=(0,u.useState)(!1),[E,_]=(0,u.useState)(!1),{tracks:C}=(0,a.z$)(),S=(0,l.useSelect)((e=>e("core/editor").getEditedPostAttribute("title")));let j=!1;const x=(0,l.useSelect)((e=>e("core/editor").getEditedPostAttribute("categories")))||[],P=(0,l.useSelect)((e=>x.map((t=>{const n=e("core").getEntityRecord("taxonomy","category",t);if(n)return n;j=!0})).filter(Boolean)),[x]),N=(0,l.useSelect)((e=>e("core/editor").getEditedPostAttribute("tags")),[])||[],L=(0,l.useSelect)((e=>N.map((t=>{const n=e("core").getEntityRecord("taxonomy","post_tag",t);if(n)return n;j=!0})).filter(Boolean)),[N]);(0,u.useEffect)((()=>{b(j)}),[j]);const T=(0,l.useSelect)((e=>e("core/editor").getCurrentPostId())),A=P.filter((e=>1!==e.id)).map((e=>{let{name:t}=e;return t})).join(", "),I=L.map((e=>{let{name:t}=e;return t})).join(", "),R=(0,l.useSelect)((e=>{const t=e("core/block-editor"),n=t.getBlockIndex(o);return t.getBlocks().slice(0,n)??[]})),M=()=>{if(t.content||d)return;w(!1),_(!1),k(!1),g(!0);const e={content:m(S,R,A,I)};C.recordEvent("jetpack_ai_chat_completion",{post_id:T}),i()({path:"/wpcom/v2/jetpack-ai/completions",method:"POST",data:e}).then((e=>{const t=e.trim().replaceAll("\n","<br/>");n({content:t}),g(!1)})).catch((e=>{e.message?_(e.message):_(__("Whoops, we have encountered an error. AI is like really, really hard and this is an experimental feature. Please try again later.","jetpack")),w(!0),g(!1)}))},Z=d||f,B=!!t.content,D=B||Z;return(0,l.useSelect)((()=>{if(!D){const e=m(S,R,A,I);(()=>{const e=p.name;return R.filter((t=>t.name&&t.name===e&&!t.attributes.content)).length>0})()?_(/** translators: This will be an error message when multiple Open AI paragraph blocks are triggered on the same page. */ __("Waiting for the previous AI paragraph block to finish","jetpack")):e?v?(_(/** translators: This is to retry to complete the text */ __("Ready to retry","jetpack")),w(!0),k(!1)):v||y||M():(_(/** translators: First placeholder is a number of more characters we need */ __("Please write a longer title or a few more words in the opening preceding the AI block. Our AI model needs some content.","jetpack")),k(!0))}}),[S,R,A,I,D,v,y]),(0,r.createElement)("div",(0,s.useBlockProps)(),!d&&!f&&E&&(0,r.createElement)(c.Placeholder,{label:__("AI Paragraph","jetpack"),instructions:E},y&&(0,r.createElement)(c.Button,{variant:"primary",onClick:()=>M()},__("Retry","jetpack"))),B&&(0,r.createElement)(h,{showAnimation:!t.animationDone,onAnimationDone:()=>{n({animationDone:!0})},html:t.content}),!t.content&&Z&&(0,r.createElement)("div",{style:{padding:"10px",textAlign:"center"}},(0,r.createElement)(c.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})))}},16042:function(e,t,n){"use strict";var r=n(51806),a=n(52175),o=n(4981),i=n(69307),s=n(31985),c=n(59958),l=n(55410);(0,s.S)(c,{edit:l.ZP,save:e=>{const t=a.useBlockProps.save();return(0,r.createElement)(i.RawHTML,t,e.attributes.content)},transforms:{to:[{type:"block",blocks:["core/paragraph"],transform:e=>{let{content:t}=e;return(0,o.createBlock)("core/paragraph",{content:t})}}]}})},95216:function(e,t){"use strict";t.Z={products:[{title:"New York Biology Dead Sea Mud Mask for Face and Body - All Natural - Spa Quality Pore Reducer for Acne, Blackheads and Oily Skin - Tightens Skin for A Healthier Complexion - 8.8 oz",asin:"B01NCM25K7",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"New York Biology",detailPageUrl:"https://www.amazon.com/New-York-Biology-Dead-Mask/dp/B01NCM25K7?psc=1&SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B01NCM25K7",listPrice:"$14.95",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51asbRHNuVL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:62,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51asbRHNuVL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:133,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51asbRHNuVL.jpg",imageHeightLarge:500,imageWidthLarge:415,authorshipInfo:"New York Biology"},{title:"Face/Off",asin:"B002PT1KH6",productGroup:"Movie",authors:[],artists:[],actors:["John Travolta","Nicolas Cage","Joan Allen","Alessandro Nivola","Gina Gershon"],detailPageUrl:"https://www.amazon.com/Face-Off-John-Travolta/dp/B002PT1KH6?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B002PT1KH6",listPrice:"$9.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51TyrHec4QL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:50,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51TyrHec4QL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:107,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51TyrHec4QL.jpg",imageHeightLarge:500,imageWidthLarge:333,authorshipInfo:"Starring John Travolta, Nicolas Cage, Joan Allen, Alessandro Nivola, Gina Gershon"},{title:"PIXNOR Facial Cleansing Brush [Newest 2020], Waterproof Face Spin Brush with 7 Brush Heads for Deep Cleansing, Gentle Exfoliating, Removing Blackhead, Massaging(Pink)",asin:"B077ZW5YQP",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"PIXNOR",detailPageUrl:"https://www.amazon.com/PIXNOR-Cleansing-Waterproof-Exfoliating-Blackhead/dp/B077ZW5YQP?psc=1&SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B077ZW5YQP",listPrice:"$39.99",salePrice:"$22.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/41KQCaa1hjL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/41KQCaa1hjL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/41KQCaa1hjL.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"PIXNOR"},{title:"BESTOPE Blackhead Remover Pimple Comedone Extractor Tool Best Acne Removal Kit - Treatment for Blemish, Whitehead Popping, Zit Removing for Risk Free Nose Face Skin with Metal Case",asin:"B019SVHLEY",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"Doctor PimplePopper",detailPageUrl:"https://www.amazon.com/BESTOPE-Blackhead-Remover-Comedone-Extractor/dp/B019SVHLEY?psc=1&SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B019SVHLEY",listPrice:"$7.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51QHC5fDdfL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51QHC5fDdfL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51QHC5fDdfL.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"Doctor PimplePopper"},{title:"Welcome to the Jungle",asin:"B004L3L9PM",productGroup:"TV Series Episode Video on Demand",authors:[],artists:[],actors:[],detailPageUrl:"https://www.amazon.com/Welcome-to-the-Jungle/dp/B004L3L9PM?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B004L3L9PM",listPrice:"$2.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51KBv1L7lJL._SL75_.jpg",imageHeightSmall:56,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51KBv1L7lJL._SL160_.jpg",imageHeightMedium:120,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51KBv1L7lJL.jpg",imageHeightLarge:375,imageWidthLarge:500,authorshipInfo:""},{title:"Black Charcoal Mask - Face Peel Off Mask with Organic Bamboo and Vitamin C - Deep Cleansing Pore Blackhead Removal and Purifying Black Mask for Men and Women",asin:"B07V1MPG8N",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"O'linear",detailPageUrl:"https://www.amazon.com/Black-Charcoal-Mask-Cleansing-Blackhead/dp/B07V1MPG8N?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07V1MPG8N",listPrice:"$7.49",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51QkF1BReJL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51QkF1BReJL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51QkF1BReJL.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"O'linear"},{title:"Girl, Wash Your Face: Stop Believing the Lies about Who You Are So You Can Become Who You Were Meant to Be",asin:"1400201659",productGroup:"Book",authors:["Rachel Hollis"],artists:[],actors:[],manufacturer:"Thomas Nelson",detailPageUrl:"https://www.amazon.com/Girl-Wash-Your-Face-Believing/dp/1400201659?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=1400201659",listPrice:"$11.88",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51uuwa-5OgL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:49,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51uuwa-5OgL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:104,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51uuwa-5OgL.jpg",imageHeightLarge:500,imageWidthLarge:326,authorshipInfo:"By Rachel Hollis"},{title:"Death Dealers",asin:"B07F75BN4W",productGroup:"TV Series Episode Video on Demand",authors:[],artists:[],actors:[],detailPageUrl:"https://www.amazon.com/Death-Dealers/dp/B07F75BN4W?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07F75BN4W",listPrice:"$1.99",authorshipInfo:""},{title:"eDiva Natural Jade Roller- Gua Sha - Lymphatic Drainage Tool for Face, Neck, Body - Anti Aging Treatment - Reduces Wrinkles and Fine Lines",asin:"B07HHF37F7",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"eDiva",detailPageUrl:"https://www.amazon.com/eDiva-Natural-Jade-Roller-Gua/dp/B07HHF37F7?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07HHF37F7",listPrice:"$49.95",salePrice:"$22.95",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/41DWi8-M92L._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/41DWi8-M92L._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/41DWi8-M92L.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"eDiva"},{title:"Pack Leaders",asin:"B071GRS6R9",productGroup:"TV Series Episode Video on Demand",authors:[],artists:[],actors:["McKenzie Westmore","Ve Neill","Glenn Hetrick","Neville Page","Michael Westmore"],detailPageUrl:"https://www.amazon.com/Pack-Leaders/dp/B071GRS6R9?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B071GRS6R9",listPrice:"$2.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51rP3BM0oxL._SL75_.jpg",imageHeightSmall:56,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51rP3BM0oxL._SL160_.jpg",imageHeightMedium:120,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51rP3BM0oxL.jpg",imageHeightLarge:375,imageWidthLarge:500,authorshipInfo:"Starring McKenzie Westmore, Ve Neill, Glenn Hetrick, Neville Page, Michael Westmore"}]}},48480:function(e,t,n){"use strict";var r=n(51806),a=n(13419),o=n(52175),i=n(4981),s=n(55609),c=n(69307),l=n(65736),u=n(99217),d=n.n(u),p=n(55250),m=n(95216);const __=l.__,h=(0,a.dM)(p);t.Z=(0,s.withNotices)((function(e){let{attributes:{backgroundColor:t,textColor:n,buttonAndLinkColor:a,asin:l,showImage:u,showTitle:p,showSeller:g,showPrice:f,showPurchaseButton:b},className:v,name:k,noticeUI:y,setAttributes:w}=e;const E=(0,i.getBlockDefaultClassName)(k),[_,C]=(0,c.useState)([]),S=/^(\d+)$|\(ASIN:(.+)\)$/,j=(0,r.createElement)(s.Placeholder,{label:__("Amazon","jetpack"),instructions:__("Search by entering an Amazon product name or ID below.","jetpack"),icon:h,notices:y},(0,r.createElement)("form",null,(0,r.createElement)(s.FormTokenField,{value:l,suggestions:_,onInputChange:()=>{C(m.Z.products.map((e=>`${e.title} (ASIN:${e.asin})`)))},maxSuggestions:10,label:__("Products","jetpack"),onChange:e=>{const t=e.map((e=>{const t=S.exec(e),n=t[1]||t[2];return m.Z.products.filter((e=>e.asin===n))}));w({asin:t[0][0].asin})}}),(0,r.createElement)(s.Button,{variant:"secondary",type:"submit"},__("Preview","jetpack")))),x=(0,r.createElement)(o.InspectorControls,null,l&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.PanelBody,{title:__("Promotion Settings","jetpack")},(0,r.createElement)(s.ToggleControl,{label:__("Show Image","jetpack"),checked:u,onChange:()=>w({showImage:!u})}),(0,r.createElement)(s.ToggleControl,{label:__("Show Title","jetpack"),checked:p,onChange:()=>w({showTitle:!p})}),(0,r.createElement)(s.ToggleControl,{label:__("Show Author/Seller","jetpack"),checked:g,onChange:()=>w({showSeller:!g})}),(0,r.createElement)(s.ToggleControl,{label:__("Show Price","jetpack"),checked:f,onChange:()=>w({showPrice:!f})}),(0,r.createElement)(s.ToggleControl,{label:__("Show Purchase Button","jetpack"),checked:b,onChange:()=>w({showPurchaseButton:!b})})),(0,r.createElement)(o.PanelColorSettings,{title:__("Color Settings","jetpack"),colorSettings:[{value:t,onChange:e=>w({backgroundColor:e}),label:__("Background Color","jetpack")},{value:n,onChange:e=>w({textColor:e}),label:__("Text Color","jetpack")},{value:a,onChange:e=>w({buttonAndLinkColor:e}),label:__("Button & Link Color","jetpack")}]},(0,r.createElement)(o.ContrastChecker,{isLargeText:!1,textColor:n,backgroundColor:t}))));return(0,r.createElement)("div",{className:v},x,l?(()=>{const{title:e,detailPageUrl:o,listPrice:i,imageUrlMedium:c,imageWidthMedium:v,imageHeightMedium:k}=m.Z.products.filter((e=>e.asin===l))[0],y="TODO",w=c&&(0,r.createElement)("a",{target:"_blank",href:o,rel:"noopener noreferrer"},(0,r.createElement)("img",{alt:e,src:c,width:v,heigth:k})),_=d().mostReadable(a,["#ffffff"],{includeFallbackColors:!0,size:"small"}).toHexString();return l?(0,r.createElement)("div",{style:{backgroundColor:t,color:n,width:v}},u&&w,p&&(0,r.createElement)("div",{className:`${E}-title`},(0,r.createElement)(s.ExternalLink,{href:o,style:{color:a}},e)),g&&y&&(0,r.createElement)("div",{className:`${E}-seller`},y),f&&(0,r.createElement)("div",{className:`${E}-list-price`},i),b&&(0,r.createElement)(s.Button,{href:o,icon:h,variant:"primary",className:`${E}-button`,style:{color:_,backgroundColor:a,borderColor:a}},__("Shop Now","jetpack"))):null})():j)}))},39223:function(e,t,n){"use strict";var r=n(31985),a=n(55250),o=n(48480);(0,r.S)(a,{edit:o.Z,save:()=>null})},14511:function(e,t){"use strict";t.Z={answersLink:{type:"string",source:"attribute",attribute:"href",selector:".jetpack-blogging-prompt__answers-link"},answersLinkText:{type:"string",source:"html",selector:".jetpack-blogging-prompt__answers-link"},gravatars:{type:"array",source:"query",selector:".jetpack-blogging-prompt__answers-gravatar",query:{url:{type:"string",source:"attribute",attribute:"src"}}},promptLabel:{type:"string",source:"html",selector:".jetpack-blogging-prompt__label"},promptText:{type:"string",source:"html",selector:".jetpack-blogging-prompt__text"},promptFetched:{type:"boolean",default:!1},promptId:{type:"number"},showResponses:{type:"boolean",default:!0},showLabel:{type:"boolean",default:!0},tagsAdded:{type:"boolean",default:!1}}},14303:function(e,t,n){"use strict";var r=n(51806),a=n(86989),o=n.n(a),i=n(52175),s=n(55609),c=n(9818),l=n(69307),u=n(65736),d=n(96483),p=n(44266);const __=u.__,_x=u._x;t.Z=(0,s.withNotices)((function(e){let{attributes:t,noticeOperations:n,noticeUI:a,setAttributes:m}=e;const h=(0,l.useRef)(!1),{answersLink:g,answersLinkText:f,gravatars:b,promptFetched:v,promptId:k,promptLabel:y,promptText:w,showLabel:E,showResponses:_,tagsAdded:C}=t,S=(0,i.useBlockProps)({className:"jetpack-blogging-prompt"});(0,p.n)(k,C,(e=>m({tagsAdded:e})));const j=(0,c.useSelect)((e=>{const{getEntityRecord:t,hasFinishedResolution:n}=e("core"),r=t("root","site")?.language||"en_US";return n("getEntityRecord",["root","site"])?r:null}),[]);(0,l.useEffect)((()=>{if(!j||h.current||v)return;const e=()=>{m({promptFetched:!1,promptId:null,tagsAdded:!1}),h.current=!1,n.removeAllNotices()};let t="/wpcom/v3/blogging-prompts";if(k)t+="/"+encodeURIComponent(k);else{const e=new Date;t+=`?after=--${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}&order=desc`}t=(0,d.addQueryArgs)(t,{_locale:j}),h.current=!0,o()({path:t}).then((e=>{const t=k?e:e[0];m({answersLink:t.answered_link,answersLinkText:t.answered_link_text,gravatars:t.answered_users_sample.map((e=>{let{avatar:t}=e;return{url:t}})),promptFetched:!0,promptLabel:t.label,promptText:t.text,promptId:t.id})})).catch((t=>{m({promptFetched:!0});const a="rest_post_invalid_id"===t.code&&k?(o=k,(0,r.createElement)(r.Fragment,null,(0,u.sprintf)(/* translators: %d is the prompt id. */ __("Prompt with id %d not found.","jetpack"),o)," ",(0,r.createElement)(s.Button,{variant:"link",onClick:e},__("Reset prompt","jetpack")))):(t=>(0,r.createElement)(r.Fragment,null,(0,u.sprintf)(/* translators: %s is the error message. */ __("Error while fetching prompt: %s","jetpack"),t)," ",(0,r.createElement)(s.Button,{variant:"link",onClick:e},__("Retry","jetpack"))))(t.message);var o;n.removeAllNotices(),n.createErrorNotice(a)}))}),[h,n,v,k,m,j]);const x=e=>{m({showLabel:e})},P=e=>{m({showResponses:e})};return(0,r.createElement)("div",S,a,(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(s.PanelBody,{title:_x("Settings","title of block settings sidebar section","jetpack")},(0,r.createElement)(s.ToggleControl,{label:__("Show daily prompt label","jetpack"),checked:E,onChange:x}),(0,r.createElement)(s.ToggleControl,{label:__("Show other responses","jetpack"),checked:_,onChange:P})))),v?(0,r.createElement)(r.Fragment,null,E&&(0,r.createElement)("div",{className:"jetpack-blogging-prompt__label"},y),(0,r.createElement)("div",{className:"jetpack-blogging-prompt__text"},w),_&&k&&(0,r.createElement)("div",{className:"jetpack-blogging-prompt__answers"},b&&b.slice(0,3).map((e=>{let{url:t}=e;return t&&(0,r.createElement)("img",{className:"jetpack-blogging-prompt__answers-gravatar",src:t,key:t})})),(0,r.createElement)("a",{className:"jetpack-blogging-prompt__answers-link",href:g,target:"_blank",rel:"external noreferrer noopener"},f))):(0,r.createElement)("div",{className:"jetpack-blogging-prompt__spinner"},(0,r.createElement)(s.Spinner,null)))}))},35681:function(e,t,n){"use strict";var r=n(4981),a=n(9818),o=n(31985),i=n(46185),s=n(50187);(0,o.Z)(s.u2,s.Xd),function(){const e=new URL(document.location.href);if(!e.pathname.endsWith("/wp-admin/post-new.php"))return;const t=e.searchParams.get("answer_prompt")??"0",n=parseInt(t);n&&async function(e){await(0,i.U)();const{insertBlocks:t}=(0,a.dispatch)("core/block-editor");t([(0,r.createBlock)(`jetpack/${s.u2}`,{promptFetched:!1,promptId:e,tagsAdded:!0}),(0,r.createBlock)("core/paragraph")],0,void 0,!1)}(n)}()},50187:function(e,t,n){"use strict";n.d(t,{Xd:function(){return h},u2:function(){return m}});var r=n(65736),a=n(70355),o=n(5820),i=n(14511),s=n(14303),c=n(19597),l=n(65783),u=n(43807),d=n(45416),p=n(2275);const __=r.__,_x=r._x,m="blogging-prompt",h={apiVersion:2,title:__("Writing Prompt","jetpack"),description:__("Answer a new and inspiring writing prompt each day.","jetpack"),icon:{src:d.Z,foreground:(0,a.m)()},category:(0,o.Z)("text"),keywords:[_x("writing","block search term","jetpack"),_x("blogging","block search term","jetpack")],supports:{align:!1,alignWide:!1,anchor:!1,className:!0,color:{background:!0,gradients:!0,link:!0,text:!0},customClassName:!0,html:!1,inserter:!0,multiple:!1,reusable:!0,spacing:{margin:["top","bottom"],padding:!0,blockGap:!1}},edit:s.Z,save:p.Z,attributes:i.Z,styles:[{name:"block",label:__("Block","jetpack"),isDefault:!0},{name:"quote",label:__("Quote","jetpack")}],example:{attributes:{answersLink:"https://wordpress.com/tag/dailyprompt",answersLinkText:__("View all responses","jetpack"),gravatars:[{url:c},{url:l},{url:u}],promptLabel:__("Daily writing prompt","jetpack"),promptText:__("What's your favorite place to visit?","jetpack"),promptFetched:!0,promptId:1234,showResponses:!0,showLabel:!0,tagsAdded:!0}}}},2275:function(e,t,n){"use strict";var r=n(51806),a=n(52175);t.Z=function(e){let{attributes:t}=e;const{answersLink:n,answersLinkText:o,gravatars:i,promptId:s,promptLabel:c,promptText:l,showLabel:u,showResponses:d}=t,p=a.useBlockProps.save({className:"jetpack-blogging-prompt"});return(0,r.createElement)("div",p,u&&(0,r.createElement)("div",{className:"jetpack-blogging-prompt__label"},c),(0,r.createElement)("div",{className:"jetpack-blogging-prompt__text"},l),d&&s&&(0,r.createElement)("div",{className:"jetpack-blogging-prompt__answers"},i.map((e=>{let{url:t}=e;return t&&(0,r.createElement)("img",{className:"jetpack-blogging-prompt__answers-gravatar","aria-hidden":"true",src:t,key:t})})),(0,r.createElement)("a",{className:"jetpack-blogging-prompt__answers-link",href:n,target:"_blank",rel:"external noreferrer noopener"},o)))}},44266:function(e,t,n){"use strict";n.d(t,{n:function(){return l}});var r=n(86989),a=n.n(r),o=n(9818),i=n(69307),s=n(81975);function c(e){const t=(0,s.escapeHTML)(e);return a()({path:"/wp/v2/tags",method:"POST",data:{name:t}}).catch((t=>"term_exists"!==t.code?Promise.reject(t):Promise.resolve({id:t.data.term_id,name:e})))}function l(e,t,n){const{editPost:r}=(0,o.useDispatch)("core/editor"),a=(0,i.useRef)("not-started"),{postType:s,postsSupportTags:l,tags:u,tagIds:d,tagsHaveResolved:p}=(0,o.useSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor"),{getEntityRecords:n,getPostType:r,hasFinishedResolution:a}=e("core"),o=t("tags"),i={_fields:"id,name",context:"view",include:o?.join(","),per_page:-1};return{postType:t("type"),postsSupportTags:r("post")?.taxonomies.includes("post_tag"),tagIds:o||[],tags:o&&o.length?n("taxonomy","post_tag",i):[],tagsHaveResolved:!o||!o.length||a("getEntityRecords",["taxonomy","post_tag",i])}}),[]);(0,i.useEffect)((()=>{"post"===s&&l&&!t&&p&&e&&Array.isArray(u)&&("not-started"===a.current&&(u.some((e=>e.name&&"dailyprompt"===e.name))&&u.some((t=>t.name&&t.name===`dailyprompt-${e}`))?a.current="fulfilled":(a.current="pending",Promise.all([c("dailyprompt"),c(`dailyprompt-${e}`)]).then((e=>{const t=e.map((e=>e.id));r({tags:[...d,...t]}),a.current="fulfilled"})).catch((e=>{console.error(e),a.current="rejected"})))),"fulfilled"===a.current&&n(!0))}),[r,l,s,e,a,n,u,d,t,p])}},81030:function(e,t,n){"use strict";var r=n(51806),a=n(52175),o=n(55609),i=n(65736);const __=i.__;t.Z=function(e){let{className:t,attributes:n,setAttributes:i}=e;const{icon:s,name:c,description:l}=n,u=(0,a.useBlockProps)({className:t});return(0,r.createElement)("div",u,(0,r.createElement)(a.MediaUpload,{multiple:!1,onSelect:e=>{i({icon:e.url})},render:e=>{let{open:t}=e;return(0,r.createElement)(o.Button,{variant:"link",onClick:t,style:{padding:0}},(0,r.createElement)("figure",null,(0,r.createElement)("img",{onError:e=>{e.target.parentNode.classList.add("empty-site-icon")},src:s,alt:c})))}}),(0,r.createElement)("div",null,(0,r.createElement)("a",null,(0,r.createElement)(a.RichText,{className:"jetpack-blogroll-item-title",value:c,tagName:"h3",allowedFormats:["core/bold","core/italic"],onChange:e=>{i({name:e})},placeholder:__("Enter site title","jetpack")})),(0,r.createElement)(a.RichText,{className:"jetpack-blogroll-item-description",value:l,onChange:e=>{i({description:e})},placeholder:__("Enter site description","jetpack")})))}},99180:function(e,t,n){"use strict";var r=n(51806),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},(0,r.createElement)(a.Path,{d:"M12 12.75H21V11.25H12V12.75Z"}),(0,r.createElement)(a.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M3 12C3 10.3431 4.34315 9 6 9C7.65685 9 9 10.3431 9 12C9 13.6569 7.65685 15 6 15C4.34315 15 3 13.6569 3 12ZM3.77743 10.8857C4.08602 10.2714 4.64181 9.80266 5.31427 9.61008C5.15499 9.79493 5.01798 10.0132 4.90612 10.2532C4.81521 10.4483 4.73949 10.6605 4.68112 10.8857H3.77743ZM3.58718 11.4C3.53956 11.5922 3.51429 11.7931 3.51429 12C3.51429 12.2069 3.53956 12.4078 3.58718 12.6H4.58166C4.55616 12.4057 4.54286 12.205 4.54286 12C4.54286 11.7949 4.55616 11.5942 4.58166 11.4H3.58718ZM5.10094 11.4C5.0724 11.5917 5.05714 11.7926 5.05714 12C5.05714 12.2074 5.0724 12.4083 5.10094 12.6H6.89907C6.92761 12.4083 6.94286 12.2074 6.94286 12C6.94286 11.7926 6.92761 11.5917 6.89906 11.4H5.10094ZM7.41834 11.4C7.44384 11.5942 7.45714 11.7949 7.45714 12C7.45714 12.2051 7.44384 12.4058 7.41835 12.6H8.41282C8.46044 12.4078 8.48571 12.2069 8.48571 12C8.48571 11.7931 8.46044 11.5922 8.41282 11.4H7.41834ZM8.22257 10.8857H7.31888C7.26051 10.6605 7.18479 10.4483 7.09388 10.2532C6.98202 10.0132 6.845 9.79493 6.68571 9.61007C7.35817 9.80265 7.91398 10.2714 8.22257 10.8857ZM6.78494 10.8857H5.21506C5.25946 10.7382 5.31227 10.5992 5.37226 10.4705C5.5421 10.1061 5.76275 9.83732 5.99999 9.67974C6.23724 9.83732 6.45789 10.1061 6.62775 10.4705C6.68773 10.5992 6.74054 10.7382 6.78494 10.8857ZM3.77743 13.1143H4.68112C4.74269 13.3519 4.82356 13.5749 4.92121 13.7787C5.0301 14.0059 5.16199 14.2132 5.31431 14.3899C4.64184 14.1974 4.08603 13.7286 3.77743 13.1143ZM6.78495 13.1143H5.21506C5.26258 13.2722 5.31973 13.4203 5.38498 13.5564C5.5534 13.9078 5.76894 14.1668 6.00003 14.3203C6.23726 14.1627 6.45791 13.8939 6.62775 13.5295C6.68773 13.4008 6.74054 13.2618 6.78495 13.1143ZM7.09388 13.7468C7.18479 13.5517 7.26052 13.3395 7.31889 13.1143H8.22257C7.91398 13.7286 7.35819 14.1973 6.68574 14.3899C6.84501 14.2051 6.98203 13.9868 7.09388 13.7468Z",strokeWidth:"0.1"}))},81697:function(e,t,n){"use strict";n.d(t,{Xd:function(){return d},u2:function(){return u}});var r=n(51806),a=n(52175),o=n(65736),i=n(70355),s=n(39114),c=n(81030),l=n(99180);const __=o.__,u="blogroll-item",d={title:__("Blogroll Item","jetpack"),description:__("Blogroll Item","jetpack"),icon:{src:l.Z,foreground:(0,i.m)()},category:"grow",parent:["jetpack/blogroll"],keywords:[],supports:{align:!1,alignWide:!0,anchor:!1,customClassName:!0,className:!0,html:!1,multiple:!0,reusable:!0,inserter:!1},edit:c.Z,attributes:{id:{type:"string"},name:{type:"string"},icon:{type:"string",default:s},url:{type:"string"},description:{type:"string"}},save:()=>(0,r.createElement)(a.InnerBlocks.Content,null),example:{attributes:{}}}},75320:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(51806),a=n(37798),o=n(65736);const __=o.__;function i(e){let{results:t,onSelect:n,searchInput:i,isLoading:s}=e;const[c]=(0,a.useEntityProp)("root","site","Blogroll Recommendations");if(s)return(0,r.createElement)("div",{className:"jetpack-blogroll__appender-results"},(0,r.createElement)("div",{role:"status"},__("Loading…","jetpack")));const l=!i?.trim();return(0,r.createElement)("div",{className:"jetpack-blogroll__appender-results"},l&&(0,r.createElement)("div",{"aria-autocomplete":"list",className:"jetpack-blogroll__appender-result-list-header-text"},__("Suggestions","jetpack")),0===t.length&&!l&&(0,r.createElement)("div",{role:"status",className:"jetpack-blogroll__appender-no-results-message"},(0,r.createElement)("span",{className:"jetpack-blogroll__appender-no-results-message-main-text"},__("No results","jetpack")),(0,r.createElement)("span",{className:"jetpack-blogroll__appender-no-results-message-secondary-text"},(0,o.sprintf)(/* translators: %s is search query. */ __("No sites found for %s.","jetpack"),i))),t.length>0&&(0,r.createElement)("ul",{"aria-live":"polite"},t.map((e=>{const t=c.some((t=>t?.id===e?.blog_id));return(0,r.createElement)("li",{key:e.blog_id,className:"jetpack-blogroll__appender-result-container"},(0,r.createElement)("button",{className:"jetpack-blogroll__appender-result-title",disabled:t,onClick:()=>n(e)},(0,r.createElement)("div",{className:"jetpack-blogroll__appender-result-image"},e.site_icon&&(0,r.createElement)("img",{src:e.site_icon,alt:e.name})),(0,r.createElement)("div",{className:"jetpack-blogroll__appender-result-text"},(0,r.createElement)("span",{className:"jetpack-blogroll__appender-result-title"},e.name),(0,r.createElement)("span",{className:"jetpack-blogroll__appender-result-description"},e.description))))}))))}},46902:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(51806),a=n(55609),o=n(65736);const __=o.__;function i(e){let{value:t,onChange:n}=e;return(0,r.createElement)("div",{className:"jetpack-blogroll__appender-search"},(0,r.createElement)(a.TextControl,{__nextHasNoMarginBottom:!0,label:__("Search for sites to add","jetpack"),hideLabelFromVision:!0,placeholder:__("Search…","jetpack"),value:t,onChange:e=>n(e)}))}},53335:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(51806),a=n(55609),o=n(9818),i=n(69307),s=n(65736),c=n(11908),l=n(1219),u=n(95686),d=n(75320),p=n(46902);const __=s.__;function m(e){let{isLoading:t,subscriptions:n,clientId:s}=e;const[m,h]=(0,i.useState)(!1),[g,f]=(0,i.useState)(),[b,v]=(0,i.useState)(""),{insertBlock:k}=(0,o.dispatch)("core/block-editor"),{siteDetails:y,isLoading:w}=(0,l.Z)({siteURL:b,subscriptions:n,enabled:b});return t?(0,r.createElement)(a.Spinner,{className:"jetpack-blogroll__appender-spinner"}):(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.Button,{className:"block-editor-button-blogroll-block-appender",ref:f,icon:c.Z,label:__("Add Blogroll Item","jetpack"),onClick:()=>{h((e=>!e))}}),m&&(0,r.createElement)(a.Popover,{anchor:g,className:"jetpack-blogroll__appender"},(0,r.createElement)(p.Z,{value:b,onChange:v}),(0,r.createElement)(d.Z,{results:y,onSelect:e=>{k((0,u.UW)(e),void 0,s),h(!1)},searchInput:b,isLoading:w})))}},11417:function(e,t,n){"use strict";var r=n(51806),a=n(52175),o=n(4981),i=n(55609),s=n(9818),c=n(69307),l=n(65736),u=n(65235),d=n.n(u),p=n(53335),m=n(49105),h=n(56054),g=n(7973),f=n(95686);const __=l.__;t.Z=function(e){let{className:t,attributes:n,setAttributes:l,clientId:u}=e;const{show_avatar:b,show_description:v,open_links_new_window:k,ignore_user_blogs:y,load_placeholders:w}=n,{isLoading:E,recommendations:_,errorMessage:C}=(0,m.Z)(w),{isLoading:S,subscriptions:j,errorMessage:x}=(0,g.Z)({ignore_user_blogs:y});(0,h.k)({clientId:u});const{replaceInnerBlocks:P}=(0,s.dispatch)("core/block-editor");(0,c.useEffect)((()=>{if(w&&_.length){l({load_placeholders:!1});const e=[(0,o.createBlock)("core/heading",{content:__("Blogroll","jetpack"),level:3}),..._.map(f.v5)];P(u,e)}}),[_,w,l,u,P]);const N=(0,a.useBlockProps)({className:d()(t,{"hide-avatar":!b,"hide-description":!v})}),L=C||x;return(0,r.createElement)("div",N,(0,r.createElement)(a.InnerBlocks,{template:[["core/heading",{content:__("Blogroll","jetpack"),level:3}]],allowedBlocks:["jetpack/blogroll-item"],renderAppender:()=>!E&&(0,r.createElement)(p.Z,{isLoading:S,subscriptions:j,clientId:u})}),L&&(0,r.createElement)(i.Notice,{status:"error",isDismissible:!1},(0,r.createElement)("p",null,L)),w&&E&&(0,r.createElement)(i.FlexBlock,{style:{padding:"30px",textAlign:"center"}},(0,r.createElement)(i.Spinner,null)),(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(i.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(i.ToggleControl,{label:__("Show avatar","jetpack"),checked:!!b,onChange:()=>l({show_avatar:!b})}),(0,r.createElement)(i.ToggleControl,{label:__("Show description","jetpack"),checked:!!v,onChange:()=>l({show_description:!v})}),(0,r.createElement)(i.ToggleControl,{label:__("Open links in a new window","jetpack"),checked:!!k,onChange:()=>l({open_links_new_window:!k})}),(0,r.createElement)(i.ToggleControl,{label:__("Hide my own sites","jetpack"),checked:!!y,onChange:()=>l({ignore_user_blogs:!y})}))))}},30070:function(e,t,n){"use strict";var r=n(31985),a=n(28546),o=n(81697),i=n(11417),s=n(45243);(0,r.S)(a,{edit:i.Z,save:s.Z},[{name:o.u2,settings:o.Xd}])},45243:function(e,t,n){"use strict";var r=n(51806),a=n(52175),o=n(65235),i=n.n(o);t.Z=function(e){let{attributes:{show_avatar:t,show_description:n},className:o}=e;const s=a.useBlockProps.save({className:i()(o,{"hide-avatar":!t,"hide-description":!n})});return(0,r.createElement)("div",s,(0,r.createElement)(a.InnerBlocks.Content,null))}},53114:function(e,t,n){"use strict";n.d(t,{W:function(){return o}});var r=n(69307),a=n(95686);function o(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const[n,o]=(0,r.useState)(null),[i,s]=(0,r.useState)(null),[c,l]=(0,r.useState)(!1),u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;const[n,a]=(0,r.useState)(e);return(0,r.useEffect)((()=>{const n=setTimeout((()=>{a(e)}),t);return()=>{clearTimeout(n)}}),[e,t]),n}((0,a.jo)(e),500);return(0,r.useEffect)((()=>{if(l(t&&u),t&&u){const e=new AbortController;return fetch(`https://public-api.wordpress.com/rest/v1.1/sites/${encodeURIComponent(u)}?force=wpcom`,{cache:"force-cache",signal:e.signal}).then((e=>{if(200===e.status)return e.json();e.status})).then((e=>{o(e),l(!1)})).catch((e=>{"AbortError"!==e.name&&s(e)})),()=>e.abort()}}),[u,t]),{response:n,error:i,isLoading:c}}},1219:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(53114),a=n(95686);function o(e){let{siteURL:t,subscriptions:n,enabled:o=!1}=e;const i=(0,a.jo)(t),{response:s,isLoading:c}=(0,r.W)(i,Boolean(o)),l=n.filter((e=>`${e.name}${e.URL}`.match(new RegExp(t,"i"))));return s&&l.unshift({id:s?.ID,description:s?.description,URL:s?.URL,site_icon:(0,a.ze)(s?.logo?.url),name:s?.name}),{isLoading:c,siteDetails:l}}},49105:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(86989),a=n.n(r),o=n(69307),i=n(65736);const __=i.__;function s(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const[t,n]=(0,o.useState)(!1),[r,i]=(0,o.useState)(null),[s,c]=(0,o.useState)([]),l=(0,o.useRef)();return(0,o.useEffect)((()=>{e?(n(!0),i(null),l.current&&l.current.abort(),l.current="undefined"==typeof AbortController?void 0:new AbortController,a()({path:"/wpcom/v2/following/recommendations",global:!0,method:"GET",signal:l.current?.signal}).then((e=>{e.length||i(__("No subscriptions found. You need to follow some sites in order to see results.","jetpack")),c(e)})).catch((e=>{"AbortError"!==e.name&&(e.message?i(e.message):i(__("Whoops, we have encountered an error. Please try again later.","jetpack")))})).finally((()=>{l.current=null,n(!1)}))):n(!1)}),[e]),{isLoading:t,errorMessage:r,recommendations:s}}},56054:function(e,t,n){"use strict";n.d(t,{k:function(){return s}});var r=n(37798),a=n(9818),o=n(69307),i=n(95686);const s=e=>{let{clientId:t}=e;const[n,s]=(0,o.useState)(!1),{insertBlocks:c}=(0,a.useDispatch)("core/block-editor"),[l,u]=(0,r.useEntityProp)("root","site","Blogroll Recommendations"),d=(0,a.useSelect)((e=>e("core/block-editor").getBlock(t).innerBlocks.filter((e=>{let{name:t}=e;return"jetpack/blogroll-item"===t})).map((e=>{let{attributes:t}=e;return t}))),[t]);(0,o.useEffect)((()=>{if(!n&&l){const e=l.filter((e=>!d.some((t=>t.id===e.id))));if(e.length){const n=e.map(i.v5);c(n,void 0,t)}s(!0)}}),[t,l,d,n,c]),(0,o.useEffect)((()=>{void 0!==l&&u(d)}),[d])}},7973:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(86989),a=n.n(r),o=n(69307),i=n(65736),s=n(96483),c=n(95686);const __=i.__;function l(e){let{ignore_user_blogs:t}=e;const[n,r]=(0,o.useState)(!1),[i,l]=(0,o.useState)(null),[u,d]=(0,o.useState)([]),p=(0,o.useRef)();return(0,o.useEffect)((()=>{r(!0),l(null),p.current&&p.current.abort(),p.current="undefined"==typeof AbortController?void 0:new AbortController,a()({path:(0,s.addQueryArgs)("/wpcom/v2/following/mine",{ignore_user_blogs:t}),global:!0,method:"GET",signal:p.current?.signal}).then((e=>{e.length||l(__("No subscriptions found. You need to follow some sites in order to see results.","jetpack")),e=e.map((e=>(e.site_icon=(0,c.ze)(e.site_icon),e))),d(e)})).catch((e=>{"AbortError"!==e.name&&(e.message?l(e.message):l(__("Whoops, we have encountered an error. Please try again later.","jetpack")))})).finally((()=>{p.current=null,r(!1)}))}),[t]),{isLoading:n,errorMessage:i,subscriptions:u}}},95686:function(e,t,n){"use strict";n.d(t,{UW:function(){return i},jo:function(){return s},v5:function(){return o},ze:function(){return c}});var r=n(4981),a=n(39114);function o(e){return(0,r.createBlock)("jetpack/blogroll-item",{...e})}function i(e){const{blog_id:t,site_icon:n,URL:r,name:a,description:i}=e;return o({id:t,icon:n,url:r,name:a,description:i})}function s(e){if(!e)return null;const t=new RegExp("^([a-zA-Z]+:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])?)\\.)+[a-z]{2,})","i");try{return new URL(e)?.host}catch(n){return e.match(t)?.[2]??null}}function c(e){return e||a}},50756:function(e,t,n){"use strict";var r=n(51806),a=n(55609),o=n(69307),i=n(65736),s=n(65235),c=n.n(s),l=n(92819);const __=i.__,u="09:00",d="17:00";class p extends o.Component{renderInterval=(e,t)=>{const{day:n}=this.props,{opening:i,closing:s}=e;return(0,r.createElement)(o.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)(a.TextControl,{type:"time",label:__("Opening","jetpack"),value:i,className:"business-hours__open",placeholder:u,onChange:e=>{this.setHour(e,"opening",t)}}),(0,r.createElement)(a.TextControl,{type:"time",label:__("Closing","jetpack"),value:s,className:"business-hours__close",placeholder:d,onChange:e=>{this.setHour(e,"closing",t)}})),(0,r.createElement)("div",{className:"business-hours__remove"},n.hours.length>1&&(0,r.createElement)(a.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)(a.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:a,setAttributes:o}=this.props,{days:i}=a;o({days:i.map((a=>a.name===r.name?{...a,hours:a.hours.map(((r,a)=>a===n?{...r,[t]:e}:r))}:a))})};toggleClosed=e=>{const{day:t,attributes:n,setAttributes:r}=this.props,{days:a}=n;r({days:a.map((n=>{if(n.name===t.name){const t=e?[{opening:u,closing:d}]:[];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:a}=n;r({days:a.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)(o.Fragment,null,(0,r.createElement)("span",{className:"business-hours__day-name"},t.days[e.name]),(0,r.createElement)(a.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=p},80190:function(e,t,n){"use strict";var r=n(51806),a=n(69771),o=n(69307),i=n(65736),s=n(92819);const _x=i._x;class c extends o.Component{formatTime(e){const{timeFormat:t}=this.props,[n,r]=e.split(":"),o=new Date;return!(!n||!r)&&(o.setHours(n),o.setMinutes(r),(0,a.date)(t,o))}renderInterval=(e,t)=>{const{day:n}=this.props,a=n.hours;return(0,r.createElement)("span",{key:t},(0,i.sprintf)("%1$s - %2$s",this.formatTime(e.opening),this.formatTime(e.closing)),a.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),a=n.n(r),o=n(51806),i=n(13419),s=n(86989),c=n.n(s),l=n(55609),u=n(69771),d=n(69307),p=n(65736),m=n(65235),h=n.n(m),g=n(22023),f=n(50756),b=n(80190);const __=p.__,v=(0,i.dM)(g),k={days:{Sun:__("Sunday","jetpack"),Mon:__("Monday","jetpack"),Tue:__("Tuesday","jetpack"),Wed:__("Wednesday","jetpack"),Thu:__("Thursday","jetpack"),Fri:__("Friday","jetpack"),Sat:__("Saturday","jetpack")},startOfWeek:0};class y extends d.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,d=r.concat(r.slice(0,c)).slice(c);if(!s)return(0,o.createElement)(l.Placeholder,{icon:v,label:__("Loading business hours","jetpack")});if(!n){const e=(0,u.getSettings)(),{formats:{time:n}}=e;return(0,o.createElement)("dl",{className:h()(t,"jetpack-business-hours")},d.map(((e,t)=>(0,o.createElement)(b.Z,{key:t,day:e,localization:i,timeFormat:n}))))}return(0,o.createElement)("div",{className:h()(t,"is-edit")},d.map(((e,t)=>(0,o.createElement)(f.Z,a()({key:t,day:e,localization:i},this.props)))))}}t.Z=y},60866:function(e,t,n){"use strict";var r=n(51806),a=n(31985),o=n(22023),i=n(86162);(0,a.S)(o,{edit:e=>(0,r.createElement)(i.Z,e),save:()=>null})},98625:function(e,t,n){"use strict";var r=n(55609),a=n(92819);const o=(0,r.withFallbackStyles)(((e,t)=>{const{backgroundColor:n,textColor:r}=t,o=(0,a.get)(n,"color"),i=!(0,a.get)(r,"color")&&e?e.querySelector('[contenteditable="true"]'):null;return{fallbackBackgroundColor:o||!e?void 0:getComputedStyle(e).backgroundColor,fallbackTextColor:r||!i?void 0:getComputedStyle(i).color}}));t.Z=o},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),a=n(55609),o=n(69307),i=n(65736),s=n(90446);const __=i.__;function c(e){let{borderRadius:t="",setAttributes:n}=e;const i=(0,o.useCallback)((e=>n({borderRadius:e})),[n]);return(0,r.createElement)(a.PanelBody,{title:__("Border Settings","jetpack")},(0,r.createElement)(a.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),a=n(52175),o=n(65736);const __=o.__;function i(e){let{isGradientAvailable:t,backgroundColor:n,fallbackBackgroundColor:o,fallbackTextColor:i,gradientValue:s,setBackgroundColor:c,setGradient:l,setTextColor:u,textColor:d}=e;const p=(0,r.createElement)(a.ContrastChecker,{backgroundColor:n.color,fallbackBackgroundColor:o,fallbackTextColor:i,isLargeText:!1,textColor:d.color});return t?(0,r.createElement)(a.__experimentalPanelColorGradientSettings,{settings:[{colorValue:d.color,label:__("Text Color","jetpack"),onColorChange:u},{colorValue:n.color,gradientValue:s,label:__("Background","jetpack"),onColorChange:c,onGradientChange:l}],title:__("Background & Text Color","jetpack")},p):(0,r.createElement)(a.PanelColorSettings,{colorSettings:[{value:d.color,onChange:u,label:__("Text Color","jetpack")},{value:n.color,onChange:c,label:__("Background","jetpack")}],title:__("Background & Text Color","jetpack")},p)}},90446:function(e,t,n){"use strict";n.d(t,{DA:function(){return a},G0:function(){return s},Gp:function(){return i},pg:function(){return o}});var r=n(52175);const a=!!r.__experimentalUseGradient,o=5,i=50,s=0},29343:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(51806),a=n(9818),o=n(30429),i=n(43043),s=n(36953);function c(e){let{attributes:t,backgroundColor:n,clientId:c,context:l,fallbackBackgroundColor:u,fallbackTextColor:d,setAttributes:p,setBackgroundColor:m,setTextColor:h,textColor:g,gradientValue:f,setGradient:b,isGradientAvailable:v}=e;const{align:k,borderRadius:y}=t,w="jetpack/parentBlockWidth"in l,E=w?l["jetpack/parentBlockWidth"]:t.width,_=(0,a.useSelect)((e=>{const{getBlock:t,getBlockRootClientId:n}=e("core/block-editor");return t(n(c))})),{updateBlockAttributes:C}=(0,a.useDispatch)("core/block-editor");return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.Z,{backgroundColor:n,fallbackBackgroundColor:u,fallbackTextColor:d,gradientValue:f,setBackgroundColor:m,setGradient:b,setTextColor:h,textColor:g,isGradientAvailable:v}),(0,r.createElement)(i.Z,{borderRadius:y,setAttributes:p}),(0,r.createElement)(o.G,{align:k,width:E,onChange:e=>{w?C(_.clientId,{width:e}):p({width:e})}}))}},5501:function(e,t,n){"use strict";var r=n(82674),a=n.n(r),o=n(51806),i=n(52175),s=n(94333),c=n(65736),l=n(65235),u=n.n(l),d=n(81673),p=n(98625),m=n(90446),h=n(29343),g=n(16969);const __=c.__;t.Z=(0,s.compose)((0,i.withColors)({backgroundColor:"background-color"},{textColor:"color"}),p.Z)((function(e){const{attributes:t,backgroundColor:n,className:r,clientId:s,context:c,setAttributes:l,textColor:p}=e,{borderRadius:f,element:b,placeholder:v,text:k,width:y,fontSize:w}=t,E="jetpack/parentBlockWidth"in c;(0,g.Z)({attributes:t,clientId:s,setAttributes:l}),(0,d.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":p.color,[p.class]:p.class,[_]:_,"no-border-radius":0===f,"has-custom-width":!!y,[`has-${w}-font-size`]:!!w,"has-custom-font-size":!!w}),P={...!n.color&&C?{background:C}:{backgroundColor:n.color},fontSize:t.style?.typography?.fontSize,color:p.color,borderRadius:f?f+"px":void 0,width:y};return(0,o.createElement)("div",{className:j},(0,o.createElement)(i.RichText,{allowedFormats:"input"===b?[]:void 0,className:x,disableLineBreaks:"input"===b,onChange:e=>l({text:e}),placeholder:v||__("Add text…","jetpack"),style:P,value:k,withoutInteractiveFormatting:!0}),(0,o.createElement)(i.InspectorControls,null,(0,o.createElement)(h.Z,a()({gradientValue:C,setGradient:S,isGradientAvailable:m.DA},e))))}))},48887:function(e,t,n){"use strict";var r=n(31985),a=n(77123);(0,r.Z)(a.u,a.X)},26361:function(e,t,n){"use strict";var r=n(51806),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 13h8v-1.5H8V13z"}))},77123:function(e,t,n){"use strict";n.d(t,{X:function(){return u},u:function(){return l}});var r=n(65736),a=n(5820),o=n(70424),i=n(5501),s=n(26361),c=n(29586);const __=r.__,l="button",u={title:__("Button","jetpack"),icon:s.Z,category:(0,a.Z)("design","layout"),keywords:[],supports:{html:!1,inserter:!1,align:["left","center","right"],typography:{fontSize:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}}},styles:[{name:"fill",label:__("Fill","jetpack"),isDefault:!0},{name:"outline",label:__("Outline","jetpack")}],attributes:o.Z,edit: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),a=n(52175),o=n(65235),i=n.n(o),s=n(90446);function c(e){let{attributes:t,blockName:n,uniqueId:o}=e;const{backgroundColor:c,borderRadius:l,className:u,customBackgroundColor:d,customGradient:p,customTextColor:m,gradient:h,saveInPostContent:g,text:f,textColor:b,url:v,width:k,fontSize:y}=t;if(!g)return null;const w=(0,a.getColorClassName)("background-color",c),E=s.DA?(0,a.__experimentalGetGradientClass)(h):void 0,_=(0,a.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||d||p,[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:p||void 0,backgroundColor:w||p||h?void 0:d,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)(a.RichText.Content,{className:S,"data-id-attr":o||"placeholder",href:v,id:o,rel:"noopener noreferrer",role:"button",style:j,tagName:"a",target:"_blank",value:f}))}},16969:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(9818),a=n(69307),o=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:a}=e("core/block-editor"),i=r(a(n))||{},c=(0,o.mapValues)(s,(e=>i[e]));return{attributesToSync:(0,o.pickBy)(c,((e,n)=>e!==t[n]))}}));(0,a.useEffect)((()=>{(0,o.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),a=n(13419),o=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:o,embedCode:s,parseEmbedCode:c,setAttributes:l,setEmbedCode:u}=e;let d=null;return n&&(d=(0,a.Ug)()||(0,a.Wp)()?"https://wordpress.com/support/wordpress-editor/blocks/calendly-block/#customize-the-calendly-block":"https://jetpack.com/support/jetpack-blocks/calendly-block/#customizing-a-calendly-block"),(0,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:`${o}-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})})),d&&(0,r.createElement)(i.Notice,{className:`${o}-color-notice`,isDismissible:!1},(0,r.createElement)(i.ExternalLink,{href:d},__("Explore more customization options.","jetpack"))))};t.ZP=e=>{const{attributes:t,clientId:n,isEditingUrl:a,setAttributes:i,setIsEditingUrl:s}=e,{style:d,url:p}=t,m=[{value:"inline",label:__("Inline","jetpack")},{value:"link",label:__("Link","jetpack")}];return(0,r.createElement)(r.Fragment,null,p&&!a&&(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(l,{onEditClick:s})),p&&(0,r.createElement)(c.Z,{clientId:n,styleOptions:m,onSelectStyle:i,activeStyle:d,attributes:t,viewportWidth:500}),(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(u,e)))}},83830:function(e,t,n){"use strict";var r=n(51806),a=n(4981),o=n(65736),i=n(24381);const __=o.__;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:o,backgroundButtonColor:i,textButtonColor:s,customBackgroundButtonColor:c,customTextButtonColor:l,...u}=e,d={text:(p=e).submitButtonText||__("Schedule time with me","jetpack"),textColor:p.submitButtonTextColor||p.textButtonColor,customTextColor:p.customTextButtonColor,backgroundColor:p.submitButtonBackgroundColor||p.backgroundButtonColor,customBackgroundColor:p.customBackgroundButtonColor,url:p.url};var p;return[u,[(0,a.createBlock)("jetpack/button",{element:"a",uniqueId:"calendly-widget-id",...d})]]},save:e=>{let{attributes:{url:t}}=e;return(0,r.createElement)("a",{href:t},t)}}},29415:function(e,t,n){"use strict";var r=n(82674),a=n.n(r),o=n(51806),i=n(52175),s=n(4981),c=n(55609),l=n(9818),u=n(69307),d=n(65736),p=n(92819),m=n(4554),h=n(23621),g=n(81340),f=n(60153),b=n(70176),v=n(4867),k=n(50785);const __=d.__,_x=d._x;t.Z=(0,c.withNotices)((function(e){const{attributes:t,className:n,clientId:r,name:d,noticeOperations:y,noticeUI:w,setAttributes:E}=e,_=(0,s.getBlockDefaultClassName)(d),C=(0,m.S)(g.Z,t);(0,p.isEqual)(C,t)||E(C);const{backgroundColor:S,hideEventTypeDetails:j,primaryColor:x,textColor:P,style:N,url:L}=C,[T,A]=(0,u.useState)(L),[I,R]=(0,u.useState)(!1),[M,Z]=(0,u.useState)(!1),[B,D]=(0,u.useState)({}),F=()=>{y.removeAllNotices(),y.createErrorNotice(__("Your calendar couldn't be embedded. Please double check your URL or code.","jetpack"))};(0,u.useEffect)((()=>{L&&k.lR!==L&&"link"!==N&&(0,h.Z)(L,Z).catch((()=>{E({url:void 0}),F()}))}),[]);const z=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)})),D(t.buttonAttributes)}(0,h.Z)(t.url,Z).then((()=>{const e=(0,m.S)(g.Z,t);E(e),R(!1),y.removeAllNotices()})).catch((()=>{E({url:void 0}),F()}))}else F()},O=(0,o.createElement)("div",{className:"wp-block-embed is-loading"},(0,o.createElement)(c.Spinner,null),(0,o.createElement)("p",null,__("Embedding…","jetpack"))),U=(0,o.createElement)(c.Placeholder,{label:__("Calendly","jetpack"),instructions:__("Enter your Calendly web address or embed code below.","jetpack"),icon:b.Z,notices:w},(0,o.createElement)("form",{onSubmit:z},(0,o.createElement)("input",{type:"text",id:"embedCode",onChange:e=>A(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:T||"",className:"components-placeholder__input"}),(0,o.createElement)("div",null,(0,o.createElement)(c.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))),(0,o.createElement)("div",{className:`${_}-learn-more`},(0,o.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,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:`${_}-overlay`}),(0,o.createElement)("iframe",{src:(()=>{const e=new URLSearchParams({embed_domain:"wordpress.com",embed_type:"Inline",hide_event_type_details:j?1:0,background_color:S,primary_color:x,text_color:P});return`${L}?${e}`})(),width:"100%",height:"100%",frameBorder:"0","data-origwidth":"100%","data-origheight":"100%",title:"Calendly"})),V=(0,o.createElement)(i.InnerBlocks,{template:[[k.Ss.name,{...k.Ss.attributes,...B,passthroughAttributes:{url:"url"}}]],templateLock:"all"});if(M)return O;let G=n;return L&&!I&&(G+=` calendly-style-${N}`),(0,o.createElement)("div",{className:G},(0,o.createElement)(f.ZP,a()({},e,{defaultClassName:_,embedCode:T,isEditingUrl:I,parseEmbedCode:z,setEmbedCode:A,setIsEditingUrl:R})),L&&!I?"inline"===N?H:V:U)}))},52020:function(e,t,n){"use strict";var r=n(31985),a=n(50785);(0,r.Z)(a.u2,a.Xd)},70176:function(e,t,n){"use strict";var r=n(51806),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{height:"24",viewBox:"0 0 23 24",width:"23",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M19,1h-2.3v0c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v0H8.6v0c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v0H4C1.8,1,0,2.8,0,5 v15c0,2.2,1.8,4,4,4h15c2.2,0,4-1.8,4-4V5C23,2.8,21.2,1,19,1z M21,20c0,1.1-0.9,2-2,2H4c-1.1,0-2-0.9-2-2V5c0-1.1,0.9-2,2-2h2.6 v0.8c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1V3h6.1v0.8c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1V3H19c1.1,0,2,0.9,2,2V20z M13.9,14.8l1.4,1.4 c-0.9,0.9-2.1,1.3-3.5,1.3c-2.4,0-4.5-2.1-4.5-4.7s2.1-4.7,4.5-4.7c1.4,0,2.5,0.4,3.4,1.1L14,10.9c-0.5-0.4-1.2-0.6-2.1-0.6 c-1.2,0-2.5,1.1-2.5,2.7c0,1.6,1.3,2.7,2.5,2.7C12.7,15.5,13.4,15.3,13.9,14.8z"}))},50785:function(e,t,n){"use strict";n.d(t,{Ss:function(){return m},Xd:function(){return g},lR:function(){return p},u2:function(){return h}});var r=n(4981),a=n(65736),o=n(70355),i=n(81340),s=n(83830),c=n(29415),l=n(70176),u=n(15816),d=n(4867);const __=a.__,_x=a._x,p="https://calendly.com/wpcom/jetpack-block-example",m={name:"jetpack/button",attributes:{element:"a",text:__("Schedule time with me","jetpack"),uniqueId:"calendly-widget-id",url:p}},h="calendly",g={title:__("Calendly","jetpack"),description:__("Embed a calendar for customers to schedule appointments.","jetpack"),icon:{src:l.Z,foreground:(0,o.m)()},category:"grow",keywords:[_x("calendar","block search term","jetpack"),_x("schedule","block search term","jetpack"),_x("appointments","block search term","jetpack"),_x("events","block search term","jetpack"),_x("dates","block search term","jetpack")],supports:{align:!0,alignWide:!1,html:!1},edit:c.Z,save:u.Z,attributes:i.Z,example:{attributes:{hideEventTypeDetails:!1,style:"inline",url:p},innerBlocks:[m]},transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&d.mL.test(e.textContent),transform:e=>{const t=(0,d.CC)(e.textContent);return(0,r.createBlock)("jetpack/calendly",t)}}]},deprecated:[s.Z]}},15816:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806),a=n(52175);function o(){return(0,r.createElement)("div",null,(0,r.createElement)(a.InnerBlocks.Content,null))}},4867:function(e,t,n){"use strict";n.d(t,{CC:function(){return a},mL:function(){return r}});const r=/(^|\/\/)(calendly\.com[^"']*)/i,a=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),a=r.get("background_color"),o=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")),a&&a.match(s)&&(t.backgroundColor=a),o&&o.match(s)&&(t.primaryColor=o),i&&i.match(s)&&(t.textColor=i),t})(t),a=(e=>e.indexOf("data-url")>0?"inline":e.indexOf("initPopupWidget")>0||e.indexOf("initBadgeWidget")>0?"link":void 0)(e);if(a&&(n.style=a),"link"===a){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 a=(e=>{const t=e.match(/color: '([^']*?)'/);if(t)return t[1]})(e);a&&(n.buttonAttributes.backgroundColor=void 0,n.buttonAttributes.customBackgroundColor=a)}return n}},36553:function(e,t,n){"use strict";var r=n(51806),a=n(52175),o=n(55609),i=n(69307),s=n(65736),c=n(65235),l=n.n(c),u=n(35208);const __=s.__;class d 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:d,country:p,linkToGoogleMaps:m},isSelected:h,setAttributes:g}=this.props,f=[e,t,n,s,c,d,p].some((e=>""!==e)),b=l()({"jetpack-address-block":!0,"is-selected":h}),v=(0,r.createElement)(o.ToggleControl,{label:__("Link address to Google Maps","jetpack"),checked:m,onChange:e=>g({linkToGoogleMaps:e})});return(0,r.createElement)("div",{className:b},!h&&f&&(0,u.Z)(this.props),(h||!f)&&(0,r.createElement)(i.Fragment,null,(0,r.createElement)(a.PlainText,{value:e,placeholder:__("Street Address","jetpack"),"aria-label":__("Street Address","jetpack"),onChange:e=>g({address:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(a.PlainText,{value:t,placeholder:__("Address Line 2","jetpack"),"aria-label":__("Address Line 2","jetpack"),onChange:e=>g({addressLine2:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(a.PlainText,{value:n,placeholder:__("Address Line 3","jetpack"),"aria-label":__("Address Line 3","jetpack"),onChange:e=>g({addressLine3:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(a.PlainText,{value:s,placeholder:__("City","jetpack"),"aria-label":__("City","jetpack"),onChange:e=>g({city:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(a.PlainText,{value:c,placeholder:__("State/Province/Region","jetpack"),"aria-label":__("State/Province/Region","jetpack"),onChange:e=>g({region:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(a.PlainText,{value:d,placeholder:__("Postal/Zip Code","jetpack"),"aria-label":__("Postal/Zip Code","jetpack"),onChange:e=>g({postal:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(a.PlainText,{value:p,placeholder:__("Country","jetpack"),"aria-label":__("Country","jetpack"),onChange:e=>g({country:e}),onKeyDown:this.preventEnterKey}),v))}}t.Z=d},11005:function(e,t,n){"use strict";n.d(t,{X:function(){return d},u:function(){return u}});var r=n(51806),a=n(55609),o=n(69307),i=n(65736),s=n(36598),c=n(36553),l=n(35208);const __=i.__,_x=i._x,u="address",d={title:__("Address","jetpack"),description:__("Lets you add a physical address with Schema markup.","jetpack"),keywords:[_x("location","block search term","jetpack"),_x("direction","block search term","jetpack"),_x("place","block search term","jetpack")],icon:(0,s.Z)((0,r.createElement)(o.Fragment,null,(0,r.createElement)(a.Path,{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zM7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 2.88-2.88 7.19-5 9.88C9.92 16.21 7 11.85 7 9z"}),(0,r.createElement)(a.Circle,{cx:"12",cy:"9",r:"2.5"}))),category:"grow",attributes:{address:{type:"string",default:""},addressLine2:{type:"string",default:""},addressLine3:{type:"string",default:""},city:{type:"string",default:""},region:{type:"string",default:""},postal:{type:"string",default:""},country:{type:"string",default:""},linkToGoogleMaps:{type:"boolean",default:!1}},parent:["jetpack/contact-info"],edit:c.Z,save:l.Z}},35208:function(e,t,n){"use strict";var r=n(51806),a=n(69307),o=n(65736);const __=o.__,i=e=>{let{attributes:{address:t,addressLine2:n,addressLine3:o,city:i,region:s,postal:c,country:l}}=e;return(0,r.createElement)(a.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),o&&(0,r.createElement)("div",{className:"jetpack-address__address jetpack-address__address3"},o),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:a,region:o,postal:i,country:s}}=e;let c=o?`+${o},`:"";c=i?`${c}+${i}`:c;return`https://www.google.com/maps/search/${t?`${t},`:""}${n?`${n},`:""}${r?`${r},`:""}${a?`+${a},`:""}${c}${s?`+${s}`:""}`.replace(" ","+")};t.Z=e=>(e=>{let{address:t,addressLine2:n,addressLine3:r,city:a,region:o,postal:i,country:s}=e;return[t,n,r,a,o,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),a=n(52175),o=n(65235),i=n.n(o);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)(a.InnerBlocks,{allowedBlocks:s,templateLock:!1,template:c}))}},82566:function(e,t,n){"use strict";var r=n(31985),a=n(64446);(0,r.Z)(a.u2,a.Xd,a.Nk)},31336:function(e,t,n){"use strict";var r=n(65736),a=n(66425),o=n(90458);const __=r.__;t.Z=e=>{const{setAttributes:t}=e;return(0,a.Z)("email",e,__("Email","jetpack"),o.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),a=n(55609),o=n(65736),i=n(36598),s=n(31336),c=n(90458);const __=o.__,_x=o._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)(a.Path,{d:"M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0l-8 5-8-5h16zm0 12H4V8l8 5 8-5v10z"})),category:"grow",attributes:{email:{type:"string",default:""}},edit:s.Z,save:c.Z,parent:["jetpack/contact-info"]}},90458:function(e,t,n){"use strict";var r=n(51806),a=n(69307),o=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("@")&&o.validate(n)?e===n?(0,r.createElement)("a",{href:`mailto:${e}`,key:t},e):(0,r.createElement)(a.Fragment,{key:t},(0,r.createElement)("a",{href:`mailto:${e}`,key:t},n),(0,r.createElement)(a.Fragment,null,e.slice(-(e.length-n.length)))):(0,r.createElement)(a.Fragment,{key:t},e)})))}},64446:function(e,t,n){"use strict";n.d(t,{Nk:function(){return b},Xd:function(){return f},u2:function(){return h}});var r=n(51806),a=n(52175),o=n(4981),i=n(55609),s=n(65736),c=n(70355),l=n(36598),u=n(11005),d=n(83238),p=n(99804),m=n(52398);const __=s.__,_x=s._x,h="contact-info",g=(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"})),f={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:g,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,o.createBlock)("core/heading",{content:t.raw.title}),(0,o.createBlock)("jetpack/email",{email:t.raw.email}),(0,o.createBlock)("jetpack/phone",{phone:t.raw.phone}),(0,o.createBlock)("jetpack/address",{address:t.raw.address})];return t.raw.hours&&(n=[...n,(0,o.createBlock)("core/paragraph",{content:t.raw.hours})]),t.raw.showmap&&t.raw.address&&(n=[...n,(0,o.createBlock)("jetpack/map",{address:t.raw.address})]),(0,o.createBlock)("jetpack/contact-info",{},n)}}]},attributes:{},edit:d.Z,save:e=>{let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(a.InnerBlocks.Content,null))},example:{attributes:{},innerBlocks:[{name:"jetpack/email",attributes:{email:"hello@yourjetpack.blog"}},{name:"jetpack/phone",attributes:{phone:"123-456-7890"}},{name:"jetpack/address",attributes:{address:"987 Photon Drive",city:"Speedyville",region:"CA",postal:"12345",country:"USA"}}]}},b=[{name:u.u,settings:u.X},{name:p.u,settings:p.X},{name:m.u,settings:m.X}]},70835:function(e,t,n){"use strict";var r=n(65736),a=n(66425),o=n(21621);const __=r.__;t.Z=e=>{const{setAttributes:t}=e;return(0,a.Z)("phone",e,__("Phone number","jetpack"),o.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),a=n(55609),o=n(65736),i=n(36598),s=n(70835),c=n(21621);const __=o.__,_x=o._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)(a.Path,{d:"M6.54 5c.06.89.21 1.76.45 2.59l-1.2 1.2c-.41-1.2-.67-2.47-.76-3.79h1.51m9.86 12.02c.85.24 1.72.39 2.6.45v1.49c-1.32-.09-2.59-.35-3.8-.75l1.2-1.19M7.5 3H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.49c0-.55-.45-1-1-1-1.24 0-2.45-.2-3.57-.57-.1-.04-.21-.05-.31-.05-.26 0-.51.1-.71.29l-2.2 2.2c-2.83-1.45-5.15-3.76-6.59-6.59l2.2-2.2c.28-.28.36-.67.25-1.02C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1z"})),category:"grow",attributes:{phone:{type:"string",default:""}},parent:["jetpack/contact-info"],edit: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 a=n?e.substring(n-1):e,o=n?e.substring(0,n):"",i=a.replace(/\D/g,"");return/[0-9/+/(]/.test(a[0])?(o=o.slice(0,-1),"+"===a[0]&&(i="+"+i)):a=a.substring(1),[o.trim()?(0,r.createElement)("span",{key:"phonePrefix",className:"phone-prefix"},o):null,(0,r.createElement)("a",{key:"phoneNumber",href:`tel:${i}`},a)]}(t))}},1699:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={text:{type:"string",source:"html",selector:"p",default:__('Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use. To find out more, including how to control cookies, see here: <a href="https://automattic.com/cookies/">Cookie Policy</a>.',"jetpack")},style:{type:"object",default:{color:{text:"var(--wp--preset--color--contrast)",background:"var(--wp--preset--color--tertiary)",link:"var(--wp--preset--color--contrast)"},spacing:{padding:{top:"1em",right:"1em",bottom:"1em",left:"1em"}}}},align:{type:"string",default:"wide"},consentExpiryDays:{type:"integer",default:365},showOverlay:{type:"boolean",default:!1}}},20598:function(e,t,n){"use strict";var r=n(82674),a=n.n(r),o=n(51806),i=n(52175),s=n(55609),c=n(65736),l=n(89626);const __=c.__;t.Z=function(e){let{clientId:t,attributes:n,setAttributes:r}=e;const{consentExpiryDays:u,align:d,text:p}=n;(0,l.N)(t);const m=(0,i.useBlockProps)({className:`wp-block-jetpack-cookie-consent align${d}`});return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(i.InspectorControls,null,(0,o.createElement)(s.PanelBody,{title:__("Block Settings","jetpack")},(0,o.createElement)(s.SelectControl,{label:__("Alignment","jetpack"),value:d,options:[{label:(0,c.isRTL)()?__("Right","jetpack"):__("Left","jetpack"),value:"left"},{label:__("Full","jetpack"),value:"full"},{label:__("Wide","jetpack"),value:"wide"},{label:(0,c.isRTL)()?__("Left","jetpack"):__("Right","jetpack"),value:"right"}],onChange:e=>function(e){const t=["wide","full"].includes(e)?{width:void 0,height:void 0}:{};r({...t,align:e})}(e)}),(0,o.createElement)(s.TextControl,{label:__("Consent Expiry Time (in days)","jetpack"),value:u,type:"number",min:"1",max:"365",onChange:e=>r({consentExpiryDays:parseInt(e)})}),(0,o.createElement)("p",null,__("Note: The block position in the editor is not indicative of the position on the front end. The block will always be positioned at the bottom of the page.","jetpack")))),(0,o.createElement)("div",a()({},m,{style:m.style}),(0,o.createElement)(i.RichText,{tagName:"p",value:p,onChange:e=>r({text:e})}),(0,o.createElement)(i.InnerBlocks,{allowedBlocks:["core/button"],template:[["core/button",{text:__("Accept","jetpack")}]],templateLock:"all"})))}},54271:function(e,t,n){"use strict";var r=n(31985),a=n(68830);(0,r.Z)(a.u2,a.Xd)},16449:function(e,t,n){"use strict";var r=n(51806),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{height:"24",viewBox:"0 0 25 25",width:"24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{stroke:"currentColor",fill:"white",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4.419 12c0-6.4 5.358-8 8.037-8h1.005v4h3.014v3h4.019v1c0 6.4-5.024 8-8.038 8-3.014 0-8.037-1.6-8.037-8zm5.023-4h.001m-2.01 4h0m5.023 1h.001m-2.01 3h0m6.028-1h0"}))},68830:function(e,t,n){"use strict";n.d(t,{Xd:function(){return u},u2:function(){return l}});var r=n(65736),a=n(70355),o=n(1699),i=n(20598),s=n(16449),c=n(92097);const __=r.__,l="cookie-consent",u={title:__("Cookie Consent","jetpack"),description:__("Display a customizable cookie consent banner. To display this block on all pages of your site, please add it inside a Template Part that is present on all your templates, like a Header or a Footer.","jetpack"),icon:{src:s.Z,foreground:(0,a.m)()},category:"grow",keywords:["cookie","consent","privacy","GDPR","EU",__("cookies","jetpack"),__("privacy","jetpack"),__("EU","jetpack")],supports:{align:["left","right","wide","full"],alignWide:!0,anchor:!1,color:{gradients:!0,link:!0},spacing:{padding:!0},customClassName:!0,className:!0,html:!1,lock:!1,multiple:!1,reusable:!1},edit:i.Z,save:c.Z,attributes:o.Z,example:{attributes:{}}}},92097:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(82674),a=n.n(r),o=n(51806),i=n(52175);function s(e){let{attributes:t}=e;const n=i.useBlockProps.save();return(0,o.createElement)("div",a()({},n,{style:n.style,role:"dialog","aria-modal":"true"}),(0,o.createElement)(i.RichText.Content,{tagName:"p",value:t.text}),(0,o.createElement)(i.InnerBlocks.Content,null),(0,o.createElement)("span",null,t.consentExpiryDays))}},89626:function(e,t,n){"use strict";n.d(t,{N:function(){return c}});var r=n(4981),a=n(94333),o=n(37798),i=n(9818),s=n(69307);function c(e){const t=(0,i.useSelect)((e=>{const{isSavingPost:t,isSavingNonPostEntityChanges:n}=e("core/editor");return t()||n()}),[]),n=!(!(0,a.usePrevious)(t)||t),[,c]=(0,o.useEntityProp)("root","site","cookie_consent_template"),{saveEditedEntityRecord:l}=(0,i.useDispatch)(o.store),[u,d]=(0,s.useState)(!1),p=(0,i.useSelect)((e=>{const{getBlock:t}=e("core/block-editor");return t})),m=(0,s.useCallback)((e=>{d(!0),c(e),l("root","site",void 0,{cookie_consent_template:e}).finally((()=>{d(!1)}))}),[d,c,l]);(0,s.useEffect)((()=>()=>{p(e)||m(null)}),[]),(0,s.useEffect)((()=>{n&&!u&&m((0,r.serialize)([p(e)]))}),[n,u,m,p,e])}},29161:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(51806),a=n(36222),o=n(52175),i=n(55609),s=n(69307),c=n(65736);const __=c.__;function l(e){let{src:t,state:n}=e;return t?"inactive"!==n?null:(0,r.createElement)("audio",{controls:!0,src:t}):null}function u(){const{state:e,start:t,pause:n,stop:c,resume:u,url:d}=(0,a._T)({onDone:e=>{console.log("Blob created: ",e)}}),p=(0,s.useCallback)((()=>{"inactive"===e?t(1e3):"recording"===e?n():"paused"===e&&u()}),[e,t,n,u]);let m=__("Begin recording","jetpack");"recording"===e?m=__("Pause recording","jetpack"):"paused"===e&&(m=__("Resume recording","jetpack"));const h=(0,o.useBlockProps)();return(0,r.createElement)("div",h,(0,r.createElement)(i.Placeholder,{icon:"microphone",label:"AI: Create with voice",instructions:__("Transform your spoken words into publish-ready blocks with AI","jetpack"),className:"jetpack-ai-create-with-voice"},(0,r.createElement)("div",{className:"jetpack-ai-create-with-voice__player"},(0,r.createElement)("strong",null,(0,r.createElement)(a.ZK,{url:d})),(0,r.createElement)(l,{state:e,src:d})),(0,r.createElement)("div",{className:"jetpack-ai-create-with-voice__recorder"},(0,r.createElement)(i.Button,{className:"jetpack-ai-create-with-voice__record-button",icon:"recording"===e?a.Qr:a.Qf,iconPosition:"right",variant:"primary",onClick:p},m),(0,r.createElement)(i.Button,{className:"jetpack-ai-create-with-voice__done-button",variant:"primary",onClick:c,disabled:"inactive"===e},__("Done","jetpack")))))}},49342:function(e,t,n){"use strict";var r=n(31985),a=n(35982),o=n(29161);(0,r.S)(a,{edit:o.Z,save:()=>null})},10764:function(e,t,n){"use strict";var r=n(51806),a=n(25607),o=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:d=!1,label:p="",onChange:m=null,value:h=""}=e;const[g,f]=(0,s.useState)((0,a.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(f(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),g||E((0,a.ZP)(c,n,{symbol:""}))};return e.addEventListener("blur",t),()=>{e.removeEventListener("blur",t)}}),[n,c,g,w,E]),(0,s.useEffect)((()=>{b||k||f((0,a.ZP)(h,n,{symbol:""}))}),[n,b,k,E,h]),(0,s.useEffect)((()=>{E((0,a.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:_},o.M[n].symbol,d?(0,r.createElement)("div",{className:"donations__amount-value"},(0,a.ZP)(h||c,n,{symbol:""})):(0,r.createElement)(i.RichText,{allowedFormats:[],"aria-label":p,multiline:!1,onChange:e=>E(e),placeholder:(0,a.ZP)(c,n,{symbol:""}),ref:w,value:g,withoutInteractiveFormatting:!0}))}},82275:function(e,t,n){"use strict";var r=n(51806),a=n(43317),o=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:d,monthlyDonation:p,annualDonation:m,showCustomAmount:h}=t,g=(e,r)=>{const a={"1 month":"monthlyDonation","1 year":"annualDonation"}[e],o=t[a];n({[a]:{...o,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+" - "+a.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:{...d,amounts:t},monthlyDonation:{...p,amounts:t},annualDonation:{...m,amounts:t}})})(e),t()},key:`jetpack-donations-currency-${e}`},e+" - "+a.M[e].symbol))))}}))))),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(s.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(s.ToggleControl,{checked:p.show,onChange:e=>g("1 month",e),label:__("Show monthly donations","jetpack")}),(0,r.createElement)(s.ToggleControl,{checked:m.show,onChange:e=>g("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,o.lQ)()}`},__("View donation earnings","jetpack")))))}},853:function(e,t,n){"use strict";var r=n(51806),a=n(25607),o=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:d,chooseAmountText:p,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:p}),(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,a.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,a.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,a.ZP)(e,n))))),d&&(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"},o.M[n].symbol,(0,r.createElement)("div",{className:"donations__amount-value","data-currency":n,"data-empty-text":(0,a.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),a=n.n(r),o=n(51806),i=n(45033),s=n(9818),c=n(69307),l=n(65736),u=n(79162),d=n(74251),p=n(23267),m=n(21789),h=n(85731),g=n(24177),f=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)(p.G4);(0,c.useEffect)((()=>{r({fallbackLinkUrl:_.link})}),[_.link,r]);const j=(0,s.useSelect)((e=>e(p.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:a,interval:o}=t;return r===l&&"donation"===a&&(e[o]=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,d.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,o.createElement)(g.Z,{className:n,error:b}):l?(0,o.createElement)(f.Z,a()({},e,{products:k})):(0,o.createElement)(i.Z,null)}},67140:function(e,t,n){"use strict";var r=n(31985),a=n(29800);(0,r.Z)(a.u2,a.Xd)},21789:function(e,t,n){"use strict";var r=n(86989),a=n.n(r);t.Z=async e=>{try{return await a()({path:"/wpcom/v2/memberships/products",method:"POST",data:{type:"donation",currency:e,is_editable:!1}})}catch(e){return Promise.reject(e.message)}}},85731:function(e,t,n){"use strict";var r=n(86989),a=n.n(r),o=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,o.addQueryArgs)("/wpcom/v2/memberships/status",{source:"https://wordpress.com"===t.get("origin")?"gutenberg-wpcom":"gutenberg",...e&&{type:e},is_editable:!1});try{return await a()({path: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),a=n(81427),o=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:a.K9,category:"earn",keywords:[_x("charity","block search term","jetpack"),_x("contribution","block search term","jetpack"),_x("credit card","block search term","jetpack"),_x("debit card","block search term","jetpack"),_x("donate","block search term","jetpack"),_x("earn","block search term","jetpack"),_x("ecommerce","block search term","jetpack"),_x("fundraising","block search term","jetpack"),_x("fundraiser","block search term","jetpack"),"gofundme",_x("money","block search term","jetpack"),_x("nonprofit","block search term","jetpack"),_x("non-profit","block search term","jetpack"),_x("paid","block search term","jetpack"),"patreon",_x("pay","block search term","jetpack"),_x("payments","block search term","jetpack"),_x("recurring","block search term","jetpack"),"stripe",_x("sponsor","block search term","jetpack"),"square",_x("tipping","block search term","jetpack"),"venmo"],supports:{html:!1},edit:i.Z,save:s.Z,example:{},deprecated:[o.Z]}},24177:function(e,t,n){"use strict";var r=n(51806),a=n(55609),o=n(65736);const __=o.__;t.Z=e=>{let{className:t,error:n}=e;return(0,r.createElement)(a.Placeholder,{icon:"lock",label:__("Donations","jetpack"),instructions:n,className:t})}},75314:function(e,t,n){"use strict";var r=n(51806),a=n(52175);t.Z=e=>{let{attributes:t}=e;const{fallbackLinkUrl:n,oneTimeDonation:o,monthlyDonation:i,annualDonation:s}=t;return o&&o.show&&o.planId&&-1!==o.planId?(0,r.createElement)("div",null,(0,r.createElement)(a.RichText.Content,{tagName:"h4",value:o.heading}),(0,r.createElement)(a.RichText.Content,{tagName:"p",value:o.extraText}),(0,r.createElement)(a.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:n,rel:"noopener noreferrer noamphtml",target:"_blank",value:o.buttonText}),i.show&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("hr",{className:"donations__separator"}),(0,r.createElement)(a.RichText.Content,{tagName:"h4",value:i.heading}),(0,r.createElement)(a.RichText.Content,{tagName:"p",value:i.extraText}),(0,r.createElement)(a.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)(a.RichText.Content,{tagName:"h4",value:s.heading}),(0,r.createElement)(a.RichText.Content,{tagName:"p",value:s.extraText}),(0,r.createElement)(a.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),a=n(52175),o=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:d,monthlyDonation:p,annualDonation:m,showCustomAmount:h,chooseAmountText:g,customAmountText:f}=n,b={"one-time":"oneTimeDonation","1 month":"monthlyDonation","1 year":"annualDonation"},v=e=>n[b[t]][e],k=(e,r)=>{const a=b[t],o=n[a];l({[a]:{...o,[e]:r}})},y=(0,s.li)(u),w=v("amounts"),E=(0,o.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)(a.RichText,{tagName:"h4",placeholder:__("Write a message…","jetpack"),value:v("heading"),onChange:e=>k("heading",e)}),(0,r.createElement)(a.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:g,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)(a.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:f,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)(a.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)(a.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:{...d,buttonText:t},monthlyDonation:{...p,buttonText:t},annualDonation:{...m,buttonText:t}});var t},allowedFormats:E})))}},72833:function(e,t,n){"use strict";var r=n(51806),a=n(69307),o=n(65736),i=n(65235),s=n.n(i),c=n(16367),l=n(82275),u=n(91757);const __=o.__;t.Z=e=>{const{attributes:t,className:n,products:o,setAttributes:i}=e,{oneTimeDonation:d,monthlyDonation:p,annualDonation:m}=t,[h,g]=(0,a.useState)("one-time"),f=(0,a.useCallback)((e=>h===e),[h]),b={"one-time":{title:__("One-Time","jetpack")},...p.show&&{"1 month":{title:__("Monthly","jetpack")}},...m.show&&{"1 year":{title:__("Yearly","jetpack")}}};return(0,a.useEffect)((()=>{d.planId===o["one-time"]&&p.planId===o["1 month"]&&m.planId===o["1 year"]||i({...o["one-time"]&&{oneTimeDonation:{...d,planId:o["one-time"]}},...o["1 month"]&&{monthlyDonation:{...p,planId:o["1 month"]}},...o["1 year"]&&{annualDonation:{...m,planId:o["1 year"]}}})}),[d,p,m,i,o]),(0,a.useEffect)((()=>{!p.show&&f("1 month")&&g("one-time"),!m.show&&f("1 year")&&g("one-time")}),[p,m,g,f]),(0,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":f(t)}),onClick:()=>g(t),onKeyDown:()=>g(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),a=n(55609),o=n(65736);const __=o.__,i=e=>{let{setEditingUrl:t}=e;return(0,r.createElement)(a.ToolbarGroup,null,(0,r.createElement)(a.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),a=n(52175),o=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 a={...(0,l.omit)(e,["useModal",...u]),className:t&&t.replace("is-style-outline",""),style:r},i=(0,l.pick)(e,u);return[a,[(0,o.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:o,url:i,style:s}=t;if(n)return o||"modal"===s?function(e){const{backgroundColor:t,borderRadius:n,customBackgroundColor:o,customTextColor:i,eventId:s,text:l,textColor:u,url:d}=e,p=(0,a.getColorClassName)("color",u),m=(0,a.getColorClassName)("background-color",t),h=c()("wp-block-button__link",{"has-text-color":u||i,[p]:p,"has-background":t||o,[m]:m,"no-border-radius":0===n}),g={backgroundColor:m?void 0:o,color:p?void 0:i,borderRadius:n?n+"px":void 0};return(0,r.createElement)("div",{className:"wp-block-button"},(0,r.createElement)(a.RichText.Content,{className:h,href:d,id:`eventbrite-widget-${s}`,rel:"noopener noreferrer",role:"button",style:g,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),a=n(13419),o=n(52175),i=n(55609),s=n(69307),c=n(65736),l=n(57538),u=n(4554),d=n(23621),p=n(2785),m=n(6949),h=n(8964),g=n(77825),f=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:a}=t;if(!e||f.Q7===e||"modal"===a)return;const o=(0,g.Ve)(e);if(o){const t={eventId:o,url:e};(0,d.Z)(t.url,this.setIsResolvingUrl).then((e=>{const a=(0,u.S)(p.Z,{...t,url:e});r(a),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,g.N3)(n,t)},_x("Convert block to link","button label","jetpack"))))};submitForm=e=>{e&&e.preventDefault(),this.setUrl((0,g.qq)(this.state.editedUrl)),this.setState({editingUrl:!1})};cannotEmbed=()=>{const{url:e}=this.props.attributes,{isResolvingUrl:t}=this.state;return!t&&e&&!f.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:a}=this.props,o=[{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:o,onSelectStyle:a,activeStyle:e,attributes:t,viewportWidth:130})}renderEditEmbed(){const{className:e,noticeUI:t}=this.props,{editedUrl:n}=this.state,o=(0,a.Wp)()||(0,a.Ug)()?"http://support.wordpress.com/wordpress-editor/blocks/eventbrite-block/":"https://jetpack.com/support/jetpack-blocks/eventbrite-block/";return(0,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:f.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:o},__("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}`,a=`\n\t\t\t<script src="https://www.eventbrite.com/static/widgets/eb_widgets.js"><\/script>\n\t\t\t<style>\n\t\t\t\t/* Prevent scrollbar on the embed preview */\n\t\t\t\tbody {\n\t\t\t\t\toverflow: hidden;\n\t\t\t\t}\n\t\t\t\t/* Eventbrite embeds have a CSS height transition on loading, which causes <Sandbox>\n\t\t\t\tto not recognise the resizing. We need to disable that transition. */\n\t\t\t\t* {\n\t\t\t\t\ttransition: none !important;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<script>\n\t\t\t\twindow.EBWidgets.createWidget({\n\t\t\t\t\twidgetType: 'checkout',\n\t\t\t\t\teventId: ${t},\n\t\t\t\t\tiframeContainerId: '${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:a}),(0,r.createElement)("div",{className:"block-library-embed__interactive-overlay"}))}render(){const{attributes:e}=this.props,{url:t,style:n}=e,{editingUrl:a,isResolvingUrl:i}=this.state;return i?this.renderLoading():a||!t||this.cannotEmbed()?this.renderEditEmbed():(0,r.createElement)(r.Fragment,null,this.renderInspectorControls(),(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(m.J,{setEditingUrl:this.setEditingUrl})),"modal"===n?(0,r.createElement)(o.InnerBlocks,{template:[[f.Ss.name,f.Ss.attributes]],templateLock:"all"}):this.renderInlinePreview())}}t.Z=(0,i.withNotices)(b)},83772:function(e,t,n){"use strict";var r=n(31985),a=n(75334);(0,r.Z)(a.u2,a.Xd)},75334:function(e,t,n){"use strict";n.d(t,{Q7:function(){return g},Ss:function(){return p},Wh:function(){return m},Xd:function(){return k},qv:function(){return v},u2:function(){return f}});var r=n(51806),a=n(4981),o=n(55609),i=n(65736),s=n(70355),c=n(2785),l=n(1344),u=n(16078),d=n(86435);const __=i.__,_x=i._x,p={name:"jetpack/button",attributes:{element:"a",text:_x("Register","verb: e.g. register for an event.","jetpack"),uniqueId:"eventbrite-widget-id"}},m=/^\s*https?:\/\/(?:www\.)?(?:eventbrite\.[a-z.]+)\/e\/[^\/]*?(\d+)\/?(?:\?[^\/]*)?\s*$/i,h=/^\s*https?:\/\/(?:.+\.)?(?:eventbrite\.[a-z.]+)\/?(?:\?[^\/]*)?\s*$/i,g="https://www.eventbrite.com/e/test-event-tickets-123456789",f="eventbrite",b=__("Eventbrite Checkout","jetpack"),v=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,r.createElement)(o.G,{id:"eventbrite-icon"},(0,r.createElement)(o.Path,{d:"M18.041,3.931L5.959,3C4.325,3,3,4.325,3,5.959v12.083C3,19.675,4.325,21,5.959,21l12.083-0.931C19.699,19.983,21,18.744,21,17.11V6.89C21,5.256,19.741,4.027,18.041,3.931zM16.933,8.17c-0.082,0.215-0.192,0.432-0.378,0.551c-0.188,0.122-0.489,0.132-0.799,0.132c-1.521,0-3.062-0.048-4.607-0.048c-0.152,0.708-0.304,1.416-0.451,2.128c0.932-0.004,1.873,0.005,2.81,0.005c0.726,0,1.462-0.069,1.586,0.525c0.04,0.189-0.001,0.426-0.052,0.615c-0.105,0.38-0.258,0.676-0.625,0.783c-0.185,0.054-0.408,0.058-0.646,0.058c-1.145,0-2.345,0.017-3.493,0.02c-0.169,0.772-0.328,1.553-0.489,2.333c1.57-0.005,3.067-0.041,4.633-0.058c0.627-0.007,1.085,0.194,1.009,0.85c-0.031,0.262-0.098,0.497-0.211,0.725c-0.102,0.208-0.248,0.376-0.488,0.452c-0.237,0.075-0.541,0.064-0.862,0.078c-0.304,0.014-0.614,0.008-0.924,0.016c-0.309,0.009-0.619,0.022-0.919,0.022c-1.253,0-2.429,0.08-3.683,0.073c-0.603-0.004-1.014-0.249-1.124-0.757c-0.059-0.273-0.018-0.58,0.036-0.841c0.541-2.592,1.083-5.176,1.629-7.763c0.056-0.265,0.114-0.511,0.225-0.714C9.279,7.051,9.534,6.834,9.9,6.735c0.368-0.099,0.883-0.047,1.344-0.047c0.305,0,0.612,0.008,0.914,0.016c0.925,0.026,1.817,0.03,2.747,0.053c0.304,0.007,0.615,0.016,0.915,0.016c0.621,0,1.17,0.073,1.245,0.614C17.104,7.675,17.014,7.954,16.933,8.17z"}))),k={title:b,description:__("Embed Eventbrite event details and ticket checkout.","jetpack"),icon:{src:v,foreground:(0,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:d.Z,transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&(m.test(e.textContent)||h.test(e.textContent)),transform:e=>(0,a.createBlock)("jetpack/eventbrite",{url:e.textContent.trim()})}]},example:{attributes:{url:g,eventId:123456789,style:"modal"},innerBlocks:[p]},deprecated:l.Z}},86435:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806),a=n(52175);function o(e){let{attributes:t}=e;const{eventId:n,style:o,url:i}=t;if(n)return"modal"===o?(0,r.createElement)("div",null,(0,r.createElement)(a.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),a=n(4981),o=n(69307);function i(e,t){const n=(0,r.createElement)("a",{href:e},e);t((0,a.createBlock)("core/paragraph",{content:(0,o.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}},56071:function(e,t,n){"use strict";var r=n(51806),a=n(52175),o=n(55609),i=n(92694),s=n(65736),c=n(13306);const __=s.__,l=e=>{if(e.isDeprecation)return e;if("core/embed"!==e.name)return e;const{edit:t}=e;return{...e,edit:(0,o.withNotices)((e=>{const{noticeOperations:n,noticeUI:i,onReplace:s}=e,{url:l}=e.attributes,{isGatheringStorm:u,unleashStorm:d}=(0,c.Z)({onReplace:s});return"twitter"!==e.attributes.providerNameSlug?(0,r.createElement)(t,e):(0,r.createElement)(r.Fragment,null,i,(0,r.createElement)(a.BlockControls,null,(0,r.createElement)(o.ToolbarGroup,{className:"gathering-tweetstorms__embed-toolbar"},(0,r.createElement)(o.ToolbarButton,{className:"gathering-tweetstorms__embed-toolbar-button",onClick:()=>d(l,n),label:__("Import the entire Twitter thread directly into this post.","jetpack"),showTooltip:!0,disabled:u||!l},__("Unroll","jetpack")),u&&(0,r.createElement)(o.ToolbarItem,{as:o.Spinner}))),(0,r.createElement)(t,e))}))}};(0,i.addFilter)("blocks.registerBlockType","jetpack/gathering-tweetstorms",l)},13306:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(86989),a=n.n(r),o=n(4981),i=n(9818),s=n(69307),c=n(65736),l=n(96483),u=n(92819);const __=c.__;function d(e){let{onReplace:t}=e;const[n,r]=(0,s.useState)(!1),c=(0,i.useSelect)((e=>e("core/editor").getEditedPostAttribute("jetpack_publicize_connections")));return{isGatheringStorm:n,unleashStorm:(e,n)=>{if((0,u.isEmpty)(e))return;const s=e.match(/^https?:\/\/(?:www\.)?twitter\.com\/([^/]+)\/status\/\d+/);if((0,u.isEmpty)(s))return;const d=s[1];n.removeAllNotices(),r(!0),a()({path:(0,l.addQueryArgs)("/wpcom/v2/tweetstorm/gather",{url:e})}).then((e=>{if(r(!1),!(0,u.isArray)(e))return void n.createErrorNotice(__("An error occurred. Please try again later.","jetpack"));if((0,u.isEmpty)(e))return void n.createErrorNotice(__("We were unable to get any content from this tweet.","jetpack"));t(e.map((e=>{switch(e.type){case"paragraph":return(0,o.createBlock)("core/paragraph",{content:e.content});case"gallery":return(0,o.createBlock)("core/gallery",{images:e.images});case"image":return(0,o.createBlock)("core/image",{url:e.url,alt:e.alt});case"video":return(0,o.createBlock)("core/video",{src:e.url,caption:e.alt});case"embed":return(0,o.createBlock)("core/embed",{url:e.url})}})));(0,u.some)(c,(e=>"twitter"===e.service_name&&`@${d}`===e.display_name))||(0,i.dispatch)("core/notices").createWarningNotice(__("We were unable to verify that this Twitter thread was published on a Twitter account belonging to you. Please ensure you have permission to reproduce it before publishing.","jetpack")),(0,i.dispatch)("core/notices").createSuccessNotice(__("Twitter thread successfully imported","jetpack"),{type:"snackbar"})})).catch((e=>{r(!1),n.createErrorNotice(e.message)}))}}}},12084:function(e,t,n){"use strict";var r=n(51806),a=n(55609),o=n(69307),i=n(65736);const __=i.__;t.Z=(0,o.forwardRef)((function(e,t){let{onSubmit:n,onChange:o,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:o,ref:t,"aria-labelledby":"wp-block-jetpack-gif_search-button"}),(0,r.createElement)(a.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),a=n(52175),o=n(55609);function i(){return(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(o.PanelBody,{className:"components-panel__body-gif-branding"},(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 202 22"},(0,r.createElement)(o.Path,{d:"M4.6 5.9H0v10h1.6v-3.1h3c4.8 0 4.8-6.9 0-6.9zm0 5.4h-3v-4h3c2.6.1 2.6 4 0 4zM51.2 12.3c2-.3 2.7-1.7 2.7-3.1 0-1.7-1.2-3.3-3.5-3.3h-4.6v10h1.6v-3.4h2.1l3 3.4h1.9l-.2-.3-3-3.3zM47.4 11V7.4h3c1.3 0 1.9.9 1.9 1.8s-.6 1.8-1.9 1.8h-3zM30.6 13.6L28 5.9h-1.1l-2.5 7.7-2.6-7.7H20l3.7 10H25l1.4-3.5L27.5 9l1.1 3.4 1.3 3.5h1.4l3.5-10h-1.7z"}),(0,r.createElement)(o.Path,{d:"M14.4 5.7c-3 0-5.1 2.2-5.1 5.2 0 2.6 1.6 5.1 5.1 5.1 3.5 0 5.1-2.5 5.1-5.2-.1-2.6-1.7-5.1-5.1-5.1zm-.1 8.9c-2.5 0-3.5-1.9-3.5-3.7 0-2.2 1.2-3.8 3.5-3.8 2.4 0 3.5 2 3.5 3.8.1 2-1 3.7-3.5 3.7zM57.7 11.6h5.5v-1.5h-5.5V7.4h5.7V5.9h-7.3v10h7.3v-1.6h-5.7zM38 14.3v-2.7h5.5v-1.5H38V7.4h5.7V5.9h-7.3v10h7.3v-1.6zM93 10.3l-2.7-4.4h-1.9V6l3.8 5.8v4.1h1.6v-4.1l4-5.8v-.1h-2zM69.3 5.9h-3.8v10h3.8c3.5 0 5.1-2.5 5-5.1-.1-2.5-1.6-4.9-5-4.9zm0 8.4h-2.2V7.4h2.2c2.3 0 3.4 1.7 3.4 3.4s-1 3.5-3.4 3.5zM86.3 10.7c.9-.4 1.4-1.1 1.4-2 0-2-1.5-2.8-3.4-2.8h-4.6v10h4.6c2 0 3.7-.7 3.7-2.8 0-.8-.5-2-1.7-2.4zm-5-3.4h3c1.2 0 1.8.7 1.8 1.4 0 .8-.6 1.3-1.8 1.3h-3V7.3zm3 7.1h-3v-2.9h3c.9 0 2.1.5 2.1 1.6 0 1-1.2 1.3-2.1 1.3zM113.9 13.3h5.3V16c-1.2.9-2.9 1.1-4 1.1-4.2 0-5.6-3.3-5.6-6 0-4.1 2.2-6.1 5.6-6.1 1.4 0 3.2.4 4.8 1.8l3.4-3.4C120.7.6 118.1 0 115.2 0c-7.8 0-11.4 5.6-11.4 11s3.1 10.9 11.4 10.9c4 0 7.6-1.4 8.9-4.1V8.6h-10.2v4.7zM171.9 8.5h-7.4V.6h-5.9v20.8h5.9v-7.8h7.4v7.8h5.9V.6h-5.9zM195.1.6l-4.5 7.1-4.3-7.1h-6.6v.2l7.9 12.3v8.3h5.9v-8.3L201.8.9V.6zM127.4.6h5.9v20.8h-5.9zM147.6.6h-10.1v20.8h5.9v-5.6h4.2c5.6-.1 8.3-3.4 8.3-7.6.1-4.1-2.7-7.6-8.3-7.6zm0 10.2h-4.2V5.6h4.2c1.6 0 2.5 1.2 2.5 2.6 0 1.4-.9 2.6-2.5 2.6z"}))))}},61266:function(e,t,n){"use strict";var r=n(51806),a=n(52175),o=n(55609),i=n(69307),s=n(65736),c=n(65235),l=n.n(c),u=n(12084),d=n(57852),p=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:g,caption:f,giphyUrl:b,searchText:v,paddingTop:k}=t,y=l()(s,`align${g}`),[w,E]=(0,i.useState)(!1),_=(0,i.createRef)(),{isFetching:C,giphyData:S,fetchGiphyData:j}=(0,p.Z)(),x=()=>{_.current.focus(),E(!1)};(0,i.useEffect)((()=>{S&&S[0]&&n((0,m.ix)(S[0]))}),[S,n]);const P=e=>{e.preventDefault(),t.searchText&&!C&&j((0,m.Gr)(t.searchText))},N=e=>n({searchText:e.target.value});return(0,r.createElement)("div",{className:y},(0,r.createElement)(d.Z,null),b?(0,r.createElement)("figure",null,c&&(0,r.createElement)(u.Z,{onSubmit:P,onChange:N,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})),(!a.RichText.isEmpty(f)||c)&&!!b&&(0,r.createElement)(a.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:f})):(0,r.createElement)(o.Placeholder,{className:"wp-block-jetpack-gif_placeholder",icon:h.qv,label:h.TN,instructions:__("Search for a term or paste a Giphy URL","jetpack")},(0,r.createElement)(u.Z,{onSubmit:P,onChange:N,value:v,ref:_})))}},63139:function(e,t,n){"use strict";var r=n(31985),a=n(25073);(0,r.Z)(a.u2,a.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),[a,o]=(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&&o(n)}n(!1)})()}),[i]),{isFetching:t,giphyData:a,fetchGiphyData:s}}},25073:function(e,t,n){"use strict";n.d(t,{TN:function(){return l},Xd:function(){return d},qv:function(){return u},u2:function(){return c}});var r=n(51806),a=n(55609),o=n(65736),i=n(70355),s=n(61266);const __=o.__,_x=o._x,c="gif",l=__("GIF","jetpack"),u=(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.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(a.Path,{d:"M18 13v7H4V6h5.02c.05-.71.22-1.38.48-2H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-5l-2-2zm-1.5 5h-11l2.75-3.53 1.96 2.36 2.75-3.54L16.5 18zm2.8-9.11c.44-.7.7-1.51.7-2.39C20 4.01 17.99 2 15.5 2S11 4.01 11 6.5s2.01 4.5 4.49 4.5c.88 0 1.7-.26 2.39-.7L21 13.42 22.42 12 19.3 8.89zM15.5 9C14.12 9 13 7.88 13 6.5S14.12 4 15.5 4 18 5.12 18 6.5 16.88 9 15.5 9z"})),d={title: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 a},ix:function(){return s}});var r=n(72844);const a=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)},o=e=>`${Math.floor(e.images.original.height/e.images.original.width*100)}%`,i=e=>e?.embed_url,s=e=>({giphyUrl:i(e),paddingTop:o(e)})},4966:function(e,t,n){"use strict";var r=n(51806),a=n(55609),o=n(65736);const __=o.__,_x=o._x;t.Z=e=>{const{className:t,embedValue:n,onChange:o,onSubmit:i}=e;return(0,r.createElement)(a.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:o}),(0,r.createElement)(a.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack"))))}},81907:function(e,t,n){"use strict";var r=n(51806),a=n(13419),o=n(52175),i=n(4981),s=n(55609),c=n(94333),l=n(69307),u=n(65736),d=n(90162),p=n(4966),m=n(47875),h=n(4525);const __=u.__,_x=u._x;t.Z=(0,c.compose)(s.withNotices,(0,d.withViewportMatch)({isMobile:"< small"}))((function(e){const{attributes:{url:t,height:n},className:c,isMobile:u,isSelected:d,name:g,noticeOperations:f,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)((()=>{!d&&_&&C(!1)}),[d,_]);const S=()=>{C(!0)},j=e=>{e&&e.preventDefault();const t=(0,h.L7)(k.trim());if(!h.Wh.test(t.url))return f.removeAllNotices(),void f.createErrorNotice(__("Your calendar couldn't be embedded. Please double check your URL or Embed Code. Please note, you need to use the 'Public URL' or 'Embed Code', the 'Shareable Link' will not work.","jetpack"));v(t),E(!1),f.removeAllNotices()},x=(0,i.getBlockDefaultClassName)(g),P=`<iframe src="${t}" style="border:0" scrolling="no" frameborder="0" height="${u?"300":n}"></iframe>`,N=(0,r.createElement)(s.ExternalLink,{href:"https://en.support.wordpress.com/google-calendar/"},__("Enable Permissions for the calendar you want to share","jetpack")),L=(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(p.Z,{className:`${x}-embed-form-sidebar`,embedValue:k,onChange:e=>y(e.target.value),onSubmit:j}));if(w||!t){const e=(0,a.Wp)()||(0,a.Ug)()?"https://en.support.wordpress.com/wordpress-editor/blocks/google-calendar/":"https://jetpack.com/support/jetpack-blocks/google-calendar/";return(0,r.createElement)("div",{className:c},L,(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,N),(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},L,(0,r.createElement)("div",null,(0,r.createElement)(s.SandBox,{html:P,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),a=n(13839);(0,r.Z)(a.u2,a.Xd)},47875:function(e,t,n){"use strict";var r=n(51806),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{height:"23",viewBox:"0 0 24 23",width:"24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M19.5,23h-15c-2.2,0-4-1.8-4-4V4c0-2.2,1.8-4,4-4h15c2.2,0,4,1.8,4,4v15C23.5,21.2,21.7,23,19.5,23z M4.5,2 c-1.1,0-2,0.9-2,2v15c0,1.1,0.9,2,2,2h15c1.1,0,2-0.9,2-2V4c0-1.1-0.9-2-2-2H4.5z M6.9,3.9L6.9,3.9c0.5,0,0.9,0.4,0.9,0.9V5 c0,0.5-0.4,0.9-0.9,0.9l0,0C6.5,5.9,6.1,5.5,6.1,5V4.7C6.1,4.3,6.5,3.9,6.9,3.9z M17,3.9L17,3.9c0.5,0,0.9,0.4,0.9,0.9V5 c0,0.5-0.4,0.9-0.9,0.9l0,0c-0.5,0-0.9-0.4-0.9-0.9V4.7C16.2,4.3,16.5,3.9,17,3.9z M8.8,17.6c1.8,0,3.2-1,3.2-2.4 c0-1.1-0.7-1.8-1.8-1.9v-0.1c0.9-0.2,1.5-0.9,1.5-1.8c0-1.3-1.2-2.2-2.9-2.2c-1.8,0-2.9,1-3,2.5h1.6c0-0.7,0.6-1.1,1.4-1.1 c0.8,0,1.3,0.4,1.3,1.1c0,0.7-0.5,1.1-1.3,1.1h-1v1.3h1c0.9,0,1.5,0.4,1.5,1.1c0,0.7-0.6,1.2-1.4,1.2c-0.9,0-1.4-0.4-1.5-1.1H5.7 C5.8,16.6,7,17.6,8.8,17.6z M17.6,17.4V9.3h-1.7l-2.1,1.4v1.6l2-1.4h0.1v6.4H17.6z"}))},13839:function(e,t,n){"use strict";n.d(t,{Xd:function(){return d},u2:function(){return u}});var r=n(51806),a=n(4981),o=n(65736),i=n(70355),s=n(81907),c=n(47875),l=n(4525);const __=o.__,_x=o._x,u="google-calendar",d={title:__("Google Calendar","jetpack"),description:__("Embed a Google Calendar.","jetpack"),keywords:[_x("events","block search term","jetpack"),_x("dates","block search term","jetpack"),_x("schedule","block search term","jetpack"),_x("appointments","block search term","jetpack")],icon:{src: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,a.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,a.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 o},L7:function(){return u},Wh:function(){return a},jj:function(){return l}});const r="s*https?://calendar.google.com/calendar",a=new RegExp(`^${r}`,"i"),o=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=o.exec(e);if(!t)return;const n={};return t.forEach(((e,t)=>{if(0===t)return;if(a.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 o.test(e)?l(e):i.test(e)?{url:c(e)}:{url:e}}},79648:function(e,t,n){"use strict";var r=n(82674),a=n.n(r),o=n(51806),i=n(13419),s=n(52175),c=n(55609),l=n(69307),u=n(65736),d=n(1597),p=n(30055);const __=u.__,_x=u._x,{variations:m}=d,h=m?.find((e=>"jetpack/google-docs"===e.name)),g=m?.find((e=>"jetpack/google-sheets"===e.name)),f=m?.find((e=>"jetpack/google-slides"===e.name)),b={type:"document",title:h?.title,icon:(0,i.lt)(h),patterns:[/^(http|https):\/\/(docs\.google.com)\/document\/d\/([A-Za-z0-9_-]+).*?$/i]},v={type:"spreadsheets",title:g?.title,icon:(0,i.lt)(g),patterns:[/^(http|https):\/\/(docs\.google.com)\/spreadsheets\/d\/([A-Za-z0-9_-]+).*?$/i]},k={type:"presentation",title:f?.title,icon:(0,i.lt)(f),patterns:[/^(http|https):\/\/(docs\.google.com)\/presentation\/d\/([A-Za-z0-9_-]+).*?$/i]};t.Z=e=>{const{attributes:{aspectRatio:t},attributes:{variation:n},attributes:{url:r},setAttributes:i}=e;let u="",d="",m=[],h="";switch((0,l.useEffect)((()=>{n||i({variation:(()=>{switch(r.match(/^(http|https):\/\/(docs\.google\.com)\/(.*)\/d\//)[3]){case"document":return"google-docs";case"spreadsheets":return"google-sheets";case"presentation":return"google-slides"}return""})()})}),[n,r,i]),n.replace("jetpack/","")){case"google-docs":u=b.icon,d=b.title,m=b.patterns,h=b.type;break;case"google-sheets":u=v.icon,d=v.title,m=v.patterns,h=v.type;break;case"google-slides":u=k.icon,d=k.title,m=k.patterns,h=k.type}return(0,o.createElement)(l.Fragment,null,(0,o.createElement)(l.Fragment,null,(0,o.createElement)(p.Z,a()({icon:u.src,instructions:[__("Copy and paste your document link below.","jetpack"),__("If your document is private, only readers logged into a Google account with shared access to the document may view it.","jetpack")].join(" "),label:d,patterns:m,placeholder:_x("Enter the link here…","Embed block placeholder","jetpack"),mapUrl:()=>{if([]===m[0]||""===h)return r;const e=r.match(m[0]);return null===e||void 0===e[1]||void 0===e[2]||void 0===e[3]?r:`${e[1]}://${e[2]}/${h}/d/${e[3]}/preview`},mismatchErrorMessage:__("The document couldn’t be embedded. To embed a document, use the link in your browser address bar when editing the document.","jetpack"),checkGoogleDocVisibility:!0},e))),(0,o.createElement)(l.Fragment,null,(0,o.createElement)(s.InspectorControls,null,(0,o.createElement)(c.PanelBody,null,(0,o.createElement)("p",null,__("Select a different aspect-ratio to show more (or less) of your embedded document.","jetpack")),(0,o.createElement)(c.SelectControl,{label:__("Aspect Ratio","jetpack"),value:t,options:[{label:"Default",value:""},{label:"100% - Show the whole document",value:"ar-100"},{label:"50% - Show half of the document",value:"ar-50"}],onChange:e=>i({aspectRatio:e})})))))}},25070:function(e,t,n){"use strict";var r=n(31985),a=n(1597),o=n(79648),i=n(49552),s=n(366);(0,r.S)(a,{edit:o.Z,save:i.Z,transforms:(0,s.Z)(a.name)})},37760:function(e,t,n){"use strict";var r=n(51806),a=n(55609),o=n(65736),i=n(65235),s=n.n(i);const _x=o._x;t.Z=e=>{let{className:t,icon:n,instructions:o,label:i,notices:c,url:l,onSubmit:u,placeholder:d,updateUrl:p}=e;return(0,r.createElement)("div",{className:s()("wp-block-jetpack-google-docs-embed-editmode",t)},(0,r.createElement)(a.Placeholder,{icon:n,label:i,instructions:o,notices:c},(0,r.createElement)("form",{onSubmit:u},(0,r.createElement)("input",{type:"url",value:l||"",className:"components-placeholder__input",placeholder:d,onChange:e=>p(e.target.value)}),(0,r.createElement)(a.Button,{variant:"primary",type:"submit"},_x("Embed","button label","jetpack")))))}},30055:function(e,t,n){"use strict";var r=n(51806),a=n(86989),o=n.n(a),i=n(52175),s=n(4981),c=n(55609),l=n(94333),u=n(69307),d=n(65736),p=n(71063),m=n(37760),h=n(18100);const __=d.__,_x=d._x,g=e=>{let{children:t,mapUrl:n,url:a,className:i,interactive:s,toggleInteractive:c,noticeUI:l=null,noticeOperations:d={},checkGoogleDocVisibility:p=!1}=e;if((0,u.useEffect)((()=>{p&&o()({path:`/wpcom/v2/checkGoogleDocVisibility?url=${a}`}).catch((()=>{d.removeAllNotices(),d.createNotice({status:"warning",content:__("This document is private. Only readers logged into a Google account that the document is shared with can view it.","jetpack")})}))}),[a,p,d]),t)return t;let m=!1;return l&&(m=!0),(0,r.createElement)(r.Fragment,null,l,(0,r.createElement)(h.Z,{url:n(a),className:i,interactive:s,toggleInteractive:c,isPrivateURL:m}))};t.Z=(0,l.compose)(c.withNotices)((e=>{const{attributes:t,className:n,isSelected:a,setAttributes:o,icon:l="superhero-alt",instructions:h=__("Paste a link to the content you want to display.","jetpack"),forceEditing:f=!1,mismatchErrorMessage:b=__("It does not look like an embeddable URL.","jetpack"),label:v,mapUrl:k=(e=>e),noticeOperations:y,noticeUI:w,patterns:E,placeholder:_=__("Enter URL to embed here…","jetpack"),children:C,onSubmitUrl:S=(()=>{}),checkGoogleDocVisibility:j=!1}=e,{url:x}=t,[P,N]=(0,u.useState)(!1),[L,T]=(0,u.useState)(!1),[A,I]=(0,u.useState)(x);f&&!P&&N(!0);(0,u.useEffect)((()=>{!a&&L&&T(!1)}),[a]);const R=(0,u.useRef)(null),M=(0,i.useBlockProps)({className:"wp-block-jetpack-google-docs-embed",ref:R}),{title:Z}=(0,s.getBlockType)(e.name),B=(0,d.sprintf)(/* translators: %s is replaced with the name of the embed provider */ _x("%s URL","placeholder label","jetpack"),Z);return(0,r.createElement)("div",M,(0,r.createElement)(i.BlockControls,null,(0,r.createElement)(c.ToolbarGroup,null,!P&&(0,r.createElement)(c.ToolbarButton,{icon:p.Z,label:__("Edit URL","jetpack"),isActive:P,onClick:()=>{y.removeAllNotices(),N(!P)}}))),P||!x?(0,r.createElement)(m.Z,{className:n,icon:l,instructions:h,label:v||B,url:A,notices:w,placeholder:_,onSubmit:e=>{if(e&&e.preventDefault(),!E[0].test(A))return y.removeAllNotices(),void y.createErrorNotice(b);y.removeAllNotices(),N(!1),o({url:A}),S(A)},updateUrl:I}):(0,r.createElement)(g,{children:C,mapUrl:k,url:A,className:n,interactive:L,toggleInteractive:T,noticeUI:w,noticeOperations:y,checkGoogleDocVisibility:j}))}))},18100:function(e,t,n){"use strict";var r=n(51806),a=n(55609),o=n(65736);const __=o.__;t.Z=e=>{const{allowFullScreen:t=!0,isPrivateURL:n=!1,interactive:o,toggleInteractive:i,title:s=__("Embed URL","jetpack"),url:c}=e;return(0,r.createElement)("figure",null,n?(0,r.createElement)("div",{className:"wp-block-jetpack-google-docs-embed__wrapper wp-block-jetpack-google-docs-embed__wrapper--error"},(0,r.createElement)("p",{className:"wp-block-jetpack-google-docs-embed__error-msg"},__("This Google Document is private.","jetpack"),(0,r.createElement)("br",null),(0,r.createElement)("br",null),(0,r.createElement)(a.ExternalLink,{href:c},__("Click here to open this document.","jetpack")))):(0,r.createElement)("div",{className:"wp-block-jetpack-google-docs-embed__wrapper"},(0,r.createElement)("iframe",{src:c,allowFullScreen:t,title:s,height:"450"})),!o&&(0,r.createElement)("div",{className:"wp-block-jetpack-google-docs-embed__interactive-overlay",onMouseUp:()=>i(!0)}))}},49552:function(e,t,n){"use strict";var r=n(51806);t.Z=e=>{const{attributes:t}=e;return(0,r.createElement)("figure",null,(0,r.createElement)("div",{className:"embed__wrapper"},`\n${t.url}\n`))}},366:function(e,t,n){"use strict";var r=n(51806),a=n(4981),o=n(69307);t.Z=e=>{const t=[/^(http|https):\/\/(docs\.google.com)\/(spreadsheets|document|presentation)\/d\/([A-Za-z0-9_-]+).*?$/i];return{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&t[0].test(e.textContent)&&1===e.textContent?.match(/https/gi)?.length,transform:t=>(0,a.createBlock)(e,{url:t.textContent.trim()})}],to:[{type:"block",blocks:["core/paragraph"],transform:e=>{let{url:t}=e;const n=(0,r.createElement)("a",{href:t},t);return(0,a.createBlock)("core/paragraph",{content:(0,o.renderToString)(n)})}}]}}},76579:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(51806),a=n(55609),o=n(65736);const __=o.__;function i(e){let{attributes:t,setAttributes:n}=e;const{orientation:o}=t;return(0,r.createElement)(a.PanelBody,{title:__("Orientation","jetpack")},(0,r.createElement)(a.RadioControl,{selected:o||"horizontal",options:[{label:__("Side by side","jetpack"),value:"horizontal"},{label:__("Above and below","jetpack"),value:"vertical"}],onChange:e=>n({orientation:e})}))}},63157:function(e,t,n){"use strict";var r=n(51806),a=n(52175),o=n(55609),i=n(94333),s=n(69307),c=n(65736),l=n(13369),u=n(76579),d=n(86504),p=n(37879);n(8503);const __=c.__;t.Z=e=>{let{attributes:t,className:n,clientId:c,isSelected:m,setAttributes:h}=e;const{align:g,imageBefore:f,imageAfter:b,caption:v,orientation:k}=t;let y=null,w=null;const E=(0,s.useRef)();i.useResizeObserver&&([y,w]=(0,i.useResizeObserver)(),(0,p.Z)((e=>{e>0&&"undefined"!=typeof juxtapose&&juxtapose.sliders&&juxtapose.sliders.forEach((t=>{t.wrapper.parentElement.id===c&&t.optimizeWrapper(e)}))}),200,w.width));const _=f&&f.url&&b&&b.url?"image-compare__comparison juxtapose":"image-compare__placeholder";return(0,s.useLayoutEffect)((()=>{f.url&&b.url&&"undefined"!=typeof juxtapose&&juxtapose.makeSlider(E?.current)}),[g,f,b,k]),(0,r.createElement)("figure",{className:n,id:c},y,(0,r.createElement)(a.InspectorControls,{key:"controls"},(0,r.createElement)(u.Z,{attributes:t,setAttributes:h})),(0,r.createElement)("div",{ref:E,className:_,"data-mode":k||"horizontal"},(0,r.createElement)(o.Placeholder,{label:null},(0,r.createElement)("div",{className:"image-compare__image-before"},(0,r.createElement)(d.Z,{image:{id:f.id,url:f.url,alt:f.alt},placeHolderLabel:__("Image before","jetpack"),onChange:e=>{if("image"===e.media_type||"image"===e.type){const{src:t}=(0,l.z)(e),{alt:n,id:r,media_details:a}=e,o=a?.width??e.width,i=a?.height??e.height;h({imageBefore:{id:r,url:t||e.url,alt:n,width:o,height:i}})}}})),(0,r.createElement)("div",{className:"image-compare__image-after"},(0,r.createElement)(d.Z,{image:{id:b.id,url:b.url,alt:b.alt},placeHolderLabel:__("Image after","jetpack"),onChange:e=>{if("image"===e.media_type||"image"===e.type){const{src:t}=(0,l.z)(e),{alt:n,id:r,media_details:a}=e,o=a?.width??e.width,i=a?.height??e.height;h({imageAfter:{id:r,url:t||e.url,alt:n,width:o,height:i}})}}})))),(!a.RichText.isEmpty(v)||m&&f.url&&b.url)&&(0,r.createElement)(a.RichText,{tagName:"figcaption",placeholder:__("Write caption","jetpack"),value:v,onChange:e=>h({caption:e}),inlineToolbar:!0}))}},93052:function(e,t,n){"use strict";var r=n(31985),a=n(94039);(0,r.Z)(a.u,a.X)},17990:function(e,t,n){"use strict";var r=n(51806),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M21 4h-6v1.5h6c.3 0 .5.2.5.5v.4l-3.6 3.5L15 8.1v1.8l2.6 1.7c.1.1.3.1.4.1.2 0 .4-.1.5-.2l3-2.9V18c0 .3-.2.5-.5.5h-6V20h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM1 6v12c0 1.1.9 2 2 2h10.5V4H3c-1.1 0-2 .9-2 2zm11 12.5H3c-.3 0-.5-.2-.5-.5v-1.4L5 14.7l1.5-1.1.1-.1 3 1.9c.1.1.3.1.4.1.2 0 .4-.1.5-.2L12 14v4.5zm0-6.6l-2.1 2L7 12c-.1-.1-.3-.1-.4-.1h-.1c-.1 0-.3.1-.4.1l-1.1.9-2.5 1.8V6c0-.3.2-.5.5-.5h9v6.4z"}))},86504:function(e,t,n){"use strict";var r=n(51806),a=n(52175),o=n(55609),i=n(94333),s=n(69307);t.Z=(0,i.compose)([o.withNotices])((e=>{const{image:t,noticeOperations:n,noticeUI:o,onChange:i,placeHolderLabel:c}=e,l=(0,r.createElement)("img",{id:t.id,src:t.url,alt:t.alt}),u=(0,r.createElement)(s.Fragment,null,(0,r.createElement)(a.MediaPlaceholder,{labels:{title:c},accept:"image/*",allowedTypes:["image"],onSelect:i,onError:e=>n.createErrorNotice(e),notices:o}));return t&&t.url?l:u}))},94039:function(e,t,n){"use strict";n.d(t,{X:function(){return p},u:function(){return d}});var r=n(65736),a=n(70355),o=n(5820),i=n(63157),s=n(17990),c=n(90767),l=n(58632),u=n(25250);const __=r.__,_x=r._x,d="image-compare",p={title:__("Image Compare","jetpack"),description:__("Compare two images with a slider. Works best with images of the same size.","jetpack"),icon:{src:s.Z,foreground:(0,a.m)()},category:(0,o.Z)("media","layout"),keywords:[_x("juxtapose","block search term","jetpack"),_x("photos","block search term","jetpack"),_x("pictures","block search term","jetpack"),_x("side by side","block search term","jetpack"),_x("slider","block search term","jetpack")],supports:{align:["wide","full"]},attributes:{imageBefore:{type:"object",default:{}},imageAfter:{type:"object",default:{}},caption:{type:"string"},orientation:{type:"string",default:"horizontal"}},example:{attributes:{imageBefore:{id:1,url:l,alt:__("Before","jetpack")},imageAfter:{id:2,url:c,alt:__("After","jetpack")},caption:__("Example image","jetpack")}},edit:i.Z,save:u.Z}},25250:function(e,t,n){"use strict";var r=n(51806),a=n(52175);t.Z=e=>{let{attributes:t,className:n}=e;const{imageBefore:o,imageAfter:i,caption:s,orientation:c}=t;return(0,r.createElement)("figure",{className:n},(0,r.createElement)("div",{className:"juxtapose","data-mode":c||"horizontal"},(0,r.createElement)("img",{id:o.id,src:o.url,alt:o.alt,width:o.width,height:o.height,className:"image-compare__image-before"}),(0,r.createElement)("img",{id:i.id,src:i.url,alt:i.alt,width:i.width,height:i.height,className:"image-compare__image-after"})),!a.RichText.isEmpty(s)&&(0,r.createElement)(a.RichText.Content,{tagName:"figcaption",value:s}))}},37879:function(e,t,n){"use strict";var r=n(69307);t.Z=(e,t,n)=>{(0,r.useEffect)((()=>{const r=setTimeout((()=>e(n)),t);return()=>clearTimeout(r)}),[n])}},8503:function(e,t,n){"use strict";var r=n(47701);n.n(r)()((function(){const e={sliders:[],OPTIMIZATION_ACCEPTED:1,OPTIMIZATION_WAS_CONSTRAINED:2};function t(e,t){const n=this;this.image=new Image,this.loaded=!1,this.image.onload=function(){n.loaded=!0,t._onLoaded()},this.image.src=e.src,this.image.alt=e.alt||"",this.label=e.label||!1}function n(e,t){e&&e.classList.add(t)}function r(e,t){e&&e.classList.remove(t)}function a(e){return{width:parseInt(window.getComputedStyle(e).width,10),height:parseInt(window.getComputedStyle(e).height,10)}}function o(e,t){let n;if("string"==typeof t||"number"==typeof t)n=parseInt(t,10);else{const r=e.getBoundingClientRect(),a={top:r.top+document.body.scrollTop+document.documentElement.scrollTop,left:r.left+document.body.scrollLeft+document.documentElement.scrollLeft},o=e.offsetWidth;n=(function(e){let t;return t=e.pageX?e.pageX:e.touches?e.touches[0].pageX:e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,t}(t)-a.left)/o*100}return n}function i(e,t,n){let r;if("string"==typeof t||"number"==typeof t)r=parseInt(t,10);else{const a=e.getBoundingClientRect(),o={top:a.top+n.body.scrollTop+n.documentElement.scrollTop,left:a.left+n.body.scrollLeft+n.documentElement.scrollLeft},i=e.offsetHeight;r=(function(e){let t;return t=e.pageY?e.pageY:e.touches?e.touches[0].pageY:e.clientY+document.body.scrollTop+document.documentElement.scrollTop,t}(t)-o.top)/i*100}return r}const s={animate:!0,showLabels:!0,makeResponsive:!0};function c(e,n,r){let a;for(a in this.element=e,this.options={animate:!0,showLabels:!0,makeResponsive:!0,startingPosition:"50%",mode:"horizontal",callback:null},this.options)a in r&&(this.options[a]=a in s?"string"!=typeof(o=r[a])?Boolean(o):!("false"===o||""===o):r[a]);var o;2===n.length&&(this.imgBefore=new t(n[0],this),this.imgAfter=new t(n[1],this))}c.prototype={updateSlider:function(e,t){let a;a="vertical"===this.options.mode?i(this.slider,e,this.sliderParentDocument):o(this.slider,e),a=a.toFixed(2)+"%";const s=parseFloat(a),c=100-s+"%";s>0&&s<100&&(r(this.handle,"transition"),r(this.rightImage,"transition"),r(this.leftImage,"transition"),this.options.animate&&t&&(n(this.handle,"transition"),n(this.leftImage,"transition"),n(this.rightImage,"transition")),"vertical"===this.options.mode?(this.handle.style.top=a,this.leftImage.style.height=a,this.rightImage.style.height=c):(this.handle.style.left=a,this.leftImage.style.width=a,this.rightImage.style.width=c),this.sliderPosition=a)},getPosition:function(){return this.sliderPosition},displayLabel:function(e,t){const n=document.createElement("div");n.className="jx-label",n.setAttribute("tabindex",0),function(e,t){document.body.textContent?e.textContent=t:e.innerText=t}(n,t),e.appendChild(n)},setStartingPosition:function(e){this.options.startingPosition=e},calculateDims:function(e,t){const n=(r=this.imgBefore.image,{width:r.naturalWidth,height:r.naturalHeight,aspect:function(){return this.width/this.height}}).aspect();var r;return e?t=e/n:t&&(e=t*n),{width:e,height:t,ratio:n}},responsivizeIframe:function(e){return e.height<window.innerHeight?e.ratio>=1&&(this.wrapper.style.paddingTop=parseInt((window.innerHeight-e.height)/2)+"px"):e.height>window.innerHeight&&(e=this.calculateDims(0,window.innerHeight),this.wrapper.style.paddingLeft=parseInt((window.innerWidth-e.width)/2)+"px"),e},setWrapperDimensions:function(){const e=a(this.wrapper.parentNode).width,t=a(this.wrapper.parentNode).height;let n=this.calculateDims(e,t);window.location===window.parent.location||this.options.makeResponsive||(n=this.responsivizeIframe(n)),this.wrapper.style.height=parseInt(n.height)+"px",this.wrapper.style.width=parseInt(n.width)+"px"},optimizeWrapper:function(t){let n=e.OPTIMIZATION_ACCEPTED;return this.imgBefore.image.naturalWidth>=t&&this.imgAfter.image.naturalWidth>=t?(this.wrapper.style.width=t+"px",n=e.OPTIMIZATION_WAS_CONSTRAINED):this.imgAfter.image.naturalWidth<t?this.wrapper.style.width=this.imgAfter.image.naturalWidth+"px":this.wrapper.style.width=this.imgBefore.image.naturalWidth+"px",this.setWrapperDimensions(),n},_onLoaded:function(){if(this.imgBefore&&!0===this.imgBefore.loaded&&this.imgAfter&&!0===this.imgAfter.loaded){if(this.wrapper=this.element,!this.wrapper||this.wrapper.querySelector(".jx-slider"))return;n(this.wrapper,"juxtapose"),this.wrapper.style.width=this.imgBefore.image.naturalWidth,this.setWrapperDimensions(),this.slider=document.createElement("div"),this.slider.className="jx-slider",this.wrapper.appendChild(this.slider),this.sliderParentDocument=this.wrapper.ownerDocument,"horizontal"!==this.options.mode&&n(this.slider,this.options.mode),this.handle=document.createElement("div"),this.handle.className="jx-handle",this.rightImage=document.createElement("div"),this.rightImage.className="jx-image jx-right",this.rightImage.appendChild(this.imgAfter.image),this.leftImage=document.createElement("div"),this.leftImage.className="jx-image jx-left",this.leftImage.appendChild(this.imgBefore.image),this.slider.appendChild(this.handle),this.slider.appendChild(this.leftImage),this.slider.appendChild(this.rightImage),this.leftArrow=document.createElement("div"),this.rightArrow=document.createElement("div"),this.control=document.createElement("div"),this.controller=document.createElement("div"),this.leftArrow.className="jx-arrow jx-left",this.rightArrow.className="jx-arrow jx-right",this.control.className="jx-control",this.controller.className="jx-controller",this.controller.setAttribute("tabindex",0),this.controller.setAttribute("role","slider"),this.controller.setAttribute("aria-valuenow",50),this.controller.setAttribute("aria-valuemin",0),this.controller.setAttribute("aria-valuemax",100),this.controller.setAttribute("aria-label",window.imageCompareHandle?.msg||"Slide to compare images"),this.handle.appendChild(this.leftArrow),this.handle.appendChild(this.control),this.handle.appendChild(this.rightArrow),this.control.appendChild(this.controller),this._init()}},_init:function(){this.updateSlider(this.options.startingPosition,!1),!0===this.options.showLabels&&(this.imgBefore.label&&this.displayLabel(this.leftImage,this.imgBefore.label),this.imgAfter.label&&this.displayLabel(this.rightImage,this.imgAfter.label));const t=this;window.addEventListener("resize",(function(){t.setWrapperDimensions()})),this.slider.addEventListener("mousedown",(function(e){e.preventDefault(),t.updateSlider(e,!0);let n=!0;this.addEventListener("mousemove",(function(e){e.preventDefault(),n&&t.updateSlider(e,!1)})),this.addEventListener("mouseup",(function(e){e.preventDefault(),e.stopPropagation(),n=!1}))})),this.slider.addEventListener("touchstart",(function(e){e.preventDefault(),e.stopPropagation(),t.updateSlider(e,!0),this.addEventListener("touchmove",(function(e){e.preventDefault(),e.stopPropagation(),t.updateSlider(e,!1)}))})),this.handle.addEventListener("keydown",(function(e){const n=e.which||e.keyCode;let r=parseFloat(this.style.left);if(37===n){r-=1;const e=parseFloat(this.style.left)-1;t.updateSlider(e,!1),t.controller.setAttribute("aria-valuenow",r)}if(39===n){r+=1;const e=parseFloat(this.style.left)+1;t.updateSlider(e,!1),t.controller.setAttribute("aria-valuenow",r)}})),this.leftImage.addEventListener("keydown",(function(e){const n=e.which||e.keyCode;13!==n&&32!==n||(t.updateSlider("90%",!0),t.controller.setAttribute("aria-valuenow",91))})),this.rightImage.addEventListener("keydown",(function(e){const n=e.which||e.keyCode;13!==n&&32!==n||(t.updateSlider("10%",!0),t.controller.setAttribute("aria-valuenow",10))})),e.sliders.push(this),this.options.callback&&"function"==typeof this.options.callback&&this.options.callback(this)}},e.makeSlider=function(t,r){void 0===r&&(r=e.sliders.length);const a=t,o=a.querySelectorAll("img");if(o.length<2)return;const i={};a.getAttribute("data-animate")&&(i.animate=a.getAttribute("data-animate")),a.getAttribute("data-showlabels")&&(i.showLabels=a.getAttribute("data-showlabels")),a.getAttribute("data-startingposition")&&(i.startingPosition=a.getAttribute("data-startingposition")),a.getAttribute("data-mode")&&(i.mode=a.getAttribute("data-mode")),a.getAttribute("data-makeresponsive")&&(i.mode=a.getAttribute("data-makeresponsive"));return n(t,"juxtapose-"+r),a.innerHTML?a.innerHTML="":a.innerText="",new e.JXSlider(t,[{src:o[0].src,label:o[0].getAttribute("data-label"),alt:o[0].alt},{src:o[1].src,label:o[1].getAttribute("data-label"),alt:o[1].alt}],i)},e.scanPage=function(){const t=document.querySelectorAll(".juxtapose");for(let n=0;n<t.length;n++)e.makeSlider(t[n],n)},e.JXSlider=c,window.juxtapose=e,e.scanPage()}))},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 a},u:function(){return r}});const r=30,a="jetpack-new-instagram-connection"},64129:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(51806),a=n(55609),o=n(65736),i=n(696);const __=o.__,_n=o._n;function s(e){let{accountImageTotal:t,attributes:n,currentUserConnected:s,disconnectFromService:c,shouldRenderSidebarNotice:l,setAttributes:u}=e;const{accessToken:d,columns:p,count:m,instagramUser:h,isStackedOnMobile:g,spacing:f}=n;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.PanelBody,{title:__("Account Settings","jetpack")},(0,r.createElement)(a.PanelRow,null,(0,r.createElement)("span",null,__("Account","jetpack")),(0,r.createElement)(a.ExternalLink,{href:`https://www.instagram.com/${h}/`},"@",h)),s&&(0,r.createElement)(a.PanelRow,null,(0,r.createElement)(a.Button,{isDestructive:!0,variant:"link",onClick:()=>c(d)},__("Disconnect your account","jetpack")))),(0,r.createElement)(a.PanelBody,{title:__("Display Settings","jetpack")},l?(()=>{const e=t?(0,o.sprintf)(/* translators: placeholder is a number. */ _n("There is currently only %s post in your Instagram account.","There are currently only %s posts in your Instagram account.",t,"jetpack"),t):__("There are currently no posts in your Instagram account.","jetpack");return(0,r.createElement)("div",{className:"wp-block-jetpack-instagram-gallery__count-notice"},(0,r.createElement)(a.Notice,{isDismissible:!1,status:"info"},e))})():null,(0,r.createElement)(a.RangeControl,{label:__("Number of Posts","jetpack"),value:m,onChange:e=>u({count:e}),min:1,max:i.u}),(0,r.createElement)(a.RangeControl,{label:__("Number of Columns","jetpack"),value:p,onChange:e=>u({columns:e}),min:1,max:6}),(0,r.createElement)(a.RangeControl,{label:__("Image Spacing (px)","jetpack"),value:f,onChange:e=>u({spacing:e}),min:0,max:50}),(0,r.createElement)(a.ToggleControl,{label:__("Stack on mobile","jetpack"),checked:g,onChange:()=>u({isStackedOnMobile:!g})})))}},36420:function(e,t,n){"use strict";var r=n(51806),a=n(13419),o=n(52175),i=n(55609),s=n(69307),c=n(65736),l=n(65235),u=n.n(l),d=n(92819),p=n(4554),m=n(8979),h=n(696),g=n(64129),f=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,p.S)(m.Z,t);(0,d.isEqual)(e,t)||w(e)}),[t,w]);const[P,N]=(0,s.useState)(E),{isRequestingWpcomConnectUrl:L,wpcomConnectUrl:T}=(0,v.Z)(),{images:A,isLoadingGallery:I,setImages:R}=(0,k.Z)({accessToken:E,noticeOperations:l,setAttributes:w,setSelectedAccount:N}),{connectToService:M,disconnectFromService:Z,isConnecting:B,isRequestingUserConnections:D,userConnections:F}=(0,b.Z)({accessToken:E,noticeOperations:l,selectedAccount:P,setAttributes:w,setImages:R,setSelectedAccount:N}),z=(0,a.Dp)(),O=S>A.length?A.length:S,U=!I&&(!E||(0,d.isEmpty)(A)),H=!U,V=E&&I&&(0,d.isEmpty)(A),G=!U&&!V,q=u()(n,{[`align${_}`]:_}),$=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=()=>{P&&h.D!==P?w({accessToken:P,instagramUser:(0,d.find)(F,{token:P}).username}):M()};return(0,r.createElement)("div",{className:q},U&&(0,r.createElement)(i.Placeholder,{icon:"instagram",instructions:z?D||F.length?void 0:__("Connect to Instagram to start sharing your images.","jetpack"):__("First, you'll need to connect your WordPress.com account.","jetpack"),label:__("Latest Instagram Posts","jetpack"),notices:y},z?(()=>{const e=F.length>0,t=[...(0,d.map)(F,(e=>({label:`@${e.username}`,value:e.token}))),{label:__("Add a new account","jetpack"),value:h.D}],n=B||D||e&&!P;return(0,r.createElement)("div",null,e&&(0,r.createElement)(i.RadioControl,{label:__("Select your Instagram account:","jetpack"),onChange:e=>N(e),options:t,selected:P}),h.D===P&&(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},B&&__("Connecting…","jetpack"),D&&__("Loading your connections…","jetpack"),!B&&!D&&__("Connect to Instagram","jetpack")))})():(0,r.createElement)(i.Button,{disabled:L||!T,href:T,variant:"secondary"},__("Connect to WordPress.com","jetpack"))),V&&(0,r.createElement)("div",{className:"wp-block-embed is-loading"},(0,r.createElement)(i.Spinner,null),(0,r.createElement)("p",null,__("Embedding…","jetpack"))),G&&(0,r.createElement)("div",{className:$,style:W},(0,d.times)(c?S:O,(e=>(0,r.createElement)("span",{className:u()("wp-block-jetpack-instagram-gallery__grid-post"),key:e,style:J},(e=>{if(A[e]){const n=A[e];return(0,r.createElement)(f.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)(o.InspectorControls,null,(0,r.createElement)(g.Z,{accountImageTotal:A.length,attributes:t,currentUserConnected:z,disconnectFromService:Z,shouldRenderSidebarNotice:H&&!V&&A.length<S,setAttributes:w})))}))},34575:function(e,t,n){"use strict";var r=n(31985),a=n(78544);(0,r.Z)(a.u,a.X)},44961:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(51806),a=n(69307),o=n(65235),i=n.n(o);function s(e){let{src:t,alt:n,spacing:o}=e;const[s,c]=(0,a.useState)(!1),[l,u]=(0,a.useState)("auto"),d=(0,a.useRef)(),p=()=>{c(!0),u("auto")};(0,a.useEffect)((()=>{const e=t;if(e){const t=new window.Image;t.src=e,t.onload=p}d.current&&u(d.current.parentNode.getBoundingClientRect().width)}),[t]);const m=-1*o,h=i()("wp-block-jetpack-instagram-gallery__placeholder",{"is-loaded":s}),g=s?{margin:m}:{margin:m,height:l},f=i()({"is-loaded":s});return(0,r.createElement)("span",{style:g,className:h},(0,r.createElement)("img",{alt:n,className:f,ref:d,src:t}))}},78544:function(e,t,n){"use strict";n.d(t,{X:function(){return d},u:function(){return u}});var r=n(51806),a=n(4981),o=n(65736),i=n(70355),s=n(81427),c=n(8979),l=n(36420);const __=o.__,_x=o._x,u="instagram-gallery",d={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,a.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 d}});var r=n(13419),a=n(7211),o=n(86989),i=n.n(o),s=n(69307),c=n(65736),l=n(92819),u=n(696);const __=c.__;function d(e){let{accessToken:t,noticeOperations:n,selectedAccount:o,setAttributes:c,setImages:d,setSelectedAccount:p}=e;const[m,h]=(0,s.useState)(!1),[g,f]=(0,s.useState)(!1),[b,v]=(0,s.useState)([]),k=(0,r.Dp)();(0,s.useEffect)((()=>{!t&&k&&(f(!0),i()({path:"/wpcom/v2/instagram-gallery/connections"}).then((e=>{f(!1),v(e)})).catch((()=>{f(!1),v([])})))}),[t,k]),(0,s.useEffect)((()=>{u.D===o||(0,l.find)(b,{token:o})||p(void 0)}),[o,p,b]);return{connectToService:()=>{n.removeAllNotices(),h(!0),i()({path:"/wpcom/v2/instagram-gallery/connect-url"}).then((e=>{const t=new a.Z;t.open(e,"connect-to-instagram-popup","toolbar=0,location=0,menubar=0,"+t.getScreenCenterSpecs(700,700)),t.on("message",(e=>{let{keyring_id:t}=e;if(h(!1),t){const e=t.toString();c({accessToken:e}),p(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}),d([])},isConnecting:m,isRequestingUserConnections:g,userConnections:b}}},2681:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(13419),a=n(86989),o=n.n(a),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,a]=(0,s.useState)(),[l,u]=(0,s.useState)(!1),d=(0,r.Dp)();return(0,s.useEffect)((()=>{d||n||l||(e?t():(u(!0),o()({path:(0,c.addQueryArgs)("/jetpack/v4/connection/url",{from:"jetpack-block-editor",redirect:window.location.href})}).then((e=>{a(e),u(!1)}))))}),[d,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),a=n.n(r),o=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,d]=(0,o.useState)([]),[p,m]=(0,o.useState)(!1);return(0,o.useEffect)((()=>{t&&(n.removeAllNotices(),m(!0),a()({path:(0,s.addQueryArgs)("/wpcom/v2/instagram-gallery/gallery",{access_token:t,count:l.u})}).then((e=>{let{external_name:t,images:a}=e;if(m(!1),!a||!(0,c.isArray)(a))return n.createErrorNotice(__("An error occurred. Please try again later.","jetpack")),d([]),r({accessToken:void 0,instagramUser:void 0}),void i(void 0);(0,c.isEmpty)(a)&&n.createErrorNotice(__("No images were found in your Instagram account.","jetpack")),r({instagramUser:t}),d(a)})).catch((()=>{m(!1),d([]),r({accessToken:void 0,instagramUser:void 0}),i(void 0)})))}),[t,r,i]),{images:u,isLoadingGallery:p,setImages:d}}},64968:function(e,t,n){"use strict";n.d(t,{Cw:function(){return o},N3:function(){return r},sf:function(){return a}});const r="processing",a="success",o="error"},84038:function(e,t,n){"use strict";n.d(t,{Q:function(){return c}});var r=n(51806),a=n(55609),o=n(65736),i=n(64968),s=n(24535);const __=o.__;function c(e){let{auditionNotification:t,clearAudition:n,setAttributes:o,emailPlaceholder:c,processingLabel:l,successLabel:u,errorLabel:d,interests:p,signupFieldTag:m,signupFieldValue:h,connectURL:g}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.PanelBody,{title:__("Text Elements","jetpack")},(0,r.createElement)(a.TextControl,{label:__("Email Placeholder","jetpack"),value:c,onChange:e=>{o({emailPlaceholder:e}),n()}})),(0,r.createElement)(a.PanelBody,{title:__("Notifications","jetpack")},(0,r.createElement)(a.TextControl,{label:__("Processing text","jetpack"),value:l,onChange:e=>{o({processingLabel:e}),t(i.N3)}}),(0,r.createElement)(a.TextControl,{label:__("Success text","jetpack"),value:u,onChange:e=>{o({successLabel:e}),t(i.sf)}}),(0,r.createElement)(a.TextControl,{label:__("Error text","jetpack"),value:d,onChange:e=>{o({errorLabel:e}),t(i.Cw)}})),(0,r.createElement)(a.PanelBody,{title:__("Mailchimp Groups","jetpack")},(0,r.createElement)(s.Z,{interests:p,onChange:(e,t)=>{const n=[...new Set([...p,e])].filter((n=>!(n===e&&!t)&&n));o({interests:n})}}),(0,r.createElement)(a.ExternalLink,{href:"https://mailchimp.com/help/send-groups-audience/"},__("Learn about groups","jetpack"))),(0,r.createElement)(a.PanelBody,{title:__("Signup Location Tracking","jetpack")},(0,r.createElement)(a.TextControl,{label:__("Signup Field Tag","jetpack"),placeholder:__("SIGNUP","jetpack"),value:m,onChange:e=>o({signupFieldTag:e})}),(0,r.createElement)(a.TextControl,{label:__("Signup Field Value","jetpack"),placeholder:__("website","jetpack"),value:h,onChange:e=>o({signupFieldValue:e})}),(0,r.createElement)(a.ExternalLink,{href:"https://mailchimp.com/help/determine-webpage-signup-location/"},__("Learn about signup location tracking","jetpack"))),(0,r.createElement)(a.PanelBody,{title:__("Mailchimp Connection","jetpack")},(0,r.createElement)(a.ExternalLink,{href:g},__("Manage Connection","jetpack"))))}},748:function(e,t,n){"use strict";var r=n(4981),a=n(65736),o=n(92819);const __=a.__,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,o.omit)(e,i),n={text:(a=e).submitButtonText||__("Join my email list","jetpack"),textColor:a.textButtonColor,customTextColor:a.customTextButtonColor,backgroundColor:a.backgroundButtonColor,customBackgroundColor:a.customBackgroundButtonColor};var a;return[t,[(0,r.createBlock)("jetpack/button",{element:"button",uniqueId:"mailchimp-widget-id",...n})]]},isEligible:(e,t)=>(0,o.isEmpty)(t)||(0,o.some)((0,o.pick)(e,i),Boolean),save:()=>null}},43818:function(e,t,n){"use strict";var r=n(51806),a=n(13419),o=n(86989),i=n.n(o),s=n(52175),c=n(55609),l=n(69307),u=n(65736),d=n(96483),p=n(65235),m=n.n(p),h=n(64968),g=n(84038),f=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,a.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,d.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:a}=t;return e===h.N3?n:e===h.sf?r:e===h.Cw?a:null};roleForAuditionType=e=>e===h.Cw?"alert":"status";render=()=>{const{attributes:e,className:t,notices:n,noticeUI:a,setAttributes:o}=this.props,{audition:i,connected:u,connectURL:d,currentUserConnected:p}=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:f.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:f.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:d,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")))),P=(0,r.createElement)(c.Placeholder,{className:"wp-block-jetpack-mailchimp",icon:f.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:d},__("Connect to WordPress.com","jetpack"))),N=(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(g.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:d})),L=m()(t,{[`${S}_notication-audition`]:i}),T=(0,r.createElement)("div",{className:L},(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:[[f.Ss.name,f.Ss.attributes]],templateLock:"all"}),(0,r.createElement)(s.RichText,{tagName:"p",placeholder:__("Write consent text","jetpack"),value:b,onChange:e=>o({consentText:e}),inlineToolbar:!0}),i&&(0,r.createElement)("div",{className:`${S}_notification ${S}_${i}`,role:this.roleForAuditionType(i)},this.labelForAuditionType(i))),A=T;return(0,r.createElement)(l.Fragment,null,a,E&&A,!E&&0===u&&j,!E&&2===u&&p&&x,!E&&2===u&&!p&&P,!E&&1===u&&N,!E&&1===u&&T)}}t.Z=(0,c.withNotices)(b)},61204:function(e,t,n){"use strict";var r=n(31985),a=n(4495);(0,r.Z)(a.u2,a.Xd)},4495:function(e,t,n){"use strict";n.d(t,{Ss:function(){return m},Xd:function(){return h},qv:function(){return p},u2:function(){return d}});var r=n(51806),a=n(52175),o=n(55609),i=n(65736),s=n(70355),c=n(748),l=n(43818),u=n(84197);const __=i.__,_x=i._x,d="mailchimp",p=(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.G,{transform:"translate(-45.478101,-100.73059)"},(0,r.createElement)(o.G,{transform:"matrix(0.26458333,0,0,0.26458333,15.6741,59.72)"},(0,r.createElement)(o.Path,{d:"m 176.433,197.529 c 0.657,-0.078 1.286,-0.082 1.865,0 0.335,-0.768 0.392,-2.091 0.091,-3.532 -0.447,-2.142 -1.053,-3.438 -2.305,-3.236 -1.252,0.202 -1.298,1.754 -0.85,3.895 0.252,1.205 0.7,2.235 1.199,2.873"}),(0,r.createElement)(o.Path,{d:"m 165.688,199.224 c 0.895,0.393 1.446,0.654 1.661,0.426 0.139,-0.142 0.097,-0.413 -0.117,-0.762 -0.442,-0.721 -1.351,-1.453 -2.316,-1.864 -1.972,-0.849 -4.325,-0.567 -6.14,0.737 -0.599,0.439 -1.167,1.047 -1.086,1.416 0.026,0.119 0.116,0.209 0.326,0.239 0.494,0.056 2.22,-0.816 4.209,-0.938 1.403,-0.086 2.566,0.353 3.462,0.746"}),(0,r.createElement)(o.Path,{d:"m 163.887,200.252 c -1.167,0.184 -1.81,0.569 -2.223,0.926 -0.352,0.308 -0.57,0.649 -0.568,0.888 0.001,0.114 0.05,0.18 0.089,0.213 0.053,0.047 0.116,0.073 0.192,0.073 0.263,0 0.854,-0.237 0.854,-0.237 1.623,-0.581 2.694,-0.51 3.755,-0.39 0.586,0.066 0.864,0.102 0.992,-0.099 0.038,-0.058 0.084,-0.183 -0.033,-0.373 -0.273,-0.443 -1.451,-1.192 -3.057,-1.001"}),(0,r.createElement)(o.Path,{d:"m 172.805,204.025 c 0.792,0.389 1.664,0.236 1.948,-0.341 0.284,-0.577 -0.128,-1.361 -0.92,-1.75 -0.792,-0.389 -1.664,-0.236 -1.948,0.341 -0.284,0.578 0.128,1.361 0.92,1.75"}),(0,r.createElement)(o.Path,{d:"m 177.896,199.576 c -0.643,-0.011 -1.177,0.695 -1.192,1.578 -0.015,0.883 0.495,1.606 1.138,1.617 0.643,0.011 1.177,-0.695 1.192,-1.578 0.015,-0.882 -0.495,-1.606 -1.138,-1.617"}),(0,r.createElement)(o.Path,{d:"m 134.683,215.485 c -0.16,-0.201 -0.423,-0.14 -0.678,-0.08 -0.178,0.042 -0.379,0.088 -0.6,0.085 -0.473,-0.009 -0.874,-0.211 -1.099,-0.557 -0.293,-0.45 -0.276,-1.121 0.047,-1.889 l 0.151,-0.344 c 0.516,-1.158 1.379,-3.095 0.41,-4.941 -0.73,-1.39 -1.92,-2.255 -3.351,-2.437 -1.374,-0.174 -2.788,0.335 -3.69,1.33 -1.423,1.57 -1.646,3.707 -1.371,4.462 0.101,0.276 0.259,0.353 0.373,0.369 0.242,0.032 0.6,-0.144 0.824,-0.747 l 0.064,-0.196 c 0.1,-0.319 0.286,-0.913 0.591,-1.389 0.368,-0.574 0.94,-0.969 1.612,-1.114 0.684,-0.147 1.384,-0.016 1.97,0.368 0.997,0.652 1.381,1.874 0.955,3.039 -0.22,0.603 -0.578,1.756 -0.499,2.703 0.16,1.917 1.339,2.687 2.398,2.769 1.03,0.039 1.75,-0.54 1.932,-0.962 0.107,-0.25 0.017,-0.402 -0.042,-0.467"}),(0,r.createElement)(o.Path,{d:"m 144.475,180.275 c 3.36,-3.882 7.495,-7.257 11.2,-9.152 0.128,-0.066 0.264,0.073 0.195,0.199 -0.294,0.533 -0.861,1.674 -1.04,2.539 -0.028,0.135 0.119,0.236 0.233,0.159 2.305,-1.571 6.314,-3.255 9.831,-3.471 0.151,-0.009 0.224,0.184 0.104,0.277 -0.535,0.41 -1.12,0.978 -1.547,1.552 -0.073,0.098 -0.004,0.238 0.118,0.239 2.469,0.018 5.95,0.882 8.219,2.155 0.153,0.086 0.044,0.383 -0.128,0.344 -3.433,-0.787 -9.052,-1.384 -14.89,0.04 -5.211,1.271 -9.189,3.234 -12.09,5.344 -0.147,0.107 -0.323,-0.087 -0.204,-0.224 z m 16.732,37.612 0.001,0.002 0.002,0.004 z m 13.854,1.635 c 0.1,-0.042 0.168,-0.155 0.157,-0.268 -0.014,-0.139 -0.138,-0.24 -0.277,-0.226 0,0 -7.169,1.061 -13.942,-1.418 0.738,-2.398 2.699,-1.532 5.664,-1.293 5.344,0.319 10.134,-0.462 13.674,-1.478 3.067,-0.88 7.096,-2.616 10.225,-5.086 1.055,2.318 1.428,4.87 1.428,4.87 0,0 0.817,-0.146 1.5,0.274 0.645,0.397 1.118,1.222 0.795,3.356 -0.658,3.986 -2.352,7.222 -5.2,10.199 -1.734,1.866 -3.838,3.488 -6.246,4.668 -1.279,0.672 -2.64,1.253 -4.079,1.722 -10.736,3.507 -21.726,-0.348 -25.268,-8.626 -0.283,-0.622 -0.522,-1.274 -0.71,-1.955 -1.509,-5.455 -0.228,-12 3.778,-16.12 v -0.002 c 0.247,-0.262 0.499,-0.571 0.499,-0.96 0,-0.325 -0.207,-0.668 -0.386,-0.912 -1.402,-2.033 -6.257,-5.497 -5.282,-12.201 0.7,-4.816 4.912,-8.208 8.839,-8.007 l 0.995,0.057 c 1.702,0.101 3.186,0.319 4.587,0.378 2.345,0.102 4.453,-0.239 6.951,-2.32 0.842,-0.702 1.518,-1.311 2.661,-1.504 0.12,-0.021 0.419,-0.128 1.016,-0.1 0.61,0.033 1.19,0.2 1.711,0.547 2.002,1.332 2.286,4.559 2.39,6.919 0.059,1.347 0.222,4.607 0.278,5.543 0.127,2.14 0.69,2.441 1.828,2.816 0.64,0.211 1.234,0.368 2.11,0.614 2.65,0.744 4.221,1.499 5.212,2.469 0.591,0.606 0.866,1.25 0.951,1.864 0.312,2.28 -1.77,5.096 -7.283,7.655 -6.026,2.797 -13.337,3.505 -18.388,2.942 l -1.77,-0.2 c -4.04,-0.544 -6.345,4.677 -3.92,8.255 1.563,2.306 5.82,3.806 10.079,3.807 9.765,0.001 17.271,-4.169 20.063,-7.77 l 0.223,-0.318 c 0.138,-0.207 0.024,-0.321 -0.147,-0.204 -2.281,1.561 -12.413,7.758 -23.251,5.893 0,0 -1.317,-0.217 -2.519,-0.684 -0.955,-0.372 -2.955,-1.292 -3.198,-3.343 8.746,2.705 14.253,0.148 14.253,0.148 z m -48.039,-20.785 c -3.042,0.591 -5.723,2.315 -7.362,4.697 -0.98,-0.817 -2.805,-2.399 -3.128,-3.016 -2.617,-4.97 2.856,-14.632 6.68,-20.089 9.45,-13.485 24.25,-23.692 31.101,-21.84 1.114,0.315 4.803,4.592 4.803,4.592 0,0 -6.849,3.8 -13.2,9.097 -8.558,6.589 -15.022,16.166 -18.895,26.559 z m 5.111,22.805 c -0.46,0.079 -0.93,0.11 -1.404,0.098 -4.577,-0.123 -9.52,-4.243 -10.011,-9.129 -0.543,-5.401 2.217,-9.557 7.103,-10.543 0.584,-0.118 1.29,-0.186 2.051,-0.146 2.738,0.15 6.772,2.252 7.693,8.216 0.816,5.282 -0.48,10.659 -5.432,11.503 z m 61.996,-9.564 c -0.039,-0.139 -0.295,-1.072 -0.646,-2.197 -0.351,-1.126 -0.714,-1.917 -0.714,-1.917 1.408,-2.107 1.433,-3.992 1.245,-5.059 -0.2,-1.323 -0.751,-2.45 -1.861,-3.616 -1.11,-1.165 -3.381,-2.359 -6.572,-3.255 l -1.674,-0.465 c -0.008,-0.069 -0.088,-3.947 -0.16,-5.612 -0.053,-1.204 -0.156,-3.083 -0.739,-4.933 -0.695,-2.505 -1.905,-4.697 -3.416,-6.099 4.17,-4.322 6.773,-9.084 6.766,-13.168 -0.012,-7.855 -9.659,-10.232 -21.548,-5.309 l -2.519,1.069 c -0.011,-0.011 -4.554,-4.468 -4.622,-4.528 -13.555,-11.823 -55.935,35.284 -42.386,46.725 l 2.961,2.509 c -0.768,1.99 -1.07,4.27 -0.823,6.721 0.316,3.149 1.94,6.167 4.573,8.499 2.499,2.214 5.785,3.616 8.973,3.613 5.273,12.151 17.321,19.605 31.447,20.025 15.153,0.45 27.873,-6.66 33.203,-19.432 0.349,-0.896 1.828,-4.935 1.828,-8.501 0,-3.583 -2.026,-5.068 -3.316,-5.068"})))),m={name:"jetpack/button",attributes:{element:"button",text:__("Join my Mailchimp audience","jetpack"),uniqueId:"mailchimp-widget-id"}},h={title:__("Mailchimp","jetpack"),icon:{src:p,foreground:(0,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)(a.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),a=n(86989),o=n.n(a),i=n(55609),s=n(69307);class c extends s.Component{state={interest_categories:[]};componentDidMount(){this.retrieveGroups()}retrieveGroups=()=>{o()({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),a=n(55609),o=n(69307),i=n(65736),s=n(31852);const __=i.__;class c extends o.Component{render(){const{onClose:e,onAddPoint:t,onError:n,apiKey:o,mapProvider:i}=this.props;return(0,r.createElement)(a.Button,{className:"component__add-point"},__("Add marker","jetpack"),(0,r.createElement)(a.Popover,{className:"component__add-point__popover",position:"bottom center"},(0,r.createElement)(a.Button,{className:"component__add-point__close",onClick:e},(0,r.createElement)(a.Dashicon,{icon:"no"})),(0,r.createElement)(s.Z,{onAddPoint:t,label:__("Add a location","jetpack"),apiKey:o,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),a=n.n(r),o=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,o.createElement)(c.Z,a()({},n,{ref:t}))}return(0,o.createElement)(s.Z,a()({},e,{ref:t}))}));t.Z=l},75385:function(e,t,n){"use strict";var r=n(51806),a=n(61323),o=n(82891);t.Z=e=>"mapkit"===e.mapProvider?(0,r.createElement)(o.Z,e):(0,r.createElement)(a.Z,e)},61323:function(e,t,n){"use strict";var r=n(69307),a=n(84634);class o extends r.Component{componentDidMount(){const{mapboxgl:e}=this.props;this.el=document.createElement("DIV"),this.infowindow=(0,a.xt)(e),this.infowindow.setDOMContent(this.el),this.infowindow.on("close",this.closeClick)}componentDidUpdate(e){this.props.activeMarker!==e.activeMarker&&(this.props.activeMarker?this.openWindow():this.closeWindow())}render(){return this.el?(0,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()}}o.defaultProps={unsetActiveMarker:()=>{},activeMarker:null,map:null,mapboxgl:null},t.Z=o},82891:function(e,t,n){"use strict";var r=n(51806),a=n(55609),o=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,d]=(0,o.useState)(c),[p,m]=(0,o.useState)(!1),{title:h,caption:g}=u.find((t=>t.id===e?.id))||{},f=t=>{const n=c.map((n=>n.id===e.id?{...n,...t}:n));d(n),m(!0)};return(0,o.useEffect)((()=>{!e&&p&&l(u)}),[e,p,u,l]),(0,o.useEffect)((()=>{d(c),m(!1)}),[c]),e&&n?(0,o.createPortal)((0,r.createElement)(o.Fragment,null,i&&(0,r.createElement)(o.Fragment,null,(0,r.createElement)(a.TextControl,{label:__("Marker Title","jetpack"),value:h,onChange:e=>f({title:e})}),(0,r.createElement)(a.TextareaControl,{className:"wp-block-jetpack-map__marker-caption",label:__("Marker Caption","jetpack"),value:g,rows:"2",tag:"textarea",onChange:e=>f({caption:e})}),(0,r.createElement)(a.Button,{onClick:()=>{const n=c.filter((t=>t.id!==e.id));d(n),m(!0),t(null)},className:"wp-block-jetpack-map__delete-btn"},(0,r.createElement)(a.Dashicon,{icon:"trash",size:"15"})," ",__("Delete Marker","jetpack"))),!i&&(0,r.createElement)(o.Fragment,null,(0,r.createElement)("h3",null,h),(0,r.createElement)("p",null,g))),n):null};c.defaultProps={},t.Z=c},32333:function(e,t,n){"use strict";var r=n(69307),a=n(85007),o=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,a.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,o.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),a=n(55609),o=n(69307),i=n(65736),s=n(92819),c=n(85007),l=n(45388),u=n(90055),d=n(84634),p=n(51321),m=n(75385),h=n(32333);const __=i.__;class g extends o.Component{constructor(){super(...arguments),this.state={map:null,fit_to_bounds:!1,loaded:!1,mapboxgl:null},this.mapRef=(0,o.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:d,deleteActiveMarker:p,updateActiveMarker:g}=this,f=(0,s.get)(l,"props.point")||{},{title:b,caption:v}=f,k=o.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:d}))),w=u&&(0,r.createElement)(m.Z,{activeMarker:l,map:c,mapboxgl:u,unsetActiveMarker:()=>this.setState({activeMarker:null})},l&&t&&(0,r.createElement)(o.Fragment,null,(0,r.createElement)(a.TextControl,{label:__("Marker Title","jetpack"),value:b,onChange:e=>g({title:e})}),(0,r.createElement)(a.TextareaControl,{className:"wp-block-jetpack-map__marker-caption",label:__("Marker Caption","jetpack"),value:v,rows:"2",tag:"textarea",onChange:e=>g({caption:e})}),(0,r.createElement)(a.Button,{onClick:p,className:"wp-block-jetpack-map__delete-btn"},(0,r.createElement)(a.Dashicon,{icon:"trash",size:"15"})," ",__("Delete Marker","jetpack"))),l&&!t&&(0,r.createElement)(o.Fragment,null,(0,r.createElement)("h3",null,b),(0,r.createElement)("p",null,v)));return(0,r.createElement)(o.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:a,mapStyle:o,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(),a!==e.points&&this.setBoundsByMarkers(),a.length!==e.points.length&&this.clearCurrentMarker(),o===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,a=t.slice(0);(0,s.assign)(a[r],e),this.props.onSetPoints(a)};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,p.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:a}=this.props,{map:o,activeMarker:i,mapboxgl:s,zoomControl:c,boundsSetProgrammatically:l}=this.state;if(!o)return;if(r.length&&e?o.dragPan.disable():o.dragPan.enable(),!r.length)return;if(i)return;const u=(0,d.YB)(s,r);if(t(u.getCenter()),r.length>1){(0,d.k)(o,u),this.setState({boundsSetProgrammatically:!0});try{o.removeControl(c)}catch(e){}}else{if(o.setCenter(u.getCenter()),l){const e=12;o.setZoom(e),n(e)}else o.setZoom(parseInt(a,10));o.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:a,scrollToZoom:o,showFullscreenButton:i,admin:s}=this.props;let c=null;try{c=new t.Map({container:this.mapRef.current,style:this.getMapStyle(),center:(0,d.b2)(e),zoom:parseInt(n,10),pitchWithRotate:!1,attributionControl:!1,dragRotate:!1})}catch(e){return void a("mapbox_error",e.message)}o||c.scrollZoom.disable();const l=new t.FullscreenControl;c.on("error",(e=>{a("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)}))}}g.defaultProps={points:[],mapStyle:"default",zoom:13,onSetZoom:()=>{},onSetMapCenter:()=>{},onMapLoaded:()=>{},onMarkerClick:()=>{},onError:()=>{},markerColor:"red",apiKey:null,mapCenter:{},address:null},t.Z=g},99128:function(e,t,n){"use strict";var r=n(51806),a=n(69307),o=n(92819),i=n(32037),s=n(72672),c=n(96442),l=n(75385);const u=(0,a.forwardRef)(((e,t)=>{const{admin:n,points:c,onError:u,onSetPoints:p}=e,{loaded:m,error:h,mapkit:g,currentDoc:f,currentWindow:b}=(0,s.eV)(t),{map:v}=(0,s.$M)(g,m,t),k=a.Children.map(e.children,(e=>{if("AddPoint"===(0,o.get)(e,"props.tagName"))return e}));return(0,a.useEffect)((()=>{h&&u("mapkit_error",h)}),[h,u]),(0,r.createElement)(i.c,{value:{mapkit:g,map:v,loaded:m,currentDoc:f,currentWindow:b,admin:n,points:c,setPoints:p}},m&&g&&v?(0,r.createElement)(d,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"}))})),d=(0,a.memo)((e=>{let{address:t,mapCenter:n,mapStyle:r,zoom:o,onSetMapCenter:i,onSetZoom:l,onSetPoints:u,points:d,markerColor:p,onMarkerClick:m,onMapLoaded:h}=e;const{map:g,mapkit:f,setActiveMarker:b,setPreviousCenter:v,setCalloutReference:k,currentDoc:y}=(0,s.qw)(),w=(0,a.useRef)(m),E=(0,a.useRef)(u),_=(0,a.useCallback)((e=>{b(e),v(g.center),w.current&&w.current(e),g.setCenterAnimated(new f.Coordinate(e.coordinates.latitude,e.coordinates.longitude))}),[g,f,b,v,w]);return(0,s.LO)(n,i),(0,s.Xj)(r),(0,s.zZ)(o,l),(0,s.J2)(d,p,(0,c.eR)(y,k),_),(0,s.jo)(h),(0,s.mk)((e=>{b(null),e&&g.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),a=n(52175),o=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:d,instanceId:p,minHeight:m,removeAPIKey:h,updateAPIKey:g,setPointVisibility:f,mapProvider:b}=e;const v=e=>{n({align:e}),d.current?.sizeMap&&setTimeout(d.current.sizeMap,0)};return"toolbar"===u?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.BlockAlignmentToolbar,{value:t.align,onChange:v,controls:["center","wide","full"]}),(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarButton,{icon:c.X.markerIcon,label:__("Add a marker","jetpack"),onClick:f}))):(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.PanelColorSettings,{title:__("Colors","jetpack"),initialOpen:!0,colorSettings:[{value:t.markerColor,onChange:e=>n({markerColor:e}),label:__("Marker Color","jetpack")}]}),(0,r.createElement)(o.PanelBody,{title:__("Map Settings","jetpack")},(0,r.createElement)(o.BaseControl,{label:__("Height in pixels","jetpack"),id:`block-jetpack-map-height-input-${p}`},(0,r.createElement)("input",{type:"number",id:`block-jetpack-map-height-input-${p}`,className:"wp-block-jetpack-map__height_input",onChange:e=>{n({mapHeight:e.target.value}),e.target!==document.activeElement&&d.current&&setTimeout(d.current.sizeMap,0)},onBlur:e=>{const{mapHeight:r}=t;let a=parseInt(e.target.value,10);if(isNaN(a))a=null;else if(null==r){const e=d?.current?.mapRef??d;a=e?.current.offsetHeight}else a<m&&(a=m);n({mapHeight:a}),d.current.sizeMap&&setTimeout(d.current.sizeMap,0)},value:t.mapHeight||"",min:m,step:"10"})),(0,r.createElement)(o.RangeControl,{label:__("Zoom level","jetpack"),help:t.points.length>1&&__("The default zoom level cannot be changed when there are two or more markers on the map.","jetpack"),disabled:t.points.length>1,value:Math.round(t.zoom),onChange:e=>{n({zoom:e}),d.current&&d.current.updateZoom&&setTimeout(d.current.updateZoom,0)},min:0,max:22}),"mapbox"===b?(0,r.createElement)(o.ToggleControl,{label:__("Show street names","jetpack"),checked:t.mapDetails,onChange:e=>n({mapDetails:e})}):null,(0,r.createElement)(o.ToggleControl,{label:__("Scroll to zoom","jetpack"),help:__("Allow the map to capture scrolling, and zoom in or out.","jetpack"),checked:t.scrollToZoom,onChange:e=>n({scrollToZoom:e})}),"mapbox"===b?(0,r.createElement)(o.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)(o.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)(o.PanelBody,{title:__("Mapbox Access Token","jetpack"),initialOpen:!1},(0,r.createElement)(o.TextControl,{help:"wpcom"===i.apiKeySource&&(0,r.createElement)(r.Fragment,null,__("You can optionally enter your own access token.","jetpack")," ",(0,r.createElement)(o.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)(o.ButtonGroup,null,(0,r.createElement)(o.Button,{type:"button",onClick:g,disabled:!i.apiKeyControl||i.apiKeyControl===i.apiKey},__("Update Token","jetpack")),(0,r.createElement)(o.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),a=n(69307);class o extends a.Component{render(){const{attributes:e}=this.props,{align:t,mapStyle:n,mapDetails:a,points:o,zoom:i,mapCenter:s,markerColor:c,scrollToZoom:l,mapHeight:u}=e,d=o.map(((e,t)=>{const{longitude:n,latitude:a}=e.coordinates,o="https://www.google.com/maps/search/?api=1&query="+a+","+n;return(0,r.createElement)("li",{key:t},(0,r.createElement)("a",{href:o},e.title))})),p=t?`align${t}`:null;return(0,r.createElement)("div",{className:p,"data-map-style":n,"data-map-details":a,"data-points":JSON.stringify(o),"data-zoom":i,"data-map-center":JSON.stringify(s),"data-marker-color":c,"data-scroll-to-zoom":l||null,"data-map-height":u||null},o.length>0&&(0,r.createElement)("ul",null,d))}}t.Z=o},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),a=n(69307);class o extends a.Component{render(){const{attributes:e}=this.props,{align:t,mapStyle:n,mapDetails:a,points:o,zoom:i,mapCenter:s,markerColor:c,scrollToZoom:l,mapHeight:u,showFullscreenButton:d}=e,p=o.map(((e,t)=>{const{longitude:n,latitude:a}=e.coordinates,o="https://www.google.com/maps/search/?api=1&query="+a+","+n;return(0,r.createElement)("li",{key:t},(0,r.createElement)("a",{href:o},e.title))})),m=t?`align${t}`:null;return(0,r.createElement)("div",{className:m,"data-map-style":n,"data-map-details":a,"data-points":JSON.stringify(o),"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":d||null},o.length>0&&(0,r.createElement)("ul",null,p))}}t.Z=o},740:function(e,t,n){"use strict";var r=n(51806),a=n(86989),o=n.n(a),i=n(52175),s=n(55609),c=n(94333),l=n(9818),u=n(69307),d=n(65736),p=n(81518),m=n(2944),h=n(75890),g=n(53036),f=n(1555),b=n(96406),v=n(82695),k=n(32566);const __=d.__,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,f.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,a=e.attributes?.className;t&&n!==t&&this.geoCodeAddress(t,this.state.apiKey),r&&a!==r&&!this.state.apiKey&&(this.setState({apiState:0}),this.apiCall())};addPoint=e=>{const{attributes:t,setAttributes:n}=this.props,{points:r}=t,a=r.slice(0);let o=!1;r.map((t=>{t.id===e.id&&(o=!0)})),o||(a.push(e),n({points:a}),this.setState({addPointVisibility:!1}))};setPointVisibility=()=>{this.setState({addPointVisibility:!0})};updateAPIKeyControl=e=>{this.setState({apiKeyControl:e.target.value})};updateAPIKey=()=>{const{noticeOperations:e}=this.props,{apiKeyControl:t}=this.state;e.removeAllNotices(),t&&this.apiCall(t,"POST")};removeAPIKey=()=>{this.apiCall(null,"DELETE")};apiCall(){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:a}=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},(()=>{o()(s).then((e=>{let{service_api_key:t,service_api_key_source:r}=e;a.removeAllNotices();const o=t?2:1,i="wpcom"===r?"":t;this.setState({apiState:o,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,p.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:a,setAttributes:o}=this.props;a();const i=this.mapRef?.current?.mapRef??this.mapRef;if(i){o({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:a,notices:o,isSelected:c,instanceId:l,onResizeStart:d}=this.props,{address:f,mapDetails:k,points:w,zoom:E,mapCenter:_,markerColor:C,preview:S,mapHeight:j,showFullscreenButton:x}=n,{addPointVisibility:P,apiKey:N,apiKeyControl:L,apiState:T,apiRequestOutstanding:A}=this.state,I=this.getMapProvider(),R=(0,r.createElement)(u.Fragment,null,(0,r.createElement)(i.BlockControls,null,(0,r.createElement)(g.Z,{attributes:n,setAttributes:t,state:this.state,setPointVisibility:this.setPointVisibility,context:"toolbar",mapRef:this.mapRef,mapProvider:I})),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(g.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:I}))),M=(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")),B=(0,r.createElement)(s.Placeholder,{icon:v.X.icon,label:__("Map","jetpack"),notices:o,instructions:Z},(0,r.createElement)(u.Fragment,null,(0,r.createElement)("form",null,(0,r.createElement)("input",{type:"text",className:"components-placeholder__input",disabled:A,placeholder:__("Paste Token Here","jetpack"),value:L,onChange:this.updateAPIKeyControl}),(0,r.createElement)(s.Button,{variant:"secondary",disabled:A||!L||L.length<1,onClick:this.updateAPIKey},__("Set Token","jetpack"))))),D=c&&w.length<=1,F=(0,p.t)(v.X.styles,n.className),z=(0,r.createElement)(u.Fragment,null,R,(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:d,onResizeStop:this.onMapResize},(0,r.createElement)("div",{className:"wp-block-jetpack-map__map_wrapper"},(0,r.createElement)(h.Z,{ref:this.mapRef,address:f,scrollToZoom:D,showFullscreenButton:x,mapStyle:F||"default",mapDetails:k,mapHeight:j,points:w,zoom:E,mapCenter:_,markerColor:C,onSetZoom:e=>{t({zoom:e})},admin:!0,apiKey:N,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:I},c&&P&&(0,r.createElement)(m.Z,{onAddPoint:this.addPoint,onClose:()=>this.setState({addPointVisibility:!1}),apiKey:N,onError:this.onError,tagName:"AddPoint",mapProvider:I})))))),O=v.X.styles.find((e=>e.name===F)),U=(0,r.createElement)("div",null,(0,r.createElement)("img",{alt:__("Map Preview","jetpack"),src:O?O.preview:b}));return(0,r.createElement)(u.Fragment,null,a,S&&U,!S&&0===T&&M,!S&&1===T&&B,!S&&2===T&&z)}}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),a=n(85406);(0,r.Z)(a.u,a.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),a=n(55109),o=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:[o.Z,a.Z]}},31852:function(e,t,n){"use strict";var r=n(51806),a=n(3142),o=n(3156);t.Z=e=>{const t="mapbox"===e.mapProvider?a.Z:o.Z;return(0,r.createElement)(t,e)}},3142:function(e,t,n){"use strict";var r=n(51806),a=n(55609),o=n(69307),i=n(65736),s=n(96881);const c=(0,i.__)("Add a marker…","jetpack");class l extends o.Component{constructor(){super(...arguments),this.textRef=(0,o.createRef)(),this.containerRef=(0,o.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 a=new XMLHttpRequest;a.open("GET",r),a.onload=function(){if(200===a.status){const t=JSON.parse(a.responseText);e(t.features)}else{const e=JSON.parse(a.responseText);n(e.statusText,e.responseJSON.message),t(new Error("Mapbox Places Error"))}},a.send()}))};onReset=()=>{this.textRef.current.value=null};render(){const{label:e}=this.props;return(0,r.createElement)("div",{ref:this.containerRef},(0,r.createElement)(a.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:o,onChange:i,onKeyDown:s}=e;return(0,r.createElement)(a.TextControl,{placeholder:c,ref:this.textRef,onChange:i,"aria-expanded":t,"aria-owns":n,"aria-activedescendant":o,onKeyDown:s})}))))}}l.defaultProps={onError:()=>{}},t.Z=l},3156:function(e,t,n){"use strict";var r=n(51806),a=n(55609),o=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,o.useRef)(),u=(0,o.useRef)(),{mapkit:d}=(0,c.qw)(),p={name:"placeSearch",options:async e=>new Promise((function(t,n){new d.Search({includePointsOfInterest:!1}).autocomplete(e,((e,r)=>{if(e)return void n(e);const a=(r?.results.filter((e=>e.coordinate))??[]).map((e=>({...e,placeName:e.displayLines?.join(", ")})));t(a)}))})),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,o.useEffect)((()=>{setTimeout((()=>{i.current.querySelector("input").focus()}),50)}),[]),(0,r.createElement)("div",{ref:i},(0,r.createElement)(a.BaseControl,{label:t,className:"components-location-search"},(0,r.createElement)(s.Z,{completer:p,onReset:()=>{u.current.value=""}},(e=>{let{isExpanded:t,listBoxId:n,activeId:o,onChange:i,onKeyDown:s}=e;return(0,r.createElement)(a.TextControl,{placeholder:l,ref:u,onChange:i,"aria-expanded":t,"aria-owns":n,"aria-activedescendant":o,onKeyDown:s})}))))}},57897:function(e,t,n){"use strict";var r=n(51806),a=n(55609),o=n(69307);class i extends o.Component{constructor(){super(...arguments),this.state={selectedCell:null}}onDeletePoint=e=>{const t=parseInt(e.target.getAttribute("data-id")),{points:n,onChange:r}=this.props,a=n.slice(0);a.splice(t,1),r(a)};setMarkerField(e,t,n){const{points:r,onChange:a}=this.props,o=r.slice(0);o[n][e]=t,a(o)}render(){const{points:e}=this.props,t=e.map(((e,t)=>(0,r.createElement)(a.PanelBody,{title:e.placeTitle,key:e.id,initialOpen:!1},(0,r.createElement)(a.TextControl,{label:"Marker Title",value:e.title,onChange:e=>this.setMarkerField("title",e,t)}),(0,r.createElement)(a.TextareaControl,{label:"Marker Caption",value:e.caption,rows:"3",onChange:e=>this.setMarkerField("caption",e,t)}),(0,r.createElement)(a.Button,{"data-id":t,onClick:this.onDeletePoint,className:"component__locations__delete-btn"},(0,r.createElement)(a.Dashicon,{icon:"trash",size:"15"})," Delete Marker"))));return(0,r.createElement)("div",{className:"component__locations"},(0,r.createElement)(a.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),a=n(55609),o=n(94333),i=n(69307),s=n(65736),c=n(39630),l=n(65235),u=n.n(l),d=n(92819);const __=s.__,_n=s._n;function p(){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 a=e[r];let{keywords:o=[]}=a;if("string"==typeof a.label&&(o=[...o,a.label]),n.push(a),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,d.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):[]}))),a=p(n),o=a.length===this.state.filteredOptions.length?this.state.selectedIndex:0;this.setState({options:n,filteredOptions:a,selectedIndex:o,isOpen:a.length>0}),this.announce(a)}))}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?p(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 a;switch(e.keyCode){case c.UP:a=(0===n?r.length:n)-1,this.setState({selectedIndex:a});break;case c.DOWN:a=(n+1)%r.length,this.setState({selectedIndex:a});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:o,completer:i}=this.props,{selectedIndex:s,filteredOptions:c}=this.state,{key:l=""}=c[s]||{},{className:p}=i,m=c.length>0,h=m?`components-autocomplete-listbox-${o}`:null,g=m?`components-autocomplete-item-${o}-${l}`:null;return(0,r.createElement)("div",{className:"components-autocomplete"},n({isExpanded:m,listBoxId:h,activeId:g,onChange:e,onKeyDown:t}),m&&(0,r.createElement)(a.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,d.map)(c,((e,t)=>(0,r.createElement)(a.Button,{key:e.key,id:`components-autocomplete-item-${o}-${e.key}`,role:"option","aria-selected":t===s,disabled:e.isDisabled,className:u()("components-autocomplete__result",p,{"is-selected":t===s}),onClick:()=>this.select(e)},e.label))))))}}t.Z=(0,o.compose)([a.withSpokenMessages,o.withInstanceId,a.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 a},b2:function(){return r},k:function(){return o},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 a(e,t){const n=new e.LngLatBounds;return t.forEach((e=>{n.extend([e.coordinates.longitude,e.coordinates.latitude])})),n}function o(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 d},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 a=6371e3;function o(e){return Math.abs(a*Math.cos(e*Math.PI/180)*2*Math.PI/256)}function i(e,t){return 512/Math.pow(2,e)*.5*o(t)}function s(e,t){const n=e/o(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 a=new e.Coordinate(n.latitude-.5*(n.latitude-r.latitude),n.longitude+.5*(r.longitude-n.longitude)),o=new e.CoordinateSpan(1.3*Math.abs(n.latitude-r.latitude),1.3*Math.abs(r.longitude-n.longitude));return new e.CoordinateRegion(a,o)}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 a=e.createElement("script");a.addEventListener("load",(async()=>{const e=await(0,r.Dz)(t,"mapkit");t.mapkitScriptIsLoading=!1,n(e)}),{once:!0}),a.src="https://cdn.apple-mapkit.com/mk/5.x.x/mapkit.js",a.crossOrigin="anonymous",e.head.appendChild(a)}}))}function d(e,t,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 a=await fetch("https://public-api.wordpress.com/wpcom/v2/mapkit");if(200===a.status){e((await a.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 o},c:function(){return i}});var r=n(51806),a=n(69307);const o=(0,a.createContext)({map:null,mapkit:null,loaded:!1,activeMarker:null,calloutReference:null,currentDoc:null,currentWindow:null,admin:!1,setPoints:()=>{},points:[],previousCenter:null}),i=e=>{let{value:t,children:n}=e;const[i,s]=(0,a.useState)(null),[c,l]=(0,a.useState)(null),[u,d]=(0,a.useState)(null);return(0,r.createElement)(o.Provider,{value:{...t,activeMarker:i,setActiveMarker:s,calloutReference:c,setCalloutReference:l,previousCenter:u,setPreviousCenter:d}},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 g},eV:function(){return p},jo:function(){return v},mk:function(){return k},qw:function(){return d},wd:function(){return y},zZ:function(){return f}});var r=n(80428),a=n(9818),o=n(69307),i=n(65736),s=n(92819),c=n(85007),l=n(96442),u=n(32037);const __=i.__,d=()=>(0,o.useContext)(u.L),p=e=>{const[t,n]=(0,o.useState)(!1),[i,s]=(0,o.useState)(!1),[u,d]=(0,o.useState)(null),[p,m]=(0,o.useState)(null),[h,g]=(0,o.useState)(null);return(0,o.useEffect)((()=>{const t=(0,a.select)(r.t).getBlogId(),{currentDoc:o,currentWindow:i}=(0,c.bL)(e.current);if(e.current){m(i),g(o);const e=__("Failed to retrieve a Mapkit API token. Please try refreshing.","jetpack");i.mapkit?(d(i.mapkit),(0,l.E0)(i.mapkit,t,i).then((()=>{n(!0)}),(()=>{s(e)}))):(0,l.rZ)(o,i).then((r=>{d(r),(0,l.E0)(r,t,i).then((()=>{n(!0)}),(()=>{s(e)}))}))}}),[e]),{loaded:t,error:i,mapkit:u,currentDoc:h,currentWindow:p}},m=(e,t,n)=>{const[r,a]=(0,o.useState)(null);return(0,o.useEffect)((()=>{e&&t&&a(new e.Map(n.current,{showsMapTypeControl:!1}))}),[e,t,n]),{map:r}},h=(e,t)=>{const{mapkit:n,map:r}=d(),a=(0,o.useRef)(e),i=(0,o.useRef)(t);(0,o.useEffect)((()=>{if(!n||!r||!a.current)return;const e=a.current?.lat??a.current?.latitude,t=a.current?.lng??a.current?.longitude;"number"==typeof e&&"number"==typeof t&&(r.center=new n.Coordinate(e,t))}),[n,r,a]),(0,o.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])},g=e=>{const{mapkit:t,map:n}=d();(0,o.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])},f=(e,t)=>{const{mapkit:n,map:r,points:a}=d();(0,o.useEffect)((()=>{if(n&&r)if(a&&a.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,a),r.isZoomEnabled=!1,r.isScrollEnabled=!1}),[n,r,e,a]),(0,o.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:a,map:i,loaded:s}=d(),c=(0,o.useRef)(n),l=(0,o.useRef)(r);(0,o.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 a.MarkerAnnotation(new a.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,a,t,c,l])},v=e=>{const{map:t,loaded:n}=d(),r=(0,o.useRef)(e);(0,o.useEffect)((()=>{n&&r.current(t)}),[n,t,r])},k=e=>{const{map:t,previousCenter:n,loaded:r}=d(),a=(0,o.useRef)(e);(0,o.useEffect)((()=>{r&&t.addEventListener("single-tap",(()=>{a.current(n)}))}),[r,t,n,a])},y=(e,t)=>{const{mapkit:n,map:r}=d();(0,o.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,a={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([a])}}))}}),[n,r,e,t])}},19496:function(e,t,n){"use strict";var r=n(51806),a=n(69307),o=n(81518),i=n(82695);class s extends a.Component{render(){const{attributes:e}=this.props,{align:t,className:n,mapDetails:a,points:s,zoom:c,mapCenter:l,markerColor:u,scrollToZoom:d,mapHeight:p,showFullscreenButton:m}=e,h=(0,o.t)(i.X.styles,n),g=s.map(((e,t)=>{const{longitude:n,latitude:a}=e.coordinates,o="https://www.google.com/maps/search/?api=1&query="+a+","+n;return(0,r.createElement)("li",{key:t},(0,r.createElement)("a",{href:o},e.title))})),f=t?`align${t}`:null;return(0,r.createElement)("div",{className:f,"data-map-style":h,"data-map-details":a,"data-points":JSON.stringify(s),"data-zoom":c,"data-map-center":JSON.stringify(l),"data-marker-color":u,"data-scroll-to-zoom":d||null,"data-map-height":p||null,"data-show-fullscreen-button":m||null},s.length>0&&(0,r.createElement)("ul",null,g))}}t.Z=s},82695:function(e,t,n){"use strict";n.d(t,{X:function(){return h}});var r=n(51806),a=n(65736),o=n(80469),i=n(7247),s=n(13925),c=n(24873),l=n(25685),u=n(81667),d=n(15387),p=n(32566);const __=a.__,_x=a._x,m=(0,p.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:o},{name:"satellite",label:__("Satellite","jetpack"),preview:"mapkit"===m?u:l},{name:"terrain",label:__("Terrain","jetpack"),preview:d}],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),a=n(52175),o=n(94333),i=n(9818),s=n(69307),c=n(65736),l=n(65235),u=n.n(l),d=n(69283);const __=c.__,p="editor",m="preview";class h extends s.Component{input=null;state={activePanel:p};bindInput=e=>{this.input=e};componentDidUpdate(e){e.isSelected&&!this.props.isSelected&&this.state.activePanel===m&&this.toggleMode(p)(),!e.isSelected&&this.props.isSelected&&this.state.activePanel===p&&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:a}=this.props,o=u()(a,"components-button components-tab-button",{"is-pressed":n===e});return(0,r.createElement)("button",{className:o,onClick:this.toggleMode(e)},(0,r.createElement)("span",null,t))}render(){const{attributes:e,className:t,isSelected:n}=this.props,{source:o}=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)(a.BlockControls,null,(0,r.createElement)("div",{className:"components-toolbar"},this.renderToolbarButton(p,__("Markdown","jetpack")),this.renderToolbarButton(m,__("Preview","jetpack")))),i!==m&&n?(0,r.createElement)(a.PlainText,{className:`${t}__editor`,onChange:this.updateSource,onKeyDown:this.handleKeyDown,"aria-label":__("Markdown","jetpack"),innerRef:this.bindInput,value:o}):(0,r.createElement)(d.Z,{className:`${t}__preview`,source:o}))}}t.Z=(0,o.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),a=n(80723);(0,r.Z)(a.u,a.X)},80723:function(e,t,n){"use strict";n.d(t,{X:function(){return b},u:function(){return p}});var r=n(51806),a=n(13419),o=n(55609),i=n(69307),s=n(65736),c=n(70355),l=n(5820),u=n(461),d=n(2683);const __=s.__,_x=s._x,p="markdown",m=__("Try Markdown","jetpack"),h=__("Markdown is a text formatting syntax that is converted into HTML. You can _emphasize_ text or **make it strong** with just a few characters.","jetpack"),g=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 208 128"},(0,r.createElement)(o.Rect,{width:"198",height:"118",x:"5",y:"5",ry:"10",stroke:"currentColor",strokeWidth:"10",fill:"none"}),(0,r.createElement)(o.Path,{d:"M30 98v-68h20l20 25 20-25h20v68h-20v-39l-20 25-20-25v39zM155 98l-30-33h20v-35h20v35h20z"})),f=(0,a.Wp)()||(0,a.Ug)()?"https://en.support.wordpress.com/markdown-quick-reference/":"https://jetpack.com/support/jetpack-blocks/markdown-block/",b={title:__("Markdown","jetpack"),description:(0,r.createElement)(i.Fragment,null,(0,r.createElement)("p",null,__("Add headings, lists, or links to plain text with ease.","jetpack")),(0,r.createElement)(o.ExternalLink,{href:f},__("Support reference","jetpack"))),icon:{src:g,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:d.Z,example:{attributes:{source:`## ## ${m}\n\n${h}`}}}},69283:function(e,t,n){"use strict";var r=n(51806),a=n(52175),o=n(69307),i=n(65736),s=n(10185),c=n.n(s),l=n(82339),u=n.n(l);const __=i.__,d=new(c())({typographer:!0}).use(u()),p=e=>{if("A"===e.target.nodeName){window.confirm(__("Are you sure you wish to leave this page?","jetpack"))||e.preventDefault()}},m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,a.__experimentalGetSpacingClassesAndStyles)?.(e);return t?.style?t.style:{}};t.Z=e=>{let{className:t,source:n="",attributes:a}=e;return(0,r.createElement)(o.RawHTML,{className:t,onClick:p,style:m(a)},n.length?d.render(n):"")}},2683:function(e,t,n){"use strict";var r=n(51806),a=n(69283);t.Z=e=>{let{attributes:t,className:n}=e;return(0,r.createElement)(a.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 o},ez:function(){return p},fL:function(){return l},jn:function(){return s},vW:function(){return i}});var r=n(65736),a=n(92819);const __=r.__,o=[{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=o.map((e=>e.value));const s={name:"button",label:__("Button (210 x 113 pixels)","jetpack")},c=e=>(0,a.compact)([{name:"standard",label:__("Standard (224 x 301 pixels)","jetpack"),isDefault:!0},{name:"tall",label:__("Tall (288 x 490 pixels)","jetpack")},{name:"wide",label:__("Wide (840 x 150 pixels)","jetpack")},(!e||1===e.length)&&s]),l=e=>c(e).map((e=>e.name)),u=window?.Jetpack_Editor_Initial_State?.siteLocale??"en-US",d=!(0,a.isEmpty)(u)&&i.includes(u)?u:"en-US",p={rid:{default:[],type:"array"},style:{default:"standard",type:"string",validValues:l()},iframe:{default:!0,type:"boolean"},domain:{default:"com",type:"string"},lang:{default:d,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),a=n(31283);t.Z={attributes:a.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),a=n(31283);t.Z={attributes:a.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),a=n(13419),o=n(52175),i=n(4981),s=n(55609),c=n(69307),l=n(65736),u=n(65235),d=n.n(u),p=n(92819),m=n(81518),h=n(4554),g=n(31283),f=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)(g.ez,t);(0,p.isEqual)(j,t)||C(j);const{align:x,rid:P,iframe:N,domain:L,lang:T,newtab:A,negativeMargin:I}=t,R=(0,p.isEmpty)(P),M=(0,m.t)((0,g.Eo)(),t.className),Z=(0,m.t)((0,g.Eo)(P),t.className),B=(0,v.Z)(Z),D=(0,p.isEqual)(P,["1"]);(0,c.useEffect)((()=>{if(E.removeAllNotices(),!R&&!D&&"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})}}),[D,x,R,P,Z]),(0,c.useEffect)((()=>{"button"===M&&Array.isArray(P)&&P.length>1&&C({className:"",style:""})}),[P,M,C]),(0,c.useEffect)((()=>{y&&(Array.isArray(P)&&P.length>1?(0,i.unregisterBlockStyle)("jetpack/opentable",["button"]):(0,i.registerBlockStyle)("jetpack/opentable",g.jn))}),[y,P]),(0,c.useEffect)((()=>{"wide"===B&&"wide"===x&&C({align:""}),"wide"===Z&&B&&Z!==B&&C({align:"wide"}),C({style:Z})}),[Z]);const F=(0,g.fL)(P),z=e=>P.length>1?["multi","button"!==e?e:"standard"]:["button"===e?"button":"standard","button"===e?"standard":e],O=e=>{Array.isArray(e)?C({rid:e,style:e.length>1&&"button"===Z?"standard":Z}):(e=>{const t=(0,k.CC)(e);t||(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)(g.ez,t);C(n),E.removeAllNotices()})(e)},U=(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.InspectorAdvancedControls,null,(0,r.createElement)(s.ToggleControl,{label:__("Load the widget in an iFrame (Recommended)","jetpack"),checked:N,onChange:()=>C({iframe:!N}),className:"is-opentable"}),"button"===Z&&(0,r.createElement)(s.ToggleControl,{label:__("Remove button margin","jetpack"),checked:I,onChange:()=>C({negativeMargin:!I})})),(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(s.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(b.Z,{rids:P,onChange:O}),(0,r.createElement)(s.SelectControl,{label:__("Language","jetpack"),value:T,onChange:e=>C({lang:e}),options:g.V1}),(0,r.createElement)(s.ToggleControl,{label:__("Open in a new window","jetpack"),checked:A,onChange:()=>C({newtab:!A})})))),H=(0,a.Wp)()||(0,a.Ug)()?"https://en.support.wordpress.com/wordpress-editor/blocks/opentable-block/":"https://jetpack.com/support/jetpack-blocks/opentable-block/",V=(0,r.createElement)(s.Placeholder,{label:__("OpenTable Reservation","jetpack"),icon:f.Z,instructions:__("Enter your restaurant name, or paste an OpenTable Reservation Widget embed code.","jetpack"),notices:_},(0,r.createElement)(b.Z,{rids:P,onSubmit:O}),(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")))),G=d()(n,{[`is-style-${Z}`]:!R&&F.includes(Z)&&-1===n.indexOf("is-style"),"is-placeholder":R,"is-multi":"multi"===z(Z)[0],[`align${x}`]:x,"has-no-margin":I});return(0,r.createElement)(r.Fragment,null,_,(0,r.createElement)("div",{className:G},!R&&U,R?V:(e=>{const[t,n]=z(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,p.join)(P,"%2C")}&type=${t}&theme=${n}&overlay=false&domain=${L}&lang=${T&&g.vW.includes(T)?T:"en-US"}&newtab=${A}&disablega=true`}))})()))}))},92482:function(e,t,n){"use strict";var r=n(31985),a=n(69309);(0,r.Z)(a.u2,a.Xd)},15040:function(e,t,n){"use strict";var r=n(51806),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 16",fill:"none",height:"16",width:"22"},(0,r.createElement)(a.Path,{d:"m1.997 5.982c-.39457-.00039-.7804.11622-1.108699.33511-.328295.21888-.584312.5302-.735674.89459-.15136174.36439-.1912714.76548-.1146819 1.15254.0765899.38707.2662379.74274.5449639 1.02202.278726.27929.634011.46965 1.020921.54702.38692.07732.78809.03826 1.15278-.11238.36469-.15063.67652-.40602.89606-.73387.21954-.32786.33693-.71345.33733-1.10803v-.002c.001-1.1-.89-1.994-1.992-1.995zm12.006 3.988c-.3946.0004-.7805-.11625-1.1088-.33517-.3283-.21893-.5843-.53031-.7357-.89476-.1513-.36444-.1912-.76558-.1145-1.15268s.2664-.74276.5453-1.022c.2788-.27925.6342-.46953 1.0211-.54679.387-.07725.7882-.038 1.1529.11278.3647.15079.6764.40634.8959.73432.2194.32799.3366.71369.3368 1.1083v.003c.0003.52814-.2092 1.03477-.5824 1.4085s-.8795.58397-1.4076.5845zm0-9.96999843c-1.5777-.0009886-3.1203.46588743-4.43262 1.34158843-1.31236.8757-2.33558 2.1209-2.94025 3.57813-.60467 1.45722-.76365 3.06103-.45683 4.60861.30683 1.54757 1.06567 2.96947 2.18058 4.08577 1.1149 1.1163 2.53582 1.8769 4.08302 2.1856 1.5472.3088 3.1512.1518 4.6091-.451 1.458-.6028 2.7045-1.6245 3.5819-2.9358.8773-1.3112 1.3461-2.8532 1.3471-4.4309v-.005c.0008-2.11466-.8384-4.14304-2.3331-5.63899-1.4946-1.495952-3.5222-2.3369478-5.6369-2.33800843z"}))},69309:function(e,t,n){"use strict";n.d(t,{Xd:function(){return h},u2:function(){return m}});var r=n(51806),a=n(4981),o=n(65736),i=n(70355),s=n(31283),c=n(80452),l=n(70398),u=n(76851),d=n(15040),p=n(48769);const __=o.__,_x=o._x,m="opentable",h={title:__("OpenTable","jetpack"),description:__("Book a reservation with OpenTable.","jetpack"),icon:{src:d.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")&&(p.pU.test(e.textContent)||p.tC.test(e.textContent)),transform:e=>{const t=(0,p.CC)(e.textContent);return(0,a.createBlock)("jetpack/opentable",t)}}]},deprecated:[c.Z,l.Z]}},57087:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(82674),a=n.n(r),o=n(51806),i=n(55609),s=n(69307),c=n(65736),l=n(92819),u=n(25392);const __=c.__,_n=c._n,d=20;function p(e){const[t,n]=(0,s.useState)(""),r=(0,u.Z)(t,d),[c,p]=(0,s.useState)(e.rids||[]),m=/^(\d+)$|\(\#(\d+)\)$/,h=r.filter((e=>c.indexOf(e.rid.toString())<0)).map((e=>e.name+` (#${e.rid})`)),g=(0,o.createElement)(i.FormTokenField,a()({value:c,suggestions:h,saveTransform:e=>u.$.test(e)?"":e.trim(),onInputChange:n,maxSuggestions:d,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]}));p(n),e.onChange&&e.onChange(n)}}));return(0,o.createElement)("div",{className:"wp-block-jetpack-opentable-restaurant-picker"},e.onSubmit?(0,o.createElement)("form",{onSubmit:n=>{n.preventDefault(),e.onSubmit((0,l.isEmpty)(c)?t:c)}},g,(0,o.createElement)(i.Button,{variant:"secondary",type:"submit"},__("Embed","jetpack"))):g)}},41007:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);function a(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 o},Z:function(){return i}});var r=n(69307),a=n(92819);const o=/^\s*(http[s]?:\/\/|\<script)/;function i(e,t){const[n,i]=(0,r.useState)([]),s=(0,r.useCallback)((0,a.throttle)((function(){fetch("https://www.opentable.com/widget/reservation/restaurant-search?pageSize="+t+"&query="+encodeURIComponent(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")).then((e=>e.json())).then((e=>i((0,a.unionBy)(n,e.items,"rid"))))}),500),[n]);return(0,r.useEffect)((()=>{(0,a.isEmpty)(e)||o.test(e)||s(e)}),[e]),n}},48769:function(e,t,n){"use strict";n.d(t,{CC:function(){return i},pU:function(){return o},tC:function(){return a}});const r=/<\s*script[^>]*src\s*=\s*["']?([^"']*)/i,a=/restref=([0-9]+)&/,o=/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 a=n.getAll("rid");if(a&&0!==a.length||(a=n.getAll("restref")),!a||0===a.length)return;const o={};a&&(o.rid=a);const i=n.get("domain");i&&(o.domain=i);const s=n.get("iframe");s&&(o.iframe=s);const c=n.get("lang");c&&(o.lang=c);const l=n.get("newtab");return l&&(o.newtab=l),r&&(o.style=r),o})((e=>{const t=e.match(r);return t&&t[1]?t[1]:a.test(e)||o.test(e)?e:void 0})(e))}},14119:function(e,t,n){"use strict";var r=n(51806),a=n(52175),o=n(9818),i=n(69307),s=n(92694),c=n(65235),l=n.n(c),u=n(2327),d=n(16367),p=n(7652);const m=["jetpack/recurring-payments"];t.Z=function(e){let{clientId:t,attributes:n}=e;const{layout:c,fontSize:h}=n,{connectUrl:g,isApiConnected:f}=(0,o.useSelect)((e=>{const{getConnectUrl:t,isApiStateConnected:n}=e(p.h);return{connectUrl:t(),isApiConnected:n()}})),b=(0,o.useSelect)((e=>e("core/block-editor").getBlock(t).innerBlocks.filter((e=>"jetpack/recurring-payments"===e.name))),[t]);(0,i.useEffect)((()=>{(0,s.addFilter)("jetpack.recurringPayments.editorSettings","jetpack/payment-buttons-hide-nudges-from-inner-blocks",((e,t)=>b.some((e=>e.clientId===t))?{...e,showStripeNudge:!1,showUpgradeNudge:!1}:e))}),[b]);const v=!f&&!!g,k=(0,a.useBlockProps)({className:l()({"has-custom-font-size":!!h||n?.style?.typography?.fontSize})}),y=(0,a.useInnerBlocksProps)(k,{allowedBlocks:m,orientation:"horizontal",template:[["jetpack/recurring-payments"]],templateInsertUpdatesSelection:!0,__experimentalLayout:c});return delete y.id,delete y["data-block"],(0,r.createElement)("div",k,v&&(0,r.createElement)(a.BlockControls,{group:"block"},(0,r.createElement)(u.Z,{blockName:"jetpack/payment-buttons",connectUrl:g})),v&&(0,r.createElement)(d.U,{blockName:"payment-buttons"}),(0,r.createElement)("div",y))}},27780:function(e,t,n){"use strict";var r=n(31985),a=n(5364);(0,r.Z)(a.u2,a.Xd)},5364:function(e,t,n){"use strict";n.d(t,{Xd:function(){return f},u2:function(){return p}});var r=n(51806),a=n(13419),o=n(55609),i=n(69307),s=n(65736),c=n(70355),l=n(56367),u=n(14119),d=n(60357);const __=s.__,p="payment-buttons",m=__("Payment Buttons","jetpack"),h=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,r.createElement)(o.G,null,(0,r.createElement)(o.Path,{d:"M20 4H4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h16c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zm0 2v2H4V6h16zM4 18v-6h16v6H4zm2-4h7v2H6v-2zm9 0h3v2h-3v-2z"}))),g=(0,a.Wp)()||(0,a.Ug)()?"https://wordpress.com/support/video-tutorials-add-payments-features-to-your-site-with-our-guides/#how-to-use-the-payments-block-video":"https://jetpack.com/support/jetpack-blocks/payments-block/",f={apiVersion:2,title:m,icon:{src:h,foreground:(0,c.m)()},description:(0,r.createElement)(i.Fragment,null,(0,r.createElement)("p",null,__("Sell products and subscriptions.","jetpack")),(0,r.createElement)(o.ExternalLink,{href:g},__("Support reference","jetpack"))),category:"earn",keywords:[...new Set([l.Xd.title,...l.Xd.keywords])],edit:u.Z,save:d.Z,supports:{__experimentalExposeControlsToChildren:!0,align:["wide","full"],spacing:{blockGap:!0,margin:["vertical"],__experimentalDefaultControls:{blockGap:!0}},__experimentalLayout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}},typography:{fontSize:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}}}}},60357:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(51806),a=n(52175),o=n(65235),i=n.n(o);function s(e){let{attributes:t}=e;const n=i()({"has-custom-font-size":!!t?.fontSize||t?.style?.typography?.fontSize}),o=a.useBlockProps.save({className:n}),s=a.useInnerBlocksProps.save(o);return(0,r.createElement)("div",s)}},48620:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806),a=n(55609);function o(e){let{variations:t,onSelect:n,label:o}=e;return(0,r.createElement)("ul",{"aria-label":o,className:"wp-block-jetpack-payments-intro__variation-picker"},t.map((e=>(0,r.createElement)("li",{key:e.name},(0,r.createElement)(a.Button,{variant:"secondary",icon:e.icon,iconSize:48,onClick:()=>n(e),className:"wp-block-jetpack-payments-intro__variation-picker__variation",label:e.description||e.title}),(0,r.createElement)("span",{className:"wp-block-jetpack-payments-intro__variation-picker__variation-label",role:"presentation"},e.title)))))}},50215:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(51806),a=n(52175),o=n(4981),i=n(55609),s=n(9818),c=n(69307),l=n(65736),u=n(92819),d=n(48620),p=n(31654),m=n(76039);const __=l.__;function h(e){let{name:t,clientId:n,className:l}=e;const h=e=>e.categories?.includes("shop"),{blockType:g,hasInnerBlocks:f,hasPatterns:b,settings:v}=(0,s.useSelect)((e=>{const{getBlocks:r,__experimentalGetAllowedPatterns:i,getSettings:s}=e(a.store);return{settings:s(),blockType:(0,o.getBlockType)(t),hasInnerBlocks:r(n)?.length>0,hasPatterns:i?.().filter(h).length>0}})),{replaceBlock:k,selectBlock:y,updateSettings:w}=(0,s.useDispatch)(a.store),E=(0,c.useCallback)((e=>{!0===v?.allowedBlockTypes||v?.allowedBlockTypes?.includes(e)||w({...v,allowedBlockTypes:[...v.allowedBlockTypes,e]})}),[v,w]),_=e=>{const t=e.name;E(t),k(n,(0,o.createBlock)(t)),y(n)},C=m.Z.filter((e=>(0,o.getBlockType)(e.name)));(0,c.useEffect)((()=>{f||o.registerBlockVariation||_(C[0])}));const S=C.length&&o.registerBlockVariation;let j=__("Please select which kind of payment you'd like to add.","jetpack");return b&&(j=__("Start by choosing one of our suggested layout patterns.","jetpack")),!f&&S?(0,r.createElement)(i.Placeholder,{icon:(0,u.get)(g,["icon","src"]),label:(0,u.get)(g,["title"]),instructions:j,className:l},b&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(p.Z,{onBlockPatternSelect:e=>k(n,e.map(o.cloneBlock)),patternFilter:h}),(0,r.createElement)("p",null,__("Or use one of our blocks to create your own.","jetpack"))),(0,r.createElement)(d.Z,{label:__("Payment Block list","jetpack"),variations:C,onSelect:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C[0];_(e)}})):(0,r.createElement)(a.InnerBlocks,null)}},5477:function(e,t,n){"use strict";var r=n(31985),a=n(68007);(0,r.Z)(a.u2,a.Xd)},68007:function(e,t,n){"use strict";n.d(t,{Xd:function(){return m},u2:function(){return p}});var r=n(51806),a=n(52175),o=n(65736),i=n(64967),s=n(70355),c=n(29800),l=n(50851),u=n(56367),d=n(50215);const __=o.__,_x=o._x,p="payments-intro",m={title:__("Payments","jetpack"),description:__("Sell products and services or receive donations on your website","jetpack"),icon:{src:i.Z,foreground:(0,s.m)()},category:"earn",keywords:[...new Set([c.Xd.title,...c.Xd.keywords,u.Xd.title,...u.Xd.keywords,l.X.title,...l.X.keywords,_x("paid","block search term","jetpack"),_x("pay","block search term","jetpack"),_x("money","block search term","jetpack"),_x("checkout","block search term","jetpack")])],supports:{alignWide:!1,className:!0,customClassName:!1,html:!1,reusable:!1},edit:d.Z,save:()=>(0,r.createElement)(a.InnerBlocks.Content,null)}},31654:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(51806),a=n(52175),o=n(55609),i=n(69307),s=n(65736);const __=s.__;function c(e){let{onBlockPatternSelect:t,patternFilter:n}=e;const[s,c]=(0,i.useState)(!1);return a.__experimentalBlockPatternSetup?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.Button,{variant:"primary",onClick:()=>c(!0),className:"wp-payments-intro-pattern-picker__opener"},__("Choose a pattern","jetpack")),s&&(0,r.createElement)(o.Modal,{className:"wp-block-jetpack-payments-intro__pattern-picker__selection-modal",title:__("Choose a pattern","jetpack"),closeLabel:__("Cancel","jetpack"),onRequestClose:()=>c(!1)},(0,r.createElement)(a.__experimentalBlockPatternSetup,{onBlockPatternSelect:t,filterPatternsFn:n}))):null}},76039:function(e,t,n){"use strict";var r=n(29800),a=n(5364),o=n(50851);const i=[[r.u2,r.Xd],[a.u2,a.Xd],[o.u,o.X]].map((e=>{let[t,n]=e;return{name:t.includes("/")?t:"jetpack/"+t,title:n.title,description:n.description,icon:n.icon.src??n.icon}}));t.Z=i},2415:function(e,t,n){"use strict";var r=n(51806),a=n(13419),o=n(52175),i=n(55609),s=n(37798),c=n(9818),l=n(12238),u=n(69307),d=n(65736),p=n(61074),m=n(79404),h=n(24955),g=n(79201),f=n(17746),b=n(40083),v=n(19617),k=n(52143),y=n(7652);const __=d.__;t.Z=function(e){let{className:t}=e;const n=(0,c.useSelect)((e=>e(l.store).getCurrentPostType()),[]),d=(0,v._)(n),[,w]=(0,s.useEntityProp)("postType",n,"meta"),{stripeConnectUrl:E,hasNewsletterPlans:_}=(0,c.useSelect)((e=>{const{getNewsletterProducts:t,getConnectUrl:n}=e("jetpack/membership-products");return{stripeConnectUrl:n(),hasNewsletterPlans:0!==t()?.length}})),[C,S]=(0,u.useState)(!1);function j(e){b.So.paid_subscribers.key!==e||!E&&_?w({[b.lx]:e}):S(!0)}(0,u.useEffect)((()=>{d&&d!==b.So.everybody.key||w({[b.lx]:b.So.subscribers.key})}),[d,w]);const x=e=>e===b.So.paid_subscribers.key?b.So.paid_subscribers.label:b.So.subscribers.label,P=(e=>{switch(e){case b.So.subscribers.key:return __("Subscriber-only content below","jetpack");case b.So.paid_subscribers.key:return __("Paid content below this line","jetpack");default:return __("Paywall","jetpack")}})(d),N={width:`${P.length+1.2}em`,userSelect:"none"},{emailSubscribers:L,paidSubscribers:T}=(0,c.useSelect)((e=>e(y.h).getSubscriberCounts()));let A=d??b.So.subscribers.key;return A===b.So.everybody.key&&(A=b.So.subscribers.key),(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:t},(0,r.createElement)("span",{style:N},P,(0,r.createElement)(p.Z,{icon:m.Z,size:16}))),(0,r.createElement)(o.BlockControls,{__experimentalShareWithChildBlocks:!0,group:"block"},(0,r.createElement)(i.ToolbarDropdownMenu,{className:"product-management-control-toolbar__dropdown-button",icon:h.Z,text:x(d)},(e=>{let{onClose:t}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.MenuGroup,null,(0,r.createElement)(i.MenuItem,{onClick:()=>{j(b.So.subscribers.key),t()},isSelected:d===b.So.subscribers.key,icon:d===b.So.subscribers.key&&g.Z,iconPosition:"right"},x(b.So.subscribers.key)),(0,r.createElement)(i.MenuItem,{onClick:()=>{j(b.So.paid_subscribers.key),t()},isSelected:d===b.So.paid_subscribers.key,icon:d===b.So.paid_subscribers.key&&g.Z,iconPosition:"right"},x(b.So.paid_subscribers.key))))}))),(0,r.createElement)(f.Z,{closeDialog:()=>S(!1),showDialog:C}),(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(i.PanelBody,{className:"jetpack-subscribe-newsletters-panel",title:__("Content access","jetpack"),icon:(0,r.createElement)(a.Pm,null),initialOpen:!0},(0,r.createElement)(i.RadioControl,{onChange:j,options:[{label:`${b.So.subscribers.label} (${(0,k.Y6)(b.So.subscribers.key,L,T)})`,value:b.So.subscribers.key},{label:`${b.So.paid_subscribers.label} (${(0,k.Y6)(b.So.paid_subscribers.key,L,T)})`,value:b.So.paid_subscribers.key}],selected:A,help:__("Choose who will be able to read the content below the paywall block.","jetpack")}))))}},83759:function(e,t,n){"use strict";var r=n(4981),a=n(9818),o=n(12238),i=n(31985),s=n(31223);const c=(0,a.subscribe)((()=>{const e=(0,a.select)(o.store).getCurrentPostType();null!==e&&(c(),e&&"post"!==e&&(0,r.unregisterBlockType)("jetpack/"+s.u2))}));(0,i.Z)(s.u2,s.Xd)},31223:function(e,t,n){"use strict";n.d(t,{Xd:function(){return p},pG:function(){return d},qv:function(){return l},u2:function(){return u}});var r=n(51806),a=n(55609),o=n(65736),i=n(70355),s=n(2415),c=n(68900);const __=o.__,_x=o._x,l=(0,r.createElement)(a.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M4 16.7134L20 16.7134V15.106H4V16.7134Z"}),(0,r.createElement)(a.Path,{d:"M16 21H20V19.3925H16V21Z"}),(0,r.createElement)(a.Path,{d:"M14 21H10V19.3925H14V21Z"}),(0,r.createElement)(a.Path,{d:"M4 21H8V19.3925H4V21Z"}),(0,r.createElement)(a.Path,{d:"M11.471 6.37162C11.2294 6.55286 11.1538 6.74395 11.1538 6.88519C11.1538 7.02644 11.2294 7.21752 11.471 7.39877C11.7108 7.57865 12.0728 7.70953 12.5 7.70953C13.1349 7.70953 13.7344 7.90158 14.1907 8.24382C14.6451 8.5847 15 9.11491 15 9.77039C15 10.4259 14.6451 10.9561 14.1907 11.297C13.8758 11.5331 13.4928 11.6978 13.0769 11.7771V12.0373C13.0769 12.3788 12.8186 12.6556 12.5 12.6556C12.1814 12.6556 11.9231 12.3788 11.9231 12.0373V11.7771C11.5072 11.6978 11.1242 11.5331 10.8093 11.297C10.3549 10.9561 10 10.4259 10 9.77039C10 9.42893 10.2583 9.15213 10.5769 9.15213C10.8955 9.15213 11.1538 9.42893 11.1538 9.77039C11.1538 9.91163 11.2294 10.1027 11.471 10.284C11.7108 10.4638 12.0728 10.5947 12.5 10.5947C12.9272 10.5947 13.2892 10.4638 13.529 10.284C13.7706 10.1027 13.8462 9.91163 13.8462 9.77039C13.8462 9.62914 13.7706 9.43806 13.529 9.25681C13.2892 9.07693 12.9272 8.94605 12.5 8.94605C11.8651 8.94605 11.2656 8.754 10.8093 8.41176C10.3549 8.07089 10 7.54067 10 6.88519C10 6.22971 10.3549 5.6995 10.8093 5.35863C11.1242 5.12246 11.5072 4.95781 11.9231 4.87844V4.61826C11.9231 4.2768 12.1814 4 12.5 4C12.8186 4 13.0769 4.2768 13.0769 4.61826V4.87844C13.4928 4.95781 13.8758 5.12246 14.1907 5.35863C14.6451 5.6995 15 6.22971 15 6.88519C15 7.22665 14.7417 7.50345 14.4231 7.50345C14.1045 7.50345 13.8462 7.22665 13.8462 6.88519C13.8462 6.74395 13.7706 6.55286 13.529 6.37162C13.2892 6.19174 12.9272 6.06085 12.5 6.06085C12.0728 6.06085 11.7108 6.19174 11.471 6.37162Z"})),u="paywall",d="jetpack/paywall",p={title:__("Paywall","jetpack"),description:__("Limit access to the content below this block to chosen subscribers.","jetpack"),icon:{src:l,foreground:(0,i.m)()},category:"earn",keywords:[_x("more","block search term","jetpack"),_x("email","block search term","jetpack"),_x("follow","block search term","jetpack"),_x("gated","block search term","jetpack"),_x("memberships","block search term","jetpack"),_x("newsletter","block search term","jetpack"),_x("signin","block search term","jetpack"),_x("subscribe","block search term","jetpack"),_x("subscription","block search term","jetpack"),_x("subscriptions","block search term","jetpack")],supports:{customClassName:!1,html:!1,multiple:!1},parent:["core/post-content"],edit:s.Z,save:()=>null,example:{attributes:{}},transforms:c.Z}},68900:function(e,t,n){"use strict";var r=n(4981),a=n(31223);const o={from:[{type:"block",blocks:["core/more","core/nextpage"],transform:()=>(0,r.createBlock)(`jetpack/${a.u2}`)}],to:[{type:"block",blocks:["core/more"],transform:()=>(0,r.createBlock)("core/more")},{type:"block",blocks:["core/nextpage"],transform:()=>(0,r.createBlock)("core/nextpage")}]};t.Z=o},15774:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(51806),a=n(55609),o=n(65736),i=n(66094);const __=o.__,_x=o._x;function s(e){let{className:t,onSubmit:n,noticeUI:o,url:s,setUrl:c}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(a.Placeholder,{label:__("Pinterest","jetpack"),icon:i.qv,notices:o},(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)(a.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),a=n(4981),o=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)(o.Button,{variant:"link",onClick:()=>{const e=(0,r.createElement)("a",{href:t},t);n((0,a.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),a=n(55609),o=n(65736);const __=o.__;function i(){return(0,r.createElement)("div",{className:"wp-block-embed is-loading"},(0,r.createElement)(a.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),a=n(55609),o=n(65736);const __=o.__;function i(e){let{setEditingState:t}=e;return(0,r.createElement)(a.ToolbarGroup,null,(0,r.createElement)(a.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),a=n(34098);t.Z={attributes:{url:{type:"string"}},supports:{align:!1,html:!1},save:e=>{let{attributes:t,className:n}=e;const{url:o}=t;return(0,a.t)(o)?(0,r.createElement)("div",{className:n},(0,r.createElement)("a",{"data-pin-do":(0,a.t)(o),href:o})):null}}},43529:function(e,t,n){"use strict";var r=n(51806),a=n(52175),o=n(55609),i=n(69307),s=n(15774),c=n(89488),l=n(13647),u=n(89852),d=n(18867),p=n(34098);t.Z=(0,o.withNotices)((function(e){let{attributes:t,isSelected:n,className:m,noticeOperations:h,noticeUI:g,setAttributes:f,onReplace:b}=e;const{url:v}=t,{isFetching:k,pinterestUrl:y,testUrl:w,hasTestUrlError:E}=(0,d.Z)(),[_,C]=(0,i.useState)(!1),[S,j]=(0,i.useState)(""),[x,P]=(0,i.useState)(!1),N=(0,i.useCallback)((()=>(0,r.createElement)(c.Z,{fallbackUrl:S,onClick:b})),[E]),L=()=>{k||(w(S),P(!1))},T=()=>{C(!0)};if((0,i.useEffect)((()=>{v&&w(v)}),[]),(0,i.useEffect)((()=>{!n&&_&&C(!1)}),[n,_]),(0,i.useEffect)((()=>{f({url:y}),h.removeAllNotices(),y&&j(y),E&&h.createErrorNotice(N())}),[y,E,f,N]),k)return(0,r.createElement)(l.Z,null);const A=(0,p.t)(v);if(x||!v||v&&!A)return(0,r.createElement)(s.Z,{className:m,onSubmit:L,noticeUI:g,url:S,setUrl:j});const I=`<a data-pin-do='${A}' href='${v}'></a>`;return(0,r.createElement)("div",{className:m},(0,r.createElement)(a.BlockControls,null,(0,r.createElement)(u.C,{setEditingState:P})),(0,r.createElement)("div",null,(0,r.createElement)(o.SandBox,{html:I,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),a=n(66094);(0,r.Z)(a.u2,a.Xd)},18867:function(e,t,n){"use strict";var r=n(69307),a=n(66094),o=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!==a.a0&&(n(!0),(0,o.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 d},Xd:function(){return f},a0:function(){return p},qv:function(){return g},u2:function(){return m}});var r=n(51806),a=n(4981),o=n(55609),i=n(65736),s=n(70355),c=n(15479),l=n(43529),u=n(54709);const __=i.__,_x=i._x,d=/^\s*https?:\/\/(?:www\.)?(?:[a-z]{2}\.)?(?:pinterest\.[a-z.]+|pin\.it)\/([^/]+)(\/[^/]+)?/i,p="https://pinterest.com/anapinskywalker/",m="pinterest",h=__("Pinterest","jetpack"),g=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,r.createElement)(o.G,null,(0,r.createElement)(o.Path,{d:"M12,2C6.477,2,2,6.477,2,12c0,4.236,2.636,7.855,6.356,9.312c-0.087-0.791-0.166-2.005,0.035-2.869c0.182-0.78,1.173-4.971,1.173-4.971s-0.299-0.599-0.299-1.484c0-1.39,0.806-2.429,1.809-2.429c0.853,0,1.265,0.641,1.265,1.409c0,0.858-0.546,2.141-0.828,3.329c-0.236,0.996,0.499,1.807,1.481,1.807c1.777,0,3.144-1.874,3.144-4.579c0-2.394-1.72-4.068-4.177-4.068c-2.845,0-4.515,2.134-4.515,4.34c0,0.859,0.331,1.781,0.744,2.282c0.082,0.099,0.094,0.186,0.069,0.287C8.18,14.682,8.011,15.361,7.978,15.5c-0.044,0.183-0.145,0.222-0.334,0.134c-1.249-0.581-2.03-2.407-2.03-3.874c0-3.154,2.292-6.051,6.607-6.051c3.469,0,6.165,2.472,6.165,5.775c0,3.446-2.173,6.22-5.189,6.22c-1.013,0-1.966-0.526-2.292-1.148c0,0-0.501,1.909-0.623,2.377c-0.226,0.869-0.835,1.957-1.243,2.622C9.975,21.844,10.969,22,12,22c5.523,0,10-4.477,10-10C22,6.477,17.523,2,12,2z"}))),f={title:h,description:__("Embed a Pinterest pin, board, or user.","jetpack"),icon:{src:g,foreground:(0,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&&d.test(e.textContent),transform:e=>(0,a.createBlock)("jetpack/pinterest",{url:e.textContent.trim()})}]},example:{attributes:{url:p}},deprecated:[c.Z]}},54709:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(51806);function a(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 o}});var r=n(96483),a=n(66094);function o(e){if(!a.Wh.test(e))return"";const t=(0,r.getPath)(e);return t?t.startsWith("pin/")?"embedPin":t.match(/^([^/]+)\/?$/)?"embedUser":t.match(/^([^/]+)\/([^/]+)\/?$/)?"embedBoard":"":""}},98075:function(e,t,n){"use strict";n.d(t,{G:function(){return s},q:function(){return c}});var r=n(86989),a=n.n(r),o=n(96483),i=n(63226);const s=async()=>await a()({path:"/wpcom/v2/podcast-player/track-quantity"}),c=async e=>{let t,n,r,{url:s,guids:c=[],fetchEpisodeOptions:l=!1}=e;try{t=await a()({path:(0,o.addQueryArgs)("/wpcom/v2/podcast-player",{url:s,guids:c,"episode-options":l})})}catch(e){n=e}if(t)return{type:i.u,data:t};try{r=await a()({path:(0,o.addQueryArgs)("/oembed/1.0/proxy",{url:s})})}catch(e){}const u='<a href="'+s+'">'+s+"</a>";if(r&&r.html!==u)return{type:i.b};throw n}},30723:function(e,t,n){"use strict";var r=n(96483),a=n(24381);t.Z={url:{type:"string",validator:r.isUrl},selectedEpisodes:{type:"array",default:[]},itemsToShow:{type:"integer",default:5},showCoverArt:{type:"boolean",default:!0},showEpisodeTitle:{type:"boolean",default:!0},showEpisodeDescription:{type:"boolean",default:!0},primaryColor:{type:"string"},customPrimaryColor:{type:"string",validator:a.Z},hexPrimaryColor:{type:"string",validator:a.Z},secondaryColor:{type:"string"},customSecondaryColor:{type:"string",validator:a.Z},hexSecondaryColor:{type:"string",validator:a.Z},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:a.Z},hexBackgroundColor:{type:"string",validator:a.Z},exampleFeedData:{type:"object"}}},77715:function(e,t,n){"use strict";var r=n(51806),a=n(69307),o=n(65235),i=n.n(o),s=n(29431);const c=(0,a.memo)((e=>{let{playerId:t,title:n,cover:a,link:o,track:i,children:s,showEpisodeTitle:c,showCoverArt:u,showEpisodeDescription:d,colors:p}=e;return u||c||d?(0,r.createElement)("div",{className:"jetpack-podcast-player__header"},(0,r.createElement)("div",{className:"jetpack-podcast-player__current-track-info"},u&&a&&(0,r.createElement)("div",{className:"jetpack-podcast-player__cover"},(0,r.createElement)("img",{className:"jetpack-podcast-player__cover-image",src:a,alt:""})),c&&!!(n||i&&i.title)&&(0,r.createElement)(l,{playerId:t,title:n,link:o,track:i,colors:p})),!!(d&&i&&i.description)&&(0,r.createElement)("p",{id:`${t}__track-description`,className:"jetpack-podcast-player__track-description"},i.description),s):s})),l=(0,a.memo)((e=>{let{playerId:t,title:n,link:a,track:o,colors:c={primary:{name:null,custom:null,classes:""}}}=e;return(0,r.createElement)("h2",{id:`${t}__title`,className:"jetpack-podcast-player__title"},!(!o||!o.title)&&(0,r.createElement)("span",{className:i()("jetpack-podcast-player__current-track-title",c.primary.classes),style:{color:c.primary.custom}},o.title,(0,r.createElement)("a",{className:"jetpack-podcast-player__track-title-link",href:o.link||o.src,target:"_blank",rel:"noopener noreferrer nofollow"},s.Z)),!!(o&&o.title&&n)&&(0,r.createElement)("span",{className:"jetpack-podcast-player--visually-hidden"}," - "),!!n&&(0,r.createElement)(u,{title:n,link:a,colors:c}))})),u=(0,a.memo)((e=>{let{title:t,link:n}=e;return(0,r.createElement)("span",{className:"jetpack-podcast-player__podcast-title"},n?(0,r.createElement)("a",{className:"jetpack-podcast-player__link",href:n,target:"_blank",rel:"noopener noreferrer nofollow"},t):{title:t})}));t.Z=c},39122:function(e,t,n){"use strict";var r=n(51806),a=n(69307),o=n(97115),i=n(72862);const s=(0,a.memo)((e=>{let{playerId:t,tracks:n,selectTrack:a,currentTrack:s,playerState:c,colors:l}=e;return(0,r.createElement)("ol",{className:"jetpack-podcast-player__tracks","aria-labelledby":`jetpack-podcast-player__tracklist-title--${t}`,"aria-describedby":`jetpack-podcast-player__tracklist-description--${t}`},n.map(((e,t)=>{const n=s===t;return(0,r.createElement)(i.Z,{key:e.id,index:t,track:e,selectTrack:a,isActive:n,isPlaying:n&&c===o.Wp,isError:n&&c===o.Vy,colors:l})})))}));t.Z=s},71600:function(e,t,n){"use strict";var r=n(51806),a=n(25158),o=n(94333),i=n(9818),s=n(69307),c=n(65736),l=n(65235),u=n.n(l),d=n(72752),p=n(97115),m=n(66085),h=n(77715),g=n(39122),f=n(71540);const __=c.__;class b extends s.Component{state={currentTrack:0,hasUserInteraction:!1};recordUserInteraction=()=>{this.state.hasUserInteraction||this.setState({hasUserInteraction:!0})};selectTrack=e=>{const{currentTrack:t}=this.state;if(t===e)return this.recordUserInteraction(),void this.props.toggleMediaSource(this.props.playerId);-1!==t&&this.props.pauseMediaSource(this.props.playerId),this.loadAndPlay(e)};loadTrack=e=>{const t=this.getTrack(e);if(!t)return!1;this.state.currentTrack!==e&&this.setState({currentTrack:e});const{title:n,link:r,description:o}=t;return this.props.updateMediaSourceData(this.props.playerId,{title:n,link:r}),(0,a.speak)(/* translators: %s is the track title. It describes the current state of the track as "Loading: [track title]". */ `${(0,c.sprintf)(__("Loading: %s","jetpack"),n)} ${o}`,"assertive"),!0};loadAndPlay=e=>{this.recordUserInteraction(),this.loadTrack(e)&&this.props.playMediaSource(this.props.playerId)};getTrack=e=>this.props.tracks[e];handleError=e=>{if(!this.state.hasUserInteraction){const t=window.navigator.userAgent.match(/Trident\/7\./)?"IE11: Playing sounds in webpages setting is not checked":e;this.setState((()=>{throw new Error(t)}))}this.props.errorMediaSource(this.props.playerId),(0,a.speak)(`${__("Error: Episode unavailable - Open in a new tab","jetpack")}`,"assertive")};handlePlay=()=>{this.props.playMediaSource(this.props.playerId),this.setState({hasUserInteraction:!0})};handlePause=()=>{this.props.pauseMediaSource(this.props.playerId),this.props.playerState!==p.Vy&&this.props.pauseMediaSource(this.props.playerId)};handleTimeChange=e=>{this.props.setMediaSourceCurrentTime(this.props.playerId,e)};handleJump=()=>{this.props.setMediaSourceCurrentTime(this.props.playerId,this.props.currentTime-5)};handleSkip=()=>{this.props.setMediaSourceCurrentTime(this.props.playerId,this.props.currentTime+30)};updateMediaData=e=>{this.props.updateMediaSourceData(this.props.playerId,{duration:e.target?.duration,domId:e.target?.id})};registerPlayer(){const e=this.getTrack(this.state.currentTrack)||{},{playerId:t}=this.props;this.props.registerMediaSource(t,{title:e.title,link:e.link,state:p._5}),this.props.setDefaultMediaSource(t)}componentDidMount(){this.props.playerId&&this.registerPlayer()}componentWillUnmount(){this.props.playerId&&this.props.unregisterMediaSource(this.props.playerId)}componentDidUpdate(e){const t=e=>e?.length?e.map((e=>e.guid)):[],n=t(this.props.tracks),r=new Set(t(e.tracks));n.length===r.size&&n.every((e=>r.has(e)))||this.loadTrack(0)}static getDerivedStateFromProps(e,t){return e.tracks.length<=t.currentTrack?{...t,currentTrack:0}:null}render(){const{playerId:e,title:t,link:n,cover:a,tracks:o,attributes:i,currentTime:s,playerState:l}=this.props,{itemsToShow:p,primaryColor:f,customPrimaryColor:b,hexPrimaryColor:v,secondaryColor:k,customSecondaryColor:y,hexSecondaryColor:w,backgroundColor:E,customBackgroundColor:_,hexBackgroundColor:C,showCoverArt:S,showEpisodeTitle:j,showEpisodeDescription:x}=i,{currentTrack:P}=this.state,N=o.slice(0,p),L=this.getTrack(P),T=(0,m.Aq)({primaryColor:f,customPrimaryColor:b,secondaryColor:k,customSecondaryColor:y,backgroundColor:E,customBackgroundColor:_}),A={color:y,backgroundColor:_,"--jetpack-podcast-player-primary":v,"--jetpack-podcast-player-secondary":w,"--jetpack-podcast-player-background":C},I=u()("jetpack-podcast-player",l,T.secondary.classes,T.background.classes);return(0,r.createElement)("section",{className:I,style:A,"aria-labelledby":t||L&&L.title?`${e}__title`:void 0,"aria-describedby":L&&L.description?`${e}__track-description`:void 0,"data-jetpack-iframe-ignore":!0},(0,r.createElement)(h.Z,{playerId:e,title:t,link:n,cover:a,track:this.getTrack(P),showCoverArt:S,showEpisodeTitle:j,showEpisodeDescription:x,colors:T},(0,r.createElement)(d.Z,{onJumpBack:this.handleJump,onSkipForward:this.handleSkip,trackSource:this.getTrack(P).src,onPlay:this.handlePlay,onPause:this.handlePause,onError:this.handleError,playStatus:l,currentTime:s,onTimeChange:this.handleTimeChange,onMetadataLoaded:this.updateMediaData})),N.length>1&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("h4",{id:`jetpack-podcast-player__tracklist-title--${e}`,className:"jetpack-podcast-player--visually-hidden"},(0,c.sprintf)( // translators: %s is the track title. __("Playlist: %s","jetpack"),t)),(0,r.createElement)("p",{id:`jetpack-podcast-player__tracklist-description--${e}`,className:"jetpack-podcast-player--visually-hidden"},__("Select an episode to play it in the audio player.","jetpack")),(0,r.createElement)(g.Z,{playerId:e,playerState:l,currentTrack:P,tracks:N,selectTrack:this.selectTrack,colors:T})))}}b.defaultProps={title:"",cover:"",link:"",attributes:{url:null,itemsToShow:5,showCoverArt:!0,showEpisodeTitle:!0,showEpisodeDescription:!0},tracks:[]},t.Z=(0,o.compose)([f.Z,(0,i.withSelect)(((e,t)=>{const{playerId:n}=t,{getMediaSourceCurrentTime:r,getMediaPlayerState:a}=e(p.tT);return{currentTime:r(n),playerState:a(n)}})),(0,i.withDispatch)((e=>{const{registerMediaSource:t,updateMediaSourceData:n,unregisterMediaSource:r,setDefaultMediaSource:a,playMediaSource:o,pauseMediaSource:i,toggleMediaSource:s,errorMediaSource:c,setMediaSourceCurrentTime:l}=e(p.tT);return{registerMediaSource:t,updateMediaSourceData:n,unregisterMediaSource:r,setDefaultMediaSource:a,playMediaSource:o,pauseMediaSource:i,toggleMediaSource:s,errorMediaSource:c,setMediaSourceCurrentTime:l}}))])(b)},46843:function(e,t,n){"use strict";var r=n(51806),a=n(69307),o=n(65736);const __=o.__,i=(0,a.memo)((e=>{let{link:t,title:n,colors:a}=e;return(0,r.createElement)("div",{className:"jetpack-podcast-player__track-error"},__("Episode unavailable. ","jetpack"),t&&(0,r.createElement)("span",{className:a.secondary.classes,style:{color:a.secondary.custom}},(0,r.createElement)("a",{className:"jetpack-podcast-player__link",href:t,rel:"noopener noreferrer nofollow",target:"_blank"},(0,r.createElement)("span",{className:"jetpack-podcast-player--visually-hidden"},`${(0,o.sprintf)(/* translators: %s is the title of the track. This text is visually hidden from the screen, but available to screen readers. */ __("%s:","jetpack"),n)} `),__("Open in a new tab","jetpack"))))}));t.Z=i},96817:function(e,t,n){"use strict";var r=n(51806),a=n(69307),o=n(65736),i=n(69650);const __=o.__,s=(0,a.memo)((e=>{let t,n,{isPlaying:a,isError:o,className:s}=e;o?(n="error", /* translators: This is text to describe the current state. This will go before the track title, such as "Error: [The title of the track]". */ t=__("Error:","jetpack")):a&&(n="playing", /* translators: Text to describe the current state. This will go before the track title, such as "Playing: [The title of the track]". */ t=__("Playing:","jetpack"));const c=i[n];return c?(0,r.createElement)("span",{className:`${s} ${s}--${n}`},(0,r.createElement)("span",{className:"jetpack-podcast-player--visually-hidden"},`${t} `),c):(0,r.createElement)("span",{className:s})}));t.Z=s},72862:function(e,t,n){"use strict";var r=n(51806),a=n(69307),o=n(65736),i=n(65235),s=n.n(i),c=n(66085),l=n(46843),u=n(96817);const __=o.__,d=(0,a.memo)((e=>{let{track:t,isActive:n,isPlaying:a,isError:o,selectTrack:i,index:d,colors:p={primary:{},secondary:{}}}=e;const m=(0,c.Gd)("color",p.primary.name),h=(0,c.Gd)("color",p.secondary.name),g=s()("jetpack-podcast-player__track",{"is-active":n,"has-primary":n&&(p.primary.name||p.primary.custom),[m]:n&&!!m,"has-secondary":!n&&(p.secondary.name||p.secondary.custom),[h]:!n&&!!h}),f={};n&&p.primary.custom&&!m?f.color=p.primary.custom:n||!p.secondary.custom||h||(f.color=p.secondary.custom);const /* translators: This needs to be a single word with no spaces. It describes the current item in the group. A screen reader will announce it as "[title], current track". */ b=n?__("track","jetpack"):void 0;return(0,r.createElement)("li",{className:g,style:Object.keys(f).length?f:null},(0,r.createElement)("a",{className:"jetpack-podcast-player__link jetpack-podcast-player__track-link",href:t.link||t.src,role:"button","aria-current":b,onClick:e=>{e.shiftKey||e.metaKey||e.altKey||(e.preventDefault(),i(d))},onKeyDown:e=>{" "===event.key&&(e.preventDefault(),i(d))}},(0,r.createElement)(u.Z,{className:"jetpack-podcast-player__track-status-icon",isPlaying:a,isError:o}),(0,r.createElement)("span",{className:"jetpack-podcast-player__track-title"},t.title),t.duration&&(0,r.createElement)("time",{className:"jetpack-podcast-player__track-duration",dateTime:t.duration},t.duration)),n&&o&&(0,r.createElement)(l.Z,{link:t.link,title:t.title,colors:p}))}));t.Z=d},71540:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(51806),a=n(69307),o=n(65736);const __=o.__;function i(e){class t extends a.Component{state={didError:!1,isIE11AudioIssue:!1};componentDidCatch=(e,t)=>{this.props.onError(e,t)};static getDerivedStateFromError=e=>({didError:!0,isIE11AudioIssue:!!e.message.match(/IE11/)});render(){const{didError:t,isIE11AudioIssue:n}=this.state;return t?(0,r.createElement)("section",{className:"jetpack-podcast-player"},(0,r.createElement)("p",{className:"jetpack-podcast-player__error"},n?__('The podcast player cannot be displayed as your browser settings do not allow for sounds to be played in webpages. This can be changed in your browser’s "Internet options" settings. In the "Advanced" tab you will have to check the box next to "Play sounds in webpages" in the "Multimedia" section. Once you have confirmed that the box is checked, please press "Apply" and then reload this page.',"jetpack"):__("An unexpected error occured within the Podcast Player. Reloading this page might fix the problem.","jetpack",0))):(0,r.createElement)(e,this.props)}}return t.defaultProps={onError:()=>{}},t}},63226:function(e,t,n){"use strict";n.d(t,{b:function(){return a},u:function(){return r}});const r="podcast-feed",a="embed-block"},16542:function(e,t,n){"use strict";var r=n(96483),a=n(24381);const o={url:{type:"string",validator:r.isUrl},itemsToShow:{type:"integer",default:5},showCoverArt:{type:"boolean",default:!0},showEpisodeDescription:{type:"boolean",default:!0},primaryColor:{type:"string"},customPrimaryColor:{type:"string",validator:a.Z},hexPrimaryColor:{type:"string",validator:a.Z},secondaryColor:{type:"string"},customSecondaryColor:{type:"string",validator:a.Z},hexSecondaryColor:{type:"string",validator:a.Z},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:a.Z},hexBackgroundColor:{type:"string",validator:a.Z},exampleFeedData:{type:"object"}};t.Z={attributes:o,supports:{align:!1,alignWide:!0,anchor:!1,customClassName:!0,className:!0,html:!1,multiple:!0,reusable:!0},save:()=>null}},99800:function(e,t,n){"use strict";var r=n(51806),a=n(13419),o=n(52175),i=n(4981),s=n(55609),c=n(94333),l=n(9818),u=n(69307),d=n(65736),p=n(96483),m=n(51128),h=n.n(m),g=n(92819),f=n(43718),b=n(85007),v=n(4554),k=n(98075),y=n(30723),w=n(71600),E=n(63226),_=n(13331),C=n(93610),S=n(66085);const __=d.__,j=h()("jetpack:podcast-player:edit"),x=(0,a.Wp)()||(0,a.Ug)()?"http://en.support.wordpress.com/wordpress-editor/blocks/podcast-player-block/":"https://jetpack.com/support/jetpack-blocks/podcast-player-block/";t.Z=(0,c.compose)([(0,l.withDispatch)(((e,t)=>{let{clientId:n,attributes:r}=t;return{replaceWithEmbedBlock(){e("core/block-editor").replaceBlock(n,(0,i.createBlock)("core/embed",{url:r.url}))}}})),(0,o.withColors)("backgroundColor",{primaryColor:"color"},{secondaryColor:"color"}),s.withNotices,c.withInstanceId,f.K])((e=>{let{instanceId:t,className:n,attributes:a,setAttributes:i,noticeOperations:{createErrorNotice:c,removeAllNotices:l},noticeUI:d,primaryColor:m,setPrimaryColor:h,secondaryColor:f,setSecondaryColor:P,fallbackTextColor:N,backgroundColor:L,setBackgroundColor:T,fallbackBackgroundColor:A,isSelected:I,replaceWithEmbedBlock:R}=e;const M=(0,v.S)(y.Z,a),{url:Z,selectedEpisodes:B,itemsToShow:D,showCoverArt:F,showEpisodeTitle:z,showEpisodeDescription:O,exampleFeedData:U}=M,H=`jetpack-podcast-player-block-${t}`,[V,G]=(0,u.useState)(!1),[q,$]=(0,u.useState)(10),W=(0,u.useRef)(),[{selectedGuid:J,checkUrl:K,...X},Y]=(0,u.useReducer)(C.J,{editedUrl:Z||"",isEditing:!Z&&!U,isLoading:!1,feedData:U||{},isInteractive:!1,selectedGuid:B?.[0]?.guid,checkUrl:Z||""}),Q=(0,u.useMemo)((()=>(0,g.debounce)((e=>{Y({type:C.N.START_FETCH}),W.current?.cancel(),W.current=(0,S.W4)((0,k.q)({...e,fetchEpisodeOptions:!0})),W.current.promise.then((t=>{if(l(),t?.isCanceled)j("Block was unmounted during fetch",t);else switch(t?.type){case E.u:return i({url:e.url,selectedEpisodes:e.guids.map((e=>({guid:e})))}),Y({type:C.N.FEED_RECEIVED,payload:t.data});case E.b:return R()}}),(e=>{e?.isCanceled?j("Block was unmounted during fetch",e):(j("feed error",e),l(),c(e.message||__("Your podcast couldn't be embedded. Please double check your URL.","jetpack")),Y({type:C.N.START_EDITING}))}))}),300)),[R,i,c,l]);(0,u.useEffect)((()=>()=>{W?.current?.cancel?.()}),[]);const ee=(0,u.useCallback)((e=>{null===e||V||((0,b.DT)(["link#mediaelement-css","link#wp-mediaelement-css"],e),G(!0))}),[V]);(0,u.useEffect)((()=>{if(""!==K)return Q({url:K,guids:J?[J]:[]}),()=>W?.current?.cancel?.()}),[Q,K,J]),(0,u.useEffect)((()=>{(0,k.G)().then((e=>{$(e)}))}),[]),(0,u.useEffect)((()=>{J&&1!==D&&i({itemsToShow:1})}),[J,D,i]),(0,u.useEffect)((()=>{!I&&X.isInteractive&&Y({type:C.N.PREVENT_INTERACTIONS})}),[I,X.isInteractive]);const te=e=>{if(e.preventDefault(),""===X.editedUrl)return;const t=(0,p.prependHTTP)(X.editedUrl);(0,p.isURL)(t)?(t===K?(Y({type:C.N.CLEAR_FEED}),Q({url:K,guids:B[0]?.guid?[B[0].guid]:[]})):Y({type:C.N.CHECK_URL,payload:t}),Y({type:C.N.FINISH_EDITING,payload:t})):c(__("Your podcast couldn't be embedded. Please double check your URL.","jetpack"))};if(X.isEditing)return(0,r.createElement)(s.Placeholder,{icon:_.E,label:__("Podcast Player","jetpack"),instructions:__("Enter your podcast RSS feed URL.","jetpack"),className:"jetpack-podcast-player__placeholder"},(0,r.createElement)("form",{onSubmit:te},d,(0,r.createElement)(s.TextControl,{type:"text",inputMode:"url",placeholder:__("Enter URL here…","jetpack"),value:X.editedUrl,className:"components-placeholder__input",onChange:e=>Y({type:C.N.EDIT_URL,payload:e})}),(0,r.createElement)(s.Button,{variant:"primary",type:"submit"},__("Embed","jetpack"))),(0,r.createElement)("div",{className:"components-placeholder__learn-more"},(0,r.createElement)(s.ExternalLink,{href:x},__("Learn more about embeds","jetpack"))));if(!X.feedData.tracks?.length)return(0,r.createElement)(s.Placeholder,{icon:_.E,label:__("Podcast Player","jetpack"),instructions:__("Loading podcast feed…","jetpack")},(0,r.createElement)(s.Spinner,null));const ne=(e,t)=>n=>{i({[e]:n}),t(n)};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(s.ToolbarGroup,null,(0,r.createElement)(s.ToolbarButton,{"aria-label":__("Edit Podcast Feed URL","jetpack"),onClick:()=>Y({type:C.N.START_EDITING})},__("Replace","jetpack")))),(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(s.PanelBody,{title:__("Podcast settings","jetpack")},(s.ComboboxControl||0===B.length)&&(0,r.createElement)(s.RangeControl,{label:__("Number of items","jetpack"),value:D,onChange:e=>i({itemsToShow:J?1:e}),min:1,max:q,required:!0,disabled:!!J}),s.ComboboxControl&&(0,r.createElement)(s.ComboboxControl,{className:"jetpack-podcast-player__episode-selector",value:J,onChange:e=>Y({type:C.N.SELECT_EPISODE,payload:e}),options:X.feedData.options||[],label:__("Episode","jetpack"),onFilterValueChange:g.noop}),(0,r.createElement)(s.ToggleControl,{label:__("Show Cover Art","jetpack"),checked:F,onChange:e=>i({showCoverArt:e})}),(0,r.createElement)(s.ToggleControl,{label:__("Show Episode Title","jetpack"),checked:z,onChange:e=>i({showEpisodeTitle:e})}),(0,r.createElement)(s.ToggleControl,{label:__("Show Episode Description","jetpack"),checked:O,onChange:e=>i({showEpisodeDescription:e})})),(0,r.createElement)(o.PanelColorSettings,{title:__("Color Settings","jetpack"),colorSettings:[{value:m.color,onChange:ne("hexPrimaryColor",h),label:__("Primary Color","jetpack")},{value:f.color,onChange:ne("hexSecondaryColor",P),label:__("Secondary Color","jetpack")},{value:L.color,onChange:ne("hexBackgroundColor",T),label:__("Background Color","jetpack")}]},(0,r.createElement)(o.ContrastChecker,{isLargeText:!1,textColor:f.color,backgroundColor:L.color,fallbackBackgroundColor:A,fallbackTextColor:N}))),(0,r.createElement)("div",{id:H,className:n,ref:ee},(0,r.createElement)(w.Z,{playerId:H,attributes:M,tracks:X.feedData.tracks,cover:X.feedData.cover,title:X.feedData.title,link:X.feedData.link}),!X.isInteractive&&!X.isLoading&&(0,r.createElement)("div",{className:"jetpack-podcast-player__interactive-overlay",onMouseUp:()=>Y({type:C.N.MAKE_INTERACTIVE})}),X.isLoading&&(0,r.createElement)("div",{className:"jetpack-podcast-player__loading-overlay"},(0,r.createElement)(s.Spinner,null))))}))},28345:function(e,t,n){"use strict";var r=n(31985),a=n(74989);(0,r.Z)(a.u2,a.Xd)},13331:function(e,t,n){"use strict";n.d(t,{E:function(){return r.Z}});var r=n(26152)},29431:function(e,t,n){"use strict";var r=n(51806),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"}));t.Z=o},26152:function(e,t,n){"use strict";var r=n(51806),a=n(70444);t.Z=(0,r.createElement)(a.SVG,{height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.G,null,(0,r.createElement)(a.Rect,{fill:"none",height:"24",width:"24"}),(0,r.createElement)(a.Rect,{fill:"none",height:"24",width:"24"}),(0,r.createElement)(a.Rect,{fill:"none",height:"24",width:"24"})),(0,r.createElement)(a.G,null,(0,r.createElement)(a.G,null),(0,r.createElement)(a.G,null,(0,r.createElement)(a.G,{transform:"matrix(1 0 0 1 144 120)"},(0,r.createElement)(a.Path,{d:"M-122-114h-5v8.18c-0.31-0.11-0.65-0.18-1-0.18c-1.66,0-3,1.34-3,3s1.34,3,3,3s3-1.34,3-3v-9h3V-114 L-122-114z M-129-114h-12v2h12V-114L-129-114z M-129-110h-12v2h12V-110L-129-110z M-133-106h-8v2h8V-106L-133-106z M-129-103 c0-0.55,0.45-1,1-1c0.55,0,1,0.45,1,1s-0.45,1-1,1C-128.55-102-129-102.45-129-103z"})))))},69650:function(e,t,n){"use strict";n.r(t),n.d(t,{error:function(){return s},playing:function(){return i}});var r=n(51806),a=n(70444);const o={height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},i=(0,r.createElement)(a.SVG,o,(0,r.createElement)(a.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,r.createElement)(a.Path,{d:"M3 9v6h4l5 5V4L7 9H3zm7-.17v6.34L7.83 13H5v-2h2.83L10 8.83zM16.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77 0-4.28-2.99-7.86-7-8.77z"})),s=(0,r.createElement)(a.SVG,o,(0,r.createElement)(a.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,r.createElement)(a.Path,{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))},74989:function(e,t,n){"use strict";n.d(t,{Xd:function(){return d},u2:function(){return u}});var r=n(65736),a=n(70355),o=n(30723),i=n(16542),s=n(99800),c=n(13331),l=n(10591);const __=r.__,_x=r._x,u="podcast-player",d={title:__("Podcast Player","jetpack"),description:__("Select and play episodes from a single podcast.","jetpack"),icon:{src:c.E,foreground:(0,a.m)()},category:"embed",keywords:[_x("audio","block search term","jetpack"),_x("embed","block search term","jetpack")],supports:{align:["wide","full"],spacing:{padding:!0,margin:!0},anchor:!1,customClassName:!0,className:!0,html:!1,multiple:!0,reusable:!0},edit:s.Z,save:l.Z,attributes:o.Z,example:{attributes:{customPrimaryColor:(0,a.m)(),hexPrimaryColor:(0,a.m)(),exampleFeedData:{title:__("Jetpack Example Podcast","jetpack"),link:"https://jetpack.com",cover:"https://jetpackme.files.wordpress.com/2020/05/jetpack-example-podcast-cover.png?w=160",tracks:[{id:"3",title:__("3. Our third episode","jetpack"),duration:"14:58"},{id:"2",title:__("2. Interview with a special guest","jetpack"),duration:"19:17"},{id:"1",title:__("1. Welcome to Example Podcast","jetpack"),duration:"11:25"}]}}},deprecated:[i.Z]}},10591:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(51806);function a(e){let{attributes:t}=e;const{url:n}=t;if(n&&""!==n)return(0,r.createElement)("a",{className:"jetpack-podcast-player__direct-link",href:n},n)}},93610:function(e,t,n){"use strict";n.d(t,{J:function(){return a},N:function(){return r}});const r={EDIT_URL:"EDIT_URL",FINISH_EDITING:"FINISH_EDITING",START_EDITING:"START_EDITING",SELECT_EPISODE:"SELECT_EPISODE",FEED_RECEIVED:"FEED_RECEIVED",CLEAR_FEED:"CLEAR_FEED",MAKE_INTERACTIVE:"MAKE_INTERACTIVE",PREVENT_INTERACTIONS:"PREVENT_INTERACTIONS",START_FETCH:"START_FETCH",CHECK_URL:"CHECK_URL"},a=(e,t)=>{switch(t.type){case r.EDIT_URL:return{...e,editedUrl:t.payload};case r.START_EDITING:return{...e,isEditing:!0,isLoading:!1};case r.FINISH_EDITING:return{...e,editedUrl:t.payload,isEditing:!1};case r.FEED_RECEIVED:return{...e,isLoading:!1,feedData:t.payload};case r.CLEAR_FEED:return{...e,feedData:{}};case r.MAKE_INTERACTIVE:return{...e,isInteractive:!0};case r.PREVENT_INTERACTIONS:return{...e,isInteractive:!1};case r.START_FETCH:return{...e,isLoading:!0};case r.SELECT_EPISODE:return{...e,selectedGuid:t.payload};case r.CHECK_URL:return{...e,selectedGuid:null,feedData:{},checkUrl:t.payload};default:return{...e}}}},66085:function(e,t,n){"use strict";n.d(t,{Aq:function(){return c},Gd:function(){return i},W4:function(){return s}});var r=n(65235),a=n.n(r),o=n(92819);function i(e,t){if(e&&t)return`has-${t}-${e}`}function s(e){let t=!1;return{promise:new Promise(((n,r)=>{e.then((e=>t?r({isCanceled:!0}):n(e)),(e=>r(t?{isCanceled:!0}:e)))})),cancel(){t=!0}}}const c=(0,o.memoize)((e=>{let{primaryColor:t,customPrimaryColor:n,secondaryColor:r,customSecondaryColor:o,backgroundColor:s,customBackgroundColor:c}=e;const l=i("color",t),u=i("color",r),d=i("background-color",s);return{primary:{name:t,custom:n,classes:a()({"has-primary":l||n,[l]:l})},secondary:{name:r,custom:o,classes:a()({"has-secondary":u||o,[u]:u})},background:{name:s,custom:c,classes:a()({"has-background":d||c,[d]:d})}}}),(e=>Object.values(e).join()))},51054:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806),a=n(52175);function o(){return(0,r.createElement)("div",{className:"premium-content-wrapper"},(0,r.createElement)(a.InnerBlocks,{allowedBlocks:["premium-content/subscriber-view","premium-content/logged-out-view"],templateLock:"all",template:[["premium-content/subscriber-view"],["premium-content/logged-out-view"]],__experimentalCaptureToolbars:!0,templateInsertUpdatesSelection:!1}))}},59948:function(e,t,n){"use strict";var r=n(51806),a=n(69307);const o={selectedTab:{id:"",className:"",label:(0,r.createElement)(r.Fragment,null)}},i=(0,a.createContext)(o);t.Z=i},34601:function(e,t,n){"use strict";var r=n(51806),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M12.7439 14.4271L8.64053 13.165L8.51431 13.8718L8.09208 20.7415C8.06165 21.2365 8.61087 21.5526 9.02363 21.2776L12.7439 18.799L16.7475 21.304C17.1687 21.5676 17.7094 21.2343 17.6631 20.7396L17.0212 13.8718L17.0212 13.165L12.7439 14.4271Z"}),(0,r.createElement)(a.Circle,{cx:"12.7439",cy:"8.69796",r:"5.94466",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),(0,r.createElement)(a.Path,{d:"M9.71023 8.12461L11.9543 10.3687L15.7776 6.54533",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}))},86614:function(e,t,n){"use strict";n.d(t,{H2:function(){return s},Wp:function(){return i},ch:function(){return c}});var r=n(4981),a=n(9818),o=n(50851);const i=e=>0===e.name.indexOf("premium-content/")||e.innerBlocks.some(i),s=e=>{const{getBlocksByClientId:t,getBlockParents:n}=(0,a.select)("core/block-editor");return!!t(n(e.clientId)).find((e=>0===e.name.indexOf("premium-content/")))};function c(){return(0,a.useSelect)((e=>e(r.store).getBlockTypes()),[]).reduce(((e,t)=>(t.name!==o.u&&e.push(t.name),e)),[])}},83196:function(e,t,n){"use strict";var r=n(51806),a=n(9818),o=n(72067),i=n(65736),s=n(50851),c=n(16912);const __=i.__;function l(){const e=(0,a.select)("core/block-editor").getSelectedBlock();(0,a.dispatch)("core/block-editor").replaceBlock(e.clientId,(0,c.e)(e.innerBlocks))}t.Z=()=>(0,r.createElement)(o.PluginBlockSettingsMenuItem,{allowedBlocks:[s.u],label:__("Remove block and keep content","jetpack"),onClick:l})},16912:function(e,t,n){"use strict";n.d(t,{e:function(){return a}});var r=n(4981);const a=e=>{const t=e.find((e=>"premium-content/subscriber-view"===e.name));return 1===t.innerBlocks.length&&"core/group"===t.innerBlocks[0].name?t.innerBlocks[0]:(0,r.createBlock)("core/group",{},t.innerBlocks)}},63613:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(51806),a=n(52175),o=n(55609);function i(e){const{options:t,selectedOption:n,selectAction:i,contractViewport:s,label:c}=e,l=e=>e.id===n.id;return s?(0,r.createElement)(a.BlockControls,{group:"block"},(0,r.createElement)(o.ToolbarDropdownMenu,{label:c,icon:"arrow-down",text:n.label},(e=>{let{onClose:n}=e;return(0,r.createElement)(o.MenuGroup,null,t.map((e=>{const t=l(e);return(0,r.createElement)(o.MenuItem,{isSelected:t,icon:t?"yes":void 0,onClick:()=>{i(e),n()},key:`jetpack-premium-content-tab-${e.id}`},e.label)})))}))):(0,r.createElement)(a.BlockControls,{group:"other"},t.map((e=>{const t=l(e);return(0,r.createElement)(o.ToolbarButton,{onClick:()=>{i(e)},className:"components-tab-button",isPressed:t,key:`jetpack-premium-content-tab-${e.id}`},(0,r.createElement)("span",null,e.label))})))}},72738:function(e,t,n){"use strict";var r=n(51806),a=n(52175),o=n(94333),i=n(9818),s=n(69307),c=n(92694),l=n(65736);const __=l.__,u=["core/button","jetpack/recurring-payments","premium-content/login-button"];t.Z=(0,o.compose)([(0,i.withSelect)(((e,t)=>({subscribeButton:e("core/block-editor").getBlock(t.clientId).innerBlocks.find((e=>"jetpack/recurring-payments"===e.name))}))),(0,i.withDispatch)(((e,t)=>({setSubscribeButtonPlan(n){e("core/block-editor").updateBlockAttributes(t.subscribeButton.clientId,{planId:n})}})))])((function(e){let{context:t,subscribeButton:n,setSubscribeButtonPlan:o}=e;const i=t?t["premium-content/planId"]:null,l=!!t&&t["premium-content/isPreview"],d=[["core/button",{element:"a",uniqueId:"recurring-payments-id",text:__("Subscribe","jetpack")}],["premium-content/login-button"]],p=[["jetpack/recurring-payments",{planId:i},[["jetpack/button",{element:"a",uniqueId:"recurring-payments-id",text:__("Subscribe","jetpack"),passthroughAttributes:{uniqueId:"uniqueId",url:"url"}}]]],["premium-content/login-button"]];(0,s.useEffect)((()=>{i&&n&&n.attributes.planId!==i&&o(i)}),[i,n,o]),(0,s.useEffect)((()=>{n&&(0,c.addFilter)("jetpack.recurringPayments.editorSettings","jetpack/premium-content-hide-recurring-payments-controls",((e,t)=>t===n.clientId?{...e,showProductManagementControls:!1}:e))}),[n]);const m=(0,a.useBlockProps)({className:"wp-block-buttons"});return(0,r.createElement)("div",m,(0,r.createElement)(a.InnerBlocks,{allowedBlocks:u,template:l?d:p,templateInsertUpdatesSelection:!1,__experimentalLayout:{type:"default",alignments:[]},__experimentalMoverDirection:"horizontal"}))}))},737:function(e,t,n){"use strict";n.d(t,{X:function(){return u},u:function(){return l}});var r=n(51806),a=n(52175),o=n(65736),i=n(58829),s=n(72738),c=n(60439);const __=o.__,l="premium-content/buttons",u={apiVersion:2,title:__("Premium Content buttons","jetpack"),description:__("Prompt Premium Content visitors to take action with a group of button-style links.","jetpack"),category:"grow",icon:i.Z,supports:{align:!0,alignWide:!1,lightBlockWrapper:!0,inserter:!1},keywords:[__("link","jetpack")],edit:s.Z,save:c.Z,usesContext:["premium-content/planId","premium-content/isPreview"],deprecated:[{attributes:{},supports:{align:!0,alignWide:!1,lightBlockWrapper:!0,inserter:!1},save:()=>(0,r.createElement)("div",{className:"wp-block-buttons"},(0,r.createElement)(a.InnerBlocks.Content,null))}]}},60439:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806),a=n(52175);function o(){const e=a.useBlockProps.save({className:"wp-block-buttons"});return(0,r.createElement)("div",e,(0,r.createElement)(a.InnerBlocks.Content,null))}},23842:function(e,t,n){"use strict";var r=n(96882);t.Z={isEligible:(e,t)=>{if("premium-content/logged-out-view"===t?.[0]?.name)return!0},migrate:(e,t)=>[e,[t[1],t[0]]],save:r.Z}},12215:function(e,t,n){"use strict";n.d(t,{Z:function(){return C}});var r=n(82674),a=n.n(r),o=n(51806),i=n(52175),s=n(55609),c=n(94333),l=n(9818),u=n(69307),d=n(65736),p=n(60386),m=n(14436),h=n(16367),g=n(7652),f=n(51054),b=n(59948),v=n(63613);const __=d.__,k=[{id:"premium",label:(0,o.createElement)("span",null,__("Subscriber View","jetpack")),className:"wp-premium-content-subscriber-view"},{id:"wall",label:(0,o.createElement)("span",null,__("Guest View","jetpack")),className:"wp-premium-content-logged-out-view"}],y=0,w=1,E="premium-content";function _(e){const[t,n]=(0,u.useState)(k[w]),{isPreview:r,selectedPlanId:a}=e.attributes,{clientId:d,isSelected:_,className:C,setAttributes:S}=e,{isApiLoading:j,selectedBlock:x}=(0,l.useSelect)((e=>({selectedBlock:e(i.store).getSelectedBlock(),isApiLoading:e(g.h).isApiStateLoading()})));(0,u.useEffect)((()=>{if(_)return;if(!x)return;const e=(0,l.select)(i.store);e.getBlockParents(x.clientId).includes(d)&&("premium-content/logged-out-view"===x.name||e.getBlockParentsByBlockName(x.clientId,"premium-content/logged-out-view").length?n(k[w]):n(k[y]))}),[d,_,x]);const P=(0,c.useViewportMatch)("medium","<");return(0,o.createElement)("div",{className:C},!r&&(0,o.createElement)(o.Fragment,null,j&&(0,o.createElement)(s.Placeholder,{icon:"lock",label:__("Paid Content","jetpack"),instructions:__("Loading data…","jetpack")},(0,o.createElement)(s.Spinner,null)),(0,o.createElement)(p.Z,{blockName:E,clientId:d,productType:m.DM,selectedProductId:a,setSelectedProductId:e=>S({selectedPlanId:e})}),(0,o.createElement)(v.Z,{options:k,selectedOption:t,selectAction:n,contractViewport:P,label:__("Change view","jetpack")})),!j&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(h.U,{blockName:E}),(0,o.createElement)(b.Z.Provider,{value:{selectedTab:t}},(0,o.createElement)(f.Z,null))))}function C(e){return(0,o.createElement)(s.Disabled.Consumer,null,(t=>(0,o.createElement)(_,a()({},e,{attributes:{...e.attributes,isPreview:t||e.attributes?.isPreview}}))))}},85053:function(e,t,n){"use strict";var r=n(98817),a=n(31985),o=n(83196),i=n(737),s=n(9160),c=n(88430),l=n(52149),u=n(50851);(0,a.Z)(u.u,u.X,[{name:s.u,settings:s.X},{name:l.u,settings:l.X},{name:i.u,settings:i.X},{name:c.u,settings:c.X}],!1),(0,r.registerPlugin)("block-settings-remove-block-keep-content",{render:o.Z})},50851:function(e,t,n){"use strict";n.d(t,{X:function(){return h},u:function(){return m}});var r=n(4981),a=n(65736),o=n(34601),i=n(86614),s=n(16912),c=n(23842),l=n(12215),u=n(96882);const __=a.__,_x=a._x,d=["core/nextpage","core/spacer","core/separator","core/more","core/loginout","core/post-navigation-link"],p=e=>{if(e.some(i.Wp))return!1;if((0,i.H2)(e[0]))return!1;return!e.every((e=>d.includes(e.name)))},m="premium-content/container",h={title:__("Paid Content","jetpack"),description:__("Restrict access to your content for paying subscribers.","jetpack"),icon:o.Z,category:"grow",keywords:[_x("buy","block search term","jetpack"),_x("credit card","block search term","jetpack"),_x("debit card","block search term","jetpack"),_x("earn","block search term","jetpack"),_x("exclusive","block search term","jetpack"),_x("gated","block search term","jetpack"),"gofundme",_x("memberships","block search term","jetpack"),_x("money","block search term","jetpack"),_x("newsletter","block search term","jetpack"),_x("paid","block search term","jetpack"),"patreon",_x("pay","block search term","jetpack"),_x("payments","block search term","jetpack"),_x("paywall","block search term","jetpack"),_x("premium content","block search term","jetpack"),_x("purchase","block search term","jetpack"),_x("recurring","block search term","jetpack"),_x("repeat","block search term","jetpack"),_x("signin","block search term","jetpack"),"stripe",_x("subscribe","block search term","jetpack"),_x("subscriptions","block search term","jetpack"),_x("support","block search term","jetpack"),_x("sponsor","block search term","jetpack"),"square","toast","venmo","stripe","substack"],attributes:{newPlanName:{type:"string",default:__("Monthly Subscription","jetpack")},newPlanCurrency:{type:"string",default:"USD"},newPlanPrice:{type:"number",default:5},newPlanInterval:{type:"string",default:"1 month"},selectedPlanId:{type:"number",default:0},isPreview:{type:"boolean",default:!1},isPremiumContentChild:{type:"bool",default:!0}},edit:l.Z,save:u.Z,providesContext:{"premium-content/planId":"selectedPlanId","premium-content/isPreview":"isPreview",isPremiumContentChild:"isPremiumContentChild"},supports:{html:!1},example:{attributes:{isPreview:!0}},transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["*"],isMatch:(e,t)=>!e.some((e=>e.isPremiumContentChild))&&(void 0===t||p(t)),__experimentalConvert(e){if(!p(e))return;const t=e.map((e=>(0,r.createBlock)(e.name,e.attributes,e.innerBlocks)));return(0,r.createBlock)("premium-content/container",{},[(0,r.createBlock)("premium-content/subscriber-view",{},t),(0,r.createBlock)("premium-content/logged-out-view")])}}],to:[{type:"block",blocks:["core/group"],transform:(e,t)=>(0,s.e)(t)}]},deprecated:[c.Z]}},98143:function(e,t,n){"use strict";var r=n(2582),a=n(52439);t.Z=[r.Z,a.Z]},2582:function(e,t,n){"use strict";var r=n(51806),a=n(52175),o=n(4981);t.Z={attributes:{subscribeButtonText:{type:"string",default:"Subscribe"},loginButtonText:{type:"string",default:"Log In"},buttonClasses:{type:"string",default:""},backgroundButtonColor:{type:"string",default:""},textButtonColor:{type:"string",default:""},customBackgroundButtonColor:{type:"string",default:""},customTextButtonColor:{type:"string",default:""}},isEligible:e=>{let{buttonClasses:t}=e;return!!t},migrate:(e,t)=>{if(Array.isArray(t))for(let n=0;n<t.length;n++)if(t[n].name&&"premium-content/buttons"===t[n].name)return[e,[...t]];const n=(0,o.createBlock)("premium-content/buttons",{},[(0,o.createBlock)("jetpack/recurring-payments",{submitButtonText:e.subscribeButtonText,backgroundButtonColor:e.backgroundButtonColor,textButtonColor:e.textButtonColor,customBackgroundButtonColor:e.customBackgroundButtonColor,customTextButtonColor:e.customTextButtonColor}),(0,o.createBlock)("premium-content/login-button",{text:e.loginButtonText,backgroundColor:e.backgroundButtonColor,textColor:e.textButtonColor,style:{color:{background:e.customBackgroundButtonColor,text:e.customTextButtonColor}}})]);return[e,[...t,n]]},save:()=>(0,r.createElement)("div",{className:"wp-block-premium-content-logged-out-view"},(0,r.createElement)(a.InnerBlocks.Content,null))}},52439:function(e,t,n){"use strict";var r=n(51806);t.Z={attributes:{},supports:{inserter:!1,html:!1},save:()=>(0,r.createElement)("div",{className:"wp-block-premium-content-logged-out-view"})}},36694:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(51806),a=n(52175),o=n(65736),i=n(59948),s=n(86614);const __=o.__;function c(){const e=(0,s.ch)();return(0,r.createElement)(i.Z.Consumer,null,(t=>{let{selectedTab:n}=t;return(0,r.createElement)("div",{hidden:"premium"===n.id,className:n.className},(0,r.createElement)(a.InnerBlocks,{allowedBlocks:e,templateLock:!1,templateInsertUpdatesSelection:!1,template:[["core/heading",{content:__("Subscribe to get access","jetpack"),level:3}],["core/paragraph",{content:__("Read more of this content when you subscribe today.","jetpack")}],["premium-content/buttons"]]}))}))}},9160:function(e,t,n){"use strict";n.d(t,{X:function(){return p},u:function(){return d}});var r=n(94333),a=n(9818),o=n(65736),i=n(72629),s=n(34601),c=n(98143),l=n(36694),u=n(96588);const __=o.__,d="premium-content/logged-out-view",p={title:__("Guest View","jetpack"),description:__("The container for all content shown to site visitors who are not subscribers.","jetpack"),icon:s.Z,category:"grow",parent:["premium-content/container"],supports:{inserter:!1,html:!1},edit:l.Z,save:u.Z,deprecated:c.Z},m=(0,a.subscribe)((()=>{const e=(0,a.select)("core/rich-text").getFormatType("core/link");if(!e)return;m(),(0,i.unregisterFormatType)("core/link");const t=(0,r.compose)((0,a.withSelect)((e=>({selectedBlock:e("core/block-editor").getSelectedBlock()}))),(0,r.ifCondition)((e=>e.selectedBlock&&e.selectedBlock.name!==d)))(e.edit);(0,i.registerFormatType)("core/link",{...e,edit:t})}))},96588:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806),a=n(52175);function o(){return(0,r.createElement)("div",{className:"wp-block-premium-content-logged-out-view entry-content"},(0,r.createElement)(a.InnerBlocks.Content,null))}},34154:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={text:{type:"string",source:"html",selector:"a",default:__("Log in","jetpack")},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"}}},98810:function(e,t,n){"use strict";var r=n(51806),a=n(92819),o=n(65736),i=n(69307),s=n(9818),c=n(52175);const __=o.__,l="web"===i.Platform.OS;const u=e=>{if(!(0,a.isObject)(e))return e;const t=(0,a.pickBy)((0,a.mapValues)(e,u),a.identity);return(0,a.isEqual)(t,{})?void 0:t};function d(e){let{settings:t,clientId:n,enableContrastChecking:a=!0}=e;const{getComputedStyle:o,Node:s}=window,[u,d]=(0,i.useState)(),[p,m]=(0,i.useState)(),h=l?__("Color settings","jetpack"):__("Color Settings","jetpack",0);return(0,i.useEffect)((()=>{if(l&&!a)return;const e=function(e){return document.getElementById("block-"+e)}(n);if(!e)return;m(o(e).color);let t=e,r=o(t).backgroundColor;for(;"rgba(0, 0, 0, 0)"===r&&t.parentNode&&t.parentNode.nodeType===s.ELEMENT_NODE;)t=t.parentNode,r=o(t).backgroundColor;d(r)})),(0,r.createElement)(c.InspectorControls,null,(0,r.createElement)(c.__experimentalPanelColorGradientSettings,{title:h,initialOpen:!1,settings:t},l&&a&&(0,r.createElement)(c.ContrastChecker,{backgroundColor:u,textColor:p})))}t.Z=function(e){const{attributes:t}=e,{colors:n,gradients:a}=(0,s.useSelect)((e=>e("core/block-editor").getSettings()),[]),o=(0,i.useRef)(t);(0,i.useEffect)((()=>{o.current=t}),[t]);const{style:l,textColor:p,backgroundColor:m,gradient:h}=t;let g;g=h?(0,c.getGradientValueBySlug)(a,h):l?.color?.gradient;const f=t=>r=>{const a=(0,c.getColorObjectByColorValue)(n,r),i=t+"Color",s={...o.current.style,color:{...o.current?.style?.color,[t]:a?.slug?void 0:r}},l=a?.slug?a.slug:void 0,d={style:u(s),[i]:l};e.setAttributes(d),o.current={...o.current,...d}};return(0,r.createElement)(d,{enableContrastChecking:!h&&!l?.color?.gradient,clientId:e.clientId,settings:[{label:__("Text Color","jetpack"),onColorChange:f("text"),colorValue:(0,c.getColorObjectByAttributeValues)(n,p,l?.color?.text).color},{label:__("Background Color","jetpack"),onColorChange:f("background"),colorValue:(0,c.getColorObjectByAttributeValues)(n,m,l?.color?.background).color,gradientValue:g,onGradientChange:t=>{const n=(0,c.getGradientSlugByValue)(a,t);let r;if(n){const e={...o.current?.style,color:{...o.current?.style?.color,gradient:void 0}};r={style:u(e),gradient:n}}else{const e={...o.current?.style,color:{...o.current?.style?.color,gradient:t}};r={style:u(e),gradient:void 0}}e.setAttributes(r),o.current={...o.current,...r}}}]})}},53201:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(65235),a=n.n(r),o=n(52175);function i(e){const{backgroundColor:t,textColor:n,gradient:r,style:i}=e,s=(0,o.getColorClassName)("background-color",t),c=(0,o.__experimentalGetGradientClass)(r),l=(0,o.getColorClassName)("color",n),u=a()(l,c,{[s]:!i?.color?.gradient&&!!s,"has-text-color":n||i?.color?.text,"has-background":t||i?.color?.background||r||i?.color?.gradient});return{className:u||void 0,style:i?.color?.background||i?.color?.text||i?.color?.gradient?{background:i?.color?.gradient?i.color.gradient:void 0,backgroundColor:i?.color?.background?i.color.background:void 0,color:i?.color?.text?i.color.text:void 0}:{}}}},74634:function(e,t,n){"use strict";var r=n(51806),a=n(52175),o=n(65736),i=n(65235),s=n.n(i),c=n(53201);const __=o.__;t.Z={attributes:{text:{type:"string",source:"html",selector:"a",default:__("Log in","jetpack")},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"}},supports:{align:!0,alignWide:!1,html:!1,lightBlockWrapper:!0,inserter:!1},save:e=>{let{attributes:t}=e;const{borderRadius:n,text:o}=t,i=(0,c.Z)(t),l=s()("wp-block-button__link",i.className,{"no-border-radius":0===n}),u={borderRadius:n?n+"px":void 0,...i.style};return(0,r.createElement)("div",{className:"wp-block-button"},(0,r.createElement)(a.RichText.Content,{tagName:"a",className:l,style:u,value:o}))}}},53163:function(e,t,n){"use strict";var r=n(51806),a=n(52175),o=n(55609),i=n(69307),s=n(65736),c=n(65235),l=n.n(c),u=n(98810),d=n(53201);const __=s.__,p=0,m=50,h=5;function g(e){let{borderRadius:t="",setAttributes:n}=e;const a=(0,i.useCallback)((e=>{n({borderRadius:e})}),[n]);return(0,r.createElement)(o.PanelBody,{title:__("Border settings","jetpack")},(0,r.createElement)(o.RangeControl,{value:t,label:__("Border radius","jetpack"),min:p,max:m,initialPosition:h,allowReset:!0,onChange:a}))}t.Z=function(e){const{attributes:t,setAttributes:n,className:o}=e,{borderRadius:i,text:s}=t,c=(0,d.Z)(t),p=(0,a.useBlockProps)({className:"wp-block-button"});return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",p,(0,r.createElement)(a.RichText,{placeholder:__("Add text…","jetpack"),value:s,onChange:e=>n({text:e}),withoutInteractiveFormatting:!0,className:l()(o,"wp-block-button__link",c.className,{"no-border-radius":0===i}),style:{borderRadius:i?i+"px":void 0,...c.style}})),(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(u.Z,e),(0,r.createElement)(g,{borderRadius:i,setAttributes:n})))}},88430:function(e,t,n){"use strict";n.d(t,{X:function(){return u},u:function(){return l}});var r=n(65736),a=n(58829),o=n(34154),i=n(74634),s=n(53163),c=n(91430);const __=r.__,l="premium-content/login-button",u={title:__("Premium Content login button","jetpack"),description:__("Prompt subscriber visitors to log in with a button-style link (only visible for logged out users).","jetpack"),category:"grow",attributes:o.Z,icon:a.Z,keywords:[__("link","jetpack")],supports:{align:!0,alignWide:!1,html:!1,lightBlockWrapper:!0,inserter:!1},styles:[{name:"fill",label:__("Fill","jetpack"),isDefault:!0},{name:"outline",label:__("Outline","jetpack")}],edit:s.Z,save:c.Z,deprecated:[i.Z]}},91430:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(51806),a=n(52175),o=n(65235),i=n.n(o),s=n(53201);function c(e){let{attributes:t}=e;const{borderRadius:n,text:o,align:c}=t,l=(0,s.Z)(t),u=i()("wp-block-button","wp-block-premium-content-login-button",{alignleft:"left"===c},{aligncenter:"center"===c},{alignright:"right"===c}),d=i()("wp-block-button__link",l.className,{"no-border-radius":0===n}),p={borderRadius:n?n+"px":void 0,...l.style},m=a.useBlockProps.save({className:u});return(0,r.createElement)("div",m,(0,r.createElement)(a.RichText.Content,{tagName:"a",className:d,style:p,value:o}))}},96882:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806),a=n(52175);function o(){return(0,r.createElement)("div",{className:"wp-block-premium-content-container"},(0,r.createElement)(a.InnerBlocks.Content,null))}},67416:function(e,t,n){"use strict";var r=n(19178);t.Z=[r.Z]},19178:function(e,t,n){"use strict";var r=n(51806);t.Z={attributes:{},supports:{inserter:!1,html:!1},save:()=>(0,r.createElement)("div",{className:"wp-block-premium-content-subscriber-view"})}},34166:function(e,t,n){"use strict";var r=n(51806),a=n(52175),o=n(94333),i=n(9818),s=n(65736),c=n(59948),l=n(86614);const __=s.__;t.Z=(0,o.compose)([(0,i.withSelect)(((e,t)=>({hasInnerBlocks:!!e("core/block-editor").getBlocksByClientId(t.clientId)[0].innerBlocks.length})))])((function(e){let{hasInnerBlocks:t}=e;const n=(0,l.ch)();return(0,r.createElement)(c.Z.Consumer,null,(e=>{let{selectedTab:o}=e;return(0,r.createElement)("div",{hidden:"wall"===o.id,className:o.className},(0,r.createElement)(a.InnerBlocks,{allowedBlocks:n,renderAppender:!t&&a.InnerBlocks.ButtonBlockAppender,templateLock:!1,templateInsertUpdatesSelection:!1,template:[["core/heading",{content:__("Subscriber Content","jetpack"),level:3}],["core/paragraph",{content:__("Add content here that will only be visible to your subscribers.","jetpack")}]]}))}))}))},52149:function(e,t,n){"use strict";n.d(t,{X:function(){return l},u:function(){return c}});var r=n(65736),a=n(34601),o=n(67416),i=n(34166),s=n(31356);const __=r.__,c="premium-content/subscriber-view",l={title:__("Subscriber View","jetpack"),description:__("The container for all content shown to subscribers.","jetpack"),icon:a.Z,category:"grow",attributes:{},edit:i.Z,save:s.Z,parent:["premium-content/container"],supports:{inserter:!1,html:!1},deprecated:o.Z}},31356:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806),a=n(52175);function o(){return(0,r.createElement)("div",{className:"wp-block-premium-content-subscriber-view entry-content"},(0,r.createElement)(a.InnerBlocks.Content,null))}},10799:function(e,t,n){"use strict";var r=n(51806),a=n(52175),o=n(55609),i=n(65736),s=n(92819);const __=i.__,c=e=>{let{id:t,setRating:n,children:a}=e;return(0,r.createElement)("span",{className:"jetpack-ratings-button",tabIndex:0,role:"button",onKeyDown:(o=t,e=>{let{code:t}=e;return"Enter"===t?n(o):null}),onClick:(e=>()=>n(e))(t)},a);var o};t.Z=e=>function(t){let{className:n,setAttributes:i,attributes:{align:l,color:u,rating:d,maxRating:p}}=t;const m=e=>{e===d?Math.ceil(d)===d&&(e-=.5):.5===d&&1===e&&(e=0),i({rating:e})};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.BlockControls,null,(0,r.createElement)(a.AlignmentToolbar,{value:l,onChange:e=>i({align:e})})),(0,r.createElement)("div",{className:n,style:{textAlign:l}},(0,s.range)(1,p+1).map((t=>(0,r.createElement)(c,{key:t,id:t,setRating:m},(0,r.createElement)("span",null,(0,r.createElement)(e,{className:d>=t-.5?null:"is-rating-unfilled",color:u})),(0,r.createElement)("span",null,(0,r.createElement)(e,{className:d>=t?null:"is-rating-unfilled",color:u})))))),(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(o.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(o.RangeControl,{label:__("Highest rating","jetpack"),value:p,onChange:e=>i({maxRating:e}),min:2,max:10}),(0,r.createElement)(a.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),a=n(90362);(0,r.Z)(a.u,a.X)},5056:function(e,t,n){"use strict";n.d(t,{d:function(){return o},r:function(){return i}});var r=n(51806),a=n(55609);const o=()=>(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.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)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",color:t},(0,r.createElement)(a.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),a=n(70355),o=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,a.m)()},keywords:[_x("star","block search term","jetpack"),_x("rating","block search term","jetpack"),_x("review","block search term","jetpack")],category:"widgets",example:{},styles:[{name:"filled",label:_x("Filled","block style","jetpack"),isDefault:!0},{name:"outlined",label:_x("Outlined","block style","jetpack")}],attributes:{rating:{type:"number",default:1},maxRating:{type:"number",default:5},color:{type:"string"},align:{type:"string",default:"left"}},edit:(0,o.Z)(i.r),save:(0,s.Z)("★")}},78403:function(e,t,n){"use strict";var r=n(51806),a=n(92819);t.Z=e=>function(t){let{className:n,attributes:{align:o,rating:i,color:s}}=t;return(0,r.createElement)("figure",{className:n,style:{textAlign:o}},(0,a.range)(1,i+1).map((t=>(0,r.createElement)("span",{key:t,style:{color:s}},e))))}},38275:function(e,t){"use strict";t.Z={prepTime:{type:"string",default:"15m"},prepTimeUnit:{type:"string",default:"m"},prepTimeLabel:{type:"string",default:"Prep Time"},cookTime:{type:"string",default:"30m"},cookTimeUnit:{type:"string",default:"m"},cookTimeLabel:{type:"string",default:"Cook Time"},servings:{type:"number",default:4},servingsLabel:{type:"string",default:"Servings"}}},900:function(e,t,n){"use strict";var r=n(51806),a=n(52175),o=n(55609);const i=[{value:"m",label:"min"},{value:"h",label:"hours"}];t.Z=function(e){let{className:t,attributes:n,setAttributes:s}=e;const{prepTime:c,prepTimeLabel:l,cookTime:u,cookTimeLabel:d,servings:p,servingsLabel:m}=n;return(0,r.createElement)("div",{className:t},(0,r.createElement)("div",{className:"wp-container wp-recipe-block-details"},(0,r.createElement)("div",{className:"group"},(0,r.createElement)(o.TextControl,{value:l,onChange:e=>s({prepTimeLabel:e})}),(0,r.createElement)(o.__experimentalUnitControl,{onChange:e=>s({prepTime:e}),onUnitChange:e=>s({prepTimeUnit:e}),isUnitSelectTabbable:!0,value:c,units:i})),(0,r.createElement)("div",{className:"group"},(0,r.createElement)(o.TextControl,{value:d,onChange:e=>s({cookTimeLabel:e})}),(0,r.createElement)(o.__experimentalUnitControl,{onChange:e=>s({cookTime:e}),onUnitChange:e=>{s({cookTimeUnit:e})},isUnitSelectTabbable:!0,value:u,units:i})),(0,r.createElement)("div",{className:"group"},(0,r.createElement)(o.TextControl,{value:m,onChange:e=>s({servingsLabel:e})}),(0,r.createElement)(o.TextControl,{type:"number",value:p,onChange:e=>s({servings:parseInt(e)})})),(0,r.createElement)("div",{className:"group"},(0,r.createElement)(a.InnerBlocks,{allowedBlocks:["jetpack/button"],template:[["jetpack/button",{text:"Print Recipe"}]]}))))}},37181:function(e,t,n){"use strict";n.d(t,{X:function(){return p},u:function(){return d}});var r=n(51806),a=n(13419),o=n(69307),i=n(65736),s=n(61281),c=n(38275),l=n(900),u=n(15617);const __=i.__,d="recipe-details",p={title:__("Recipe Details","jetpack"),description:(0,r.createElement)(o.Fragment,null,(0,r.createElement)("p",null,__("Recipe Details","jetpack"))),keywords:[],supports:{align:["left","right","center"]},icon:(0,a.lt)(s),category:"widgets",attributes:c.Z,edit:l.Z,save:u.Z,parent:["jetpack/recipe"]}},15617:function(e,t,n){"use strict";var r=n(51806),a=n(52175);t.Z=e=>{let{attributes:t,className:n}=e;const{prepTime:o,prepTimeLabel:i,cookTime:s,cookTimeLabel:c,servings:l,servingsLabel:u}=t;return(0,r.createElement)("div",{className:n},(0,r.createElement)("div",{className:"wp-block-jetpack-recipe-details__detail"},(0,r.createElement)("p",null,i),(0,r.createElement)("p",{itemprop:"prepTime",content:`PT${o.toUpperCase()}`},o)),(0,r.createElement)("div",{className:"wp-block-jetpack-recipe-details__detail"},(0,r.createElement)("p",null,c),(0,r.createElement)("p",{itemprop:"cookTime",content:`PT${s.toUpperCase()}`},s)),(0,r.createElement)("div",{className:"wp-block-jetpack-recipe-details__detail"},(0,r.createElement)("p",null,u),(0,r.createElement)("p",{itemprop:"recipeYield"},l)),(0,r.createElement)("div",{className:"wp-block-jetpack-recipe-details__detail wp-block-jetpack-recipe-details__detail--print"},(0,r.createElement)(a.InnerBlocks.Content,null)))}},37470:function(e,t,n){"use strict";var r=n(51806),a=n(52175);t.Z=function(e){let{className:t}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",(0,a.useBlockProps)({className:t}),(0,r.createElement)(a.InnerBlocks,{template:[["jetpack/recipe-hero"],["core/heading",{level:2,placeholder:"Recipe Title",className:"wp-block-jetpack-recipe-title"}],["core/separator",{color:"--wp--custom--color--foreground",className:"is-style-wide",style:"wide"}],["core/paragraph",{placeholder:"Recipe Description",className:"wp-block-jetpack-recipe-description"}],["jetpack/recipe-details",{}],["core/columns",{},[["core/column",{width:"33.33%"},[["core/heading",{level:3,content:"Ingredients"}],["jetpack/recipe-ingredients-list"]]],["core/column",{width:"66.66%"},[["core/heading",{level:3,content:"Instructions"}],["jetpack/recipe-steps"]]]]]]})))}},60405:function(e,t,n){"use strict";var r=n(31985),a=n(61281),o=n(37181),i=n(37470),s=n(82479),c=n(79300),l=n(35156),u=n(37868),d=n(43262),p=n(91372);(0,r.S)(a,{edit:i.Z,save:u.Z},[{name:o.u,settings:o.X},{name:s.u2,settings:s.Xd},{name:l.u2,settings:l.Xd},{name:c.u2,settings:c.Xd},{name:p.u2,settings:p.Xd},{name:d.u2,settings:d.Xd}])},22401:function(e,t,n){"use strict";var r=n(51806),a=n(52175);t.Z=function(e){let{className:t,hasInnerBlocks:n}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(a.InnerBlocks,{allowedBlocks:["core/image","jetpack/slideshow","core/cover"],renderAppender:!n&&a.InnerBlocks.ButtonBlockAppender}))}},82479:function(e,t,n){"use strict";n.d(t,{Xd:function(){return d},u2:function(){return u}});var r=n(51806),a=n(13419),o=n(69307),i=n(65736),s=n(61281),c=n(22401),l=n(19293);const __=i.__,u="recipe-hero",d={title:__("Recipe Hero","jetpack"),description:(0,r.createElement)(o.Fragment,null,(0,r.createElement)("p",null,__("Image area for the recipe.","jetpack"))),keywords:[],icon:(0,a.lt)(s),category:"widgets",edit:c.Z,save:l.Z,parent:["jetpack/recipe"]}},19293:function(e,t,n){"use strict";var r=n(51806),a=n(52175);t.Z=e=>{let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(a.InnerBlocks.Content,null))}},97355:function(e,t){"use strict";t.Z={ingredient:{type:"string",selector:".ingredientText"}}},5211:function(e,t,n){"use strict";var r=n(51806),a=n(52175);t.Z=function(e){let{className:t,attributes:n,setAttributes:o}=e;const{ingredient:i}=n;return(0,r.createElement)("div",{className:t},(0,r.createElement)(a.RichText,{tagName:"p",className:"ingredientText",value:i,onChange:e=>o({ingredient:e})}))}},79300:function(e,t,n){"use strict";n.d(t,{Xd:function(){return p},u2:function(){return d}});var r=n(51806),a=n(13419),o=n(69307),i=n(65736),s=n(61281),c=n(97355),l=n(5211),u=n(96028);const __=i.__,d="recipe-ingredient-item",p={title:__("Recipe Ingredient Item","jetpack"),description:(0,r.createElement)(o.Fragment,null,(0,r.createElement)("p",null,__("A single ingredient associated with a recipe.","jetpack"))),keywords:[],icon:(0,a.lt)(s),category:"widgets",attributes:c.Z,edit:l.Z,save:u.Z,parent:["jetpack/recipe"]}},96028:function(e,t,n){"use strict";var r=n(51806),a=n(52175);t.Z=e=>{let{className:t,attributes:n}=e;const{ingredient:o}=n;return(0,r.createElement)("div",{className:t},(0,r.createElement)(a.RichText.Content,{tagName:"p",itemprop:"recipeIngredient",value:o}))}},10828:function(e,t){"use strict";t.Z={ingredients:{type:"string[]"}}},46067:function(e,t,n){"use strict";var r=n(51806),a=n(52175);t.Z=function(e){let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(a.InnerBlocks,{allowedBlocks:["jetpack/recipe-ingredient-item"],renderAppender:a.InnerBlocks.ButtonBlockAppender}))}},35156:function(e,t,n){"use strict";n.d(t,{Xd:function(){return p},u2:function(){return d}});var r=n(51806),a=n(13419),o=n(69307),i=n(65736),s=n(61281),c=n(10828),l=n(46067),u=n(94721);const __=i.__,d="recipe-ingredients-list",p={title:__("Recipe Ingredients List","jetpack"),description:(0,r.createElement)(o.Fragment,null,(0,r.createElement)("p",null,__("Recipe ingredient list","jetpack"))),icon:(0,a.lt)(s),category:"widgets",keywords:[],attributes:c.Z,edit:l.Z,save:u.Z,parent:["jetpack/recipe"]}},94721:function(e,t,n){"use strict";var r=n(51806),a=n(52175);t.Z=e=>{let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(a.InnerBlocks.Content,null))}},37868:function(e,t,n){"use strict";var r=n(51806),a=n(52175);t.Z=e=>{let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(a.InnerBlocks.Content,null))}},89090:function(e,t,n){"use strict";var r=n(51806),a=n(52175);t.Z=function(e){let{className:t}=e;return(0,r.createElement)("li",null,(0,r.createElement)("div",{className:t},(0,r.createElement)(a.InnerBlocks,{allowedBlocks:["core/image","core/heading","core/paragraph","core/list","core/button"]})))}},43262:function(e,t,n){"use strict";n.d(t,{Xd:function(){return d},u2:function(){return u}});var r=n(51806),a=n(13419),o=n(69307),i=n(65736),s=n(61281),c=n(89090),l=n(70094);const __=i.__,u="recipe-step",d={title:__("Recipe Step","jetpack"),description:(0,r.createElement)(o.Fragment,null,(0,r.createElement)("p",null,__("A single recipe step.","jetpack"))),keywords:[],icon:(0,a.lt)(s),category:"widgets",edit:c.Z,save:l.Z,parent:["jetpack/recipe"]}},70094:function(e,t,n){"use strict";var r=n(51806),a=n(52175);t.Z=()=>(0,r.createElement)("li",{itemprop:"step",itemscope:!0,itemtype:"https://schema.org/HowToStep"},(0,r.createElement)(a.InnerBlocks.Content,null))},41979:function(e,t,n){"use strict";var r=n(24381);t.Z={stepHighlightColor:{type:"string",validator:r.Z},stepTextColor:{type:"string",validator:r.Z}}},17402:function(e,t,n){"use strict";var r=n(51806),a=n(52175),o=n(65736);const __=o.__;t.Z=function(e){let{className:t,attributes:n,setAttributes:o}=e;const{stepHighlightColor:i,stepTextColor:s}=n;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(a.PanelColorSettings,{title:__("Color Settings","jetpack"),colorSettings:[{value:i,onChange:e=>o({stepHighlightColor:e}),label:__("Step Highlight Color","jetpack")},{value:s,onChange:e=>o({stepTextColor:e}),label:__("Step Text Color","jetpack")}]},(0,r.createElement)(a.ContrastChecker,{isLargeText:!1,textColor:s,backgroundColor:i}))),(0,r.createElement)("ol",{className:t},(0,r.createElement)(a.InnerBlocks,{allowedBlocks:["jetpack/recipe-step"],renderAppender:a.InnerBlocks.ButtonBlockAppender})))}},91372:function(e,t,n){"use strict";n.d(t,{Xd:function(){return p},u2:function(){return d}});var r=n(51806),a=n(13419),o=n(69307),i=n(65736),s=n(61281),c=n(41979),l=n(17402),u=n(84749);const __=i.__,d="recipe-steps",p={title:__("Recipe Steps","jetpack"),description:(0,r.createElement)(o.Fragment,null,(0,r.createElement)("p",null,__("Step by step instructions for the recipe.","jetpack"))),keywords:[],icon:(0,a.lt)(s),category:"widgets",attributes:c.Z,edit:l.Z,save:u.Z,parent:["jetpack/recipe"]}},84749:function(e,t,n){"use strict";var r=n(51806),a=n(52175);t.Z=e=>{let{attributes:t}=e;const{stepHighlightColor:n,stepTextColor:o}=t,i={"--step-highlight-color":n,"--step-text-color":o};return(0,r.createElement)("ol",{style:i,itemscope:"",itemprop:"recipeInstructions",itemtype:"https://schema.org/HowTo"},(0,r.createElement)(a.InnerBlocks.Content,null))}},7463:function(e,t,n){"use strict";var r=n(4981),a=n(92819);const o=["submitButtonText","submitButtonClasses","backgroundButtonColor","textButtonColor","customBackgroundButtonColor","customTextButtonColor"];t.Z={attributes:{planId:{type:"integer"},submitButtonText:{type:"string"},submitButtonClasses:{type:"string"},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},align:{type:"string"}},migrate:e=>{const t=(0,a.omit)(e,o),n={text:(i=e).submitButtonText,textColor:i.textButtonColor,customTextColor:i.customTextButtonColor,backgroundColor:i.backgroundButtonColor,customBackgroundColor:i.customBackgroundButtonColor};var i;return[t,[(0,r.createBlock)("jetpack/button",{element:"a",uniqueId:"recurring-payments-id",...n})]]},isEligible:(e,t)=>(0,a.isEmpty)(t)||(0,a.some)((0,a.pick)(e,o),Boolean),save:()=>null}},25370:function(e,t,n){"use strict";var r=n(51806),a=n(52175);t.Z={attributes:{planId:{type:"integer"},align:{type:"string"},url:{type:"string",default:"#"},uniqueId:{type:"string",default:"id"},width:{type:"string"}},supports:{html:!1,__experimentalExposeControlsToChildren:!0},save:e=>{let{attributes:{width:t}}=e;const n={width:t};t?.includes("%")&&(n.width=`calc( ${t} - var( --jetpack-payment-buttons-gap, 0 ) * ${(100-t.replace("%",""))/100} )`);const o=a.useInnerBlocksProps.save({...a.useBlockProps.save(),style:n});return(0,r.createElement)("div",o)}}},3821:function(e,t,n){"use strict";n.d(t,{Z:function(){return b}});var r=n(51806),a=n(52175),o=n(9818),i=n(12238),s=n(69307),c=n(92694),l=n(99196),u=n(60386),d=n(16367),p=n(99307),m=n(81673),h=n(30429),g=n(51527);const f="recurring-payments";function b(e){let{attributes:t,clientId:n,setAttributes:b}=e;const{align:v,planId:k,width:y}=t,w=(0,p.j3)(),E=(0,o.useSelect)((e=>e(i.store)?.getCurrentPost()?.link),[]),_=(0,l.useCallback)((e=>{b({planId:e,url:(e=>{if(p.yn!==w||!E)return"#";const t=new URL(E);return t.searchParams.set("recurring_payments",e),t.toString()})(e),uniqueId:`recurring-payments-${e}`})}),[w,E,b]);(0,s.useEffect)((()=>{_(k)}),[k,_]);const{showProductManagementControls:C,showStripeNudge:S}=(0,c.applyFilters)("jetpack.recurringPayments.editorSettings",{showProductManagementControls:!0,showStripeNudge:!0},n);(0,m.Z)({attributes:t,setAttributes:b});const j=(0,a.useBlockProps)({style:(0,g.r)({width:y})}),x=(0,a.useInnerBlocksProps)({},{template:[["jetpack/button",{element:"a",passthroughAttributes:{uniqueId:"uniqueId",url:"url"}}]],templateLock:"all",templateInsertUpdatesSelection:!0});return(0,r.createElement)("div",j,C&&(0,r.createElement)(u.Z,{blockName:f,clientId:n,selectedProductId:k,setSelectedProductId:_}),(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(h.G,{align:v,width:y,onChange:e=>b({width:e})})),S&&(0,r.createElement)(d.U,{blockName:f}),(0,r.createElement)("div",x))}},94315:function(e,t,n){"use strict";var r=n(31985),a=n(56367);(0,r.Z)(a.u2,a.Xd)},56367:function(e,t,n){"use strict";n.d(t,{Xd:function(){return v},u2:function(){return h}});var r=n(51806),a=n(13419),o=n(4981),i=n(55609),s=n(69307),c=n(65736),l=n(70355),u=(n(79162),n(7463)),d=n(25370),p=n(3821),m=n(53453);const __=c.__,_x=c._x,h="recurring-payments",g=__("Payment Button","jetpack"),f=(0,r.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(i.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,r.createElement)(i.G,null,(0,r.createElement)(i.Path,{d:"M20 4H4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h16c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zm0 2v2H4V6h16zM4 18v-6h16v6H4zm2-4h7v2H6v-2zm9 0h3v2h-3v-2z"}))),b=(0,a.Wp)()||(0,a.Ug)()?"https://wordpress.com/support/video-tutorials-add-payments-features-to-your-site-with-our-guides/#how-to-use-the-payments-block-video":"https://jetpack.com/support/jetpack-blocks/payments-block/",v={apiVersion:2,title:g,icon:{src:f,foreground:(0,l.m)()},description:(0,r.createElement)(s.Fragment,null,(0,r.createElement)("p",null,__("Button allowing you to sell products and subscriptions.","jetpack")),(0,r.createElement)(i.ExternalLink,{href:b},__("Support reference","jetpack"))),category:"earn",keywords:[_x("buy","block search term","jetpack"),_x("contribution","block search term","jetpack"),_x("commerce","block search term","jetpack"),_x("credit card","block search term","jetpack"),_x("debit card","block search term","jetpack"),_x("donate","block search term","jetpack"),_x("Donations","block search term","jetpack"),_x("earn","block search term","jetpack"),_x("ecommerce","block search term","jetpack"),"gofundme",_x("memberships","block search term","jetpack"),_x("money","block search term","jetpack"),_x("paid","block search term","jetpack"),"patreon",_x("pay","block search term","jetpack"),_x("payments","block search term","jetpack"),_x("products","block search term","jetpack"),_x("purchase","block search term","jetpack"),_x("recurring","block search term","jetpack"),_x("sell","block search term","jetpack"),_x("shop","block search term","jetpack"),"stripe",_x("subscribe","block search term","jetpack"),_x("subscriptions","block search term","jetpack"),_x("sponsor","block search term","jetpack"),"square","toast","venmo"],usesContext:["isPremiumContentChild"],providesContext:{"jetpack/parentBlockWidth":"width"},attributes:{planId:{type:"integer"},align:{type:"string"},url:{type:"string",default:"#"},uniqueId:{type:"string",default:"id"},width:{type:"string"}},edit:p.Z,save:m.Z,parent:["jetpack/payment-buttons"],supports:{html:!1,__experimentalExposeControlsToChildren:!0},deprecated:[d.Z,u.Z],transforms:{from:[{type:"block",blocks:["core/buttons"],isMatch:(e,t)=>void 0!==t&&1===t.innerBlocks.length&&"core/button"===t.innerBlocks[0].name,transform:(e,t)=>{const n=t[0],r={element:"a",text:n.attributes.text??"",className:n.attributes.className??""},a=n.attributes.width;a&&(r.width=a.toString()+"%");const i=n.attributes.style?.border?.radius;i&&(r.borderRadius=parseInt(i.substring(0,i.length-2)));const s=(0,o.createBlock)("jetpack/button",r,[]);return(0,o.createBlock)("jetpack/"+h,{},[s])}}]}}},53453:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(51806),a=n(52175),o=n(51527);function i(e){let{attributes:{width:t}}=e;const n=a.useInnerBlocksProps.save({...a.useBlockProps.save(),style:(0,o.r)({width:t})});return(0,r.createElement)("div",n)}},51527:function(e,t,n){"use strict";n.d(t,{r:function(){return r}});const r=e=>{let{width:t}=e;const n={width:t};return t?.includes("%")&&(n.width=`calc(${t} - var(--jetpack-payment-buttons-gap, 0) * ${(100-t.replace("%",""))/100})`),n}},53296:function(e,t,n){"use strict";n.d(t,{AP:function(){return c},Hj:function(){return s}});var r=n(51806),a=n(55609),o=n(65736);const __=o.__,i=6;function s(e){let{attributes:t,setAttributes:n}=e;const{displayAuthor:o,displayContext:s,displayDate:c,displayHeadline:l,displayThumbnails:u,headline:d,postsToShow:p}=t;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.PanelBody,{title:__("Layout settings","jetpack")},(0,r.createElement)(a.ToggleControl,{label:__("Display headline","jetpack"),checked:l,onChange:e=>n({displayHeadline:e})}),l&&(0,r.createElement)(a.TextControl,{value:d,onChange:e=>n({headline:e}),label:__("Headline","jetpack")}),(0,r.createElement)(a.RangeControl,{label:__("Number of posts","jetpack"),value:p,onChange:e=>n({postsToShow:Math.min(e,i)}),min:1,max:i})),(0,r.createElement)(a.PanelBody,{title:__("Metadata settings","jetpack")},(0,r.createElement)(a.ToggleControl,{label:__("Display date","jetpack"),checked:c,onChange:e=>n({displayDate:e})}),(0,r.createElement)(a.ToggleControl,{label:__("Display author","jetpack"),checked:o,onChange:e=>n({displayAuthor:e})}),(0,r.createElement)(a.ToggleControl,{label:__("Display context (category or tag)","jetpack"),checked:s,onChange:e=>n({displayContext:e})}),(0,r.createElement)(a.ToggleControl,{label:__("Display thumbnail","jetpack"),checked:u,onChange:e=>n({displayThumbnails:e})})))}function c(e){let{attributes:t,setAttributes:n}=e;const{postLayout:o}=t,i=[{icon:"grid-view",title:__("Grid view","jetpack"),onClick:()=>n({postLayout:"grid"}),isActive:"grid"===o},{icon:"list-view",title:__("List view","jetpack"),onClick:()=>n({postLayout:"list"}),isActive:"list"===o}];return(0,r.createElement)(a.ToolbarGroup,{controls:i})}},86434:function(e,t,n){"use strict";n.d(t,{Z:function(){return k}});var r=n(51806),a=n(13419),o=n(52175),i=n(55609),s=n(94333),c=n(9818),l=n(12238),u=n(65736),d=n(53296),p=n(54797),m=n(17778),h=n(26700),g=n(92882);const __=u.__;function f(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||"",a=""!==t,o=""!==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&&a&&(0,r.createElement)("div",{className:"jp-related-posts-i2__post-context has-small-font-size"},o&&(0,r.createElement)("a",{href:n},t),!1===o&&t))}function v(e){const t="jp-related-posts-i2__row";let n=0;const a=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)),a&&(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,a.el)(g.u2),{isEnabled:y,enable:w,isFetchingStatus:E,isUpdatingStatus:_}=(0,p._)(),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:P,className:N,setAttributes:L}=e;if(t||E)return(0,r.createElement)(h.o,null);if(!i||!y)return(0,r.createElement)(m.v,{className:N,changeStatus:u,isLoading:C,enable:w});const{displayAuthor:T,displayContext:A,displayDate:I,displayHeadline:R,displayThumbnails:M,headline:Z,postLayout:B,postsToShow:D}=P,F="jp-relatedposts-i2",z=[];for(let e=0;e<D;e++)S[e]?z.push((0,r.createElement)(b,{id:`related-posts-${x}-post-${e}`,key:F+"-"+e,post:S[e],displayThumbnails:M,displayDate:I,displayContext:A,displayAuthor:T})):z.push((0,r.createElement)(f,{id:`related-posts-${x}-post-${e}`,key:"related-post-placeholder-"+e,displayThumbnails:M,displayDate:I,displayContext:A,isInSiteEditor:j,displayAuthor:T}));return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(d.Hj,{attributes:P,setAttributes:L})),(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(d.AP,{attributes:P,setAttributes:L})),(0,r.createElement)("div",{className:N,id:`related-posts-${x}`},R&&(0,r.createElement)("h3",null,Z),(0,r.createElement)("div",{className:F,"data-layout":B},(0,r.createElement)(v,{posts:z}))))}},89517:function(e,t,n){"use strict";var r=n(31985),a=n(92882);(0,r.Z)(a.u2,a.Xd)},54797:function(e,t,n){"use strict";n.d(t,{_:function(){return i}});var r=n(86989),a=n.n(r),o=n(69307);const i=()=>{const[e,t]=(0,o.useState)(!1),[n,r]=(0,o.useState)(!1),[i,s]=(0,o.useState)(!1);(0,o.useEffect)((()=>{t(!0),async function(){try{const e=await a()({path:"/wpcom/v2/related-posts"});return e?.enabled??!1}catch(e){return!1}}().then((e=>{s(e),t(!1)})).catch((()=>{t(!1)}))}),[]);const c=(0,o.useCallback)((()=>{r(!0),async function(){try{return await a()({path:"/wpcom/v2/related-posts/enable",method:"POST"})}catch(e){return!1}}().then((e=>{s(e),r(!1)})).catch((()=>{r(!1)}))}),[]);return(0,o.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),a=n(6895),o=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:d}=(0,o.z$)();(0,s.useEffect)((()=>{d.recordEvent("jetpack_editor_related_posts_placeholder_view")}),[d]);const p=(0,o.Wp)()||(0,o.Ug)()?"https://wordpress.com/support/related-posts/":(0,a.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 d.recordEvent("jetpack_editor_related_posts_enable"),(0,o.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:p},__("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),a=n(55609),o=n(65736),i=n(70355),s=n(86434);const __=o.__,_x=o._x,c="related-posts",l=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.G,{stroke:"currentColor",strokeWidth:"2",strokeLinecap:"square"},(0,r.createElement)(a.Path,{d:"M4,4 L4,19 M4,4 L19,4 M4,9 L19,9 M4,14 L19,14 M4,19 L19,19 M9,4 L9,19 M19,4 L19,19"}))),u={title:__("Related Posts","jetpack"),description:__("Display a list of related posts.","jetpack"),icon:{src: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),a=n(88275),o=n(22636),i=n(55609);const s=()=>(0,r.createElement)(a.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)(o.Z,{width:"100%",height:30})),(0,r.createElement)(i.FlexItem,null,(0,r.createElement)(o.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)(o.Z,{width:"100%",height:30})),(0,r.createElement)(i.FlexItem,null,(0,r.createElement)(o.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)(o.Z,{width:"100%",height:30})),(0,r.createElement)(i.FlexItem,null,(0,r.createElement)(o.Z,{width:"100%",height:90})))))},4498:function(e,t,n){"use strict";var r=n(51806),a=n(52175),o=n(55609),i=n(9818),s=n(69307),c=n(65736),l=n(65235),u=n.n(l),d=n(51100),p=n(30314);const __=c.__,_n=c._n,m=[{value:d.FV,label:__("Show after threshold","jetpack")},{value:d.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===d.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)(o.Placeholder,{icon:p.qv,label:__("Repeat Visitor","jetpack"),className:"wp-block-jetpack-repeat-visitor-placeholder"},(0,r.createElement)(o.TextControl,{className:"wp-block-jetpack-repeat-visitor-threshold",defaultValue:this.props.attributes.threshold,help:this.state.isThresholdValid?"":__("Please enter a valid number.","jetpack"),label:__("Visit count threshold","jetpack"),min:"1",onChange:this.setThreshold,pattern:"[0-9]",type:"number"}),(0,r.createElement)(o.RadioControl,{label:__("Visibility","jetpack"),selected:this.props.attributes.criteria,options:m,onChange:this.setCriteria})),(0,r.createElement)(o.Notice,{status:"info",isDismissible:!1},this.getNoticeLabel()),(0,r.createElement)("div",{className:"wp-block-jetpack-repeat-visitor__inner-container"},(0,r.createElement)(a.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),a=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)(a.InnerBlocks.Content,null)))}},51100:function(e,t,n){"use strict";n.d(t,{Am:function(){return a},FV:function(){return r},Kv:function(){return o}});const r="after-visits",a="before-visits",o=3},50323:function(e,t,n){"use strict";var r=n(31985),a=n(30314);(0,r.Z)(a.u2,a.Xd)},30314:function(e,t,n){"use strict";n.d(t,{Xd:function(){return g},qv:function(){return h},u2:function(){return m}});var r=n(51806),a=n(52175),o=n(55609),i=n(65736),s=n(70355),c=n(36598),l=n(4498),u=n(48516),d=n(51100);const __=i.__,_x=i._x,p={attributes:{criteria:{type:"string",default:d.FV},threshold:{type:"number",default:d.Kv}},supports:{html:!1},save:e=>{let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(a.InnerBlocks.Content,null))}},m="repeat-visitor",h=(0,c.Z)((0,r.createElement)(o.Path,{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"})),g={attributes:{criteria:{type:"string",default:d.FV},threshold:{type:"number",default:d.Kv}},category:"widgets",description:__("Control block visibility based on how often a visitor has viewed the page.","jetpack"),icon:{src:h,foreground:(0,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:d.FV,threshold:d.Kv},innerBlocks:[{name:"core/paragraph",attributes:{content:__("This block will only appear to a visitor who visited the page three or more times.","jetpack")}}]},deprecated:[p]}},26208:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806),a=n(52175);function o(e){let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(a.InnerBlocks,{template:[["jetpack/whatsapp-button",{}]],allowedBlocks:["jetpack/whatsapp-button"]}))}},23346:function(e,t,n){"use strict";var r=n(31985),a=n(71290),o=n(17458);(0,r.Z)(o.u2,o.Xd,[{name:a.u2,settings:a.Xd}])},17458:function(e,t,n){"use strict";n.d(t,{Xd:function(){return p},u2:function(){return d}});var r=n(51806),a=n(52175),o=n(55609),i=n(65736),s=n(70355),c=n(36598),l=n(26208),u=n(1645);const __=i.__,_x=i._x,d="send-a-message",p={title:__("Send A Message","jetpack"),description:__("Let your visitors send you messages with the tap of a button.","jetpack"),icon:{src:(0,c.Z)((0,r.createElement)(o.Path,{d:"M21 6h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1zm-4 6V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1z"})),foreground:(0,s.m)()},category:"grow",keywords:[_x("whatsapp","keyword","jetpack"),_x("messenger","keyword","jetpack"),_x("contact","keyword","jetpack"),_x("support","keyword","jetpack")],supports:{html:!1},attributes:{},edit:l.Z,save:e=>(0,r.createElement)("div",{className:e.className},(0,r.createElement)(a.InnerBlocks.Content,null)),variations:u.Z,example:{}}},46482:function(e,t,n){"use strict";n.d(t,{n:function(){return r}});const r=[{code:"US",label:"🇺🇸 +1",value:"1US"},{code:"CA",label:"🇨🇦 +1",value:"1CA"},{code:"BS",label:"🇧🇸 +1242",value:"1242BS"},{code:"BB",label:"🇧🇧 +1246",value:"1246BB"},{code:"AI",label:"🇦🇮 +1264",value:"1264AI"},{code:"AG",label:"🇦🇬 +1268",value:"1268AG"},{code:"VG",label:"🇻🇬 +1284",value:"1284VG"},{code:"VI",label:"🇻🇮 +1340",value:"1340VI"},{code:"BM",label:"🇧🇲 +1441",value:"1441BM"},{code:"GD",label:"🇬🇩 +1473",value:"1473GD"},{code:"TC",label:"🇹🇨 +1649",value:"1649TC"},{code:"MS",label:"🇲🇸 +1664",value:"1664MS"},{code:"MP",label:"🇲🇵 +1670",value:"1670MP"},{code:"GU",label:"🇬🇺 +1671",value:"1671GU"},{code:"AS",label:"🇦🇸 +1684",value:"1684AS"},{code:"LC",label:"🇱🇨 +1758",value:"1758LC"},{code:"DM",label:"🇩🇲 +1767",value:"1767DM"},{code:"VC",label:"🇻🇨 +1784",value:"1784VC"},{code:"DO",label:"🇩🇴 +1849",value:"1849DO"},{code:"TT",label:"🇹🇹 +1868",value:"1868TT"},{code:"KN",label:"🇰🇳 +1869",value:"1869KN"},{code:"JM",label:"🇯🇲 +1876",value:"1876JM"},{code:"PR",label:"🇵🇷 +1939",value:"1939PR"},{code:"EG",label:"🇪🇬 +20",value:"20EG"},{code:"MA",label:"🇲🇦 +212",value:"212MA"},{code:"DZ",label:"🇩🇿 +213",value:"213DZ"},{code:"TN",label:"🇹🇳 +216",value:"216TN"},{code:"LY",label:"🇱🇾 +218",value:"218LY"},{code:"GM",label:"🇬🇲 +220",value:"220GM"},{code:"SN",label:"🇸🇳 +221",value:"221SN"},{code:"MR",label:"🇲🇷 +222",value:"222MR"},{code:"ML",label:"🇲🇱 +223",value:"223ML"},{code:"GN",label:"🇬🇳 +224",value:"224GN"},{code:"CI",label:"🇨🇮 +225",value:"225CI"},{code:"BF",label:"🇧🇫 +226",value:"226BF"},{code:"NE",label:"🇳🇪 +227",value:"227NE"},{code:"TG",label:"🇹🇬 +228",value:"228TG"},{code:"BJ",label:"🇧🇯 +229",value:"229BJ"},{code:"MU",label:"🇲🇺 +230",value:"230MU"},{code:"LR",label:"🇱🇷 +231",value:"231LR"},{code:"SL",label:"🇸🇱 +232",value:"232SL"},{code:"GH",label:"🇬🇭 +233",value:"233GH"},{code:"NG",label:"🇳🇬 +234",value:"234NG"},{code:"TD",label:"🇹🇩 +235",value:"235TD"},{code:"CF",label:"🇨🇫 +236",value:"236CF"},{code:"CM",label:"🇨🇲 +237",value:"237CM"},{code:"CV",label:"🇨🇻 +238",value:"238CV"},{code:"ST",label:"🇸🇹 +239",value:"239ST"},{code:"GQ",label:"🇬🇶 +240",value:"240GQ"},{code:"GA",label:"🇬🇦 +241",value:"241GA"},{code:"CG",label:"🇨🇬 +242",value:"242CG"},{code:"CD",label:"🇨🇩 +243",value:"243CD"},{code:"AO",label:"🇦🇴 +244",value:"244AO"},{code:"GW",label:"🇬🇼 +245",value:"245GW"},{code:"IO",label:"🇮🇴 +246",value:"246IO"},{code:"SC",label:"🇸🇨 +248",value:"248SC"},{code:"SD",label:"🇸🇩 +249",value:"249SD"},{code:"RW",label:"🇷🇼 +250",value:"250RW"},{code:"ET",label:"🇪🇹 +251",value:"251ET"},{code:"SO",label:"🇸🇴 +252",value:"252SO"},{code:"DJ",label:"🇩🇯 +253",value:"253DJ"},{code:"KE",label:"🇰🇪 +254",value:"254KE"},{code:"TZ",label:"🇹🇿 +255",value:"255TZ"},{code:"UG",label:"🇺🇬 +256",value:"256UG"},{code:"BI",label:"🇧🇮 +257",value:"257BI"},{code:"MZ",label:"🇲🇿 +258",value:"258MZ"},{code:"ZM",label:"🇿🇲 +260",value:"260ZM"},{code:"MG",label:"🇲🇬 +261",value:"261MG"},{code:"YT",label:"🇾🇹 +262",value:"262YT"},{code:"RE",label:"🇷🇪 +262",value:"262RE"},{code:"ZW",label:"🇿🇼 +263",value:"263ZW"},{code:"NA",label:"🇳🇦 +264",value:"264NA"},{code:"MW",label:"🇲🇼 +265",value:"265MW"},{code:"LS",label:"🇱🇸 +266",value:"266LS"},{code:"BW",label:"🇧🇼 +267",value:"267BW"},{code:"SZ",label:"🇸🇿 +268",value:"268SZ"},{code:"KM",label:"🇰🇲 +269",value:"269KM"},{code:"ZA",label:"🇿🇦 +27",value:"27ZA"},{code:"SH",label:"🇸🇭 +290",value:"290SH"},{code:"ER",label:"🇪🇷 +291",value:"291ER"},{code:"AW",label:"🇦🇼 +297",value:"297AW"},{code:"FO",label:"🇫🇴 +298",value:"298FO"},{code:"GL",label:"🇬🇱 +299",value:"299GL"},{code:"GR",label:"🇬🇷 +30",value:"30GR"},{code:"NL",label:"🇳🇱 +31",value:"31NL"},{code:"BE",label:"🇧🇪 +32",value:"32BE"},{code:"FR",label:"🇫🇷 +33",value:"33FR"},{code:"ES",label:"🇪🇸 +34",value:"34ES"},{code:"KY",label:"🇰🇾 +345",value:"345KY"},{code:"GI",label:"🇬🇮 +350",value:"350GI"},{code:"PT",label:"🇵🇹 +351",value:"351PT"},{code:"LU",label:"🇱🇺 +352",value:"352LU"},{code:"IE",label:"🇮🇪 +353",value:"353IE"},{code:"IS",label:"🇮🇸 +354",value:"354IS"},{code:"AL",label:"🇦🇱 +355",value:"355AL"},{code:"MT",label:"🇲🇹 +356",value:"356MT"},{code:"CY",label:"🇨🇾 +357",value:"357CY"},{code:"FI",label:"🇫🇮 +358",value:"358FI"},{code:"BG",label:"🇧🇬 +359",value:"359BG"},{code:"HU",label:"🇭🇺 +36",value:"36HU"},{code:"LT",label:"🇱🇹 +370",value:"370LT"},{code:"LV",label:"🇱🇻 +371",value:"371LV"},{code:"EE",label:"🇪🇪 +372",value:"372EE"},{code:"MD",label:"🇲🇩 +373",value:"373MD"},{code:"AM",label:"🇦🇲 +374",value:"374AM"},{code:"BY",label:"🇧🇾 +375",value:"375BY"},{code:"AD",label:"🇦🇩 +376",value:"376AD"},{code:"MC",label:"🇲🇨 +377",value:"377MC"},{code:"SM",label:"🇸🇲 +378",value:"378SM"},{code:"VA",label:"🇻🇦 +379",value:"379VA"},{code:"UA",label:"🇺🇦 +380",value:"380UA"},{code:"RS",label:"🇷🇸 +381",value:"381RS"},{code:"ME",label:"🇲🇪 +382",value:"382ME"},{code:"XK",label:"🇽🇰 +383",value:"383XK"},{code:"HR",label:"🇭🇷 +385",value:"385HR"},{code:"SI",label:"🇸🇮 +386",value:"386SI"},{code:"BA",label:"🇧🇦 +387",value:"387BA"},{code:"MK",label:"🇲🇰 +389",value:"389MK"},{code:"IT",label:"🇮🇹 +39",value:"39IT"},{code:"RO",label:"🇷🇴 +40",value:"40RO"},{code:"CH",label:"🇨🇭 +41",value:"41CH"},{code:"CZ",label:"🇨🇿 +420",value:"420CZ"},{code:"SK",label:"🇸🇰 +421",value:"421SK"},{code:"LI",label:"🇱🇮 +423",value:"423LI"},{code:"AT",label:"🇦🇹 +43",value:"43AT"},{code:"IM",label:"🇮🇲 +44",value:"44IM"},{code:"GG",label:"🇬🇬 +44",value:"44GG"},{code:"JE",label:"🇯🇪 +44",value:"44JE"},{code:"GB",label:"🇬🇧 +44",value:"44GB"},{code:"DK",label:"🇩🇰 +45",value:"45DK"},{code:"SE",label:"🇸🇪 +46",value:"46SE"},{code:"NO",label:"🇳🇴 +47",value:"47NO"},{code:"SJ",label:"🇸🇯 +47",value:"47SJ"},{code:"PL",label:"🇵🇱 +48",value:"48PL"},{code:"DE",label:"🇩🇪 +49",value:"49DE"},{code:"FK",label:"🇫🇰 +500",value:"500FK"},{code:"GS",label:"🇬🇸 +500",value:"500GS"},{code:"BZ",label:"🇧🇿 +501",value:"501BZ"},{code:"GT",label:"🇬🇹 +502",value:"502GT"},{code:"SV",label:"🇸🇻 +503",value:"503SV"},{code:"HN",label:"🇭🇳 +504",value:"504HN"},{code:"NI",label:"🇳🇮 +505",value:"505NI"},{code:"CR",label:"🇨🇷 +506",value:"506CR"},{code:"PA",label:"🇵🇦 +507",value:"507PA"},{code:"PM",label:"🇵🇲 +508",value:"508PM"},{code:"HT",label:"🇭🇹 +509",value:"509HT"},{code:"PE",label:"🇵🇪 +51",value:"51PE"},{code:"MX",label:"🇲🇽 +52",value:"52MX"},{code:"CU",label:"🇨🇺 +53",value:"53CU"},{code:"AR",label:"🇦🇷 +54",value:"54AR"},{code:"BR",label:"🇧🇷 +55",value:"55BR"},{code:"CL",label:"🇨🇱 +56",value:"56CL"},{code:"CO",label:"🇨🇴 +57",value:"57CO"},{code:"VE",label:"🇻🇪 +58",value:"58VE"},{code:"BL",label:"🇧🇱 +590",value:"590BL"},{code:"MF",label:"🇲🇫 +590",value:"590MF"},{code:"GP",label:"🇬🇵 +590",value:"590GP"},{code:"BO",label:"🇧🇴 +591",value:"591BO"},{code:"GY",label:"🇬🇾 +592",value:"592GY"},{code:"EC",label:"🇪🇨 +593",value:"593EC"},{code:"GF",label:"🇬🇫 +594",value:"594GF"},{code:"PY",label:"🇵🇾 +595",value:"595PY"},{code:"MQ",label:"🇲🇶 +596",value:"596MQ"},{code:"SR",label:"🇸🇷 +597",value:"597SR"},{code:"UY",label:"🇺🇾 +598",value:"598UY"},{code:"MY",label:"🇲🇾 +60",value:"60MY"},{code:"CC",label:"🇨🇨 +61",value:"61CC"},{code:"AU",label:"🇦🇺 +61",value:"61AU"},{code:"CX",label:"🇨🇽 +61",value:"61CX"},{code:"ID",label:"🇮🇩 +62",value:"62ID"},{code:"PH",label:"🇵🇭 +63",value:"63PH"},{code:"NZ",label:"🇳🇿 +64",value:"64NZ"},{code:"SG",label:"🇸🇬 +65",value:"65SG"},{code:"TH",label:"🇹🇭 +66",value:"66TH"},{code:"TL",label:"🇹🇱 +670",value:"670TL"},{code:"NF",label:"🇳🇫 +672",value:"672NF"},{code:"BN",label:"🇧🇳 +673",value:"673BN"},{code:"NR",label:"🇳🇷 +674",value:"674NR"},{code:"PG",label:"🇵🇬 +675",value:"675PG"},{code:"TO",label:"🇹🇴 +676",value:"676TO"},{code:"SB",label:"🇸🇧 +677",value:"677SB"},{code:"VU",label:"🇻🇺 +678",value:"678VU"},{code:"FJ",label:"🇫🇯 +679",value:"679FJ"},{code:"PW",label:"🇵🇼 +680",value:"680PW"},{code:"WF",label:"🇼🇫 +681",value:"681WF"},{code:"CK",label:"🇨🇰 +682",value:"682CK"},{code:"NU",label:"🇳🇺 +683",value:"683NU"},{code:"WS",label:"🇼🇸 +685",value:"685WS"},{code:"KI",label:"🇰🇮 +686",value:"686KI"},{code:"NC",label:"🇳🇨 +687",value:"687NC"},{code:"TV",label:"🇹🇻 +688",value:"688TV"},{code:"PF",label:"🇵🇫 +689",value:"689PF"},{code:"TK",label:"🇹🇰 +690",value:"690TK"},{code:"FM",label:"🇫🇲 +691",value:"691FM"},{code:"MH",label:"🇲🇭 +692",value:"692MH"},{code:"RU",label:"🇷🇺 +7",value:"7RU"},{code:"KZ",label:"🇰🇿 +77",value:"77KZ"},{code:"JP",label:"🇯🇵 +81",value:"81JP"},{code:"KR",label:"🇰🇷 +82",value:"82KR"},{code:"VN",label:"🇻🇳 +84",value:"84VN"},{code:"KP",label:"🇰🇵 +850",value:"850KP"},{code:"HK",label:"🇭🇰 +852",value:"852HK"},{code:"MO",label:"🇲🇴 +853",value:"853MO"},{code:"KH",label:"🇰🇭 +855",value:"855KH"},{code:"LA",label:"🇱🇦 +856",value:"856LA"},{code:"CN",label:"🇨🇳 +86",value:"86CN"},{code:"PN",label:"🇵🇳 +872",value:"872PN"},{code:"BD",label:"🇧🇩 +880",value:"880BD"},{code:"TW",label:"🇹🇼 +886",value:"886TW"},{code:"TR",label:"🇹🇷 +90",value:"90TR"},{code:"IN",label:"🇮🇳 +91",value:"91IN"},{code:"PK",label:"🇵🇰 +92",value:"92PK"},{code:"AF",label:"🇦🇫 +93",value:"93AF"},{code:"LK",label:"🇱🇰 +94",value:"94LK"},{code:"MM",label:"🇲🇲 +95",value:"95MM"},{code:"MV",label:"🇲🇻 +960",value:"960MV"},{code:"LB",label:"🇱🇧 +961",value:"961LB"},{code:"JO",label:"🇯🇴 +962",value:"962JO"},{code:"SY",label:"🇸🇾 +963",value:"963SY"},{code:"IQ",label:"🇮🇶 +964",value:"964IQ"},{code:"KW",label:"🇰🇼 +965",value:"965KW"},{code:"SA",label:"🇸🇦 +966",value:"966SA"},{code:"YE",label:"🇾🇪 +967",value:"967YE"},{code:"OM",label:"🇴🇲 +968",value:"968OM"},{code:"PS",label:"🇵🇸 +970",value:"970PS"},{code:"AE",label:"🇦🇪 +971",value:"971AE"},{code:"IL",label:"🇮🇱 +972",value:"972IL"},{code:"BH",label:"🇧🇭 +973",value:"973BH"},{code:"QA",label:"🇶🇦 +974",value:"974QA"},{code:"BT",label:"🇧🇹 +975",value:"975BT"},{code:"MN",label:"🇲🇳 +976",value:"976MN"},{code:"NP",label:"🇳🇵 +977",value:"977NP"},{code:"IR",label:"🇮🇷 +98",value:"98IR"},{code:"TJ",label:"🇹🇯 +992",value:"992TJ"},{code:"TM",label:"🇹🇲 +993",value:"993TM"},{code:"AZ",label:"🇦🇿 +994",value:"994AZ"},{code:"GE",label:"🇬🇪 +995",value:"995GE"},{code:"KG",label:"🇰🇬 +996",value:"996KG"},{code:"UZ",label:"🇺🇿 +998",value:"998UZ"}]},1645:function(e,t,n){"use strict";var r=n(65736),a=n(42770),o=n(57954);const __=r.__,i=[{isDefault:!0,name:"whatsapp-button",title:__("WhatsApp Button","jetpack"),description:__("Let your visitors send you messages on WhatsApp with the tap of a button.","jetpack"),icon:(0,a.p)("send-a-message",o.Z),innerBlocks:[["jetpack/whatsapp-button",{}]]}];t.Z=i},88377:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={countryCode:{type:"string"},phoneNumber:{type:"string"},firstMessage:{type:"string",default:__("Hi, I got your WhatsApp information from your website.","jetpack")},buttonText:{type:"string",source:"html",selector:"a.whatsapp-block__button",default:__("Chat on WhatsApp","jetpack")},backgroundColor:{type:"string",default:"#25D366"},colorClass:{type:"string",default:"dark"},openInNewTab:{type:"boolean",default:!1}}},35513:function(e,t,n){"use strict";n.d(t,{Z:function(){return g}});var r=n(51806),a=n(52175),o=n(55609),i=n(69307),s=n(65736),c=n(39630),l=n(59809),u=n(36598),d=n(46482);const __=s.__,_x=s._x,p="#25D366",m="#465B64",h="#F4F4F4";function g(e){let{attributes:t,setAttributes:n,context:s}=e;const{countryCode:g,phoneNumber:f,firstMessage:b,openInNewTab:v,backgroundColor:k}=t,[y,w]=(0,i.useState)(!0),E=()=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BaseControl,{label:__("Phone Number","jetpack"),help:__("Enter the phone number you use for WhatsApp and would like to be contacted on.","jetpack"),className:"jetpack-whatsapp-button__phonenumber"},(0,r.createElement)(o.SelectControl,{label:__("Country code","jetpack"),value:g,onChange:e=>n({countryCode:e}),options:d.n,hideLabelFromVision:!0}),(0,r.createElement)(o.TextControl,{placeholder:__("Your phone number…","jetpack"),onChange:e=>{n({phoneNumber:e}),0===e.length&&w(!0),e.length>2&&w((e=>{const t=RegExp(/^[+]?[\s./0-9]*[(]?[0-9]{1,4}[)]?[-\s./0-9]*$/,"g");return!(void 0===e||e.length<1)&&t.test(g.replace(/\D/g,"")+e)})(e))},value:f}),!y&&(0,r.createElement)(l.Z,{isError:!0,className:"jetpack-whatsapp-error"},__("Please enter a valid phone number.","jetpack"))),"inspector"===s&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.TextareaControl,{label:__("Default First Message","jetpack"),help:__("The default first message that will be sent by visitors when using this button.","jetpack"),value:b,onChange:e=>n({firstMessage:e})}),(0,r.createElement)(o.ToggleControl,{label:__("Open in new tab","jetpack"),checked:v,onChange:e=>n({openInNewTab:e}),help:__("When the button is tapped, should a new tab be opened if the visitor does not have WhatsApp installed?","jetpack")})));return"toolbar"===s?(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.Dropdown,{placement:"bottom-start",className:"jetpack-whatsapp-button-settings-selector",contentClassName:"jetpack-whatsapp-button__popover",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return((e,t)=>(0,r.createElement)(o.Button,{className:"components-toolbar__control jetpack-contact-form__toggle",label:__("WhatsApp Button Settings","jetpack"),onClick:t,onKeyDown:n=>{e||n.keyCode!==c.DOWN||(n.preventDefault(),n.stopPropagation(),t())},icon:(0,u.Z)((0,r.createElement)(o.Path,{d:"M10.82 12.49c.02-.16.04-.32.04-.49 0-.17-.02-.33-.04-.49l1.08-.82c.1-.07.12-.21.06-.32l-1.03-1.73c-.06-.11-.2-.15-.31-.11l-1.28.5c-.27-.2-.56-.36-.87-.49l-.2-1.33c0-.12-.11-.21-.24-.21H5.98c-.13 0-.24.09-.26.21l-.2 1.32c-.31.12-.6.3-.87.49l-1.28-.5c-.12-.05-.25 0-.31.11l-1.03 1.73c-.06.12-.03.25.07.33l1.08.82c-.02.16-.03.33-.03.49 0 .17.02.33.04.49l-1.09.83c-.1.07-.12.21-.06.32l1.03 1.73c.06.11.2.15.31.11l1.28-.5c.27.2.56.36.87.49l.2 1.32c.01.12.12.21.25.21h2.06c.13 0 .24-.09.25-.21l.2-1.32c.31-.12.6-.3.87-.49l1.28.5c.12.05.25 0 .31-.11l1.03-1.73c.06-.11.04-.24-.06-.32l-1.1-.83zM7 13.75c-.99 0-1.8-.78-1.8-1.75s.81-1.75 1.8-1.75 1.8.78 1.8 1.75S8 13.75 7 13.75zM18 1.01L8 1c-1.1 0-2 .9-2 2v3h2V5h10v14H8v-1H6v3c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99z"}))}))(t,n)},renderContent:E})):(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelBody,{title:__("WhatsApp Button Settings","jetpack"),initialOpen:!0},E()),(0,r.createElement)(a.PanelColorSettings,{title:__("Color Settings","jetpack"),initialOpen:!1,colorSettings:[{value:k,onChange:e=>(e=>{if(n({backgroundColor:e}),void 0===e||e===p||e===m)return n({colorClass:"dark"});n({colorClass:"light"})})(e),label:__("Background Color","jetpack"),disableCustomColors:!0,colors:[{name:_x("WhatsApp Green","background color name","jetpack"),slug:"whatsapp-green",color:p},{name:_x("WhatsApp Dark","background color name","jetpack"),slug:"whatsapp-dark",color:m},{name:_x("WhatsApp Light","background color name","jetpack"),slug:"whatsapp-light",color:h},{name:_x("White","background color name","jetpack"),slug:"whatsapp-white",color:"#FFFFFF"}]}]}))}},33314:function(e,t,n){"use strict";var r=n(51806),a=n(52175),o=n(65235),i=n.n(o),s=n(88377),c=n(71290);t.Z={attributes:s.Z,supports:{html:!1,reusable:!1},save:function(e){let{attributes:t,className:n}=e;const{countryCode:o,phoneNumber:s,firstMessage:l,colorClass:u,buttonText:d,backgroundColor:p,openInNewTab:m}=t,h=m?"_blank":"_self",g=o&&s?o.replace(/\D+/g,"")+s.replace(/\D+/g,""):"",f=i()(n,u?"is-color-"+u:void 0,d.length?void 0:"has-no-text");return(0,r.createElement)("div",{className:f},(0,r.createElement)("a",{className:"whatsapp-block__button",href:(()=>{let e=c.pf+g;return""!==l&&(e+="&text="+encodeURIComponent(l)),e})(),style:{backgroundColor:p},target:h,rel:"noopener noreferrer"},(0,r.createElement)(a.RichText.Content,{value:d})))}}},49150:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(51806),a=n(52175),o=n(9818),i=n(69307),s=n(65235),c=n.n(s),l=n(46482),u=n(35513);function d(e){let{attributes:t,setAttributes:n,className:s,clientId:d}=e;const{countryCode:p,buttonText:m,colorClass:h,backgroundColor:g}=t,{selectBlock:f}=(0,o.useDispatch)("core/block-editor"),b=(0,i.useCallback)((async()=>{n({countryCode:"1"});const e=await fetch("https://public-api.wordpress.com/geo/").then((e=>!!e.ok&&e)).catch((()=>!1));if(e){const t=await e.json();l.n.forEach((e=>{e.code===t.country_short&&n({countryCode:e.value})}))}}),[n]);(0,i.useEffect)((()=>{void 0===p&&(b(),f(d))}),[d,p,b,f]);return(0,r.createElement)("div",{className:c()(s,h?"is-color-"+h:void 0)},(0,r.createElement)(a.BlockControls,null,(0,r.createElement)(u.Z,{context:"toolbar",setAttributes:n,attributes:t})),(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(u.Z,{context:"inspector",setAttributes:n,attributes:t})),(0,r.createElement)(a.RichText,{placeholder:m.default,value:m,onChange:e=>n({buttonText:e}),withoutInteractiveFormatting:!0,allowedFormats:[],className:"whatsapp-block__button",tagName:"a",preserveWhiteSpace:!1,style:{backgroundColor:g,color:"dark"===h?"#fff":"#465B64"}}))}},57954:function(e,t,n){"use strict";var r=n(51806),a=n(55609),o=n(70355);t.Z=(0,r.createElement)(a.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,r.createElement)(a.Path,{fill:(0,o.m)(),d:"M24,11.6909333 C24,18.1477333 18.7256,23.3818667 12.2181333,23.3818667 C10.1522667,23.3818667 8.21146667,22.8538667 6.52293333,21.9272 L0,24 L2.12666667,17.7274667 C1.05386667,15.9658667 0.436,13.8997333 0.436,11.6909333 C0.436,5.23413333 5.71093333,0 12.2181333,0 C18.7261333,0 24,5.23413333 24,11.6909333 Z M12.2181333,1.86186667 C6.75573333,1.86186667 2.31253333,6.2712 2.31253333,11.6909333 C2.31253333,13.8416 3.0136,15.8333333 4.19946667,17.4536 L2.96186667,21.104 L6.76853333,19.8941333 C8.33253333,20.9210667 10.2061333,21.52 12.2184,21.52 C17.68,21.52 22.124,17.1112 22.124,11.6914667 C22.124,6.27173333 17.6802667,1.86186667 12.2181333,1.86186667 Z M18.1677333,14.3834667 C18.0949333,14.2642667 17.9026667,14.1922667 17.6141333,14.0490667 C17.3250667,13.9058667 15.9048,13.2122667 15.6408,13.1170667 C15.376,13.0216 15.1829333,12.9736 14.9906667,13.2602667 C14.7984,13.5472 14.2448,14.1922667 14.076,14.3834667 C13.9074667,14.5752 13.7392,14.5992 13.4501333,14.4557333 C13.1616,14.3125333 12.2312,14.0096 11.128,13.0336 C10.2696,12.2741333 9.68986667,11.3365333 9.52133333,11.0493333 C9.35306667,10.7626667 9.50373333,10.6077333 9.648,10.4650667 C9.77813333,10.3365333 9.93706667,10.1304 10.0813333,9.9632 C10.2261333,9.79573333 10.2741333,9.67653333 10.3698667,9.48506667 C10.4666667,9.29386667 10.4184,9.12666667 10.3458667,8.98293333 C10.2738667,8.83973333 9.69573333,7.4296 9.4552,6.85573333 C9.21466667,6.2824 8.9744,6.37786667 8.8056,6.37786667 C8.63733333,6.37786667 8.44453333,6.35386667 8.252,6.35386667 C8.05946667,6.35386667 7.7464,6.4256 7.4816,6.71226667 C7.21706667,6.9992 6.4712,7.69253333 6.4712,9.1024 C6.4712,10.5125333 7.5056,11.8749333 7.6504,12.0658667 C7.79466667,12.2568 9.64773333,15.2445333 12.5837333,16.392 C15.52,17.5389333 15.52,17.1562667 16.0496,17.1082667 C16.5786667,17.0605333 17.7578667,16.4152 17.9994667,15.7464 C18.2394667,15.0765333 18.2394667,14.5029333 18.1677333,14.3834667 Z"}))},71290:function(e,t,n){"use strict";n.d(t,{Xd:function(){return m},pf:function(){return p},u2:function(){return u}});var r=n(65736),a=n(70355),o=n(88377),i=n(33314),s=n(49150),c=n(57954),l=n(89014);const __=r.__,_x=r._x,u="whatsapp-button",d=__("WhatsApp Button","jetpack"),p="https://api.whatsapp.com/send?phone=",m=(__("Chat on WhatsApp","jetpack"),__("Hi, I got your WhatsApp information from your website.","jetpack"),{title:d,description:__("Let your visitors send you a message on WhatsApp with the tap of a button.","jetpack"),icon:{src:c.Z,foreground:(0,a.m)()},category:"grow",parent:["jetpack/send-a-message"],keywords:[_x("whatsapp","keyword","jetpack"),_x("messenger","keyword","jetpack"),_x("contact","keyword","jetpack"),_x("support","keyword","jetpack")],supports:{html:!1,reusable:!1,align:["left","center","right"]},attributes:o.Z,edit:s.Z,save:l.Z,example:{attributes:{countryCode:"1",phoneNumber:"555-123-4567"}},deprecated:[i.Z]})},89014:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(51806),a=n(52175),o=n(65235),i=n.n(o),s=n(71290);function c(e){let{attributes:t,className:n}=e;const{countryCode:o,phoneNumber:c,firstMessage:l,buttonText:u,backgroundColor:d,colorClass:p,openInNewTab:m}=t,h=o&&c?o.replace(/\D+/g,"")+c.replace(/\D+/g,""):"",g=i()(n,p?"is-color-"+p:void 0,u.length?void 0:"has-no-text"),f=m?"_blank":"_self";return(0,r.createElement)("div",{className:g},(0,r.createElement)("a",{className:"whatsapp-block__button",href:(()=>{let e=s.pf+h;return""!==l&&(e+="&text="+encodeURIComponent(l)),e})(),style:{backgroundColor:d,color:"dark"===p?"#fff":"#465B64"},target:f,rel:"noopener noreferrer"},(0,r.createElement)(a.RichText.Content,{value:u})))}},14406:function(e,t,n){"use strict";var r=n(13419),a=n(44487);(0,r.o_)(a.u,a.X)},44487:function(e,t,n){"use strict";n.d(t,{X:function(){return p},u:function(){return d}});var r=n(51806),a=n(55609),o=n(9818),i=n(69307),s=n(65736),c=n(92819),l=n(26788),u=n(34613);const __=s.__,d="shortlinks",p={render:()=>(0,r.createElement)(h,null)};class m extends i.Component{render(){const{shortlink:e}=this.props;return e?(0,r.createElement)(u.Z,null,(0,r.createElement)(a.PanelBody,{title:__("Shortlink","jetpack"),className:"jetpack-shortlinks__panel",initialOpen:!1},(0,r.createElement)(l.Z,{link:e}))):null}}const h=(0,o.withSelect)((e=>{const t=e("core/editor").getCurrentPost();return{shortlink:(0,c.get)(t,"jetpack_shortlink","")}}))(m)},36825:function(e,t,n){"use strict";n.d(t,{LC:function(){return r},Rh:function(){return o},a7:function(){return a}});const r="jp_pay_product",a="USD",o=[a,"EUR","AUD","BRL","CAD","CZK","DKK","HKD","HUF","ILS","JPY","MYR","MXN","TWD","NZD","NOK","PHP","PLN","GBP","RUB","SGD","SEK","CHF","THB"]},65093:function(e,t,n){"use strict";n.d(t,{G:function(){return i}});var r=n(51806),a=n(55609),o=n(65736);const __=o.__;function i(e){let{setAttributes:t,postLinkText:n}=e;return(0,r.createElement)(a.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1},(0,r.createElement)(a.BaseControl,{label:__("Purchase link text","jetpack"),help:__("Enter the text you want to display on a purchase link used as fallback when the PayPal button cannot be used (e.g. emails, AMP, etc.)","jetpack"),className:"jetpack-simple-payments__purchase-link-text"},(0,r.createElement)(a.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),a=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)(a.RawHTML,null,`[simple-payment id="${n}"]`):null}}},21559:function(e,t,n){"use strict";var r=n(51806),a=n(43317),o=n(52175),i=n(55609),s=n(94333),c=n(9818),l=n(69307),u=n(65736),d=n(65235),p=n.n(d),m=n(92384),h=n(92819),g=n(59809),f=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:a}=e;!a&&t&&this.saveProduct();const o=n&&n!==this.props.attributes.postLinkUrl,i=!this.props.attributes.postLinkText;(o||i)&&r({...o&&{postLinkUrl:n},...i&&{postLinkText:__("Click here to purchase.","jetpack")}})}componentDidUpdate(e){const{hasPublishAction:t,isSelected:n,postLinkUrl:r,setAttributes:a}=this.props;(0,h.isEqual)(e.simplePayment,this.props.simplePayment)||this.injectPaymentAttributes(),!e.isSaving&&this.props.isSaving&&t&&this.validateAttributes()?this.saveProduct():e.isSelected&&!n&&this.validateAttributes();const o=r&&r!==this.props.attributes.postLinkUrl,i=!this.props.attributes.postLinkText;(o||i)&&a({...o&&{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:a,currency:o,email:i,featuredMediaId:s,featuredMediaUrl:c,featuredMediaTitle:l,multiple:u,price:d,title:p}=n;r({content:(0,h.get)(e,["content","raw"],a),currency:(0,h.get)(e,["meta","spay_currency"],o),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"],d||void 0),title:(0,h.get)(e,["title","raw"],p)}),this.shouldInjectPaymentAttributes=!this.shouldInjectPaymentAttributes}toApi(){const{attributes:e}=this.props,{content:t,currency:n,email:r,featuredMediaId:a,multiple:o,price:i,productId:s,title:c}=e;return{id:s,content:t,featured_media:a,meta:{spay_currency:n,spay_email:r,spay_multiple:o,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",f.LC,this.toApi()).then((e=>(e&&t({productId:e.id}),e))).catch((e=>{if(!e||!e.data)return;const{data:{key:t}}=e;this.setState({fieldEmailError:"spay_email"===t?(0,u.sprintf)(/* translators: placeholder is an email address. */ __("%s is not a valid email address.","jetpack"),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 f.Rh.includes(e)};validatePrice=()=>{const{currency:e,price:t}=this.props.attributes,{precision:n}=(0,a.X)(e);return t&&0!==parseFloat(t)?Number.isNaN(parseFloat(t))?(this.setState({fieldPriceError:__("Invalid price","jetpack")}),!1):parseFloat(t)<0?(this.setState({fieldPriceError:__("Your price is negative — enter a positive number so people can pay the right amount.","jetpack")}),!1):(0,k.N3)(t)>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=f.Rh.map((e=>{const{symbol:t}=(0,a.X)(e);return{value:e,label:t===e?e:`${e} ${(0,h.trimEnd)(t,".")}`}}));renderSettings=()=>(0,r.createElement)(o.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:a,instanceId:o,isSelected:s,setAttributes:c,simplePayment:l}=this.props,{content:u,currency:d,email:m,featuredMediaId:f,featuredMediaUrl:y,featuredMediaTitle:w,multiple:E,price:_,productId:C,title:S}=a,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)(_,d),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:f,featuredMediaUrl:y,featuredMediaTitle:w,setAttributes:c}),(0,r.createElement)("div",null,(0,r.createElement)(i.TextControl,{"aria-describedby":`${o}-title-error`,className:p()("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:`${o}-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:d}),(0,r.createElement)(i.TextControl,{"aria-describedby":`${o}-price-error`,className:p()("simple-payments__field","simple-payments__field-price",{"simple-payments__field-has-error":t}),label:__("Price","jetpack"),onChange:this.handlePriceChange,placeholder:(0,k.w)(0,d,!1),required:!0,step:"1",type:"number",value:_||""}),(0,r.createElement)(g.Z,{id:`${o}-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":`${o}-email-${e?"error":"help"}`,className:p()("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)(g.Z,{id:`${o}-email-error`,isError:!0},e),(0,r.createElement)(g.Z,{id:`${o}-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:a,getCurrentPost:o}=e("core/editor"),{productId:i,featuredMediaId:s}=t.attributes,c=i?(0,h.pick)(n("postType",f.LC,i),[["content"],["meta","spay_currency"],["meta","spay_email"],["meta","spay_multiple"],["meta","spay_price"],["title","raw"],["featured_media"]]):void 0,l=o();return{hasPublishAction:!!(0,h.get)(l,["_links","wp:action-publish"]),isSaving:!!a(),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),a=n(13419),o=n(55609),i=n(69307),s=n(65736),c=n(70355),l=n(36825),u=n(21559),d=n(83080);const __=s.__,_x=s._x,p=(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:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"})),m=(0,a.Wp)()||(0,a.Ug)()?"https://wordpress.com/support/pay-with-paypal/":"https://jetpack.com/support/jetpack-blocks/pay-with-paypal/",h={title:__("Pay with PayPal","jetpack"),description:(0,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)(o.ExternalLink,{href:m},__("Support reference","jetpack"))),icon:{src:p,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:d.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 o}});var r=n(51806),a=n(96059);function o(e){let{attributes:t}=e;const{content:n,currency:o,featuredMediaUrl:i,featuredMediaTitle:s,postLinkUrl:c,postLinkText:l,price:u,productId:d,title:p}=t;return d?(0,r.createElement)("div",{className:`jetpack-simple-payments-wrapper jetpack-simple-payments-${d}`},(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,p)),(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,a.w)(u,o))),(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),a=n(43317),o=n(52175),i=n(55609),s=n(94333),c=n(9818),l=n(69307),u=n(65736),d=n(6551),p=n(65235),m=n.n(p),h=n(92384),g=n(92819),f=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:a}=this.props,{productId:o}=e;(!o&&t||!a)&&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,d.getWidgetIdFromBlock)(this.props.block)&&this.validateAttributes()&&this.saveProduct()}))}componentDidUpdate(e){const{hasPublishAction:t,isSelected:n,postLinkUrl:r,setAttributes:a,isPostEditor:o}=this.props;(0,g.isEqual)(e.simplePayment,this.props.simplePayment)||this.injectPaymentAttributes(),e.isSaving||!this.props.isSaving||!t&&o||!this.validateAttributes()?e.isSelected&&!n&&this.validateAttributes():this.saveProduct();const i=r&&r!==this.props.attributes.postLinkUrl,s=!this.props.attributes.postLinkText;(i||s)&&a({...i&&{postLinkUrl:r},...s&&{postLinkText:__("Click here to purchase.","jetpack")}})}injectPaymentAttributes(){const{simplePayment:e,featuredMedia:t}=this.props;if(!this.shouldInjectPaymentAttributes||(0,g.isEmpty)(e))return;const{attributes:n,setAttributes:r}=this.props,{content:a,currency:o,email:i,featuredMediaId:s,featuredMediaUrl:c,featuredMediaTitle:l,multiple:u,price:d,title:p}=n;r({content:(0,g.get)(e,["content","raw"],a),currency:(0,g.get)(e,["meta","spay_currency"],o),email:(0,g.get)(e,["meta","spay_email"],i),featuredMediaId:(0,g.get)(e,["featured_media"],s),featuredMediaUrl:(0,g.get)(t,"url",c),featuredMediaTitle:(0,g.get)(t,"title",l),multiple:Boolean((0,g.get)(e,["meta","spay_multiple"],Boolean(u))),price:(0,g.get)(e,["meta","spay_price"],d||void 0),title:(0,g.get)(e,["title","raw"],p)}),this.shouldInjectPaymentAttributes=!this.shouldInjectPaymentAttributes}toApi(){const{attributes:e}=this.props,{content:t,currency:n,email:r,featuredMediaId:a,multiple:o,price:i,productId:s,title:c}=e;return{id:s,content:t,featured_media:a,meta:{spay_currency:n,spay_email:r,spay_multiple:o,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,a.X)(e);return t&&0!==parseFloat(t)?Number.isNaN(parseFloat(t))?(this.setState({fieldPriceError:__("Invalid price","jetpack")}),!1):parseFloat(t)<0?(this.setState({fieldPriceError:__("Your price is negative — enter a positive number so people can pay the right amount.","jetpack")}),!1):(0,w.N3)(t)>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,a.X)(e);return{value:e,label:t===e?e:`${e} ${(0,g.trimEnd)(t,".")}`}}));renderSettings=()=>(0,r.createElement)(o.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:a,instanceId:o,isSelected:s,setAttributes:c,simplePayment:l}=this.props,{content:u,currency:d,email:p,featuredMediaId:h,featuredMediaUrl:b,featuredMediaTitle:v,multiple:E,price:_,productId:C,title:S}=a,j=C&&(0,g.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&&p&&_&&S&&!e&&!t&&!n)return(0,r.createElement)(y.Z,{"aria-busy":"false",content:u,featuredMediaUrl:b,featuredMediaTitle:v,formattedPrice:(0,w.T4)(_,d),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":`${o}-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)(f.Z,{id:`${o}-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:d}),(0,r.createElement)(i.TextControl,{"aria-describedby":`${o}-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,d,!1),required:!0,step:"1",type:"number",value:_||""}),(0,r.createElement)(f.Z,{id:`${o}-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":`${o}-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:p}),(0,r.createElement)(f.Z,{id:`${o}-email-error`,isError:!0},e),(0,r.createElement)(f.Z,{id:`${o}-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:a}=e("core/editor"),{__experimentalGetDirtyEntityRecords:o,isSavingEntityRecord:i}=e("core"),s=o,{productId:c,featuredMediaId:l}=t.attributes,u=c?(0,g.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,d=a();return{block:e("core/block-editor").getBlock(t.clientId),hasPublishAction:!!(0,g.get)(d,["_links","wp:action-publish"]),isSaving:s().some((e=>i(e.kind,e.name,e.key))),simplePayment:u,featuredMedia:l?r(l):null,postLinkUrl:d?.guid?.raw,isPostEditor:Object.keys(a()).length>0}}));t.Z=(0,s.compose)(_,s.withInstanceId)(E)},36227:function(e,t,n){"use strict";var r=n(31985),a=n(61390);(0,r.Z)(a.u2,a.Xd)},39416:function(e,t,n){"use strict";var r=n(51806),a=n(52175),o=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)(a.BlockControls,null,(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarItem,null,(()=>(0,r.createElement)(a.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)(o.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)(a.MediaPlaceholder,{icon:(0,r.createElement)(a.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 g}});var r=n(51806),a=n(13419),o=n(55609),i=n(69307),s=n(65736),c=n(70355),l=n(36825),u=n(66763),d=n(24097),p=n(36239),m=n(16376),h=n(60206);const __=s.__,_x=s._x,g="simple-payments",f=(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:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"})),b=(0,a.Wp)()||(0,a.Ug)()?"https://wordpress.com/support/pay-with-paypal/":"https://jetpack.com/support/jetpack-blocks/pay-with-paypal/",v={title:__("Pay with PayPal","jetpack"),description:(0,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)(o.ExternalLink,{href:b},__("Support reference","jetpack"))),icon:{src:f,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:p.Z,save:m.Z,example:{attributes:{price:25,title:__("Jetpack t-shirt","jetpack"),content:__("Take flight in ultimate comfort with this stylish t-shirt featuring the Jetpack logo.","jetpack"),email:"jetpack@jetpack.com",featuredMediaUrl:h}},supports:{className:!1,customClassName:!1,html:!1,reusable:!1},deprecated:[u.Z,d.Z]}},72802:function(e,t,n){"use strict";var r=n(51806),a=n(65736),o=n(23879),i=n(22323);const __=a.__;t.Z=e=>{let{title:t="",content:n="",formattedPrice:a="",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)),a&&(0,r.createElement)("div",{className:"jetpack-simple-payments-price"},(0,r.createElement)("p",null,a)),(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:`${o} 2x`}))))))}},16376:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806),a=n(96059);function o(e){let{attributes:t}=e;const{content:n,currency:o,featuredMediaUrl:i,featuredMediaTitle:s,postLinkUrl:c,postLinkText:l,price:u,productId:d,title:p}=t;return d?(0,r.createElement)("div",{className:`jetpack-simple-payments-wrapper jetpack-simple-payments-${d}`},(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,p)),(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,a.T4)(u,o))),(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 o},T4:function(){return c},w:function(){return s}});var r=n(43317),a=n(92819);n(36825);const o=e=>{const t=(""+e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0},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:o,symbol:i}=(0,r.X)(t),s=e.toFixed(o);return n?`${s} ${(0,a.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 a,o={};for(a of(n&&(o={style:"currency",currency:t}),r))try{return Intl.NumberFormat(a,o).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),a=n(52175),o=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:a,images:s,sizeSlug:l},imageSizeOptions:u,onChangeImageSize:d,setAttributes:p}=e;const m="undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,h=[{label:_x("Slide","Slideshow transition effect","jetpack"),value:"slide"},{label:_x("Fade","Slideshow transition effect","jetpack"),value:"fade"}];return(0,r.createElement)(i.Fragment,null,(0,r.createElement)(o.PanelBody,{title:__("Autoplay","jetpack")},(0,r.createElement)(o.ToggleControl,{label:__("Autoplay","jetpack"),help:__("Autoplay between slides","jetpack"),checked:t,onChange:e=>{p({autoplay:e})}}),t&&(0,r.createElement)(o.RangeControl,{label:__("Delay between transitions (in seconds)","jetpack"),value:n,onChange:e=>{p({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)(o.PanelBody,{title:__("Effects","jetpack")},(0,r.createElement)(o.SelectControl,{label:__("Transition","jetpack"),value:a,onChange:e=>{p({effect:e})},options:h})),!(0,c.isEmpty)(s)&&!(0,c.isEmpty)(u)&&(0,r.createElement)(o.PanelBody,{title:__("Image Settings","jetpack")},(0,r.createElement)(o.SelectControl,{label:__("Size","jetpack"),value:l,options:u,onChange:e=>d(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)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarItem,null,(()=>(0,r.createElement)(a.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)(o.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 a={effect:"slide",grabCursor:!0,init:!0,initialSlide:0,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{bulletElement:"button",clickable:!0,el:".swiper-pagination",type:"bullets"},preventClicks:!1,preventClicksPropagation:!1,releaseFormElements:!1,setWrapperSize:!0,threshold:5,touchStartPreventDefault:!1,on:Object.fromEntries(Object.entries(r||{}).map((e=>{let[t,n]=e;return[t,function(){n(this)}]})))},[{default:o}]=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 o(e,{...a,...t})}n.d(t,{Z:function(){return r}})},21233:function(e,t,n){"use strict";var r=n(51806),a=n(11313),o=n(52175),i=n(55609),s=n(94333),c=n(9818),l=n(12238),u=n(69307),d=n(65736),p=n(92819),m=n(20288),h=n(19486),g=n(19775);const __=d.__,f=["image"],b=(e,t)=>{const n=(0,p.pick)(e,["alt","id","link","caption"]);return n.url=(0,p.get)(e,["sizes",t,"url"])||(0,p.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,p.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:o,noticeOperations:i}=this.props,s="slideshowBlockLock";r(s),(0,l.mediaUpload)({allowedTypes:f,filesList:e,onFileChange:e=>{const r=e.map((e=>b(e,n)));this.setAttributes({images:[...t,...r]}),r.every((e=>(0,a.isBlobURL)(e.url)))||o(s)},onError:i.createErrorNotice})};uploadFromFiles=e=>this.addFiles(e.target.files);getImageSizeOptions(){const{imageSizes:e}=this.props;return(0,p.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)})),a=(0,p.get)(r,["sizes",e,"source_url"]);return{...t,...a&&{url:a}}}));this.setAttributes({images:r,sizeSlug:e})};render(){const{attributes:e,className:t,isSelected:n,noticeOperations:a,noticeUI:s}=this.props,{align:c,autoplay:l,delay:d,effect:p,images:b}=e,v=this.getImageSizeOptions(),k=(0,r.createElement)(u.Fragment,null,(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(m.G,{attributes:e,imageSizeOptions:v,onChangeImageSize:this.updateImagesSize,setAttributes:e=>this.setAttributes(e)})),(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(m.J,{allowedMediaTypes:f,attributes:e,onSelectImages:this.onSelectImages})));return 0===b.length?(0,r.createElement)(u.Fragment,null,k,(0,r.createElement)(o.MediaPlaceholder,{icon:g.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:f,multiple:!0,notices:s,onError:a.createErrorNotice})):(0,r.createElement)(u.Fragment,null,k,s,(0,r.createElement)(h.Z,{align:c,autoplay:l,className:t,delay:d,effect:p,images:b,onError:a.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,p.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),a=n(19775);(0,r.Z)(a.u2,a.Xd)},19775:function(e,t,n){"use strict";n.d(t,{Xd:function(){return b},qv:function(){return h},u2:function(){return f}});var r=n(51806),a=n(55609),o=n(65736),i=n(70355),s=n(5820),c=n(21233),l=n(67240),u=n(65784),d=n(6425),p=n(85983),m=n(81504);const __=o.__,_x=o._x,h=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},(0,r.createElement)(a.Path,{d:"M21 8V19C21 20.1046 20.1057 21 19.0011 21C15.8975 21 9.87435 21 6 21",fill:"none",stroke:"currentColor",strokeWidth:"1.5"}),(0,r.createElement)(a.Rect,{x:"3.75",y:"3.75",width:"13.5",height:"13.5",rx:"0.875",fill:"none",stroke:"currentColor",strokeWidth:"1.5"}),(0,r.createElement)(a.Path,{d:"M9 14L12 11L9 8",fill:"none",stroke:"currentColor",strokeWidth:"1.5"})),g={align:"center",autoplay:!0,ids:[22,23],images:[{alt:"",caption:"",id:22,url:u},{alt:"",caption:"",id:23,url:d},{alt:"",caption:"",id:23,url:p}],effect:"slide"},f="slideshow",b={title:__("Slideshow","jetpack"),category:(0,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:g}}},85575:function(e,t,n){"use strict";n.d(t,{D:function(){return a}});var r=n(65736);const __=r.__;function a(e,t,n){let a="";if(n<=5)for(let e=1;e<=n;e++){a+='<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 a+=`<div class="swiper-pagination-simple">${t} / ${n}</div>`;return a}},67240:function(e,t,n){"use strict";var r=n(51806),a=n(19486);t.Z=e=>{let{attributes:{align:t,autoplay:n,delay:o,effect:i,images:s},className:c}=e;return(0,r.createElement)(a.Z,{align:t,autoplay:n,className:c,delay:o,effect:i,images:s})}},19486:function(e,t,n){"use strict";var r=n(51806),a=n(11313),o=n(52175),i=n(55609),s=n(69307),c=n(65736),l=n(65235),u=n.n(l),d=n(92819),p=n(6209),m=n(30847),h=n(85575),g=n(17766);const __=c.__;class f 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:a,images:o,onError:i}=this.props;if(t===e.align&&(0,d.isEqual)(o,e.images)||this.swiperInstance&&this.swiperInstance.update(),a!==e.effect||n!==e.autoplay||r!==e.delay||o!==e.images){let t;t=this.swiperIndex?o.length===e.images.length?this.swiperInstance.realIndex:e.images.length:0,this.swiperInstance&&this.swiperInstance.destroy(!0,!0),this.buildSwiper(t).then((e=>{this.swiperInstance=e,this.initializeResizeObserver(e)})).catch((()=>{i(__("The Swiper library could not be loaded.","jetpack"))}))}}initializeResizeObserver=e=>{this.clearResizeObserver(),this.resizeObserver=new p.Z((()=>{this.clearPendingRequestAnimationFrame(),this.pendingRequestAnimationFrame=requestAnimationFrame((()=>{(0,g.$m)(e),e.update()}))})),this.resizeObserver.observe(e.el)};clearPendingRequestAnimationFrame=()=>{this.pendingRequestAnimationFrame&&(cancelAnimationFrame(this.pendingRequestAnimationFrame),this.pendingRequestAnimationFrame=null)};clearResizeObserver=()=>{this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)};render(){if(!this.props?.images?.length)return null;const{autoplay:e,className:t,delay: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,a.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,a.isBlobURL)(c)&&(0,r.createElement)(i.Spinner,null),n&&(0,r.createElement)(o.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:g.UA,imagesReady:g.$m,paginationRender:g.Wj,transitionEnd:g.HV})}})()}t.Z=f},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 d}});var r=n(81975);const a=16/9,o=.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,a),1),s="undefined"!=typeof window?window.innerHeight*o: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],a=t.getElementsByTagName("IMG")[0];e.a11y.liveRegion&&(e.a11y.liveRegion[0].innerHTML=n?n.innerHTML:(0,r.escapeHTML)(a.alt))}(e)}function d(e){(e.pagination.bullets||[]).forEach((t=>{t.addEventListener("click",(()=>{const t=e.slides[e.realIndex];setTimeout((()=>{t.focus()}),500)}))}))}},81504:function(e,t,n){"use strict";var r=n(4981),a=n(92819);function o(e){return(0,a.filter)(e,(e=>{let{id:t,url:n}=e;return t&&n}))}const i={from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],isMatch:e=>o(e).length>0,transform:e=>{const t=o(e);return(0,r.createBlock)("jetpack/slideshow",{images:t.map((e=>{let{alt:t,caption:n,id:r,url:a}=e;return{alt:t,caption:n,id:r,url:a}})),ids:t.map((e=>{let{id:t}=e;return t}))})}},{type:"block",blocks:["core/gallery","jetpack/tiled-gallery"],transform:e=>{let{images:t}=e;const n=o(t);return n.length>0?(0,r.createBlock)("jetpack/slideshow",{images:n.map((e=>{let{alt:t,caption:n,id:r,url:a}=e;return{alt:t,caption:n,id:r,url:a}})),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:a,caption:o}=e;return(0,r.createBlock)("core/image",{id:t,url:n,alt:a,caption:o})})):(0,r.createBlock)("core/image")}}]};t.Z=i},65492:function(e,t,n){"use strict";var r=n(51806),a=n(52175),o=n(55609),i=n(69307),s=n(65736),c=n(94545);const __=s.__;t.Z=e=>{let{allowedMediaTypes:t,attributes:{mediaFiles:n},onSelectMedia:s}=e;return(0,r.createElement)(i.Fragment,null,(0,r.createElement)(a.BlockControls,null,!!n.length&&(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarItem,null,(()=>(0,r.createElement)(a.MediaUpload,{title:__("Edit Story","jetpack"),onSelect:s,allowedTypes:t,addToGallery:!0,multiple:"add",value:n.map((e=>e.id)),render:e=>{let{open:t}=e;return(0,r.createElement)(c.Z,{label:__("Edit Story","jetpack"),onClick:t})}}))))))}},19693:function(e,t,n){"use strict";var r=n(51806),a=n(11313),o=n(52175),i=n(55609),s=n(9818),c=n(69307),l=n(65736),u=n(65235),d=n.n(u),p=n(92819),m=n(65492),h=n(73022),g=n(93688);const __=l.__,f=["image","video"],b=e=>{const t=(0,p.pick)(e,["alt","title","id","link","type","mime","caption","width","height"]);return t.url=(0,p.get)(e,["media_details","original","url"])||(0,p.get)(e,["media_details","videopress","original"])||(0,p.get)(e,["media_details","sizes","large","source_url"])||(0,p.get)(e,["sizes","large","url"])||e.url,t.type=e.media_type||e.type,t.mime=e.mime_type||e.mime,t.title=t.title?.rendered||t.title,t.width=t.width||e.media_details?.width,t.height=t.height||e.media_details?.height,t};t.Z=(0,i.withNotices)((function(e){let{attributes:t,className:n,isSelected:i,noticeOperations:l,noticeUI:u,setAttributes:p}=e;const{mediaFiles:v}=t,{lockPostSaving:k,unlockPostSaving:y}=(0,s.useDispatch)("core/editor"),w="storyBlockLock",E=e=>{const t=e.map((e=>{if(!isNaN(e)){return v.find((t=>t.id===e))||{id:e}}return e})).map(b),n=t.filter((e=>!(0,a.isBlobURL)(e.url)));t.length!==n.length?k(w):y(w),p({mediaFiles:t})},_=(0,r.createElement)(m.Z,{allowedMediaTypes:f,attributes:t,onSelectMedia:E}),C=!!v.length,S=(0,r.createElement)(o.MediaPlaceholder,{addToGallery:C,isAppender:C,className:n,disableMediaButtons:C&&!i,icon:!C&&g.qv,labels:{title:!C&&__("Story","jetpack"),instructions:!C&&__("Drag images and videos, upload new ones, or select files from your library.","jetpack")},onSelect:E,accept:f.map((e=>e+"/*")).join(","),allowedTypes:f,multiple:"add",value:v,notices:C?void 0:u,onError:l.createErrorNotice});return C?(0,r.createElement)(c.Fragment,null,_,u,(0,r.createElement)("div",{className:d()("wp-block-jetpack-story","wp-story",n)},(0,r.createElement)(h.Z,{slides:v,disabled:!i,showSlideCount:i,shadowDOM:{enabled:!1},playInFullscreen:!1,tapToPlayPause:!1,playOnNextSlide:!1})),i&&S):(0,r.createElement)(c.Fragment,null,_,S)}))},88067:function(e,t,n){"use strict";var r=n(31985),a=n(93688);(0,r.Z)(a.u2,a.Xd)},66512:function(e,t,n){"use strict";var r=n(51806),a=n(70444);const o=(0,n(36598).Z)((0,r.createElement)(a.G,null,(0,r.createElement)(a.Path,{d:"M17 5a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2h9z"}),(0,r.createElement)(a.Path,{d:"M13 4H5a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2z"}),(0,r.createElement)(a.Path,{d:"M7 16h8a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z"})));t.Z=o},93688:function(e,t,n){"use strict";n.d(t,{Xd:function(){return p},qv:function(){return s.Z},u2:function(){return d}});var r=n(65736),a=n(70355),o=n(5820),i=n(19693),s=n(66512),c=n(29143),l=n(15915);const __=r.__,_x=r._x,u={mediaFiles:[{alt:"",caption:"",mime:"image/jpg",type:"image",id:22,url:l}]},d="story",p={title:__("Story","jetpack"),category:(0,o.Z)("media","layout"),keywords:[_x("story","block search term","jetpack"),_x("image","block search term","jetpack"),_x("video","block search term","jetpack"),_x("gallery","block search term","jetpack")],description:__("Add an interactive story.","jetpack"),attributes:{settings:{type:"object"},mediaFiles:{type:"array",default:[]}},supports:{html:!1},icon:{src:s.Z,foreground:(0,a.m)()},edit:i.Z,save:c.Z,example:{attributes:u}}},19395:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806),a=n(70444);function o(e){let{currentMedia:t}=e;const n=t&&"image"===t.type?t.url:null;return(0,r.createElement)("div",{className:"wp-story-background"},(0,r.createElement)("div",{className:"wp-story-background-image",style:{backgroundImage:n?`url("${n}")`:"none"}}),(0,r.createElement)("div",{className:"wp-story-background-blur"}),(0,r.createElement)(a.SVG,{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"0",height:"0"},(0,r.createElement)("filter",{id:"gaussian-blur-18"},(0,r.createElement)("feGaussianBlur",{stdDeviation:"18"}))))}},94754:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(51806),a=n(65736),o=n(65235),i=n.n(o);const __=a.__;function s(e){let{isEllipsis:t,disabled:n,index:o,isSelected:s,progress:c,onClick:l}=e;const u=n||t;let d=null;return t||(d=s?(0,a.sprintf)(/* translators: %d: Slide number. */ __("Slide %d, currently selected","jetpack"),o+1):(0,a.sprintf)(/* translators: %d: Slide number. */ __("Go to slide %d","jetpack"),o+1)),(0,r.createElement)("button",{role:u?"presentation":"tab",key:o,className:i()("wp-story-pagination-bullet",{"wp-story-pagination-ellipsis":t}),"aria-label":d,"aria-disabled":u||s,onClick:u||s?void 0:l,disabled:u},(0,r.createElement)("div",{className:"wp-story-pagination-bullet-bar"},(0,r.createElement)("div",{className:"wp-story-pagination-bullet-bar-progress",style:{width:`${c}%`}})))}},44689:function(e,t,n){"use strict";n.d(t,{b:function(){return c},r:function(){return l}});var r=n(82674),a=n.n(r),o=n(51806),i=n(65235),s=n.n(i);const c=e=>{let{className:t,size:n,label:r,isPressed:i,...c}=e;return(0,o.createElement)("button",a()({type:"button","aria-label":r,"aria-pressed":i,className:s()("jetpack-mdc-icon-button","circle-icon","outlined","bordered",t),style:{width:`${n}px`,height:`${n}px`}},c))},l=e=>{let{className:t,size:n=24,label:r,isPressed:i,...c}=e;return(0,o.createElement)("button",a()({type:"button","aria-label":r,"aria-pressed":i,className:s()("jetpack-mdc-icon-button",t),style:{width:`${n}px`,height:`${n}px`}},c))}},51543:function(e,t,n){"use strict";var r=n(51806);t.Z=()=>(0,r.createElement)("div",{className:"wp-story-loading-spinner"},(0,r.createElement)("div",{className:"wp-story-loading-spinner__outer"},(0,r.createElement)("div",{className:"wp-story-loading-spinner__inner"})))},85584:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(51806),a=n(65736),o=n(44689),i=n(89620);const _x=a._x;function s(e){let{playing:t,muted:n,onPlayPressed:a,onMutePressed:s,showMute:c}=e;return(0,r.createElement)("div",{className:"wp-story-controls"},(0,r.createElement)(o.r,{isPressed:t,label:t?_x("pause","Button tooltip text","jetpack"):_x("play","Button tooltip text","jetpack",0),onClick:a},t?(0,r.createElement)(i.fp,null):(0,r.createElement)(i.o1,null)),c&&(0,r.createElement)(o.r,{isPressed:n,label:n?_x("unmute","Button tooltip text","jetpack"):_x("mute","Button tooltip text","jetpack",0),onClick:s},n?(0,r.createElement)(i.xb,null):(0,r.createElement)(i.MC,null)))}},14904:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(51806),a=n(65736),o=n(44689),i=n(89620);const __=a.__;function s(e){let{fullscreen:t,onExitFullscreen:n,siteIconUrl:a,storyTitle:s}=e;return t?(0,r.createElement)("div",{className:"wp-story-meta"},(0,r.createElement)("div",{className:"wp-story-icon"},(0,r.createElement)("img",{alt:__("Site icon","jetpack"),src:a,width:"40",height:"40"})),(0,r.createElement)("div",null,(0,r.createElement)("div",{className:"wp-story-title"},s)),(0,r.createElement)(o.r,{className:"wp-story-exit-fullscreen",label:__("Exit Fullscreen","jetpack"),onClick:n},(0,r.createElement)(i.Tw,null))):null}},89620:function(e,t,n){"use strict";n.d(t,{JM:function(){return p},MC:function(){return u},Tw:function(){return l},Vq:function(){return m},fp:function(){return c},o1:function(){return s},xb:function(){return d}});var r=n(51806),a=n(70444),o=n(36598);const i=e=>{let{children:t,size:n}=e;return(0,o.Z)(t,n,n)},s=e=>{let{size:t}=e;return(0,r.createElement)(i,{size:t},(0,r.createElement)(a.Path,{d:"M8 5v14l11-7z"}))},c=e=>{let{size:t}=e;return(0,r.createElement)(i,{size:t},(0,r.createElement)(a.Path,{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"}))},l=e=>{let{size:t}=e;return(0,r.createElement)(i,{size:t},(0,r.createElement)(a.Path,{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}))},u=e=>{let{size:t}=e;return(0,r.createElement)(i,{size:t},(0,r.createElement)(a.Path,{d:"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z"}))},d=e=>{let{size:t}=e;return(0,r.createElement)(i,{size:t},(0,r.createElement)(a.Path,{d:"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z"}))},p=e=>{let{size:t}=e;return(0,r.createElement)(i,{size:t},(0,r.createElement)(a.Path,{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}))},m=e=>{let{size:t}=e;return(0,r.createElement)(i,{size:t},(0,r.createElement)(a.Path,{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}))}},69835:function(e,t,n){"use strict";n.d(t,{Aq:function(){return s.Z},WB:function(){return c.Z},ZX:function(){return a.Z},aV:function(){return i.Z},gT:function(){return r.Z},h4:function(){return o.Z},pU:function(){return l.pU}});var r=n(94754),a=n(85584),o=n(14904),i=n(74629),s=n(19395),c=n(51543),l=n(41126);n(44689)},41126:function(e,t,n){"use strict";n.d(t,{pU:function(){return u}});var r=n(82674),a=n.n(r),o=n(51806),i=n(65235),s=n.n(i);const c=e=>{let{title:t,alt:n,className:r,id:a,mediaRef:i,mime:c,sizes:l,srcset:u,url:d}=e;return(0,o.createElement)("img",{ref:i,"data-id":a,"data-mime":c,title:t,alt:n,src:d,className:s()("wp-story-image",`wp-image-${a}`,r),srcSet:u,sizes:l})},l=e=>{let{title:t,className:n,id:r,mediaRef:a,mime:i,url:c,poster:l}=e;return(0,o.createElement)("video",{className:s()("wp-story-video","intrinsic-ignore",`wp-video-${r}`,n),ref:a,"data-id":r,title:t,type:i,src:c,poster:l,tabIndex:-1,preload:"auto",playsInline:!0})},u=e=>{let{targetAspectRatio:t,cropUpTo:n,type:r,width:i,height:s,...u}=e,d=null;if(i&&s){const e=i/s;if(e>=t){e>t/(1-n)||(d="wp-story-crop-wide")}else{e<t*(1-n)||(d="wp-story-crop-narrow")}}const p="video"===r||(u.mime||"").startsWith("video/");return(0,o.createElement)("figure",null,p?(0,o.createElement)(l,a()({},u,{className:d})):(0,o.createElement)(c,a()({},u,{className:d})))}},74629:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),a=n(69307),o=n(65736),i=n(99891),s=n(44689),c=n(89620);const __=o.__;function l(e){let{ended:t,hasPrevious:n,onNextSlide:l,onPreviousSlide:u,icon:d,slideCount:p,showSlideCount:m}=e;const h=(0,a.useCallback)((e=>{t||(e.stopPropagation(),u())}),[u,t]),g=(0,a.useCallback)((e=>{t||(e.stopPropagation(),l())}),[l,t]);return(0,r.createElement)("div",{className:"wp-story-overlay"},m&&(0,r.createElement)("div",{className:"wp-story-embed-icon"},d,(0,r.createElement)("span",null,p)),!m&&(0,r.createElement)("div",{className:"wp-story-embed-icon-expand"},(0,r.createElement)(i.Z,{role:"img"})),n&&(0,r.createElement)("div",{className:"wp-story-prev-slide",onClick:h},(0,r.createElement)(s.b,{size:44,label:__("Previous Slide","jetpack"),className:"outlined-w"},(0,o.isRTL)()?(0,r.createElement)(c.Vq,{size:24}):(0,r.createElement)(c.JM,{size:24}))),(0,r.createElement)("div",{className:"wp-story-next-slide",onClick:g},(0,r.createElement)(s.b,{size:44,label:__("Next Slide","jetpack"),className:"outlined-w"},(0,o.isRTL)()?(0,r.createElement)(c.JM,{size:24}):(0,r.createElement)(c.Vq,{size:24}))))}},93340:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(51806),a=n(69307),o=n(65235),i=n.n(o),s=n(47591),c=n(74240),l=n(7449);const u=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent);function d(e){let{className:t,fullscreenClassName:n,bodyFullscreenClassName:o,fullscreen:d,shadowDOM:p,onKeyDown:m,onExitFullscreen:h,playerQuerySelector:g,children:f}=e;const b=(0,a.useRef)(),v=(0,a.useRef)(),[k,y]=(0,a.useState)(null),w=u&&s.am(),E=d&&!w,_=d&&w;return(0,a.useLayoutEffect)((()=>{if(w)d?b.current&&s.uP(b.current,h):s.bG()&&s.JF();else if(d){if(y([document.documentElement.scrollLeft,document.documentElement.scrollTop]),document.body.classList.add(o),document.getElementsByTagName("html")[0].classList.add(o),v.current){const e=v.current.querySelector(g);e&&e.focus()}}else if(document.body.classList.remove(o),document.getElementsByTagName("html")[0].classList.remove(o),k){window.scrollTo(...k);const e=b.current.querySelector(g);e&&e.focus()}}),[d]),(0,r.createElement)(r.Fragment,null,(0,r.createElement)(c.Z,p,(0,r.createElement)("div",{ref:b,className:i()(t,{[n]:_}),onKeyDown:m},!E&&f)),(0,r.createElement)(l.Z,{className:i()(t,{[n]:E}),isOpened:E,onRequestClose:h,shadowDOM:p,onKeyDown:E&&m,focusOnMount:!1,modalRef:v},E&&f))}},73022:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),a=n(9818),o=n(69307),i=n(39630),s=n(93340),c=n(75096);n(31179);function l(e){let{id:t,slides:n,metadata:l,disabled:u,...d}=e;const p=(0,o.useMemo)((()=>t||Math.random().toString(36)),[t]),{init:m,setEnded:h,setPlaying:g,setFullscreen:f,showSlide:b}=(0,a.useDispatch)("jetpack/story/player"),{playing:v,currentSlideIndex:k,fullscreen:y,isReady:w,playerSettings:E}=(0,a.useSelect)((e=>{const{getCurrentSlideIndex:t,getSettings:n,isFullscreen:r,isPlayerReady:a,isPlaying:o}=e("jetpack/story/player");return a(p)?{playing:o(p),currentSlideIndex:t(p),isReady:!0,fullscreen:r(p),playerSettings:n(p)}:{isReady:!1}}),[p]);(0,o.useEffect)((()=>{w||m(p,{slideCount:n.length,...d})}),[w,p]);const _=(0,o.useCallback)((e=>{switch(e.keyCode){case i.ENTER:if(y)break;case i.SPACE:g(p,!v);break;case i.LEFT:k>0&&b(p,k-1);break;case i.RIGHT:k<n.length-1?b(p,k+1):h(p)}}),[p,k,y,v]),C=(0,o.useCallback)((()=>{f(p,!1)}),[p]);return w?(0,r.createElement)(s.Z,{shadowDOM:E.shadowDOM,className:"wp-story-app",fullscreenClassName:"wp-story-fullscreen",bodyFullscreenClassName:"wp-story-in-fullscreen",playerQuerySelector:".wp-story-container",fullscreen:y,onExitFullscreen:C,onKeyDown:_},(0,r.createElement)(c.Z,{id:p,slides:n,metadata:l,disabled:u})):null}},47591:function(e,t,n){"use strict";n.d(t,{JF:function(){return i},am:function(){return r},bG:function(){return a},uP:function(){return o}});const r=()=>document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled,a=()=>document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullScreenElement,o=(e,t)=>{if((e.requestFullscreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen).call(e),t){const e=()=>{document.fullscreenElement||(document.removeEventListener("fullscreenchange",e),t())};document.addEventListener("fullscreenchange",e)}},i=()=>(document.exitFullscreen||document.webkitExitFullscreen||document.mozCancelFullScreen||document.msExitFullscreen).call(document)},74240:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(51806),a=n(69307);const o=window&&window.Element&&window.Element.prototype.hasOwnProperty("attachShadow");function i(e){let{enabled:t,delegatesFocus:n=!1,mode:i="open",globalStyleElements:c=[],adoptedStyleSheets:l=null,mountOnElement:u=null,children:d}=e;const[p,m]=(0,a.useState)(null),h=u||p,[g,f]=(0,a.useState)(null),b="string"==typeof c?[...document.querySelectorAll(c)]:c,v=o&&t&&b.length>0,k=(0,a.useCallback)((e=>{null!==e&&m(e.parentNode)}),[]);if((0,a.useEffect)((()=>{if(!h)return;if(h.shadowRoot)return void f(h.shadowRoot);const e=h.attachShadow({delegatesFocus:n,mode:i});l&&(e.adoptedStyleSheets=l),f(e)}),[h]),v&&!g)return u?null:(0,r.createElement)("span",{ref:k});const y=(0,r.createElement)(r.Fragment,null,v&&(0,r.createElement)(s,{globalStyleElements:b}),d);return v?(0,a.createPortal)(y,g):y}function s(e){let{globalStyleElements:t}=e;return(0,r.createElement)(r.Fragment,null,t.map(((e,t)=>{let{id:n,tagName:a,attributes:o,innerHTML:i}=e;return"LINK"===a?(0,r.createElement)("link",{key:n||t,id:n,rel:o.rel.value,href:o.href.value}):"STYLE"===a?(0,r.createElement)("style",{key:n||t,id:n},i):void 0})))}},64930:function(e,t,n){"use strict";var r=n(69307);t.Z=e=>{const t=(0,r.useRef)(),n=(0,r.useRef)(),a=(0,r.useRef)(e),o=(0,r.useCallback)((e=>{e.touches&&1===e.touches.length&&e.preventDefault()}),[]);return(0,r.useEffect)((()=>{a.current=e}),[e]),{onTouchStart:(0,r.useCallback)((e=>{e.target&&(e.target.addEventListener("touchend",o,{passive:!1}),n.current=e.target),t.current=setTimeout((()=>{a.current&&a.current(!0),t.current=null}),200)}),[]),onTouchEnd:(0,r.useCallback)((e=>{t.current?clearTimeout(t.current):(a.current&&a.current(!1),e.stopPropagation()),n.current&&n.current.removeEventListener("touchend",o)}),[])}}},3065:function(e,t,n){"use strict";async function r(e){const t=e.tagName.toLowerCase();if("img"===t){if(e.complete)return;await new Promise((t=>{e.addEventListener("load",t,{once:!0})}))}else if("video"===t||"audio"===t){if(e.HAVE_ENOUGH_DATA===e.readyState)return;await new Promise((t=>{e.addEventListener("canplaythrough",t,{once:!0}),e.addEventListener("load",t,{once:!0}),e.HAVE_NOTHING===e.readyState&&e.networkState!==e.NETWORK_LOADING&&e.load()}))}}n.d(t,{Z:function(){return r}})},89082:function(e,t,n){"use strict";n.d(t,{BM:function(){return s},i1:function(){return c}});var r=n(92819);const a=new Set(["alert","status","log","marquee","timer"]);let o=[],i=!1;function s(e){if(i)return;const t=document.body.children;(0,r.forEach)(t,(t=>{t!==e&&function(e){const t=e.getAttribute("role");return!("SCRIPT"===e.tagName||e.hasAttribute("aria-hidden")||e.hasAttribute("aria-live")||a.has(t))}(t)&&(t.setAttribute("aria-hidden","true"),o.push(t))})),i=!0}function c(){i&&((0,r.forEach)(o,(e=>{e.removeAttribute("aria-hidden")})),o=[],i=!1)}},43520:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(51806),a=n(94333),o=n(39630);function i(e){let{overlayClassName:t,children:n,className:i,focusOnMount:s,shouldCloseOnEsc:c=!0,onRequestClose:l,onKeyDown:u,modalRef:d}=e;const p=(0,a.useFocusOnMount)(s),m=(0,a.useConstrainedTabbing)(),h=(0,a.useFocusReturn)();return(0,r.createElement)("div",{className:t,onKeyDown:function(e){c&&e.keyCode===o.ESCAPE&&(e.stopPropagation(),l&&l(e)),e.target&&"button"===e.target.tagName.toLowerCase()&&e.keyCode===o.SPACE||u&&u(e)}},(0,r.createElement)("div",{className:i,ref:(0,a.useMergeRefs)([m,h,p,d])},n))}},7449:function(e,t,n){"use strict";var r=n(82674),a=n.n(r),o=n(51806),i=n(94333),s=n(69307),c=n(74240),l=n(89082),u=n(43520);let d,p=0;const m=()=>{};class h extends s.Component{constructor(e){super(e),this.prepareDOM()}componentDidMount(){p++,1===p&&this.openFirstModal()}componentWillUnmount(){p--,0===p&&this.closeLastModal(),this.cleanDOM()}prepareDOM(){d||(d=document.createElement("div"),document.body.appendChild(d)),this.node=document.createElement("div"),d.appendChild(this.node),this.node.ontouchstart=m,this.node.ontouchend=m}cleanDOM(){d.removeChild(this.node)}openFirstModal(){l.BM(d)}closeLastModal(){l.i1()}render(){const{children:e,isOpened:t,shadowDOM:n,...r}=this.props;return(0,o.createElement)(c.Z,a()({},n,{mountOnElement:this.node}),t&&(0,o.createElement)(u.Z,r,e))}}h.defaultProps={shouldCloseOnEsc:!0,isOpened:!1,focusOnMount:!0},t.Z=(0,i.withInstanceId)(h)},75096:function(e,t,n){"use strict";n.d(t,{Z:function(){return k}});var r=n(82674),a=n.n(r),o=n(51806),i=n(11313),s=n(94333),c=n(9818),l=n(69307),u=n(65736),d=n(65235),p=n.n(d),m=n(92819),h=n(66512),g=n(69835),f=n(64930),b=n(68440),v=n(63408);const __=u.__;function k(e){let{id:t,slides:n,metadata:r,disabled:u}=e;const{setFullscreen:d,setEnded:k,setPlaying:y,setMuted:w,showSlide:E}=(0,c.useDispatch)("jetpack/story/player"),{playing:_,muted:C,currentSlideIndex:S,currentSlideEnded:j,ended:x,fullscreen:P,settings:N}=(0,c.useSelect)((e=>{const{getCurrentSlideIndex:n,getSettings:r,hasCurrentSlideEnded:a,hasEnded:o,isFullscreen:i,isMuted:s,isPlaying:c}=e("jetpack/story/player");return{playing:c(t),muted:s(t),currentSlideIndex:n(t),currentSlideEnded:a(t),ended:o(t),fullscreen:i(t),settings:r(t)}}),[t]),L=(0,l.useRef)(),[T,A]=(0,l.useState)(null),[I,{width:R,height:M}]=(0,s.useResizeObserver)(),[Z,B]=(0,l.useState)(N.defaultAspectRatio),D=(0,m.some)(n,(e=>(0,i.isBlobURL)(e.url))),F=e=>{E(t,e)},z=(0,l.useCallback)((()=>{u||P||N.playInFullscreen&&!_&&y(t,!0)}),[_,u,P]),{onTouchStart:O,onTouchEnd:U}=(0,f.Z)((e=>{y(t,!e)}),[]),H=(0,l.useCallback)((()=>{S>0&&F(S-1)}),[S]),V=(0,l.useCallback)((()=>{S<n.length-1?F(S+1):k(t)}),[S,n]),G=(0,l.useCallback)((()=>{d(t,!1)}),[]);let q,$;return(0,l.useEffect)((()=>{u&&_&&y(t,!1)}),[u,_]),(0,l.useEffect)((()=>{_&&j&&V()}),[_,j]),(0,l.useLayoutEffect)((()=>{if(!L.current)return;let e=Math.round(N.defaultAspectRatio*L.current.offsetHeight);P&&(e=Math.abs(1-e/R)<N.cropUpTo?R:e),A(e)}),[R,M,P]),(0,l.useLayoutEffect)((()=>{T&&L.current&&L.current.offsetHeight>0&&B(T/L.current.offsetHeight)}),[T]),q=P?[__("You are currently playing a story.","jetpack"),_?__("Press space to pause.","jetpack"):__("Press space to play.","jetpack",0),__("Press escape to exit.","jetpack")].join(" "):__("Play story","jetpack"),$=u?"presentation":P?"dialog":"button",(0,o.createElement)("div",{className:"wp-story-display-contents"},I,(0,o.createElement)("div",{role:$,"aria-label":q,tabIndex:P?-1:0,className:p()("wp-story-container",{"wp-story-with-controls":!u&&!P&&!N.playInFullscreen,"wp-story-fullscreen":P,"wp-story-ended":x,"wp-story-disabled":u,"wp-story-clickable":!u&&!P}),style:{maxWidth:`${T}px`},onClick:z,onTouchStart:O,onTouchEnd:U},(0,o.createElement)(g.h4,a()({},r,{fullscreen:P,onExitFullscreen:G})),(0,o.createElement)("div",{ref:L,className:"wp-story-wrapper"},n.map(((e,n)=>(0,o.createElement)(v.Z,{playerId:t,key:n,media:e,index:n,playing:!u&&_,uploading:D,settings:N,targetAspectRatio:Z})))),(0,o.createElement)(g.aV,{icon:h.Z,slideCount:n.length,showSlideCount:N.showSlideCount,ended:x,hasPrevious:S>0,onPreviousSlide:H,onNextSlide:V}),N.showProgressBar&&(0,o.createElement)(b.ZP,{playerId:t,slides:n,disabled:!P,onSlideSeek:F,maxBullets:P?N.maxBulletsFullscreen:N.maxBullets}),(0,o.createElement)(g.ZX,{playing:_,muted:C,onPlayPressed:()=>y(t,!_),onMutePressed:()=>w(t,!C),showMute:(e=>{const t=e<n.length?n[e]:null;return!!t&&("video"===t.type||(t.mime||"").startsWith("video/"))})(S)})),P&&(0,o.createElement)(g.Aq,{currentMedia:N.blurredBackground&&n.length>S&&n[S]}))}},68440:function(e,t,n){"use strict";var r=n(51806),a=n(9818),o=n(92819),i=n(69835);const s=e=>{let{key:t,playerId:n,index:o,disabled:s,isSelected:c,onClick:l}=e;const u=(0,a.useSelect)((e=>e("jetpack/story/player").getCurrentSlideProgressPercentage(n)),[]);return(0,r.createElement)(i.gT,{key:t,index:o,progress:u,disabled:s,isSelected:c,onClick:l})};t.ZP=e=>{let{playerId:t,slides:n,disabled:c,onSlideSeek:l,maxBullets:u}=e;const{currentSlideIndex:d}=(0,a.useSelect)((e=>({currentSlideIndex:e("jetpack/story/player").getCurrentSlideIndex(t)})),[]),p=Math.min(n.length,u),m=Math.floor(p/2);let h,g=0,f=n.length-1;return n.length<=u||d<m?(h=d,f=p-1):d>=n.length-m?(h=d-n.length+p,g=n.length-p):(h=m,g=d-m,f=d+m),(0,r.createElement)("div",{className:"wp-story-pagination wp-story-pagination-bullets",role:"tablist"},g>0&&(0,r.createElement)(i.gT,{key:"bullet-0",index:g-1,progress:100,isEllipsis:!0}),(0,o.range)(1,p+1).map(((e,n)=>{const a=n+g;let o=null;if(a<d)o=100;else{if(!(a>d))return(0,r.createElement)(s,{playerId:t,key:`bullet-${n}`,index:a,disabled:c,isSelected:h===n,onClick:()=>l(a)});o=0}return(0,r.createElement)(i.gT,{key:`bullet-${n}`,index:a,progress:o,disabled:c,isSelected:h===n,onClick:()=>l(a)})})),f<n.length-1&&(0,r.createElement)(i.gT,{key:`bullet-${p+1}`,index:f+1,progress:0,isEllipsis:!0}))}},63408:function(e,t,n){"use strict";var r=n(82674),a=n.n(r),o=n(51806),i=n(9818),s=n(69307),c=n(65235),l=n.n(c),u=n(69835),d=n(3065);t.Z=e=>{let{playerId:t,media:n,index:r,playing:c,uploading:p,settings:m,targetAspectRatio:h}=e;const{currentSlideIndex:g,buffering:f}=(0,i.useSelect)((e=>({currentSlideIndex:e("jetpack/story/player").getCurrentSlideIndex(t),buffering:e("jetpack/story/player").isBuffering(t)})),[]),{slideReady:b}=(0,i.useDispatch)("jetpack/story/player"),v=r===g,k=(0,s.useRef)(null),[y,w]=(0,s.useState)(!1),[E,_]=(0,s.useState)(!0);return(0,s.useEffect)((()=>{if(v&&!E){const e=k.current&&k.current.src&&"video"===k.current.tagName.toLowerCase()?k.current:null;b(t,k.current,e?e.duration:m.imageTime)}}),[v,E]),(0,s.useEffect)((()=>{r<=g+(c?1:0)&&w(!0)}),[c,g]),(0,s.useLayoutEffect)((()=>{k.current&&(0,d.Z)(k.current).then((()=>{_(!1)}))}),[y,p]),(0,o.createElement)(o.Fragment,null,v&&(E||p||f)&&(0,o.createElement)("div",{className:l()("wp-story-slide","is-loading",{transparent:c&&f,"semi-transparent":p||!c&&f})},(0,o.createElement)(u.WB,null)),(0,o.createElement)("div",{role:"figure",className:"wp-story-slide",style:{display:v&&!E?"block":"none"},tabIndex:v?0:-1},y&&(0,o.createElement)(u.pU,a()({},n,{targetAspectRatio:h,cropUpTo:m.cropUpTo,index:r,mediaRef:k}))))}},29154:function(e,t,n){"use strict";function r(e,t){return{type:"SET_MUTED",value:t,playerId:e}}function a(e,t){return{type:"SET_PLAYING",value:t,playerId:e}}function o(e,t){return{type:"SHOW_SLIDE",index:t,playerId:e}}function i(e,t,n){return{type:"SLIDE_READY",mediaElement:t,duration:n,playerId:e}}function s(e,t){return{type:"SET_CURRENT_SLIDE_PROGRESS",value:t,playerId:e}}function c(e){return{type:"RESET_CURRENT_SLIDE_PROGRESS",playerId:e}}function l(e){return{type:"SET_CURRENT_SLIDE_ENDED",playerId:e}}function u(e,t){return{type:"SET_FULLSCREEN",playerId:e,fullscreen:t}}function d(e){return{type:"ENDED",playerId:e}}function p(e){return{type:"INIT",playerId:e,settings:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}}}function m(e,t){return{type:"SET_BUFFERING",value:t,playerId:e}}n.r(t),n.d(t,{init:function(){return p},resetCurrentSlideProgress:function(){return c},setBuffering:function(){return m},setCurrentSlideEnded:function(){return l},setCurrentSlideProgress:function(){return s},setEnded:function(){return d},setFullscreen:function(){return u},setMuted:function(){return r},setPlaying:function(){return a},showSlide:function(){return o},slideReady:function(){return i}})},17380:function(e,t,n){"use strict";n.d(t,{H2:function(){return o},Qz:function(){return a},XO:function(){return r}});const r={currentTime:0,duration:null,timeout:null,lastUpdate:null},a={progress:r,index:0,mediaElement:null,duration:null,ended:!1,ready:!1},o={slideCount:0,currentSlide:a,previousSlide:null,muted:!1,playing:!1,ended:!1,buffering:!1,fullscreen:!1,settings:{imageTime:5,startMuted:!1,playInFullscreen:!0,playOnNextSlide:!0,playOnLoad:!1,exitFullscreenOnEnd:!0,loadInFullscreen:!1,blurredBackground:!0,showSlideCount:!1,showProgressBar:!0,shadowDOM:{enabled:!0,mode:"open",globalStyleElements:'#jetpack-block-story-css, link[href*="jetpack/_inc/blocks/story/view.css"]'},defaultAspectRatio:.5625,cropUpTo:.2,volume:.8,maxBullets:7,maxBulletsFullscreen:14}}},78733:function(e,t,n){"use strict";var r=n(29154),a=n(20876);const o=e=>e&&e.src&&"video"===e.tagName.toLowerCase();function i(e,t){const{getState:n}=t,r=e.playerId,i=(0,a.isMuted)(n(),r),s=(0,a.isPlaying)(n(),r),c=(0,a.getCurrentMediaElement)(n(),r),l=(0,a.getPreviousSlideMediaElement)(n(),r),u=(0,a.getSettings)(n(),r);o(l)&&(l.currentTime=0,l.onwaiting=null,l.onplaying=null,l.pause()),o(c)&&(i!==c.muted&&(c.muted=i,i||(c.volume=u.volume)),s?c.play():c.pause())}function s(e,t){const{getState:n,dispatch:i}=t,c=e.playerId,l=(0,a.isCurrentSlideReady)(n(),c),u=(0,a.isPlaying)(n(),c),d=(0,a.getCurrentSlideProgress)(n(),c);if(clearTimeout(d.timeout),!u||!l)return void(d.lastUpdate&&i((0,r.setCurrentSlideProgress)(c,{...d,lastUpdate:null})));const p=(0,a.getCurrentMediaElement)(n(),c),m=(0,a.getCurrentMediaDuration)(n(),c),h=d.lastUpdate?Date.now()-d.lastUpdate:100,g=o(p)?p.currentTime:d.currentTime+h/1e3;if(g>=m){i((0,r.setCurrentSlideEnded)(c));const e=(0,a.getSlideCount)(n(),c);(0,a.getCurrentSlideIndex)(n(),c)===e-1&&i((0,r.setEnded)(c))}else i((0,r.setCurrentSlideProgress)(c,{timeout:setTimeout((()=>s(e,t)),100),lastUpdate:Date.now(),duration:m,currentTime:g}))}t.Z={SET_PLAYING:[s,i],SLIDE_READY:[function(e,t){const{getState:n,dispatch:i}=t,s=e.playerId,c=(0,a.getCurrentMediaElement)(n(),s);if(!o(c))return;const l=(0,a.getCurrentSlideProgress)(n(),s);0===c.currentTime&&l.currentTime>0&&(c.currentTime=l.currentTime),c.onwaiting=()=>i((0,r.setBuffering)(s,!0)),c.onplaying=()=>i((0,r.setBuffering)(s,!1))},s,i],SET_MUTED:i,SHOW_SLIDE:i}},31179:function(e,t,n){"use strict";var r=n(9818),a=n(29154),o=n(74787),i=n(13498),s=n(20876);const c=(0,r.registerStore)("jetpack/story/player",{actions:a,reducer:i.Z,selectors:s});(0,o.Z)(c)},74787:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(92819),a=n(24274),o=n.n(a),i=n(78733);function s(e){const t=[o()(i.Z)];let n=()=>{throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},a=[];const s={getState:e.getState,dispatch:function(){return n(...arguments)}};return a=t.map((e=>e(s))),n=(0,r.flowRight)(...a)(e.dispatch),e.dispatch=n,e}},13498:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(92819),a=n(17380);function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.H2,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_SLIDE":{const n=e.currentSlide===t.index+1;return{...e,currentSlide:{...a.Qz,index:t.index},previousSlide:e.currentSlide,playing:n?e.settings.playOnNextSlide:e.playing}}case"SLIDE_READY":return{...e,buffering:!1,currentSlide:{...e.currentSlide,mediaElement:t.mediaElement,duration:t.duration,ready:!0},previousSlide:null};case"SET_CURRENT_SLIDE_PROGRESS":return{...e,currentSlide:{...e.currentSlide,progress:t.value}};case"SET_CURRENT_SLIDE_ENDED":return{...e,currentSlide:{...e.currentSlide,ended:!0}};case"RESET_CURRENT_SLIDE_PROGRESS":return{...e,currentSlide:{...e.currentSlide,progress:{...a.XO}}};case"SET_MUTED":return{...e,muted:t.value};case"SET_PLAYING":{const n=t.value&&e.ended;return{...e,playing:t.value,buffering:!!t.value&&e.buffering,fullscreen:!e.playing&&t.value?e.settings.playInFullscreen:e.fullscreen,ended:!n&&e.ended,currentSlide:n?{...a.Qz,index:0}:e.currentSlide,previousSlide:n?null:e.previousSlide}}case"SET_BUFFERING":return{...e,buffering:t.value};case"SET_FULLSCREEN":return{...e,fullscreen:t.fullscreen,playing:!(e.fullscreen&&!t.fullscreen&&e.settings.playInFullscreen)&&e.playing};case"INIT":{const n=(0,r.merge)({},e.settings,t.settings);return{...e,settings:n,playing:n.playOnLoad,fullscreen:n.loadInFullscreen}}case"ENDED":return{...e,currentSlide:{...a.Qz,index:e.settings.slideCount-1,progress:{...a.XO,currentTime:100,duration:100}},ended:!0,playing:!1,fullscreen:!e.settings.exitFullscreenOnEnd}}return e}function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.playerId?{...e,[t.playerId]:o(e[t.playerId],t)}:e}},20876:function(e,t,n){"use strict";function r(e,t){return!!e[t]}function a(e,t){return e[t].currentSlide.index}function o(e,t){return e[t].currentSlide.progress}function i(e,t){const n=e[t].currentSlide.progress.currentTime,r=e[t].currentSlide.progress.duration,a=Math.round(100*n/r);return a>=100?100:a}function s(e,t){return e[t].playing}function c(e,t){return e[t].muted}function l(e,t){return e[t].buffering}function u(e,t){return e[t].currentSlide.mediaElement}function d(e,t){return e[t].currentSlide.duration}function p(e,t){return e[t].currentSlide.ended}function m(e,t){return e[t].currentSlide.ready}function h(e,t){return e[t].previousSlide?.mediaElement}function g(e,t){return e[t].fullscreen}function f(e,t){return e[t].ended}function b(e,t){return e[t].settings}function v(e,t){return e[t].settings.slideCount}n.r(t),n.d(t,{getCurrentMediaDuration:function(){return d},getCurrentMediaElement:function(){return u},getCurrentSlideIndex:function(){return a},getCurrentSlideProgress:function(){return o},getCurrentSlideProgressPercentage:function(){return i},getPreviousSlideMediaElement:function(){return h},getSettings:function(){return b},getSlideCount:function(){return v},hasCurrentSlideEnded:function(){return p},hasEnded:function(){return f},isBuffering:function(){return l},isCurrentSlideReady:function(){return m},isFullscreen:function(){return g},isMuted:function(){return c},isPlayerReady:function(){return r},isPlaying:function(){return s}})},29143:function(e,t,n){"use strict";var r=n(51806),a=n(65235),o=n.n(a);t.Z=e=>{let{className:t}=e;return(0,r.createElement)("div",{className:o()("wp-story",t)})}},62924:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={subscribePlaceholder:{type:"string",default:__("Type your email…","jetpack")},showSubscribersTotal:{type:"boolean",default:!1},includeSocialFollowers:{type:"boolean",default:!0},buttonOnNewLine:{type:"boolean",default:!1},buttonWidth:{type:"string"},submitButtonText:{type:"string",default:__("Subscribe","jetpack")},emailFieldBackgroundColor:{type:"string"},customEmailFieldBackgroundColor:{type:"string"},emailFieldGradient:{type:"string"},customEmailFieldGradient:{type:"string"},buttonBackgroundColor:{type:"string"},customButtonBackgroundColor:{type:"string"},buttonGradient:{type:"string"},customButtonGradient:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"string"},borderRadius:{type:"number"},borderWeight:{type:"number"},borderColor:{type:"string"},customBorderColor:{type:"string"},padding:{type:"number"},spacing:{type:"number"},successMessage:{type:"string",default:__("Success! An email was just sent to confirm your subscription. Please find the email now and click 'Confirm Follow' to start subscribing.","jetpack")}}},58841:function(e,t,n){"use strict";n.d(t,{FP:function(){return h},G0:function(){return r},Gp:function(){return a},HE:function(){return d},K3:function(){return s},S9:function(){return o},Tr:function(){return p},VF:function(){return i},XJ:function(){return c},bK:function(){return u},pC:function(){return m},tm:function(){return g},xV:function(){return l}});const r=0,a=50,o=0,i=0,s=15,c=1,l=5,u=50,d=15,p=0,m=50,h=10,g="16px"},57532:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(51806),a=n(52947),o=n(81050),i=n(13419),s=n(52175),c=n(55609),l=n(69307),u=n(65736),d=n(34904),p=n(30429),m=n(58841);const __=u.__,_n=u._n;function h(e){let{buttonBackgroundColor:t,borderColor:n,buttonGradient:h,borderRadius:g,borderWeight:f,buttonOnNewLine:b,emailFieldBackgroundColor:v,fallbackButtonBackgroundColor:k,fallbackTextColor:y,fontSize:w,includeSocialFollowers:E,isGradientAvailable:_,padding:C,setAttributes:S,setBorderColor:j,setButtonBackgroundColor:x,setTextColor:P,showSubscribersTotal:N,spacing:L,subscriberCount:T,textColor:A,buttonWidth:I,successMessage:R}=e;const{isPublicizeEnabled:M}=(0,o.Nh)();return(0,r.createElement)(r.Fragment,null,T>0&&(0,r.createElement)(d.Z,null,(0,l.createInterpolateElement)((0,u.sprintf)(/* translators: %s is the number of subscribers. The \xA0 non-breaking space is to make sure the last two words are on the same line. */ _n("<span>%s reader</span> is subscribed.","<span>%s readers</span> are subscribed.",T,"jetpack"),(0,a.Z)(T)),{span:(0,r.createElement)("span",{style:{fontWeight:"bold"}})})),_&&(0,r.createElement)(s.__experimentalPanelColorGradientSettings,{title:__("Color","jetpack"),className:"wp-block-jetpack-subscriptions__backgroundpanel",settings:[{colorValue:t.color,onColorChange:x,gradientValue:h.gradientValue,onGradientChange:h.setGradient,label:__("Button Background","jetpack")},{colorValue:A.color,onColorChange:P,label:__("Button Text","jetpack")},{colorValue:n.color,onColorChange:j,label:__("Border","jetpack")}],initialOpen:!0},(0,r.createElement)(s.ContrastChecker,{fontSize:w.size,textColor:A.color,backgroundColor:v.color,fallbackButtonBackgroundColor:k,fallbackTextColor:y})),!_&&(0,r.createElement)(s.PanelColorSettings,{title:__("Background Colors","jetpack"),className:"wp-block-jetpack-subscriptions__backgroundpanel",colorSettings:[{value:t.color,onChange:x,label:__("Button Background Color","jetpack")},{value:A.color,onChange:P,label:__("Button Text Color","jetpack")},{value:n.color,onColorChange:j,label:__("Border Color","jetpack")}],initialOpen:!1},(0,r.createElement)(s.ContrastChecker,{fontSize:w.size,textColor:A.color,backgroundColor:v.color,fallbackButtonBackgroundColor:k,fallbackTextColor:y})),(0,r.createElement)(c.PanelBody,{title:__("Typography","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__textpanel"},(0,r.createElement)(s.FontSizePicker,{withSlider:!0,value:w.size,onChange:e=>{const t=e||m.tm;S({fontSize:t,customFontSize:t})},__nextHasNoMarginBottom:!0})),(0,r.createElement)(c.PanelBody,{title:__("Border","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__borderpanel"},(0,r.createElement)(c.RangeControl,{value:g,label:__("Border Radius","jetpack"),min:m.G0,max:m.Gp,initialPosition:m.S9,allowReset:!0,onChange:e=>S({borderRadius:e})}),(0,r.createElement)(c.RangeControl,{value:f,label:__("Border Weight","jetpack"),min:m.VF,max:m.K3,initialPosition:m.XJ,allowReset:!0,onChange:e=>S({borderWeight:e})})),(0,r.createElement)(c.PanelBody,{title:__("Spacing","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__spacingpanel"},(0,r.createElement)(c.RangeControl,{value:C,label:__("Space Inside","jetpack"),min:m.xV,max:m.bK,initialPosition:m.HE,allowReset:!0,onChange:e=>S({padding:e})}),(0,r.createElement)(c.RangeControl,{value:L,label:__("Space Between","jetpack"),min:m.Tr,max:m.pC,initialPosition:m.FP,allowReset:!0,onChange:e=>S({spacing:e})}),(0,r.createElement)(p.g,{width:I,onChange:e=>S({buttonWidth:e})})),(0,r.createElement)(c.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__displaypanel"},(0,r.createElement)(c.ToggleControl,{label:__("Show subscriber count","jetpack"),checked:N,onChange:()=>{S({showSubscribersTotal:!N})},help:()=>{if(!T||T<1)return __("This will remain hidden until there is at least one subscriber.","jetpack")}}),N&&M?(0,r.createElement)(c.ToggleControl,{disabled:!N,label:__("Include social followers in count","jetpack"),checked:E,onChange:()=>{S({includeSocialFollowers:!E})}}):null,(0,r.createElement)(c.ToggleControl,{label:__("Place button on new line","jetpack"),checked:b,onChange:()=>{S({buttonOnNewLine:!b})}}),!(0,i.Wp)()&&(0,r.createElement)(c.TextareaControl,{value:R,label:__("Success message","jetpack"),help:__("Edit the message displayed when a user subscribes.","jetpack"),onChange:e=>S({successMessage:e})})))}},2916:function(e,t,n){"use strict";var r=n(75623),a=n(45097),o=n(20121),i=n(76609),s=n(11689),c=n(79024),l=n(68600),u=n(39583);t.Z=[u.Z,l.Z,c.Z,s.Z,i.Z,o.Z,a.Z,r.Z]},75623:function(e,t,n){"use strict";var r=n(51806),a=n(69307),o=n(65736),i=n(92819);const __=o.__;t.Z={attributes:{subscribeButton:{type:"string",default:__("Subscribe","jetpack")},showSubscribersTotal:{type:"boolean",default:!1}},migrate:e=>({submitButtonText:e.subscribeButton,showSubscribersTotal:e.showSubscribersTotal}),isEligible:e=>!(!e.hasOwnProperty("subscribeButton")||!(0,i.isEmpty)(e.subscribeButton)),save:function(e){let{attributes:t}=e;return(0,r.createElement)(a.RawHTML,null,`[jetpack_subscription_form show_subscribers_total="${t.showSubscribersTotal}" show_only_email_and_button="true"]`)}}},45097:function(e,t,n){"use strict";var r=n(65736),a=n(65534);const __=r.__;t.Z={attributes:{subscribePlaceholder:{type:"string",default:__("Email Address","jetpack")},subscribeButton:{type:"string",default:__("Subscribe","jetpack")},showSubscribersTotal:{type:"boolean",default:!1},submitButtonText:{type:"string",default:__("Subscribe","jetpack")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},submitButtonClasses:{type:"string"}},migrate:e=>({subscribePlaceholder:e.subscribePlaceholder,showSubscribersTotal:e.showSubscribersTotal,buttonOnNewLine:!0,submitButtonText:e.submitButtonText,buttonBackgroundColor:e.backgroundButtonColor?e.backgroundButtonColor:"primary",customButtonBackgroundColor:e.customBackgroundButtonColor,textColor:e.textButtonColor?e.textButtonColor:"background",customTextColor:e.customTextButtonColor}),save:a.Z}},65534:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806),a=n(69307);function o(e){let{attributes:t}=e;const{showSubscribersTotal:n,submitButtonClasses:o,customBackgroundButtonColor:i,customTextButtonColor:s,submitButtonText:c}=t;return(0,r.createElement)(a.RawHTML,null,`[jetpack_subscription_form show_only_email_and_button="true" custom_background_button_color="${i}" custom_text_button_color="${s}" submit_button_text="${c}" submit_button_classes="${o}" show_subscribers_total="${n}" ]`)}},20084:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={subscribePlaceholder:{type:"string",default:__("Enter your email address","jetpack")},showSubscribersTotal:{type:"boolean",default:!1},buttonOnNewLine:{type:"boolean",default:!1},submitButtonText:{type:"string",default:__("Sign Up","jetpack")},emailFieldBackgroundColor:{type:"string"},customEmailFieldBackgroundColor:{type:"string"},emailFieldGradient:{type:"string"},customEmailFieldGradient:{type:"string"},buttonBackgroundColor:{type:"string"},customButtonBackgroundColor:{type:"string"},buttonGradient:{type:"string"},customButtonGradient:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},fontSize:{type:"number"},customFontSize:{type:"number"},borderRadius:{type:"number"},borderWeight:{type:"number"},borderColor:{type:"string"},customBorderColor:{type:"string"},padding:{type:"number"},spacing:{type:"number"}}},60293:function(e,t,n){"use strict";n.d(t,{ZP:function(){return h}});var r=n(51806),a=n(52175),o=n(69307),i=n(65235),s=n.n(i),c=n(20084);const l=0,u=1,d=15,p=10,m=16;function h(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const{subscribePlaceholder:i,showSubscribersTotal:h,buttonOnNewLine:g,submitButtonText:f,emailFieldBackgroundColor:b,customEmailFieldBackgroundColor:v,emailFieldGradient:k,customEmailFieldGradient:y,buttonBackgroundColor:w,customButtonBackgroundColor:E,buttonGradient:_,customButtonGradient:C,textColor:S,customTextColor:j,fontSize:x,customFontSize:P,borderRadius:N,borderWeight:L,borderColor:T,customBorderColor:A,padding:I,spacing:R}=t,M=!!a.__experimentalGetGradientClass,Z=(0,a.getColorClassName)("color",S),B=(0,a.getFontSizeClass)(x),D=(0,a.getColorClassName)("border-color",T),F=(0,a.getColorClassName)("background-color",w),z=M?(0,a.__experimentalGetGradientClass)(_):void 0,O=(0,a.getColorClassName)("background-color",b),U=M?(0,a.__experimentalGetGradientClass)(k):void 0,H=s()(0===N?"no-border-radius":void 0,B,D),V=s()(H,S?"has-text-color":void 0,Z,w||_?"has-background":void 0,F,z),G=s()(H,O,U),q=!O&&y?y:v,$=!F&&C?C:E;let W=i,J=f;return"check-text-defaults"===n&&(W=i===c.Z.subscribePlaceholder.default?"Enter your email address":i,J=f===c.Z.submitButtonText.default?"Sign Up":f),(0,r.createElement)("div",{className:s()(e,"wp-block-jetpack-subscriptions__supports-newline",g?"wp-block-jetpack-subscriptions__use-newline":void 0,h?"wp-block-jetpack-subscriptions__show-subs":void 0)},(0,r.createElement)(o.RawHTML,null,`\n\t\t\t[jetpack_subscription_form\n\t\t\t\tsubscribe_placeholder="${W}"\n\t\t\t\tshow_subscribers_total="${h}"\n\t\t\t\tbutton_on_newline="${g}"\n\t\t\t\tsubmit_button_text="${J}"\n\t\t\t\tcustom_background_emailfield_color="${q}"\n\t\t\t\tcustom_background_button_color="${$}"\n\t\t\t\tcustom_text_button_color="${j}"\n\t\t\t\tcustom_font_size="${P||m}"\n\t\t\t\tcustom_border_radius="${N||l}"\n\t\t\t\tcustom_border_weight="${L||u}"\n\t\t\t\tcustom_border_color="${A}"\n\t\t\t\tcustom_padding="${I||d}"\n\t\t\t\tcustom_spacing="${R||p}"\n\t\t\t\tsubmit_button_classes="${V}"\n\t\t\t\temail_field_classes="${G}"\n\t\t\t\tshow_only_email_and_button="true"\n\t\t\t]`))}},20121:function(e,t,n){"use strict";var r=n(20084),a=n(60293);t.Z={attributes:r.Z,migrate:e=>{const{fontSize:t,customFontSize:n}=e;return{...e,fontSize:t?`${t}px`:void 0,customFontSize:n?`${n}px`:void 0}},save:e=>{let{className:t,attributes:n}=e;return(0,a.ZP)(t,n)}}},76609:function(e,t,n){"use strict";var r=n(20084),a=n(60293);t.Z={attributes:r.Z,migrate:e=>{const{fontSize:t,customFontSize:n}=e;return{...e,fontSize:t?`${t}px`:void 0,customFontSize:n?`${n}px`:void 0}},save:e=>{let{className:t,attributes:n}=e;return(0,a.ZP)(t,n,"check-text-defaults")}}},11689:function(e,t,n){"use strict";var r=n(20084),a=n(92167);t.Z={attributes:r.Z,migrate:e=>{const{fontSize:t,customFontSize:n}=e;return{...e,fontSize:t?`${t}px`:void 0,customFontSize:n?`${n}px`:void 0}},save:a.ZP}},92167:function(e,t,n){"use strict";n.d(t,{ZP:function(){return g}});var r=n(51806),a=n(52175),o=n(69307),i=n(65235),s=n.n(i),c=n(92819),l=n(20084);const u=0,d=1,p=15,m=10,h=16;function g(e){let{className:t,attributes:n}=e;const{subscribePlaceholder:i,showSubscribersTotal:g,buttonOnNewLine:f,submitButtonText:b,emailFieldBackgroundColor:v,customEmailFieldBackgroundColor:k,emailFieldGradient:y,customEmailFieldGradient:w,buttonBackgroundColor:E,customButtonBackgroundColor:_,buttonGradient:C,customButtonGradient:S,textColor:j,customTextColor:x,fontSize:P,customFontSize:N,borderRadius:L,borderWeight:T,borderColor:A,customBorderColor:I,padding:R,spacing:M}=n,Z=!!a.__experimentalGetGradientClass,B=(0,a.getColorClassName)("color",j),D=(0,a.getFontSizeClass)(P),F=(0,a.getColorClassName)("border-color",A),z=(0,a.getColorClassName)("background-color",E),O=Z?(0,a.__experimentalGetGradientClass)(C):void 0,U=(0,a.getColorClassName)("background-color",v),H=Z?(0,a.__experimentalGetGradientClass)(y):void 0,V=s()(0===L?"no-border-radius":void 0,D,F),G=s()(V,j?"has-text-color":void 0,B,E||C?"has-background":void 0,z,O),q=s()(V,U,H),$=!U&&w?w:k,W=!z&&S?S:_,J={subscribe_placeholder:i!==l.Z.subscribePlaceholder.default?i:void 0,show_subscribers_total:g,button_on_newline:f,submit_button_text:b!==l.Z.submitButtonText.default?b:void 0,custom_background_emailfield_color:$,custom_background_button_color:W,custom_text_button_color:x,custom_font_size:N||h,custom_border_radius:L||u,custom_border_weight:T||d,custom_border_color:I,custom_padding:R||p,custom_spacing:M||m,submit_button_classes:G,email_field_classes:q,show_only_email_and_button:!0},K=(0,c.reduce)(J,((e,t,n)=>void 0===t?e:e+` ${n}="${t}"`),"");return(0,r.createElement)("div",{className:s()(t,"wp-block-jetpack-subscriptions__supports-newline",f?"wp-block-jetpack-subscriptions__use-newline":void 0,g?"wp-block-jetpack-subscriptions__show-subs":void 0)},(0,r.createElement)(o.RawHTML,null,`[jetpack_subscription_form${K}]`))}},29053:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={subscribePlaceholder:{type:"string",default:__("Email Address","jetpack")},showSubscribersTotal:{type:"boolean",default:!1},buttonOnNewLine:{type:"boolean",default:!1},buttonWidth:{type:"string"},submitButtonText:{type:"string",default:__("Subscribe","jetpack")},emailFieldBackgroundColor:{type:"string"},customEmailFieldBackgroundColor:{type:"string"},emailFieldGradient:{type:"string"},customEmailFieldGradient:{type:"string"},buttonBackgroundColor:{type:"string"},customButtonBackgroundColor:{type:"string"},buttonGradient:{type:"string"},customButtonGradient:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"string"},borderRadius:{type:"number"},borderWeight:{type:"number"},borderColor:{type:"string"},customBorderColor:{type:"string"},padding:{type:"number"},spacing:{type:"number"}}},79024:function(e,t,n){"use strict";var r=n(29053),a=n(62788);t.Z={attributes:r.Z,save:a.Z}},62788:function(e,t,n){"use strict";n.d(t,{Z:function(){return g}});var r=n(51806),a=n(52175),o=n(69307),i=n(65235),s=n.n(i),c=n(92819),l=n(29053);const u=0,d=1,p=15,m=10,h="16px";function g(e){let{className:t,attributes:n}=e;const{subscribePlaceholder:i,showSubscribersTotal:g,buttonOnNewLine:f,submitButtonText:b,emailFieldBackgroundColor:v,customEmailFieldBackgroundColor:k,emailFieldGradient:y,customEmailFieldGradient:w,buttonBackgroundColor:E,customButtonBackgroundColor:_,buttonGradient:C,customButtonGradient:S,textColor:j,customTextColor:x,fontSize:P,customFontSize:N,borderRadius:L,borderWeight:T,borderColor:A,customBorderColor:I,padding:R,spacing:M,buttonWidth:Z}=n,B=!!a.__experimentalGetGradientClass,D=(0,a.getColorClassName)("color",j),F=(0,a.getFontSizeClass)(P),z=(0,a.getColorClassName)("border-color",A),O=(0,a.getColorClassName)("background-color",E),U=B?(0,a.__experimentalGetGradientClass)(C):void 0,H=(0,a.getColorClassName)("background-color",v),V=B?(0,a.__experimentalGetGradientClass)(y):void 0,G=s()(0===L?"no-border-radius":void 0,F,z),q=s()(G,j?"has-text-color":void 0,D,E||C?"has-background":void 0,O,U),$=s()(G,H,V),W=!H&&w?w:k,J=!O&&S?S:_,K=Z||void 0,X={subscribe_placeholder:i!==l.Z.subscribePlaceholder.default?i:void 0,show_subscribers_total:g,button_on_newline:f,submit_button_text:b!==l.Z.submitButtonText.default?b:void 0,custom_background_emailfield_color:W,custom_background_button_color:J,custom_text_button_color:x,custom_font_size:N||h,custom_border_radius:L||u,custom_border_weight:T||d,custom_border_color:I,custom_button_width:K,custom_padding:R||p,custom_spacing:M||m,submit_button_classes:q,email_field_classes:$,show_only_email_and_button:!0},Y=(0,c.reduce)(X,((e,t,n)=>void 0===t?e:e+` ${n}="${t}"`),"");return(0,r.createElement)("div",{className:s()(t,"wp-block-jetpack-subscriptions__supports-newline",f?"wp-block-jetpack-subscriptions__use-newline":void 0,g?"wp-block-jetpack-subscriptions__show-subs":void 0)},(0,r.createElement)(o.RawHTML,null,`[jetpack_subscription_form${Y}]`))}},11109:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={subscribePlaceholder:{type:"string",default:__("Type your email…","jetpack")},showSubscribersTotal:{type:"boolean",default:!1},buttonOnNewLine:{type:"boolean",default:!1},buttonWidth:{type:"string"},submitButtonText:{type:"string",default:__("Subscribe","jetpack")},emailFieldBackgroundColor:{type:"string"},customEmailFieldBackgroundColor:{type:"string"},emailFieldGradient:{type:"string"},customEmailFieldGradient:{type:"string"},buttonBackgroundColor:{type:"string"},customButtonBackgroundColor:{type:"string"},buttonGradient:{type:"string"},customButtonGradient:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"string"},borderRadius:{type:"number"},borderWeight:{type:"number"},borderColor:{type:"string"},customBorderColor:{type:"string"},padding:{type:"number"},spacing:{type:"number"},successMessage:{type:"string",default:__("Success! An email was just sent to confirm your subscription. Please find the email now and click 'Confirm Follow' to start subscribing.","jetpack")}}},68600:function(e,t,n){"use strict";var r=n(11109),a=n(28135);t.Z={attributes:r.Z,save:a.ZP}},28135:function(e,t,n){"use strict";n.d(t,{ZP:function(){return f}});var r=n(51806),a=n(52175),o=n(69307),i=n(65235),s=n.n(i),c=n(92819),l=n(11109);const u=0,d=1,p=15,m=10,h="16px",g=e=>e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\[/g,"[").replace(/\]/g,"]").replace(/\u00a0/g," ").replace(/\u200b/g,"​");function f(e){let{className:t,attributes:n}=e;const{subscribePlaceholder:i,showSubscribersTotal:f,buttonOnNewLine:b,submitButtonText:v,emailFieldBackgroundColor:k,customEmailFieldBackgroundColor:y,emailFieldGradient:w,customEmailFieldGradient:E,buttonBackgroundColor:_,customButtonBackgroundColor:C,buttonGradient:S,customButtonGradient:j,textColor:x,customTextColor:P,fontSize:N,customFontSize:L,borderRadius:T,borderWeight:A,borderColor:I,customBorderColor:R,padding:M,spacing:Z,buttonWidth:B,successMessage:D}=n,F=!!a.__experimentalGetGradientClass,z=(0,a.getColorClassName)("color",x),O=(0,a.getFontSizeClass)(N),U=(0,a.getColorClassName)("border-color",I),H=(0,a.getColorClassName)("background-color",_),V=F?(0,a.__experimentalGetGradientClass)(S):void 0,G=(0,a.getColorClassName)("background-color",k),q=F?(0,a.__experimentalGetGradientClass)(w):void 0,$=s()(0===T?"no-border-radius":void 0,O,U),W=s()($,x?"has-text-color":void 0,z,_||S?"has-background":void 0,H,V),J=s()($,G,q),K=!G&&E?E:y,X=!H&&j?j:C,Y=B||void 0,Q={subscribe_placeholder:i!==l.Z.subscribePlaceholder.default?i:void 0,show_subscribers_total:f,button_on_newline:b,submit_button_text:v!==l.Z.submitButtonText.default?v:void 0,custom_background_emailfield_color:K,custom_background_button_color:X,custom_text_button_color:P,custom_font_size:L||h,custom_border_radius:T||u,custom_border_weight:A||d,custom_border_color:R,custom_button_width:Y,custom_padding:M||p,custom_spacing:Z||m,submit_button_classes:W,email_field_classes:J,show_only_email_and_button:!0,success_message:D},ee=(0,c.reduce)(Q,((e,t,n)=>void 0===t?e:e+` ${n}="${g(t.toString())}"`),"");return(0,r.createElement)("div",{className:s()(t,"wp-block-jetpack-subscriptions__supports-newline",b?"wp-block-jetpack-subscriptions__use-newline":void 0,f?"wp-block-jetpack-subscriptions__show-subs":void 0)},(0,r.createElement)(o.RawHTML,null,`[jetpack_subscription_form${ee}]`))}},84744:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={subscribePlaceholder:{type:"string",default:__("Type your email…","jetpack")},showSubscribersTotal:{type:"boolean",default:!1},buttonOnNewLine:{type:"boolean",default:!1},buttonWidth:{type:"string"},submitButtonText:{type:"string",default:__("Subscribe","jetpack")},emailFieldBackgroundColor:{type:"string"},customEmailFieldBackgroundColor:{type:"string"},emailFieldGradient:{type:"string"},customEmailFieldGradient:{type:"string"},buttonBackgroundColor:{type:"string"},customButtonBackgroundColor:{type:"string"},buttonGradient:{type:"string"},customButtonGradient:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"string"},borderRadius:{type:"number"},borderWeight:{type:"number"},borderColor:{type:"string"},customBorderColor:{type:"string"},padding:{type:"number"},spacing:{type:"number"},successMessage:{type:"string",default:__("Success! An email was just sent to confirm your subscription. Please find the email now and click 'Confirm Follow' to start subscribing.","jetpack")}}},39583:function(e,t,n){"use strict";var r=n(84744),a=n(24366);t.Z={attributes:r.Z,migrate:e=>({includeSocialFollowers:!0,...e}),save:a.Z}},24366:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(51806),a=n(65235),o=n.n(a);function i(e){let{className:t,attributes:n}=e;const{showSubscribersTotal:a,buttonOnNewLine:i}=n;return(0,r.createElement)("div",{className:o()(t,"wp-block-jetpack-subscriptions__supports-newline",i?"wp-block-jetpack-subscriptions__use-newline":void 0,a?"wp-block-jetpack-subscriptions__show-subs":void 0)})}},99343:function(e,t,n){"use strict";var r=n(51806),a=n(88275),o=n(13419),i=n(52175),s=n(55609),c=n(94333),l=n(9818),u=n(69307),d=n(65736),p=n(65235),m=n.n(p),h=n(92819),g=n(4554),f=n(19617),b=n(88966),v=n(7652),k=n(62924),y=n(58841),w=n(57532),E=n(47970),_=n(68269),C=n(22750),S=n(30217);const _n=d._n,{getComputedStyle:j}=window,x=!!i.__experimentalUseGradient,P=(0,s.withFallbackStyles)(((e,t)=>{const{buttonBackgroundColor:n,textColor:r}=t,a=n&&n.color,o=r&&r.color,i=e.querySelector(".wp-block-jetpack-subscriptions__button");return{fallbackButtonBackgroundColor:a||!e?void 0:i&&j(i).backgroundColor,fallbackTextColor:o||!e?void 0:i&&j(i).color}}));t.Z=(0,c.compose)([(0,l.withSelect)((e=>{const t=e("jetpack/membership-products")?.getProducts()?.filter((e=>e.subscribe_as_site_subscriber));return{hasNewsletterPlans:0!==t?.length}})),(0,i.withColors)({emailFieldBackgroundColor:"backgroundColor"},{buttonBackgroundColor:"backgroundColor"},{textColor:"color"},"borderColor"),(0,i.withFontSizes)("fontSize"),P,e=>t=>(0,r.createElement)(a.ZP,null,(0,r.createElement)(e,t))])((function(e){const{className:t,attributes:n,setAttributes:a,emailFieldBackgroundColor:p,buttonBackgroundColor:j,setButtonBackgroundColor:P,fallbackButtonBackgroundColor:N,textColor:L,fallbackTextColor:T,setTextColor:A,borderColor:I,setBorderColor:R,fontSize:M,hasNewsletterPlans:Z}=e,{isLoadingModules:B,isChangingStatus:D,isModuleActive:F,changeStatus:z}=(0,o.el)(S.u2),O=(0,g.S)(k.Z,n);(0,h.isEqual)(O,n)||a(O);const{borderRadius:U,borderWeight:H,buttonWidth:V,includeSocialFollowers:G,padding:q,spacing:$,submitButtonText:W,subscribePlaceholder:J,showSubscribersTotal:K,buttonOnNewLine:X,successMessage:Y}=O,{subscriberCount:Q,subscriberCountString:ee}=(0,l.useSelect)((e=>{if(!F)return{subscriberCounts:0,subscriberCountString:""};const{emailSubscribers:t,socialFollowers:n}=e(v.h).getSubscriberCounts();let r=t;return G&&(r+=n),{subscriberCount:r,subscriberCountString:(0,d.sprintf)(/* translators: Placeholder is a number of subscribers. */ _n("Join %s other subscriber","Join %s other subscribers",r,"jetpack"),r)}})),{data:te,enabled:ne}=(0,E.a)(),re=x?(0,i.__experimentalUseGradient)({gradientAttribute:"emailFieldGradient",customGradientAttribute:"customEmailFieldGradient"}):{},ae=x?(0,i.__experimentalUseGradient)({gradientAttribute:"buttonGradient",customGradientAttribute:"customButtonGradient"}):{},oe={"no-border-radius":0===U,[M.class]:M.class,"has-text-color":L.color,[L.class]:L.class},ie={...oe,"has-background":p.color||re.gradientValue,[p.class]:!re.gradientValue&&p.class,[re.gradientClass]:re.gradientClass},se={...oe,"has-background":j.color||ae.gradientValue,[j.class]:!ae.gradientValue&&j.class,[ae.gradientClass]:ae.gradientClass},ce=e=>e||y.FP,le={color:L.color,borderColor:I.color,borderRadius:U?U+"px":y.S9+"px",borderWidth:H?H+"px":y.XJ+"px",fontSize:M.size?M.size:y.tm,padding:(e=>{const t=e||y.HE;return t+"px "+Math.round(1.5*t)+"px "+t+"px "+Math.round(1.5*t)+"px"})(q)},ue={"--subscribe-block-border-radius":U?U+"px":y.S9+"px","--subscribe-block-text-color":"var(--wp--preset--color--foreground, #3c434a)","--subscribe-block-background-color":"var(--wp--preset--color--background, white)","--subscribe-block-accent-color":"var(--wp--preset--color--foreground, #3c434a)"},de={...le,...!p.color&&re.gradientValue?{background:re.gradientValue}:{backgroundColor:p.color}},pe={...le,...!j.color&&ae.gradientValue?{background:ae.gradientValue}:{backgroundColor:j.color},...X?{marginTop:ce($)+"px"}:{marginLeft:ce($)+"px"},width:V},me=(0,c.usePrevious)(j);return(0,u.useEffect)((()=>{F&&me?.color===I?.color&&I?.color!==j?.color&&R(j.color)}),[j,me,I,R,F]),B?(0,r.createElement)(C.Z,null):F?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(w.Z,{buttonBackgroundColor:j,borderColor:I,buttonGradient:ae,borderRadius:U,borderWeight:H,buttonOnNewLine:X,emailFieldBackgroundColor:p,fallbackButtonBackgroundColor:N,fallbackTextColor:T,fontSize:M,includeSocialFollowers:G,isGradientAvailable:x,padding:q,setAttributes:a,setBorderColor:R,setButtonBackgroundColor:P,setTextColor:A,showSubscribersTotal:K,spacing:$,subscriberCount:Q,textColor:L,buttonWidth:V,successMessage:Y})),(0,f.M)()&&(0,r.createElement)(i.BlockControls,null,(0,r.createElement)(s.Toolbar,null,(0,r.createElement)(b.ZP,{context:"toolbar",hasNewsletterPlans:Z}))),(0,r.createElement)("div",{className:m()(t,"wp-block-jetpack-subscriptions__container","wp-block-jetpack-subscriptions__supports-newline",ne?"wp-block-jetpack-subscriptions__newsletter-categories-enabled":void 0,X?"wp-block-jetpack-subscriptions__use-newline":void 0,K?"wp-block-jetpack-subscriptions__show-subs":void 0),style:ue},(0,r.createElement)("div",{className:"wp-block-jetpack-subscriptions__form",role:"form"},ne?(0,r.createElement)("div",{className:"wp-block-jetpack-subscriptions__newsletter-categories"},te.map((e=>(0,r.createElement)("div",{key:`newsletter-category-${e.id}`,className:"wp-block-jetpack-subscriptions__newsletter-category"},(0,r.createElement)("div",null,e.name))))):null,(0,r.createElement)("div",{className:"wp-block-jetpack-subscriptions__form-elements"},(0,r.createElement)(s.TextControl,{placeholder:J,disabled:!0,className:m()(ie,"wp-block-jetpack-subscriptions__textfield"),style:de}),(0,r.createElement)(i.RichText,{className:m()(se,"wp-block-jetpack-subscriptions__button","wp-block-button__link"),onChange:e=>a({submitButtonText:e}),style:pe,value:W,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/strikethrough"]}))),K&&(0,r.createElement)("div",{className:"wp-block-jetpack-subscriptions__subscount"},ee))):(0,r.createElement)(_.f,{changeStatus:z,isModuleActive:F,isLoading:D})}))},57780:function(e,t,n){"use strict";var r=n(13419),a=n(31985),o=n(30217);(0,a.Z)(o.u2,o.Xd),(0,r.o_)(o.u2,o.eC)},18005:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(51806),a=n(32054),o=n(13419),i=n(86989),s=n.n(i),c=n(55609),l=n(9818),u=n(69307),d=n(65736),p=n(79201),m=n(92770);const __=d.__;function h(e){let{isModalOpen:t,closeModal:n}=e;const[i,d]=(0,u.useState)(!1),[h,g]=(0,u.useState)(!1),[f,b]=(0,u.useState)(!1),v=(0,l.useSelect)((e=>e("core/editor").getCurrentPostId())),[k]=(0,a.Z)("sm"),{tracks:y}=(0,o.z$)();return(0,r.createElement)(r.Fragment,null,t&&(0,r.createElement)(c.Modal,{className:"jetpack-email-preview",onRequestClose:()=>{n(),d(!1)}},(0,r.createElement)(c.__experimentalHStack,{alignment:"topLeft"},(0,r.createElement)(c.__experimentalVStack,{className:"jetpack-email-preview__main",alignment:"topLeft"},(0,r.createElement)("h1",{className:"jetpack-email-preview__title"},__("Send a test email","jetpack")),f&&(0,r.createElement)(c.__experimentalHStack,{className:"jetpack-email-preview__email-sent"},f),i?(0,r.createElement)(c.__experimentalHStack,{className:"jetpack-email-preview__email-sent"},(0,r.createElement)(c.Icon,{className:"jetpack-email-preview__check",icon:p.Z,size:28}),(0,r.createElement)("div",{className:"jetpack-email-preview__sent_text"},__("Email sent successfully","jetpack"))):(0,r.createElement)(c.__experimentalHStack,null,(0,r.createElement)(c.TextControl,{className:"jetpack-email-preview__email",value:window?.Jetpack_Editor_Initial_State?.tracksUserData?.email,disabled:!0}),(0,r.createElement)(c.Button,{className:"jetpack-email-preview__button",variant:"primary",onClick:()=>{y.recordEvent("jetpack_send_email_preview",{post_id:v}),g(!0),s()({path:"/wpcom/v2/send-email-preview/",method:"POST",data:{id:v}}).then((()=>{g(!1),d(!0)})).catch((e=>{g(!1),e.message?b(e.message):b(__("Whoops, we have encountered an error. Please try again later.","jetpack"))}))},isBusy:h},__("Send","jetpack")))),!k&&(0,r.createElement)("img",{className:"jetpack-email-preview__img",src:m,alt:""}))))}},47970:function(e,t,n){"use strict";n.d(t,{a:function(){return i}});var r=n(86989),a=n.n(r),o=n(69307);const i=()=>{const[e,t]=(0,o.useState)([]),[n,r]=(0,o.useState)(!1),[i,s]=(0,o.useState)(!1),[c,l]=(0,o.useState)(!0);return(0,o.useEffect)((()=>{"block"===(window.Jetpack_Subscriptions?.newsletter_categories_location??"block")?(async()=>{try{const e=await a()({path:"/wpcom/v2/newsletter-categories"});t(e?.newsletter_categories),r(e?.enabled??!1)}catch(e){s(!0)}finally{l(!1)}})():l(!1)}),[]),{data:e,enabled:n,error:i,loading:c}}},30217:function(e,t,n){"use strict";n.d(t,{Xd:function(){return g},eC:function(){return f},qv:function(){return h},u2:function(){return m}});var r=n(51806),a=n(4981),o=n(55609),i=n(69307),s=n(65736),c=n(70355),l=n(62924),u=n(2916),d=n(99343),p=n(79914);const __=s.__,_x=s._x,m="subscriptions",h=(0,r.createElement)(o.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.Path,{d:"M20.9997 6.96749L21 7V17C21 18.1046 20.1046 19 19 19H5C3.89543 19 3 18.1046 3 17V7L3.00026 6.96747L3 6.96092C3 5.87793 3.87793 5 4.96092 5H19.0391C20.1221 5 21 5.87793 21 6.96092L20.9997 6.96749ZM19.3044 17.3967L13.9142 12.9048L13.2804 13.433C12.5387 14.0511 11.4613 14.0511 10.7196 13.433L10.0858 12.9048L4.69555 17.3967C4.77987 17.4615 4.88543 17.5 5 17.5H19C19.1146 17.5 19.2201 17.4615 19.3044 17.3967ZM19.5 15.6071V8.25L15.0858 11.9285L19.5 15.6071ZM4.5 8.25V15.6071L8.91424 11.9285L4.5 8.25ZM4.79543 6.54363C4.85788 6.51559 4.92712 6.5 5 6.5H19C19.0729 6.5 19.1421 6.51559 19.2046 6.54363L12.3201 12.2807C12.1347 12.4352 11.8653 12.4352 11.6799 12.2807L4.79543 6.54363Z",fill:(0,c.m)(),fillRule:"evenodd",clipRule:"evenodd"})),g={title:__("Subscribe","jetpack"),description:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("Subscribe to this blog's posts as a newsletter.","jetpack")),(0,r.createElement)("p",null,(0,i.createInterpolateElement)(__("Subscribers can read the posts in their email inbox or <ExternalLink>the Reader app</ExternalLink>.","jetpack"),{ExternalLink:(0,r.createElement)(o.ExternalLink,{href:"https://wordpress.com/read"})}))),icon:{src:h,foreground:(0,c.m)()},category:"grow",keywords:[_x("newsletter","block search term","jetpack"),_x("email","block search term","jetpack"),_x("follow","block search term","jetpack")],attributes:l.Z,edit:d.Z,styles:[{name:"compact",label:__("Compact","jetpack")},{name:"split",label:__("Split","jetpack"),isDefault:!0}],transforms:{from:[{type:"block",isMultiBlock:!1,blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:n}=e;return!!n?.raw&&"blog_subscription"===t},transform:e=>{let{instance:t}=e;return(0,a.createBlock)("jetpack/subscriptions",{showSubscribersTotal:t.raw.show_subscribers_total,submitButtonText:t.raw.subscribe_button,subscribePlaceholder:t.raw.subscribe_placeholder,successMessage:t.raw.success_message})}}]},example:{attributes:{}},supports:{spacing:{margin:!0,padding:!0},align:["wide","full"]},deprecated:u.Z},f={render:()=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(p.Z,null))}},79914:function(e,t,n){"use strict";n.d(t,{Z:function(){return P}});var r=n(51806),a=n(6895),o=n(13419),i=n(55609),s=n(37798),c=n(9818),l=n(72067),u=n(12238),d=n(69307),p=n(65736),m=n(61074),h=n(15381),g=n(40083),f=n(19617),b=n(52143),v=n(88966),k=n(7652),y=n(18005),w=n(30217);const __=p.__,E=e=>{let{children:t}=e;return(0,r.createElement)(i.Flex,{align:"center",gap:4,direction:"column",style:{alignItems:"center"}},(0,r.createElement)(i.FlexItem,null,__("In order to send posts to your subscribers, activate the Subscriptions feature.","jetpack")),(0,r.createElement)(i.FlexItem,null,t),(0,r.createElement)(i.FlexItem,null,(0,r.createElement)(i.ExternalLink,{href:"https://jetpack.com/support/subscriptions/"},__("Learn more about Subscriptions","jetpack"))))};function _(e){let{accessLevel:t,setPostMeta:n}=e;return(0,r.createElement)(l.PluginDocumentSettingPanel,{className:"jetpack-subscribe-newsletters-panel",title:__("Access","jetpack"),icon:(0,r.createElement)(o.Pm,null)},(0,r.createElement)(b.al,{accessLevel:t,setPostMeta:n}))}const C=()=>(0,r.createElement)(i.Notice,{status:"info",isDismissible:!1,className:"edit-post-post-visibility__notice"},__("You will be able to send newsletters once the site is published","jetpack")),S=()=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.PluginDocumentSettingPanel,{className:"jetpack-subscribe-newsletters-panel",title:__("Newsletter visibility","jetpack"),icon:(0,r.createElement)(o.Pm,null)},(0,r.createElement)(C,null)),(0,r.createElement)(l.PluginPrePublishPanel,{className:"jetpack-subscribe-newsletters-panel",title:__("Newsletter visibility","jetpack"),icon:(0,r.createElement)(o.Pm,null)},(0,r.createElement)(C,null)),(0,r.createElement)(l.PluginPostPublishPanel,{className:"jetpack-subscribe-newsletters-panel",title:__("Newsletter visibility","jetpack"),icon:(0,r.createElement)(o.Pm,null)},(0,r.createElement)(C,null)));function j(e){let{accessLevel:t,setPostMeta:n,isModuleActive:a,showPreviewModal:s}=e;const{tracks:d}=(0,o.z$)(),{changeStatus:p,isLoadingModules:m,isChangingStatus:h}=(0,o.el)(w.u2),f=(0,c.useSelect)((e=>{const t=e(u.store).getEditedPostAttribute("meta");return!a&&!m&&!t?.jetpack_post_was_ever_published}));return(0,r.createElement)(l.PluginPrePublishPanel,{initialOpen:!0,className:"jetpack-subscribe-newsletters-panel",title:(0,r.createElement)(r.Fragment,null,__("Newsletter:","jetpack"),t&&(0,r.createElement)("span",{className:"jetpack-subscribe-post-publish-panel__heading"},g.So[t].panelHeading)),icon:(0,r.createElement)(o.Pm,null)},a&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(b.IO,{accessLevel:t,setPostMeta:n}),(0,r.createElement)(i.Button,{variant:"secondary",onClick:s},__("Send test email","jetpack"))),f&&(0,r.createElement)(E,null,(0,r.createElement)(i.Button,{variant:"secondary",isBusy:h,disabled:a||h,onClick:()=>(d.recordEvent("jetpack_editor_subscriptions_enable"),p(!0))},h?__("Activating Subscriptions","jetpack"):__("Activate Subscriptions","jetpack",0))))}function x(e){let{accessLevel:t}=e;const{emailSubscribers:n,paidSubscribers:s}=(0,c.useSelect)((e=>e(k.h).getSubscriberCounts())),{postName:f,postPublishedLink:y}=(0,c.useSelect)((e=>{const t=e(u.store).getCurrentPost();return{postName:t.title,postPublishedLink:t.link}})),{isStripeConnected:w}=(0,c.useSelect)((e=>{const{getConnectUrl:t}=e(k.h);return{isStripeConnected:null===t()}})),E=(0,c.useSelect)((e=>e(u.store).getEditedPostVisibility())),_=(0,b.Y6)(t,n,s).toLocaleString();let C=__("subscribers","jetpack");t===g.So.paid_subscribers.key&&(C=__("paid subscribers","jetpack"));const S=(0,p.sprintf)(/* translators: %1s is the post name, %2s is the number of subscribers in numerical format, %3s Options are paid subscribers or subscribers */ __("<postPublishedLink>%1$s</postPublishedLink> was sent to <strong>%2$s %3$s</strong>.","jetpack"),f,_,C),j=(0,v.hc)(E,t);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.PluginPostPublishPanel,{initialOpen:!0,title:(0,r.createElement)(r.Fragment,null,__("Newsletter:","jetpack"),t&&(0,r.createElement)("span",{className:"jetpack-subscribe-post-publish-panel__heading"},g.So[t].panelHeading)),className:"jetpack-subscribe-newsletters-panel jetpack-subscribe-post-publish-panel",icon:(0,r.createElement)(o.Pm,null)},!j&&(0,r.createElement)(i.Notice,{className:"jetpack-subscribe-post-publish-panel__notice",isDismissible:!1},(0,d.createInterpolateElement)(S,{strong:(0,r.createElement)("strong",null),postPublishedLink:(0,r.createElement)(b.rU,{href:y})}))),!w&&(0,r.createElement)(l.PluginPostPublishPanel,{initialOpen:!0,className:"jetpack-subscribe-newsletters-panel paid-newsletters-post-publish-panel",title:__("Set up a paid newsletter","jetpack"),icon:(0,r.createElement)(o.Pm,null)},(0,r.createElement)(i.PanelRow,null,(0,r.createElement)("p",null,__("Allow your subscribers to support your work. Connect a Stripe account to get started.","jetpack"))),(0,r.createElement)("div",{role:"link",className:"post-publish-panel__postpublish-buttons"},(0,r.createElement)(i.Button,{target:"_blank",variant:"secondary",href:(0,a.Z)("wpcom-earn",{site:(0,o.lQ)()})},__("Turn on paid newsletters","jetpack"),(0,r.createElement)(m.Z,{icon:h.Z,className:"paid-newsletters-post-publish-panel__external_icon"})))))}function P(){const{isModuleActive:e}=(0,o.el)(w.u2),t=(0,c.useSelect)((e=>e(u.store).getCurrentPostType()),[]),[,n]=(0,s.useEntityProp)("postType",t,"meta"),[a,i]=(0,d.useState)(!1),{tracks:l}=(0,o.z$)(),p=(0,f._)(t);return"post"!==t?null:(0,f.M)()?(0,o.M6)()||(0,o.aQ)()?(0,r.createElement)(S,null):(0,r.createElement)(r.Fragment,null,e&&(0,r.createElement)(_,{accessLevel:p,setPostMeta:n}),(0,r.createElement)(j,{accessLevel:p,setPostMeta:n,isModuleActive:e,showPreviewModal:()=>{l.recordEvent("jetpack_send_email_preview_prepublish_preview_button"),i(!0)}}),e&&(0,r.createElement)(x,{accessLevel:p,setPostMeta:n}),(0,r.createElement)(y.Z,{isModalOpen:a,closeModal:()=>i(!1)})):null}},68269:function(e,t,n){"use strict";n.d(t,{f:function(){return l}});var r=n(51806),a=n(13419),o=n(55609),i=n(69307),s=n(65736),c=n(30217);const __=s.__,l=e=>{let{changeStatus:t,isLoading:n,isModuleActive:s}=e;const{tracks:l}=(0,a.z$)();return(0,i.useEffect)((()=>{l.recordEvent("jetpack_editor_subscriptions_placeholder_view")}),[l]),(0,r.createElement)(o.Placeholder,{icon:c.qv,instructions:__("You'll need to activate the Subscriptions feature to use the Subcribe block.","jetpack"),label:c.Xd.title},(0,r.createElement)(o.Button,{disabled:s||n,isBusy:n,onClick:()=>(l.recordEvent("jetpack_editor_subscriptions_enable"),t(!0)),variant:"secondary"},n?__("Activating Subscriptions","jetpack"):__("Activate Subscriptions","jetpack",0)),(0,r.createElement)("div",{className:"membership-button__disclaimer"},(0,r.createElement)(o.ExternalLink,{href:"https://jetpack.com/support/subscriptions/"},__("Learn more about the Subscriptions feature.","jetpack"))))}},22750:function(e,t,n){"use strict";var r=n(51806),a=n(22636),o=n(55609);t.Z=function(){return(0,r.createElement)(o.Placeholder,null,(0,r.createElement)(o.Flex,{gap:2,direction:"column",style:{width:"100%"}},(0,r.createElement)(o.Flex,{gap:4},(0,r.createElement)(o.FlexItem,null,(0,r.createElement)(a.Z,{width:30,height:30})),(0,r.createElement)(o.FlexBlock,null,(0,r.createElement)(a.Z,{width:"90%",height:30}))),(0,r.createElement)(o.Flex,{style:{marginTop:12}},(0,r.createElement)(o.FlexBlock,null,(0,r.createElement)(a.Z,{height:30,width:"60%"}))),(0,r.createElement)(o.Flex,{style:{marginTop:12}},(0,r.createElement)(o.FlexBlock,null,(0,r.createElement)(a.Z,{width:150,height:50}))),(0,r.createElement)(o.Flex,{style:{marginTop:18}},(0,r.createElement)(o.FlexBlock,null,(0,r.createElement)(a.Z,{width:"90%",height:16})))))}},3740:function(e,t,n){"use strict";n.d(t,{EU:function(){return u},GP:function(){return s},P0:function(){return p},RA:function(){return r},Z5:function(){return i},hI:function(){return o},q3:function(){return a},sw:function(){return l},xJ:function(){return c},yw:function(){return d}});const r=["image"],a=4,o=20,i=20,s=2e3,c="circle",l="columns",u="rectangular",d="square",p=[{isDefault:!0,name:u},{name:c},{name:d},{name:l}]},73463:function(e,t,n){"use strict";var r=n(76476),a=n(43125),o=n(67525),i=n(99504);t.Z=[i,o,a,r]},1377:function(e,t,n){"use strict";n.d(t,{EU:function(){return i},GP:function(){return o},P0:function(){return s},hI:function(){return a},q3:function(){return r}});const r=4,a=20,o=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 o}});var r=n(51806),a=n(11313);function o(e){const{"aria-label":t,alt:n,height:o,id:i,link:s,linkTo:c,origUrl:l,url:u,width:d}=e;if((0,a.isBlobURL)(l))return null;let p;switch(c){case"media":p=u;break;case"attachment":p=s}const m=(0,r.createElement)("img",{alt:n,"aria-label":t,"data-height":o,"data-id":i,"data-link":s,"data-url":l,"data-width":d,src:u});return(0,r.createElement)("figure",{className:"tiled-gallery__item"},p?(0,r.createElement)("a",{href:p},m):m)}},76476:function(e,t,n){"use strict";n.r(t),n.d(t,{attributes:function(){return a},save:function(){return r.Z},support:function(){return o}});var r=n(91507);const a={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"}},o={align:["center","wide","full"],customClassName:!1,html:!1}},52235:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(51806);function a(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 a}});var r=n(51806);function a(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 p}});var r=n(51806),a=n(11313),o=n(69307),i=n(65736),s=n(69424),c=n(1377),l=n(56005),u=n(30791),d=n(79313);const __=i.__;class p extends o.Component{photonize(e){let{height:t,width:n,url:r}=e;if(!r)return;if((0,a.isBlobURL)(r)||/^https?:\/\/localhost/.test(r))return r;const o=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(o,{resize:`${e},${e}`})}return i(o)}renderImage(e,t){const{images:n,linkTo:a,selectedImage:o}=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:o===t,key:t,link:e.link,linkTo:a,url:this.photonize(e),width:e.width})}render(){const{align:e,children:t,className:n,columns:a,images:o,layoutStyle:i}=this.props,s=m(i)?d.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:a,images:o,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,a]of Object.entries(t))r.searchParams.set(n.hasOwnProperty(e)?n[e]:e,a);return r.toString()}},30791:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(51806),a=n(69307),o=n(6209),i=n(52235),s=n(89754),c=n(36472),l=n(6817),u=n(6648);class d extends a.Component{gallery=(0,a.createRef)();pendingRaf=null;ro=null;componentDidMount(){this.observeResize()}componentWillUnmount(){this.unobserveResize()}componentDidUpdate(e){(e.images!==this.props.images||e.align!==this.props.align||"columns"===this.props.layoutStyle&&e.columns!==this.props.columns)&&this.triggerResize()}handleGalleryResize=e=>{this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null),this.pendingRaf=requestAnimationFrame((()=>{for(const{contentRect:t,target: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 o.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:a,renderedImages:o}=this.props,u=(0,l.h9)(n),d="columns"===a?(0,l.sv)(u,t):(0,l.T9)(u,{isWide:["full","wide"].includes(e)});let p=0;return(0,r.createElement)(s.Z,{galleryRef:this.gallery},d.map(((e,t)=>(0,r.createElement)(c.Z,{key:t},e.map(((e,t)=>{const n=o.slice(p,p+e);return p+=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 a},sv:function(){return i}});var r=n(92819);function a(e){return(0,r.map)(e,o)}function o(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,a=[];let o=e,i=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(o,(t=>{const r=i<=(e+1)*n;return r&&(i+=t),r})).length;a.push(t),o=(0,r.drop)(o,t)}return a.push(o.length),[a]}const s=j([2,1,2],5),c=x([P,P,N,P,P]),l=x([P,P,P,N,P,P,P]),u=j([3,1,3],5),d=x([N,P,P,N]),p=j([1,2,1],5),m=x([N,P,P,P]),h=j([1,3],3),g=x([P,P,P,N]),f=j([3,1],3),b=x([T(1.6),(0,r.overEvery)(L(.9),T(2)),(0,r.overEvery)(L(.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)(L(.9),T(2)),(0,r.overEvery)(L(.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,a)=>{if(!a.length)return e;let o;o=a.length>15&&c(a)&&s(e)?[2,1,2]:a.length>15&&l(a)&&u(e)?[3,1,3]:5!==a.length&&d(a)&&p(e)?[1,2,1]:m(a)&&h(e)?[1,3]:g(a)&&f(e)?[3,1]:b(a)&&v(e)?[1,2]:t&&(5===a.length||10!==a.length&&a.length>6)&&k(e)&&(0,r.sum)((0,r.take)(a,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,a)?[1,1,1,1]:function(e,t,n){const a=(0,r.sum)((0,r.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&w(e)&&(a<2.5||a<5&&t.length>=3&&t[0]===t[2]||n)}(e,a,t)?[1,1,1]:E(a)&&_(e)?[2,1]:C(a)?[1]:a.length>3?[1,1]:Array(a.length).fill(1);const i=e.concat([o]),S=(0,r.sum)(o),j=a.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 P(e){return e>=1&&e<2}function N(e){return e<1}function L(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 o}});var r=n(1377);function a(e,t){const n=(t-e.reduce(((e,t)=>e+t),0))/e.length;return e.map((e=>e+n))}function o(e,t){!function(e,t,n){let[o,i]=t;const d=1/o*(n-r.q3*(e.childElementCount-1)-i);!function(e,t){let{rawHeight:n,rowWidth:o}=t;const i=s(e),d=i.map((e=>(n-r.q3*(e.childElementCount-1))*l(e)[0])),p=a(d,o);i.forEach(((e,t)=>{const o=d[t],i=p[t];!function(e,t){let{colHeight:n,width:r,rawWidth:o}=t;const i=c(e).map((e=>o/u(e))),s=a(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:o})}))}(e,{rawHeight:d,rowWidth:n-r.q3*(e.childElementCount-1)})}(e,function(e){const t=s(e).map(l).reduce(((e,t)=>{let[n,r]=e,[a,o]=t;return[n+a,r+o]}),[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),a=n(65235),o=n.n(a);function i(e){let{children:t,className:n}=e;return(0,r.createElement)("div",{className:o()("tiled-gallery__row",n)},t)}},79313:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),a=n(92819),o=n(1377),i=n(52235),s=n(89754),c=n(36472);function l(e){let{columns:t,renderedImages:n}=e;const l=Math.min(o.hI,t),u=n.length%l;return(0,r.createElement)(s.Z,null,[...u?[(0,a.take)(n,u)]:[],...(0,a.chunk)((0,a.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),a=n(81518),o=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:d}=t;return(0,r.createElement)(i.Z,{align:c,className:l,columns:u,images:n,layoutStyle:(0,a.t)(o.P0,l),linkTo:d})}},86738:function(e,t,n){"use strict";n.d(t,{EU:function(){return s},GP:function(){return o},P0:function(){return c},Z5:function(){return a},hI:function(){return r},xJ:function(){return i}});const r=20,a=20,o=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),a=n(11313),o=n(65235),i=n.n(o);function s(e){const{alt:t,imageFilter:n,height:o,id:s,link:c,linkTo:l,origUrl:u,url:d,width:p}=e;if((0,a.isBlobURL)(u))return null;let m;switch(l){case"media":m=d;break;case"attachment":m=c}const h=(0,r.createElement)("img",{alt:t,"data-height":o,"data-id":s,"data-link":c,"data-url":u,"data-width":p,src:d});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 o},save:function(){return a.Z},supports:function(){return i}});var r=n(86738),a=n(68405);const o={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 a}});var r=n(51806);function a(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 a}});var r=n(51806);function a(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),a=n(69307),o=n(65736),i=n(65235),s=n.n(i),c=n(86738),l=n(64931),u=n(67091),d=n(84420),p=n(87178);const __=o.__;class m extends a.Component{renderImage(e,t){const{columns:n,imageFilter:a,images:i,linkTo:s,layoutStyle:c,selectedImage:d}=this.props,p=(0,o.sprintf)(/* translators: %1$d is the order number of the image, %2$d is the total number of images. */ __("image %1$d of %2$d in gallery","jetpack"),t+1,i.length),{src:m,srcSet:h}=(0,u.z)(e,{layoutStyle:c});return(0,r.createElement)(l.Z,{alt:e.alt,"aria-label":p,columns:n,height:e.height,id:e.id,imageFilter:a,isFirstItem:0===t,isLastItem:t+1===i.length,isSelected:d===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:a,images:o,layoutStyle:i,roundedCorners:l}=this.props,m=(0,u.v)(i)?p.Z:d.Z,h=this.props.images.map(this.renderImage,this),g=i!==c.xJ?Math.min(l,c.Z5):0;return(0,r.createElement)("div",{className:s()(n,{[`has-rounded-corners-${g}`]:g>0})},(0,r.createElement)(m,{align:e,columns:a,images:o,layoutStyle:i,renderedImages:h}),t)}}},84420:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),a=n(69307),o=n(85407),i=n(40195),s=n(56243),c=n(12126);class l extends a.Component{gallery=(0,a.createRef)();pendingRaf=null;render(){const{align:e,columns:t,images:n,layoutStyle:a,renderedImages:l}=this.props,u=(0,c.h9)(n),d="columns"===a?(0,c.sv)(u,t):(0,c.T9)(u,{isWide:["full","wide"].includes(e)});let p=0;return(0,r.createElement)(i.Z,{galleryRef:this.gallery},d.map(((e,t)=>(0,r.createElement)(s.Z,{key:t},e.map(((e,t)=>{const n=l.slice(p,p+e);return p+=e,(0,r.createElement)(o.Z,{key:t},n)}))))))}}},12126:function(e,t,n){"use strict";n.d(t,{T9:function(){return S},h9:function(){return a},sv:function(){return i}});var r=n(92819);function a(e){return(0,r.map)(e,o)}function o(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,a=[];let o=e,i=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(o,(t=>{const r=i<=(e+1)*n;return r&&(i+=t),r})).length;a.push(t),o=(0,r.drop)(o,t)}return a.push(o.length),[a]}const s=j([2,1,2],5),c=x([P,P,N,P,P]),l=x([P,P,P,N,P,P,P]),u=j([3,1,3],5),d=x([N,P,P,N]),p=j([1,2,1],5),m=x([N,P,P,P]),h=j([1,3],3),g=x([P,P,P,N]),f=j([3,1],3),b=x([T(1.6),(0,r.overEvery)(L(.9),T(2)),(0,r.overEvery)(L(.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)(L(.9),T(2)),(0,r.overEvery)(L(.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,a)=>{if(!a.length)return e;let o;o=a.length>15&&c(a)&&s(e)?[2,1,2]:a.length>15&&l(a)&&u(e)?[3,1,3]:5!==a.length&&d(a)&&p(e)?[1,2,1]:m(a)&&h(e)?[1,3]:g(a)&&f(e)?[3,1]:b(a)&&v(e)?[1,2]:t&&(5===a.length||10!==a.length&&a.length>6)&&k(e)&&(0,r.sum)((0,r.take)(a,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,a)?[1,1,1,1]:function(e,t,n){const a=(0,r.sum)((0,r.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&w(e)&&(a<2.5||a<5&&t.length>=3&&t[0]===t[2]||n)}(e,a,t)?[1,1,1]:E(a)&&_(e)?[2,1]:C(a)?[1]:a.length>3?[1,1]:Array(a.length).fill(1);const i=e.concat([o]),S=(0,r.sum)(o),j=a.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 P(e){return e>=1&&e<2}function N(e){return e<1}function L(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),a=n(65235),o=n.n(a);function i(e){let{children:t,className:n}=e;return(0,r.createElement)("div",{className:o()("tiled-gallery__row",n)},t)}},87178:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),a=n(92819),o=n(86738),i=n(85407),s=n(40195),c=n(56243);function l(e){let{columns:t,renderedImages:n}=e;const l=Math.min(o.hI,t),u=n.length%l;return(0,r.createElement)(s.Z,null,[...u?[(0,a.take)(n,u)]:[],...(0,a.chunk)((0,a.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),a=n(81518),o=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:d=s(t),linkTo:p,roundedCorners:m}=t;return(0,r.createElement)(i.Z,{align:l,className:u,columns:d,imageFilter:n,images:c,isSave:!0,layoutStyle:(0,a.t)(o.P0,u),linkTo:p,roundedCorners:m})}},67091:function(e,t,n){"use strict";n.d(t,{v:function(){return s},z:function(){return c}});var r=n(11313),a=n(92819),o=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:d}=t,p=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:o.Z;let m;if(s(d)&&u&&c){const e=Math.min(i.GP,u,c);m=p(n,{resize:`${e},${e}`})}else m=p(n);let h;if(s(d)){const e=Math.min(600,u,c),t=Math.min(i.GP,u,c);h=(0,a.range)(e,t,300).map((e=>{const t=p(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,a.range)(e,t,300).map((e=>{const t=p(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,a]of Object.entries(t))r.searchParams.set(n.hasOwnProperty(e)?n[e]:e,a);return r.toString()}},13993:function(e,t,n){"use strict";n.d(t,{EU:function(){return s},GP:function(){return o},P0:function(){return c},Z5:function(){return a},hI:function(){return r},xJ:function(){return i}});const r=20,a=20,o=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),a=n(11313),o=n(65235),i=n.n(o);function s(e){const{alt:t,imageFilter:n,height:o,id:s,link:c,linkTo:l,origUrl:u,url:d,width:p}=e;if((0,a.isBlobURL)(u))return null;let m;switch(l){case"media":m=d;break;case"attachment":m=c}const h=(0,r.createElement)("img",{alt:t,"data-height":o,"data-id":s,"data-link":c,"data-url":u,"data-width":p,src:d});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 o},migrate:function(){return s},save:function(){return a.Z},supports:function(){return i}});var r=n(13993),a=n(5826);const o={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 a}});var r=n(51806);function a(e){let{children:t,width:n}=e;const a=Math.pow(10,12),o=Math.round(n*a)/a,i=n?{flexBasis:`${o}%`}: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 a}});var r=n(51806);function a(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),a=n(69307),o=n(65736),i=n(65235),s=n.n(i),c=n(13993),l=n(21959),u=n(11197),d=n(47510),p=n(65662);const __=o.__;class m extends a.Component{renderImage(e,t){const{columns:n,imageFilter:a,images:i,isSave:s,linkTo:c,layoutStyle:d,onMoveBackward:p,onMoveForward:m,onRemoveImage:h,onSelectImage:g,selectedImage:f,setImageAttributes:b}=this.props,v=(0,o.sprintf)(/* translators: %1$d is the order number of the image, %2$d is the total number of images. */ __("image %1$d of %2$d in gallery","jetpack"),t+1,i.length),{src:k,srcSet:y}=(0,u.z)(e,{layoutStyle:d});return(0,r.createElement)(l.Z,{alt:e.alt,"aria-label":v,columns:n,height:e.height,id:e.id,imageFilter:a,isFirstItem:0===t,isLastItem:t+1===i.length,isSelected:f===t,key:t,link:e.link,linkTo:c,onMoveBackward:s?void 0:p(t),onMoveForward:s?void 0:m(t),onRemove:s?void 0:h(t),onSelect:s?void 0:g(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:a,images:o,layoutStyle:i,roundedCorners:l,onResize:m,isSave:h,columnWidths:g}=this.props,f=(0,u.v)(i)?p.Z:d.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)(f,{align:e,columns:a,columnWidths:h?g:void 0,images:o,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),a=n(69307),o=n(17410),i=n(46349),s=n(78922),c=n(3453);class l extends a.Component{gallery=(0,a.createRef)();pendingRaf=null;render(){const{align:e,columns:t,images:n,layoutStyle:a,renderedImages:l,columnWidths:u}=this.props,d=(0,c.h9)(n),p="columns"===a?(0,c.sv)(d,t):(0,c.T9)(d,{isWide:["full","wide"].includes(e)});let m=0;return(0,r.createElement)(i.Z,{galleryRef:this.gallery},p.map(((e,t)=>(0,r.createElement)(s.Z,{key:t},e.map(((e,n)=>{const a=l.slice(m,m+e);return m+=e,(0,r.createElement)(o.Z,{key:n,width:u?.[t]?.[n]},a)}))))))}}},3453:function(e,t,n){"use strict";n.d(t,{T9:function(){return S},h9:function(){return a},sv:function(){return i}});var r=n(92819);function a(e){return(0,r.map)(e,o)}function o(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,a=[];let o=e,i=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(o,(t=>{const r=i<=(e+1)*n;return r&&(i+=t),r})).length;a.push(t),o=(0,r.drop)(o,t)}return a.push(o.length),[a]}const s=j([2,1,2],5),c=x([P,P,N,P,P]),l=x([P,P,P,N,P,P,P]),u=j([3,1,3],5),d=x([N,P,P,N]),p=j([1,2,1],5),m=x([N,P,P,P]),h=j([1,3],3),g=x([P,P,P,N]),f=j([3,1],3),b=x([T(1.6),(0,r.overEvery)(L(.9),T(2)),(0,r.overEvery)(L(.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)(L(.9),T(2)),(0,r.overEvery)(L(.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,a)=>{if(!a.length)return e;let o;o=a.length>15&&c(a)&&s(e)?[2,1,2]:a.length>15&&l(a)&&u(e)?[3,1,3]:5!==a.length&&d(a)&&p(e)?[1,2,1]:m(a)&&h(e)?[1,3]:g(a)&&f(e)?[3,1]:b(a)&&v(e)?[1,2]:t&&(5===a.length||10!==a.length&&a.length>6)&&k(e)&&(0,r.sum)((0,r.take)(a,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,a)?[1,1,1,1]:function(e,t,n){const a=(0,r.sum)((0,r.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&w(e)&&(a<2.5||a<5&&t.length>=3&&t[0]===t[2]||n)}(e,a,t)?[1,1,1]:E(a)&&_(e)?[2,1]:C(a)?[1]:a.length>3?[1,1]:Array(a.length).fill(1);const i=e.concat([o]),S=(0,r.sum)(o),j=a.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 P(e){return e>=1&&e<2}function N(e){return e<1}function L(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),a=n(65235),o=n.n(a);function i(e){let{children:t,className:n}=e;return(0,r.createElement)("div",{className:o()("tiled-gallery__row",n)},t)}},65662:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),a=n(92819),o=n(13993),i=n(17410),s=n(46349),c=n(78922);function l(e){let{columns:t,renderedImages:n}=e;const l=Math.min(o.hI,t),u=n.length%l;return(0,r.createElement)(s.Z,null,[...u?[(0,a.take)(n,u)]:[],...(0,a.chunk)((0,a.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),a=n(81518),o=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:d=s(t),linkTo:p,roundedCorners:m,columnWidths:h}=t;return(0,r.createElement)(i.Z,{align:l,className:u,columns:d,imageFilter:n,images:c,isSave:!0,layoutStyle:(0,a.t)(o.P0,u),linkTo:p,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),a=n(92819),o=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:d}=t,p=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:o.Z;let m;if(s(d)&&u&&c){const e=Math.min(i.GP,u,c);m=p(n,{resize:`${e},${e}`})}else m=p(n);let h;if(s(d)){const e=Math.min(600,u,c),t=Math.min(i.GP,u,c);h=(0,a.range)(e,t,300).map((e=>{const t=p(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,a.range)(e,t,300).map((e=>{const t=p(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,a]of Object.entries(t))r.searchParams.set(n.hasOwnProperty(e)?n[e]:e,a);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 o},hI:function(){return a},q3:function(){return r},xJ:function(){return s}});const r=4,a=20,o=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),a=n(11313),o=n(65235),i=n.n(o);function s(e){const{alt:t,imageFilter:n,height:o,id:s,link:c,linkTo:l,origUrl:u,url:d,width:p}=e;if((0,a.isBlobURL)(u))return null;let m;switch(l){case"media":m=d;break;case"attachment":m=c}const h=(0,r.createElement)("img",{alt:t,"data-height":o,"data-id":s,"data-link":c,"data-url":u,"data-width":p,src:d,"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 o},save:function(){return a.Z},supports:function(){return i}});var r=n(38698),a=n(26225);const o={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 a}});var r=n(51806);function a(e){let{children:t,width:n}=e;const a=n?{flexBasis:`${n}%`}:void 0;return(0,r.createElement)("div",{className:"tiled-gallery__col",style:a},t)}},750:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(51806);function a(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),a=n(69307),o=n(65736),i=n(65235),s=n.n(i),c=n(38698),l=n(65597),u=n(74713),d=n(82265),p=n(72264);const __=o.__;class m extends a.Component{renderImage(e,t){const{columns:n,imageFilter:a,images:i,isSave:s,linkTo:c,layoutStyle:d,onMoveBackward:p,onMoveForward:m,onRemoveImage:h,onSelectImage:g,selectedImage:f,setImageAttributes:b}=this.props,v=(0,o.sprintf)(/* translators: %1$d is the order number of the image, %2$d is the total number of images. */ __("image %1$d of %2$d in gallery","jetpack"),t+1,i.length),{src:k,srcSet:y}=(0,u.z)(e,{layoutStyle:d});return(0,r.createElement)(l.Z,{alt:e.alt,"aria-label":v,columns:n,height:e.height,id:e.id,imageFilter:a,isFirstItem:0===t,isLastItem:t+1===i.length,isSelected:f===t,key:t,link:e.link,linkTo:c,onMoveBackward:s?void 0:p(t),onMoveForward:s?void 0:m(t),onRemove:s?void 0:h(t),onSelect:s?void 0:g(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:a,images:o,layoutStyle:i,roundedCorners:l,onResize:m,style:h,isSave:g,columnWidths:f}=this.props,b=(0,u.v)(i)?p.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:a,columnWidths:g?f:void 0,images:o,layoutStyle:i,renderedImages:v,onResize:g?void 0:m}),t)}}},82265:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(51806),a=n(69307),o=n(6209),i=n(63866),s=n(750),c=n(2911),l=n(76981),u=n(76187);class d extends a.Component{gallery=(0,a.createRef)();pendingRaf=null;ro=null;componentDidMount(){this.observeResize()}componentWillUnmount(){this.unobserveResize()}componentDidUpdate(e){(e.images!==this.props.images||e.align!==this.props.align||"columns"===this.props.layoutStyle&&e.columns!==this.props.columns)&&this.triggerResize()}handleGalleryResize=e=>{this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null),this.pendingRaf=requestAnimationFrame((()=>{for(const{contentRect:t,target: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 o.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:o,renderedImages:u}=this.props,d=(0,l.h9)(n),p="columns"===o?(0,l.sv)(d,t):(0,l.T9)(d,{isWide:["full","wide"].includes(e)}),m=a.Platform.select({web:()=>this.props.columnWidths,native:()=>this.getColumnWidths(p,u,1e3)})();let h=0;return(0,r.createElement)(s.Z,{galleryRef:this.gallery},p.map(((e,t)=>(0,r.createElement)(c.Z,{key:t},e.map(((e,n)=>{const a=u.slice(h,h+e);return h+=e,(0,r.createElement)(i.Z,{key:n,width:m?.[t]?.[n]},a)}))))))}}},76981:function(e,t,n){"use strict";n.d(t,{T9:function(){return S},h9:function(){return a},sv:function(){return i}});var r=n(92819);function a(e){return(0,r.map)(e,o)}function o(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,a=[];let o=e,i=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(o,(t=>{const r=i<=(e+1)*n;return r&&(i+=t),r})).length;a.push(t),o=(0,r.drop)(o,t)}return a.push(o.length),[a]}const s=j([2,1,2],5),c=x([P,P,N,P,P]),l=x([P,P,P,N,P,P,P]),u=j([3,1,3],5),d=x([N,P,P,N]),p=j([1,2,1],5),m=x([N,P,P,P]),h=j([1,3],3),g=x([P,P,P,N]),f=j([3,1],3),b=x([T(1.6),(0,r.overEvery)(L(.9),T(2)),(0,r.overEvery)(L(.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)(L(.9),T(2)),(0,r.overEvery)(L(.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,a)=>{if(!a.length)return e;let o;o=a.length>15&&c(a)&&s(e)?[2,1,2]:a.length>15&&l(a)&&u(e)?[3,1,3]:5!==a.length&&d(a)&&p(e)?[1,2,1]:m(a)&&h(e)?[1,3]:g(a)&&f(e)?[3,1]:b(a)&&v(e)?[1,2]:t&&(5===a.length||10!==a.length&&a.length>6)&&k(e)&&(0,r.sum)((0,r.take)(a,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,a)?[1,1,1,1]:function(e,t,n){const a=(0,r.sum)((0,r.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&w(e)&&(a<2.5||a<5&&t.length>=3&&t[0]===t[2]||n)}(e,a,t)?[1,1,1]:E(a)&&_(e)?[2,1]:C(a)?[1]:a.length>3?[1,1]:Array(a.length).fill(1);const i=e.concat([o]),S=(0,r.sum)(o),j=a.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 P(e){return e>=1&&e<2}function N(e){return e<1}function L(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 o}});var r=n(38698);function a(e,t){const n=(t-e.reduce(((e,t)=>e+t),0))/e.length;return e.map((e=>e+n))}function o(e,t){return function(e,t,n){let[o,i]=t;const d=1/o*(n-r.q3*(e.childElementCount-1)-i);return function(e,t){let{rawHeight:n,rowWidth:o}=t;const i=s(e),d=i.map((e=>(n-r.q3*(e.childElementCount-1))*l(e)[0])),p=a(d,o);i.forEach(((e,t)=>{const o=d[t],i=p[t];!function(e,t){let{colHeight:n,width:r,rawWidth:o}=t;const i=c(e).map((e=>o/u(e))),s=a(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:o})}));return p.map((e=>parseFloat(e/o*100).toFixed(5)))}(e,{rawHeight:d,rowWidth:n-r.q3*(e.childElementCount-1)})}(e,function(e){const t=s(e).map(l).reduce(((e,t)=>{let[n,r]=e,[a,o]=t;return[n+a,r+o]}),[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),a=n(65235),o=n.n(a);function i(e){let{children:t,className:n}=e;return(0,r.createElement)("div",{className:o()("tiled-gallery__row",n)},t)}},72264:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),a=n(92819),o=n(38698),i=n(63866),s=n(750),c=n(2911);function l(e){let{columns:t,renderedImages:n}=e;const l=Math.min(o.hI,t),u=n.length%l;return(0,r.createElement)(s.Z,null,[...u?[(0,a.take)(n,u)]:[],...(0,a.chunk)((0,a.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),a=n(81518),o=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:d=s(t),linkTo:p,roundedCorners:m,columnWidths:h}=t;return(0,r.createElement)(i.Z,{align:l,className:u,columns:d,imageFilter:n,images:c,isSave:!0,layoutStyle:(0,a.t)(o.P0,u),linkTo:p,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),a=n(11313),o=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,a.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:p}=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}()?d:i.Z;let g;if(l(m)&&p&&u){const e=Math.min(c.GP,p,u);g=h(n,{resize:`${e},${e}`})}else g=h(n);let f;if(l(m)){const e=Math.min(600,p,u),t=Math.min(c.GP,p,u);f=(0,o.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,p),t=Math.min(c.GP,p);f=(0,o.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:g},f&&{srcSet:f})}function d(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,a]of Object.entries(t))r.searchParams.set(n.hasOwnProperty(e)?n[e]:e,a);return r.toString()}},15078:function(e,t,n){"use strict";n.d(t,{F:function(){return b}});var r=n(51806),a=n(52175),o=n(55609),i=n(12238),s=n(69307),c=n(65736),l=n(92819),u=n(81518),d=n(94545),p=n(3740),m=n(38897),h=n(21340),g=n(99602);const __=c.__,f=[{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:p.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)(o.DropZone,{onFilesDrop:this.addFiles}),j=(0,r.createElement)(a.BlockControls,null,!!E.length&&(0,r.createElement)(s.Fragment,null,(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarItem,null,(()=>(0,r.createElement)(a.MediaUpload,{onSelect:this.onSelectImages,allowedTypes:p.RA,multiple:!0,gallery:!0,value:E.map((e=>e.id)),render:e=>{let{open:t}=e;return(0,r.createElement)(d.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)(a.MediaPlaceholder,{icon:g.qv,className:i,labels:{title:__("Tiled Gallery","jetpack"),name:__("images","jetpack")},onSelect:this.onSelectImages,accept:"image/*",allowedTypes:p.RA,multiple:!0,notices:l,onError:c.createErrorNotice}));const x=(0,u.t)(p.P0,t.className);return(0,r.createElement)(s.Fragment,null,j,(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(o.PanelBody,{title:__("Tiled Gallery settings","jetpack")},["columns","circle","square"].includes(x)&&E.length>1&&(0,r.createElement)(o.RangeControl,{label:__("Columns","jetpack"),value:y,onChange:this.setColumnsNumber,min:1,max:Math.min(p.hI,E.length)}),x!==p.xJ&&(0,r.createElement)(o.RangeControl,{label:__("Rounded corners","jetpack"),value:C,onChange:this.setRoundedCorners,min:0,max:p.Z5}),(0,r.createElement)(o.SelectControl,{label:__("Link To","jetpack"),value:_,onChange:this.setLinkTo,options:f}))),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)(o.FormFileUpload,{multiple:!0,className:"tiled-gallery__add-item-button",onChange:this.uploadFromFiles,accept:"image/*",icon:"insert"},__("Upload an image","jetpack")))))}}t.ZP=(0,o.withNotices)(k)},47158:function(e,t,n){"use strict";var r=n(31985),a=n(99602);(0,r.Z)(a.u2,a.Xd)},38897:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(51806),a=n(55609),o=n(65736);const __=o.__,_x=o._x,i=[{icon:(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.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(a.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"})),title:_x("Original","image style","jetpack"),value:void 0},{icon:(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(a.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm11 10h2V5h-4v2h2v8zm7-14H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"})),title:_x("Black and White","image style","jetpack"),value:"black-and-white"},{icon:(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(a.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zm-4-4h-4v-2h2c1.1 0 2-.89 2-2V7c0-1.11-.9-2-2-2h-4v2h4v2h-2c-1.1 0-2 .89-2 2v4h6v-2z"})),title:_x("Sepia","image style","jetpack"),value:"sepia"},{icon:(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(a.Path,{d:"M21 1H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm14 8v-1.5c0-.83-.67-1.5-1.5-1.5.83 0 1.5-.67 1.5-1.5V7c0-1.11-.9-2-2-2h-4v2h4v2h-2v2h2v2h-4v2h4c1.1 0 2-.89 2-2z"})),title:"1977",value:"1977"},{icon:(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(a.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm12 10h2V5h-2v4h-2V5h-2v6h4v4zm6-14H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"})),title:_x("Clarendon","image style","jetpack"),value:"clarendon"},{icon:(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0z"}),(0,r.createElement)(a.Path,{d:"M21 1H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm14 8v-2c0-1.11-.9-2-2-2h-2V7h4V5h-6v6h4v2h-4v2h4c1.1 0 2-.89 2-2z"})),title:_x("Gingham","image style","jetpack"),value:"gingham"}],s=__("Pick an image filter","jetpack");function c(e){let{value:t,onChange:n}=e;return(0,r.createElement)(a.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)(a.Toolbar,{controls:[{onClick:t,extraProps:{"aria-haspopup":"true","aria-expanded":n},title:s,tooltip:s,icon:(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.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(a.Path,{d:"M19 10v9H4.98V5h9V3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-9h-2zm-2.94-2.06L17 10l.94-2.06L20 7l-2.06-.94L17 4l-.94 2.06L14 7zM12 8l-1.25 2.75L8 12l2.75 1.25L12 16l1.25-2.75L16 12l-2.75-1.25z"}))}]})},renderContent:e=>{let{onClose:o}=e;return(0,r.createElement)(a.NavigableMenu,{className:"tiled-gallery__filter-picker-menu"},i.map((e=>{let{icon:i,title:s,value:c}=e;return(0,r.createElement)(a.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),o()}),role:"menuitemcheckbox"},s);var l})))}})}},57773:function(e,t,n){"use strict";var r=n(51806),a=n(11313),o=n(55609),i=n(9818),s=n(69307),c=n(65736),l=n(39630),u=n(65235),d=n.n(u),p=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:a,width:o}=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),!a&&n.source_url&&(i.url=n.source_url),!o&&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:g,linkTo:f,onMoveBackward:b,onMoveForward:v,onRemove:k,origUrl:y,showMovers:w,srcSet:E,url:_,width:C}=this.props;let S;switch(f){case"media":S=y;break;case"attachment":S=g}const j=(0,a.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":g,"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)(o.Spinner,null));return(0,r.createElement)("figure",{className:d()("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)(o.Button,{icon:1===n?p.WO:p.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)(o.Button,{icon:1===n?p.xf:p.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)(o.Button,{icon:p.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),a=n(11313),o=n(65235),i=n.n(o);function s(e){const{alt:t,imageFilter:n,height:o,id:s,link:c,linkTo:l,origUrl:u,url:d,width:p}=e;if((0,a.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":o,"data-id":s,"data-link":c,"data-url":u,"data-width":p,src:d,"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 o},WO:function(){return c},xf:function(){return s},xv:function(){return l},zz:function(){return i}});var r=n(51806),a=n(55609);const o=(0,r.createElement)(a.SVG,{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M5 8.70002L10.6 14.4L12 12.9L7.8 8.70002L12 4.50002L10.6 3.00002L5 8.70002Z"})),i=(0,r.createElement)(a.SVG,{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M13 8.7L7.4 3L6 4.5L10.2 8.7L6 12.9L7.4 14.4L13 8.7Z"})),s=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"})),c=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M12,8l-6,6l1.41,1.41L12,10.83l4.59,4.58L18,14L12,8z"})),l=(0,r.createElement)(a.SVG,{width:"18",height:"18",viewBox:"-2 -2 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},99602:function(e,t,n){"use strict";n.d(t,{Xd:function(){return P},qv:function(){return x},u2:function(){return j}});var r=n(51806),a=n(13419),o=n(4981),i=n(55609),s=n(65736),c=n(92819),l=n(70355),u=n(5820),d=n(3740),p=n(73463),m=n(15078),h=n(10745),g=n(96606),f=n(85472),b=n(79009),v=n(10742),k=n(52642),y=n(41145);const __=s.__,_x=s._x,w={[d.EU]:_x("Tiled mosaic","Tiled gallery layout","jetpack"),[d.xJ]:_x("Circles","Tiled gallery layout","jetpack"),[d.sw]:_x("Tiled columns","Tiled gallery layout","jetpack"),[d.yw]:_x("Square tiles","Tiled gallery layout","jetpack")},E=d.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-${d.EU}`,type:"string"},columns:{type:"number"},columnWidths:{default:[],type:"array"},ids:{default:[],type:"array"},imageFilter:{type:"string"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},height:{attribute:"data-height",selector:"img",source:"attribute",type:"number"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},imageCrop:{type:"boolean",default:!0},linkTo:{default:"none",type:"string"},roundedCorners:{type:"integer",default:0}},S={align:"center",className:"is-style-rectangular",images:[{alt:"",link:"",url:g,width:160,height:95},{alt:"",link:"",url:f,width:160,height:107},{alt:"",link:"",url:b,width:304,height:203},{alt:"",link:"",url:v,width:312,height:207},{alt:"",link:"",url:k,width:152,height:101},{alt:"",link:"",url:y,width:152,height:105}],linkTo:"none"},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"})),P={attributes:C,category:(0,u.Z)("media","layout"),description:__("Display multiple images in an elegantly organized tiled layout.","jetpack")+((0,a.Wp)()?"":" "+__("Serves images using Jetpack's fast global network of servers.","jetpack")),icon:{src:x,foreground:(0,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,o.createBlock)(`jetpack/${j}`,{images:t.map((e=>{let{id:t,url:n,link:r,alt:a}=e;return{id:t,url:n,link:r,alt:a}})),ids:t.map((e=>{let{id:t}=e;return t}))})}},{type:"block",blocks:["core/gallery","jetpack/slideshow"],transform:e=>{let{images:t}=e;const n=_(t);return n.length>0?(0,o.createBlock)(`jetpack/${j}`,{images:n.map((e=>{let{id:t,url:n,link:r,alt:a}=e;return{id:t,url:n,link:r,alt:a}})),ids:n.map((e=>{let{id:t}=e;return t}))}):(0,o.createBlock)(`jetpack/${j}`)}}],to:[{type:"block",blocks:["core/gallery"],transform:e=>{let{images:t,ids:n,columns:r,linkTo:a}=e;return(0,o.createBlock)("core/gallery",{images:t,ids:n,columns:r,imageCrop:!0,linkTo:a})}},{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:a}=e;return(0,o.createBlock)("core/image",{align:t,id:n,url:r,alt:a})})):(0,o.createBlock)("core/image")}}]},edit:m.ZP,save:h.Z,providesContext:{imageCrop:"imageCrop"},deprecated:p.Z,example:{attributes:S}}},24639:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(51806);function a(e){let{children:t,width:n}=e;const a=n?{flexBasis:`${n}%`}:void 0;return(0,r.createElement)("div",{className:"tiled-gallery__col",style:a},t)}},75084:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(51806);function a(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),a=n(69307),o=n(65736),i=n(65235),s=n.n(i),c=n(3740),l=n(57773),u=n(81921),d=n(13369),p=n(46438),m=n(70216);const __=o.__;class h extends a.Component{renderImage(e,t){const{columns:n,imageFilter:a,images:i,isSave:s,linkTo:c,layoutStyle:p,onMoveBackward:m,onMoveForward:h,onRemoveImage:g,onSelectImage:f,selectedImage:b,setImageAttributes:v}=this.props,k=(0,o.sprintf)(/* translators: %1$d is the order number of the image, %2$d is the total number of images. */ __("image %1$d of %2$d in gallery","jetpack"),t+1,i.length),y=s?u.Z:l.Z,{src:w,srcSet:E}=(0,d.z)(e,{layoutStyle:p});return(0,r.createElement)(y,{alt:e.alt,"aria-label":k,columns:n,height:e.height,id:e.id,imageFilter:a,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:g(t),onSelect:s?void 0:f(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:a,images:o,layoutStyle:i,roundedCorners:l,onResize:u,style:h,isSave:g,columnWidths:f}=this.props,b=(0,d.v)(i)?m.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:a,columnWidths:g?f:void 0,images:o,layoutStyle:i,renderedImages:v,onResize:g?void 0:u}),t)}}},46438:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(51806),a=n(69307),o=n(6209),i=n(24639),s=n(75084),c=n(51309),l=n(96001),u=n(99856);class d extends a.Component{gallery=(0,a.createRef)();pendingRaf=null;ro=null;componentDidMount(){this.observeResize()}componentWillUnmount(){this.unobserveResize()}componentDidUpdate(e){(e.images!==this.props.images||e.align!==this.props.align||"columns"===this.props.layoutStyle&&e.columns!==this.props.columns)&&this.triggerResize()}handleGalleryResize=e=>{this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null),this.pendingRaf=requestAnimationFrame((()=>{for(const{contentRect:t,target: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 o.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:o,renderedImages:u}=this.props,d=(0,l.h9)(n),p="columns"===o?(0,l.sv)(d,t):(0,l.T9)(d,{isWide:["full","wide"].includes(e)}),m=a.Platform.select({web:()=>this.props.columnWidths,native:()=>this.getColumnWidths(p,u,1e3)})();let h=0;return(0,r.createElement)(s.Z,{galleryRef:this.gallery},p.map(((e,t)=>(0,r.createElement)(c.Z,{key:t},e.map(((e,n)=>{const a=u.slice(h,h+e);return h+=e,(0,r.createElement)(i.Z,{key:n,width:m?.[t]?.[n]},a)}))))))}}},96001:function(e,t,n){"use strict";n.d(t,{T9:function(){return S},h9:function(){return a},sv:function(){return i}});var r=n(92819);function a(e){return(0,r.map)(e,o)}function o(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,a=[];let o=e,i=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(o,(t=>{const r=i<=(e+1)*n;return r&&(i+=t),r})).length;a.push(t),o=(0,r.drop)(o,t)}return a.push(o.length),[a]}const s=j([2,1,2],5),c=x([P,P,N,P,P]),l=x([P,P,P,N,P,P,P]),u=j([3,1,3],5),d=x([N,P,P,N]),p=j([1,2,1],5),m=x([N,P,P,P]),h=j([1,3],3),g=x([P,P,P,N]),f=j([3,1],3),b=x([T(1.6),(0,r.overEvery)(L(.9),T(2)),(0,r.overEvery)(L(.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)(L(.9),T(2)),(0,r.overEvery)(L(.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,a)=>{if(!a.length)return e;let o;o=a.length>15&&c(a)&&s(e)?[2,1,2]:a.length>15&&l(a)&&u(e)?[3,1,3]:5!==a.length&&d(a)&&p(e)?[1,2,1]:m(a)&&h(e)?[1,3]:g(a)&&f(e)?[3,1]:b(a)&&v(e)?[1,2]:t&&(5===a.length||10!==a.length&&a.length>6)&&k(e)&&(0,r.sum)((0,r.take)(a,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,a)?[1,1,1,1]:function(e,t,n){const a=(0,r.sum)((0,r.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&w(e)&&(a<2.5||a<5&&t.length>=3&&t[0]===t[2]||n)}(e,a,t)?[1,1,1]:E(a)&&_(e)?[2,1]:C(a)?[1]:a.length>3?[1,1]:Array(a.length).fill(1);const i=e.concat([o]),S=(0,r.sum)(o),j=a.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 P(e){return e>=1&&e<2}function N(e){return e<1}function L(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 o}});var r=n(3740);function a(e,t){const n=(t-e.reduce(((e,t)=>e+t),0))/e.length;return e.map((e=>e+n))}function o(e,t){return function(e,t,n){let[o,i]=t;const d=1/o*(n-r.q3*(e.childElementCount-1)-i);return function(e,t){let{rawHeight:n,rowWidth:o}=t;const i=s(e),d=i.map((e=>(n-r.q3*(e.childElementCount-1))*l(e)[0])),p=a(d,o);i.forEach(((e,t)=>{const o=d[t],i=p[t];!function(e,t){let{colHeight:n,width:r,rawWidth:o}=t;const i=c(e).map((e=>o/u(e))),s=a(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:o})}));return p.map((e=>parseFloat(e/o*100).toFixed(5)))}(e,{rawHeight:d,rowWidth:n-r.q3*(e.childElementCount-1)})}(e,function(e){const t=s(e).map(l).reduce(((e,t)=>{let[n,r]=e,[a,o]=t;return[n+a,r+o]}),[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),a=n(65235),o=n.n(a);function i(e){let{children:t,className:n}=e;return(0,r.createElement)("div",{className:o()("tiled-gallery__row",n)},t)}},70216:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),a=n(92819),o=n(3740),i=n(24639),s=n(75084),c=n(51309);function l(e){let{columns:t,renderedImages:n}=e;const l=Math.min(o.hI,t),u=n.length%l;return(0,r.createElement)(s.Z,null,[...u?[(0,a.take)(n,u)]:[],...(0,a.chunk)((0,a.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),a=n(81518),o=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:d=(0,i.F)(t),linkTo:p,roundedCorners:m,columnWidths:h}=t;return(0,r.createElement)(s.Z,{align:l,className:u,columns:d,imageFilter:n,images:c,isSave:!0,layoutStyle:(0,a.t)(o.P0,u),linkTo:p,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),a=n(11313),o=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,a.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:p}=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}()?d:i.Z;let g;if(l(m)&&p&&u){const e=Math.min(c.GP,p,u);g=h(n,{resize:`${e},${e}`})}else g=h(n);let f;if(l(m)){const e=Math.min(600,p,u),t=Math.min(c.GP,p,u);f=(0,o.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,p),t=Math.min(c.GP,p);f=(0,o.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:g},f&&{srcSet:f})}function d(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,a]of Object.entries(t))r.searchParams.set(n.hasOwnProperty(e)?n[e]:e,a);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 p}});var r=n(51806),a=n(52175),o=n(55609),i=n(69307),s=n(65736),c=n(75365),l=n(39630);const __=s.__,u=e=>{let{tockUrl:t,setEditedUrl:n,setUrl:a,cancel:s}=e;const u=(0,i.useRef)(!0),d=(0,i.useRef)(!1),p=e=>{a(),d.current=!0,e()};return(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.Dropdown,{popoverProps:{variant:"toolbar"},onClose:()=>d.current?d.current=!1:s(),placement:"bottom-start",renderToggle:e=>{let{isOpen:n,onToggle:a}=e;return!u.current||n||t||(u.current=!1,a()),(0,r.createElement)(o.ToolbarButton,{className:"components-toolbar__control",label:__("Edit Tock business name","jetpack"),onClick:()=>{a(),n&&s()}},__("Edit","jetpack"))},renderContent:e=>{let{onClose:a}=e;return(0,r.createElement)(o.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)(o.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(),p(n)),r===l.ESCAPE&&(e.preventDefault(),s(),n())})(e,a),className:"jetpack-tock-url-input"}),(0,r.createElement)("div",{className:"jetpack-tock-url-input-action"},(0,r.createElement)(o.Button,{type:"submit",label:__("Submit","jetpack"),icon:c.Z,className:"jetpack-tock-url-input-submit",onClick:()=>p(a)}))))}}))},d=e=>{let{url:t,popoverAnchor:n}=e;const a=`\n\t\t<div id="Tock_widget_container" data-tock-display-mode="Button" data-tock-color-mode="Blue" data-tock-locale="en-us" data-tock-timezone="America/New_York" style="display:inline-block;"></div>\n\t\t<script src="https://www.exploretock.com/tock.js" async><\/script>\n\t\t<script>\n\t\t\t!function(t,o){if(!t.tock){var e=t.tock=function(){e.callMethod?\n\t\t\t e.callMethod.apply(e,arguments):e.queue.push(arguments)};t._tock||(t._tock=e),\n\t\t\t e.push=e,e.loaded=!0,e.version='1.0',e.queue=[];}}(window,document);\n\t\t\ttock('init', '${t}');\n\t\t<\/script>\n\t`;return(0,r.createElement)("div",{ref:n},(0,r.createElement)(o.SandBox,{html:a,key:`tock-${t}`}),(0,r.createElement)("div",{className:"block-library-embed__interactive-overlay"}))};function p(e){let{attributes:t,setAttributes:n,isSelected:o}=e;const s=t.url??"",[c,l]=(0,i.useState)(s),p=(0,i.useCallback)((()=>{l(s)}),[s]);return(0,i.useEffect)((()=>{o||p()}),[o,p]),(0,r.createElement)("div",(0,a.useBlockProps)(),(0,r.createElement)(a.BlockControls,null,(0,r.createElement)(u,{tockUrl:c,setEditedUrl:l,setUrl:()=>{const e=c.replace(/.*exploretock.com\//,"");l(e),n({url:e})},cancel:p})),(0,r.createElement)(d,{url:s}))}},14035:function(e,t,n){"use strict";var r=n(31985),a=n(60766);(0,r.Z)(a.u2,a.Xd)},81602:function(e,t,n){"use strict";var r=n(51806),a=n(55609);const o=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",width:"32",height:"32",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M10 15.619C6.84915 15.619 4.28572 13.0542 4.28572 9.90176C4.28572 7.24269 6.10957 5.00183 8.57143 4.36551V0C3.72557 0.693782 0 4.86162 0 9.90176C0 15.4274 4.47715 19.9069 10 19.9069C12.2461 19.9069 14.3193 19.1658 15.9887 17.9148L12.9003 14.825C12.0494 15.3287 11.0581 15.619 10 15.619 M15.7135 9.90176C15.7135 10.9604 15.4233 11.9522 14.9199 12.8035L18.0082 15.8935C19.2585 14.2232 19.9992 12.149 19.9992 9.90176C19.9992 4.86162 16.2736 0.693782 11.4277 0V4.36551C13.8896 5.00183 15.7135 7.24269 15.7135 9.90176"}));t.Z=o},60766:function(e,t,n){"use strict";n.d(t,{Xd:function(){return u},u2:function(){return l}});var r=n(51806),a=n(65736),o=n(70355),i=n(97587),s=n(44814),c=n(81602);const __=a.__,_x=a._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,o.m)()},category:"earn",keywords:[_x("booking","block search term","jetpack"),_x("reservation","block search term","jetpack"),_x("restaurant","block search term","jetpack")],supports:{align:!0,html:!1,multiple:!1},edit: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 o},Z:function(){return i}});var r=n(51806),a=n(69307);const o=(0,a.createContext)(),i=e=>{let{onFilesSelected:t,onMediaItemSelected:n,onUploadFinished:a,children:i}=e;return(0,r.createElement)(o.Provider,{value:{onFilesSelected:t,onMediaItemSelected:n,onUploadFinished:a},children:i})}},90879:function(e,t,n){"use strict";n.d(t,{s:function(){return r},v:function(){return a}});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"}],a={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 o}});var r=n(51806),a=n(52175);function o(e){let{attributes:t}=e;const{caption:n,guid:o}=t;if(!o)return null;const i=`https://videopress.com/v/${o}`;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`),!a.RichText.isEmpty(n)&&(0,r.createElement)(a.RichText.Content,{tagName:"figcaption",value:n}))}},97504:function(e,t,n){"use strict";var r=n(30454),a=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,a.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),a=n(52175),o=n(92490);function i(e){const{attributes:{autoplay:t,caption:n,controls:i,guid:s,loop:c,muted:l,poster:u,preload:d,videoPressClassNames:p}={}}=e;if(!s)return null;const m=(0,o.p)(s,{autoplay:t,controls:i,loop:c,muted:l,poster:u,preload:d});return(0,r.createElement)("figure",{className:p},(0,r.createElement)("div",{className:"wp-block-embed__wrapper"},`\n${m}\n`),!a.RichText.isEmpty(n)&&(0,r.createElement)(a.RichText.Content,{tagName:"figcaption",value:n}))}},92490:function(e,t,n){"use strict";n.d(t,{p:function(){return a}});var r=n(96483);const a=(e,t)=>{let{autoplay:n,controls:a,loop:o,muted:i,poster:s,preload:c}=t;if(!e)return null;const l={...n&&{autoPlay:!0},...!a&&{controls:!1},...o&&{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),a=n.n(r),o=n(73320),i=n.n(o);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}),o=new(a())(r);let c=i()(e,t);return o.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),a=n(52175),o=n(65235),i=n.n(o),s=n(96931);function c(e){const{attributes:{autoplay:t,caption:n,controls:o,guid:c,loop:l,muted:u,playsinline:d,poster:p,preload:m,videoPressClassNames:h,className:g,align:f,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:k}={}}=e,y=a.useBlockProps.save({className:i()("wp-block-video",g,h,{[`align${f}`]:f})}),w=(0,s.p)(c,{autoplay:t,controls:o,loop:l,muted:u,playsinline:d,poster:p,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`),!a.RichText.isEmpty(n)&&(0,r.createElement)(a.RichText.Content,{tagName:"figcaption",value:n}))}},96931:function(e,t,n){"use strict";n.d(t,{p:function(){return a}});var r=n(96483);const a=(e,t)=>{let{autoplay:n,controls:a,loop:o,muted:i,playsinline:s,poster:c,preload:l,seekbarColor:u,seekbarPlayedColor:d,seekbarLoadingColor:p}=t;if(!e)return null;const m={resizeToParent:!0,...n&&{autoPlay:!0},...!a&&{controls:!1},...o&&{loop:!0},...i&&{muted:!0,persistVolume:!1},...s&&{playsinline:!0},...c&&{posterUrl:c},..."none"!==l&&{preloadContent:l},...""!==u&&{sbc:u},...""!==d&&{sbpc:d},...""!==p&&{sblc:p}};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),a=n(52175),o=n(65235),i=n.n(o),s=n(67502);function c(e){const{attributes:{autoplay:t,caption:n,controls:o,guid:c,loop:l,muted:u,playsinline:d,poster:p,preload:m,videoPressClassNames:h,className:g,align:f,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:k,maxWidth:y}={}}=e,w=a.useBlockProps.save({className:i()("wp-block-video",g,h,{[`align${f}`]:f})}),E=(0,s.p)(c,{autoplay:t,controls:o,loop:l,muted:u,playsinline:d,poster:p,preload:m,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:k});let _={};return y&&y.length>0&&"100%"!==y&&(_={maxWidth:y,margin:"auto"}),(0,r.createElement)("figure",w,(0,r.createElement)("div",{className:"wp-block-embed__wrapper",style:_},`\n${E}\n`),!a.RichText.isEmpty(n)&&(0,r.createElement)(a.RichText.Content,{tagName:"figcaption",value:n}))}},67502:function(e,t,n){"use strict";n.d(t,{p:function(){return a}});var r=n(96483);const a=(e,t)=>{let{autoplay:n,controls:a,loop:o,muted:i,playsinline:s,poster:c,preload:l,seekbarColor:u,seekbarPlayedColor:d,seekbarLoadingColor:p}=t;if(!e)return null;const m={resizeToParent:!0,cover:!0,...n&&{autoPlay:!0},...!a&&{controls:!1},...o&&{loop:!0},...i&&{muted:!0,persistVolume:!1},...s&&{playsinline:!0},...c&&{posterUrl:c},..."none"!==l&&{preloadContent:l},...""!==u&&{sbc:u},...""!==d&&{sbpc:d},...""!==p&&{sblc:p}};return(0,r.addQueryArgs)(`https://videopress.com/v/${e}`,m)}},30053:function(e,t,n){"use strict";var r=n(82674),a=n.n(r),o=n(51806),i=n(86989),s=n.n(i),c=n(11313),l=n(52175),u=n(55609),d=n(94333),p=n(9818),m=n(69307),h=n(81975),g=n(65736),f=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),P=n(32478),N=n(90953),L=n(77290);const __=g.__,_x=g._x,T=["image"],A=e=>{const t=(0,l.useBlockProps)({className:"resumable-upload"}),{onChangeTitle:n,title:r,filename:a,onSelectPoster:i,onRemovePoster:s,videoPosterImageData:c,fileForUpload:h,isUploadComplete:g,onDismissEditor:b,onSave:v,onVideoFrameSelected:k}=e,_=(0,p.useSelect)((e=>e("core/editor").isSavingPost()),[]),C=(0,d.usePrevious)(_);return(0,y.useEffect)((()=>{_&&!C&&v()}),[_,C,v]),(0,o.createElement)(E.Z,{onUploadFinished:e.uploadFinished},(0,o.createElement)(m.Fragment,null,e.blockSettings,(0,o.createElement)("div",t,(0,o.createElement)("div",{className:"uploader-block__logo"},(0,o.createElement)(f.Z,{icon:w.ll}),(0,o.createElement)("div",{className:"uploader-block__logo-text"},__("VideoPress","jetpack"))),(0,o.createElement)(P.$,{file:h,filename:a,title:r,onChangeTitle:n,onSelectPoster:i,onRemovePoster:s,videoPosterImageData:c,onVideoFrameSelected:k}),!g&&(0,o.createElement)(S.Z,{file:h}),g&&(0,o.createElement)("div",{className:"uploader-block__upload-complete"},(0,o.createElement)("span",null,__("Upload Complete!","jetpack")," 🎉"),(0,o.createElement)(u.Button,{variant:"primary",onClick:b},__("Done","jetpack"))))))},I=e=>{let{scripts:t}=e;const{html:n,interactive:r,caption:a,isSelected:i,hideOverlay:s,attributes:c,setAttributes:d}=e,{align:p,className:m,videoPressClassNames:h,maxWidth:g}=c,f=(0,l.useBlockProps)({className:v()("wp-block-video",m,h,{[`align${p}`]:p})});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,o.createElement)("figure",f,(0,o.createElement)("div",{className:"wp-block-embed__wrapper"},(0,o.createElement)(u.ResizableBox,{enable:{top:!1,bottom:!1,left:!0,right:!0},maxWidth:"100%",size:{width:g},style:{margin:"auto"},onResizeStop:(e,t,n)=>{let r=getComputedStyle(n).width;if(null!==n.parentElement){r===getComputedStyle(n.parentElement).width&&(r="100%")}d({maxWidth:r})}},(0,o.createElement)(u.SandBox,{html:n,scripts:t,type:h}))),!r&&(0,o.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:s}),(!l.RichText.isEmpty(a)||i)&&(0,o.createElement)(l.RichText,{tagName:"figcaption",placeholder:__("Write caption…","jetpack"),value:a,onChange:e=>d({caption:e}),inlineToolbar:!0}))};t.Z=(0,d.createHigherOrderComponent)((0,d.compose)([(0,p.withSelect)(((e,t)=>{const{autoplay:n,controls:r,fileForImmediateUpload:a,guid:o,loop:i,muted:s,playsinline:l,poster:u,preload:d,seekbarColor:p,seekbarLoadingColor:m,seekbarPlayedColor:h,src:g,useAverageColor:f}=t.attributes,{getEmbedPreview:b,isRequestingEmbedPreview:v}=e("core"),k=(0,N.p)(o,{autoplay:n,controls:r,loop:i,muted:s,playsinline:l,poster:u,preload:d,seekbarColor:p,seekbarLoadingColor:m,seekbarPlayedColor:h,useAverageColor:f}),y=!!k&&b(k),w=!!k&&v(k),E=!!window.videoPressResumableEnabled;return{fileForImmediateUpload:a,isFetchingPreview:w,isUploading:!E&&(0,c.isBlobURL)(g),preview:y,resumableUploadEnabled:E,url:k}})),(0,p.withDispatch)((e=>({invalidateCachedEmbedPreview:t=>{e("core/data").invalidateResolution("core","getEmbedPreview",[t])}}))),d.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"),a=(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!==a&&this.setState({privacySetting:a})};async componentDidUpdate(e){const{attributes:t,invalidateCachedEmbedPreview:n,preview:r,setAttributes:a,url:o,isFetchingPreview:i}=this.props;t.id!==e.attributes.id&&(await this.setGuid(),this.setRatingAndAllowDownload());let s=!1;if(o&&o!==e.url&&(n(o),s=!0),r){const e=(0,L.f6)(r.html,v()("wp-block-embed","is-type-video","is-provider-videopress"),!1);this.previewFailuresCount=0,a({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 a=e.tracks[t][r];n.push({src:a.src,kind:t,srcLang:r,label:a.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,o.createElement)(u.Tooltip,{text:t,position:"top"},(0,o.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:a,url:o}=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(),a(o)}))};render(){const{attributes:t,instanceId:n,isFetchingPreview:r,isUploading:i,preview:c,resumableUploadEnabled:d,setAttributes:p}=this.props,{fallback:f,fileForUpload:b,isFetchingMedia:v,isUpdatingRating:k,interactive:y,rating:w,allowDownload:S,privacySetting:P,isUpdatingAllowDownload:N,isUpdatingPrivacySetting:R,videoPosterImageData:M}=this.state,{autoplay:Z,caption:B,controls:D,guid:F,loop:z,muted:O,playsinline:U,poster:H,preload:V,useAverageColor:G,videoPressTracks:q,isVideoPressExample:$,src:W}=t;if($&&W)return(0,o.createElement)("img",{src:W,alt:B});const J=`video-block__poster-image-description-${n}`,K=!(!H&&!M),X=(0,o.createElement)(m.Fragment,null,(0,o.createElement)(l.BlockControls,{group:"block"},(0,o.createElement)(x.Z,{tracks:q,onChange:e=>{p({videoPressTracks:e})},guid:F})),(0,o.createElement)(l.BlockControls,null,(0,o.createElement)(u.ToolbarGroup,null,(0,o.createElement)(u.ToolbarButton,{className:"components-icon-button components-toolbar__control",text:__("Replace","jetpack"),onClick:this.switchToEditing}))),(0,o.createElement)(l.InspectorControls,null,(0,o.createElement)(u.PanelBody,{title:__("Video Settings","jetpack")},(0,o.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,o.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:z}),(0,o.createElement)(u.ToggleControl,{label:__("Muted","jetpack"),onChange:this.toggleAttribute("muted"),checked:O}),(0,o.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:D}),(0,o.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:U}),(0,o.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:V??"",onChange:e=>p({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,o.createElement)(l.MediaUploadCheck,null,(0,o.createElement)(u.BaseControl,{className:"editor-video-poster-control",label:__("Poster Image","jetpack")},(0,o.createElement)(l.MediaUpload,{title:__("Select Poster Image","jetpack"),onSelect:this.onSelectPoster,allowedTypes:T,render:e=>{let{open:t}=e;return(0,o.createElement)(u.Button,{variant:"secondary",onClick:t,ref:this.posterImageButton,"aria-describedby":J},K?__("Replace image","jetpack",0):__("Select Poster Image","jetpack"))}}),(0,o.createElement)("p",{id:J,hidden:!0},K?(0,g.sprintf)(/* translators: Placeholder is an image URL. */ __("The current poster image url is %s","jetpack"),H??M):__("There is no poster image currently selected","jetpack")),K&&(0,o.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,o.createElement)(u.ExternalLink,{href:"https://automattic.survey.fm/videopress-feedback"})})),(0,o.createElement)(j.Z,{attributes:t,setAttributes:p,useAverageColor:G,toggleAttribute:this.toggleAttribute}),(0,o.createElement)(u.PanelBody,{title:__("Video File Settings","jetpack")},(0,o.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,o.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||N}),(0,o.createElement)(u.SelectControl,{label:__("Video Privacy","jetpack"),help:this.getPrivacySettingHelp(P),onChange:this.onChangePrivacySetting,value:P??"",options:[{value:_.v.SITE_DEFAULT,label:_x("Site Default","VideoPress privacy setting","jetpack")},{value:_.v.PUBLIC,label:_x("Public","VideoPress privacy setting","jetpack")},{value:_.v.PRIVATE,label:_x("Private","VideoPress privacy setting","jetpack")}],disabled:v||R})))),Y=e=>{this.setState({fileForUpload:e[0]})},Q=e=>{e&&e.url?(this.props.setAttributes({src:e.url,id:e.id,poster:e.image?.src!==e.icon?e.image?.src:void 0}),e.videopress_guid&&this.props.setAttributes({guid:e.videopress_guid})):p({src:void 0,id:void 0,poster:void 0})},ee=()=>"videoPressUploadPoster"in window,te=(0,h.escapeHTML)(b?(0,L.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&&p({id:t,guid:n,src:r})},re=e=>{this.setState({title:e})},ae=e=>{this.setState({videoFrameSelectedInMillis:e,videoPosterImageData:null})},oe=()=>{const e=this.state.title;this.updateMetaApiCall({title:e},(()=>this.setState({isUpdatingTitle:!0,title:e})),(()=>this.setState({title:e})),(()=>this.setState({isUpdatingTitle:!1})))},ie=()=>de({at_time:this.state.videoFrameSelectedInMillis,is_millisec:!0}),se=()=>de({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&&p({poster:e})},de=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))},pe=()=>{const{title:e,videoFrameSelectedInMillis:t}=this.state;e&&oe(),M?se():null!=t&&ie()},me=()=>{this.setState({isEditingWhileUploading:!1}),pe()};if(null!=b&&b.name||this.state.isEditingWhileUploading){const e=this.state.title??te;return(0,o.createElement)(A,{fileForUpload:b,filename:te,uploadFinished:ne,blockSettings:X,onDismissEditor:me,isUploadComplete:this.state.isUploadComplete,onSelectPoster:this.onSelectPoster,onRemovePoster:this.onRemovePoster,onChangeTitle:re,title:e,videoPosterImageData:this.state.videoPosterImageData,onVideoFrameSelected:ae,onSave:pe})}const he=v||r,ge=f||i||!F,fe=ge&&!i&&!he,be=(0,o.createElement)(m.Fragment,null,(0,o.createElement)("div",{className:i||he?"":"videopress-block-hide"},(0,o.createElement)(C.Z,{text:i?__("Uploading…","jetpack"):__("Generating preview…","jetpack",0)})),(0,o.createElement)("div",{className:fe?"":"videopress-block-hide"},(0,o.createElement)(e,this.props)));if(ge)return d?(0,o.createElement)(E.Z,{onFilesSelected:Y,onMediaItemSelected:Q},be):(0,o.createElement)(m.Fragment,null,be);const{html:ve,scripts:ke}=c||{html:null,scripts:null},ye=he||!c;return(0,o.createElement)(m.Fragment,null,X,ye&&(0,o.createElement)(C.Z,{text:__("Generating preview…","jetpack")}),!ye&&(0,o.createElement)(I,a()({},this.props,{hideOverlay:this.hideOverlay,html:ve,scripts:ke,interactive:y,caption:B})))}}]),"withVideoPressEdit")},37549:function(e,t,n){"use strict";var r=n(82674),a=n.n(r),o=n(51806),i=n(6975),s=n(13419),c=n(11313),l=n(52175),u=n(65391),d=n(4981),p=n(55609),m=n(94333),h=n(9818),g=n(12238),f=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),P=n(23062),N=n(84676),L=n(41194);const __=v.__,T=(0,m.createHigherOrderComponent)((e=>t=>{const{name:n}=(0,l.useBlockEditContext)();return"core/video"!==n?(0,o.createElement)(e,t):(0,o.createElement)(e,a()({},t,{disableDropZone:!0,className:"no-videopress-media-placeholder"}),(0,o.createElement)(p.Button,{disabled:!0,className:"components-button no-videopress-disabled-button",variant:"secondary"},__("Media Library","jetpack")),(0,o.createElement)(p.Button,{disabled:!0,className:"components-button no-videopress-disabled-button",variant:"secondary"},__("Upload","jetpack")))}),"videoPressNoPlanMediaPlaceholder"),A=(0,m.createHigherOrderComponent)((e=>t=>{const{name:n}=(0,l.useBlockEditContext)();if("core/video"!==n)return(0,o.createElement)(e,t);const{onFilesSelected:r,onMediaItemSelected:i}=(0,f.useContext)(y.H),s={...t,handleUpload:!1,disableDropZone:!0,onSelect:e=>{void 0!==e.length?r(e):i(e)}};return(0,o.createElement)(e,a()({},s,{className:"videopress-media-placeholder"}))}),"videoPressMediaPlaceholder"),I=(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:a,supports:o,transforms:i}=e,{available:l,unavailableReason:u}=(0,s.OZ)("videopress"),p=((0,s.Wp)()||(0,s.Ug)())&&["missing_plan","unknown"].includes(u),m=!!window.videoPressResumableEnabled;if(p?((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",A),e.description=__("Embed a video from your media library or upload a new one with VideoPress.","jetpack"),e.example.attributes={caption:"",isVideoPressExample:!0,src:L}),(0,b.addFilter)("blocks.getSaveContent.extraProps","jetpack/videopress",I,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,d.createBlock)("core/video",{fileForImmediateUpload:e});n.push(t)}else{const r=(0,d.createBlock)("core/video",{src:(0,c.createBlobURL)(e)});(0,g.mediaUpload)({filesList:[e],onFileChange:e=>{let[{id:n,url:a}]=e;t(r.clientId,{id:n,src:a})},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,d.createBlock)("core/embed",{url:"https://videopress.com/v/"+t[1].trim()})}}]},supports:{...o,reusable:!1},edit:(0,S.Z)(r),save:(0,j.Z)(a),deprecated:[...n||[],C.Z,_.Z,{attributes:t,isEligible:e=>!e.guid,save:a,supports:o,isDeprecation:!0},E.Z,w.Z]}}return e}),5),(0,b.addFilter)("blocks.registerBlockType","videopress/add-wp-chapters-support",N.Z),(0,b.addFilter)("blocks.registerBlockType","videopress/add-v6-transform-support",P.Z),(0,b.addFilter)("blocks.registerBlockType","videopress/add-core-video-transform",(function(e,t){if("videopress/video"!==t)return e;const n=(0,d.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)(g.store).getCurrentPostId();return i.Z?.tracks?.recordEvent("jetpack_editor_videopress_block_manual_transform_click",{post_id:t}),(0,d.createBlock)("videopress/video",e)}}],to:[...e.transforms?.to||[],{type:"block",blocks:["core/video"],transform:e=>(0,d.createBlock)("core/video",e)}]}}:e}));const R=(0,m.createHigherOrderComponent)((e=>t=>{const{block:n}=t,{name:r,attributes:a,clientId:i,__unstableBlockSource:c}=n,{replaceBlock:u}=(0,h.useDispatch)(l.store),{url:p,guid:m,providerNameSlug:g}=a,{available:b}=((0,x.Kp)(a),(0,d.getBlockType)("videopress/video"),(0,s.OZ)("videopress/video")),v="core/embed"===r,k=(0,x.Zx)(p),y=v&&k?k:m;(0,s.Wp)();return(0,f.useEffect)((()=>{}),[i,false,a,c,u,y]),(0,o.createElement)(e,t)}),"convertVideoBlockToVideoPressVideoBlock");(0,b.addFilter)("editor.BlockListBlock","videopress/jetpack-convert-to-videopress-video-block",R);const M=(0,m.createHigherOrderComponent)((e=>t=>{const{block:n}=t,{name:r,attributes:a,clientId:i}=n,{replaceBlock:s}=(0,h.useDispatch)(l.store);return(0,f.useEffect)((()=>{if("core/missing"===r&&"videopress/video"===a?.originalName)try{const e=(0,u.parse)(a.originalContent),t=e?.[0];if(!t)return;const{attrs:n}=t;s(i,(0,d.createBlock)("core/video",function(e){const t={...e};return e?.tracks&&(t.videoPressTracks=e.tracks,delete t.tracks),e?.isExample&&(t.isVideoPressExample=e.isExample,delete t.isExample),e?.classNames&&(t.videoPressClassNames=e.classNames,delete t.classNames),delete t.title,delete t.description,delete t.cacheHtml,delete t.videoRatio,delete t.privacySetting,delete t.allowDownload,delete t.displayEmbed,delete t.rating,delete t.isPrivate,t}(n)))}catch(e){console.error("Error converting VideoPress block to core/video",e)}}),[r,i,a,s]),(0,o.createElement)(e,t)}),"convertV6toV5");(0,b.addFilter)("editor.BlockListBlock","videopress/jetpack-convert-from-v6-to-v5",M)},31302:function(e,t,n){"use strict";var r=n(51806),a=n(55609);t.Z=e=>{let{text:t}=e;return(0,r.createElement)("div",{className:"wp-block-embed is-loading"},(0,r.createElement)(a.Spinner,null),(0,r.createElement)("p",null,t))}},43774:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(51806),a=n(55609),o=n(69307),i=n(65736),s=n(90861),c=n.n(s),l=n(10723),u=n(5482);const __=i.__;function d(e){let{file:t}=e;const[n,s]=(0,o.useState)(0),[d,p]=(0,o.useState)(!1),[m,h]=(0,o.useState)(null),[g,f]=(0,o.useState)(null),[b,v]=(0,o.useState)(null),{onUploadFinished:k}=(0,o.useContext)(l.H),y=(0,o.useRef)(null);y.current=m;const w=(0,o.useCallback)((()=>{const e=(0,u.J)({onError:e=>{f(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=>{f(e)}))}),[t,k,b]);(0,o.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!==g?(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 g){const t=g.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)(a.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)(a.Button,{variant:"primary",onClick:()=>(f(null),void w())},__("Try again","jetpack")),(0,r.createElement)(a.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,d?(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)(a.Button,{variant:"link",onClick:()=>{m&&(d?m.start():m.abort(),p(!d))}},d?"Resume":"Pause"))))}},5482:function(e,t,n){"use strict";n.d(t,{J:function(){return i},v:function(){return a}});var r=n(99537);const a=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)}))}))},o={},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"),a=n.getHeader("x-videopress-upload-media-id"),i=n.getHeader("x-videopress-upload-src-url");if(r&&a&&i)return void(s&&s({mediaId:Number(a),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&&(o[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(o[r])e.setHeader("x-videopress-upload-token",o[r]);else if("HEAD"===t)return a(r).then((t=>(o[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),a=n(52175),o=n(94333),i=n(65235),s=n.n(i),c=n(90953);t.Z=(0,o.createHigherOrderComponent)((e=>t=>{const{attributes:{autoplay:n,caption:o,controls:i,guid:l,loop:u,muted:d,playsinline:p,poster:m,preload:h,videoPressClassNames:g,className:f,align:b,seekbarColor:v,seekbarPlayedColor:k,seekbarLoadingColor:y,useAverageColor:w,maxWidth:E}={}}=t,_=a.useBlockProps.save({className:s()("wp-block-video",f,g,{[`align${b}`]:b})});if(!l)return e(t);const C=(0,c.p)(l,{autoplay:n,controls:i,loop:u,muted:d,playsinline:p,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`),!a.RichText.isEmpty(o)&&(0,r.createElement)(a.RichText.Content,{tagName:"figcaption",value:o}))}),"withVideoPressSave")},75880:function(e,t,n){"use strict";var r=n(51806),a=n(52175),o=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)(o.PanelBody,{className:"seekbar-color-settings__panel",title:__("Progress Bar Colors","jetpack"),initialOpen:!1},(0,r.createElement)(o.ToggleControl,{label:__("Match video","jetpack"),help:__("Colors adapt to the video as it plays","jetpack"),onChange:i("useAverageColor"),checked:s}),(0,r.createElement)(a.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)(o.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),a=n(86989),o=n.n(a),i=n(52175),s=n(55609),c=n(9818),l=n(69307),u=n(65736),d=n(47659);const __=u.__,p="subtitles",m=".vtt,text/vtt",h=[{label:__("Subtitles","jetpack"),value:"subtitles"},{label:__("Captions","jetpack"),value:"captions"},{label:__("Descriptions","jetpack"),value:"descriptions"},{label:__("Chapters","jetpack"),value:"chapters"},{label:__("Metadata","jetpack"),value:"metadata"}],g=(0,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"})),f=()=>"videoPressUploadTrack"in window,b=(e,t)=>{if(f())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 o()(n)},v=(e,t)=>{if(f())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 o()(n)};function k(e){let{tracks:t,onChange:n,guid:a}=e;const[o=-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,a).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:o===c},o===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:a,onClose:o,onCancel:d,trackExists:g}=e;const[f,v]=(0,l.useState)(),[k=!1,y]=(0,l.useState)(),{label:w="",srcLang:E="",kind:_=p}=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],a(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=>a({...t,label:e}),label:__("Label","jetpack"),value:w,help:__("Title of track","jetpack"),disabled:k}),(0,r.createElement)(s.TextControl,{onChange:e=>a({...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=>{a({...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=p),g(t)?v(__("A track already exists for that language and kind.","jetpack")):(y(!0),b(t,n).then((()=>{a(t),v(null),o()})).catch((e=>{e.message&&v(e.message)})).finally((()=>{y(!1)})))}},__("Save","jetpack")),(0,r.createElement)(s.Button,{variant:"link",onClick:d},__("Close","jetpack"))),f&&(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"),f))))}function w(e){let{tracks:t=[],onChange:n,guid:a}=e;const[o,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:g})},renderContent:()=>null!==o?(0,r.createElement)(y,{track:t[o],guid:a,onChange:e=>{const r=[...t];r[o]=e,n(r)},onClose:()=>i(null),onCancel:()=>{n(t.filter(((e,t)=>t!==o))),i(null)},trackExists:e=>-1!==t.filter(((e,t)=>t!==o)).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:a}),(0,r.createElement)(s.MenuGroup,{className:"videopress-block-tracks-editor__add-tracks-container",label:__("Add tracks","jetpack")},(0,r.createElement)(s.MenuItem,{icon:d.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 g}});var r=n(51806),a=n(52175),o=n(55609),i=n(69307),s=n(65736),c=n(61074),l=n(65235),u=n.n(l),d=n(81427);const __=s.__,p=["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:d.o1})):(0,r.createElement)("span",null,"No Poster Selected"))},h=e=>{const{onSelectPoster:t,onRemovePoster:n}=e;return(0,r.createElement)(o.BaseControl,{className:u()(e.className,"editor-video-poster-control")},(0,r.createElement)(m,e),(0,r.createElement)(a.MediaUpload,{title:__("Select Poster Image","jetpack"),onSelect:t,allowedTypes:p,render:e=>{let{open:t}=e;return(0,r.createElement)("div",{className:"poster-selector__buttons"},(0,r.createElement)(o.Button,{onClick:n,variant:"link",isDestructive:!0},__("Remove Poster Image","jetpack")),(0,r.createElement)(o.Button,{variant:"secondary",onClick:t},__("Select Poster Image","jetpack")))}}))},g=e=>{const{file:t,onSelectPoster:n,onRemovePoster:s,videoPosterImageData:l,title:u,onChangeTitle:m,onVideoFrameSelected:g}=e,[f,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)(o.TextControl,{label:__("Video title","jetpack"),className:"uploading-editor__title",onChange:m,value:u}),(0,r.createElement)("div",{className:"uploading-editor__content"},(0,r.createElement)(o.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:d.o1})),(0,r.createElement)("span",{style:_},(0,r.createElement)(o.RangeControl,{className:"uploading-editor__range",min:"0",step:"0.1",max:f,showTooltip:!1,withInputField:!1,onChange:e=>{g(1e3*e),y.current&&(y.current.currentTime=e)}})),(0,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)(a.MediaUpload,{title:__("Select Poster Image","jetpack"),onSelect:n,allowedTypes:p,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 a}});var r=n(96483);const a=(e,t)=>{let{autoplay:n,controls:a,loop:o,muted:i,playsinline:s,poster:c,preload:l,seekbarColor:u,seekbarPlayedColor:d,seekbarLoadingColor:p,useAverageColor:m}=t;if(!e)return null;const h={resizeToParent:!0,cover:!0,...n&&{autoPlay:!0},...!a&&{controls:!1},...o&&{loop:!0},...i&&{muted:!0,persistVolume:!1},...s&&{playsinline:!0},...c&&{posterUrl:c},...""!==l&&{preloadContent:l},...""!==u&&{sbc:u},...""!==d&&{sbpc:d},...""!==p&&{sblc:p},...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),a=n.n(r),o=n(90879);const i=e=>{const t=o.s.reduce(((e,t)=>{let{className:n}=t;return e[n]=!1,e}),{"wp-has-aspect-ratio":!1});return a()(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<o.s.length;n++){const r=o.s[n];if(e>=r.ratio)return a()(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 g}});var r=n(51806),a=n(13419),o=n(52175),i=n(4981),s=n(55609),c=n(9818),l=n(12238),u=n(65736),d=(n(99196),n(77290)),p=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:a}=e;"core/video"===r&&(0,d.Kp)(a)&&m.instances.push({clientId:n,name:r,attributes:a})})),0===t)return m.instances};function g(e){let{clientId:t,attributes:n}=e;const u=(0,c.useSelect)((e=>e(l.store).getCurrentPostId())),{getBlocks:m}=(0,c.useSelect)(o.store),{replaceBlock:g}=(0,c.useDispatch)(o.store),{tracks:f}=(0,a.z$)();return(0,r.createElement)("div",{className:p.Z.wrapper},(0,r.createElement)(s.Notice,{status:"info",isDismissible:!1,className:p.Z["conversion-notice"]},__("You can transform this post's video blocks to the new VideoPress block to take advantage of new features, such as adding chapters directly in the description or hiding the video's share menu.","jetpack")),(0,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,d.Kp)(r)&&(g(t,(0,i.createBlock)("videopress/video",r)),f.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),a=n(52175),o=n(94333),i=n(77290),s=n(65192);const c=(0,o.createHigherOrderComponent)((e=>t=>(0,i.Kp)(t.attributes)?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.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),a=n(68938);const o="videopress/video";function i(e,t){if("core/video"!==t)return e;const{available:n}=(0,r.OZ)(o);return n?{...e,edit:(0,a.Z)(e.edit)}:e}},73859:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(51806),a=n(55609),o=n(65736),i=n(78680),s=n(75255);const __=o.__,c="videopress/video-chapters",l=!!window?.Jetpack_Editor_Initial_State?.available_blocks[c],u=31;function d(e){let{isRequestingVideoItem:t}=e;const{attributes:n,setAttributes:o}=(0,s.Z)(),{title:d,description:p}=n,m=(0,i.L)(c),h=p?.length?p.split("\n").map((e=>Math.ceil(e.length/u)||1)).reduce(((e,t)=>e+t),0):4,g=Math.min(12,Math.max(h,4));if(!l)return null;return(0,r.createElement)(a.PanelBody,{title:__("Details","jetpack"),className:m?"is-beta":""},(0,r.createElement)(a.TextControl,{label:__("Title","jetpack"),value:d,placeholder:__("Video title","jetpack"),onChange:e=>{o({title:e})},disabled:t}),(0,r.createElement)(a.TextareaControl,{label:__("Description","jetpack"),value:p,placeholder:__("Video description","jetpack"),onChange:e=>{o({description:e})},disabled:t,rows:g}))}},24288:function(e,t,n){"use strict";var r=n(51806),a=n(52175),o=n(94333),i=n(69307),s=n(73859),c=n(67203),l=n(49664),u=n(84676);const d=(0,o.createHigherOrderComponent)((e=>t=>{const{attributes:n,setAttributes:o}=t,[d,p]=(0,c.Z)(n?.id),[m]=(0,l.v)(n);return(0,i.useEffect)((()=>{if(!d)return;const e={};d?.title&&(e.title=d.title),d?.description&&(e.description=d.description),Object.keys(e).length&&(o(e),m(e))}),[d,o,m]),u.d&&"core/video"!==!t.name&&t.attributes?.guid?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(s.Z,{isRequestingVideoItem:p})),(0,r.createElement)(e,t)):(0,r.createElement)(e,t)}));t.Z=d},75255:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(52175),a=n(9818);function o(){const{clientId:e,attributes:t}=(0,a.useSelect)((e=>{const t=e(r.store).getSelectedBlockClientId();return{clientId:t,attributes:t?e("core/block-editor").getBlockAttributes(t):void 0}})),{updateBlockAttributes:n}=(0,a.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 g}});var r=n(86989),a=n.n(r),o=n(94333),i=n(37798),s=n(9818),c=n(12238),l=n(69307),u=n(65736),d=n(22081),p=n(90953),m=n(6268),h=n(38871);const __=u.__;function g(e){const{id:t,title:n,description:r,guid:u}=e,g=(0,s.useSelect)((e=>e(c.store).isSavingPost()),[]),f=(0,o.usePrevious)(g),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)=>{a()({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(!g||f)return;if(!t)return;const a={};if(v?.title!==n&&(a.title=n),v?.description!==r&&(a.description=r),!Object.keys(a).length)return;if(w(a).then((()=>y({title:n,description:r}))),!a?.description?.length)return;const o=(0,m.ZP)(a.description);if(!o?.length)return;const i={label:__("English","jetpack"),srcLang:"en",kind:"chapters",tmpFile:(0,h.ZP)(a.description)};(0,d.n)(i,u).then((()=>{const t=(0,p.p)(u,e);b("getEmbedPreview",[t])}))}),[g,f,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),a=n.n(r),o=n(69307);function i(e){const[t,n]=(0,o.useState)({}),[r,i]=(0,o.useState)(!1);return(0,o.useEffect)((()=>{e&&(i(!0),async function(){try{const t=await a()({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 o},d:function(){return a}});var r=n(24288);const a=!!window?.Jetpack_Editor_Initial_State?.available_blocks["videopress/video-chapters"];function o(e,t){if(!a)return e;if("core/video"!==t)return e;const 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,a=e.indexOf(n),o=(a<(e.length-n.length)/2?e.substring(a+n.length,e.length):e.substring(0,a)).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:o}}(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 o}});var r=n(6268);function a(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 o(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 o="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:a(t);o+=`\n${i++}\n${r.startAt}.${s} --\x3e ${c}.000\n${r.title}\n`}return o}(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),a=n(55609),o=n(65736);const __=o.__,i="mrec",s=[{height:250,icon:(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.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(a.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-7-2h2V7h-4v2h2z"})),name:__("Rectangle 300x250","jetpack"),tag:i,width:300,editorPadding:30},{height:90,icon:(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.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(a.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-4-4h-4v-2h2c1.1 0 2-.89 2-2V9c0-1.11-.9-2-2-2H9v2h4v2h-2c-1.1 0-2 .89-2 2v4h6v-2z"})),name:__("Leaderboard 728x90","jetpack"),tag:"leaderboard",width:728,editorPadding:60},{height:50,icon:(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(a.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-4-4v-1.5c0-.83-.67-1.5-1.5-1.5.83 0 1.5-.67 1.5-1.5V9c0-1.11-.9-2-2-2H9v2h4v2h-2v2h2v2H9v2h4c1.1 0 2-.89 2-2z"})),name:__("Mobile Leaderboard 320x50","jetpack"),tag:"mobile_leaderboard",width:320,editorPadding:100},{height:600,icon:(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{fill:"none",d:"M.04 0h24v24h-24V0z"}),(0,r.createElement)(a.Path,{d:"M19.04 3h-14c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16h-14V5h14v14zm-6-2h2V7h-2v4h-2V7h-2v6h4z"})),name:__("Wide Skyscraper 160x600","jetpack"),tag:"wideskyscraper",width:160,editorPadding:30}]},56565:function(e,t,n){"use strict";var r=n(51806),a=n(52175),o=n(55609),i=n(65736),s=n(1020);const __=i.__,c=e=>{let{value:t,onChange:n}=e;return(0,r.createElement)(o.PanelBody,{title:__("Visibility","jetpack")},(0,r.createElement)(o.ToggleControl,{className:"jetpack-wordads__mobile-visibility",checked:!!t,label:__("Hide on mobile","jetpack"),help:__("Hides this block for site visitors on mobile devices.","jetpack"),onChange:n}))};t.Z=e=>{let{attributes:{format:t,hideMobile:n},setAttributes:o}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.BlockControls,null,(0,r.createElement)(s.Z,{value:t,onChange:e=>o({format:e})})),(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(c,{value:n,onChange:e=>o({hideMobile:!!e})})))}},53193:function(e,t,n){"use strict";var r=n(51806),a=n(50354),o=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,d=a.m.find((e=>{let{tag:t}=e;return t===u}));return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.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:d.width,height:d.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),a=n(57795);(0,r.Z)(a.u2,a.Xd)},1020:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(51806),a=n(55609),o=n(65736),i=n(50354);const s=(0,o.__)("Pick an ad format","jetpack");function c(e){let{value:t,onChange:n}=e;return(0,r.createElement)(a.Dropdown,{placement:"bottom-start",renderToggle:e=>{let{onToggle:t,isOpen:n}=e;return(0,r.createElement)(a.ToolbarGroup,{controls:[{icon:(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:"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:o}=e;return(0,r.createElement)(a.NavigableMenu,{className:"wp-block-jetpack-wordads__format-picker"},i.m.map((e=>{let{tag:i,name:s,icon:c}=e;return(0,r.createElement)(a.MenuItem,{className:i===t?"is-active":void 0,icon:c,isSelected:i===t,key:i,onClick:()=>{n(i),o()},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),a=n(55609),o=n(69307),i=n(65736),s=n(70355),c=n(50354),l=n(53193);const __=i.__,_x=i._x,u="wordads",d=__("Ad","jetpack"),p=(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.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(a.Path,{fill:"currentColor",d:"M12,8H4A2,2 0 0,0 2,10V14A2,2 0 0,0 4,16H5V20A1,1 0 0,0 6,21H8A1,1 0 0,0 9,20V16H12L17,20V4L12,8M15,15.6L13,14H4V10H13L15,8.4V15.6M21.5,12C21.5,13.71 20.54,15.26 19,16V8C20.53,8.75 21.5,10.3 21.5,12Z"})),m={title:d,description:(0,r.createElement)(o.Fragment,null,(0,r.createElement)("p",null,__("Earn income by adding high quality ads to your post","jetpack")),(0,r.createElement)(a.ExternalLink,{href:"https://wordads.co/"},__("Learn all about WordAds","jetpack"))),icon:{src:p,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 d}});var r=n(82674),a=n.n(r),o=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 d(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(!d(t))return e;const{title:n,keywords:r}=e,a="(beta)",o="beta",i={...e};return n&&(i.title=n.toLowerCase().endsWith(a)?n:`${e.title} ${a}`),Array.isArray(r)&&(i.keywords=r.includes(o)?r:[...r,o]),i}));const p=(0,c.createHigherOrderComponent)((e=>t=>{if(t?.clientRootId)return(0,o.createElement)(e,t);const{name:n}=t;return d(n)?(0,o.createElement)(e,a()({},t,{className:"is-beta-extension"})):(0,o.createElement)(e,t)}),"withBetaClassName");(0,l.addFilter)("editor.BlockListBlock","jetpack/label-beta-extensions",p)},6460:function(e,t,n){"use strict";var r=n(4981),a=n(65736),o=n(81427);const __=a.__,i={name:"descript",title:"Descript",icon:o.h,keywords:[__("descript","jetpack")],description:__("Embed a Descript Item.","jetpack"),patterns:[/^https:\/\/share.descript.com\/(view|embed)\/\w+/i],attributes:{providerNameSlug:"descript",responsive:!0}};(0,r.registerBlockVariation)("core/embed",i)},5166:function(e,t,n){"use strict";var r=n(92694),a=n(65736),o=n(70355),i=n(81427);const __=a.__,_x=a._x,s={name:"facebook",title:"Facebook",icon:{src:i.Vq,foreground:(0,o.m)()},keywords:[_x("social","block search term","jetpack")],description:__("Embed a Facebook post.","jetpack"),patterns:[/^https?:\/\/www\.facebook.com\/.+/i],attributes:{providerNameSlug:"facebook",previewable:!1,responsive:!0}};(0,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),a=n(65736),o=n(70355),i=n(81427),s=n(12923);const __=a.__,_x=a._x,c={name:"instagram",title:"Instagram",icon:{src:i.yu,foreground:(0,o.m)()},keywords:[_x("image","block search term","jetpack"),_x("social","block search term","jetpack")],description:__("Embed an Instagram post.","jetpack"),patterns:[/^https?:\/\/(www\.)?instagr(\.am|am\.com)\/.+/i],attributes:{providerNameSlug:"instagram",responsive:!0}};(0,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),a=n(65736),o=n(81427);const __=a.__,i={name:"loom",title:"Loom",icon:o.zf,keywords:[__("video","jetpack")],description:__("Embed a Loom video.","jetpack"),patterns:[/^https?:\/\/(www\.)?loom\.com\/share\/.+/i],attributes:{providerNameSlug:"loom",responsive:!0}};(0,r.registerBlockVariation)("core/embed",i)},91128:function(e,t,n){"use strict";var r=n(4981),a=n(65736),o=n(81427);const __=a.__,i={name:"smartframe",title:"SmartFrame",icon:o.Ae,keywords:[__("smartframe","jetpack")],description:__("Embed a SmartFrame Image.","jetpack"),patterns:[/^https?:\/\/(.*?).smartframe.(io|net)\/.*/i],attributes:{providerNameSlug:"smartframe",responsive:!0}};(0,r.registerBlockVariation)("core/embed",i)},31657:function(e,t,n){"use strict";var r=n(4981),a=n(92694),o=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),a=t.hostname?t.hostname:t.protocol,i=o.Z.find((e=>a.includes(e.url)||e.url.includes(a))),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,a.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 o}});var r=n(51806),a=n(69307);const o=(0,a.createContext)(),i=e=>{let{onBannerVisibilityChange:t,hasParentBanner:n,children:a}=e;return(0,r.createElement)(o.Provider,{value:{onBannerVisibilityChange:t,hasParentBanner:n},children:a})}},23984:function(e,t,n){"use strict";var r=n(13419),a=n(47701),o=n.n(a),i=n(92694),s=n(65736),c=n(92819),l=n(30371),u=n(7832),d=n(42770),p=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,d.Z)(e.icon)),e.attributes.shouldDisplayFrontendBanner||(e.attributes.shouldDisplayFrontendBanner={type:"boolean",default:!0}),"core/cover"!==t&&(e.supports={...e.supports,__experimentalExposeControlsToChildren:!0})),e))),(0,i.addFilter)("editor.BlockEdit","jetpack/paid-block-with-warning",p.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),o()((function(){(0,r.FK)()&&document.body.classList.add("jetpack-enable-upgrade-nudge")}))},30371:function(e,t,n){"use strict";var r=n(82674),a=n.n(r),o=n(51806),i=n(13419),s=n(52175),c=n(94333),l=n(69307),u=n(11317),d=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,o.createElement)(e,t);const{fileType:c}=r,{onError:p}=t,{onBannerVisibilityChange:m}=(0,l.useContext)(d.x),h=(0,l.useCallback)((e=>m(e?.length&&(0,u.Qu)(e[0],c))),[c,m]),g=(0,l.useCallback)((e=>{const t=e?.[0]?.props?.children;return(0,u.Qu)(t,c)?h([t]):p(e)}),[h,c,p]);return(0,o.createElement)("div",{className:"paid-block-media-placeholder"},(0,o.createElement)(e,a()({},t,{onFilesPreUpload:h,onError:g})))}),"withMediaPlaceholderUpgradable")},7832:function(e,t,n){"use strict";var r=n(82674),a=n.n(r),o=n(51806),i=n(13419),s=n(52175),c=n(94333),l=n(69307),u=n(11317),d=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,o.createElement)(e,t);const{fileType:p}=r,{onBannerVisibilityChange:m}=(0,l.useContext)(d.x);return(0,o.createElement)(e,a()({},t,{onFilesUpload:e=>{c.current=e?.length?e[0]:null,m(e?.length&&(0,u.Qu)(e[0],p))},createNotice:(e,n,r)=>{if((0,u.Qu)(c.current,p))return c.current=null,null;t.createNotice(e,n,r)}}))}),"withMediaReplaceFlowUpgradable")},95796:function(e,t,n){"use strict";var r=n(51806),a=n(55609);t.Z=e=>{let{cx:t=23,cy:n=3,r:o=4,fill:i="#e34c84",stroke:s="#ffffff",strokeWidth:c="2"}=e;return(0,r.createElement)(a.Circle,{className:"jetpack-paid-block-symbol",cx:t,cy:n,r:o,fill:i,stroke:s,strokeWidth:c})}},42770:function(e,t,n){"use strict";n.d(t,{p:function(){return c}});var r=n(51806),a=n(13419),o=n(69307),i=n(95796);const s=e=>(e?.src?e={...e,src:(0,o.cloneElement)(e.src,{children:[e.src.props.children,(0,r.createElement)(i.Z,{key:"paid-symbol"})]})}:e?.props?.children&&(e=(0,o.cloneElement)(e,{children:[e.props.children,(0,r.createElement)(i.Z,{key:"paid-symbol"})]})),e);function c(e,t){return(0,a.X1)(e)?s(t):t}t.Z=s},66316:function(e,t,n){"use strict";var r=n(51806),a=n(9818),o=n(65736),i=n(26546),s=n(78798);const __=o.__,_x=o._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:d,title:p=c,description:m=null,buttonText:h=u,visible:g=!0,requiredPlan:f,context:b}=e;const[v,k,y]=(0,s.Z)(f,t),w=(0,a.useSelect)((e=>{if(m)return m;const t=e("wordpress-com/plans"),n=t&&t.getPlan(f);return n?(0,o.sprintf)(l,n.product_name_short):null}),[m]);return w&&(0,r.createElement)(i.p,{align:n,buttonText:h,checkoutUrl:v,className:d,context:b,description:w,goToCheckoutPage:k,isRedirecting:y,title:p,visible:g})}},38140:function(e,t,n){"use strict";n.d(t,{W:function(){return a},v:function(){return r}});const r=e=>{let{plan:t,blockName:n,context:r,tracks:a}=e;a.recordEvent("jetpack_editor_block_upgrade_click",{plan:t,block:n,context:r})},a=e=>{let{plan:t,blockName:n,context:r,tracks:a}=e;a.recordEvent("jetpack_editor_block_upgrade_banner_impression",{plan:t,block:n,context:r})}},27003:function(e,t,n){"use strict";var r=n(51806),a=n(13419),o=n(52175),i=n(94333),s=n(9818),c=n(69307),l=n(87950),u=n(66316),d=n(38140);t.Z=(0,i.createHigherOrderComponent)((e=>t=>{const{name:n,clientId:i,isSelected:p,attributes:m,setAttributes:h}=t||{},{hasParentBanner:g}=(0,c.useContext)(l.x)||{},{tracks:f}=(0,a.z$)(),b=(0,a.Rl)(n);if(!b)return(0,r.createElement)(e,t);const v=(0,a.HD)(n),k=(0,a.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=(p||S)&&y&&!g,x=(0,c.useMemo)((()=>({plan:b,blockName:n,context:C,tracks:f})),[b,n,f]);(0,c.useEffect)((()=>{j&&_(!0)}),[j,_]),(0,c.useEffect)((()=>{!E&&j&&(0,d.W)(x)}),[E,x,j]),(0,c.useEffect)((()=>w(!v)),[m,w,v]),(0,c.useEffect)((()=>{h({shouldDisplayFrontendBanner:!g})}),[h,g]);const P=(0,o.useBlockProps)();return(0,r.createElement)(l.L,{onBannerVisibilityChange:w,hasParentBanner:j},(0,r.createElement)("div",{ref:P.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,d.v)(x)}),(0,r.createElement)(e,t)))}),"withUpgradeBanner")},90607:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(51806),a=n(13419),o=n(55609),i=n(72067),s=n(69307),c=n(65736),l=n(63206),u=n(18135),d=n(34613),p=n(75317);const __=c.__,m=e=>{let{onClick:t,type:n}=e;const{tracks:i}=(0,a.z$)(),c=(0,s.useCallback)((e=>{i.recordEvent("jetpack_ai_get_feedback_upgrade_click"),t?.(e)}),[t,i]),l=(0,s.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)}),u=(0,s.createInterpolateElement)(__("You have reached the limit of 20 free requests. <button>Upgrade to continue generating feedback.</button>","jetpack"),{button:(0,r.createElement)(o.Button,{variant:"link",onClick:c})});return(0,r.createElement)("div",null,"vip"===n?l:u)};function h(){const{requireUpgrade:e,upgradeType:t}=(0,u.ZP)(),{autosaveAndRedirect:n,isRedirecting:s}=(0,l.Z)(),c=__("AI Assistant","jetpack");return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(d.Z,null,(0,r.createElement)(o.PanelBody,{title:c,initialOpen:!1},(0,r.createElement)(o.PanelRow,null,(0,r.createElement)(p.Z,{busy:s,disabled:e})),e&&(0,r.createElement)(o.PanelRow,null,(0,r.createElement)(m,{onClick:n,type:t})))),(0,r.createElement)(i.PluginPrePublishPanel,{title:c,icon:(0,r.createElement)(a.Pm,null),initialOpen:!1},(0,r.createElement)(p.Z,{busy:s,disabled:e}),e&&(0,r.createElement)(m,{onClick:n,type:t})))}},75317:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(51806),a=n(36222),o=n(13419),i=n(4981),s=n(55609),c=n(9818),l=n(69307),u=n(65736),d=n(39517),p=n(92213);const __=u.__,m=new p.Z,h=()=>{const e=(0,c.useSelect)((e=>e("core/block-editor").getBlocks()),[]);return e?.length?m.turndown((0,i.serialize)(e)):""},g=e=>{let{requestingState:t,onClose:n}=e;return(0,r.createElement)("div",{className:"ai-assistant-post-feedback__modal-header"},(0,r.createElement)("div",{className:"ai-assistant-post-feedback__modal-title-wrapper"},(0,r.createElement)(a.rp,{state:t}),(0,r.createElement)("h1",{className:"ai-assistant-post-feedback__modal-title"},__("AI Assistant","jetpack"))),(0,r.createElement)(s.Button,{icon:d.Z,label:__("Close","jetpack"),onClick:n}))};function f(e){let{disabled:t=!1,busy:n=!1}=e;const[i,u]=(0,l.useState)(!1),[d,p]=(0,l.useState)(null),{tracks:m}=(0,o.z$)(),f=(0,c.useSelect)((e=>e("core/editor").getCurrentPostId()),[]),b=h(),v=()=>{u(!i)},{request:k,requestingState:y}=(0,a.pw)({askQuestionOptions:{postId:f},onSuggestion:e=>{const t=e.split("\n").map(((e,t)=>e?.length?(0,r.createElement)("p",{key:`line-${t}`},e):null));p(t)},onDone:()=>{},onError:()=>{}});return(0,r.createElement)("div",null,i&&(0,r.createElement)(s.Modal,{__experimentalHideHeader:!0},(0,r.createElement)("div",{className:"ai-assistant-post-feedback__modal-content"},(0,r.createElement)(g,{requestingState:y,onClose:v}),(0,r.createElement)("hr",{className:"ai-assistant-post-feedback__modal-divider"}),(0,r.createElement)("div",{className:"ai-assistant-post-feedback__suggestion"},d))),(0,r.createElement)("p",null,__("Check for mistakes and verify the tone of your post before publishing.","jetpack")),(0,r.createElement)(s.Button,{onClick:()=>{k([{role:"jetpack-ai",context:{type:"proofread-plugin",content:b}}]),v(),m.recordEvent("jetpack_ai_get_feedback",{post_id:f})},variant:"secondary",disabled:!b||t,isBusy:n},__("Generate feedback","jetpack")))}},44359:function(e,t,n){"use strict";var r=n(13419),a=n(94746);(0,r.o_)(a.u,a.X)},94746:function(e,t,n){"use strict";n.d(t,{X:function(){return o},u:function(){return a}});var r=n(90607);const a="ai-assistant-plugin",o={render:r.Z}},10350:function(e,t,n){"use strict";n.d(t,{A:function(){return p}});var r=n(51806),a=n(36222),o=n(55609),i=n(65736),s=n(99196),c=n.n(s),l=n(81612),u=n(27298),d=n(93085);const __=i.__;function p(e){let{minWords:t=10,maxWords:n=100,disabled:i,words:s,onWordsNumberChange:p,language:m,onLanguageChange:h,tone:g,onToneChange:f,model:b,onModelChange:v}=e;const[k,y]=c().useState(!1);const w=m?.split(" ")[0],E=l.QA[w]?.label||__("Language","jetpack"),_=u.bu[g]?.label||__("Tone","jetpack");return(0,r.createElement)("div",{className:"jetpack-ai-generate-excerpt-control"},(0,r.createElement)(o.BaseControl,{className:"jetpack-ai-generate-excerpt-control__header",label:__("Settings","jetpack")},(0,r.createElement)(o.Button,{label:__("Advanced AI options","jetpack"),icon:a.u_,onClick:function(){y((e=>!e))},isPressed:k,isSmall:!0})),k&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.xK,{disabled:i,onChange:h,value:m,label:E}),(0,r.createElement)(u.IP,{label:_,value:g,onChange:f}),(0,r.createElement)(d.Z,{model:b,onModelChange:v,disabled:i})),(0,r.createElement)(o.RangeControl,{label:__("Desired length","jetpack"),value:s,onChange:p,min:t,max:n,help:__("Sets the desired length in words for the auto-generated excerpt. The final count may vary due to how AI works.","jetpack"),showTooltip:!1,disabled:i}))}},23134:function(e,t,n){"use strict";var r=n(13419),a=n(9818),o=n(92694),i=n(54765),s=n(72956);const c=window?.Jetpack_Editor_Initial_State.available_blocks["ai-content-lens"];c?.available&&(0,o.addFilter)("blocks.registerBlockType","jetpack/ai-content-lens-features",(function(e,t){const n=window?.Jetpack_Editor_Initial_State?.["ai-assistant"]?.["site-require-upgrade"];return n||"jetpack/ai-assistant"!==t?e:(0,i.J7)()?((0,r.o_)(s.x,s.S),(0,a.dispatch)("core/edit-post")?.removeEditorPanel("post-excerpt"),e):e}))},14237:function(e,t,n){"use strict";n.d(t,{V:function(){return b}});var r=n(51806),a=n(36222),o=n(13419),i=n(55609),s=n(9818),c=n(72067),l=n(12238),u=n(69307),d=n(65736),p=n(35266),m=(n(99196),n(5246)),h=n(78680),g=n(10350);const __=d.__,_n=d._n;function f(){const{excerpt:e,postId:t}=(0,s.useSelect)((e=>{const{getEditedPostAttribute:t,getCurrentPostId:n}=e(l.store);return{excerpt:t("excerpt")??"",postId:n()??0}}),[]),{editPost:n}=(0,s.useDispatch)("core/editor"),[c,h]=(0,u.useState)(50),[f,b]=(0,u.useState)(!1),[v,k]=(0,u.useState)(),[y,w]=(0,u.useState)(),[E,_]=(0,u.useState)(a.bP),{request:C,stopSuggestion:S,suggestion:j,requestingState:x,error:P,reset:N}=(0,a.pw)({});(0,u.useEffect)((()=>()=>{S(),N()}),[S,N]);const L=(0,s.useSelect)((e=>{const t=e(l.store).getEditedPostContent();if(!t)return"";const n=(new window.DOMParser).parseFromString(t,"text/html");return(n.body.textContent||n.body.innerText||"").replace(/\n{2,}/g,"\n").trim()}),[t]),T=j||e,A=(0,p.count)(T,"words"),I=(0,d.sprintf)( // Translators: %1$s is the number of words in the excerpt. _n("%1$s word","%1$s words",A,"jetpack"),A),R="requesting"===x||"suggesting"===x||"done"===x&&!f,M="requesting"===x||"suggesting"===x,Z=M||"done"===x;const B=P?.code===a.$L,D=(0,o.Ug)()||(0,o.Wp)()?__("https://wordpress.com/support/excerpts/","jetpack"):__("https://jetpack.com/support/create-better-post-excerpts-with-ai/","jetpack");return(0,r.createElement)("div",{className:"jetpack-ai-post-excerpt"},(0,r.createElement)(i.TextareaControl,{__nextHasNoMarginBottom:!0,label:__("Write an excerpt (optional)","jetpack"),onChange:e=>n({excerpt:e}),help:A?I:null,value:T,disabled:Z}),(0,r.createElement)(i.ExternalLink,{href:D},__("Learn more about manual excerpts","jetpack")),(0,r.createElement)("div",{className:"jetpack-generated-excerpt__ai-container"},P?.code&&"error_quota_exceeded"!==P.code&&(0,r.createElement)(i.Notice,{status:P.severity,isDismissible:!1,className:"jetpack-ai-assistant__error"},P.message),B&&(0,r.createElement)(m.Z,null),(0,r.createElement)(g.A,{words:c,onWordsNumberChange:e=>{h(e),b(!0)},language:v,onLanguageChange:e=>{k(e),b(!0)},tone:y,onToneChange:e=>{w(e),b(!0)},model:E,onModelChange:e=>{_(e),b(!0)},disabled:M||B}),(0,r.createElement)(i.BaseControl,{help:L?.length?null:__("Add content to generate an excerpt.","jetpack")},(0,r.createElement)("div",{className:"jetpack-generated-excerpt__generate-buttons-container"},(0,r.createElement)(i.Button,{onClick:function(){n({excerpt:e}),N()},variant:"secondary",isDestructive:!0,disabled:"done"!==x||B},__("Discard","jetpack")),(0,r.createElement)(i.Button,{onClick:function(){n({excerpt:j}),N()},variant:"secondary",disabled:"done"!==x||B},__("Accept","jetpack")),(0,r.createElement)(i.Button,{onClick:function(){b(!1),N(),C([{role:"jetpack-ai",context:{type:"ai-content-lens",contentType:"post-excerpt",postId:t,words:c,language:v,tone:y,content:`Post content:\n${L}\n`}}],{feature:"jetpack-ai-content-lens",model:E})},variant:"secondary",isBusy:M,disabled:R||B||!L},__("Generate","jetpack"))))))}const b=()=>(0,r.createElement)(l.PostTypeSupportCheck,{supportKeys:"excerpt"},(0,r.createElement)(c.PluginDocumentSettingPanel,{className:(0,h.L)("ai-content-lens")?"is-beta-extension inset-shadow":"",name:"ai-content-lens-plugin",title:__("Excerpt","jetpack")},(0,r.createElement)(f,null)))},72956:function(e,t,n){"use strict";n.d(t,{S:function(){return o},x:function(){return a}});var r=n(14237);const a="ai-content-lens",o={render:r.V}},45939:function(e,t,n){"use strict";var r=n(13419),a=n(57389);(0,r.o_)(a.u,a.X)},57389:function(e,t,n){"use strict";n.d(t,{X:function(){return f},u:function(){return h}});var r=n(51806),a=n(6895),o=n(13419),i=n(86989),s=n.n(i),c=n(55609),l=n(94333),u=n(9818),d=n(12238),p=n(69307),m=n(65736);const __=m.__,h="launchpad-save-modal",g=["hideFSENextStepsModal"],f={render:function(){const{isSavingSite:e,isSavingPost:t,isCurrentPostPublished:n,postLink:i,postType:m}=(0,u.useSelect)((e=>({isSavingSite:e(d.store).isSavingNonPostEntityChanges(),isSavingPost:e(d.store).isSavingPost(),isCurrentPostPublished:e(d.store).isCurrentPostPublished(),postLink:e(d.store).getPermalink(),postType:e(d.store).getCurrentPostType()}))),h=(0,l.usePrevious)(e),f=(0,l.usePrevious)(t),[b,v]=(0,p.useState)(!1),{launchpadScreenOption:k,hasNeverPublishedPostOption:y,hideFSENextStepsModal:w,siteIntentOption:E}=window?.Jetpack_LaunchpadSaveModal||{},_=!!w,[C,S]=(0,p.useState)(!1),[j,x]=(0,p.useState)(_),[P,N]=(0,p.useState)(_),L=null!==document.getElementById("site-editor"),T=null!==document.querySelector(".block-editor"),A=(0,p.useRef)(_),I=(0,o.lQ)(),R=(0,a.Z)("wpcom-launchpad-setup",{path:E,query:`siteSlug=${I}`}),{tracks:M}=(0,o.z$)(),Z=e=>M.recordEvent(e,{site_intent:E,launchpad_screen:k,dont_show_again:P,editor_type:L?"site":"post"});(0,p.useEffect)((()=>{y&&"write"===E&&T?S(!1):(!0===h&&!1===e||!0===f&&!1===t)&&S(!0)}),[e,y,h,t,f,E,T]),(0,p.useEffect)((()=>{!1===n&&v(!0)}),[n]);const{title:B,body:D,actionButtonHref:F,actionButtonTracksEvent:z,actionButtonText:O}=function(){const e={title:__("Great progress!","jetpack"),body:__("You are one step away from bringing your site to life. Check out the next steps that will help you to launch your site.","jetpack"),actionButtonHref:R,actionButtonTracksEvent:"jetpack_launchpad_save_modal_next_steps",actionButtonText:__("Next Steps","jetpack")};return"newsletter"===E&&("post"===m?(e.title=__("Your first post is published!","jetpack"),e.body=__("Congratulations! You did it. View your post to see how it will look on your site.","jetpack"),e.actionButtonHref=i,e.actionButtonTracksEvent="jetpack_launchpad_save_modal_view_post",e.actionButtonText=__("View Post","jetpack")):e.body=__("You are one step away from bringing your site to life. Check out the next steps that will help you to setup your newsletter.","jetpack")),e}(),U=e=>{x(e),(e=>{if(e&&"object"==typeof e){window.Jetpack_LaunchpadSaveModal||(window.Jetpack_LaunchpadSaveModal={});for(const t of g)e.hasOwnProperty(t)&&(window.Jetpack_LaunchpadSaveModal[t]=e[t])}})({hideFSENextStepsModal:e}),e!==A.current&&(async e=>{s()({path:"/wpcom/v2/launchpad",method:"POST",data:{hide_fse_next_steps_modal:!!e}})})(e)};return(T&&n||L)&&"full"===k&&!j&&C&&(0,r.createElement)(c.Modal,{isDismissible:!0,className:"launchpad__save-modal",onRequestClose:()=>{U(P),b?v(!1):(S(!1),Z("jetpack_launchpad_save_modal_close"))}},(0,r.createElement)("div",{className:"launchpad__save-modal-body"},(0,r.createElement)("div",{className:"launchpad__save-modal-text"},(0,r.createElement)("h1",{className:"launchpad__save-modal-heading"},B),(0,r.createElement)("p",{className:"launchpad__save-modal-message"},D)),(0,r.createElement)("div",{className:"launchpad__save-modal-controls"},(0,r.createElement)(c.CheckboxControl,{label:__("Don't show this again.","jetpack"),checked:P,onChange:()=>N(!P)}),(0,r.createElement)("div",{className:"launchpad__save-modal-buttons"},(0,r.createElement)(c.Button,{variant:"secondary",onClick:()=>{U(P),S(!1),Z("jetpack_launchpad_save_modal_back_to_edit")}},__("Back to Edit","jetpack")),(0,r.createElement)(c.Button,{variant:"primary",href:F,target:"_top",onClick:()=>{U(P),Z(z)}},O)))))}}},22473:function(e,t,n){"use strict";n.d(t,{P:function(){return c}});var r=n(51806),a=n(6895),o=n(13419),i=n(55609),s=n(65736);const __=s.__,c=e=>{let{changeStatus:t,isLoading:n,isModuleActive:s}=e;const{tracks:c}=(0,o.z$)();return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("Activate the Likes feature to allow others to like your posts.","jetpack")),(0,r.createElement)(i.Button,{disabled:s||n,isBusy:n,onClick:()=>(c.recordEvent("jetpack_editor_likes_enable"),t(!0)),variant:"secondary"},n?__("Activating Likes","jetpack"):__("Activate Likes","jetpack",0)),(0,r.createElement)("div",{className:"components-likes-placeholder__learn-more"},(0,r.createElement)(i.ExternalLink,{href:(0,a.Z)("jetpack-support-likes")},__("Learn more about Jetpack Likes.","jetpack"))))}},67708:function(e,t,n){"use strict";n.d(t,{q:function(){return s}});var r=n(51806),a=n(88275),o=n(22636),i=n(55609);const s=()=>(0,r.createElement)(a.ZP,null,(0,r.createElement)(i.Placeholder,null,(0,r.createElement)(i.Flex,{gap:2,direction:"column",style:{flexBasis:"100%",padding:"0 1em"}},(0,r.createElement)(i.FlexItem,null,(0,r.createElement)(o.Z,{width:"100%",height:30})),(0,r.createElement)(i.FlexItem,null,(0,r.createElement)(o.Z,{width:"100%",height:90})))))},66852:function(e,t,n){"use strict";var r=n(13419),a=n(12885);(0,r.o_)(a.u,a.X)},12885:function(e,t,n){"use strict";n.d(t,{X:function(){return o},u:function(){return a}});var r=n(77944);const a="likes",o={render:r.Z}},77944:function(e,t,n){"use strict";var r=n(51806),a=n(13419),o=n(55609),i=n(94333),s=n(9818),c=n(12238),l=n(65736),u=n(8264),d=n(22473),p=n(67708);const __=l.__,m=(0,s.withSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor");return{areLikesEnabled:t("jetpack_likes_enabled")}})),h=(0,s.withDispatch)((e=>{const{editPost:t}=e("core/editor");return{editPost:t}}));t.Z=(0,i.compose)([m,h])((e=>{let{areLikesEnabled:t,editPost:n}=e;const{isLoadingModules:i,isChangingStatus:s,isModuleActive:l,changeStatus:m}=(0,a.el)("likes");return l?(0,r.createElement)(c.PostTypeSupportCheck,{supportKeys:"jetpack-post-likes"},(0,r.createElement)(u.Z,null,(0,r.createElement)(o.ToggleControl,{label:__("Show likes","jetpack"),checked:t,onChange:e=>{n({jetpack_likes_enabled:e})}}))):(0,r.createElement)(c.PostTypeSupportCheck,{supportKeys:"jetpack-post-likes"},(0,r.createElement)(u.Z,null,i?(0,r.createElement)(p.q,null):(0,r.createElement)(d.P,{changeStatus:m,isModuleActive:l,isLoading:s})))}))},96564:function(e,t,n){"use strict";var r=n(13419),a=n(29719);(0,r.o_)(a.u,a.X)},29719:function(e,t,n){"use strict";n.d(t,{X:function(){return m},u:function(){return p}});var r=n(51806),a=n(6895),o=n(13419),i=n(55609),s=n(9818),c=n(72067),l=n(12238),u=n(65736),d=n(64967);const __=u.__,p="payments",m={render:()=>{const{tracks:e}=(0,o.z$)(),t=(0,a.Z)("wpcom-payments-donations");return"page"!==(0,s.useSelect)((e=>e(l.store).getCurrentPostType()),[])?null:(0,r.createElement)(c.PluginPostPublishPanel,{className:"jetpack-payments-post-publish-panel",title:__("Start accepting payments","jetpack"),initialOpen:!0,icon:d.Z},(0,r.createElement)("p",null,__("Insert the Payment Button or the Donations Form — no plugin required.","jetpack")),(0,r.createElement)("p",null,(0,r.createElement)(i.ExternalLink,{href:t,onClick:()=>{e.recordEvent("jetpack_editor_payments_post_publish_click")}},__("Learn more about these blocks","jetpack"))))}}},69683:function(e,t,n){"use strict";n.d(t,{D:function(){return m}});var r=n(51806),a=n(49777),o=n(55609),i=n(9818),s=n(12238),c=n(69307),l=n(65736),u=n(81427),d=n(41141);const __=l.__;function p(){const e=(0,c.useRef)(),[t,n]=(0,c.useState)();(0,c.useEffect)((()=>{if(!e?.current)return;const t=e.current.querySelector("svg");if(!t)return;const r=(new XMLSerializer).serializeToString(t);n(`data:image/svg+xml;base64,${window.btoa(r)}`)}),[e]);const o=(0,i.useSelect)((e=>e(s.store).getPermalink()),[]),{dataUrl:l}=(0,d.Z)({generateDataUrl:!0}),p=l||t;return(0,r.createElement)("div",{ref:e},(0,r.createElement)(a.Z,{value:o,size:300,imageSettings:p&&{src:p,width:64,height:64},renderAs:"canvas",level:"H"}),(0,r.createElement)(u.IM,{className:"qr-post-jetpack-logo",size:48,border:2}))}function m(){const e=(0,c.useRef)(),[t,n]=(0,c.useState)(!1);return(0,r.createElement)("div",{className:"qr-post-button"},(0,r.createElement)(o.Button,{variant:"secondary",onClick:()=>n((e=>!e))},__("Get QR code","jetpack")),t&&(0,r.createElement)(o.Modal,{title:__("QR Post code","jetpack"),onRequestClose:()=>n(!1),className:"qr-post-modal"},(0,r.createElement)("div",{className:"qr-post-modal__qr-code",ref:e},(0,r.createElement)(p,null))))}},71664:function(e,t,n){"use strict";var r=n(13419),a=n(30730);(0,r.o_)(a.u,a.X)},41141:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(37798),a=n(9818),o=n(69307),i=n(92694);function s(){let{generateDataUrl:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[t,n]=(0,o.useState)(),{id:s,mediaItemData:c}=(0,a.useSelect)((e=>{const{canUser:t,getEntityRecord:n,getEditedEntityRecord:a}=e(r.store),o=a("root","site"),i=n("root","__unstableBase"),s=o?.site_logo,c=i?.site_logo,l=t("update","settings")?s:c,u=l&&e(r.store).getMedia(l,{context:"view"});return{id:l,mediaItemData:u&&{mediaId:u.id,url:u.source_url,alt:u.alt_text}}}),[]);if(!s||!c?.url)return{};if(!e)return{id:s,...c};const l=new Image,u=(0,i.applyFilters)("media.crossOrigin",void 0,c.url);return"string"==typeof u&&(l.crossOrigin=u),l.onload=function(){const e=document.createElement("canvas"),t=e.getContext("2d");e.height=this.naturalHeight,e.width=this.naturalWidth,t.fillStyle="white",t.lineJoin="round",t.fillRect(0,0,e.width,e.height);const r=.08*e.width;t.drawImage(this,r,r,e.width-2*r,e.height-2*r);try{n(e.toDataURL("image/png"))}catch(e){console.warn("Error generating QR code extensions post-publish-qr-post-panel: ",e),console.warn("In case it's a cross-origin issue, take a look at https://developer.wordpress.org/block-editor/reference-guides/filters/editor-filters/#media-crossorigin"),n(null)}},l.src=c.url,{id:s,...c,dataUrl:t}}},30730:function(e,t,n){"use strict";n.d(t,{X:function(){return g},u:function(){return h}});var r=n(82674),a=n.n(r),o=n(51806),i=n(13419),s=n(55609),c=n(9818),l=n(72067),u=n(12238),d=n(65736),p=n(34613),m=n(69683);const __=d.__,h="post-publish-qr-post-panel",g={render:function(){const e={name:"post-publish-qr-post-panel",title:__("QR Code","jetpack"),className:"post-publish-qr-post-panel",initialOpen:!1},t=(0,c.useSelect)((e=>e(u.store).isCurrentPostPublished()),[]);function n(){return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(s.PanelRow,null,(0,o.createElement)("p",null,__("Take advantage of the QR code to open the post from different devices.","jetpack"))),(0,o.createElement)(m.D,null))}return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(l.PluginPostPublishPanel,a()({},e,{icon:(0,o.createElement)(i.Pm,null)}),(0,o.createElement)(n,null)),t&&(0,o.createElement)(p.Z,null,(0,o.createElement)(s.PanelBody,e,(0,o.createElement)(n,null))))}}},2811:function(e,t,n){"use strict";n.d(t,{e:function(){return l}});var r=n(51806),a=n(6895),o=n(13419),i=n(55609),s=n(69307),c=n(65736);const __=c.__,l=e=>{let{changeStatus:t,isLoading:n,isModuleActive:c}=e;const{tracks:l}=(0,o.z$)(),[u,d]=(0,s.useState)(!1),p=(0,s.useCallback)((()=>{u||(d(!0),l.recordEvent("jetpack_editor_publicize_placeholder_view"))}),[u,l]);return(0,r.createElement)(i.PanelBody,{className:"jetpack-publicize__placeholder",title:__("Share this post","jetpack"),initialOpen:!1,onToggle:p},(0,r.createElement)("p",null,__("Activate the Jetpack Social feature to connect your website to the social media networks you use.","jetpack")),(0,r.createElement)(i.Button,{disabled:c||n,isBusy:n,onClick:()=>(l.recordEvent("jetpack_editor_publicize_enable"),t(!0)),variant:"secondary"},n?__("Activating Jetpack Social","jetpack"):__("Activate Jetpack Social","jetpack",0)),(0,r.createElement)("div",{className:"components-placeholder__learn-more"},(0,r.createElement)(i.ExternalLink,{href:(0,a.Z)("jetpack-support-publicize")},__("Learn more about Jetpack Social.","jetpack"))))}},81142:function(e,t,n){"use strict";var r=n(51806),a=n(88275),o=n(22636),i=n(55609);t.Z=function(){return(0,r.createElement)(a.ZP,null,(0,r.createElement)(i.Placeholder,null,(0,r.createElement)(i.Flex,{gap:2,direction:"column",style:{flexBasis:"100%",padding:"0 1em"}},(0,r.createElement)(i.FlexItem,null,(0,r.createElement)(o.Z,{width:"100%",height:30})),(0,r.createElement)(i.FlexItem,null,(0,r.createElement)(o.Z,{width:"100%",height:90})),(0,r.createElement)(i.FlexItem,null,(0,r.createElement)(o.Z,{width:"100%",height:30})))))}},18374:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(51806),a=n(81050),o=n(13419),i=n(55609),s=n(9818),c=n(12238),l=n(65736),u=n(15381),d=n(65235),p=n.n(d),m=n(78798);const __=l.__;function h(){const{isRePublicizeUpgradableViaUpsell:e,isRePublicizeFeatureAvailable:t,isPublicizeEnabled:n}=(0,a.Nh)(),d=(0,o.Rl)("republicize"),[h,g,f,b]=(0,m.Z)(d),{hasConnections:v,hasEnabledConnections:k}=(0,a.oL)(),y=n&&!e,w=(0,s.useSelect)((e=>e(c.store).isCurrentPostPublished()),[]);if(!w||w&&t)return(0,r.createElement)("div",{className:"jetpack-publicize__upsell"},function(e,t,n,r){const a=__("Start sharing your posts by connecting your social media accounts.","jetpack"),o=__("This post will be shared on all your enabled social media accounts the moment you publish the post.","jetpack");return n?e&&t&&!r?__("Enable a connection to share this post by clicking on the share post button.","jetpack"):t&&r?t&&r&&!e?o:__("Share this post on all your enabled social media accounts by clicking on the share post button.","jetpack"):__("Use this tool to share your post on all your social media accounts.","jetpack"):a}(w,y,v,k));const E=b?.product_name||__("paid","jetpack"),_=!(0,o.Ug)()&&!(0,o.Wp)(),C=_?__("Re-sharing your content","jetpack"):__("Share Your Content Again","jetpack",0),S=_?"https://jetpack.com/support/jetpack-social/#re-sharing-your-content":"https://wordpress.com/support/jetpack-social/#share-your-content-again",j=__("Upgrade now","jetpack");return t||e?(0,r.createElement)("div",{className:"jetpack-publicize__upsell"},(0,r.createElement)("div",{className:"jetpack-publicize__upsell-description"},(0,l.sprintf)(/* translators: placeholder is the product name of the plan. */ __("To re-share a post, you need to upgrade to the %s plan","jetpack"),E)),(0,r.createElement)(i.Button,{href:f?null:h,onClick:g,target:"_top",icon:u.Z,className:p()("jetpack-publicize__upsell-button is-primary",{"jetpack-upgrade-plan__hidden":!h}),isBusy:f},f?__("Redirecting…","jetpack"):j)):(0,r.createElement)("div",{className:"jetpack-publicize__upsell"},(0,r.createElement)("strong",null,C),(0,r.createElement)("br",null),(0,l.sprintf)(/* translators: placeholder is the product name of the plan. */ __("This feature is for sites with a %s plan.","jetpack"),E),(0,r.createElement)("br",null),(0,r.createElement)(i.ExternalLink,{href:S},__("More information.","jetpack")))}},55802:function(e,t,n){"use strict";var r=n(13419),a=n(71259);(0,r.o_)(a.u,a.X)},71259:function(e,t,n){"use strict";n.d(t,{X:function(){return h},u:function(){return m}});var r=n(51806),a=n(81050),o=n(13419),i=n(72067),s=n(12238),c=n(65736),l=n(34613),u=n(2811),d=n(81142),p=n(18374);const __=c.__,m="publicize",h={render:()=>{const{hasEnabledConnections:e}=(0,a.oL)(),{isSocialImageGeneratorAvailable:t}=(0,a.Nh)(),{isLoadingModules:n,isChangingStatus:c,isModuleActive:h,changeStatus:g}=(0,o.el)(m);return n?(0,r.createElement)(s.PostTypeSupportCheck,{supportKeys:"publicize"},(0,r.createElement)(l.Z,null,(0,r.createElement)(d.Z,null))):h?(0,r.createElement)(s.PostTypeSupportCheck,{supportKeys:"publicize"},(0,r.createElement)(a.iS,null),(0,r.createElement)(l.Z,null,(0,r.createElement)(a.$S,{enableTweetStorm:!0},(0,r.createElement)(p.Z,null)),t&&(0,r.createElement)(a.i$,null)),(0,r.createElement)(i.PluginPrePublishPanel,{initialOpen:e,id:"publicize-title",title:(0,r.createElement)("span",{id:"publicize-defaults",key:"publicize-title-span"},__("Share this post","jetpack")),icon:(0,r.createElement)(o.Pm,null)},(0,r.createElement)(a.$S,{prePublish:!0,enableTweetStorm:!0},(0,r.createElement)(p.Z,null))),t&&(0,r.createElement)(i.PluginPrePublishPanel,{initialOpen:!0,title:__("Social Image Generator","jetpack"),icon:(0,r.createElement)(o.Pm,null)},(0,r.createElement)(a.i$,{prePublish:!0})),(0,r.createElement)(a.pz,null),(0,r.createElement)(a.$R,null)):(0,r.createElement)(s.PostTypeSupportCheck,{supportKeys:"publicize"},(0,r.createElement)(l.Z,null,(0,r.createElement)(u.e,{changeStatus:g,isModuleActive:h,isLoading:c})))}}},68607:function(e,t,n){"use strict";n.d(t,{C:function(){return c}});var r=n(51806),a=n(6895),o=n(13419),i=n(55609),s=n(65736);const __=s.__,c=e=>{let{changeStatus:t,isLoading:n,isModuleActive:s}=e;const{tracks:c}=(0,o.z$)();return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("Activate the SEO feature and start optimizing your posts for search engines.","jetpack")),(0,r.createElement)(i.Button,{disabled:s||n,isBusy:n,onClick:()=>(c.recordEvent("jetpack_editor_seo_enable"),t(!0)),variant:"secondary"},n?__("Activating Jetpack SEO","jetpack"):__("Activate Jetpack SEO","jetpack",0)),(0,r.createElement)("div",{className:"components-seo-placeholder__learn-more"},(0,r.createElement)(i.ExternalLink,{href:(0,a.Z)("jetpack-support-seo-tools")},__("Learn more about Jetpack SEO.","jetpack"))))}},26779:function(e,t,n){"use strict";n.d(t,{f:function(){return s}});var r=n(51806),a=n(88275),o=n(22636),i=n(55609);const s=()=>(0,r.createElement)(a.ZP,null,(0,r.createElement)(i.Placeholder,null,(0,r.createElement)(i.Flex,{gap:2,direction:"column",style:{flexBasis:"100%",padding:"0 1em"}},(0,r.createElement)(i.FlexItem,null,(0,r.createElement)(o.Z,{width:"100%",height:30})),(0,r.createElement)(i.FlexItem,null,(0,r.createElement)(o.Z,{width:"100%",height:90})),(0,r.createElement)(i.FlexItem,null,(0,r.createElement)(o.Z,{width:"100%",height:30})))))},71181:function(e,t,n){"use strict";n.d(t,{J:function(){return c}});var r=n(82674),a=n.n(r),o=n(51806),i=n(55609),s=n(65736);n(99196);const __=s.__,_n=s._n,c=e=>{let{suggestedLimit:t,value:n,label:r,...c}=e;const l=!t||n.length<=t?(0,s.sprintf)(/* translators: Placeholder is a number of characters in a sentence. */ _n("%d character","%d characters",n.length,"jetpack"),n.length):(0,s.sprintf)(/* translators: Placeholder is a number of characters in a sentence. */ __("It's recommended to use less than %d characters in this field.","jetpack"),t);return(0,o.createElement)("div",{className:"jetpack-seo-message-box"},(0,o.createElement)(i.TextareaControl,a()({label:r,help:l,value:n},c)))}},83811:function(e,t,n){"use strict";var r=n(51806),a=n(69307),o=n(65736),i=n(71181),s=n(12017);const __=o.__;class c extends a.Component{onMessageChange=e=>{this.props.updateMetaValue(e)};render(){const{metaValue:e}=this.props;return(0,r.createElement)(i.J,{value:e,onChange:this.onMessageChange,label:__("SEO Description","jetpack"),placeholder:__("Write a description…","jetpack"),suggestedLimit:156,rows:4})}}t.Z=(0,s.M)("advanced_seo_description")(c)},48111:function(e,t,n){"use strict";var r=n(13419),a=n(67500);(0,r.o_)(a.u,a.X)},67500:function(e,t,n){"use strict";n.d(t,{X:function(){return k},u:function(){return b}});var r=n(82674),a=n.n(r),o=n(51806),i=n(13419),s=n(55609),c=n(72067),l=n(69307),u=n(65736),d=n(34613),p=n(68607),m=n(26779),h=n(83811),g=n(13344),f=n(18543);const __=u.__,b="seo",v=()=>{const{isLoadingModules:e,isChangingStatus:t,isModuleActive:n,changeStatus:r}=(0,i.el)("seo-tools"),u={title:__("SEO","jetpack")},b={icon:(0,o.createElement)(i.Pm,null),title:__("SEO","jetpack")};return n?(0,o.createElement)(l.Fragment,null,(0,o.createElement)(d.Z,null,(0,o.createElement)(s.PanelBody,a()({className:"jetpack-seo-panel"},u),(0,o.createElement)(s.PanelRow,null,(0,o.createElement)(f.Z,null)),(0,o.createElement)(s.PanelRow,null,(0,o.createElement)(h.Z,null)),(0,o.createElement)(s.PanelRow,null,(0,o.createElement)(g.Z,null)))),(0,o.createElement)(c.PluginPrePublishPanel,b,(0,o.createElement)(l.Fragment,null,(0,o.createElement)(s.PanelRow,null,(0,o.createElement)(f.Z,null)),(0,o.createElement)(s.PanelRow,null,(0,o.createElement)(h.Z,null)),(0,o.createElement)(s.PanelRow,null,(0,o.createElement)(g.Z,null))))):(0,o.createElement)(l.Fragment,null,(0,o.createElement)(d.Z,null,(0,o.createElement)(s.PanelBody,a()({className:"jetpack-seo-panel"},u,{initialOpen:!1}),e?(0,o.createElement)(m.f,null):(0,o.createElement)(p.C,{changeStatus:r,isModuleActive:n,isLoading:t}))))},k={render:()=>(0,o.createElement)(v,null)}},13344:function(e,t,n){"use strict";var r=n(51806),a=n(55609),o=n(65736),i=(n(99196),n(12017));const __=o.__;t.Z=(0,i.M)("jetpack_seo_noindex")((e=>{let{metaValue:t,updateMetaValue:n}=e;return(0,r.createElement)(a.ToggleControl,{label:__("Hide page from search engines","jetpack"),help:__("If selected, a 'noindex' tag will help instruct search engines to not include this page in search results. This page will also be removed from the Jetpack sitemap.","jetpack"),checked:!!t,onChange:e=>{n(e)}})}))},18543:function(e,t,n){"use strict";var r=n(51806),a=n(69307),o=n(65736),i=(n(99196),n(71181)),s=n(12017);const __=o.__;class c extends a.Component{onTitleChange=e=>{this.props.updateMetaValue(e)};render(){const{metaValue:e}=this.props;return(0,r.createElement)(i.J,{value:e,onChange:this.onTitleChange,label:__("SEO Title","jetpack"),placeholder:__("Write a title…","jetpack"),suggestedLimit:70,rows:2})}}t.Z=(0,s.M)("jetpack_seo_html_title")(c)},12017:function(e,t,n){"use strict";n.d(t,{M:function(){return i}});var r=n(94333),a=n(9818),o=n(92819);const i=e=>(0,r.compose)([(0,a.withSelect)((t=>({metaValue:(0,o.get)(t("core/editor").getEditedPostAttribute("meta"),[e],"")}))),(0,a.withDispatch)((t=>({updateMetaValue(n){var r;"boolean"!=typeof(r=n)&&("string"!=typeof r||""!==r&&0===r.trim().length)||t("core/editor").editPost({meta:{[e]:n}})}})))])},33726:function(e,t,n){"use strict";n.d(t,{$:function(){return c}});var r=n(51806),a=n(6895),o=n(13419),i=n(55609),s=n(65736);const __=s.__,c=e=>{let{changeStatus:t,isLoading:n,isModuleActive:s}=e;const{tracks:c}=(0,o.z$)();return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("Activate the Sharing feature to allow others to share your posts.","jetpack")),(0,r.createElement)(i.Button,{disabled:s||n,isBusy:n,onClick:()=>(c.recordEvent("jetpack_editor_sharing_enable"),t(!0)),variant:"secondary"},n?__("Activating Sharing","jetpack"):__("Activate Sharing","jetpack",0)),(0,r.createElement)("div",{className:"components-sharing-placeholder__learn-more"},(0,r.createElement)(i.ExternalLink,{href:(0,a.Z)("jetpack-support-sharing")},__("Learn more about Jetpack Sharing.","jetpack"))))}},14166:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(51806),a=n(13419),o=n(55609),i=n(9818),s=n(12238),c=n(65736),l=n(8264),u=n(33726),d=n(40399);const __=c.__;function p(e){let{checked:t,onChange:n}=e;return(0,r.createElement)(o.ToggleControl,{label:__("Show sharing buttons","jetpack"),checked:t,onChange:e=>{n({jetpack_sharing_enabled:e})}})}function m(){const{isLoadingModules:e,isChangingStatus:t,isModuleActive:n,changeStatus:o}=(0,a.el)("sharedaddy"),c=(0,i.useSelect)((e=>e(s.store).getEditedPostAttribute("jetpack_sharing_enabled")),[]),{editPost:m}=(0,i.useDispatch)(s.store);return n?(0,r.createElement)(s.PostTypeSupportCheck,{supportKeys:"jetpack-sharing-buttons"},(0,r.createElement)(l.Z,null,(0,r.createElement)(p,{checked:c,onChange:m}))):(0,r.createElement)(s.PostTypeSupportCheck,{supportKeys:"jetpack-sharing-buttons"},(0,r.createElement)(l.Z,null,e?(0,r.createElement)(d.Z,null):(0,r.createElement)(u.$,{changeStatus:o,isModuleActive:n,isLoading:t})))}},40399:function(e,t,n){"use strict";var r=n(51806),a=n(88275),o=n(22636),i=n(55609);t.Z=function(){return(0,r.createElement)(a.ZP,null,(0,r.createElement)(i.Placeholder,null,(0,r.createElement)(i.Flex,{gap:2,direction:"column",style:{flexBasis:"100%",padding:"0 1em"}},(0,r.createElement)(i.FlexItem,null,(0,r.createElement)(o.Z,{width:"100%",height:30})),(0,r.createElement)(i.FlexItem,null,(0,r.createElement)(o.Z,{width:"100%",height:90})),(0,r.createElement)(i.FlexItem,null,(0,r.createElement)(o.Z,{width:"100%",height:30})))))}},27425:function(e,t,n){"use strict";var r=n(13419),a=n(3378);(0,r.o_)(a.u,a.X)},3378:function(e,t,n){"use strict";n.d(t,{X:function(){return o},u:function(){return a}});var r=n(14166);const a="sharing",o={render:r.Z}},21964:function(e,t,n){"use strict";var r=n(13419),a=n(9460);(0,r.o_)(a.u,a.X)},9460:function(e,t,n){"use strict";n.d(t,{X:function(){return s},u:function(){return i}});var r=n(9818),a=n(69307),o=n(65736);const __=o.__,i="site-editor-snackbars",s={render:()=>{const[e,t]=(0,a.useState)(),{createInfoNotice:n,removeNotice:i}=(0,r.useDispatch)("core/notices"),{entityTitle:s,entityType:c,isSiteEditor:l}=(0,r.useSelect)((e=>{if(!e("core/edit-site"))return{isSiteEditor:!1};const{getEditedPostType:t,getEditedPostId:n}=e("core/edit-site"),{getEntityRecord:r,getPostType:a}=e("core"),o=r("postType",t(),n()),i=a(t());return{isSiteEditor:!0,entityTitle:o?.title?.raw??"",entityType:i?.labels?.singular_name??""}}));return(0,a.useEffect)((()=>{if(!l)return;const e=(0,r.subscribe)((()=>{setTimeout((()=>{const n=new URLSearchParams(window.location.search);if(!n.has("canvas"))return e();t(n.get("canvas"))}),0)}),"core/edit-site");return()=>e()}),[l]),(0,a.useEffect)((()=>{const t="jetpack/site-editor/snackbars";if(i(t),!l||"edit"!==e||!s||!c)return;const r=(0,o.sprintf)(/* translators: %1$s and %2$s are the title and type, respectively, of the entity being edited (e.g. "Editing the Index template", or "Editing the Header template part").*/ __("Editing the %1$s %2$s","jetpack"),s,c.toLowerCase());n(r,{id:t,type:"snackbar"})}),[l,e,n,i,s,c]),null}}},10601:function(e,t,n){"use strict";var r=n(13419),a=n(81836);(0,r.o_)(a.u2,a.Xd)},81836:function(e,t,n){"use strict";n.d(t,{Xd:function(){return p},u2:function(){return d}});var r=n(51806),a=n(81050),o=n(13419),i=n(55609),s=n(72067),c=n(69307),l=n(65736),u=n(34613);const __=l.__,d="social-previews",p={render:()=>(0,r.createElement)(m,null)},m=function(){const[e,t]=(0,c.useState)(!1);return(0,r.createElement)(r.Fragment,null,e&&(0,r.createElement)(a.pD,{onClose:()=>t(!1)}),(0,r.createElement)(u.Z,null,(0,r.createElement)(i.PanelBody,{title:__("Social Previews","jetpack"),initialOpen:!1},(0,r.createElement)(a.mJ,{openModal:()=>t(!0)}))),(0,r.createElement)(s.PluginPrePublishPanel,{title:__("Social Previews","jetpack"),icon:(0,r.createElement)(o.Pm,null),initialOpen:!1},(0,r.createElement)(a.mJ,{openModal:()=>t(!0)})))}},43718:function(e,t,n){"use strict";n.d(t,{K:function(){return a}});var r=n(55609);const a=(0,r.withFallbackStyles)(((e,t)=>{const{textColor:n,backgroundColor:r}=t,a=r&&r.color,o=n&&n.color;return{fallbackBackgroundColor:a||!e?void 0:getComputedStyle(e).backgroundColor,fallbackTextColor:o||!e?void 0:getComputedStyle(e).color}}))},85921:function(e,t,n){"use strict";var r=n(51806),a=n(13419),o=n(4981),i=n(65736),s=n(81427);const __=i.__;(0,a.Wp)()||(0,a.Ug)()||(0,o.registerBlockCollection)("jetpack",{title:"Jetpack",icon:(0,r.createElement)(s.IM,null)}),(0,o.setCategories)([...(0,o.getCategories)().filter((e=>{let{slug:t}=e;return"contact-form"!==t})),{slug:"contact-form",title:__("Forms","jetpack"),icon:(0,r.createElement)(s.IM,null)}]),(0,o.setCategories)([...(0,o.getCategories)().filter((e=>{let{slug:t}=e;return"earn"!==t})),{slug:"earn",title:__("Earn","jetpack"),icon:(0,r.createElement)(s.IM,null)}]),(0,o.setCategories)([...(0,o.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 a(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=[];if(!t||!e&&!e.length||!function(e){const{currentWindow:t}=r(e);return"editor-canvas"===t.name&&t.self!==t.top}(t))return a;const{currentDoc:o,currentWindow:i}=r(t);if(!function(e){try{return!!e?.parent?.location.href}catch(e){return!1}}(i))return a;const s=i?.parent?.document;return o&&s?(a=e.filter((e=>{const t=s.querySelector(e),r=!!o.querySelector(e);return!(!t||r)&&(o.head.appendChild(t.cloneNode()),n&&t.remove(),!0)})),a):a}function o(e,t,n){const a=`${window.Jetpack_Block_Assets_Base_Url.url}editor-assets`,{currentDoc:o}=r(n),i=o.getElementsByTagName("head")[0];e.forEach((e=>{const[n,r]=e.file.split("/").pop().split(".");if("css"===r){if(o.getElementById(e.id))return;const t=o.createElement("link");t.id=e.id,t.rel="stylesheet",t.href=`${a}/${n}-${e.version}.${r}`,i.appendChild(t)}if("js"===r){const s=t[e.id]?t[e.id]:null;if(o.getElementById(e.id))return s();const c=o.createElement("script");c.id=e.id,c.type="text/javascript",c.src=`${a}/${n}-${e.version}.${r}`,c.onload=s,i.appendChild(c)}}))}function i(e,t){return new Promise((n=>{const r=()=>{e[t]?n(e[t]):e.requestAnimationFrame(r)};r()}))}n.d(t,{DT:function(){return a},Dz:function(){return i},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),a=n(13419);const o=r.O["Jetpack Green 40"];function i(){return(0,a.Ug)()||(0,a.Wp)()?null:o}},81518:function(e,t,n){"use strict";n.d(t,{t:function(){return i}});var r=n(29512),a=n.n(r),o=n(92819);function i(e,t){const n=function(e,t){for(const n of new(a())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),r=(0,o.find)(e,{name:t});if(r)return r}return(0,o.find)(e,"isDefault")}(e,t);return n?n.name:null}},26788:function(e,t,n){"use strict";var r=n(51806),a=n(55609),o=n(69307),i=n(65736);const __=i.__,_x=i._x;class s extends o.Component{state={hasCopied:!1};onCopy=()=>this.setState({hasCopied:!0});onFinishCopy=()=>this.setState({hasCopied:!1});onFocus=e=>e.target.select();render(){const{link:e}=this.props,{hasCopied:t}=this.state;return e?(0,r.createElement)("div",{className:"jetpack-clipboard-input"},(0,r.createElement)(a.TextControl,{readOnly:!0,onFocus:this.onFocus,value:e}),(0,r.createElement)(a.ClipboardButton,{variant:"secondary",onCopy:this.onCopy,onFinishCopy:this.onFinishCopy,text:e},t?__("Copied!","jetpack"):_x("Copy","verb","jetpack"))):null}}t.Z=s},24381:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});const r=/^#?[A-Fa-f0-9]{6}$/;function a(e){return r.test(e)}},93085:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(51806),a=n(36222),o=n(55609),i=n(65736);const __=i.__;function s(e){let{model:t,onModelChange:n,disabled:i}=e;const s=t===a.bP?__("The most capable model, great for tasks that require creativity and advanced reasoning","jetpack"):__("The fastest model, great for most everyday tasks.","jetpack");return o.__experimentalToggleGroupControlOption&&o.__experimentalToggleGroupControl?(0,r.createElement)(o.__experimentalToggleGroupControl,{isBlock:!0,label:__("Model","jetpack"),onChange:n,value:t,disabled:i,help:s},(0,r.createElement)(o.__experimentalToggleGroupControlOption,{label:__("GTP-3.5 Turbo","jetpack"),value:a.BU}),(0,r.createElement)(o.__experimentalToggleGroupControlOption,{label:__("GPT-4","jetpack"),value:a.bP})):(0,r.createElement)(o.RadioControl,{label:__("Model","jetpack"),className:"ai-model-selector-control__radio-control",selected:t,options:[{label:__("GPT-3.5 Turbo","jetpack"),value:a.BU},{label:__("GPT-4","jetpack"),value:a.bP}],onChange:n,help:s})}},72752:function(e,t,n){"use strict";var r=n(51806),a=n(25158),o=n(69307),i=n(65736),s=n(92819),c=n(97115);const __=i.__,l="undefined"!=typeof _wpmejsSettings?_wpmejsSettings:{};function u(e,t,n){const r=document.createElement("div");r.className=e;const a=document.createElement("button");return a.innerText=t,a.addEventListener("click",n),a.setAttribute("aria-label",t),a.setAttribute("title",t),r.appendChild(a),r}t.Z=function(e){let{trackSource:t,onPlay:n,onPause:i,onError:d,onTimeChange:p,onSkipForward:m,onJumpBack:h,currentTime:g,playStatus:f=c._5,onMetadataLoaded:b,loadWhenReady:v=!1,preload:k="metadata"}=e;const y=(0,o.useRef)(),w=()=>{y.current.play().catch((()=>{}))},E=()=>{y.current.pause(),(0,a.speak)(__("Paused","jetpack"),"assertive")};return(0,o.useEffect)((()=>{MediaElementPlayer.prototype._setResponsiveMode||(MediaElementPlayer.prototype._setResponsiveMode=MediaElementPlayer.prototype.setResponsiveMode,MediaElementPlayer.prototype.setResponsiveMode=function(){const e=this;e.getElement(e.container).parentNode&&e._setResponsiveMode()})}),[]),(0,o.useEffect)((()=>{const e=y.current;e.preload=k;const t=new MediaElementPlayer(e,{...l,success:()=>v&&e?.load()});if(h||m){const e=`${t.options.classPrefix}button ${t.options.classPrefix}jump-button`;if(h){const n=`${e} ${t.options.classPrefix}jump-backward-button`;t.addControlElement(u(n,__("Jump Back","jetpack"),h),"jumpBackwardButton")}if(m){const n=`${e} ${t.options.classPrefix}skip-forward-button`;t.addControlElement(u(n,__("Skip Forward","jetpack"),m),"skipForwardButton")}}return n&&e.addEventListener("play",n),i&&e.addEventListener("pause",i),d&&e.addEventListener("error",d),b&&e.addEventListener("loadedmetadata",b),()=>{t.remove(),n&&e.removeEventListener("play",n),i&&e.removeEventListener("pause",i),d&&e.removeEventListener("error",d),b&&e.removeEventListener("loadedmetadata",b)}}),[n,i,d,h,m,b,v,k]),(0,o.useEffect)((()=>{const[e,t]=!1===y.current?.paused?[c.Wp,E]:[c._5,w],n=(0,s.debounce)(t,100);return c.Vy!==f&&e!==f&&n(),()=>{n.cancel()}}),[y,f,t]),(0,o.useEffect)((()=>{if(!p)return;const e=y.current,t=(0,s.throttle)((e=>p(e)),1e3,{leading:!0,trailing:!1}),n=e=>t(e.target.currentTime);return p&&e?.addEventListener("timeupdate",n),()=>{t.cancel(),e?.removeEventListener("timeupdate",n)}}),[y,p]),(0,o.useEffect)((()=>{const e=y.current;g&&e&&Math.abs(Math.floor(g-e.currentTime))>1&&(e.currentTime=g)}),[y,g]),(0,r.createElement)("div",{className:"jetpack-audio-player"},(0,r.createElement)("audio",{src:t,ref:y}))}},44738:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(51806),a=n(52175),o=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:d,readMoreUrl:p,subtitle:m,title:h}=e;const{autosaveAndRedirect:g}=(0,l.Z)(s);return(0,r.createElement)(a.Warning,{actions:s&&[(0,r.createElement)(o.Button,{href:s,onClick:e=>{e.preventDefault(),d(t),g(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,p&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("br",null),(0,r.createElement)(o.ExternalLink,{href:p},__("Learn more about the block and fees","jetpack")))))))}},57538:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(51806),a=n(52175),o=n(4981),i=n(55609),s=n(9818),c=n(69307),l=n(65736),u=n(39630),d=n(65235),p=n.n(d),m=n(92819);const __=l.__,h=e=>{let{attributes:t,styleOption:n,viewportWidth:i,blockName:s}=e;const c=(0,o.getBlockType)(s);return(0,r.createElement)(a.BlockPreview,{viewportWidth:i,blocks:(l=c.example?(0,o.getBlockFromExample)(s,{attributes:{...c.example.attributes,style:n.value},innerBlocks:c.example.innerBlocks}):(0,o.createBlock)(s,t),{...l,attributes:{...l.attributes,__isBlockPreview:!0}})});var l},g=c.memo?(0,c.memo)(h,((e,t)=>(0,m.isEqual)(e,t))):h;function f(e){let t,{attributes:n,clientId:o,styleOptions:c,onSelectStyle:l,activeStyle:d,viewportWidth:m,title:h}=e;return s.useSelect&&(t=(0,s.useSelect)((e=>{const{getBlock:t}=e("core/block-editor");return t(o)}))),(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.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===d,onClick:()=>l({style:e.value})}))),popoverProps:{className:"jetpack-block-styles-selector-toolbar"}})),(0,r.createElement)(a.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 a={...n,style:e.value};return(0,r.createElement)("div",{key:e.value,className:p()("block-editor-block-styles__item",{"is-active":e.value===d}),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)(g,{blockName:t.name,styleOption:e,attributes:a,viewportWidth:m})),(0,r.createElement)("div",{className:"block-editor-block-styles__item-label"},e.label))}))))))}},34904:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(51806);function a(e){let{children:t,spanClass:n}=e;return(0,r.createElement)("div",{className:"jetpack-inspector-notice"},(0,r.createElement)("span",{className:n},t))}},20769:function(e,t,n){"use strict";var r=n(82674),a=n.n(r),o=n(51806),i=n(55609);const s=i.NumberControl||i.__experimentalNumberControl||function(e){return(0,o.createElement)(i.TextControl,a()({type:"number",inputMode:"numeric"},e))};t.Z=s},17746:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),a=n(55609),o=n(9818),i=n(65736),s=n(88966),c=n(46867);const __=i.__;function l(e){let{showDialog:t,closeDialog:n}=e;const{hasNewsletterPlans:i}=(0,o.useSelect)((e=>{const{getNewsletterProducts:t,getConnectUrl:n}=e("jetpack/membership-products");return{stripeConnectUrl:n(),hasNewsletterPlans:0!==t()?.length}})),l=(0,s.nZ)(i),{autosaveAndRedirect:u}=(0,c.Z)(l);return(0,r.createElement)(a.__experimentalConfirmDialog,{onRequestClose:n,cancelButtonText:__("Not now","jetpack"),confirmButtonText:__("Get started","jetpack"),isOpen:t,onCancel:n,onConfirm:u,style:{maxWidth:400}},(0,r.createElement)("h2",null,__("Set up payments","jetpack")),(0,r.createElement)("p",null,__("To start collecting payments, you’ll just need to:","jetpack")),(0,r.createElement)("ol",null,(0,r.createElement)("li",null,__("Create a payment offer and choose a price for access to paid content","jetpack")),(0,r.createElement)("li",null,__("Set up or connect your Stripe account","jetpack"))))}},14436:function(e,t,n){"use strict";n.d(t,{Bn:function(){return o},DM:function(){return i},DW:function(){return a},mj:function(){return r}});const r=0,a=1,o="payment-plan",i="subscription"},68880:function(e,t,n){"use strict";n.d(t,{Q:function(){return i},a:function(){return o}});var r=n(69307),a=n(14436);const o=(0,r.createContext)({blockName:void 0,clientId:void 0,products:[],productType:a.Bn,selectedProductId:0,setSelectedProductId:()=>{}}),i=()=>(0,r.useContext)(o)},60386:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(51806),a=n(52175),o=n(9818),i=n(7652),s=n(2327),c=n(14436),l=n(68880),u=n(51310),d=n(21200),p=n(16842);function m(e){let{blockName:t,clientId:n,productType:m=c.Bn,selectedProductId:h=0,setSelectedProductId:g=(()=>{})}=e;const f=(0,o.useSelect)((e=>e(i.h).getProducts(m,h,g)),[]),{connectUrl:b,isApiConnected:v,isSelectedProductInvalid:k}=(0,o.useSelect)((e=>{const{getConnectUrl:t,isApiStateConnected:n,isInvalidProduct:r}=e(i.h);return{connectUrl:t(),isApiConnected:n(),isSelectedProductInvalid:r(h)}}));if(!v)return null;const y={blockName:t,clientId:n,products:f,productType:m,selectedProductId:h,setSelectedProductId:g};return(0,r.createElement)(l.a.Provider,{value:y},!v&&!!b&&(0,r.createElement)(a.BlockControls,{__experimentalShareWithChildBlocks:!0,group:"block"},(0,r.createElement)(s.Z,{blockName:t,connectUrl:b})),v&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(u.Z,null),(0,r.createElement)(p.Z,null)),v&&k&&(0,r.createElement)(d.Z,null))}},51310:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var r=n(51806),a=n(52175),o=n(55609),i=n(9818),s=n(69307),c=n(65736),l=n(1078),u=n(99196),d=n(7652),p=n(79162),m=n(14436),h=n(68880),g=n(51585);const __=c.__,f="USD",b=5,v="1 month",k=!1;function y(){const{productType:e,setSelectedProductId:t}=(0,h.Q)(),n=(0,i.useSelect)((e=>e(d.h).getSiteSlug())),{saveProduct:c}=(0,i.useDispatch)(d.h),[y,w]=(0,s.useState)(m.mj),[E,_]=(0,s.useState)((0,g.l)("default new product title",e)),[C,S]=(0,s.useState)(!1),[j,x]=(0,s.useState)(f),[P,N]=(0,s.useState)(b),[L,T]=(0,s.useState)(v),[A,I]=(0,s.useState)(k),R=[{label:__("Month","jetpack"),value:"1 month"},{label:__("Year","jetpack"),value:"1 year"},{label:__("One-Time Payment","jetpack"),value:"one-time"}];return(0,u.useEffect)((()=>{C||(_((0,g._)(L)),S(!1))}),[L,C]),(0,r.createElement)(a.InspectorControls,null,n&&(0,r.createElement)(o.PanelBody,null,(0,r.createElement)(o.ExternalLink,{href:`https://wordpress.com/earn/payments/${n}`},(0,g.l)("manage your products",e))),(0,r.createElement)(o.PanelBody,{title:(0,g.l)("add a new product",e),initialOpen:!0,className:"product-management-control-inspector__add-plan"},y===m.DW&&(0,r.createElement)(o.Placeholder,{icon:l.Z,label:(0,g.l)("saving product",e)},(0,r.createElement)(o.Spinner,null)),y===m.mj&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelRow,{className:"product-management-control-inspector__product-title"},(0,r.createElement)(o.TextControl,{id:"new-product-title",label:__("Name","jetpack"),onChange:e=>{_(e),S(!0)},value:E})),(0,r.createElement)(o.PanelRow,{className:"product-management-control-inspector__product-price"},(0,r.createElement)(o.SelectControl,{label:__("Currency","jetpack"),onChange:e=>x(e),options:p.Xy,value:j}),(0,r.createElement)(o.TextControl,{label:__("Price","jetpack"),onChange:e=>N(e),type:"number",value:P})),(0,r.createElement)(o.PanelRow,{className:"plan-interval"},(0,r.createElement)(o.SelectControl,{label:__("Interval","jetpack"),onChange:e=>T(e),options:R,value:L})),(0,r.createElement)(o.PanelRow,{className:"custom-amount"},(0,r.createElement)(o.ToggleControl,{label:__("Enable customers to pick their own amount","jetpack"),onChange:e=>I(e),checked:A})),(0,r.createElement)(o.PanelRow,null,(0,r.createElement)(o.ExternalLink,{href:"https://wordpress.com/support/wordpress-editor/blocks/payments/#related-fees"},__("Read more about Payments and related fees.","jetpack"))),(0,r.createElement)(o.PanelRow,null,(0,r.createElement)(o.Button,{onClick:n=>{n.preventDefault(),w(m.DW),c({title:E,currency:j,price:P,interval:L,type:null,buyer_can_change_amount:A,is_editable:!0},e,t,(e=>{w(m.mj),e&&(N(b),S(!1),T(v),I(k),x(f))}))},variant:"secondary"},(0,g.l)("add product",e))))))}},21200:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),a=n(52175),o=n(61074),i=n(30797),s=n(68880),c=n(51585);function l(){const{productType:e}=(0,s.Q)();return(0,r.createElement)(a.Warning,{className:"product-management-control-nudge"},(0,r.createElement)("span",{className:"product-management-control-nudge__info"},(0,r.createElement)(o.Z,{icon:i.Z}),(0,r.createElement)("span",{className:"product-management-control-nudge__text-container"},(0,r.createElement)("span",{className:"product-management-control-nudge__title"},(0,c.l)("invalid product configured for this block",e)),(0,r.createElement)("span",{className:"product-management-control-nudge__message"},(0,c.l)("the button will be hidden from your visitors until you select a valid product",e)))))}},16842:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var r=n(51806),a=n(25607),o=n(52175),i=n(55609),s=n(9818),c=n(65736),l=n(79201),u=n(48381),d=n(30797),p=n(7652),m=n(99307),h=n(68880),g=n(60510),f=n(51585);const __=c.__;function b(e){const{currency:t,interval:n,price:r}=e,o=(0,a.ZP)(parseFloat(r),t);switch(n){case"1 month":return(0,c.sprintf)( // translators: %s: amount __("%s / month","jetpack"),o);case"1 year":return(0,c.sprintf)( // translators: %s: amount __("%s / year","jetpack"),o);case"one-time":return o}return(0,c.sprintf)( // translators: %s: amount, plan interval __("%1$s / %2$s","jetpack"),o,n)}function v(e){let{onClose:t,product:n}=e;const{selectedProductId:a,setSelectedProductId:o}=(0,h.Q)(),{id:s,title:c}=n,u=a&&a===s,d=u?l.Z:void 0,p=n?" "+b(n):null;return(0,r.createElement)(i.MenuItem,{icon:d,onClick:e=>{e.preventDefault(),o(s),t()},selected:u,value:s},c," : ",p)}function k(e){let{onClose:t}=e;const{clientId:n,productType:a}=(0,h.Q)(),o=(0,s.useSelect)((e=>e(p.h).getSiteSlug())),c=(0,g.Z)(n);if(m.BM===(0,m.j3)())return(0,r.createElement)(i.MenuItem,null,o&&(0,r.createElement)(i.ExternalLink,{href:`https://wordpress.com/earn/payments-plans/${o}#add-new-payment-plan`},(0,f.l)("add a new product",a)));return(0,r.createElement)(i.MenuItem,{onClick:e=>{e.preventDefault(),c(),setTimeout((()=>{const e=document.getElementById("new-product-title");null!==e&&e.focus()}),100),t()}},(0,f.l)("add a new product",a))}function y(){const{products:e,productType:t,selectedProductId:n}=(0,h.Q)(),{selectedProduct:a}=(0,s.useSelect)((e=>{const{getProduct:t}=e(p.h);return{selectedProduct:t(n)}}));let c=null,l=u.Z;return a&&(c=b(a)),n&&!a&&(c=(0,f.l)("product not found",t),l=d.Z),(0,r.createElement)(o.BlockControls,{__experimentalShareWithChildBlocks:!0,group:"block"},(0,r.createElement)(i.ToolbarDropdownMenu,{className:"product-management-control-toolbar__dropdown-button",icon:l,label:(0,f.l)("select a product",t),text:c},(t=>{let{onClose:n}=t;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.MenuGroup,null,e.map((e=>(0,r.createElement)(v,{key:e.id,onClose:n,product:e})))),(0,r.createElement)(i.MenuGroup,null,(0,r.createElement)(k,{onClose:n})))})))}},60510:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(52175),a=n(9818),o=n(72067),i=n(99307);function s(e){const t=(0,i.j3)(),{selectBlock:n}=(0,a.useDispatch)(r.store),{enableComplementaryArea:s}=(0,a.useDispatch)("core/interface"),{closePublishSidebar:c}=(0,a.useDispatch)(o.store);return()=>{switch(e&&n(e),t){case i.fH:return s("core/edit-site","edit-site/block-inspector");case i.CG:return s("core/edit-widgets","edit-widgets/block-inspector");default:c(),s("core/edit-post","edit-post/block")}}}},51585:function(e,t,n){"use strict";n.d(t,{_:function(){return c},l:function(){return i}});var r=n(65736),a=n(14436);const __=r.__,o={"add a new product":{[a.Bn]:__("Add a new payment plan","jetpack"),[a.DM]:__("Add a new subscription","jetpack")},"product not found":{[a.Bn]:__("Payment plan not found","jetpack"),[a.DM]:__("Subscription not found","jetpack")},"select a product":{[a.Bn]:__("Select a payment plan","jetpack"),[a.DM]:__("Select a subscription","jetpack")},"default new product title":{[a.Bn]:__("Monthly Subscription","jetpack"),[a.DM]:__("Monthly Subscription","jetpack")},"manage your products":{[a.Bn]:__("Manage your payment plans.","jetpack"),[a.DM]:__("Manage your subscriptions.","jetpack")},"saving product":{[a.Bn]:__("Saving payment plan…","jetpack"),[a.DM]:__("Saving subscription…","jetpack")},"add product":{[a.Bn]:__("Add payment plan","jetpack"),[a.DM]:__("Add subscription","jetpack")},"product requires a name":{[a.Bn]:__("Payment plan requires a name","jetpack"),[a.DM]:__("Subscription requires a name","jetpack")},"product requires a valid price":{[a.Bn]:__("Payment plan requires a valid price","jetpack"),[a.DM]:__("Subscription requires a valid price","jetpack")},"successfully created product":{[a.Bn]:__("Successfully created payment plan","jetpack"),[a.DM]:__("Successfully created subscription","jetpack")},"there was an error when adding the product":{[a.Bn]:__("There was an error when adding the payment plan.","jetpack"),[a.DM]:__("There was an error when adding the subscription.","jetpack")},"invalid product configured for this block":{[a.Bn]:__("Invalid payment plan configured for this block.","jetpack"),[a.DM]:__("Invalid subscription configured for this block.","jetpack")},"the button will be hidden from your visitors until you select a valid product":{[a.Bn]:__("The button will be hidden from your visitors until you select a valid payment plan.","jetpack"),[a.DM]:__("The subscribe button will be hidden from your visitors until you select a valid subscription.","jetpack")},"mark this product as a donation":{[a.Bn]:__("Mark this payment plan as a donation","jetpack"),[a.DM]:__("Mark this subscription as a donation","jetpack")}};function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.Bn;return o?.[e]?.[t]||null}const s={"1 month":__("Monthly Subscription","jetpack"),"1 year":__("Yearly Subscription","jetpack"),"one-time":__("Subscription","jetpack")};function c(e){return s[[e]]??""}},2327:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),a=n(13419),o=n(55609),i=n(65736),s=n(81427),c=n(46867);const __=i.__;function l(e){let{blockName:t,connectUrl:n}=e;const{autosaveAndRedirect:i}=(0,c.Z)(n),{tracks:l}=(0,a.z$)();return(0,r.createElement)(o.ToolbarButton,{className:"connect-stripe components-tab-button",icon:s.Pw,onClick:e=>{e.preventDefault(),l.recordEvent("jetpack_editor_block_stripe_connect_click",{block:t}),i(e)}},__("Connect Stripe","jetpack"))}},16367:function(e,t,n){"use strict";n.d(t,{U:function(){return d}});var r=n(51806),a=n(6895),o=n(13419),i=n(9818),s=n(65736),c=n(89933),l=n(7652),u=n(44738);const __=s.__,d=e=>{let{blockName:t}=e;const n=(0,i.select)(l.h).getConnectUrl(),{tracks:s}=(0,o.z$)(),d=(0,o.Ug)()||(0,o.Wp)();if(!n)return null;let p;switch(t){case"payment-buttons":p=d?(0,a.Z)("wpcom-support-wordpress-editor-blocks-payments-block"):(0,a.Z)("jetpack-support-jetpack-blocks-payments-block");break;case"donations":p=d?(0,a.Z)("wpcom-support-wordpress-editor-blocks-donations-block"):(0,a.Z)("jetpack-support-jetpack-blocks-donations-block");break;case"premium-content":p=d?(0,a.Z)("wpcom-support-wordpress-editor-blocks-premium-content-block"):(0,a.Z)("jetpack-support-jetpack-blocks-premium-content-block");break;default:p=d?(0,a.Z)("wpcom-support-payments-button-block"):(0,a.Z)("jetpack-support-jetpack-blocks-payments-block")}return(0,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:p,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),a=n(55609),o=n(65736),i=n(65235),s=n.n(i);const __=o.__,c=e=>{let{align:t,className:n,title:o,description:i,buttonText:c=null,visible:l=!0,context:u,checkoutUrl:d=null,goToCheckoutPage:p=null,isRedirecting:m=!1,showButton:h=!0}=e;const g=s()(n,"jetpack-upgrade-plan-banner",{"wp-block":"editor-canvas"===u,"block-editor-block-list__block":"editor-canvas"===u,"jetpack-upgrade-plan__hidden":!l}),f=__("Redirecting…","jetpack");return(0,r.createElement)("div",{className:g,"data-align":t},(0,r.createElement)("div",{className:"jetpack-upgrade-plan-banner__wrapper"},o&&(0,r.createElement)("strong",{className:s()("banner-title",{[`${n}__title`]:n})},o),i&&(0,r.createElement)("span",{className:`${n}__description banner-description`},i),h&&(0,r.createElement)(a.Button,{href:m?null:d,onClick:p,target:"_top",className:s()("is-primary",{"jetpack-upgrade-plan__hidden":!d}),isBusy:m},m?f:c)))}},87553:function(e,t,n){"use strict";var r=n(9818);const a={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:a,selectors:{getPlan:(e,t)=>e.find((e=>e.product_slug===t))},controls:{FETCH_FROM_API(e){let{url:t}=e;return fetch(t).then((e=>e.json()))}},resolvers:{*getPlan(){const e=yield a.fetchFromAPI("https://public-api.wordpress.com/rest/v1.5/plans");return a.setPlans(e)}}})},79162:function(e,t,n){"use strict";n.d(t,{Vm:function(){return l},Xy:function(){return o},ck:function(){return a},hj:function(){return i},li:function(){return s},vs:function(){return c}});var r=n(43317);const a={USD:.5,AUD:.5,BRL:.5,CAD:.5,CHF:.5,DKK:2.5,EUR:.5,GBP:.3,HKD:4,INR:.5,JPY:50,MXN:10,NOK:3,NZD:.5,PLN:2,SEK:3,SGD:.5},o=Object.keys(a).map((e=>{const{symbol:t}=(0,r.X)(e);var n;return{value:e,label:t===e?e:`${e} ${n=t,String(n||"").replace(/\.+$/,"")}`}}));function i(e){return a[e]}function s(e){const t=i(e);return[10*t,30*t,200*t]}function c(e,t){return!isNaN(t)&&t>=i(e)}function l(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),a=n(55609);t.Z=e=>{let{label:t,onClick:n}=e;return(0,r.createElement)(a.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,a]=e;return!(!r(t)||n.get(t)!==a)&&(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 d},QU:function(){return y},Qh:function(){return f},Tu:function(){return u},Wm:function(){return g},h9:function(){return m},iT:function(){return i},l5:function(){return E},oI:function(){return l},tY:function(){return p},wk:function(){return c},yD:function(){return k},zs:function(){return w}});var r=n(69771),a=n(65736),o=n(92819);const __=a.__,i="google_photos",s="openverse",c="pexels",l="recent",u="/",d=[{value:l,label:__("Photos","jetpack")},{value:u,label:__("Albums","jetpack")}],p=[{value:"", /* translators: category of images */ label:__("All categories","jetpack")},{value:"animals", /* translators: category of images */ label:__("Animals","jetpack")},{value:"arts", /* translators: category of images */ label:__("Arts","jetpack")},{value:"birthdays", /* translators: category of images */ label:__("Birthdays","jetpack")},{value:"cityscapes", /* translators: category of images */ label:__("Cityscapes","jetpack")},{value:"crafts", /* translators: category of images */ label:__("Crafts","jetpack")},{value:"fashion", /* translators: category of images */ label:__("Fashion","jetpack")},{value:"food", /* translators: category of images */ label:__("Food","jetpack")},{value:"flowers", /* translators: category of images */ label:__("Flowers","jetpack")},{value:"gardens", /* translators: category of images */ label:__("Gardens","jetpack")},{value:"holidays", /* translators: category of images */ label:__("Holidays","jetpack")},{value:"houses", /* translators: category of images */ label:__("Houses","jetpack")},{value:"landmarks", /* translators: category of images */ label:__("Landmarks","jetpack")},{value:"landscapes", /* translators: category of images */ label:__("Landscapes","jetpack")},{value:"night", /* translators: category of images */ label:__("Night","jetpack")},{value:"people", /* translators: category of images */ label:__("People","jetpack")},{value:"pets", /* translators: category of images */ label:__("Pets","jetpack")},{value:"selfies", /* translators: category of images */ label:__("Selfies","jetpack")},{value:"sport", /* translators: category of images */ label:__("Sport","jetpack")},{value:"travel", /* translators: category of images */ label:__("Travel","jetpack")},{value:"weddings", /* translators: category of images */ label:__("Weddings","jetpack")}],m=["mountain","ocean","river","clouds","pattern","abstract","sky"],h="ANY",g="LAST_7_DAYS",f="LAST_30_DAYS",b="LAST_6_MONTHS",v="LAST_12_MONTHS",k="CUSTOM",y=[{value:h,label:__("Any time","jetpack")},{value:g,label:__("Last 7 days","jetpack")},{value:f,label:__("Last 30 days","jetpack")},{value:b,label:__("Last 6 months","jetpack")},{value:v,label:__("Last 12 months","jetpack")},{value:k,label:__("Specific Month/Year","jetpack")}],w=(new Date).getFullYear(),E=[{label:__("Any Month","jetpack"),value:-1},...(0,o.map)((0,o.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),a=n.n(r),o=n(51806),i=n(13419),s=n(52175),c=n(92694),l=n(10892),u=n(1285),d=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,o.createElement)(l.Z,a()({},e,{mediaProps:r})))}return(0,o.createElement)(n,a()({},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,...d.Dv.map((e=>e.keyword))]}}))}},11583:function(e,t,n){"use strict";var r=n(51806),a=n(55609),o=n(69307),i=n(65736),s=n(39630),c=n(65235),l=n.n(c),u=n(92819),d=n(46406),p=n(9827);const __=i.__,m=(0,o.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:g,setPath:f,nextPage:b,onCopy:v}=e,[k,y]=(0,o.useState)([]),[w,E]=(0,o.useState)(-1),_=(0,o.useRef)(-1),C=(0,o.useRef)(null),S=(0,o.useCallback)((e=>{let t=[e];"folder"===e.type?f(e.ID):g?(t=k.slice(0,9).concat(e),k.find((t=>e.ID===t.ID))&&(t=k.filter((t=>t.ID!==e.ID)))):1===k.length&&e.ID===k[0].ID&&(t=[]),y(t)}),[k,g,f]),j=(0,o.useCallback)((()=>{v(k)}),[k,v]),x=t.filter((e=>"folder"!==e.type)).length>0,P=l()({"jetpack-external-media-browser__media":!0,"jetpack-external-media-browser__media__loading":i}),N=l()({"jetpack-external-media-browser":!0,[h]:!0}),L=()=>{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)(L,400);(0,o.useEffect)((()=>(window.addEventListener("resize",T),()=>{window.removeEventListener("resize",T)})),[]),(0,o.useEffect)((()=>{t.length&&-1===_.current&&L()}),[t]);const A=(e,t)=>{let{item:n}=t;S(n)},I=(e,n)=>{let{item:r,index:a}=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,a):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:N},(0,r.createElement)("ul",{ref:C,className:P},t.map(((e,t)=>(0,r.createElement)(d.Z,{item:e,index:t,key:e.ID,onClick:A,onKeyDown:I,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)(p.Z,null),c&&!i&&(0,r.createElement)(a.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)(a.Button,{variant:"primary",isBusy:n,disabled:e,onClick:j},t))}),null))}},46406:function(e,t,n){"use strict";var r=n(51806),a=n(55609),o=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:d,title:p,type:m,children:h=0}=t,{medium:g=null,fmt_hd:f=null,thumbnail:b=null}=l,v=p||u||d,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,o.useRef)(null);return(0,o.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)(a.Spinner,null),(0,r.createElement)("div",{className:"jetpack-external-media-browser__media__copying_indicator__label"},__("Inserting Image…","jetpack"))),(0,r.createElement)("img",{src:g||f||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"},d),(0,r.createElement)("div",{className:"jetpack-external-media-browser__media__count"},h)))}},9827:function(e,t,n){"use strict";var r=n(51806),a=n(69307);t.Z=(0,a.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),a=n.n(r),o=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),d=(0,s.ZR)(n);return(0,o.createElement)("div",{onClick:e=>e.stopPropagation()},(0,o.createElement)(c.Z,a()({},e,{setSelectedSource:r,isReplace:u(t),isFeatured:l(t),hasImage:t.value>0})),d&&(0,o.createElement)(d,a()({},t,{onClose:e=>{e&&(e.stopPropagation(),e.target.closest(".jetpack-external-media-header__dropdown"))||(r(null),t.onClose?.())}})))}},95833:function(e,t,n){"use strict";var r=n(51806),a=n(55609),o=n(65736),i=n(61074),s=n(20843),c=n(13959);const __=o.__;t.Z=function(e){const{mediaProps:t,open:n,setSelectedSource:o,isFeatured:l,isReplace:u,hasImage:d}=e,p=t.render;let m="tertiary";if(u)return(0,r.createElement)(c.Z,{originalButton:p,open:n,setSource:o});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)(a.Dropdown,{placement:"bottom-start",className:"jetpack-external-media-button-menu__dropdown",contentClassName:"jetpack-external-media-button-menu__options",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;const o=p&&p({open:n});return l&&d||o&&"string"!=typeof o.props.children?o:(0,r.createElement)(a.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)(a.NavigableMenu,{"aria-label":h},(0,r.createElement)(a.MenuGroup,null,(0,r.createElement)(a.MenuItem,{icon:s.Z,onClick:()=>{t(),n()}},__("Media Library","jetpack")),(0,r.createElement)(c.Z,{open:n,setSource:o,onClick:t})))}}))}},13959:function(e,t,n){"use strict";var r=n(51806),a=n(55609),o=n(69307),i=n(38457);t.Z=function(e){let{originalButton:t=null,onClick:n=(()=>{}),open:s,setSource:c}=e;return(0,r.createElement)(o.Fragment,null,t&&t({open:s}),i.Dv.map((e=>{let{icon:t,id:o,label:i}=e;return(0,r.createElement)(a.MenuItem,{icon:t,key:o,onClick:()=>{n(),c(o)}},i)})))}},1285:function(e,t,n){"use strict";n.d(t,{HO:function(){return P},on:function(){return x},uk:function(){return N}});var r=n(6975),a=n(86989),o=n.n(a),i=n(9818),s=n(65736),c=n(96483),l=n(67194),u=n(94841),d=n(29755);const __=s.__,p=__("Pexels Free Photos","jetpack"),m=__("Search Pexels Free Photos","jetpack"),h={per_page:10,search:"mountain"},g=__("Google Photos","jetpack"),f=__("Search Google Photos","jetpack"),b={per_page:25,search:""};var v=function(e){return e.List="/wpcom/v2/external-media/list/",e}(v||{}),k=function(e){return e.Image="image",e.Video="video",e}(k||{});const y=(e,t)=>(0,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,a,i)=>({name:e,labels:{name:t,search_items:n},mediaType:"image",fetch:async e=>await o()({path:y(a,{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:a.toString(),results:n.length,search:""===e?.search?i.search:e.search}),n})).catch((()=>[])),getReportUrl:null,isExternalResource:!0}),_=()=>E("google_photos",g,f,d.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",p,m,d.Y.Pexels,h),x=async()=>{const e=await(async e=>o()({path:y(e,h),method:"GET"}).then((e=>e)).catch((()=>!1)))(d.Y.GooglePhotos);(0,l.X)(C).then((()=>{e?S(_):(0,l.X)((()=>{return e=d.Y.GooglePhotos,!!(0,i.select)(u.j).isAuthenticated(e);var e})).then((()=>S(_)))}))},P=()=>{(0,l.X)(C).then((()=>S(j)))},N=(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),a=n(96483);const o={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 o[e]?(0,a.addQueryArgs)(o[e]+t,n):null}},53463:function(e,t,n){"use strict";var r=n(51806),a=n(69307),o=n(65736),i=n(81427);const __=o.__;t.Z=(0,a.memo)((function(){return(0,r.createElement)(a.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),a=n(69307),o=n(65736);const __=o.__;t.Z=(0,a.memo)((function(){return(0,r.createElement)("p",null,__("Awaiting authorization","jetpack"))}))},86167:function(e,t,n){"use strict";var r=n(51806),a=n(55609),o=n(69307),i=n(65736),s=n(20982);const __=i.__;t.Z=(0,o.memo)((function(e){let{path:t,setPath:n}=e;return(0,r.createElement)(o.Fragment,null,(0,r.createElement)(a.Button,{variant:"tertiary",onClick:()=>n(s.Tu)},__("Albums","jetpack")),"→ ",t.name)}))},4819:function(e,t,n){"use strict";var r=n(51806),a=n(55609),o=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)(a.SelectControl,{label:__("Category","jetpack"),value:t,options:l.tY,onChange:n})}function d(e){let{value:t,updateFilter:n}=e;const i=t?.range||l.CY,[s,u]=(0,o.useState)(-1),[d,p]=(0,o.useState)(l.zs);return(0,r.createElement)("div",{className:"jetpack-external-media-date-filter"},(0,r.createElement)(a.SelectControl,{label:__("Filter by time period","jetpack"),value:i,options:l.QU,onChange:e=>n({range:e})}),i===l.yD&&(0,r.createElement)(o.Fragment,null,(0,r.createElement)(a.SelectControl,{label:__("Month","jetpack"),value:s,options:l.l5,onChange:u}),(0,r.createElement)(c.Z,{className:"components-base-control",label:__("Year","jetpack"),value:d,min:1970,onChange:p}),(0,r.createElement)(a.Button,{variant:"secondary",disabled:t?.month===s&&t?.year===d,onClick:()=>{n({range:i,month:s,year:d})}},__("Apply","jetpack"))))}function p(){return(0,r.createElement)("span",null,__("Favorites","jetpack"))}function m(e){let{value:t,updateFilter:n}=e;const o=[{label:__("All","jetpack"),value:""},{label:__("Images","jetpack"),value:"photo"},{label:__("Videos","jetpack"),value:"video"}];return(0,r.createElement)(a.SelectControl,{label:__("Type","jetpack"),value:t,options:o,onChange:n})}function h(e){let{children:t,removeFilter:n,isRemovable:o=!1}=e;return(0,r.createElement)("div",{className:"jetpack-external-media-googlephotos-filter"},t,!!o&&(0,r.createElement)(a.Button,{onClick:n,isSmall:!0},__("Remove Filter","jetpack")))}t.Z=function(e){let{filters:t,setFilters:n,canChangeMedia:a}=e;const o=Object.keys(t).filter((e=>a||"mediaType"!==e)).map((e=>{return(0,r.createElement)(h,{key:e,removeFilter:()=>n((0,s.omit)(t,e))},(a=e,o=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"===a?(0,r.createElement)(u,{value:o,updateFilter:i}):"date"===a?(0,r.createElement)(d,{value:o,updateFilter:i}):"favorite"===a?(0,r.createElement)(p,{value:o}):"mediaType"===a?(0,r.createElement)(m,{value:o,updateFilter:i}):null));var a,o,i}));return 0===o.length?null:o}},58912:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(76292),a=n.n(r),o=n(20982);const i=a()();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 o.Wm:e=a()(i).subtract(7,"days"),t=i;break;case o.Qh:e=a()(i).subtract(30,"days"),t=i;break;case o.Bb:e=a()(i).subtract(6,"months"),t=i;break;case o.En:e=a()(i).subtract(1,"year"),t=i;break;case o.yD:const n=parseInt(s.month),r=parseInt(s.year);isNaN(n)||isNaN(r)||(-1===n?(e=a()([r,0]),t=a()(e).endOf("year")):(e=a()([r,n]),t=a()(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),a=n(55609),o=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,o.useState)(l([])),{isLoading:i,isCopying:s,filters:u,canChangeMedia:d}=e,p=function(e,t){return t?e:e.filter((e=>"mediaType"!==e.value))}(c(u),d);return 0===p.length?null:(0,r.createElement)(o.Fragment,null,(0,r.createElement)(a.SelectControl,{label:__("Filters","jetpack"),value:t,disabled:i||s,options:p,onChange:n}),(0,r.createElement)(a.Button,{disabled:i||s,variant:"secondary",isSmall:!0,onClick:()=>{const r=(a=u,o=t,{...a,[o]:"favorite"===o||""});var a,o;e.setFilters(r),n(l(r))}},__("Add Filter","jetpack")))}},64034:function(e,t,n){"use strict";var r=n(51806),a=n(2772);t.Z=e=>{let{account:t,setAuthenticated:n}=e;const{image:o,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"},o&&(0,r.createElement)("img",{className:"jetpack-external-media-header__account-image",src:o,alt:"",height:"18",width:"18"}),i&&(0,r.createElement)("div",{className:"jetpack-external-media-header__account-name"},i)),(0,r.createElement)(a.Z,{setAuthenticated:n}))}},62494:function(e,t,n){"use strict";var r=n(51806),a=n(39229),o=n(86989),i=n.n(o),s=n(55609),c=n(69307),l=n(65736),u=n(20982),d=n(47285),p=n(53463),m=n(5890);const __=l.__;t.Z=function(e){const{setAuthenticated:t}=e,[n,o]=(0,c.useState)(!1),l=(0,c.useCallback)((()=>{o(!0),i()({path:(0,d.k)("connection",u.iT)}).then((e=>{if(e.error)throw e.message;(0,a.Z)(e.connect_URL,(()=>{o(!1),t(!0)}))})).catch((()=>{o(!1)}))}),[t]);return(0,r.createElement)("div",{className:"jetpack-external-media-auth"},n?(0,r.createElement)(m.Z,null):(0,r.createElement)(p.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),a=n(86989),o=n.n(a),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,a]=(0,s.useState)(!1),c=(0,s.useCallback)((()=>{a(!0),o()({method:"DELETE",path:(0,u.k)("connection",l.iT)}).then((()=>t(!1))).catch((()=>a(!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),a=n(55609),o=n(69307),i=n(65736),s=n(20982),c=n(11583),l=n(47285),u=n(86167),d=n(4819),p=n(58912),m=n(53800),h=n(64034);const __=i.__;t.Z=function(e){const{account:t,allowedTypes:n,copyMedia:i,getMedia:g,isCopying:f,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,P]=(0,o.useState)(S?{mediaType:"photo",date:{range:s.CY}}:{date:{range:s.CY}}),N=(0,o.useRef)(""),L=(0,o.useRef)(""),T=E.ID===s.oI?(0,p.Z)(x):null,A={number:20,path:E.ID};T&&(A.filter=T);const I=(0,l.k)("list",s.iT,A),R=(0,o.useCallback)((function(e){g(I,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}),[g,I]),M=(0,o.useCallback)((e=>{const t=v.find((t=>t.ID===e));L.current=E,y(t||{ID:e})}),[v,y,L,E]),Z=(0,o.useCallback)((e=>{i(e,(0,l.k)("copy",s.iT),s.iT)}),[i]);return(0,o.useEffect)((()=>{N!==I&&(N.current=I,R({},E!==L.current))}),[N,I,R,E]),(0,r.createElement)("div",{className:"jetpack-external-media-wrapper__google"},(0,r.createElement)("div",{className:"jetpack-external-media-header__view"},(0,r.createElement)(a.SelectControl,{className:"jetpack-external-media-header__select",label:__("View","jetpack"),value:E.ID!==s.oI?s.Tu:s.oI,disabled:b||f,options:s.OG,onChange:M}),C&&E.ID===s.oI&&(0,r.createElement)(m.Z,{filters:x,isLoading:b,setFilters:P,canChangeMedia:!S}),(0,r.createElement)("div",{className:"jetpack-external-media-header__filter"},E.ID===s.oI&&(0,r.createElement)(d.Z,{filters:x,isLoading:b,setFilters:P,canChangeMedia:!S}),E.ID!==s.oI&&E.ID!==s.Tu&&(0,r.createElement)(u.Z,{path:E,setPath:M})),(!b||v.length>0)&&(0,r.createElement)(h.Z,{account:t,setAuthenticated:_})),(0,r.createElement)(c.Z,{className:"jetpack-external-media-browser__google",key:I,media:v,isCopying:f,isLoading:b,nextPage:R,onCopy:Z,pageHandle:w,multiple:k,setPath:M}))}},77453:function(e,t,n){"use strict";var r=n(51806),a=n(29755),o=n(97893),i=n(62494),s=n(20107);t.Z=(0,o.Z)(a.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 d}});var r=n(51806),a=n(65736),o=n(81427),i=n(20982),s=n(77453),c=n(41214),l=n(12533);const __=a.__,u=[{id:i.iT,label:__("Google Photos","jetpack"),icon:(0,r.createElement)(o.He,{className:"components-menu-items__item-icon"}),keyword:"google photos"},{id:i.wk,label:__("Pexels Free Photos","jetpack"),icon:(0,r.createElement)(o.yk,{className:"components-menu-items__item-icon"}),keyword:"pexels"},{id:i.Eh,label:__("Openverse","jetpack"),icon:(0,r.createElement)(o.FG,{className:"components-menu-items__item-icon"}),keyword:"openverse"}];function d(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),a=n(55609),o=n(69307),i=n(65736),s=n(92819),c=n(20982),l=n(11583),u=n(29755),d=n(47285),p=n(97893);const __=i.__;t.Z=(0,p.Z)(u.Y.Openverse)((function(e){const{media:t,isCopying:n,isLoading:i,pageHandle:u,multiple:p,copyMedia:m,getMedia:h}=e,[g,f]=(0,o.useState)((0,s.sample)(c.h9)),[b,v]=(0,o.useState)(""),k=(0,o.useCallback)((e=>{m(e,(0,d.k)("copy",c.Eh),c.Eh)}),[m]),y=(0,o.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];g&&h((0,d.k)("list",c.Eh,{number:20,search:g}),t)}),[h,g]),w=(0,o.useRef)(),E=(0,o.useCallback)((e=>{e.preventDefault(),v(g),y(e,!0),w.current=g}),[y,g]);(0,o.useEffect)(y,[]);const _=(0,o.useRef)(null);return(0,o.useEffect)((()=>{if(!_?.current)return;const e=_.current.querySelector("input[type='search']");e&&(e.focus(),e.select())}),[]),(0,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)(a.TextControl,{"aria-label":__("Search","jetpack"),type:"search",value:g,onChange:f,disabled:!!n}),(0,r.createElement)(a.Button,{isPrimary:!0,onClick:E,type:"submit",disabled:!g.length||g===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:p}))}))},12533:function(e,t,n){"use strict";var r=n(51806),a=n(55609),o=n(69307),i=n(65736),s=n(92819),c=n(20982),l=n(11583),u=n(29755),d=n(47285),p=n(97893);const __=i.__;t.Z=(0,p.Z)(u.Y.Pexels)((function(e){const{media:t,isCopying:n,isLoading:i,pageHandle:u,multiple:p,copyMedia:m,getMedia:h}=e,[g,f]=(0,o.useState)((0,s.sample)(c.h9)),[b,v]=(0,o.useState)(""),k=(0,o.useCallback)((e=>{m(e,(0,d.k)("copy",c.wk),c.wk)}),[m]),y=(0,o.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];g&&h((0,d.k)("list",c.wk,{number:20,path:"recent",search:g}),t)}),[h,g]),w=(0,o.useRef)(),E=(0,o.useCallback)((e=>{e.preventDefault(),v(g),y(e,!0),w.current=g}),[y,g]);(0,o.useEffect)(y,[]);const _=(0,o.useRef)(null);return(0,o.useEffect)((()=>{if(!_.current)return;const e=Array.from(_.current.elements).find((e=>"search"===e.type));e&&(e.focus(),e.select())}),[]),(0,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)(a.TextControl,{"aria-label":__("Search","jetpack"),type:"search",value:g,onChange:f,disabled:!!n}),(0,r.createElement)(a.Button,{variant:"primary",onClick:E,type:"submit",disabled:!g.length||g===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:p}))}))},97893:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(51806),a=n(86989),o=n.n(a),i=n(55609),s=n(94333),c=n(9818),l=n(69307),u=n(65736),d=n(39630),p=n(65235),m=n.n(p),h=n(92819),g=n(20982),f=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:g.oI}}}contentRef=e=>{e?(this.contentElement=e,this.modalElement=e.closest(".jetpack-external-media-browser"),this.modalElement&&this.modalElement.addEventListener("keydown",this.stopArrowKeysPropagation)):this.modalElement&&(this.modalElement.removeEventListener("keydown",this.stopArrowKeysPropagation),this.modalElement=null,this.contentElement=null)};stopArrowKeysPropagation=e=>{[d.UP,d.DOWN,d.LEFT,d.RIGHT].includes(e.keyCode)&&!e.target.classList.contains("jetpack-external-media-browser__media__item")&&e.stopPropagation()};setAuthenticated=t=>{this.setState({isAuthenticated:t}),(0,f.uk)(e,t)};mergeMedia(e,t){return(0,h.uniqBy)(e.concat(t),"ID")}getRequestUrl(e){const{nextHandle:t}=this.state;return t?e+"&page_handle="+encodeURIComponent(t):e}getMedia=(()=>{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);o()({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(),o()({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,a=r?e:e[0],o=e.find((e=>e.errors));if(o){const{errors:e}=o,t=Object.keys(e)[0];this.handleApiError({code:t,message:e[t]})}else this.props.onClose(),this.props.onSelect(n?t.concat(e):a)})).catch(this.handleApiError)};onChangePath=(e,t)=>{this.setState({path:e},t)};render(){const{account:e,isAuthenticated:n,isCopying:a,isLoading:o,media:s,nextHandle:c,path:l}=this.state,{allowedTypes:u,multiple:d=!1,noticeUI:p,onClose:h}=this.props,g=a?__("Inserting media","jetpack"):__("Select media","jetpack",0),f=a?__("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":a});return(0,r.createElement)(i.Modal,{onRequestClose:h,title:g,aria:{describedby:b},className:v},(0,r.createElement)("div",{ref:this.contentRef},p,(0,r.createElement)("p",{id:b,className:"jetpack-external-media-browser--visually-hidden"},f),(0,r.createElement)(t,{account:e,getMedia:this.getMedia,copyMedia:this.copyMedia,isCopying:a,isLoading:o,media:s,pageHandle:c,allowedTypes:u,isAuthenticated:n,setAuthenticated:this.setAuthenticated,multiple:d,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),a=n(42232),o=n(57805),i=n(38972);const s="jetpack-media",c={actions:a.Z,reducer:o.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),a=n(2790);t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.F,t=arguments.length>1?arguments[1]:void 0;return t.type===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 a}});var r=n(29755);const a={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),a=n(92819);function o(){return(0,a.get)((0,r.Pb)(),["allowedMimeTypes"],[])}function i(e,t){if(!e||!t)return!1;if(!o())return!1;const n=(r=t)?(0,a.pickBy)(o(),(e=>(0,a.startsWith)(e,`${r}/`))):{};var r;const i=(s=n)?(0,a.flatten)((0,a.map)((0,a.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,a.values)(n).includes(e.type))}},5820:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(4981);function a(){const e=(0,r.getCategories)();for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];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 a}});var r=n(96483);function a(e,t){if(!(0,r.isURL)(t))return null;let n=t;try{const a=(0,r.getQueryArg)(t,"state"),o=JSON.parse(atob(a));if(e)o.from_editor_post_id=e;else{const e=new URLSearchParams(window.location.search);o.from_site_editor_post_id=e.get("postId"),o.from_site_editor_post_type=e.get("postType")}n=(0,r.addQueryArgs)(t,{state:btoa(JSON.stringify(o))})}catch(e){0}return n}},99307:function(e,t,n){"use strict";n.d(t,{BM:function(){return s},CG:function(){return o},fH:function(){return a},j3:function(){return c},yn:function(){return i}});var r=n(9818);const a="site",o="widget",i="post",s="customizer",c=()=>(0,r.select)("core/edit-site")?a:(0,r.select)("core/edit-widgets")?o:(0,r.select)("core/customize-widgets")?s:(0,r.select)("core/edit-navigation")?"navigation":(0,r.select)("core/edit-post")?i:"unknown"},4554:function(e,t,n){"use strict";n.d(t,{S:function(){return a}});var r=n(92819);const a=(e,t)=>(0,r.reduce)(t,((t,n,r)=>{if(void 0===e[r])return t;const{type:a,validator:o,validValues:i,default:s}=e[r];return t[r]="boolean"===a?"false"!==n&&!!n:o?o(n)?n:s:i?i.includes(n)?n:s:n,t}),{})},59809:function(e,t,n){"use strict";var r=n(82674),a=n.n(r),o=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,o.createElement)("div",a()({className:i},r),n&&(0,o.createElement)(c.Z,{size:"24","aria-hidden":"true",role:"img",focusable:"false"}),(0,o.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 p},IM:function(){return f},JO:function(){return g},K9:function(){return y},Pw:function(){return w},Vq:function(){return C},h:function(){return k},ll:function(){return E},o1:function(){return _},yk:function(){return h},yu:function(){return S},zf:function(){return b}});var r=n(82674),a=n.n(r),o=n(51806),i=n(80550),s=n(55609),c=n(65235),l=n.n(c),u=n(70355);const d=i.O["Jetpack Green 40"],p=e=>(0,o.createElement)(s.SVG,a()({height:"24",width:"24",viewBox:"1.2 10.8 169.6 169.6",xmlns:"http://www.w3.org/2000/svg"},e),(0,o.createElement)(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,o.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,o.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,o.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,o.createElement)(s.SVG,a()({style:{fill:"#30272e",background:"#ffe033",padding:"3px",width:"22px",height:"24px"},width:"46",height:"42",viewBox:"0 0 46 42",xmlns:"http://www.w3.org/2000/svg"},e),(0,o.createElement)(s.G,null,(0,o.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,o.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,o.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,o.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,o.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,o.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,o.createElement)(s.SVG,a()({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),(0,o.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,o.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"})),g=()=>{const e="#757575";return(0,o.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,o.createElement)(s.G,{id:"Icon"},(0,o.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,o.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,o.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,o.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,o.createElement)(s.G,{id:"Photos"},(0,o.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,o.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,o.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,o.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,o.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,o.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,o.createElement)(s.G,{id:"Google"},(0,o.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,o.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,o.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,o.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,o.createElement)(s.Rect,{x:"679.2",y:"172.7",class:"st4",fill:e,width:"14.8",height:"99.3"}),(0,o.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"})))},f=e=>{let{size:t=24,border:n=0,className:r,color:a=d}=e;const i=n?-n/t*32:0;return(0,o.createElement)(s.SVG,{className:l()("jetpack-logo",r),width:t,height:t,viewBox:`${i} ${i} ${32-2*i} ${32-2*i}`},(0,o.createElement)(s.Path,{className:"jetpack-logo__icon-circle",fill:a,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,o.createElement)(s.Polygon,{className:"jetpack-logo__icon-triangle",fill:"#fff",points:`15,19 ${7-.5*i},19 15,${3-i}`}),(0,o.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,o.createElement)(s.SVG,{viewBox:"0 0 100 100"},(0,o.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,o.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20.7 17",xmlSpace:"preserve"},(0,o.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,o.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43",xmlSpace:"preserve"},(0,o.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,o.createElement)(s.SVG,{viewBox:"0 0 24 24"},(0,o.createElement)(s.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,o.createElement)(s.G,null,(0,o.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,o.createElement)(s.SVG,{viewBox:"0 0 24 24"},(0,o.createElement)(s.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,o.createElement)(s.G,null,(0,o.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,o.createElement)(s.SVG,{viewBox:"0 0 24 24"},(0,o.createElement)(s.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,o.createElement)(s.G,null,(0,o.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,o.createElement)(s.SVG,{viewBox:"0 0 24 24"},(0,o.createElement)(s.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,o.createElement)(s.G,null,(0,o.createElement)(s.Path,{d:"M11.1114 8H20.0002M11.1113 15H20.0002",stroke:(0,u.m)(),strokeWidth:"1.5"}),(0,o.createElement)(s.Path,{d:"M4 10V6L8 8L4 10Z",fill:(0,u.m)()}),(0,o.createElement)(s.Path,{d:"M4 17V13L8 15L4 17Z",fill:(0,u.m)()}))),(0,u.m)(),(0,o.createElement)(s.SVG,{viewBox:"0 0 24 24"},(0,o.createElement)(s.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,o.createElement)(s.G,null,(0,o.createElement)(s.Path,{d:"M4 12V4L11 8L4 12Z"}),(0,o.createElement)(s.Path,{d:"M4 14.5H20V16H4V14.5Z"}),(0,o.createElement)(s.Path,{d:"M4 18.5H13V20H4V18.5Z"}))),(0,o.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.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,o.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.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,o.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.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,o.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(s.Path,{d:"M0 0h24v24H0z",fill:"none"}),(0,o.createElement)(s.Path,{d:"M7 2v11h3v9l7-12h-4l4-8z",fill:"currentColor"}))),E=(0,o.createElement)(s.SVG,{width:"29",height:"21",viewBox:"0 0 29 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.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"})),_=(0,o.createElement)(s.SVG,{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.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"})),C=((0,o.createElement)(s.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",style:{fill:"none"}},(0,o.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,o.createElement)("line",{x1:"9.75",y1:"9",x2:"9.75",y2:"4",stroke:"currentColor",strokeWidth:"1.5"}),(0,o.createElement)("line",{x1:"14.25",y1:"9",x2:"14.25",y2:"4",stroke:"currentColor",strokeWidth:"1.5"})),(0,o.createElement)(s.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.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,o.createElement)(s.Path,{d:"M5 7L12 13L19 7",stroke:"currentColor",strokeWidth:"1.5"})),(0,o.createElement)(s.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.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,o.createElement)(s.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.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,o.createElement)(s.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.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"}))),S=(0,o.createElement)(s.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(s.G,null,(0,o.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 o}});var r=n(13419),a=n(92819);function o(){return(0,a.get)((0,r.Pb)(),["jetpack","is_active"],!1)}},99621:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(13419),a=n(92819);function o(){return(0,a.get)((0,r.Pb)(),["jetpack","is_offline_mode"],!1)}},8264:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(51806),a=n(55609),o=n(65736),i=n(98817),s=n(34613);const __=o.__,{Fill:c,Slot:l}=(0,a.createSlotFill)("JetpackLikesAndSharingPanel");(0,i.registerPlugin)("jetpack-likes-and-sharing-panel",{render:()=>(0,r.createElement)(l,null,(e=>e.length?(0,r.createElement)(s.Z,null,(0,r.createElement)(a.PanelBody,{title:__("Likes and Sharing","jetpack"),initialOpen:!1},e)):null))})},34613:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(51806),a=n(55609),o=n(9818),i=n(47701),s=n.n(i),c=n(72067),l=n(69307),u=n(98817),d=n(96483),p=n(81427);const{Fill:m,Slot:h}=(0,a.createSlotFill)("JetpackPluginSidebar");s()((function(){"true"===(0,d.getQueryArg)(window.location.search,"jetpackSidebarIsOpen")&&(0,o.dispatch)("core/interface").enableComplementaryArea("core/edit-post","jetpack-sidebar/jetpack")})),(0,u.registerPlugin)("jetpack-sidebar",{render:()=>(0,r.createElement)(h,null,(e=>e.length?(0,r.createElement)(l.Fragment,null,(0,r.createElement)(c.PluginSidebarMoreMenuItem,{target:"jetpack",icon:(0,r.createElement)(p.IM,null)},"Jetpack"),(0,r.createElement)(c.PluginSidebar,{name:"jetpack",title:"Jetpack",icon:(0,r.createElement)(p.IM,null)},e)):null))})},40083:function(e,t,n){"use strict";n.d(t,{So:function(){return i},cP:function(){return o},lx:function(){return a}});var r=n(65736);const __=r.__,a="_jetpack_newsletter_access",o="_jetpack_newsletter_tier_id",i={everybody:{key:"everybody",label:__("Everyone","jetpack"),panelHeading:__("Everyone","jetpack")},subscribers:{key:"subscribers",label:__("Anyone subscribed","jetpack"),panelHeading:__("All subscribers","jetpack")},paid_subscribers:{key:"paid_subscribers",label:__("Paid subscribers only","jetpack"),panelHeading:__("Paid subscribers","jetpack")}}},19617:function(e,t,n){"use strict";n.d(t,{M:function(){return s},_:function(){return i}});var r=n(13419),a=n(37798),o=n(40083);const i=e=>{const[t=[]]=(0,a.useEntityProp)("postType",e,"meta");let n=t[o.lx]??o.So.everybody.key;return n||(n=o.So.everybody.key),n},s=()=>(0,r.Pb)()?.jetpack?.is_newsletter_feature_enabled??!1},52143:function(e,t,n){"use strict";n.d(t,{IO:function(){return E},Y6:function(){return b},al:function(){return w},rU:function(){return f}});var r=n(51806),a=n(55609),o=n(94333),i=n(37798),s=n(9818),c=n(12238),l=n(69307),u=n(65736),d=n(61074),p=n(31223),m=n(7652),h=n(40083),g=n(88966);const __=u.__;function f(e){let{href:t,children:n}=e;return(0,r.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:t,className:"jetpack-newsletter-link"},n)}function b(e,t,n){switch(h.So[e].key){case h.So.everybody.key:case h.So.subscribers.key:return t||0;case h.So.paid_subscribers.key:return n||0;default:return 0}}function v(e){let{stripeConnectUrl:t,isStripeConnected:n,hasNewsletterPlans:a}=e;const o=(0,g.nZ)(a);return a||n?a?n?void 0:(0,r.createElement)("div",{className:"editor-post-visibility__info"},(0,l.createInterpolateElement)(__("<stripeAccountLink>Connect to Stripe</stripeAccountLink> to enable paid subscriptions.","jetpack"),{stripeAccountLink:(0,r.createElement)(f,{href:t})})):(0,r.createElement)("div",{className:"editor-post-visibility__info"},(0,l.createInterpolateElement)(__("<paidPlanLink>Set up a paid subscription plan</paidPlanLink> to enable this option.","jetpack"),{paidPlanLink:(0,r.createElement)(f,{href:o})})):(0,r.createElement)("div",{className:"editor-post-visibility__info"},(0,l.createInterpolateElement)(__("You'll need to connect <stripeAccountLink>Stripe</stripeAccountLink> and add a <paidPlanLink>paid plan</paidPlanLink> to collect payments.","jetpack"),{stripeAccountLink:(0,r.createElement)(f,{href:t}),paidPlanLink:(0,r.createElement)(f,{href:o})}))}function k(e){let{onChange:t}=e;const n=(0,s.useSelect)((e=>e(m.h).getProducts())).filter((e=>e.subscribe_as_site_subscriber&&"1 month"===e.interval)).sort(((e,t)=>Number(t.price)-Number(e.price))),o=(0,s.useSelect)((e=>e(c.store).getCurrentPostType()),[]);let[{[h.cP]:l}]=(0,i.useEntityProp)("postType",o,"meta");if(!(n.length<2)){if(!l){l=n[n.length-1].id;const e={};e[h.cP]=l,t&&setTimeout((()=>t(e)))}return(0,r.createElement)("div",{className:"jetpack-editor-post-tiers"},(0,r.createElement)(a.RadioControl,{label:__("Choose Newsletter Tier","jetpack"),hideLabelFromVision:!0,selected:Number(l),options:n.map((e=>({label:(0,u.sprintf)(/* Translators: %s is the tier label created by site user */ __("%s subscribers","jetpack"),e.title),value:Number(e.id)}))),onChange:e=>{const n={};return n[h.cP]=e,t&&t(n)}}))}}function y(e){let{onChange:t,accessLevel:n,hasNewsletterPlans:i,stripeConnectUrl:c,isEditorPanel:l=!1,postHasPaywallBlock:u=!1}=e;const d=null===c,p=(0,o.useInstanceId)(y),{emailSubscribers:g,paidSubscribers:f}=(0,s.useSelect)((e=>e(m.h).getSubscriberCounts()));return(0,r.createElement)("fieldset",{className:"editor-post-visibility__fieldset"},(0,r.createElement)(a.VisuallyHidden,{as:"legend"},__("Audience","jetpack")," "),Object.keys(h.So).map((e=>{if(e===h.So.everybody.key&&u)return;const a=h.So[e].label,o=e!==h.So.everybody.key?` (${b(e,g,f)})`:"";return(0,r.createElement)("div",{className:"editor-post-visibility__choice",key:e},(0,r.createElement)("input",{value:e,type:"radio",checked:e===n,className:"editor-post-visibility__radio",id:`editor-post-${e}-${p}`,name:`editor-newsletter-access__setting-${p}`,"aria-describedby":`editor-post-${e}-${p}-description`,disabled:!(e!==h.So.paid_subscribers.key||d&&i),onChange:e=>{const n={};return n[h.lx]=e?.target?.value,t&&t(n)}}),(0,r.createElement)("label",{htmlFor:`editor-post-${e}-${p}`,className:"editor-post-visibility__label"},a,o),e===h.So.paid_subscribers.key&&e===n&&d&&i&&(0,r.createElement)(k,{onChange:t}))})),l&&(0,r.createElement)(v,{stripeConnectUrl:c,isStripeConnected:d,hasNewsletterPlans:i}))}function w(e){let{accessLevel:t,setPostMeta:n}=e;const{hasNewsletterPlans:i,stripeConnectUrl:l,isLoading:u,foundPaywallBlock:m}=(0,s.useSelect)((e=>{const{getNewsletterProducts:t,getConnectUrl:n,isApiStateLoading:r}=e("jetpack/membership-products"),{getBlocks:a}=e("core/block-editor");return{isLoading:r(),stripeConnectUrl:n(),hasNewsletterPlans:0!==t()?.length,foundPaywallBlock:a().find((e=>e.name===p.pG))}})),f=(0,s.useSelect)((e=>e(c.store).getEditedPostVisibility())),{selectBlock:b}=(0,s.useDispatch)("core/block-editor"),{closeGeneralSidebar:v}=(0,s.useDispatch)("core/edit-post"),k=(0,o.useViewportMatch)("medium","<");if(u)return(0,r.createElement)(a.Flex,{direction:"column",align:"center"},(0,r.createElement)(a.Spinner,null));const w=t??h.So.everybody.key,E=h.So[w]?.label,_=(0,g.hc)(f,t);return(0,r.createElement)(c.PostVisibilityCheck,{render:e=>{let{canEdit:t}=e;return(0,r.createElement)(r.Fragment,null,m&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"block-editor-block-card"},(0,r.createElement)("span",{className:"block-editor-block-icon has-colors"},(0,r.createElement)(d.Z,{icon:p.qv})),(0,r.createElement)("div",{className:"block-editor-block-card__content"},(0,r.createElement)("h2",{className:"block-editor-block-card__title"},__("Paywall","jetpack")),(0,r.createElement)("span",{className:"block-editor-block-card__description"},__("The content below the paywall block is exclusive to the selected audience.","jetpack")," ",(0,r.createElement)(a.Button,{className:"edit-post-paywall-toolbar-button",onClick:()=>{b(m.clientId),k&&v()},variant:"link"},__("Edit the block.","jetpack")))))),(0,r.createElement)(a.PanelRow,{className:"edit-post-post-visibility"},(0,r.createElement)(a.Flex,{direction:"column"},_&&(0,r.createElement)(g.$P,null),(0,r.createElement)(a.FlexBlock,{direction:"row",justify:"flex-start"},t&&(0,r.createElement)("div",{className:"editor-post-visibility"},(0,r.createElement)(y,{isEditorPanel:!0,onChange:n,accessLevel:w,stripeConnectUrl:l,hasNewsletterPlans:i,postHasPaywallBlock:m})),!t&&(0,r.createElement)("span",null,E)))))}})}function E(e){let{accessLevel:t}=e;const{isLoading:n,postHasPaywallBlock:o}=(0,s.useSelect)((e=>{const{getNewsletterProducts:t,getConnectUrl:n,isApiStateLoading:r}=e("jetpack/membership-products"),{getBlocks:a}=e("core/block-editor");return{isLoading:r(),stripeConnectUrl:n(),hasNewsletterPlans:0!==t()?.length,postHasPaywallBlock:a().some((e=>e.name===p.pG))}})),i=(0,s.useSelect)((e=>e(c.store).getEditedPostVisibility()));if(n)return(0,r.createElement)(a.Flex,{direction:"column",align:"center"},(0,r.createElement)(a.Spinner,null));const l=t??h.So.everybody.key,u=(0,g.hc)(i,t);return(0,r.createElement)(c.PostVisibilityCheck,{render:()=>(0,r.createElement)(a.PanelRow,{className:"edit-post-post-visibility"},(0,r.createElement)(a.Flex,{direction:"column"},u&&(0,r.createElement)(g.$P,null),(0,r.createElement)("p",null,l!==h.So.paid_subscribers.key||o?__("This post will be sent to all subscribers.","jetpack"):__("This post will be sent to paid subscribers only.","jetpack"))))})}},88966:function(e,t,n){"use strict";n.d(t,{$P:function(){return u},ZP:function(){return d},hc:function(){return l},nZ:function(){return c}});var r=n(51806),a=n(55609),o=n(69307),i=n(65736),s=n(40083);const _x=i._x,__=i.__,c=e=>{const t="https://wordpress.com/earn/payments-plans/"+location.hostname;return e?t:t+"#add-newsletter-payment-plan"},l=(e,t)=>"public"!==e&&t!==s.So.everybody.key,u=()=>(0,r.createElement)(a.Notice,{status:"warning",isDismissible:!1,className:"edit-post-post-misconfiguration__warning"},(0,o.createInterpolateElement)(__("You’ll need to change the post’s access to Everybody or visibility to Public.<br/><br/>Subscribers aren’t able to view private or password-protected posts.","jetpack"),{br:(0,r.createElement)("br",null)}));function d(e){let{context:t="other",hasNewsletterPlans:n}=e;const o=n?_x("Manage plans","unused context to distinguish translations","jetpack"):__("Set up a paid plan","jetpack");return"toolbar"===t?(0,r.createElement)(a.ToolbarButton,{href:c(n),target:"_blank"},o):(0,r.createElement)(a.Button,{variant:"primary",href:c(n),target:"_blank"},o)}},63066:function(e,t,n){"use strict";var r=n(13419),a=n(86989),o=n.n(a),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 o()({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),a=n(4981),o=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:d,unavailableReason:p}=(0,r.OZ)(l),m=(0,r._D)(p,d),h=s||c?i:"";if(!u&&!m)return!1;const g=h+l,f=(0,a.registerBlockType)(g,t);return m&&(0,o.addFilter)("editor.BlockListBlock",`${g}-with-has-warning-is-interactive-class-names`,(0,r.T)(g)),n.forEach((e=>(0,a.registerBlockType)(h+e.name,e.settings))),f}function c(e,t,n,a){const o={...t,icon:(0,r.lt)(e)},{variations:i}=e;return Array.isArray(i)&&i.length>0&&(o.variations=i.map((e=>({...e,icon:(0,r.lt)(e)})))),s(e.name,o,n,a)}},36598:function(e,t,n){"use strict";var r=n(51806),a=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,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"0 0 24 24";return(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:t,height:n,viewBox:o},(0,r.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0V0z",className:"icon-filler"}),e)}},66425:function(e,t,n){"use strict";var r=n(51806),a=n(52175);t.Z=(e,t,n,o,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&&o(t),(s||""===c)&&(0,r.createElement)(a.PlainText,{value:c,placeholder:n,"aria-label":n,onChange:i}))}},92713:function(e,t,n){"use strict";var r=n(9818),a=n(65736);n(53961);const __=a.__;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),a=n.n(r),o=n(92819);function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.noop;return t(!0),new Promise(((n,r)=>{a()({path:`/wpcom/v2/resolve-redirect/?url=${encodeURIComponent(e)}`}).then((a=>{t(!1);const o=a.status?parseInt(a.status,10):null;o&&o>=400?r():n(a.url||e)}),(()=>{t(!1),r()}))}))}},46867:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(9818),a=n(69307),o=n(92819);function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.noop;const[n,i]=(0,a.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,d=(0,r.useSelect)((e=>!!window.wp?.customize||!!e("core/edit-widgets"))),p=(0,r.dispatch)("core/editor").savePost,m=(0,r.useSelect)((e=>e("core").__experimentalGetDirtyEntityRecords())),h=async e=>{e.preventDefault(),u?c&&s&&await p(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,d)})))},isRedirecting:n}}},78798:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(13419),a=n(9818),o=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,a.useSelect)((t=>{const n=t("core/editor"),a=t("wordpress-com/plans"),{id:o,type:i}=n.getCurrentPost(),s=a&&a.getPlan(e);return{checkoutUrl:(0,r.Qq)({plan:s,planSlug:e,postId:o,postType:i}),planData:s}}),[]),{autosave:u,autosaveAndRedirect:d,isRedirecting:p}=(0,s.Z)(n,t);return[n,async e=>{if(e.preventDefault(),(0,o.hasAction)(c))return e.preventDefault(),u(e),void(0,o.doAction)(c,{products:[l]});d(e)},p,l]}},81673:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307);const a=e=>{const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current};function o(e){let{attributes:t,disableEffects:n=!1,setAttributes:o}=e;const{align:i,width:s}=t,c=a(i);(0,r.useEffect)((()=>{if(n)return;c!==i&&("left"===i||"right"===i)&&s?.includes("%")&&o({width:void 0})}),[i,n,c,o,s])}},46185:function(e,t,n){"use strict";n.d(t,{U:function(){return a}});var r=n(9818);const a=async()=>new Promise((e=>{const t=(0,r.subscribe)((()=>{(0,r.select)("core/editor").isCleanNewPost()&&(t(),e());(0,r.select)("core/block-editor").getBlocks().length>0&&(t(),e())}))}))},67194:function(e,t,n){"use strict";n.d(t,{X:function(){return a}});var r=n(9818);const a=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},g:function(){return g}});var r=n(82674),a=n.n(r),o=n(51806),i=n(55609),s=n(69307),c=n(65736),l=n(65235),u=n.n(l);const __=c.__,d=[{value:"%",label:"%",default:100},{value:"px",label:"px",default:150},{value:"em",label:"em",default:10}],p=[{value:"px",label:"px",default:150},{value:"em",label:"em",default:10}],m=["25%","50%","75%","100%"];function h(e){return(0,o.createElement)(i.PanelBody,{title:__("Width settings","jetpack")},(0,o.createElement)(g,a()({showLabel:!1},e)))}function g(e){let{align:t,width:n,onChange:r,showLabel:a=!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,o.createElement)(i.BaseControl,{label:a&&__("Width","jetpack")},(0,o.createElement)("div",{className:u()("jetpack-block-width-controls",{"is-aligned":h})},!h&&(0,o.createElement)(i.ButtonGroup,{"aria-label":__("Percentage Width","jetpack")},m.map((e=>(0,o.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,o.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?p:d,value:n})))}},97115:function(e,t,n){"use strict";n.d(t,{Vy:function(){return o},Wp:function(){return a},_5:function(){return i},tT:function(){return r}});const r="jetpack/media-source",a="is-playing",o="is-error",i="is-paused"},14688:function(e,t,n){"use strict";var r=n(9818),a=n(97115),o=n(66858);if(void 0!==r.createReduxStore){const e=(0,r.createReduxStore)(a.tT,o.Z);(0,r.register)(e)}else(0,r.registerStore)(a.tT,o.Z)},66858:function(e,t,n){"use strict";var r=n(97115);const a={sources:{},default:null},o={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]:o.getDefaultMediaSource(e);return n?.state},getMediaSourceCurrentTime(e,t){const n=t?e.sources?.[t]:o.getDefaultMediaSource(e);return n?.currentTime},getMediaSourceDuration(e,t){if(!t){const t=o.getDefaultMediaSource(e);return t?.duration}return e.sources?.[t]?.duration},getMediaSourceDomReference(e,t){const n=t?e.sources?.[t]:o.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]:a,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:o};t.Z=i},6247:function(e,t,n){"use strict";n.r(t),n.d(t,{saveProduct:function(){return b},setApiState:function(){return g},setConnectUrl:function(){return m},setConnectedAccountDefaultCurrency:function(){return h},setProducts:function(){return p},setSiteSlug:function(){return f},setSubscriberCounts:function(){return v}});var r=n(25607),a=n(86989),o=n.n(a),i=n(65736),s=n(14436),c=n(51585),l=n(79162),u=n(23267),d=n(46529);const __=i.__,p=e=>({type:"SET_PRODUCTS",products:e}),m=e=>({type:"SET_CONNECT_URL",connectUrl:e}),h=e=>({type:"SET_CONNECTED_ACCOUNT_DEFAULT_CURRENCY",connectedAccountDefaultCurrency:e}),g=e=>({type:"SET_API_STATE",apiState:e}),f=e=>({type:"SET_SITE_SLUG",siteSlug:e}),b=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.Bn,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:()=>{},m=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return async s=>{let{dispatch:h,registry:g}=s;const{title:f,price:b,currency:v}=e;if(!f||0===f.length)return(0,d.q)((0,c.l)("product requires a name",t),g),void a(!1);const k=parseFloat(b),y=(0,l.hj)(v);if(k<y)return(0,d.q)((0,i.sprintf)( // translators: %s: Price __("Minimum allowed price is %s.","jetpack"),(0,r.ZP)(y,v)),g),void a(!1);if(!(0,l.vs)(v,k))return(0,d.q)((0,c.l)("product requires a valid price",t),g),void a(!1);try{const r=await o()({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=g.select(u.G4).getProducts();h(p(s.concat([i]))),n(i.id),m&&(0,d.w)((0,c.l)("successfully created product",t),g),a(!0)}catch(e){(0,d.q)((0,c.l)("there was an error when adding the product",t),g),a(!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 o},lp:function(){return a}});const r="jetpack/membership-products",a=0,o=1,i=2},7652:function(e,t,n){"use strict";n.d(t,{h:function(){return l}});var r=n(9818),a=n(6247),o=n(23267),i=n(93100),s=n(20360),c=n(93245);const l=(0,r.createReduxStore)(o.G4,{actions:a,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 a}});const r={products:[],apiState:n(23267).lp,connectUrl:null,siteSlug:"",connectedAccountDefaultCurrency:"",subscriberCounts:{socialFollowers:null,emailSubscribers:null,paidSubscribers:null}};function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]: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),a=n.n(r),o=n(12238),i=n(96483),s=n(14436),c=n(51585),l=n(73905),u=n(74251),d=n(6247),p=n(23267),m=n(46529);const h="membership-products-resolver-getProducts",g="membership-products-resolver-getSubscriberCounts";let f=!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:g,registry:v,select:k}=s;if(await l.Z.blockExecution(h),f)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 a()({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(o.store).getCurrentPostId();n((0,d.setConnectUrl)((0,u.Z)(r,e.connect_url))),n((0,d.setSiteSlug)(e.site_slug)),n((0,d.setProducts)(e.products)),n((0,d.setConnectedAccountDefaultCurrency)(e.connected_account_default_currency)),n((0,d.setApiState)(e.connected_account_id?p.cH:p.P))})(s,v,g),(e=>!e.products.length&&e.connected_account_id)(s)&&await(async(e,t,n,r)=>{await n((0,d.saveProduct)({title:(0,c.l)("default new product title",e),currency:"USD",price:5,interval:"1 month"},e,t,(()=>{}),r))})(e,n,g,r),b(t,n,k),f=!0}catch(e){g((0,d.setConnectUrl)(null)),g((0,d.setApiState)(p.P)),(0,m.q)(e.message,v)}l.Z.release(y)}},y=()=>async e=>{let{dispatch:t,registry:n}=e;await l.Z.blockExecution(g);const r=l.Z.acquire(g);try{const e=await(async()=>{const e=await a()({path:"/wpcom/v2/subscribers/counts"});if(!e||"object"!=typeof e)throw new Error("Unexpected API response");const t=e?.errors&&Object.values(e.errors)?.[0]?.[0];if(t)throw new Error(t);return e})();t((0,d.setSubscriberCounts)({socialFollowers:e.counts.social_followers,emailSubscribers:e.counts.email_subscribers,paidSubscribers:e.counts.paid_subscribers}))}catch(e){t((0,d.setApiState)(p.P)),(0,m.q)(e.message,n)}l.Z.release(r)}},93245:function(e,t,n){"use strict";n.r(t),n.d(t,{getApiState:function(){return a},getConnectUrl:function(){return o},getConnectedAccountDefaultCurrency:function(){return i},getNewsletterProducts:function(){return u},getProduct:function(){return l},getProducts:function(){return s},getProductsNoResolver:function(){return c},getSiteSlug:function(){return d},getSubscriberCounts:function(){return g},isApiStateConnected:function(){return p},isApiStateLoading:function(){return m},isInvalidProduct:function(){return h}});var r=n(23267);const a=e=>e.apiState,o=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)),d=e=>e.siteSlug,p=e=>e.apiState===r.cH,m=e=>e.apiState===r.lp,h=(e,t)=>!!t&&!l(e,t),g=e=>e.subscriberCounts},46529:function(e,t,n){"use strict";n.d(t,{q:function(){return a},w:function(){return o}});var r=n(53961);const a=(e,t)=>t.dispatch(r.store).createErrorNotice(e,{type:"snackbar"}),o=(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 a}});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 a(e){return r[e]||{symbol:"$",grouping:",",decimal:".",precision:2}}},25607:function(e,t,n){"use strict";n.d(t,{ZP:function(){return o}});var r=n(43317),a=n(5375);function o(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o=(0,r.X)(t);if(!o||isNaN(e))return null;const{decimal:i,grouping:s,precision:c,symbol:l}={...o,...n},u=e<0?"-":"";let d=(0,a.Z)(Math.abs(e),c,i,s);return n.stripZeros&&(d=function(e,t){const n=new RegExp(`\\${t}0+$`);return e.replace(n,"")}(d,i)),`${u}${l}${d}`}},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 a=(e+"").replace(/[^0-9+\-Ee.]/g,""),o=isFinite(+a)?+a: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)}(o,i):""+Math.round(o)).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,a=n(53184);function o(){this.intervals={},this.monitorInterval=null,this.windowInstance=null,this.onMessage=e=>{e.source===this.windowInstance&&this.emit("message",e.data)}}r=o.prototype,Object.assign(r,a.EventEmitter.prototype),r.emitChange=function(){this.emit("change")},r.off=r.removeListener,o.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},o.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()},o.prototype.isOpen=function(e){let t=!1;try{t=this.intervals[e]&&this.intervals[e].closed}catch(e){}return!t},o.prototype.checkStatus=function(){for(const e in this.intervals)this.intervals.hasOwnProperty(e)&&!this.isOpen(e)&&(this.emit("close",e),delete this.intervals[e]);0===Object.keys(this.intervals).length&&(clearInterval(this.monitorInterval),delete this.monitorInterval,window.removeEventListener("message",this.onMessage))},o.prototype.startMonitoring=function(e,t){this.monitorInterval||(this.monitorInterval=setInterval(this.checkStatus.bind(this),100)),this.intervals[e]=t},t.Z=o},39229:function(e,t,n){"use strict";var r=n(7211);t.Z=function(e,t){var n,a=new r.Z;a.open(e,null,"toolbar=0,location=0,status=0,menubar=0,"+a.getScreenCenterSpecs(780,700)),a.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)})),a.on("message",(function(e){return n=e}))}},37580:function(e,t,n){"use strict";n.d(t,{FT:function(){return r},HX:function(){return a},Mf:function(){return o}});const r="article",a="landscape",o="portrait"},52208:function(e,t,n){"use strict";var r=n(30275),a=n(21987),o=n(90626);t.Z=e=>{let t,{text:n,url:i,forceUrlDisplay:s}=e;return(s||(0,a.ge)(n,"a"))&&(t=(0,r.jsx)("a",{className:"facebook-preview__custom-text-post-url",href:i,rel:"nofollow noopener noreferrer",target:"_blank",children:i})),(0,r.jsxs)("p",{className:"facebook-preview__custom-text",children:[(0,r.jsx)("span",{children:(0,a.u_)(n,{platform:"facebook",maxChars:o.qA})}),t]})}},90626:function(e,t,n){"use strict";n.d(t,{jN:function(){return i},qA:function(){return a},wB:function(){return s},wy:function(){return o}});var r=n(21987);const a=440,o=e=>e.replace(/^[^/]+[/]*/,"").replace(/\/.*$/,""),i=e=>(0,r.SL)((0,r.hs)(110),(0,r.KB)(110))((0,r.ju)(e))||"",s=e=>(0,r.SL)((0,r.hs)(200),(0,r.KB)(200))((0,r.ju)(e))||""},53251:function(e,t,n){"use strict";var r=n(65736),a=n(99196),o=n(37580);const __=r.__;t.Z=e=>{let{mode:t}=e;const[n,r]=(0,a.useState)(t),[i,s]=(0,a.useState)(!0),c=(0,a.useCallback)((e=>{let{target:t}=e;if(!n){const e=t;r(e.naturalWidth>e.naturalHeight?o.HX:o.Mf)}s(!1)}),[n]),l=(0,a.useCallback)((()=>s(!1)),[]);return[n,i,{alt:__("Facebook Preview Thumbnail","jetpack"),onLoad:c,onError:l}]}},26767:function(e,t,n){"use strict";n.d(t,{F:function(){return l}});var r=n(30275),a=n(37580),o=n(52208),i=n(53251),s=n(3451),c=n(69133);const l=e=>{let{url:t,customImage:n,user:l,customText:u,imageMode:d}=e;const[p,m,h]=(0,i.Z)({mode:d}),g="is-"+(p===a.Mf?"portrait":"landscape");return(0,r.jsxs)("div",{className:"facebook-preview__post",children:[(0,r.jsx)(c.Z,{user:void 0}),(0,r.jsx)("div",{className:"facebook-preview__content",children:(0,r.jsxs)("div",{className:`facebook-preview__window ${g} ${n&&m?"is-loading":""}`,children:[(0,r.jsx)("div",{className:`facebook-preview__custom-image ${g}`,children:(0,r.jsx)("img",{src:n,...h})}),(0,r.jsx)(c.Z,{user:l,timeElapsed:!0,hideOptions:!0}),u&&(0,r.jsx)(o.Z,{text:u,url:t,forceUrlDisplay:!0})]})}),(0,r.jsx)(s.Z,{})]})}},7558:function(e,t,n){"use strict";n.d(t,{g:function(){return p}});var r=n(30275),a=n(65736),o=n(37580),i=n(52208),s=n(90626),c=n(53251),l=n(3451),u=n(69133),d=n(69094);n(59961);const __=a.__,p=e=>{let{url:t,title:n,description:a,image:p,user:m,customText:h,type:g,imageMode:f,compactDescription:b}=e;const[v,k,y]=(0,c.Z)({mode:f}),w=g===o.FT,E="is-"+(w&&!p||v===o.Mf?"portrait":"landscape");return(0,r.jsxs)("div",{className:"facebook-preview__post",children:[(0,r.jsx)(u.Z,{user:m}),(0,r.jsxs)("div",{className:"facebook-preview__content",children:[h&&(0,r.jsx)(i.Z,{text:h,url:t}),(0,r.jsxs)("div",{className:`facebook-preview__body ${E} ${p&&k?"is-loading":""}`,children:[(p||w)&&(0,r.jsx)("div",{className:`facebook-preview__image ${p?"":"is-empty"} ${E}`,children:p&&(0,r.jsx)("img",{src:p,...y})}),(0,r.jsx)("div",{className:"facebook-preview__text",children:(0,r.jsxs)("div",{className:"facebook-preview__text-wrapper",children:[(0,r.jsx)("div",{className:"facebook-preview__url",children:(0,s.wy)(t)}),(0,r.jsx)("div",{className:"facebook-preview__title",children:(0,s.jN)(n)||(0,s.wy)(t)}),(0,r.jsxs)("div",{className:"facebook-preview__description "+(b?"is-compact":""),children:[a&&(0,s.wB)(a),w&&!a&& // translators: Default description for a Facebook post __("Visit the post for more.","jetpack")]}),(0,r.jsx)("div",{className:"facebook-preview__info",children:(0,r.jsx)(d.Z,{name:"info"})})]})})]})]}),(0,r.jsx)(l.Z,{})]})}},34245:function(e,t,n){"use strict";n.d(t,{C:function(){return l}});var r=n(30275),a=n(37580),o=n(52208),i=n(53251),s=n(3451),c=n(69133);n(59961);const l=e=>{let{url:t,user:n,customText:l,media:u,imageMode:d}=e;const[p]=(0,i.Z)({mode:d}),m="is-"+(p===a.Mf?"portrait":"landscape");return(0,r.jsxs)("div",{className:"facebook-preview__post",children:[(0,r.jsx)(c.Z,{user:n}),(0,r.jsxs)("div",{className:"facebook-preview__content",children:[l&&(0,r.jsx)(o.Z,{text:l,url:t,forceUrlDisplay:!0}),(0,r.jsx)("div",{className:"facebook-preview__body",children:u?(0,r.jsx)("div",{className:`facebook-preview__media ${m}`,children:u.map(((e,t)=>(0,r.jsx)("div",{className:`facebook-preview__media-item ${m}`,children:e.type.startsWith("video/")?(0,r.jsx)("video",{controls:!0,children:(0,r.jsx)("source",{src:e.url,type:e.type})}):(0,r.jsx)("img",{alt:e.alt||"",src:e.url})},`facebook-preview__media-item-${t}`)))}):null})]}),(0,r.jsx)(s.Z,{})]})}},3451:function(e,t,n){"use strict";var r=n(30275),a=n(65736),o=n(69094);n(1488);const __=a.__;t.Z=()=>(0,r.jsx)("ul",{className:"facebook-preview__post-actions",children:[{icon:"like", // translators: Facebook "Like" action label:__("Like","jetpack")},{icon:"comment", // translators: Facebook "Comment" action label:__("Comment","jetpack")},{icon:"share", // translators: Facebook "Share" action label:__("Share","jetpack")}].map((e=>{let{icon:t,label:n}=e;return(0,r.jsxs)("li",{children:[(0,r.jsx)(o.Z,{name:t}),(0,r.jsx)("span",{children:n})]},t)}))})},69133:function(e,t,n){"use strict";var r=n(30275),a=n(65736),o=n(99196),i=n(69094);n(56878);const __=a.__,_x=a._x,s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IB2cksfwAADwtJREFUeJztXet2mzgX3RLg+H5NmsRt0zad6Zp5/6eYtebPvMDX20zaJm4udmwH20jfDyQQQthpgm1gsTuMWgukg7aOzjmSAPLX3/9wlCgs6L4FKLFdlAQXHCXBBUdJcMFRElxwlAQXHCXBBUdJcMFRElxwlAQXHCXBBUdJcMFRElxwlAQXHCXBBUdJcMFRElxwlAQXHCXBBUdJcMFRElxwlAQXHCXBBUdJcMFRElxwlAQXHCXBBUdJcMFh71uAbYMQsjaf82I/e1c4ggkh4JwrB8DBAQ6I/wEg4j8CQvxr5FE0wgtDMCEEjDF4ngdKKSzLQr1eQ71WxUGlAtu2QamvzYxxrFYruIsFZvMHzGZzeJ4XXEspLQzRhSF4tVrBcRwM+j30um2020049uNub7laYTy+x83tGLd3YyyXS1iWtXWZd4FcE0wI4HkchAAnJy9wfNhHvV6Lnccjw3NwNaR5dmwbg34Xg34Xs9kcP0bXuLwcgXPAsgjyrMy5Jdgnl6Fer+Ht6yHa7RYQOE0hefJcYJOzBQAc9XoN785eYtBt49PXC8xmc1gWzS3JuQyTCCFYrRh6vTb+/PDeJ5f7JPnO0lPKlA6ar+ztdgt/fniPXq+N1Ypt9MazitwRTACsPA+DXge/n7+F49hBRhocEBIqu+PY+P38LQa9Dlaet2EMyCZyR7DHOBq1Gt6fn/ne7hbr4gAopXh/foZGrQaP5W+czh3BlBK8ORvCsixwzreqVUTYdMuy8OZsGIRZeUKuCPY8htOTI3TaLZ/cHdhFOfnRabdwenIEz2NbrzNN5IZgzjmq1QMMT46BR0xBpglZ1/DkGNXqQa4mQXJBMCEEHmM4GvT2FrL4MTHF0aAHj+XHq84FwZxzVBwH/X5X/rIPKQAA/X4XFcfJjRZnnmBCCDzPQ6fdRK1W3ZntNcnBOUetVkWn3YTnebnQ4swTLAltNRuZiEMJ4MuSk5WnzBMMEYs2mnVgx86VDll3o1kHpblouuwTzDlgWzYatfgiwr7QqNVgW3Yu5qczTbA/0cDQaFQzpTGUUjQaVXDOMmE21iE7rWaCmPyvVg/2LUkMfjyMdCbAt4hsEwx/u41jO/7fMzAkShkc2/G3AmUcmScYHLDlilEmGtSXwXbsbIizAdknGBxWBodBX6bsM5wDggGSwVWcLMpkQg4IJmBZML4amNgalHXkgGCAsewt0WVRJhMyTzAhwHK5En/fv8ZIGZbLVdYjJCAPBAMErrvYtxAx+DJln+FME8w5B6UE8/k8Yx4rx3w+B6XZX3DINME+COYPLhZimM4CFssV5g9uqcFpgBDfoRlP7oE9Pw0o6x5P7sEYK21wGvAX/Blub8f7FiXA7e0YnpePbTuZJ5hzDmpZGE+mcF13bwvtcuOB67oYT6agYttu1pF5ggGAEoIH18XV6Fr8sg/N8eu8Gl3jwXVBc6C9yAvBnHPYlOJydI3Vaj/xJyH+I6qXo2vYOXp+OBcEAwChFK67xPcfI2DHzpas6/uPEVx3CZKhzQebkBtJ/UdICL79uMLkfrozWyxt7+R+im8/rsTzwvnQXuSJYB/+FtpPn//d2bZVuW1X1pmH2FdFzggGLMvC/XSOz18vdlbn568XuJ/Oc/lah9wRzDmHbVNcXv3Epy//bXUbD+fApy//4fLqJ2w7P46VitwRjOA5IQvfvl/i4+evQcOnQYBa1sfPX/Ht+6V4VPXZRe8FuX1Hh6/JNr5fjuCtPJydDXFQqQR5v2qf5TWEELiLBT5/ucDo+gaObedScyVySzAEKY5tY3Rzi+lsjuHwGC8O+wG5kpgkstV8ec7l6BoXFz8wd93ck4u8EwypyZYFd7HA/z5+wWh0jRcvBmi3mqg4ztprJamL5RLjyT0uL39iPLkHIQR2TqYiNyH3BEMbXseTKe7GE9TrNTTqdbSaddRqNRxUnMAL9jwP7mKJ+XyOyf0M09kMs9kchNDgCYoikIuiEKyCUgJCbMznLmazOX5e30TeRQlBnjz8ZT8KuwDDsQmFIxjKThBC7IhXzJi0uRApCYgtIrkoKsESOmkmX6uoxErkMg4u8XjkQoP1sEfC/JLR1GuPaX6SPFlEZglWX+wtJ/l9uxo6S7t6MZlqx315GAAOSmnmXySeKYJ1UgkhqFUPUK0eoFaronrg/91x7OCl39veWcGELIwxLJcrPDy4eHBdzOcPeHhwMX9whVOXTbIzRbD/wk+Cg4qDfq+DTqeNWu0gmILcBygAW8TPtSrQbjWDPHexwHzu4u5ujOubO7iLJThnsKzsuDbkr7//2Xt3k8/5tFtNHB0N0O92Yo20adpxV0iSw/MYrm/vcDX6ifHY3+KbhddO7E2D5TcWGGNot1oYnh6h22lHGk5dNNg3sRK6HFJG+Ra8w34Xt3djXHy7wngy2fs3IPZCsL+BzUOl4mB4eoyTFwPFM41ORGQd0Q7p/7vX7aDbaeP75U9cfPuBxWIp1pN3L99eCPY8D91uG+/OXgUvWAnnk/chUTqQsst7OT0+RK/Twscv/+LubgxKd78jZKdGgnPf3g5Pj/HHh/PIm1vzoK2PhRonV6sH+OPDOYanx2CM7VyLd6bBIpLE2zcvcfLiKPitSMTqIIRAfCIEZ6+GqFQcfP5yAQ6ys617W9fgwEkC8Nv5WUAucrc/8WlQ7/HkxRF+Oz8LfttF5946wXLi4t2bVxj0e9uuLvMY9Ht49+bVzlawtkqwHwpxvH51iqPDfqYe4d4XOICjwz5evzoFY9t/NfLWCPa/bbTCYb+L05OjrX9AIy+QH/o4PT7C4aArnrXaXstsjWDP89Co1/Dm7KXRpXjMVtdN5zxnu6x+bfSLpfG8x5SnX5+UD6EAb85eolGvbfVDH1vV4LPXQziOHeykWNeApgNy4j72ydjHlAEt1a8lsVQ9HiujKqt6PIZwx7Zx9nq41dg/dYLlE/mHgx66nbb/Makn3sBmDSJaGrk6knLtAHiwniy/Maz+eYqs6wjVO5C8pttp43DQ29obA1KPgxljcBwbL0+Phd3lACebm0y/Nx5JDI1OACI+/Ey44VW0RBg8M/8hueIkrs0xP0ZerqQx8Xn0JKKdxP0zKIDh6TFubsdbeaAuVQ2WCwiHgx6q1YNgaDYhpjE8fsjfw8ZSD6kp3DjExvJjKhzV8CQZTbKa5I2PANEeYDIR0uGqVQ9wOOiJHZ7pEpyqBnPO4TgODgc9/0bCjM3Xbvg90dEKUkM+EVWThOsjHCSVv77eJMHD+jaXyznH4aCH0c+b1F+RmJoGy+do260m6vV64BnK+/xVGyeVLGnbld58uoJy1bYmDKGb8rGG4JgMcSO/dozgSpt4jKFer6O9hc/1pKbBcttKt9sGkYOU6gnr5wf2M8FOcq2BTPnEV1GZRiC1UqR8Q5utkzGQNVa+MN2G7Fi+Tlogmzydo9dp4+bmLtUZrlQJdhwH7VYLHuPS8gg/KM5gxD+CuZuvG0HlBzsICDhnTyxfSmYaVUi8jMgNR9NY/+N6H9OHXqV88dncdrsFx3GwXC5T0+JUhmjpLDQbdf/bgozFYlEdXIYWSdqj5AWp+siJMK4y/dU4OZ4X9Zugcbjxen2UFjKqsupxduRgDBalaDbqIvpIB+nYYDEMN5uN4KPNMT/SQAARN0oMN6znxav0h2ViGp4VmZJMBDQCYz64QR71zyb5AxkVWWM9KNy64stACRrNejhxkgJSGaKl/a0eVERvDAUMmtYUi65xZJgYdjmYcfO51DoinCQ9X4YcSaEHZ6JWnuBG6fUlyEgICWSNXE7iI4Ser8ooREGtWk11D1dqBDuOIx7kUntmqB6/LjARjSTTWK2G6UblaqG5SfuUY/Pjhg70GBmDmNbgQ63zIlXZ1P3gtkVTtcPPJpiIzeG2bcG2bbEthYseCiWN3+B6yN6PSBrUSxDUI1MV6vw3YNBwKSMPZYyWv76DqDKaPDg5qqgy6vL7y4WhrIwx2LYN27awWCxAySNmADfg+RosWs6yLLGXWUR4IrZJ1jC1EeIERJwdk5PG9TIMXnBC2Yh0EHWxQS2fawSZrg/TJBlVWfXyowsdUNrRilbyDKQ0REsNlfYI4TRSopByCk9N9XLVYSx+PRMOjkx1yAV105Spv1+KiBg2WcaQgGi+lDckMd6B1eFZ/3JMKG+48MA5QAn1NTelUDilOJiDii2vXAzLsbn4RBsnPUquFxnabmKKQ3k0P8HTThpmudj6Fqb6xevLxoaJGunARYJh4/1HZaWWfLguQ04WgMg6KBGaHPFidf50J4OZblid5DAQyAVBPNnJknXpXjDhJOIFxxwaEcMHoZDuQ7BQbmLUuGgwTfTVqgQniwNmm/JEpLtcqN7TpjhUzzc5YZG8uJFOWOkLZVhj5AMZVVk2yfgL8usmKlFGRdaEfvwspL6aFOvKUoviJwcTCkQ5L3pZOM9oXC5WvJj4VGG0/JiGb7qXDeVDi8P1OwxGbs6jZan5hjZIK/6VSI9gnUiT26n+k0ftYFwDogYuScOwTsOUkmIdSHeDDWUTMTqE8+n6/XDwBCPM9fbYMELxdW33DKSowUJYlTjVzmgNJH3toOEMXqZq54wqJ3835Sd6rTJ7/XRoMIfGQ1n18iPX6566Lo8pX4sDwxmvDNpgBjG5rpC71gveANVBehI0D9c01ajLqF+upokyPmmWziwjRIdnKRriFAgWsaa3gse8qDZEWineK6P3pocx0UAr5oVi04IE0eo3jBDSA09c0E36lyIBV4dp5XxOYqFY5GoZXwepX8tqtQLzVqmFSs8mWE5yLJcrLBcrVCpOfJnGECfGvOCYm8k32FhdAw1TYUl1K6YhNBHaCUH8muAFywkaWYnRxq7RcoMPQAjBYrkSH75MZ7IjlSGaUorFYgnXdVGpVILYNxKhxCYaoPRe050oK/WJJnbdlopHjrMCcR8v3JVictJiFSSY2MQ4PrhU8dQpheu6WCyWqa0opbIeLIP0u7uJMq0olg1Fynj02IzIjrnYgvojBQtT/fAzgpSz6CFlXC+rMt2olf8LfSsUlzHc3Y0ja8rPRWpOFqUUk/t7TKdTNBqNcHdggpymmZyEEwHjCK9sC1KH2oTrk39PbkjV0fvV1TCi36NetlYvpRTT6RST+2mqL2/5Pz0W8ayv9wEYAAAAAElFTkSuQmCC";t.Z=e=>{let{user:t,timeElapsed:n,hideOptions:a}=e;const[c,l]=(0,o.useState)(t?.avatarUrl||s),u=(0,o.useCallback)((()=>{c!==s&&l(s)}),[c]);return(0,r.jsxs)("div",{className:"facebook-preview__post-header",children:[(0,r.jsxs)("div",{className:"facebook-preview__post-header-content",children:[(0,r.jsx)("img",{className:"facebook-preview__post-header-avatar",src:c,alt:"",onError:u}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"facebook-preview__post-header-name",children:t?.displayName|| // translators: name of a fictional Facebook User __("Anonymous User","jetpack")}),(0,r.jsxs)("div",{className:"facebook-preview__post-header-share",children:[(0,r.jsx)("span",{className:"facebook-preview__post-header-time",children:n?__( // translators: short version of `1 hour` "1h","jetpack"):_x( // translators: temporal indication of when a post was published "Just now","","jetpack")}),(0,r.jsx)("span",{className:"facebook-preview__post-header-dot","aria-hidden":"true",children:"·"}),(0,r.jsx)(i.Z,{name:"public"})]})]})]}),!a&&(0,r.jsx)("div",{className:"facebook-preview__post-header-more"})]})}},69094:function(e,t,n){"use strict";var r=n(30275);n(40888);t.Z=e=>{let{name:t}=e;return(0,r.jsx)("i",{className:`facebook-preview__post-icon facebook-preview__post-icon-${t}`})}},13477:function(e,t,n){"use strict";n.d(t,{S:function(){return u}});var r=n(30275),a=n(55609),o=n(65736),i=n(10263),s=n(7558),c=n(26767),l=n(34245);const __=o.__,u=e=>{let{headingLevel:t,hideLinkPreview:n,hidePostPreview:o,...u}=e;const d=!!u.media?.length,p=!!u.customImage;return(0,r.jsxs)("div",{className:"social-preview facebook-preview",children:[!o&&(0,r.jsxs)("section",{className:"social-preview__section facebook-preview__section",children:[(0,r.jsx)(i.Z,{level:t,children: // translators: refers to a social post on Facebook __("Your post","jetpack")}),(0,r.jsx)("p",{className:"social-preview__section-desc",children:__("This is what your social post will look like on Facebook:","jetpack")}),d?(0,r.jsx)(l.C,{...u}):(0,r.jsx)(s.g,{...u})]}),!n&&(0,r.jsxs)("section",{className:"social-preview__section facebook-preview__section",children:[(0,r.jsx)(i.Z,{level:t,children: // translators: refers to a link to a Facebook post __("Link preview","jetpack")}),(0,r.jsxs)("p",{className:"social-preview__section-desc",children:[__("This is what it will look like when someone shares the link to your WordPress post on Facebook.","jetpack")," ",(0,r.jsx)(a.ExternalLink,{href:"https://jetpack.com/support/jetpack-social-image-generator",children:__("Learn more about links","jetpack")})]}),p?(0,r.jsx)(c.F,{...u}):(0,r.jsx)(s.g,{...u,compactDescription:!0,customText:"",user:void 0})]})]})}},17915:function(e,t,n){"use strict";n.d(t,{X:function(){return l}});var r=n(30275),a=n(21987);n(73443);const o=160,i=e=>{const t=e.startsWith("https://")?"https://":"http://",n=t+e.replace(t,"").split("/").join(" › ");return(0,a.SL)((0,a.hs)(68),(0,a.KB)(68))(n)},s=(0,a.SL)((0,a.hs)(63),(0,a.I$)(23,73),(0,a.KB)(63)),c=(0,a.SL)((0,a.hs)(o),(0,a.I$)(80,170),(0,a.KB)(o)),l=e=>{let{description:t="",siteTitle:n,title:o="",url:l=""}=e;const u=(0,a.wy)(l);return(0,r.jsx)("div",{className:"search-preview",children:(0,r.jsxs)("div",{className:"search-preview__display",children:[(0,r.jsxs)("div",{className:"search-preview__header",children:[(0,r.jsxs)("div",{className:"search-preview__branding",children:[(0,r.jsx)("img",{className:"search-preview__icon",src:`https://www.google.com/s2/favicons?sz=128&domain_url=${u}`,alt:""}),(0,r.jsxs)("div",{className:"search-preview__site",children:[(0,r.jsx)("div",{className:"search-preview__site--title",children:n||u}),(0,r.jsx)("div",{className:"search-preview__url",children:i(l)})]})]}),(0,r.jsx)("div",{className:"search-preview__menu",children:(0,r.jsx)("svg",{focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})})})]}),(0,r.jsx)("div",{className:"search-preview__title",children:s(o)}),(0,r.jsx)("div",{className:"search-preview__description",children:c((0,a.ju)(t))})]})})}},21987:function(e,t,n){"use strict";n.d(t,{I$:function(){return c},KB:function(){return l},SL:function(){return u},YW:function(){return m},ge:function(){return p},hs:function(){return s},ju:function(){return d},u_:function(){return g},wy:function(){return i}});var r=n(30275),a=n(69307),o=n(65736);const i=e=>e.replace(/^[^/]+[/]*/,"").replace(/\/.*$/,""),s=e=>t=>t.length<=e&&t,c=(e,t)=>n=>{const r=n.slice(0,t),a=r.lastIndexOf(" ");return a>e&&a<t&&r.slice(0,a).concat("…")},l=e=>t=>t.slice(0,e).concat("…"),u=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>t.find((t=>!1!==t(e)))?.(e)},d=function(e){const t=new RegExp(`(<([^${(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).join("")}>]+)>)`,"gi");return e?e.replace(t,""):""},p=(e,t)=>new RegExp(`<${t}[^>]*>`,"gi").test(e),m=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}).format,h={twitter:"https://twitter.com/hashtag/%1$s",facebook:"https://www.facebook.com/hashtag/%1$s",linkedin:"https://www.linkedin.com/feed/hashtag/?keywords=%1$s",instagram:"https://www.instagram.com/explore/tags/%1$s",mastodon:"https://%2$s/tags/%1$s"};function g(e,t){const{platform:n,maxChars:i,maxLines:s,hyperlinkHashtags:c=!0,hyperlinkUrls:l="instagram"!==n}=t;let u=d(e);if(u=u.replaceAll(/(?:\s*[\n\r]){2,}/g,"\n\n"),i&&u.length>i&&(u=u.substring(0,i)),s){const e=u.split("\n");e.length>s&&(u=e.slice(0,s).join("\n"))}const p={};if(l){(u.match(/(https?:\/\/\S+)/g)||[]).forEach(((e,t)=>{p[`Link${t}`]=(0,r.jsx)("a",{href:e,rel:"noopener noreferrer",target:"_blank",children:e}),u=u.replace(e,`<Link${t} />`)}))}if(c&&h[n]){const e=u.matchAll(/(^|\s)#(\w+)/g),a=h[n];[...e].forEach(((e,n)=>{let[i,s,c]=e;const l=(0,o.sprintf)(a,c,t.hashtagDomain);p[`Hashtag${n}`]=(0,r.jsx)("a",{href:l,rel:"noopener noreferrer",target:"_blank",children:`#${c}`}),u=u.replace(i,`${s}<Hashtag${n} />`)}))}return u=u.replace(/\n/g,"<br />"),p.br=(0,r.jsx)("br",{}),(0,a.createInterpolateElement)(u,p)}},81683:function(e,t,n){"use strict";n.d(t,{A:function(){return r},P:function(){return a}});const r=120,a=2},68280:function(e,t,n){"use strict";n.d(t,{r:function(){return a}});var r=n(30275);const a=()=>(0,r.jsx)("svg",{color:"rgb(38, 38, 38)",fill:"rgb(38, 38, 38)",height:"24",role:"img",viewBox:"0 0 24 24",width:"24",children:(0,r.jsx)("polygon",{fill:"none",points:"20 21 12 13.44 4 21 4 3 20 3 20 21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})},68536:function(e,t,n){"use strict";n.d(t,{s:function(){return a}});var r=n(30275);const a=()=>(0,r.jsx)("svg",{color:"rgb(38, 38, 38)",fill:"rgb(38, 38, 38)",height:"24",role:"img",viewBox:"0 0 24 24",width:"24",children:(0,r.jsx)("path",{d:"M20.656 17.008a9.993 9.993 0 1 0-3.59 3.615L22 22Z",fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"2"})})},32854:function(e,t,n){"use strict";n.d(t,{q:function(){return a}});var r=n(30275);const a=()=>(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 340 340",width:"340",height:"340",children:(0,r.jsx)("path",{fill:"#DDD",d:"m169,.5a169,169 0 1,0 2,0zm0,86a76,76 0 1 1-2,0zM57,287q27-35 67-35h92q40,0 67,35a164,164 0 0,1-226,0"})})},15082:function(e,t,n){"use strict";n.d(t,{X:function(){return a}});var r=n(30275);const a=()=>(0,r.jsx)("svg",{color:"rgb(38, 38, 38)",fill:"rgb(38, 38, 38)",height:"24",role:"img",viewBox:"0 0 24 24",width:"24",children:(0,r.jsx)("path",{d:"M16.792 3.904A4.989 4.989 0 0 1 21.5 9.122c0 3.072-2.652 4.959-5.197 7.222-2.512 2.243-3.865 3.469-4.303 3.752-.477-.309-2.143-1.823-4.303-3.752C5.141 14.072 2.5 12.167 2.5 9.122a4.989 4.989 0 0 1 4.708-5.218 4.21 4.21 0 0 1 3.675 1.941c.84 1.175.98 1.763 1.12 1.763s.278-.588 1.11-1.766a4.17 4.17 0 0 1 3.679-1.938m0-2a6.04 6.04 0 0 0-4.797 2.127 6.052 6.052 0 0 0-4.787-2.127A6.985 6.985 0 0 0 .5 9.122c0 3.61 2.55 5.827 5.015 7.97.283.246.569.494.853.747l1.027.918a44.998 44.998 0 0 0 3.518 3.018 2 2 0 0 0 2.174 0 45.263 45.263 0 0 0 3.626-3.115l.922-.824c.293-.26.59-.519.885-.774 2.334-2.025 4.98-4.32 4.98-7.94a6.985 6.985 0 0 0-6.708-7.218Z"})})},59215:function(e,t,n){"use strict";n.d(t,{v:function(){return a}});var r=n(30275);const a=()=>(0,r.jsxs)("svg",{width:"17",height:"5",viewBox:"0 0 17 5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M2.11865 3.5C2.67094 3.5 3.11865 3.05228 3.11865 2.5C3.11865 1.94772 2.67094 1.5 2.11865 1.5C1.56637 1.5 1.11865 1.94772 1.11865 2.5C1.11865 3.05228 1.56637 3.5 2.11865 3.5Z",fill:"black",stroke:"black",strokeWidth:"2"}),(0,r.jsx)("path",{d:"M8.55933 3.5C9.11161 3.5 9.55933 3.05228 9.55933 2.5C9.55933 1.94772 9.11161 1.5 8.55933 1.5C8.00704 1.5 7.55933 1.94772 7.55933 2.5C7.55933 3.05228 8.00704 3.5 8.55933 3.5Z",fill:"black",stroke:"black",strokeWidth:"2"}),(0,r.jsx)("path",{d:"M15 3.5C15.5523 3.5 16 3.05228 16 2.5C16 1.94772 15.5523 1.5 15 1.5C14.4477 1.5 14 1.94772 14 2.5C14 3.05228 14.4477 3.5 15 3.5Z",fill:"black",stroke:"black",strokeWidth:"2"})]})},46353:function(e,t,n){"use strict";n.d(t,{m:function(){return a}});var r=n(30275);const a=()=>(0,r.jsxs)("svg",{color:"rgb(38, 38, 38)",fill:"rgb(38, 38, 38)",height:"24",role:"img",viewBox:"0 0 24 24",width:"24",children:[(0,r.jsx)("line",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"2",x1:"22",x2:"9.218",y1:"3",y2:"10.083"}),(0,r.jsx)("polygon",{fill:"none",points:"11.698 20.334 22 3.001 2 3.001 9.218 10.084 11.698 20.334",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"2"})]})},18131:function(e,t,n){"use strict";n.d(t,{R:function(){return m}});var r=n(30275),a=n(65736),o=n(21987),i=n(81683),s=n(68280),c=n(68536),l=n(32854),u=n(15082),d=n(59215),p=n(46353);n(78296);const __=a.__;function m(e){let{image:t,media:n,name:a,profileImage:m,caption:h}=e;const g=a||"username",f=n?.[0];return(0,r.jsx)("div",{className:"instagram-preview__wrapper",children:(0,r.jsxs)("section",{className:"instagram-preview__container",children:[(0,r.jsxs)("div",{className:"instagram-preview__header",children:[(0,r.jsx)("div",{className:"instagram-preview__header--avatar",children:m?(0,r.jsx)("img",{src:m,alt:""}):(0,r.jsx)(l.q,{})}),(0,r.jsxs)("div",{className:"instagram-preview__header--profile",children:[(0,r.jsx)("div",{className:"instagram-preview__header--profile-name",children:g}),(0,r.jsx)("div",{className:"instagram-preview__header--profile-menu",children:(0,r.jsx)(d.v,{})})]})]}),(0,r.jsx)("div",{className:"instagram-preview__media",children:f?(0,r.jsx)("div",{className:"instagram-preview__media-item",children:f.type.startsWith("video/")?(0,r.jsx)("video",{controls:!1,className:"instagram-preview__media--video",children:(0,r.jsx)("source",{src:f.url,type:f.type})}):(0,r.jsx)("img",{className:"instagram-preview__media--image",src:t,alt:""})}):(0,r.jsx)("img",{className:"instagram-preview__media--image",src:t,alt:""})}),(0,r.jsxs)("div",{className:"instagram-preview__content",children:[(0,r.jsxs)("section",{className:"instagram-preview__content--actions",children:[(0,r.jsxs)("div",{className:"instagram-preview__content--actions-primary",children:[(0,r.jsx)(u.X,{}),(0,r.jsx)(c.s,{}),(0,r.jsx)(p.m,{})]}),(0,r.jsx)("div",{className:"instagram-preview__content--actions-secondary",children:(0,r.jsx)(s.r,{})})]}),(0,r.jsxs)("div",{className:"instagram-preview__content--body",children:[(0,r.jsx)("div",{className:"instagram-preview__content--name",children:g})," ",h?(0,r.jsx)("div",{className:"instagram-preview__content--text",children:(0,o.u_)(h,{platform:"instagram",maxChars:i.A,maxLines:i.P})}):null]}),(0,r.jsx)("div",{className:"instagram-preview__content--footer",children:(0,r.jsx)("span",{children:__("View one comment","jetpack")})})]})]})})}},4049:function(e,t,n){"use strict";n.d(t,{V:function(){return s}});var r=n(30275),a=n(65736),o=n(10263),i=n(18131);const __=a.__,s=e=>{let{headingLevel:t,hidePostPreview:n,...a}=e;return(0,r.jsx)("div",{className:"social-preview instagram-preview",children:!n&&(0,r.jsxs)("section",{className:"social-preview__section instagram-preview__section",children:[(0,r.jsx)(o.Z,{level:t,children: // translators: refers to a social post on Instagram __("Your post","jetpack")}),(0,r.jsx)("p",{className:"social-preview__section-desc",children:__("This is what your social post will look like on Instagram:","jetpack")}),(0,r.jsx)(i.R,{...a})]})})}},24687:function(e,t,n){"use strict";n.d(t,{A:function(){return r},P:function(){return a}});const r=212,a=3},52493:function(e,t,n){"use strict";n.d(t,{q:function(){return a}});var r=n(30275);const a=()=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 128 128",width:"128",height:"128",children:[(0,r.jsx)("path",{fill:"#e7e2dc",d:"M0 0h128v128H0z"}),(0,r.jsx)("path",{d:"M88.41 84.67a32 32 0 10-48.82 0 66.13 66.13 0 0148.82 0z",fill:"#788fa5"}),(0,r.jsx)("path",{d:"M88.41 84.67a32 32 0 01-48.82 0A66.79 66.79 0 000 128h128a66.79 66.79 0 00-39.59-43.33z",fill:"#9db3c8"}),(0,r.jsx)("path",{d:"M64 96a31.93 31.93 0 0024.41-11.33 66.13 66.13 0 00-48.82 0A31.93 31.93 0 0064 96z",fill:"#56687a"})]})},23736:function(e,t,n){"use strict";n.d(t,{u:function(){return o}});var r=n(30275),a=n(98170);function o(e){return(0,r.jsx)(a.w,{name:"",profileImage:"",...e,description:"",media:void 0})}},98170:function(e,t,n){"use strict";n.d(t,{w:function(){return c}});var r=n(30275),a=n(65736),o=n(21987),i=n(24687),s=n(52493);n(44046);const __=a.__;function c(e){let{articleReadTime:t=5,image:n,jobTitle:c,name:l,profileImage:u,description:d,media:p,title:m,url:h}=e;const g=!!p?.length;return(0,r.jsx)("div",{className:"linkedin-preview__wrapper",children:(0,r.jsxs)("section",{className:"linkedin-preview__container "+(g?"has-media":""),children:[(0,r.jsxs)("div",{className:"linkedin-preview__header",children:[(0,r.jsx)("div",{className:"linkedin-preview__header--avatar",children:u?(0,r.jsx)("img",{src:u,alt:""}):(0,r.jsx)(s.q,{})}),(0,r.jsxs)("div",{className:"linkedin-preview__header--profile",children:[(0,r.jsxs)("div",{className:"linkedin-preview__header--profile-info",children:[(0,r.jsx)("div",{className:"linkedin-preview__header--profile-name",children:l||__("Account Name","jetpack")}),(0,r.jsx)("span",{children:"•"}),(0,r.jsx)("div",{className:"linkedin-preview__header--profile-actor",children: // translators: refers to the actor level of the post being shared, e.g. "1st", "2nd", "3rd", etc. __("1st","jetpack")})]}),c?(0,r.jsx)("div",{className:"linkedin-preview__header--profile-title",children:c}):null,(0,r.jsxs)("div",{className:"linkedin-preview__header--profile-meta",children:[(0,r.jsx)("span",{children: // translators: refers to the time since the post was published, e.g. "1h" __("1h","jetpack")}),(0,r.jsx)("span",{children:"•"}),(0,r.jsx)("svg",{viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",focusable:"false",children:(0,r.jsx)("path",{d:"M8 1a7 7 0 107 7 7 7 0 00-7-7zM3 8a5 5 0 011-3l.55.55A1.5 1.5 0 015 6.62v1.07a.75.75 0 00.22.53l.56.56a.75.75 0 00.53.22H7v.69a.75.75 0 00.22.53l.56.56a.75.75 0 01.22.53V13a5 5 0 01-5-5zm6.24 4.83l2-2.46a.75.75 0 00.09-.8l-.58-1.16A.76.76 0 0010 8H7v-.19a.51.51 0 01.28-.45l.38-.19a.74.74 0 01.68 0L9 7.5l.38-.7a1 1 0 00.12-.48v-.85a.78.78 0 01.21-.53l1.07-1.09a5 5 0 01-1.54 9z"})})]})]})]}),(0,r.jsxs)("div",{className:"linkedin-preview__content",children:[d?(0,r.jsx)("div",{className:"linkedin-preview__caption",children:(0,o.u_)(d,{platform:"linkedin",maxChars:i.A,maxLines:i.P})}):null,g?(0,r.jsx)("div",{className:"linkedin-preview__media",children:p.map(((e,t)=>(0,r.jsx)("div",{className:"linkedin-preview__media-item",children:e.type.startsWith("video/")?(0,r.jsx)("video",{controls:!0,children:(0,r.jsx)("source",{src:e.url,type:e.type})}):(0,r.jsx)("img",{alt:e.alt||"",src:e.url})},`linkedin-preview__media-item-${t}`)))}):(0,r.jsxs)("article",{children:[n?(0,r.jsx)("img",{className:"linkedin-preview__image",src:n,alt:""}):null,h?(0,r.jsxs)("div",{className:"linkedin-preview__description",children:[(0,r.jsx)("h2",{className:"linkedin-preview__description--title",children:m}),(0,r.jsxs)("div",{className:"linkedin-preview__description--meta",children:[(0,r.jsx)("span",{className:"linkedin-preview__description--url",children:(0,o.wy)(h)}),(0,r.jsx)("span",{children:"•"}),(0,r.jsx)("span",{children:(0,a.sprintf)( // translators: %d is the number of minutes it takes to read the article __("%d min read","jetpack"),t)})]})]}):null]})]})]})})}},93453:function(e,t,n){"use strict";n.d(t,{S:function(){return l}});var r=n(30275),a=n(55609),o=n(65736),i=n(10263),s=n(23736),c=n(98170);const __=o.__,l=e=>{let{headingLevel:t,hideLinkPreview:n,hidePostPreview:o,...l}=e;return(0,r.jsxs)("div",{className:"social-preview linkedin-preview",children:[!o&&(0,r.jsxs)("section",{className:"social-preview__section linkedin-preview__section",children:[(0,r.jsx)(i.Z,{level:t,children: // translators: refers to a social post on LinkedIn __("Your post","jetpack")}),(0,r.jsx)("p",{className:"social-preview__section-desc",children:__("This is what your social post will look like on LinkedIn:","jetpack")}),(0,r.jsx)(c.w,{...l})]}),!n&&(0,r.jsxs)("section",{className:"social-preview__section linkedin-preview__section",children:[(0,r.jsx)(i.Z,{level:t,children: // translators: refers to a link to a LinkedIn post __("Link preview","jetpack")}),(0,r.jsxs)("p",{className:"social-preview__section-desc",children:[__("This is what it will look like when someone shares the link to your WordPress post on LinkedIn.","jetpack")," ",(0,r.jsx)(a.ExternalLink,{href:"https://jetpack.com/support/jetpack-social-image-generator",children:__("Learn more about links","jetpack")})]}),(0,r.jsx)(s.u,{...l,name:"",profileImage:""})]})]})}},64011:function(e,t,n){"use strict";n.d(t,{q:function(){return r}});const r="mastodon.social"},82335:function(e,t,n){"use strict";n.d(t,{Eu:function(){return s},WV:function(){return c},eP:function(){return l},tZ:function(){return i}});var r=n(21987),a=n(64011);const o=/^@([^@]*)@([^@]*)$/i,i=e=>(0,r.SL)((0,r.hs)(200),(0,r.KB)(200))((0,r.ju)(e))||"",s=(e,t)=>{const{instance:n,offset:a}=t;return(0,r.u_)(e,{platform:"mastodon",maxChars:470-a,hashtagDomain:n})},c=e=>(0,r.SL)((0,r.hs)(30),(0,r.KB)(30))((0,r.ju)(e))||"",l=e=>{const t=e.match(o);return{username:t?.[1]||"",instance:t?.[2]||a.q}}},16534:function(e,t,n){"use strict";n.d(t,{W:function(){return c}});var r=n(30275),a=n(93397),o=n(3440),i=n(37951),s=n(52664);n(46154);const c=e=>{const{user:t}=e;return(0,r.jsxs)("div",{className:"mastodon-preview__post",children:[(0,r.jsx)(s.Z,{user:t}),(0,r.jsx)(o.Z,{...e}),(0,r.jsx)(i.Z,{...e}),(0,r.jsx)(a.Z,{})]})}},67686:function(e,t,n){"use strict";n.d(t,{h:function(){return c}});var r=n(30275),a=n(65736),o=n(93397),i=n(3440),s=n(52664);n(46154);const __=a.__,c=e=>{const{user:t,customImage:n,image:a}=e,c=n||a;return(0,r.jsxs)("div",{className:"mastodon-preview__post",children:[(0,r.jsx)(s.Z,{user:t}),(0,r.jsx)(i.Z,{...e,children:c&&(0,r.jsx)("img",{className:"mastodon-preview__img",src:c,alt:__("Mastodon preview thumbnail","jetpack")})}),(0,r.jsx)(o.Z,{})]})}},93397:function(e,t,n){"use strict";var r=n(30275),a=n(65736),o=n(34525);n(7679);const __=a.__;t.Z=()=>(0,r.jsx)("div",{className:"mastodon-preview__post-actions",children:(0,r.jsx)("ul",{children:[{icon:"reply", // translators: "Reply" action on a Mastodon post label:__("Reply","jetpack"),text:0},{icon:"boost", // translators: "Boost" action on a Mastodon post label:__("Boost","jetpack")},{icon:"like", // translators: "Favourite" action on a Mastodon post label:__("Favourite","jetpack")},{icon:"bookmark", // translators: "Bookmark" action on a Mastodon post label:__("Bookmark","jetpack")},{icon:"more", // translators: "More" menu on a Mastodon post label:__("More","jetpack")}].map((e=>{let{icon:t,label:n,text:a}=e;return(0,r.jsxs)("li",{"aria-label":n,children:[(0,r.jsx)("span",{className:"mastodon-preview__post-icon-wrapper",children:(0,r.jsx)(o.Z,{name:t})}),("number"==typeof a||a)&&(0,r.jsx)("span",{className:"mastodon-preview__post-icon-text",children:a})]},t)}))})})},3440:function(e,t,n){"use strict";var r=n(30275),a=n(21987),o=n(82335);n(15184);t.Z=e=>{const{title:t,description:n,customText:i,url:s,user:c,children:l}=e,u={instance:c?.address?(0,o.eP)(c.address).instance:"",offset:0};let d;if(i)d=(0,r.jsx)("p",{children:(0,o.Eu)(i,u)});else if(n){const e=(0,a.ju)(t);u.offset=e.length,d=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{children:e}),(0,r.jsx)("p",{children:(0,o.Eu)(n,u)})]})}else d=(0,r.jsx)("p",{children:(0,o.Eu)(t,u)});return(0,r.jsxs)("div",{className:"mastodon-preview__body",children:[d,(0,r.jsx)("a",{href:s,target:"_blank",rel:"noreferrer noopener",children:(0,o.WV)(s.replace(/^https?:\/\//,""))}),l]})}},37951:function(e,t,n){"use strict";var r=n(30275),a=n(65736),o=n(21987),i=n(82335);n(9170);const __=a.__;t.Z=e=>{let{siteName:t,title:n,url:a,image:s,customImage:c}=e;return(0,r.jsxs)("div",{className:"mastodon-preview__card",children:[(0,r.jsx)("div",{className:"mastodon-preview__card-img",children:(s||c)&&(0,r.jsx)("img",{src:s||c,alt:__("Mastodon preview thumbnail","jetpack")})}),(0,r.jsxs)("div",{className:"mastodon-preview__card-text",children:[(0,r.jsx)("span",{className:"mastodon-preview__card-title",children:(0,i.tZ)(n)}),(0,r.jsx)("span",{className:"mastodon-preview__card-site",children:t||(0,o.wy)(a)})]})]})}},52664:function(e,t,n){"use strict";var r=n(30275),a=n(65736),o=n(64011),i=n(34525);n(32295);const __=a.__;t.Z=e=>{let{user:t}=e;const{displayName:n,address:a,avatarUrl:s}=t||{};return(0,r.jsxs)("div",{className:"mastodon-preview__post-header",children:[(0,r.jsxs)("div",{className:"mastodon-preview__post-header-user",children:[s&&(0,r.jsx)("img",{className:"mastodon-preview__post-avatar",src:s,alt:""}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"mastodon-preview__post-header-displayname",children:n|| // translators: username of a fictional Mastodon User __("anonymous-user","jetpack")}),(0,r.jsx)("div",{className:"mastodon-preview__post-header-username",children:a?.replace(`@${o.q}`,"")})]})]}),(0,r.jsxs)("div",{className:"mastodon-preview__post-header-audience",children:[(0,r.jsx)(i.Z,{name:"globe"}), // translators: time elapsed since post was published (1 hour) __("1h","jetpack")]})]})}},34525:function(e,t,n){"use strict";var r=n(30275);n(61154);t.Z=e=>{let{name:t}=e;return(0,r.jsx)("i",{className:`mastodon-preview__post-icon mastodon-preview__post-icon-${t}`})}},60312:function(e,t,n){"use strict";n.d(t,{I:function(){return l}});var r=n(30275),a=n(55609),o=n(65736),i=n(10263),s=n(16534),c=n(67686);const __=o.__,l=e=>{let{headingLevel:t,hidePostPreview:n,hideLinkPreview:o,...l}=e;return(0,r.jsxs)("div",{className:"social-preview mastodon-preview",children:[!n&&(0,r.jsxs)("section",{className:"social-preview__section mastodon-preview__section",children:[(0,r.jsx)(i.O,{level:t,children: // translators: refers to a social post on Mastodon __("Your post","jetpack")}),(0,r.jsx)("p",{className:"social-preview__section-desc",children:__("This is what your social post will look like on Mastodon:","jetpack")}),(0,r.jsx)(c.h,{...l})]}),!o&&(0,r.jsxs)("section",{className:"social-preview__section mastodon-preview__section",children:[(0,r.jsx)(i.O,{level:t,children: // translators: refers to a link to a Mastodon post __("Link preview","jetpack")}),(0,r.jsxs)("p",{className:"social-preview__section-desc",children:[__("This is what it will look like when someone shares the link to your WordPress post on Mastodon.","jetpack")," ",(0,r.jsx)(a.ExternalLink,{href:"https://jetpack.com/support/jetpack-social-image-generator",children:__("Learn more about links","jetpack")})]}),(0,r.jsx)(s.W,{...l,user:void 0})]})]})}},10263:function(e,t,n){"use strict";n.d(t,{O:function(){return o}});var r=n(30275);const a=[2,3,4,5,6],o=e=>{let{className:t,level:n,children:o}=e;const i=`h${n&&a.includes(n)?n:3}`;return(0,r.jsx)(i,{className:`social-preview__section-heading ${t??""}`,children:o})};t.Z=o},80748:function(e,t,n){"use strict";n.d(t,{G:function(){return o},M:function(){return a}});var r=n(21987);const a=e=>(0,r.SL)((0,r.hs)(1e3),(0,r.KB)(1e3))((0,r.ju)(e))||"",o=e=>(0,r.SL)((0,r.hs)(400),(0,r.KB)(400))((0,r.ju)(e))||""},96492:function(e,t,n){"use strict";n.d(t,{H:function(){return l}});var r=n(30275),a=n(65736),o=n(21987),i=n(80748),s=n(91100),c=n(5536);n(5609);const __=a.__,l=e=>{let{title:t,description:n,image:a,user:l,url:u}=e;const d=l?.avatarUrl;return(0,r.jsxs)("div",{className:"tumblr-preview__post",children:[d&&(0,r.jsx)("img",{className:"tumblr-preview__avatar",src:d,alt:""}),(0,r.jsxs)("div",{className:"tumblr-preview__card",children:[(0,r.jsx)(c.Z,{user:l}),(0,r.jsxs)("div",{className:"tumblr-preview__window",children:[a&&(0,r.jsxs)("div",{className:"tumblr-preview__window-top",children:[(0,r.jsx)("div",{className:"tumblr-preview__overlay",children:(0,r.jsx)("div",{className:"tumblr-preview__title",children:(0,i.M)(t)})}),(0,r.jsx)("img",{className:"tumblr-preview__image",src:a,alt:__("Tumblr preview thumbnail","jetpack")})]}),(0,r.jsxs)("div",{className:"tumblr-preview__window-bottom "+(a?"":"is-full"),children:[!a&&(0,r.jsx)("div",{className:"tumblr-preview__title",children:(0,i.M)(t)}),n&&a&&(0,r.jsx)("div",{className:"tumblr-preview__description",children:(0,i.G)(n)}),u&&(0,r.jsx)("div",{className:"tumblr-preview__site-name",children:(0,o.wy)(u)})]})]}),(0,r.jsx)(s.Z,{})]})]})}},97450:function(e,t,n){"use strict";n.d(t,{x:function(){return c}});var r=n(30275),a=n(65736),o=n(80748),i=n(91100),s=n(5536);n(5609);const __=a.__,c=e=>{let{title:t,description:n,image:a,user:c,url:l,customText:u,media:d}=e;const p=c?.avatarUrl,m=d?.[0];return(0,r.jsxs)("div",{className:"tumblr-preview__post",children:[p&&(0,r.jsx)("img",{className:"tumblr-preview__avatar",src:p,alt:""}),(0,r.jsxs)("div",{className:"tumblr-preview__card",children:[(0,r.jsx)(s.Z,{user:c}),(0,r.jsxs)("div",{className:"tumblr-preview__body",children:[(0,r.jsx)("div",{className:"tumblr-preview__title",children:(0,o.M)(t)}),u&&(0,r.jsx)("div",{className:"tumblr-preview__custom-text",children:u}),n&&(0,r.jsx)("div",{className:"tumblr-preview__description",children:(0,o.G)(n)}),m?(0,r.jsx)("div",{className:"tumblr-preview__media-item",children:m.type.startsWith("video/")?(0,r.jsx)("video",{controls:!0,className:"tumblr-preview__media--video",children:(0,r.jsx)("source",{src:m.url,type:m.type})}):(0,r.jsx)("img",{className:"tumblr-preview__image",src:a,alt:""})}):a&&(0,r.jsx)("img",{className:"tumblr-preview__image",src:a,alt:__("Tumblr preview thumbnail","jetpack")}),(0,r.jsx)("a",{className:"tumblr-preview__url",href:l,target:"_blank",rel:"noreferrer",children:__("View On WordPress","jetpack")})]}),(0,r.jsx)(i.Z,{})]})]})}},91100:function(e,t,n){"use strict";var r=n(30275),a=n(65736),o=n(22313);n(91680);const __=a.__;t.Z=()=>(0,r.jsxs)("div",{className:"tumblr-preview__post-actions",children:[(0,r.jsxs)("div",{className:"tumblr-preview__post-manage-actions",children:[(0,r.jsxs)("div",{className:"tumblr-preview__post-actions-blaze",children:[(0,r.jsx)(o.Z,{name:"blaze"})," Blaze"]}),(0,r.jsx)("ul",{children:[{icon:"delete", // translators: "Delete" action on a Tumblr post label:__("Delete","jetpack")},{icon:"edit", // translators: "Edit" action on a Tumblr post label:__("Edit","jetpack")}].map((e=>{let{icon:t,label:n}=e;return(0,r.jsx)("li",{"aria-label":n,children:(0,r.jsx)(o.Z,{name:t})},t)}))})]}),(0,r.jsxs)("div",{className:"tumblr-preview__post-social-actions",children:[(0,r.jsx)("div",{children: // translators: count of notes on a Tumblr post __("0 notes","jetpack")}),(0,r.jsx)("ul",{children:[{icon:"share", // translators: "Share" action on a Tumblr post label:__("Share","jetpack")},{icon:"reply", // translators: "Reply" action on a Tumblr post label:__("Reply","jetpack")},{icon:"reblog", // translators: "Reblog" action on a Tumblr post label:__("Reblog","jetpack")},{icon:"like", // translators: "Like" action on a Tumblr post label:__("Like","jetpack")}].map((e=>{let{icon:t,label:n}=e;return(0,r.jsx)("li",{"aria-label":n,children:(0,r.jsx)(o.Z,{name:t})},t)}))})]})]})},5536:function(e,t,n){"use strict";var r=n(30275),a=n(65736),o=n(22313);n(49304);const __=a.__;t.Z=e=>{let{user:t}=e;return(0,r.jsxs)("div",{className:"tumblr-preview__post-header",children:[(0,r.jsx)("div",{className:"tumblr-preview__post-header-username",children:t?.displayName|| // translators: username of a fictional Tumblr User __("anonymous-user","jetpack")}),(0,r.jsx)(o.Z,{name:"ellipsis"})]})}},22313:function(e,t,n){"use strict";var r=n(30275);n(27212);t.Z=e=>{let t,{name:n}=e;switch(n){case"blaze":t=(0,r.jsx)("svg",{viewBox:"0 0 25 22",children:(0,r.jsx)("path",{d:"m7.5059-0.24414c-0.79843 0.057223-1.2169 0.88587-1.1635 1.6128-0.2266 2.0449-1.4898 3.8696-3.1975 4.9778-3.0182 2.414-4.2201 6.8066-2.8033 10.411 0.92417 2.4679 2.9589 4.5674 5.4768 5.3928 0.95914 0.16102 1.7233-0.94358 1.3074-1.8059-0.11578-0.51062-0.17482-0.96516-0.17845-1.487 1.0413 1.5607 2.5484 2.8986 4.341 3.4975 1.0396-0.0154 1.98-0.64458 2.8516-1.1608 3.3821-2.1786 4.9604-6.7097 3.6597-10.518-0.49144-1.4599-1.2948-2.8935-2.5028-3.8698-0.7512-0.45498-1.661 0.09677-1.9202 0.86038-0.12274 0.16822-0.70352 1.1955-0.6191 0.61976 0.25488-3.4397-1.6789-7.0066-4.8123-8.4958-0.14322-0.037843-0.292-0.049464-0.43945-0.035156zm1.0586 3.5605c1.8947 2.0016 2.2326 5.1984 0.89062 7.5879-0.38498 0.96148 0.71762 2.0063 1.6567 1.5681 1.4159-0.4624 2.6998-1.3259 3.6577-2.4665 1.6442 2.5888 1.1465 6.2819-1.0629 8.3379-0.62378 0.60782-1.3666 1.0945-2.1754 1.4179-1.9543-0.989-3.3534-3.0966-3.5625-5.3125-0.25636-1.0253-1.81-1.2013-2.2852-0.25781-0.75058 1.3054-1.1846 2.7948-1.2305 4.3008-2.2396-1.9852-2.8468-5.4435-1.4609-8.0527 0.58926-1.239 1.651-2.13 2.724-2.9329 1.2958-1.1271 2.2791-2.62 2.7682-4.2683l0.071578 0.069832z"})});break;case"delete":t=(0,r.jsxs)("svg",{viewBox:"0 0 14 17",children:[(0,r.jsx)("path",{d:"M12 5v9c.1.7-.3 1-1 1H3c-.5 0-.9-.3-1-1V5c0-.6-.4-1-1-1-.5 0-1 .4-1 1v9.5C0 16.1 1.4 17 3 17h8c1.8 0 3-.8 3-2.5V5c0-.6-.5-1-1-1-.6 0-1 .5-1 1z"}),(0,r.jsx)("path",{d:"M4 12s0 1 1 1 1-1 1-1V5c0-.5-.4-1-1-1-.5 0-1 .5-1 1v7zm4 0s0 1 1 1 1-1 1-1V5c0-.5-.4-1-1-1-.5 0-1 .5-1 1v7zm5-10c.5 0 1-.4 1-1 0-.5-.4-.9-1-1H1C.5.1 0 .5 0 1c0 .6.6 1 1.1 1H13z"})]});break;case"edit":t=(0,r.jsx)("svg",{viewBox:"0 0 17.6 17.6",children:(0,r.jsx)("path",{d:"M5.3 13.8l-2.1.7.7-2.1L10.3 6l1.4 1.4-6.4 6.4zm6.4-9.3l-1.4-1.4-1.4 1.4-6.7 6.7-.2.5-2 5.9 3.8-1.3 2.1-.7.4-.1.3-.3 7.8-7.8c.1 0-2.7-2.9-2.7-2.9zm5.6-1.4L14.5.3c-.4-.4-1-.4-1.4 0l-1.4 1.4L15.9 6l1.4-1.4c.4-.5.4-1.1 0-1.5"})});break;case"share":t=(0,r.jsx)("svg",{viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M12.6173 1.07612C12.991 0.921338 13.4211 1.00689 13.7071 1.29289L22.7071 10.2929C23.0832 10.669 23.0991 11.2736 22.7433 11.669L13.7433 21.669C13.4663 21.9767 13.0283 22.082 12.6417 21.9336C12.2552 21.7853 12 21.414 12 21V16H11.5C7.31775 16 3.92896 18.2486 2.95256 21.3044C2.80256 21.7738 2.33292 22.064 1.84598 21.9881C1.35904 21.9122 1 21.4928 1 21V18.5C1 12.3162 5.88069 7.27245 12 7.01067V2C12 1.59554 12.2436 1.2309 12.6173 1.07612ZM14 4.41421V8C14 8.55228 13.5523 9 13 9H12.5C7.64534 9 3.64117 12.6414 3.06988 17.3419C5.09636 15.2366 8.18218 14 11.5 14H13C13.5523 14 14 14.4477 14 15V18.394L20.622 11.0362L14 4.41421Z"})});break;case"reply":t=(0,r.jsx)("svg",{viewBox:"0 0 17 17",children:(0,r.jsx)("path",{d:"M8.7 0C4.1 0 .4 3.7.4 8.3c0 1.2.2 2.3.7 3.4-.2.6-.4 1.5-.7 2.5L0 15.8c-.2.7.5 1.4 1.2 1.2l1.6-.4 2.4-.7c1.1.5 2.2.7 3.4.7 4.6 0 8.3-3.7 8.3-8.3C17 3.7 13.3 0 8.7 0zM15 8.3c0 3.5-2.8 6.3-6.4 6.3-1.2 0-2.3-.3-3.2-.9l-3.2.9.9-3.2c-.5-.9-.9-2-.9-3.2.1-3.4 3-6.2 6.5-6.2S15 4.8 15 8.3z"})});break;case"reblog":t=(0,r.jsx)("svg",{viewBox:"0 0 17 18.1",children:(0,r.jsx)("path",{d:"M12.8.2c-.4-.4-.8-.2-.8.4v2H2c-2 0-2 2-2 2v5s0 1 1 1 1-1 1-1v-4c0-1 .5-1 1-1h9v2c0 .6.3.7.8.4L17 3.6 12.8.2zM4.2 17.9c.5.4.8.2.8-.3v-2h10c2 0 2-2 2-2v-5s0-1-1-1-1 1-1 1v4c0 1-.5 1-1 1H5v-2c0-.6-.3-.7-.8-.4L0 14.6l4.2 3.3z"})});break;case"like":t=(0,r.jsx)("svg",{viewBox:"0 0 20 18",children:(0,r.jsx)("path",{d:"M14.658 0c-1.625 0-3.21.767-4.463 2.156-.06.064-.127.138-.197.225-.074-.085-.137-.159-.196-.225C8.547.766 6.966 0 5.35 0 4.215 0 3.114.387 2.162 1.117c-2.773 2.13-2.611 5.89-1.017 8.5 2.158 3.535 6.556 7.18 7.416 7.875A2.3 2.3 0 0 0 9.998 18c.519 0 1.028-.18 1.436-.508.859-.695 5.257-4.34 7.416-7.875 1.595-2.616 1.765-6.376-1-8.5C16.895.387 15.792 0 14.657 0h.001zm0 2.124c.645 0 1.298.208 1.916.683 1.903 1.461 1.457 4.099.484 5.695-1.973 3.23-6.16 6.7-6.94 7.331a.191.191 0 0 1-.241 0c-.779-.631-4.966-4.101-6.94-7.332-.972-1.595-1.4-4.233.5-5.694.619-.475 1.27-.683 1.911-.683 1.064 0 2.095.574 2.898 1.461.495.549 1.658 2.082 1.753 2.203.095-.12 1.259-1.654 1.752-2.203.8-.887 1.842-1.461 2.908-1.461h-.001z"})});break;case"ellipsis":t=(0,r.jsx)("svg",{viewBox:"0 0 17.5 3.9",children:(0,r.jsx)("path",{d:"M17.5 1.9c0 1.1-.9 1.9-1.9 1.9-1.1 0-1.9-.9-1.9-1.9S14.5 0 15.6 0c1 0 1.9.9 1.9 1.9m-6.8 0c0 1.1-.9 1.9-1.9 1.9-1.1.1-2-.8-2-1.9 0-1 .9-1.9 2-1.9s1.9.9 1.9 1.9m-6.8 0c0 1.1-.9 2-2 2-1 0-1.9-.9-1.9-2S.9 0 1.9 0c1.1 0 2 .9 2 1.9"})})}return(0,r.jsx)("span",{className:`tumblr-preview__post-icon tumblr-preview__post-icon-${n}`,children:t})}},1044:function(e,t,n){"use strict";n.d(t,{b:function(){return l}});var r=n(30275),a=n(55609),o=n(65736),i=n(10263),s=n(96492),c=n(97450);const __=o.__,l=e=>{let{headingLevel:t,hideLinkPreview:n,hidePostPreview:o,...l}=e;return(0,r.jsxs)("div",{className:"social-preview tumblr-preview",children:[!o&&(0,r.jsxs)("section",{className:"social-preview__section tumblr-preview__section",children:[(0,r.jsx)(i.O,{level:t,children: // translators: refers to a social post on Tumblr __("Your post","jetpack")}),(0,r.jsx)("p",{className:"social-preview__section-desc",children:__("This is what your social post will look like on Tumblr:","jetpack")}),(0,r.jsx)(c.x,{...l})]}),!n&&(0,r.jsxs)("section",{className:"social-preview__section tumblr-preview__section",children:[(0,r.jsx)(i.O,{level:t,children: // translators: refers to a link on Tumblr __("Link preview","jetpack")}),(0,r.jsxs)("p",{className:"social-preview__section-desc",children:[__("This is what it will look like when someone shares the link to your WordPress post on Tumblr.","jetpack")," ",(0,r.jsx)(a.ExternalLink,{href:"https://jetpack.com/support/jetpack-social-image-generator",children:__("Learn more about links","jetpack")})]}),(0,r.jsx)(s.H,{...l,user:void 0})]})]})}},5894:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(30275),a=n(65235),o=n.n(a),i=n(21987);const s=(0,i.SL)((0,i.hs)(200),(0,i.KB)(200)),c=e=>{let{description:t,image:n,title:a,cardType:c,url:l}=e;const u=o()(`twitter-preview__card-${c}`,{"twitter-preview__card-has-image":!!n});return(0,r.jsx)("div",{className:"twitter-preview__card",children:(0,r.jsxs)("div",{className:u,children:[n&&(0,r.jsx)("img",{className:"twitter-preview__card-image",src:n,alt:""}),(0,r.jsxs)("div",{className:"twitter-preview__card-body",children:[(0,r.jsx)("div",{className:"twitter-preview__card-url",children:(0,i.wy)(l||"")}),(0,r.jsx)("div",{className:"twitter-preview__card-title",children:a}),(0,r.jsx)("div",{className:"twitter-preview__card-description",children:s((0,i.ju)(t))})]})]})})}},66370:function(e,t,n){"use strict";n.d(t,{$:function(){return a}});var r=n(30275);const a=()=>(0,r.jsxs)("div",{className:"twitter-preview__footer",children:[(0,r.jsx)("span",{className:"twitter-preview__icon-replies",children:(0,r.jsx)("svg",{viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M1.751 10c0-4.42 3.584-8 8.005-8h4.366c4.49 0 8.129 3.64 8.129 8.13 0 2.96-1.607 5.68-4.196 7.11l-8.054 4.46v-3.69h-.067c-4.49.1-8.183-3.51-8.183-8.01zm8.005-6c-3.317 0-6.005 2.69-6.005 6 0 3.37 2.77 6.08 6.138 6.01l.351-.01h1.761v2.3l5.087-2.81c1.951-1.08 3.163-3.13 3.163-5.36 0-3.39-2.744-6.13-6.129-6.13H9.756z"})})}),(0,r.jsx)("span",{className:"twitter-preview__icon-retweets",children:(0,r.jsx)("svg",{viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M4.5 3.88l4.432 4.14-1.364 1.46L5.5 7.55V16c0 1.1.896 2 2 2H13v2H7.5c-2.209 0-4-1.79-4-4V7.55L1.432 9.48.068 8.02 4.5 3.88zM16.5 6H11V4h5.5c2.209 0 4 1.79 4 4v8.45l2.068-1.93 1.364 1.46-4.432 4.14-4.432-4.14 1.364-1.46 2.068 1.93V8c0-1.1-.896-2-2-2z"})})}),(0,r.jsx)("span",{className:"twitter-preview__icon-likes",children:(0,r.jsx)("svg",{viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M16.697 5.5c-1.222-.06-2.679.51-3.89 2.16l-.805 1.09-.806-1.09C9.984 6.01 8.526 5.44 7.304 5.5c-1.243.07-2.349.78-2.91 1.91-.552 1.12-.633 2.78.479 4.82 1.074 1.97 3.257 4.27 7.129 6.61 3.87-2.34 6.052-4.64 7.126-6.61 1.111-2.04 1.03-3.7.477-4.82-.561-1.13-1.666-1.84-2.908-1.91zm4.187 7.69c-1.351 2.48-4.001 5.12-8.379 7.67l-.503.3-.504-.3c-4.379-2.55-7.029-5.19-8.382-7.67-1.36-2.5-1.41-4.86-.514-6.67.887-1.79 2.647-2.91 4.601-3.01 1.651-.09 3.368.56 4.798 2.01 1.429-1.45 3.146-2.1 4.796-2.01 1.954.1 3.714 1.22 4.601 3.01.896 1.81.846 4.17-.514 6.67z"})})}),(0,r.jsx)("span",{className:"twitter-preview__icon-analytics",children:(0,r.jsx)("svg",{viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M8.75 21V3h2v18h-2zM18 21V8.5h2V21h-2zM4 21l.004-10h2L6 21H4zm9.248 0v-7h2v7h-2z"})})}),(0,r.jsx)("span",{className:"twitter-preview__icon-share",children:(0,r.jsx)("svg",{viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M12 2.59l5.7 5.7-1.41 1.42L13 6.41V16h-2V6.41l-3.3 3.3-1.41-1.42L12 2.59zM21 15l-.02 3.51c0 1.38-1.12 2.49-2.5 2.49H5.5C4.11 21 3 19.88 3 18.5V15h2v3.5c0 .28.22.5.5.5h12.98c.28 0 .5-.22.5-.5L19 15h2z"})})})]})},78678:function(e,t,n){"use strict";n.d(t,{h:function(){return i}});var r=n(30275),a=n(65736),o=n(21987);const __=a.__,i=e=>{let{name:t,screenName:n,date:a}=e;return(0,r.jsxs)("div",{className:"twitter-preview__header",children:[(0,r.jsx)("span",{className:"twitter-preview__name",children:t||__("Account Name","jetpack")}),(0,r.jsx)("span",{className:"twitter-preview__screen-name",children:n||"@account"}),(0,r.jsx)("span",{children:"·"}),(0,r.jsx)("span",{className:"twitter-preview__date",children:(0,o.YW)(a||Date.now())})]})}},42029:function(e,t,n){"use strict";n.d(t,{q:function(){return a}});var r=n(30275);const a=()=>(0,r.jsxs)("svg",{version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:"271pt",height:"270pt",viewBox:"0 0 271 270",children:[(0,r.jsx)("rect",{width:"100%",height:"100%",fill:"#ccd5de"}),(0,r.jsxs)("g",{transform:"translate(0,270) scale(0.1,-0.1)",fill:"#647785",stroke:"none",children:[(0,r.jsx)("path",{d:"M1251 2089 c-81 -14 -178 -65 -239 -125 -64 -65 -124 -185 -149 -299 -24 -111 -24 -339 -1 -415 38 -121 108 -193 227 -231 83 -27 339 -38 449 -19 139 23 236 91 286 200 59 130 52 395 -15 577 -88 235 -301 354 -558 312z"}),(0,r.jsx)("path",{d:"M1197 795 c-358 -68 -643 -357 -721 -732 l-14 -63 890 0 890 0 -7 42 c-11 70 -64 218 -102 288 -121 224 -336 394 -573 454 -92 24 -267 29 -363 11z"})]})]})},43503:function(e,t,n){"use strict";n.d(t,{m:function(){return o}});var r=n(30275),a=n(20445);const o=e=>(0,r.jsx)(a.g,{...e,text:"",media:void 0})},51075:function(e,t,n){"use strict";n.d(t,{p:function(){return s}});var r=n(30275),a=n(65235),o=n.n(a),i=n(99196);const s=e=>{let{media:t}=e;const n=t.filter((e=>e.type.startsWith("image/")||e.type.startsWith("video/"))).filter(((e,t,n)=>0===t||!n[0].type.startsWith("video/")&&"image/gif"!==n[0].type&&(!e.type.startsWith("video/")&&"image/gif"!==e.type))).slice(0,4);if(0===n.length)return null;const a=n[0].type.startsWith("video/"),s=o()(["twitter-preview__media","twitter-preview__media-children-"+n.length]);return(0,r.jsx)("div",{className:s,children:n.map(((e,t)=>(0,r.jsx)(i.Fragment,{children:a?(0,r.jsx)("video",{controls:!0,children:(0,r.jsx)("source",{src:e.url,type:e.type})}):(0,r.jsx)("img",{alt:e.alt||"",src:e.url})},`twitter-preview__media-item-${t}`)))})}},20445:function(e,t,n){"use strict";n.d(t,{g:function(){return d}});var r=n(30275),a=n(5894),o=n(66370),i=n(78678),s=n(51075),c=n(15850),l=n(94615),u=n(98969);n(58449);const d=e=>{let{date:t,description:n,image:d,media:p,name:m,profileImage:h,screenName:g,showThreadConnector:f,text:b,title:v,tweet:k,cardType:y,url:w}=e;const E=!!p?.length;return(0,r.jsx)("div",{className:"twitter-preview__wrapper",children:(0,r.jsxs)("div",{className:"twitter-preview__container",children:[(0,r.jsx)(l.Y,{profileImage:h,showThreadConnector:f}),(0,r.jsxs)("div",{className:"twitter-preview__main",children:[(0,r.jsx)(i.h,{name:m,screenName:g,date:t}),(0,r.jsxs)("div",{className:"twitter-preview__content",children:[b?(0,r.jsx)(u.x,{text:b,url:w||"",retainUrl:E}):null,E?(0,r.jsx)(s.p,{media:p}):null,k?(0,r.jsx)(c.P,{tweet:k}):null,!E&&v&&n&&w&&(0,r.jsx)(a.Z,{description:n,image:d,title:v,cardType:y||"",url:w})]}),(0,r.jsx)(o.$,{})]})]})})}},835:function(e,t,n){"use strict";n.d(t,{c:function(){return l}});var r=n(30275),a=n(55609),o=n(65736),i=n(10263),s=n(43503),c=n(20445);const __=o.__,l=e=>{let{headingLevel:t,hideLinkPreview:n,hidePostPreview:o,tweets:l}=e;return l?.length?(0,r.jsxs)("div",{className:"social-preview twitter-preview",children:[!o&&(0,r.jsxs)("section",{className:"social-preview__section twitter-preview__section",children:[(0,r.jsx)(i.Z,{level:t,children: // translators: refers to a social post on Twitter __("Your post","jetpack")}),(0,r.jsx)("p",{className:"social-preview__section-desc",children:__("This is what your social post will look like on Twitter:","jetpack")}),l.map(((e,t)=>{const n=t+1===l.length;return(0,r.jsx)(c.g,{...e,showThreadConnector:!n},`twitter-preview__tweet-${t}`)}))]}),!n&&(0,r.jsxs)("section",{className:"social-preview__section twitter-preview__section",children:[(0,r.jsx)(i.Z,{level:t,children: // translators: refers to a link to a Twitter post __("Link preview","jetpack")}),(0,r.jsxs)("p",{className:"social-preview__section-desc",children:[__("This is what it will look like when someone shares the link to your WordPress post on Twitter.","jetpack")," ",(0,r.jsx)(a.ExternalLink,{href:"https://jetpack.com/support/jetpack-social-image-generator",children:__("Learn more about links","jetpack")})]}),(0,r.jsx)(s.m,{...l[0],name:"",profileImage:"",screenName:""})]})]}):null}},15850:function(e,t,n){"use strict";n.d(t,{P:function(){return o}});var r=n(30275),a=n(55609);const o=e=>{let{tweet:t}=e;return t?(0,r.jsxs)("div",{className:"twitter-preview__quote-tweet",children:[(0,r.jsx)(a.SandBox,{html:`<blockquote class="twitter-tweet" data-conversation="none" data-dnt="true"><a href="${t}"></a></blockquote>`,scripts:["https://platform.twitter.com/widgets.js"],title:"Embedded tweet"}),(0,r.jsx)("div",{className:"twitter-preview__quote-tweet-overlay"})]}):null}},94615:function(e,t,n){"use strict";n.d(t,{Y:function(){return i}});var r=n(30275),a=n(65736),o=n(42029);const __=a.__,i=e=>{let{profileImage:t,showThreadConnector:n}=e;return(0,r.jsxs)("div",{className:"twitter-preview__sidebar",children:[(0,r.jsx)("div",{className:"twitter-preview__profile-image",children:t?(0,r.jsx)("img",{alt:__("Twitter profile image","jetpack"),src:t}):(0,r.jsx)(o.q,{})}),n&&(0,r.jsx)("div",{className:"twitter-preview__connector"})]})}},98969:function(e,t,n){"use strict";n.d(t,{x:function(){return o}});var r=n(30275),a=n(21987);const o=e=>{let{text:t,url:n,retainUrl:o}=e;if(!t)return null;const i=n&&!o&&t.endsWith(n)?t.substring(0,t.lastIndexOf(n)):t;return(0,r.jsx)("div",{className:"twitter-preview__text",children:(0,a.u_)(i,{platform:"twitter"})})}},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,a=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(a=r))})),t.splice(a,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,a,o,i=null;function s(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];if(!s.enabled)return;const o=s,i=Number(new Date),c=i-(n||i);o.diff=c,o.prev=n,o.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 a=t.formatters[n];if("function"==typeof a){const t=r[l];e=a.call(o,t),r.splice(l,1),l--}return e})),t.formatArgs.call(o,r);(o.log||t.log).apply(o,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:(a!==t.namespaces&&(a=t.namespaces,o=t.enabled(e)),o),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 a(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(a),...t.skips.map(a).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),a=r.length;for(n=0;n<a;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}},99891: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,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],0<=t.indexOf(n)||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,o),l=["gridicon","gridicons-fullscreen",s,!1,!1,!1].filter(Boolean).join(" ");return a.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"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M21 3v6h-2V6.41l-3.29 3.3-1.42-1.42L17.59 5H15V3zM3 3v6h2V6.41l3.29 3.3 1.42-1.42L6.41 5H9V3zm18 18v-6h-2v2.59l-3.29-3.29-1.41 1.41L17.59 19H15v2zM9 21v-2H6.41l3.29-3.29-1.41-1.42L5 17.59V15H3v6z"})))};var r,a=(r=n(99196))&&r.__esModule?r:{default:r},o=["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)}},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,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],0<=t.indexOf(n)||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,o),l=["gridicon","gridicons-notice-outline",s,!!function(e){return 0==e%18}(n)&&"needs-offset",!1,!1].filter(Boolean).join(" ");return a.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"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M12 4c4.411 0 8 3.589 8 8s-3.589 8-8 8-8-3.589-8-8 3.589-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 13h-2v2h2v-2zm-2-2h2l.5-6h-3l.5 6z"})))};var r,a=(r=n(99196))&&r.__esModule?r:{default:r},o=["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,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],0<=t.indexOf(n)||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,o),l=["gridicon","gridicons-star",s,!!function(e){return 0==e%18}(n)&&"needs-offset",!1,!1].filter(Boolean).join(" ");return a.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"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.891 5.82 21l2.002-7.141L2 9.257l7.418-.304z"})))};var r,a=(r=n(99196))&&r.__esModule?r:{default:r},o=["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,a=36,o=/^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 d(e){throw new RangeError(c[e])}function p(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]);const a=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+a}function m(e){const t=[];let n=0;const r=e.length;for(;n<r;){const a=e.charCodeAt(n++);if(a>=55296&&a<=56319&&n<r){const r=e.charCodeAt(n++);56320==(64512&r)?t.push(((1023&a)<<10)+(1023&r)+65536):(t.push(a),n--)}else t.push(a)}return t}const h=e=>String.fromCodePoint(...e),g=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},f=function(e,t,n){let r=0;for(e=n?l(e/700):e>>1,e+=l(e/t);e>455;r+=a)e=l(e/35);return l(r+36*e/(e+38))},b=function(e){const t=[],n=e.length;let o=0,i=128,s=72,c=e.lastIndexOf("-");c<0&&(c=0);for(let n=0;n<c;++n)e.charCodeAt(n)>=128&&d("not-basic"),t.push(e.charCodeAt(n));for(let p=c>0?c+1:0;p<n;){const c=o;for(let t=1,i=a;;i+=a){p>=n&&d("invalid-input");const c=(u=e.charCodeAt(p++))>=48&&u<58?u-48+26:u>=65&&u<91?u-65:u>=97&&u<123?u-97:a;c>=a&&d("invalid-input"),c>l((r-o)/t)&&d("overflow"),o+=c*t;const m=i<=s?1:i>=s+26?26:i-s;if(c<m)break;const h=a-m;t>l(r/h)&&d("overflow"),t*=h}const m=t.length+1;s=f(o-c,m,0==c),l(o/m)>r-i&&d("overflow"),i+=l(o/m),o%=m,t.splice(o++,0,i)}var u;return String.fromCodePoint(...t)},v=function(e){const t=[],n=(e=m(e)).length;let o=128,i=0,s=72;for(const n of e)n<128&&t.push(u(n));const c=t.length;let p=c;for(c&&t.push("-");p<n;){let n=r;for(const t of e)t>=o&&t<n&&(n=t);const m=p+1;n-o>l((r-i)/m)&&d("overflow"),i+=(n-o)*m,o=n;for(const n of e)if(n<o&&++i>r&&d("overflow"),n===o){let e=i;for(let n=a;;n+=a){const r=n<=s?1:n>=s+26?26:n-s;if(e<r)break;const o=e-r,i=a-r;t.push(u(g(r+o%i,0))),e=l(o/i)}t.push(u(g(e,0))),s=f(i,m,p===c),i=0,++p}++i,++o}return t.join("")},k=function(e){return p(e,(function(e){return o.test(e)?b(e.slice(4).toLowerCase()):e}))},y=function(e){return p(e,(function(e){return 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},99217:function(e,t,n){var r;!function(a){var o=/^\s+/,i=/\s+$/,s=0,c=a.round,l=a.min,u=a.max,d=a.random;function p(e,t){if(t=t||{},(e=e||"")instanceof p)return e;if(!(this instanceof p))return new p(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,s=null,c=null,d=!1,p=!1;"string"==typeof e&&(e=function(e){e=e.replace(o,"").replace(i,"").toLowerCase();var t,n=!1;if(L[e])e=L[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=H.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=H.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=H.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=H.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=H.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=H.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=H.hex8.exec(e))return{r:M(t[1]),g:M(t[2]),b:M(t[3]),a:F(t[4]),format:n?"name":"hex8"};if(t=H.hex6.exec(e))return{r:M(t[1]),g:M(t[2]),b:M(t[3]),format:n?"name":"hex"};if(t=H.hex4.exec(e))return{r:M(t[1]+""+t[1]),g:M(t[2]+""+t[2]),b:M(t[3]+""+t[3]),a:F(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=H.hex3.exec(e))return{r:M(t[1]+""+t[1]),g:M(t[2]+""+t[2]),b:M(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(V(e.r)&&V(e.g)&&V(e.b)?(m=e.r,h=e.g,g=e.b,t={r:255*I(m,255),g:255*I(h,255),b:255*I(g,255)},d=!0,p="%"===String(e.r).substr(-1)?"prgb":"rgb"):V(e.h)&&V(e.s)&&V(e.v)?(r=B(e.s),s=B(e.v),t=function(e,t,n){e=6*I(e,360),t=I(t,100),n=I(n,100);var r=a.floor(e),o=e-r,i=n*(1-t),s=n*(1-o*t),c=n*(1-(1-o)*t),l=r%6,u=[n,s,i,i,c,n][l],d=[c,n,n,s,i,i][l],p=[i,i,c,n,n,s][l];return{r:255*u,g:255*d,b:255*p}}(e.h,r,s),d=!0,p="hsv"):V(e.h)&&V(e.s)&&V(e.l)&&(r=B(e.s),c=B(e.l),t=function(e,t,n){var r,a,o;function i(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=I(e,360),t=I(t,100),n=I(n,100),0===t)r=a=o=n;else{var s=n<.5?n*(1+t):n+t-n*t,c=2*n-s;r=i(c,s,e+1/3),a=i(c,s,e),o=i(c,s,e-1/3)}return{r:255*r,g:255*a,b:255*o}}(e.h,r,c),d=!0,p="hsl"),e.hasOwnProperty("a")&&(n=e.a));var m,h,g;return n=A(n),{ok:d,format:e.format||p,r:l(255,u(t.r,0)),g:l(255,u(t.g,0)),b:l(255,u(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=c(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=c(this._r)),this._g<1&&(this._g=c(this._g)),this._b<1&&(this._b=c(this._b)),this._ok=n.ok,this._tc_id=s++}function m(e,t,n){e=I(e,255),t=I(t,255),n=I(n,255);var r,a,o=u(e,t,n),i=l(e,t,n),s=(o+i)/2;if(o==i)r=a=0;else{var c=o-i;switch(a=s>.5?c/(2-o-i):c/(o+i),o){case e:r=(t-n)/c+(t<n?6:0);break;case t:r=(n-e)/c+2;break;case n:r=(e-t)/c+4}r/=6}return{h:r,s:a,l:s}}function h(e,t,n){e=I(e,255),t=I(t,255),n=I(n,255);var r,a,o=u(e,t,n),i=l(e,t,n),s=o,c=o-i;if(a=0===o?0:c/o,o==i)r=0;else{switch(o){case e:r=(t-n)/c+(t<n?6:0);break;case t:r=(n-e)/c+2;break;case n:r=(e-t)/c+4}r/=6}return{h:r,s:a,v:s}}function g(e,t,n,r){var a=[Z(c(e).toString(16)),Z(c(t).toString(16)),Z(c(n).toString(16))];return r&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function f(e,t,n,r){return[Z(D(r)),Z(c(e).toString(16)),Z(c(t).toString(16)),Z(c(n).toString(16))].join("")}function b(e,t){t=0===t?0:t||10;var n=p(e).toHsl();return n.s-=t/100,n.s=R(n.s),p(n)}function v(e,t){t=0===t?0:t||10;var n=p(e).toHsl();return n.s+=t/100,n.s=R(n.s),p(n)}function k(e){return p(e).desaturate(100)}function y(e,t){t=0===t?0:t||10;var n=p(e).toHsl();return n.l+=t/100,n.l=R(n.l),p(n)}function w(e,t){t=0===t?0:t||10;var n=p(e).toRgb();return n.r=u(0,l(255,n.r-c(-t/100*255))),n.g=u(0,l(255,n.g-c(-t/100*255))),n.b=u(0,l(255,n.b-c(-t/100*255))),p(n)}function E(e,t){t=0===t?0:t||10;var n=p(e).toHsl();return n.l-=t/100,n.l=R(n.l),p(n)}function _(e,t){var n=p(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,p(n)}function C(e){var t=p(e).toHsl();return t.h=(t.h+180)%360,p(t)}function S(e){var t=p(e).toHsl(),n=t.h;return[p(e),p({h:(n+120)%360,s:t.s,l:t.l}),p({h:(n+240)%360,s:t.s,l:t.l})]}function j(e){var t=p(e).toHsl(),n=t.h;return[p(e),p({h:(n+90)%360,s:t.s,l:t.l}),p({h:(n+180)%360,s:t.s,l:t.l}),p({h:(n+270)%360,s:t.s,l:t.l})]}function x(e){var t=p(e).toHsl(),n=t.h;return[p(e),p({h:(n+72)%360,s:t.s,l:t.l}),p({h:(n+216)%360,s:t.s,l:t.l})]}function P(e,t,n){t=t||6,n=n||30;var r=p(e).toHsl(),a=360/n,o=[p(e)];for(r.h=(r.h-(a*t>>1)+720)%360;--t;)r.h=(r.h+a)%360,o.push(p(r));return o}function N(e,t){t=t||6;for(var n=p(e).toHsv(),r=n.h,a=n.s,o=n.v,i=[],s=1/t;t--;)i.push(p({h:r,s:a,v:o})),o=(o+s)%1;return i}p.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:a.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:a.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:a.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=A(e),this._roundA=c(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=c(360*e.h),n=c(100*e.s),r=c(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=m(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=m(this._r,this._g,this._b),t=c(360*e.h),n=c(100*e.s),r=c(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return g(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,a){var o=[Z(c(e).toString(16)),Z(c(t).toString(16)),Z(c(n).toString(16)),Z(D(r))];if(a&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:c(this._r),g:c(this._g),b:c(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+c(this._r)+", "+c(this._g)+", "+c(this._b)+")":"rgba("+c(this._r)+", "+c(this._g)+", "+c(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:c(100*I(this._r,255))+"%",g:c(100*I(this._g,255))+"%",b:c(100*I(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+c(100*I(this._r,255))+"%, "+c(100*I(this._g,255))+"%, "+c(100*I(this._b,255))+"%)":"rgba("+c(100*I(this._r,255))+"%, "+c(100*I(this._g,255))+"%, "+c(100*I(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(T[g(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+f(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var a=p(e);n="#"+f(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return p(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(y,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(E,arguments)},desaturate:function(){return this._applyModification(b,arguments)},saturate:function(){return this._applyModification(v,arguments)},greyscale:function(){return this._applyModification(k,arguments)},spin:function(){return this._applyModification(_,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(P,arguments)},complement:function(){return this._applyCombination(C,arguments)},monochromatic:function(){return this._applyCombination(N,arguments)},splitcomplement:function(){return this._applyCombination(x,arguments)},triad:function(){return this._applyCombination(S,arguments)},tetrad:function(){return this._applyCombination(j,arguments)}},p.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:B(e[r]));e=n}return p(e,t)},p.equals=function(e,t){return!(!e||!t)&&p(e).toRgbString()==p(t).toRgbString()},p.random=function(){return p.fromRatio({r:d(),g:d(),b:d()})},p.mix=function(e,t,n){n=0===n?0:n||50;var r=p(e).toRgb(),a=p(t).toRgb(),o=n/100;return p({r:(a.r-r.r)*o+r.r,g:(a.g-r.g)*o+r.g,b:(a.b-r.b)*o+r.b,a:(a.a-r.a)*o+r.a})},p.readability=function(e,t){var n=p(e),r=p(t);return(a.max(n.getLuminance(),r.getLuminance())+.05)/(a.min(n.getLuminance(),r.getLuminance())+.05)},p.isReadable=function(e,t,n){var r,a,o=p.readability(e,t);switch(a=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":a=o>=4.5;break;case"AAlarge":a=o>=3;break;case"AAAsmall":a=o>=7}return a},p.mostReadable=function(e,t,n){var r,a,o,i,s=null,c=0;a=(n=n||{}).includeFallbackColors,o=n.level,i=n.size;for(var l=0;l<t.length;l++)(r=p.readability(e,t[l]))>c&&(c=r,s=p(t[l]));return p.isReadable(e,s,{level:o,size:i})||!a?s:(n.includeFallbackColors=!1,p.mostReadable(e,["#fff","#000"],n))};var L=p.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},T=p.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(L);function A(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function I(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=l(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),a.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function R(e){return l(1,u(0,e))}function M(e){return parseInt(e,16)}function Z(e){return 1==e.length?"0"+e:""+e}function B(e){return e<=1&&(e=100*e+"%"),e}function D(e){return a.round(255*parseFloat(e)).toString(16)}function F(e){return M(e)/255}var z,O,U,H=(O="[\\s|\\(]+("+(z="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+z+")[,|\\s]+("+z+")\\s*\\)?",U="[\\s|\\(]+("+z+")[,|\\s]+("+z+")[,|\\s]+("+z+")[,|\\s]+("+z+")\\s*\\)?",{CSS_UNIT:new RegExp(z),rgb:new RegExp("rgb"+O),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+O),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+O),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function V(e){return!!H.CSS_UNIT.exec(e)}e.exports?e.exports=p:void 0===(r=function(){return p}.call(t,n,t,e))||(e.exports=r)}(Math)},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 a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);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 a(e){return c(e,r)}var o=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function i(e){return c(e,o)}var 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 d(e){return e?e.replace(/(\n+\s*)+/g,"\n"):""}function p(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 a=e[r];if(h(a,t,n))return a}}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 g(e){var t=e.nextSibling||e.parentNode;return e.parentNode.removeChild(e),t}function f(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 a=Number(t.nodeName.charAt(1));return"setext"===r.headingStyle&&a<3?"\n\n"+e+"\n"+n(1===a?"=":"-",e.length)+"\n\n":"\n\n"+n("#",a)+" "+e+"\n\n"}},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+" ",a=t.parentNode;if("OL"===a.nodeName){var o=a.getAttribute("start"),i=Array.prototype.indexOf.call(a.children,t);r=(o?Number(o)+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 a,o=((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");a=l.exec(i);)a[0].length>=c&&(c=a[0].length+1);var u=n(s,c);return"\n\n"+u+o+"\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=d(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,a,o=t.getAttribute("href"),i=d(t.getAttribute("title"));switch(i&&(i=' "'+i+'"'),n.linkReferenceStyle){case"collapsed":r="["+e+"][]",a="["+e+"]: "+o+i;break;case"shortcut":r="["+e+"]",a="["+e+"]: "+o+i;break;default:var s=this.references.length+1;r="["+e+"]["+s+"]",a="["+s+"]: "+o+i}return this.references.push(a),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=d(t.getAttribute("alt")),r=t.getAttribute("src")||"",a=d(t.getAttribute("title"));return r?"+")":""}},p.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,a=e.isPre||function(e){return"PRE"===e.nodeName};if(t.firstChild&&!a(t)){for(var o=null,i=!1,s=null,c=f(s,t,a);c!==t;){if(3===c.nodeType||4===c.nodeType){var l=c.data.replace(/[ \r\n\t]+/g," ");if(o&&!/ $/.test(o.data)||i||" "!==l[0]||(l=l.substr(1)),!l){c=g(c);continue}c.data=l,o=c}else{if(1!==c.nodeType){c=g(c);continue}n(c)||"BR"===c.nodeName?(o&&(o.data=o.data.replace(/ $/,"")),o=null,i=!1):r(c)||a(c)?(o=null,i=!0):o&&(i=!1)}var u=f(s,c,a);s=c,c=u}o&&(o.data=o.data.replace(/ $/,""),o.data||g(o))}}({element:n,isBlock:a,isVoid:i,isPre:t.preformattedCode?E:null}),n}function E(e){return"PRE"===e.nodeName||"CODE"===e.nodeName}function _(e,t){return e.isBlock=a(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,o)}(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,a=r.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/),{leading:a[1],leadingAscii:a[2],leadingNonAscii:a[3],trailing:a[4],trailingNonAscii:a[5],trailingAscii:a[6]});var r,a;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,o,i;return"left"===e?(r=t.previousSibling,o=/ $/):(r=t.nextSibling,o=/^ /),r&&(3===r.nodeType?i=o.test(r.nodeValue):n.preformattedCode&&"CODE"===r.nodeName?i=!1:1!==r.nodeType||a(r)||(i=o.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 p(this.options)}function P(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=L.call(t,n)),T(e,r)}),"")}function N(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 L(e){var t=this.rules.forNode(e),n=P.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*/,""),a=Math.max(e.length-n.length,t.length-r.length);return n+"\n\n".substring(0,a)+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=P.call(this,new w(e,this.options));return N.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),a=n(9106),o=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,o.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}(),d=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+p(this._buffer);if(this._done||r){var a=this._getDataFromBuffer(e,t),o=null==a&&this._done;return Promise.resolve({value:a,done:o})}return this._reader.read().then((function(r){var a=r.value;return r.done?n._done=!0:void 0===n._buffer?n._buffer=a: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,a),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===p(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 p(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,a.Z)(e.uri).then((function(e){return new u(e)})).catch((function(e){throw new Error("tus: cannot fetch `file.uri` as Blob, make sure the uri is correct and accessible. ".concat(e))})):"function"==typeof e.slice&&void 0!==e.size?Promise.resolve(new u(e)):"function"==typeof e.read?(t=+t,isFinite(t)?Promise.resolve(new d(e,t)):Promise.reject(new Error("cannot create source for stream without a finite value for the `chunkSize` option"))):Promise.reject(new Error("source object may only be an instance of File, Blob, or Reader in this environment"))}}]),e}()},41264:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(75908);function a(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 a(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 o(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e}n.d(t,{Z:function(){return i}});var i=function(){function e(){r(this,e)}return o(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 o(e,[{key:"getMethod",value:function(){return this._method}},{key:"getURL",value:function(){return this._url}},{key:"setHeader",value:function(e,t){this._xhr.setRequestHeader(e,t),this._headers[e]=t}},{key:"getHeader",value:function(e){return this._headers[e]}},{key:"setProgressHandler",value:function(e){"upload"in this._xhr&&(this._xhr.upload.onprogress=function(t){t.lengthComputable&&e(t.loaded)})}},{key:"send",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new Promise((function(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 o(e,[{key:"getStatus",value:function(){return this._xhr.status}},{key:"getHeader",value:function(e){return this._xhr.getResponseHeader(e)}},{key:"getBody",value:function(){return this._xhr.responseText}},{key:"getUnderlyingObject",value:function(){return this._xhr}}]),e}()},99537:function(e,t,n){"use strict";n.d(t,{gq:function(){return v}});var r=n(63620),a=n(85799),o=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 d(e,t){return d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},d(e,t)}function p(e){return function(){var t,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 g(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){f(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 f(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=g({},r.Z.defaultOptions,{httpStack:new i.Z,fileReader:new s.Z,urlStorage:o.H?new o.n:new a.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&&d(e,t)}(i,e);var t,n,a,o=p(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=g({},b,{},t),o.call(this,e,t)}return t=i,a=[{key:"terminate",value:function(e,t,n){return t=g({},b,{},t),r.Z.terminate(e,t,n)}}],(n=null)&&u(t.prototype,n),a&&u(t,a),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 a=!1;try{a="localStorage"in window;var o="tusSupport";localStorage.setItem(o,localStorage.getItem(o))}catch(e){if(e.code!==e.SECURITY_ERR&&e.code!==e.QUOTA_EXCEEDED_ERR)throw e;a=!1}var i=a,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,a;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 a=JSON.parse(localStorage.getItem(r));a.urlStorageKey=r,t.push(a)}catch(e){}}return t}}],n&&r(t.prototype,n),a&&r(t,a),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 a=c(this).constructor;t=Reflect.construct(r,arguments,a)}else t=r.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,t)}}function a(e){var t="function"==typeof Map?new Map:void 0;return a=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 o(e,arguments,c(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),s(r,e)},a(e)}function o(e,t,n){return o=i()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var a=new(Function.bind.apply(e,r));return n&&s(a,n.prototype),a},o.apply(null,arguments)}function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function 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,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=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=o,r.originalResponse=i,r.causingError=a,null!=a&&(e+=", caused by ".concat(a.toString())),null!=o){var s=o.getHeader("X-Request-ID")||"n/a",c=o.getMethod(),l=o.getURL(),u=i?i.getStatus():"n/a",d=i?i.getBody()||"":"n/a";e+=", originated from request (method: ".concat(c,", url: ").concat(l,", response code: ").concat(u,", response text: ").concat(d,", request id: ").concat(s,")")}return r.message=e,r}return n}(a(Error));t.Z=l},51336:function(e,t,n){"use strict";n.d(t,{c:function(){return a}});var r=!1;function a(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 a}});var a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,a;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),a&&r(t,a),e}()},63620:function(e,t,n){"use strict";var r=n(84097),a=n(41294),o=n.n(a),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){d(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 d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(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 a=null!=this._parallelUploadUrls?this._parallelUploadUrls.length:this.options.parallelUploads,o=function(e,t,n){for(var r=Math.floor(e/t),a=[],o=0;o<t;o++)a.push({start:r*o,end:r*(o+1)});return a[t-1].end=e,n&&a.forEach((function(e,t){e.uploadUrl=n[t]||null})),a}(this._source.size,a,this._parallelUploadUrls);this._parallelUploadUrls=new Array(o.length);var i,c=o.map((function(a,i){var s=0;return t._source.slice(a.start,a.end).then((function(c){var l=c.value;return new Promise((function(c,d){var p=u({},t.options,{uploadUrl:a.uploadUrl||null,storeFingerprintForResuming:!1,removeFingerprintOnSuccess:!1,parallelUploads:1,metadata:{},headers:u({},t.options.headers,{"Upload-Concat":"partial"}),onSuccess:c,onError:d,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===o.length&&t._saveUploadInUrlStorage()}}),m=new e(l,p);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=g(t.options.metadata);return""!==e&&i.setHeader("Upload-Metadata",e),t._sendRequest(i,null)})).then((function(e){if(f(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=g(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(f(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(!f(r,200))return f(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 a=parseInt(n.getHeader("Upload-Offset"),10);if(isNaN(a))e._emitHttpError(t,n,"tus: invalid or missing offset value");else{var o=parseInt(n.getHeader("Upload-Length"),10);if(!isNaN(o)||e.options.uploadLengthDeferred){if("function"==typeof e.options._onUploadUrlAvailable&&e.options._onUploadUrlAvailable(),a===o)return e._emitProgress(o,o),void e._emitSuccess();e._offset=a,e._performUpload()}else e._emitHttpError(t,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){f(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,a=n.done;return t.options.uploadLengthDeferred&&a&&(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(a){if(a instanceof i.Z||(a=new i.Z("tus: failed to terminate upload",a,r,null)),!k(a,0,n))throw a;var o=n.retryDelays[0],s=n.retryDelays.slice(1),c=u({},n,{retryDelays:s});return new Promise((function(e){return setTimeout(e,o)})).then((function(){return e.terminate(t,c)}))}))}}],n&&p(t.prototype,n),r&&p(t,r),e}();function g(e){var t=[];for(var n in e)t.push("".concat(n," ").concat(r.Base64.encode(e[n])));return t.join(",")}function f(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 a=n.headers||{};for(var o in a)r.setHeader(o,a[o]);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,a=e.originalResponse?e.originalResponse.getStatus():0;return(!f(a,400)||409===a||423===a)&&(r=!0,"undefined"!=typeof window&&"navigator"in window&&!1===window.navigator.onLine&&(r=!1),r)}function y(e,t){return new(o())(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),a=n(40142),o=/^[\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 d(e){return(e||"").toString().replace(o,"")}var p=[["#","hash"],["?","query"],function(e,t){return g(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],m={hash:1,query:1};function h(e){var t,n=("undefined"!=typeof window||"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).location||{},r={},a=typeof(e=e||n);if("blob:"===e.protocol)r=new b(unescape(e.pathname),{});else if("string"===a)for(t in r=new b(e,{}),m)delete r[t];else if("object"===a){for(t in e)t in m||(r[t]=e[t]);void 0===r.slashes&&(r.slashes=s.test(e.href))}return r}function g(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function f(e,t){e=(e=d(e)).replace(i,""),t=t||{};var n,r=l.exec(e),a=r[1]?r[1].toLowerCase():"",o=!!r[2],s=!!r[3],c=0;return o?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:"===a?c>=2&&(n=n.slice(2)):g(a)?n=r[4]:a?o&&(n=n.slice(2)):c>=2&&g(t.protocol)&&(n=r[4]),{protocol:a,slashes:o||g(a),slashesCount:c,rest:n}}function b(e,t,n){if(e=(e=d(e)).replace(i,""),!(this instanceof b))return new b(e,t,n);var o,s,c,l,m,v,k=p.slice(),y=typeof t,w=this,E=0;for("object"!==y&&"string"!==y&&(n=t,t=null),n&&"function"!=typeof n&&(n=a.parse),o=!(s=f(e||"",t=h(t))).protocol&&!s.slashes,w.slashes=s.slashes||o&&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||!g(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]||o&&l[3]&&t[v]||"",l[4]&&(w[v]=w[v].toLowerCase())):e=l(e,w);n&&(w.query=n(w.query)),o&&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,a=n[r-1],o=!1,i=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),i++):i&&(0===r&&(o=!0),n.splice(r,1),i--);return o&&n.unshift(""),"."!==a&&".."!==a||n.push(""),n.join("/")}(w.pathname,t.pathname)),"/"!==w.pathname.charAt(0)&&g(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&&g(w.protocol)&&w.host?w.protocol+"//"+w.host:"null",w.href=w.toString()}b.prototype={set:function(e,t,n){var o=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(n||a.parse)(t)),o[e]=t;break;case"port":o[e]=t,r(t,o.protocol)?t&&(o.host=o.hostname+":"+t):(o.host=o.hostname,o[e]="");break;case"hostname":o[e]=t,o.port&&(t+=":"+o.port),o.host=t;break;case"host":o[e]=t,c.test(t)?(t=t.split(":"),o.port=t.pop(),o.hostname=t.join(":")):(o.hostname=t,o.port="");break;case"protocol":o.protocol=t.toLowerCase(),o.slashes=!n;break;case"pathname":case"hash":if(t){var i="pathname"===e?"/":"#";o[e]=t.charAt(0)!==i?i+t:t}else o[e]=t;break;case"username":case"password":o[e]=encodeURIComponent(t);break;case"auth":var s=t.indexOf(":");~s?(o.username=t.slice(0,s),o.username=encodeURIComponent(decodeURIComponent(o.username)),o.password=t.slice(s+1),o.password=encodeURIComponent(decodeURIComponent(o.password))):o.username=encodeURIComponent(decodeURIComponent(t))}for(var l=0;l<p.length;l++){var u=p[l];u[4]&&(o[u[1]]=o[u[1]].toLowerCase())}return o.auth=o.password?o.username+":"+o.password:o.username,o.origin="file:"!==o.protocol&&g(o.protocol)&&o.host?o.protocol+"//"+o.host:"null",o.href=o.toString(),o},toString:function(e){e&&"function"==typeof e||(e=a.stringify);var t,n=this,r=n.host,o=n.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var i=o+(n.protocol&&n.slashes||g(n.protocol)?"//":"");return n.username?(i+=n.username,n.password&&(i+=":"+n.password),i+="@"):n.password?(i+=":"+n.password,i+="@"):"file:"!==n.protocol&&g(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=f,b.location=h,b.trimLeft=d,b.qs=a,e.exports=b},77551:function(e,t,n){"use strict";e.exports=n.p+"images/background-a4fe3c05764cdec7ea9d.svg"},54066:function(e,t,n){"use strict";e.exports=n.p+"images/illustration-7b66a81232a93b203b4f.svg"},30253:function(e,t,n){"use strict";e.exports=n.p+"images/dois-66b3f018328e8f585646.jpg"},91948:function(e,t,n){"use strict";e.exports=n.p+"images/edge-e1adff73f2dc1c1dc64e.jpg"},5353:function(e,t,n){"use strict";e.exports=n.p+"images/fullscreen-21ca1ee2bafcb1c8eb55.jpg"},27956:function(e,t,n){"use strict";e.exports=n.p+"images/highway-205f94656e2fcc4aeb86.jpg"},19597:function(e,t,n){"use strict";e.exports=n.p+"images/avatar1-6287ee7ccb96c6112ed7.jpg"},65783:function(e,t,n){"use strict";e.exports=n.p+"images/avatar2-346c588dba138c82e44c.jpg"},43807:function(e,t,n){"use strict";e.exports=n.p+"images/avatar3-dce9c36819878a1bf60c.jpg"},39114:function(e,t,n){"use strict";e.exports=n.p+"images/placeholder-site-icon-5bb955c1d041bc2adfc9.svg"},8964:function(e,t,n){"use strict";e.exports=n.p+"images/eventbrite-in-page-example-c351ec80e4dd5d39433d.png"},90767:function(e,t,n){"use strict";e.exports=n.p+"images/img-example-after-d6db862c442c24ad1c63.png"},58632:function(e,t,n){"use strict";e.exports=n.p+"images/img-example-before-4592b4656108c1429614.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"},15915:function(e,t,n){"use strict";e.exports=n.p+"images/story_example-1-716db2e4f5a074d302f7.png"},92770:function(e,t,n){"use strict";e.exports=n.p+"images/email-preview-illustration-dd7b9072ff61acd7f247.svg"},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},25158:function(e){"use strict";e.exports=window.wp.a11y},42998:function(e){"use strict";e.exports=window.wp.annotations},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},72067:function(e){"use strict";e.exports=window.wp.editPost},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},22629:function(e){"use strict";e.exports=window.wp.htmlEntities},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},72629:function(e){"use strict";e.exports=window.wp.richText},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},35266:function(e){"use strict";e.exports=window.wp.wordcount},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},96524:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r={};function a(e){return[e]}function o(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function i(e,t){var n,i=t||a;function s(){n=new WeakMap}function c(){var t,a,s,c,l,u=arguments.length;for(c=new Array(u),s=0;s<u;s++)c[s]=arguments[s];for(t=function(e){var t,a,o,i,s,c=n,l=!0;for(t=0;t<e.length;t++){if(!(s=a=e[t])||"object"!=typeof s){l=!1;break}c.has(a)?c=c.get(a):(o=new WeakMap,c.set(a,o),c=o)}return c.has(r)||((i=function(){var e={clear:function(){e.head=null}};return e}()).isUniqueByDependants=l,c.set(r,i)),c.get(r)}(l=i.apply(null,c)),t.isUniqueByDependants||(t.lastDependants&&!o(l,t.lastDependants,0)&&t.clear(),t.lastDependants=l),a=t.head;a;){if(o(a.args,c,1))return a!==t.head&&(a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=t.head,a.prev=null,t.head.prev=a,t.head=a),a.val;a=a.next}return a={val:e.apply(null,c)},c[0]=null,a.args=c,t.head&&(t.head.prev=a,a.next=t.head),t.head=a,a.val}return c.getDependants=i,c.clear=s,s(),c}},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":""}')},21540:function(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/ai-chat","title":"Jetpack AI Search","description":"Provide a summarized answer to questions, trained on the sites content. Powered by AI.","keywords":["AI","GPT","Chat","Search"],"version":"12.5.0","textdomain":"jetpack","category":"text","icon":"<svg width=\'16\' height=\'16\' viewBox=\'0 0 16 16\' xmlns=\'http://www.w3.org/2000/svg\'><path fill-rule=\'evenodd\' clip-rule=\'evenodd\' d=\'M6.96774 8C6.96774 9.1402 6.04343 10.0645 4.90323 10.0645C3.76303 10.0645 2.83871 9.1402 2.83871 8C2.83871 6.8598 3.76303 5.93548 4.90323 5.93548C6.04343 5.93548 6.96774 6.8598 6.96774 8ZM5.41935 8C5.41935 8.28505 5.18828 8.51613 4.90323 8.51613C4.61818 8.51613 4.3871 8.28505 4.3871 8C4.3871 7.71495 4.61818 7.48387 4.90323 7.48387C5.18828 7.48387 5.41935 7.71495 5.41935 8Z\'/><path fill-rule=\'evenodd\' clip-rule=\'evenodd\' d=\'M11.0968 10.0645C12.237 10.0645 13.1613 9.1402 13.1613 8C13.1613 6.8598 12.237 5.93548 11.0968 5.93548C9.95657 5.93548 9.03226 6.8598 9.03226 8C9.03226 9.1402 9.95657 10.0645 11.0968 10.0645ZM11.0968 8.51613C11.3818 8.51613 11.6129 8.28505 11.6129 8C11.6129 7.71495 11.3818 7.48387 11.0968 7.48387C10.8117 7.48387 10.5806 7.71495 10.5806 8C10.5806 8.28505 10.8117 8.51613 11.0968 8.51613Z\'/><path d=\'M5.93548 11.3548C5.50791 11.3548 5.16129 11.7015 5.16129 12.129C5.16129 12.5566 5.50791 12.9032 5.93548 12.9032H10.0645C10.4921 12.9032 10.8387 12.5566 10.8387 12.129C10.8387 11.7015 10.4921 11.3548 10.0645 11.3548H5.93548Z\'/><path fill-rule=\'evenodd\' clip-rule=\'evenodd\' d=\'M8.77419 0.774194C8.77419 0.346618 8.42758 0 8 0C7.57242 0 7.22581 0.346618 7.22581 0.774194V3.09677H4.90323C2.19525 3.09677 0 5.29202 0 8V11.0968C0 13.8048 2.19525 16 4.90323 16H11.0968C13.8048 16 16 13.8048 16 11.0968V8C16 5.29202 13.8048 3.09677 11.0968 3.09677H8.77419V0.774194ZM1.54839 8C1.54839 6.14717 3.0504 4.64516 4.90323 4.64516H11.0968C12.9496 4.64516 14.4516 6.14717 14.4516 8V11.0968C14.4516 12.9496 12.9496 14.4516 11.0968 14.4516H4.90323C3.0504 14.4516 1.54839 12.9496 1.54839 11.0968V8Z\'/></svg>","supports":{"align":true,"alignWide":true,"customClassName":true,"className":true,"html":false,"multiple":false,"reusable":false},"attributes":{"askButtonLabel":{"type":"string","default":"Ask"},"placeholder":{"type":"string","default":"Ask a question about this site"},"showCopy":{"type":"boolean","default":true},"showFeedback":{"type":"boolean","default":true},"showSources":{"type":"boolean","default":true}}}')},41107:function(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/ai-image","title":"AI Image (Experimental)","description":"Automatically generate an illustration for your post, powered by AI magic. We are experimenting with this feature and can tweak or remove it at any point.","keywords":["AI","AL","DALLe","Diffusion","Magic"],"version":"12.5.0","textdomain":"jetpack","category":"media","icon":"<svg viewBox=\'0 0 20 20\' width=\'20\' height=\'20\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M11.1 10L18 2 7 10h2l-7 8 11-8h-1.9zm-4.3 1H3.9l2.5-1.8 7.5-5.5L10 2 3 5v3c0 2 .5 3.9 1.5 5.6L6.8 11zm6.4-2H16l-2.4 1.8L6.5 16c1 .9 2.2 1.6 3.5 2 4.2-1.5 7.1-5.5 7-10V5l-.2-.1L13.2 9z\'/></svg>","supports":{"align":false,"alignWide":false,"anchor":false,"customClassName":false,"className":true,"html":false,"multiple":true,"reusable":false,"inserter":false},"attributes":{"content":{"type":"string","source":"text"},"requestedPrompt":{"type":"string","default":false}}}')},59958:function(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/ai-paragraph","title":"AI Paragraph (Experimental)","description":"Automatically generate new paragraphs using your existing content, powered by AI magic. We are experimenting with this feature and can tweak or remove it at any point.","keywords":["AI","GPT","AL","Magic"],"version":"12.5.0","textdomain":"jetpack","category":"text","icon":"<svg viewBox=\'0 0 20 20\' width=\'20\' height=\'20\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M11.1 10L18 2 7 10h2l-7 8 11-8h-1.9zm-4.3 1H3.9l2.5-1.8 7.5-5.5L10 2 3 5v3c0 2 .5 3.9 1.5 5.6L6.8 11zm6.4-2H16l-2.4 1.8L6.5 16c1 .9 2.2 1.6 3.5 2 4.2-1.5 7.1-5.5 7-10V5l-.2-.1L13.2 9z\'/></svg>","supports":{"align":true,"alignWide":true,"anchor":true,"customClassName":true,"className":true,"html":true,"multiple":true,"reusable":false,"inserter":false},"attributes":{"content":{"type":"string","source":"html"},"animationDone":{"type":"boolean","default":false}},"example":{"attributes":{"animationDone":false,"content":"I\'m afraid I can\'t do that, Dave."}}}')},55250:function(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/amazon","title":"Amazon (Beta)","description":"Promote Amazon products and earn a commission from sales.","keywords":["amazon","affiliate"],"version":"12.5.0","textdomain":"jetpack","category":"earn","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M18.42 14.58c-.51-.66-1.05-1.23-1.05-2.5V7.87c0-1.8.15-3.45-1.2-4.68-1.05-1.02-2.79-1.35-4.14-1.35-2.6 0-5.52.96-6.12 4.14-.06.36.18.54.4.57l2.66.3c.24-.03.42-.27.48-.5.24-1.12 1.17-1.63 2.2-1.63.56 0 1.22.21 1.55.7.4.56.33 1.31.33 1.97v.36c-1.59.18-3.66.27-5.16.93a4.63 4.63 0 0 0-2.93 4.44c0 2.82 1.8 4.23 4.1 4.23 1.95 0 3.03-.45 4.53-1.98.51.72.66 1.08 1.59 1.83.18.09.45.09.63-.1v.04l2.1-1.8c.24-.21.2-.48.03-.75zm-5.4-1.2c-.45.75-1.14 1.23-1.92 1.23-1.05 0-1.65-.81-1.65-1.98 0-2.31 2.1-2.73 4.08-2.73v.6c0 1.05.03 1.92-.5 2.88z\'></path><path d=\'M21.69 19.2a17.62 17.62 0 0 1-21.6-1.57c-.23-.2 0-.5.28-.33a23.88 23.88 0 0 0 20.93 1.3c.45-.19.84.3.39.6z\'></path><path d=\'M22.8 17.96c-.36-.45-2.22-.2-3.1-.12-.23.03-.3-.18-.05-.36 1.5-1.05 3.96-.75 4.26-.39.3.36-.1 2.82-1.5 4.02-.21.18-.42.1-.3-.15.3-.8 1.02-2.58.69-3z\'></path></svg>","supports":{"align":true,"alignWide":false,"html":false},"attributes":{"backgroundColor":{"type":"string"},"textColor":{"type":"string"},"buttonAndLinkColor":{"type":"string"},"style":{"type":"string","default":"small","validValues":["small","large"]},"asin":{"type":"string"},"showImage":{"default":true,"type":"boolean"},"showTitle":{"default":true,"type":"boolean"},"showSeller":{"default":false,"type":"boolean"},"showPrice":{"default":true,"type":"boolean"},"showPurchaseButton":{"default":true,"type":"boolean"}}}')},28546:function(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/blogroll","title":"Blogroll (Beta)","description":"Share the sites you follow with your users.","keywords":[],"version":"12.5.0","textdomain":"jetpack","category":"grow","icon":"<svg width=\'24\' height=\'24\' viewBox=\'0 0 24 24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M4.08691 16.2412H20.0869V14.7412H4.08691V16.2412Z\'></path><path d=\'M4.08691 20.2412H13.0869V18.7412H4.08691V20.2412Z\'></path><path fill-rule=\'evenodd\' clip-rule=\'evenodd\' d=\'M4.08691 8.17871C4.08691 6.00409 5.84979 4.24121 8.02441 4.24121C10.199 4.24121 11.9619 6.00409 11.9619 8.17871C11.9619 10.3533 10.199 12.1162 8.02441 12.1162C5.84979 12.1162 4.08691 10.3533 4.08691 8.17871ZM5.10729 6.71621C5.51231 5.90991 6.2418 5.29471 7.12439 5.04194C6.91534 5.28455 6.73551 5.57108 6.58869 5.88606C6.46938 6.14205 6.36999 6.42056 6.29338 6.71621H5.10729ZM4.85759 7.39121C4.79508 7.64341 4.76191 7.90719 4.76191 8.17871C4.76191 8.45024 4.79508 8.71401 4.85759 8.96621H6.16284C6.12938 8.71126 6.11192 8.44782 6.11192 8.1787C6.11192 7.90956 6.12938 7.64614 6.16284 7.39121H4.85759ZM6.84439 7.39121C6.80693 7.64285 6.78692 7.90651 6.78692 8.1787C6.78692 8.45091 6.80694 8.71459 6.84439 8.96621H9.20444C9.2419 8.71458 9.26192 8.45091 9.26192 8.17873C9.26192 7.90653 9.2419 7.64285 9.20444 7.39121H6.84439ZM9.88599 7.39121C9.91945 7.64615 9.93692 7.90958 9.93692 8.17873C9.93692 8.44786 9.91945 8.71128 9.88599 8.96621H11.1912C11.2537 8.71401 11.2869 8.45024 11.2869 8.17871C11.2869 7.90719 11.2537 7.64341 11.1912 7.39121H9.88599ZM10.9415 6.71621H9.75544C9.67883 6.42057 9.57945 6.14207 9.46014 5.88609C9.31332 5.5711 9.13347 5.28455 8.92441 5.04193C9.80702 5.29469 10.5365 5.9099 10.9415 6.71621ZM9.05465 6.71621H6.99417C7.05245 6.52254 7.12177 6.34014 7.2005 6.17123C7.42342 5.69296 7.71302 5.34019 8.02439 5.13337C8.33578 5.34019 8.6254 5.69297 8.84833 6.17126C8.92706 6.34016 8.99637 6.52255 9.05465 6.71621ZM5.10729 9.64121H6.29339C6.37419 9.95305 6.48034 10.2458 6.6085 10.5132C6.75142 10.8114 6.92452 11.0835 7.12445 11.3155C6.24183 11.0627 5.51232 10.4475 5.10729 9.64121ZM9.05466 9.64121H6.99418C7.05655 9.84847 7.13156 10.0428 7.21721 10.2215C7.43825 10.6827 7.72115 11.0226 8.02446 11.224C8.33582 11.0172 8.62541 10.6645 8.84833 10.1862C8.92706 10.0173 8.99638 9.83488 9.05466 9.64121ZM9.46014 10.4714C9.57945 10.2154 9.67884 9.93686 9.75545 9.64121H10.9415C10.5365 10.4475 9.80703 11.0627 8.92444 11.3155C9.13349 11.0729 9.31332 10.7863 9.46014 10.4714Z\'></path></svg>","supports":{"align":false,"alignWide":true,"anchor":false,"customClassName":true,"className":true,"html":false,"multiple":true,"reusable":true,"color":{"link":true,"gradients":true},"spacing":{"padding":true,"margin":true},"typography":{"fontSize":true,"lineHeight":true}},"attributes":{"show_avatar":{"type":"boolean","default":true},"show_description":{"type":"boolean","default":true},"open_links_new_window":{"type":"boolean","default":true},"ignore_user_blogs":{"type":"boolean","default":true},"load_placeholders":{"type":"boolean","default":true}},"providesContext":{"showAvatar":"show_avatar","showDescription":"show_description","openLinksNewWindow":"open_links_new_window"}}')},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":[]}]}}}')},35982:function(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/create-with-voice","title":"Create with voice","description":"Transform your spoken words into publish-ready blocks with AI effortlessly.","keywords":["AI","GPT","AL","Magic","help","assistant"],"version":"12.5.0","textdomain":"jetpack","category":"media","icon":"<svg viewBox=\'0 0 20 20\' width=\'20\' height=\'20\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M12 9V3c0-1.1-.89-2-2-2-1.12 0-2 .94-2 2v6c0 1.1.9 2 2 2 1.13 0 2-.94 2-2zm4 0c0 2.97-2.16 5.43-5 5.91V17h2c.56 0 1 .45 1 1s-.44 1-1 1H7c-.55 0-1-.45-1-1s.45-1 1-1h2v-2.09C6.17 14.43 4 11.97 4 9c0-.55.45-1 1-1 .56 0 1 .45 1 1 0 2.21 1.8 4 4 4 2.21 0 4-1.79 4-4 0-.55.45-1 1-1 .56 0 1 .45 1 1z\'/></svg>","supports":{"html":false,"multiple":true,"reusable":false},"attributes":{"content":{"type":"string"}}}')},1597:function(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/google-docs-embed","title":"Google Docs (Beta)","description":"Embed a Google Document.","keywords":["document","gsuite","doc"],"version":"12.5.0","textdomain":"jetpack","category":"embed","icon":"<svg viewBox=\'0 0 64 88\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M58,88H6c-3.3,0-6-2.7-6-6V6c0-3.3,2.7-6,6-6h36l22,22v60C64,85.3,61.3,88,58,88z\' /><path fill=\'#FDFFFF\' d=\'M42,0l22,22H42V0z\' /><path fill=\'#FDFFFF\' d=\'M50,39H14v-5h36V39z M50,46H14v5h36V46z M40,58H14v5h26V58z\' /></svg>","supports":{"align":["left","right","center","wide","full"],"anchor":true},"attributes":{"url":{"type":"string","default":""},"aspectRatio":{"type":"string"},"variation":{"type":"string"}},"variations":[{"name":"jetpack/google-docs","isDefault":true,"title":"Google Docs","description":"Embed a Google Document.","icon":"<svg viewBox=\'0 0 64 88\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M58,88H6c-3.3,0-6-2.7-6-6V6c0-3.3,2.7-6,6-6h36l22,22v60C64,85.3,61.3,88,58,88z\' /><path fill=\'#FDFFFF\' d=\'M42,0l22,22H42V0z\' /><path fill=\'#FDFFFF\' d=\'M50,39H14v-5h36V39z M50,46H14v5h36V46z M40,58H14v5h26V58z\' /></svg>","keywords":["document","gsuite","doc"],"attributes":{"variation":"jetpack/google-docs"},"isActive":["variation"]},{"name":"jetpack/google-sheets","isDefault":true,"title":"Google Sheets","description":"Embed a Google Sheet.","icon":"<svg viewBox=\'0 0 64 88\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M58,88H6c-3.3,0-6-2.7-6-6V6c0-3.3,2.7-6,6-6h36l22,22v60C64,85.3,61.3,88,58,88z\' /><path fill=\'#FDFFFF\' d=\'M42,0l22,22H42V0z\' /><path fill=\'#FDFFFF\' d=\'M12,34.5v28h40v-28H12z M17,39.5h12.5V46H17V39.5z M17,51h12.5v6.5H17V51z M47,57.5H34.5V51H47V57.5z M47,46 H34.5v-6.5H47V46z\' /></svg>","keywords":["sheet","spreadsheet"],"attributes":{"variation":"jetpack/google-sheets"},"isActive":["variation"]},{"name":"jetpack/google-slides","isDefault":true,"title":"Google Slides","description":"Embed a Google Slides presentation.","icon":"<svg viewBox=\'0 0 64 88\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M58,88H6c-3.3,0-6-2.7-6-6V6c0-3.3,2.7-6,6-6h36l22,22v60C64,85.3,61.3,88,58,88z\' /><path fill=\'#FDFFFF\' d=\'M42,0l22,22H42V0z\' /><path fill=\'#FDFFFF\' d=\'M12,34.5v28h40v-28H12z M47,57.5H17v-18h30V57.5z\' /></svg>","keywords":["slide","presentation","deck"],"attributes":{"variation":"jetpack/google-slides"},"isActive":["variation"]}]}')},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"}]')},61281:function(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/recipe","title":"Recipe (Beta)","description":"Add images, ingredients and cooking steps to display an easy to read recipe.","keywords":[],"version":"12.5.0","textdomain":"jetpack","category":"widgets","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M21,5c-1.11-0.35-2.33-0.5-3.5-0.5c-1.95,0-4.05,0.4-5.5,1.5c-1.45-1.1-3.55-1.5-5.5-1.5S2.45,4.9,1,6v14.65 c0,0.25,0.25,0.5,0.5,0.5c0.1,0,0.15-0.05,0.25-0.05C3.1,20.45,5.05,20,6.5,20c1.95,0,4.05,0.4,5.5,1.5c1.35-0.85,3.8-1.5,5.5-1.5 c1.65,0,3.35,0.3,4.75,1.05c0.1,0.05,0.15,0.05,0.25,0.05c0.25,0,0.5-0.25,0.5-0.5V6C22.4,5.55,21.75,5.25,21,5z M21,18.5 c-1.1-0.35-2.3-0.5-3.5-0.5c-1.7,0-4.15,0.65-5.5,1.5V8c1.35-0.85,3.8-1.5,5.5-1.5c1.2,0,2.4,0.15,3.5,0.5V18.5z\' /><path d=\'M17.5,10.5c0.88,0,1.73,0.09,2.5,0.26V9.24C19.21,9.09,18.36,9,17.5,9c-1.7,0-3.24,0.29-4.5,0.83v1.66 C14.13,10.85,15.7,10.5,17.5,10.5z\' /><path d=\'M13,12.49v1.66c1.13-0.64,2.7-0.99,4.5-0.99c0.88,0,1.73,0.09,2.5,0.26V11.9c-0.79-0.15-1.64-0.24-2.5-0.24 C15.8,11.66,14.26,11.96,13,12.49z\' /><path d=\'M17.5,14.33c-1.7,0-3.24,0.29-4.5,0.83v1.66c1.13-0.64,2.7-0.99,4.5-0.99c0.88,0,1.73,0.09,2.5,0.26v-1.52 C19.21,14.41,18.36,14.33,17.5,14.33z\' /></svg>","supports":{"align":["full","wide"],"alignWide":true,"anchor":false,"customClassName":true,"className":true,"html":false,"multiple":true,"reusable":true},"attributes":{"ingredients":{"type":"array","default":[]},"steps":{"type":"array","default":[]}}}')},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 a=Object.create(null);c.r(a);var o={};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){o[e]=function(){return n[e]}}));return o.default=function(){return n},c.d(a,o),a},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,a,o){if(n[e])n[e].push(t);else{var i,s;if(void 0!==a)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var d=l[u];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==r+a){i=d;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+a),i.src=e),n[e]=[t];var p=function(t,r){i.onerror=i.onload=null,clearTimeout(m);var a=n[e];if(delete n[e],i.parentNode&&i.parentNode.removeChild(i),a&&a.forEach((function(e){return e(r)})),t)return t(r)},m=setTimeout(p.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=p.bind(null,i.onerror),i.onload=p.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}(),a=function(e){return new Promise((function(t,n){var r=c.miniCssF(e),a=c.p+r;if(function(e,t){for(var n=document.getElementsByTagName("link"),r=0;r<n.length;r++){var a=(i=n[r]).getAttribute("data-href")||i.getAttribute("href");if("stylesheet"===i.rel&&(a===e||a===t))return i}var o=document.getElementsByTagName("style");for(r=0;r<o.length;r++){var i;if((a=(i=o[r]).getAttribute("data-href"))===e||a===t)return i}}(r,a))return t();!function(e,t,n,r){var a=document.createElement("link");a.rel="stylesheet",a.type="text/css",a.onerror=a.onload=function(o){if(a.onerror=a.onload=null,"load"===o.type)n();else{var i=o&&("load"===o.type?"missing":o.type),s=o&&o.target&&o.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,a.parentNode.removeChild(a),r(c)}},a.href=t,document.head.appendChild(a)}(e,a,t,n)}))},o={35:0,189:0,161:0,486:0},c.f.miniCss=function(e,t){o[e]?t.push(o[e]):0!==o[e]&&{390:1}[e]&&t.push(o[e]=a(e).then((function(){o[e]=0}),(function(t){throw delete o[e],t})))},function(){var e={35:0,189:0,161:0,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 a=new Promise((function(n,a){r=e[t]=[n,a]}));n.push(r[2]=a);var o=c.p+c.u(t),i=new Error;c.l(o,(function(n){if(c.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var a=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;i.message="Loading chunk "+t+" failed.\n("+a+": "+o+")",i.name="ChunkLoadError",i.type=a,i.request=o,r[1](i)}}),"chunk-"+t,t)}else e[t]=0};var t=function(t,n){var r,a,o=n[0],i=n[1],s=n[2],l=0;if(o.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<o.length;l++)a=o[l],c.o(e,a)&&e[a]&&e[a][0](),e[a]=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(86116),c(44359),c(35681),c(60866),c(48887),c(52020),c(54271),c(82566),c(67140),c(83772),c(56071),c(63139),c(58710),c(93052),c(34575),c(66852),c(61204),c(22055),c(49702),c(92482),c(96564),c(7414),c(28345),c(85053),c(55802),c(36836),c(94315),c(89517),c(50323),c(23346),c(48111),c(27425),c(14406),c(36227),c(17013),c(10601),c(88067),c(57780),c(47158),c(14035),c(37549),c(3432),c(5477),c(71664),c(27780),c(21964),c(83759),c(23134),c(30070),c(6454),c(16042),c(39223),c(25070),c(45939),c(60405);c(49342)}();
Save Changes
Rename File
Rename