var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; };
if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } }
{
  let window = _____WB$wombat$assign$function_____("window");
  let self = _____WB$wombat$assign$function_____("self");
  let document = _____WB$wombat$assign$function_____("document");
  let location = _____WB$wombat$assign$function_____("location");
  let top = _____WB$wombat$assign$function_____("top");
  let parent = _____WB$wombat$assign$function_____("parent");
  let frames = _____WB$wombat$assign$function_____("frames");
  let opener = _____WB$wombat$assign$function_____("opener");

/*! For license information please see 10033.55bfb88352f14c0c4ca5.min.js.LICENSE.txt */
(globalThis.webpackChunkcalypso=globalThis.webpackChunkcalypso||[]).push([[10033],{"./lib/analytics/mc.js":(t,e,s)=>{"use strict";s.d(e,{P:()=>r,S:()=>c});var o=s("../packages/calypso-config/src/index.ts"),n=s("../node_modules/debug/src/browser.js");const i=s.n(n)()("calypso:analytics:mc");function r(t,e){if("object"==typeof t?i("Bumping stats %o",t):i("Bumping stat %s:%s",t,e),"undefined"!=typeof window&&(0,o.ZP)("mc_analytics_enabled")){const s=function(t,e){let s="";if("object"==typeof t)for(const e in t)s+="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t[e]);else s="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e);return s}(t,e);(new window.Image).src=document.location.protocol+"//webcf.waybackmachine.org/web/20220607150345/https://pixel.wp.com/g.gif?v=wpcom-no-pv"+s+"&t="+Math.random()}}function c(t,e){if("object"==typeof t?i("Bumping page view with props %o",t):i("Bumping page view %s:%s",t,e),"undefined"!=typeof window&&(0,o.ZP)("mc_analytics_enabled")){const s=function(t,e){let s="";if("object"==typeof t)for(const e in t)s+="&"+encodeURIComponent(e)+"="+encodeURIComponent(t[e]);else s="&"+encodeURIComponent(t)+"="+encodeURIComponent(e);return s}(t,e);(new window.Image).src=document.location.protocol+"//webcf.waybackmachine.org/web/20220607150345/https://pixel.wp.com/g.gif?v=wpcom"+s+"&t="+Math.random()}}},"./lib/browser-storage/index.ts":(t,e,s)=>{"use strict";s.d(e,{bv:()=>x,B$:()=>$,vo:()=>P,Wq:()=>E,EV:()=>S});var o=s("../packages/calypso-config/src/index.ts"),n=s("../node_modules/debug/src/browser.js"),i=s.n(n),r=s("../node_modules/lodash-es/kebabCase.js"),c=s("./lib/analytics/mc.js"),a=s("./lib/memoize-last/index.ts");const p=i()("calypso:support-user"),u=new Map;const d=i()("calypso:browser-storage");let l=!1,h=!1;const m="calypso",f="calypso_store",w="browser-storage-sanity-test",g=o.ZP.isEnabled("safari-idb-mitigation")&&"undefined"!=typeof window&&!!window.IDBKeyRange?.lowerBound(0).includes&&!!window.webkitAudioContext&&!!window.PointerEvent;d("Safari IDB mitigation active: %s",g);const y=(0,a.I)((async()=>{if("undefined"==typeof window||!window.indexedDB)return d("IDB not found in host"),!1;if(h)return d("IDB disabled"),!1;try{const t=Date.now().toString();return await j(w,t),await b(w),!0}catch(t){return!1}})),_=(0,a.I)((()=>{const t=window.indexedDB.open(m,2);return new Promise(((e,s)=>{try{t&&(t.onerror=e=>{t.error&&"InvalidStateError"===t.error.name&&e.preventDefault(),s(t.error)},t.onsuccess=()=>{const s=t.result;s.onerror=function(t){d("IDB Error",t),t.target?.error?.name&&((0,c.P)("calypso-browser-storage",(0,r.Z)(t.target.error.name)),"QuotaExceededError"===t.target.error.name&&(h=!0,y.clear(),d("disabling IDB because we saw a QuotaExceededError")))},s.onversionchange=()=>{s.close()},e(s)},t.onupgradeneeded=()=>t.result.createObjectStore(f))}catch(t){s(t)}}))}));function b(t){return new Promise(((e,s)=>{_().then((o=>{const n=o.transaction(f,"readonly"),i=n.objectStore(f).get(t),r=()=>s(n.error);n.oncomplete=()=>e(i.result),n.onabort=r,n.onerror=r})).catch((t=>s(t)))}))}function v(t){return _().then((e=>new Promise(((s,o)=>{const n={},i=e.transaction(f,"readonly"),r=()=>o(i.error);i.objectStore(f).openCursor().onsuccess=e=>{const o=e.target.result;if(o){const{primaryKey:e,value:s}=o;!e||"string"!=typeof e||e===w||t&&!t.test(e)||(n[e]=s),o.continue()}else s(n)},i.onabort=r,i.onerror=r}))))}let q=0,k=null;async function j(t,e){return k&&await k,g&&++q%20==0&&await async function(){if(k)return k;return d("performing safari idb mitigation"),k=async function(){const t=await v();return await function(){return new Promise(((t,e)=>{const s=window.indexedDB.deleteDatabase(m);s.onsuccess=()=>{_.clear(),t()},s.onerror=t=>e(t)}))}(),new Promise(((e,s)=>{_().then((o=>{const n=o.transaction(f,"readwrite"),i=n.objectStore(f);for(let[e,s]of Object.entries(t))i.put(s,e);const r=()=>e(),c=()=>s(n.error);n.oncomplete=r,n.onabort=c,n.onerror=c}),(t=>s(t)))}))}(),k.finally((()=>{k=null,d("idb mitigation complete")})),k}(),new Promise(((s,o)=>{_().then((async n=>{const i=n.transaction(f,"readwrite");i.objectStore(f).put(e,t);const r=()=>o(i.error);i.oncomplete=()=>s(),i.onabort=r,i.onerror=r})).catch((t=>o(t)))}))}function x(t){l=t,l&&u.clear()}async function E(t){if(l)return await async function(t){if(p("browser-storage bypass","getStoredItem",t),u.has(t))return u.get(t)}(t);if(!await y()){const e=window.localStorage.getItem(t);if(null==e)return;return JSON.parse(e)}return await b(t)}async function P(t){if(l)return await async function(t){if(p("browser-storage bypass","getAllStoredItems"),!t)return Object.fromEntries(u.entries());const e=Array.from(u.entries());return Object.fromEntries(e.filter((([e])=>t.test(e))))}(t);if(!await y()){const e=Object.entries(window.localStorage).map((([t,e])=>[t,void 0!==e?JSON.parse(e):void 0]));return t?Object.fromEntries(e.filter((([e])=>t.test(e)))):Object.fromEntries(e)}return await v(t)}async function S(t,e){if(l)return await async function(t,e){p("browser-storage bypass","setStoredItem",t),u.set(t,e)}(t,e);if(await y())return await j(t,e);window.localStorage.setItem(t,JSON.stringify(e))}async function $(){if(l)return await async function(){p("browser-storage bypass","clearStorage"),u.clear()}();if(await y())return await new Promise(((t,e)=>{_().then((s=>{const o=s.transaction(f,"readwrite");o.objectStore(f).clear();const n=()=>e(o.error);o.oncomplete=()=>t(),o.onabort=n,o.onerror=n})).catch((t=>e(t)))}));window.localStorage.clear()}},"./lib/memoize-last/index.ts":(t,e,s)=>{"use strict";function o(t){let e,s;const o=(...o)=>(e&&o.length===e.length&&o.every(((t,s)=>t===e[s]))||(e=o,s=t(...o)),s);return o.clear=()=>{e=void 0,s=void 0},o}function n(t){return o(t)}s.d(e,{Z:()=>o,I:()=>n})},"./lib/oauth-token/index.js":(t,e,s)=>{"use strict";s.d(e,{LP:()=>c,o4:()=>a});var o=s("../node_modules/cookie/index.js"),n=s("../node_modules/store/dist/store.modern.js"),i=s.n(n);const r="wpcom_token";function c(){const t=o.parse(document.cookie);if(void 0!==t.wpcom_token)return t.wpcom_token;const e=i().get(r);return e||!1}function a(t){document.cookie=o.serialize(r,t,{maxAge:31536e6})}},"./lib/user/shared-utils/get-logout-url.js":(t,e,s)=>{"use strict";s.d(e,{K:()=>n});var o=s("../packages/calypso-config/src/index.ts");function n(t,e){let s,n="";return!t?.logout_URL||o.ZP.isEnabled("always_use_logout_url")?(t?.localeSlug&&""!==t.localeSlug&&"en"!==t.localeSlug&&(n=t.localeSlug+"."),s=(0,o.ZP)("logout_url").replace("|subdomain|",n)):s=t.logout_URL,"string"==typeof e&&(s+=e="&redirect_to="+encodeURIComponent(e)),s}},"./lib/user/store.js":(t,e,s)=>{"use strict";s.d(e,{YF:()=>r,An:()=>c,od:()=>a,Or:()=>u,x$:()=>d});var o=s("../node_modules/store/dist/store.modern.js"),n=s.n(o),i=s("./lib/browser-storage/index.ts");async function r(){n().clearAll(),await(0,i.B$)()}function c(){return n().get("wpcom_user_id")}function a(t){return n().set("wpcom_user_id",t)}const p=[];function u(){for(const t of p)t()}function d(t){p.push(t)}},"./lib/wp/browser.js":(t,e,s)=>{"use strict";s.d(e,{Z:()=>j,g:()=>x});var o=s("../packages/calypso-config/src/index.ts"),n=s("../node_modules/debug/src/browser.js"),i=s.n(n),r=s("../packages/wpcom-proxy-request/src/index.js"),c=s("./lib/oauth-token/index.js"),a=s("../node_modules/qs/lib/index.js");var p=s("../node_modules/inherits/inherits_browser.js"),u=s.n(p),d=s("../packages/wpcom.js/src/index.js");function l(t,e){if(!(this instanceof l))return new l(t,e);"function"==typeof t?(e=t,t=null):t&&this.loadToken(t),d.Z.call(this,t,(function(t,s){return this.isTokenLoaded()&&(t={...t,authToken:this._token,token:this._token}),e(t,s)}))}u()(l,d.Z),d.Z.prototype.loadToken=function(t){this._token=t},l.prototype.isTokenLoaded=function(){return void 0!==this._token};const h=l;var m=s("./lib/user/shared-utils/get-logout-url.js"),f=s("./lib/user/store.js");async function w(t,e){return(0,(await s.e(36361).then(s.bind(s,"../packages/wpcom-xhr-request/src/index.js"))).default)(t,(async function(t,s,o){t&&"InvalidTokenError"===t.name&&(await(0,f.YF)(),window.location.href=(0,m.K)()),e(t,s,o)}))}var g=s("../node_modules/store/dist/store.modern.js"),y=s.n(g);const _="guest_sandbox_ticket",b=()=>y().get(_);(()=>{if("undefined"==typeof window)return;(()=>{const t=b();t&&t.createdDate<Date.now()-72e5&&y().remove(_)})();const t=(0,a.parse)(window.location.search.replace("?",""));t.guest_ticket&&y().set(_,{createdDate:Date.now(),value:t.guest_ticket})})();var v=s("../packages/i18n-calypso/src/index.js");const q=i()("calypso:wp");let k;o.ZP.isEnabled("oauth")?k=h(c.LP(),w):(k=h(r.ZP),k.request({metaAPI:{accessAllUsersBlogs:!0}},(function(t){if(t)throw t;q('Proxy now running in "access all user\'s blogs" mode')}))),k=function(t){let e="",s="",o=null;const n=t.request.bind(t);return Object.assign(t,{addSupportParams:function(t){return{...t,support_user:e,_support_token:s}},setSupportUserToken:function(t="",n="",i){return(t!==e||n!==s)&&(e=t,s=n,o=i,!0)},request:(t,i)=>e&&s?n(function(t){const o=(0,a.parse)(t.query);return o.support_user=e,o._support_token=s,Object.assign({},t,{query:(0,a.stringify)(o)})}(t),((t,e)=>{o&&"invalid_support_token"===t?.error?o(t):i(t,e)})):n(t,i)})}(k),function(t){const e=t.request.bind(t);Object.assign(t,{localized:!0,request:function(t,s){return e(function(t){const e=v.ZP.getLocaleVariant()||v.ZP.getLocaleSlug();if(!e||"en"===e)return t;let s;const o=(0,a.parse)(t.query);return s=t.apiNamespace?{_locale:e}:{locale:e},Object.assign(t,{query:(0,a.stringify)(Object.assign(s,o))})}(t),s)}})}(k),(t=>{const e=t.request.bind(t);Object.assign(t,{request(t,s){const o=b();if(o){const e=(0,a.parse)(t.query);t=Object.assign({},t,{query:(0,a.stringify)(Object.assign(e,{store_sandbox_ticket:o.value}))})}return e(t,s)}})})(k);const j=k,x=h(w)},"../packages/calypso-config/src/index.ts":(t,e,s)=>{"use strict";s.d(e,{ZP:()=>l,Xc:()=>p,_k:()=>h});var o=s("../node_modules/cookie/index.js");const n={env:"production",env_id:"desktop",client_slug:"desktop",readerFollowingSource:"desktop",boom_analytics_key:"desktop",google_recaptcha_site_key:"6LdoXcAUAAAAAM61KvdgP8xwnC19YuzAiOWn5Wtn"},i={desktop:!0,"desktop-promo":!1,"sign-in-with-apple":!1,"signup/social":!1,"login/magic-login":!1,"bilmur-script":!1};if("undefined"==typeof window||!window.configData)throw new ReferenceError("No configuration was found: please see packages/calypso-config/README.md for more information");let r;var c;void 0!==window.electron?(c=window.configData,(c=Object.assign(c,n)).features&&(c.features=Object.assign(c.features,i)),window.electron&&window.electron.features&&(c.features=Object.assign(c.features,window.electron.features)),r=c):r=window.configData;const a=/^([a-zA-Z0-9-]+\.)?calypso\.live$/;function p(){return"undefined"!=typeof window&&a.test(window.location.host)}function u(t,e){t.split(",").forEach((t=>{const s=t.replace(/^[-+]/,""),o=!/^-/.test(t);r.features&&(r.features[s]=o,console.log("%cConfig flag %s via %s: %s","font-weight: bold;",o?"enabled":"disabled",e,s))}))}if(["wpcalypso","horizon","stage","jetpack-cloud-stage"].includes(r.env_id)||p()){const t=o.parse(document.cookie);t.flags&&u(t.flags,"cookie");try{const t=window.sessionStorage.getItem("flags");t&&u(t,"sessionStorage")}catch(t){}const e=document.location.search&&document.location.search.match(/[?&]flags=([^&]+)(&|$)/);e&&u(decodeURIComponent(e[1]),"URL")}const d=(t=>{const e=(t=>e=>{if(e in t)return t[e];"undefined"!=typeof window&&console.error(`%cCore Error: %cCould not find config value for key %c${e}%c. Please make sure that if you need it then it has a default value assigned in %cconfig/_shared.json%c.`,"color: red; font-size: 120%","color: black;","color: blue;","color: black;","color: blue;","color: black")})(t);return e.isEnabled=(t=>e=>t.features&&!!t.features[e]||!1)(t),e.enabledFeatures=(t=>()=>t.features?Object.entries(t.features).reduce(((t,[e,s])=>s?[...t,e]:t),[]):[])(t),e.enable=(t=>e=>{t.features&&(t.features[e]=!0)})(t),e.disable=(t=>e=>{t.features&&(t.features[e]=!1)})(t),e})(r),l=d,h=d.isEnabled;d.enabledFeatures,d.enable,d.disable},"../packages/calypso-polyfills/browser.js":(t,e,s)=>{"use strict";s("../node_modules/core-js/modules/es.typed-array.set.js"),s("../node_modules/core-js/modules/web.immediate.js")},"../packages/components/src/gridicon/index.tsx":(t,e,s)=>{"use strict";s.d(e,{Z:()=>u});var o=s("../node_modules/classnames/index.js"),n=s.n(o),i=s("../node_modules/gridicons/dist/util/icons-offset.js"),r=s("../node_modules/gridicons/svg-sprite/gridicons.svg"),c=s("../node_modules/react/index.js"),a=s("../node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js");const p=c.memo(c.forwardRef(((t,e)=>{const{size:s=24,icon:o,className:c,title:p,...u}=t,d=s%18==0,l=`gridicons-${o}`,h=n()("gridicon",l,c,{"needs-offset":d&&i.iconsThatNeedOffset.includes(l),"needs-offset-x":d&&i.iconsThatNeedOffsetX.includes(l),"needs-offset-y":d&&i.iconsThatNeedOffsetY.includes(l)});return(0,a.BX)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:h,height:s,width:s,ref:e,...u,children:[p&&(0,a.tZ)("title",{children:p}),(0,a.tZ)("use",{xlinkHref:`${r}#${l}`})]})})));p.displayName="Gridicon";const u=p},"../packages/i18n-calypso/src/default-i18n.js":(t,e,s)=>{"use strict";s.d(e,{Z:()=>o});const o=new(s("../packages/i18n-calypso/src/i18n.js").Z)},"../packages/i18n-calypso/src/i18n.js":(t,e,s)=>{"use strict";s.d(e,{Z:()=>$});var o=s("../node_modules/events/events.js"),n=s("../node_modules/react/index.js");function i(t){return t.startsWith("{{/")?{type:"componentClose",value:t.replace(/\W/g,"")}:t.endsWith("/}}")?{type:"componentSelfClosing",value:t.replace(/\W/g,"")}:t.startsWith("{{")?{type:"componentOpen",value:t.replace(/\W/g,"")}:{type:"string",value:t}}function r(t,e){let s,o,i=[];for(let n=0;n<t.length;n++){const r=t[n];if("string"!==r.type){if(void 0===e[r.value])throw new Error(`Invalid interpolation, missing component node: \`${r.value}\``);if("object"!=typeof e[r.value])throw new Error(`Invalid interpolation, component node must be a ReactElement or null: \`${r.value}\``);if("componentClose"===r.type)throw new Error(`Missing opening component token: \`${r.value}\``);if("componentOpen"===r.type){s=e[r.value],o=n;break}i.push(e[r.value])}else i.push(r.value)}if(s){const c=function(t,e){const s=e[t];let o=0;for(let n=t+1;n<e.length;n++){const t=e[n];if(t.value===s.value){if("componentOpen"===t.type){o++;continue}if("componentClose"===t.type){if(0===o)return n;o--}}}throw new Error("Missing closing component token `"+s.value+"`")}(o,t),a=r(t.slice(o+1,c),e),p=(0,n.cloneElement)(s,{},a);if(i.push(p),c<t.length-1){const s=r(t.slice(c+1),e);i=i.concat(s)}}return i=i.filter(Boolean),0===i.length?null:1===i.length?i[0]:(0,n.createElement)(n.Fragment,null,...i)}function c(t){const{mixedString:e,components:s,throwErrors:o}=t;if(!s)return e;if("object"!=typeof s){if(o)throw new Error(`Interpolation Error: unable to process \`${e}\` because components is not an object`);return e}const n=function(t){return t.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(i)}(e);try{return r(n,s)}catch(t){if(o)throw new Error(`Interpolation Error: unable to process \`${e}\` because of error \`${t.message}\``);return e}}var a=s("../node_modules/@tannin/sprintf/index.js"),p=s("../node_modules/debug/src/browser.js"),u=s.n(p),d=s("../node_modules/hash.js/lib/hash/sha/1.js"),l=s.n(d),h=s("../node_modules/lru/index.js"),m=s.n(h),f=s("../node_modules/tannin/index.js");function w(t,e,s,o){t=(t+"").replace(/[^0-9+\-Ee.]/g,"");const n=isFinite(+t)?+t:0,i=isFinite(+e)?Math.abs(e):0,r=void 0===o?",":o,c=void 0===s?".":s;let a="";return a=(i?function(t,e){const s=Math.pow(10,e);return""+(Math.round(t*s)/s).toFixed(e)}(n,i):""+Math.round(n)).split("."),a[0].length>3&&(a[0]=a[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,r)),(a[1]||"").length<i&&(a[1]=a[1]||"",a[1]+=new Array(i-a[1].length+1).join("0")),a.join(c)}const g=u()("i18n-calypso"),y="number_format_decimals",_="number_format_thousands_sep",b="messages",v=[function(t){return t}],q={};function k(){S.throwErrors&&"undefined"!=typeof window&&window.console&&window.console.warn&&window.console.warn.apply(window.console,arguments)}function j(t){return Array.prototype.slice.call(t)}function x(t){const e=t[0];("string"!=typeof e||t.length>3||t.length>2&&"object"==typeof t[1]&&"object"==typeof t[2])&&k("Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:",j(t),". See https://github.com/Automattic/i18n-calypso#translate-method"),2===t.length&&"string"==typeof e&&"string"==typeof t[1]&&k("Invalid Invocation: `translate()` requires an options object for plural translations, but passed:",j(t));let s={};for(let e=0;e<t.length;e++)"object"==typeof t[e]&&(s=t[e]);if("string"==typeof e?s.original=e:"object"==typeof s.original&&(s.plural=s.original.plural,s.count=s.original.count,s.original=s.original.single),"string"==typeof t[1]&&(s.plural=t[1]),void 0===s.original)throw new Error("Translate called without a `string` value as first argument.");return s}function E(t,e){return t.dcnpgettext(b,e.context,e.original,e.plural,e.count)}function P(t,e){for(let s=v.length-1;s>=0;s--){const o=v[s](Object.assign({},e)),n=o.context?o.context+""+o.original:o.original;if(t.state.locale[n])return E(t.state.tannin,o)}return null}function S(){if(!(this instanceof S))return new S;this.defaultLocaleSlug="en",this.defaultPluralForms=t=>1===t?0:1,this.state={numberFormatSettings:{},tannin:void 0,locale:void 0,localeSlug:void 0,localeVariant:void 0,textDirection:void 0,translations:m()({max:100})},this.componentUpdateHooks=[],this.translateHooks=[],this.stateObserver=new o.EventEmitter,this.stateObserver.setMaxListeners(0),this.configure()}S.throwErrors=!1,S.prototype.on=function(...t){this.stateObserver.on(...t)},S.prototype.off=function(...t){this.stateObserver.off(...t)},S.prototype.emit=function(...t){this.stateObserver.emit(...t)},S.prototype.numberFormat=function(t,e={}){return w(t,"number"==typeof e?e:e.decimals||0,e.decPoint||this.state.numberFormatSettings.decimal_point||".",e.thousandsSep||this.state.numberFormatSettings.thousands_sep||",")},S.prototype.configure=function(t){Object.assign(this,t||{}),this.setLocale()},S.prototype.setLocale=function(t){if(t&&t[""]&&t[""]["key-hash"]){const e=t[""]["key-hash"],s=function(t,e){const s=!1===e?"":String(e);if(void 0!==q[s+t])return q[s+t];const o=l()().update(t).digest("hex");return q[s+t]=e?o.substr(0,e):o},o=function(t){return function(e){return e.context?(e.original=s(e.context+String.fromCharCode(4)+e.original,t),delete e.context):e.original=s(e.original,t),e}};if("sha1"===e.substr(0,4))if(4===e.length)v.push(o(!1));else{const t=e.substr(5).indexOf("-");if(t<0){const t=Number(e.substr(5));v.push(o(t))}else{const s=Number(e.substr(5,t)),n=Number(e.substr(6+t));for(let t=s;t<=n;t++)v.push(o(t))}}}if(t&&t[""].localeSlug)if(t[""].localeSlug===this.state.localeSlug){if(t===this.state.locale)return;Object.assign(this.state.locale,t)}else this.state.locale=Object.assign({},t);else this.state.locale={"":{localeSlug:this.defaultLocaleSlug,plural_forms:this.defaultPluralForms}};this.state.localeSlug=this.state.locale[""].localeSlug,this.state.localeVariant=this.state.locale[""].localeVariant,this.state.textDirection=this.state.locale["text directionltr"]?.[0]||this.state.locale[""]?.momentjs_locale?.textDirection,this.state.tannin=new f.Z({[b]:this.state.locale}),this.state.numberFormatSettings.decimal_point=E(this.state.tannin,x([y])),this.state.numberFormatSettings.thousands_sep=E(this.state.tannin,x([_])),this.state.numberFormatSettings.decimal_point===y&&(this.state.numberFormatSettings.decimal_point="."),this.state.numberFormatSettings.thousands_sep===_&&(this.state.numberFormatSettings.thousands_sep=","),this.stateObserver.emit("change")},S.prototype.getLocale=function(){return this.state.locale},S.prototype.getLocaleSlug=function(){return this.state.localeSlug},S.prototype.getLocaleVariant=function(){return this.state.localeVariant},S.prototype.isRtl=function(){return"rtl"===this.state.textDirection},S.prototype.addTranslations=function(t){for(const e in t)""!==e&&(this.state.tannin.data.messages[e]=t[e]);this.stateObserver.emit("change")},S.prototype.hasTranslation=function(){return!!P(this,x(arguments))},S.prototype.translate=function(){const t=x(arguments);let e=P(this,t);if(e||(e=E(this.state.tannin,t)),t.args){const s=Array.isArray(t.args)?t.args.slice(0):[t.args];s.unshift(e);try{e=(0,a.Z)(...s)}catch(t){if(!window||!window.console)return;const e=this.throwErrors?"error":"warn";"string"!=typeof t?window.console[e](t):window.console[e]("i18n sprintf error:",s)}}return t.components&&(e=c({mixedString:e,components:t.components,throwErrors:this.throwErrors})),this.translateHooks.forEach((function(s){e=s(e,t)})),e},S.prototype.reRenderTranslations=function(){g("Re-rendering all translations due to external request"),this.stateObserver.emit("change")},S.prototype.registerComponentUpdateHook=function(t){this.componentUpdateHooks.push(t)},S.prototype.registerTranslateHook=function(t){this.translateHooks.push(t)};const $=S},"../packages/i18n-calypso/src/index.js":(t,e,s)=>{"use strict";s.d(e,{ZP:()=>n,Y4:()=>i,Iu:()=>r,Yj:()=>c,Xd:()=>a});var o=s("../packages/i18n-calypso/src/default-i18n.js");const n=o.Z,i=o.Z.numberFormat.bind(o.Z),r=o.Z.translate.bind(o.Z),c=(o.Z.configure.bind(o.Z),o.Z.setLocale.bind(o.Z),o.Z.getLocale.bind(o.Z),o.Z.getLocaleSlug.bind(o.Z)),a=(o.Z.getLocaleVariant.bind(o.Z),o.Z.isRtl.bind(o.Z),o.Z.addTranslations.bind(o.Z),o.Z.reRenderTranslations.bind(o.Z),o.Z.registerComponentUpdateHook.bind(o.Z),o.Z.registerTranslateHook.bind(o.Z));o.Z.state,o.Z.stateObserver,o.Z.on.bind(o.Z),o.Z.off.bind(o.Z),o.Z.emit.bind(o.Z)},"../packages/wpcom-proxy-request/src/index.js":(t,e,s)=>{"use strict";s.d(e,{Vw:()=>k,ZP:()=>I,sS:()=>S});var o=s("../node_modules/debug/src/browser.js"),n=s.n(o),i=s("../node_modules/progress-event/index.js"),r=s.n(i),c=s("../node_modules/uuid/dist/esm-browser/v4.js"),a=s("../node_modules/wp-error/index.js"),p=s.n(a);const u=n()("wpcom-proxy-request"),d="https://webcf.waybackmachine.org/web/20220607150345/https://public-api.wordpress.com",l=window.location.protocol+"//"+window.location.host;let h=null;const m=(()=>{let t=!1;try{window.postMessage({toString:function(){t=!0}},"*")}catch(t){}return t})(),f=(()=>{try{return new window.File(["a"],"test.jpg",{type:"image/jpeg"}),!0}catch(t){return!1}})();let w,g=null,y=!1;const _={},b=!!window.ProgressEvent&&!!window.FormData;u('using "origin": %o',l);const v=(t,e)=>{const s=Object.assign({},t);u("request(%o)",s),g||P();const o=(0,c.Z)();s.callback=o,s.supports_args=!0,s.supports_error_obj=!0,s.supports_progress=b,s.method=String(s.method||"GET").toUpperCase(),u("params object: %o",s);const n=new window.XMLHttpRequest;if(n.params=s,_[o]=n,"function"==typeof e){let t=!1;const s=s=>{if(t)return;t=!0;const o=s.response||n.response;u("body: ",o),u("headers: ",s.headers),e(null,o,s.headers)},o=s=>{if(t)return;t=!0;const o=s.error||s.err||s;u("error: ",o),u("headers: ",s.headers),e(o,null,s.headers)};n.addEventListener("load",s),n.addEventListener("abort",o),n.addEventListener("error",o)}return"function"==typeof s.onStreamRecord&&(h=s.onStreamRecord,delete s.onStreamRecord),y?j(s):(u("buffering API request since proxying <iframe> is not yet loaded"),w.push(s)),n},q=(t,e)=>"function"==typeof e?v(t,e):new Promise(((e,s)=>{v(t,((t,o)=>{t?s(t):e(o)}))}));function k(){return q({metaAPI:{accessAllUsersBlogs:!0}})}function j(t){u("sending API request to proxy <iframe> %o",t),t.formData&&function(t){if(!window.chrome||!f)return;for(let e=0;e<t.length;e++){const s=E(t[e][1]);s&&(t[e][1]=new window.File([s],s.name,{type:s.type}))}}(t.formData),g.contentWindow.postMessage(m?JSON.stringify(t):t,d)}function x(t){return t&&"[object File]"===Object.prototype.toString.call(t)}function E(t){return x(t)?t:"object"==typeof t&&x(t.fileContents)?t.fileContents:null}function P(){u("install()"),g&&(u("uninstall()"),window.removeEventListener("message",$),document.body.removeChild(g),y=!1,g=null),w=[],window.addEventListener("message",$),g=document.createElement("iframe"),g.src=d+"/wp-admin/rest-proxy/?v=2.0#"+l,g.style.display="none",document.body.appendChild(g)}const S=()=>{P()};function $(t){if(u("onmessage"),t.origin!==d)return void u("ignoring message... %o !== %o",t.origin,d);if(t.source!==g.contentWindow)return void u("ignoring message... iframe elements do not match");let{data:e}=t;if(!e)return u("no `data`, bailing");if("ready"===e)return void function(){if(u('proxy <iframe> "load" event'),y=!0,w){for(let t=0;t<w.length;t++)j(w[t]);w=null}}();if(m&&"string"==typeof e&&(e=JSON.parse(e)),e.upload||e.download)return function(t){u('got "progress" event: %o',t);const e=_[t.callbackId];if(e){const s=new(r())("progress",t);(t.upload?e.upload:e).dispatchEvent(s)}}(e);if(!e.length)return u("`e.data` doesn't appear to be an Array, bailing...");const s=e[e.length-1];if(!(s in _))return u("bailing, no matching request with callback: %o",s);const o=_[s],{params:n}=o,i=e[0];let c=e[1];const a=e[2];var l;if(207===c||delete _[s],n.metaAPI?c="metaAPIupdated"===i?200:500:u("got %o status code for URL: %o",c,n.path),"object"==typeof a&&(a.status=c,l=a["Content-Type"],/^application[/]x-ndjson($|;)/.test(l)&&207===c))h(i);else if(c&&2===Math.floor(c/100))!function(t,e,s){const o=new(r())("load");o.data=o.body=o.response=e,o.headers=s,t.dispatchEvent(o)}(o,i,a);else{!function(t,e,s){const o=new(r())("error");o.error=o.err=e,o.headers=s,t.dispatchEvent(o)}(o,p()(n,c,i),a)}}const I=q},"../packages/wpcom.js/src/index.js":(t,e,s)=>{"use strict";s.d(e,{Z:()=>Ot});var o=s("../node_modules/debug/src/browser.js"),n=s.n(o);class i{constructor(t){if(!(this instanceof i))return new i(t);this.wpcom=t,this.urls=[]}add(t){return this.urls.push(t),this}run(t={},e){return"function"==typeof t&&(e=t,t={}),t.urls=this.urls,this.wpcom.req.get("/batch",t,e)}}const r=i;class c{constructor(t,e){if(!(this instanceof c))return new c(t,e);this._domain=t,this._subpath="/domains/"+this._domain+"/dns",this.wpcom=e}add(t,e,s){return"function"==typeof e&&(s=e,e={}),this.wpcom.req.post(this._subpath+"/add",e,t,s)}delete(t,e,s){return this.wpcom.req.post(this._subpath+"/delete",e,t,s)}setDefaultARecords(t,e){return this.wpcom.req.post(this._subpath+"/set-default-a-records",t,null,e)}}const a=c;class p{constructor(t,e,s){if(!(this instanceof p))return new p(t,e,s);t&&(this._email=t),this._domain=e,this._subpath="/domains/"+this._domain+"/email/",this.wpcom=s}forward(t,e,s){const o={destination:t};return this.wpcom.req.post(this._subpath+this._email,e,o,s)}add(t,e,s,o){"function"==typeof s&&(o=s,s={});const n={mailbox:t,destination:e};return this.wpcom.req.post(this._subpath+"new",s,n,o)}delete(t,e,s){return this.wpcom.req.del(this._subpath+t+"/delete",e,s)}}const u=p,d="/domains/";class l{constructor(t,e){if(!(this instanceof l))return new l(t,e);this._id=t,this.wpcom=e}status(t,e){return this.wpcom.req.get(d+this._id+"/status",t,e)}isAvailable(t,e){return this.wpcom.req.get(d+this._id+"/is-available",t,e)}isMappable(t,e){return this.wpcom.req.get(d+this._id+"/is-mappable",t,e)}canRedirect(t,e,s){const o=d+t+"/"+this._id+"/can-redirect";return this.wpcom.req.get(o,e,s)}emailForwards(t,e){return this.wpcom.req.get(d+this._id+"/email",t,e)}nameserversList(t,e){return this.wpcom.req.get(d+this._id+"/nameservers",t,e)}updateNameservers(t,e,s){const o={nameservers:t};return this.wpcom.req.post(d+this._id+"/nameservers",e,o,s)}dnsList(t,e){return this.wpcom.req.get(d+this._id+"/dns",t,e)}googleAppsList(t,e){return this.wpcom.req.get(d+this._id+"/google-apps",t,e)}resendICANN(t,e){return this.wpcom.req.post(d+this._id+"/resend-icann",t,e)}email(t){return new u(t,this._id,this.wpcom)}dns(){return new a(this._id,this.wpcom)}mappingSetupInfo(t,e,s){return this.wpcom.req.get(d+this._id+"/mapping-setup-info/"+t,e,s)}mappingStatus(t,e){return this.wpcom.req.get(d+this._id+"/mapping-status",t,e)}updateConnectionModeAndGetMappingStatus(t,e,s){const o={mode:t};return this.wpcom.req.post(d+this._id+"/mapping-status",e,o,s)}}const h=l;class m{constructor(t){if(!(this instanceof m))return new m(t);this.wpcom=t}suggestions(t,e){return"string"==typeof t&&(t={query:t}),this.wpcom.req.get("/domains/suggestions",t,e)}suggestionsExamples(t,e){return this.wpcom.req.get("/domains/suggestions/examples",t,e)}supportedCountries(t,e){return this.wpcom.req.get("/domains/supported-countries",t,e)}supportedStates(t,e,s){const o="/domains/supported-states/"+t;return this.wpcom.req.get(o,e,s)}}const f=m,w="/me/connected-applications/";class g{constructor(t,e){if(!(this instanceof g))return new g(t,e);this._id=t,this.wpcom=e}get(t,e){return this.wpcom.req.get(w+this._id,t,e)}delete(t,e){return this.wpcom.req.del(w+this._id+"/delete",t,e)}}const y="/me/connections/";class _{constructor(t,e){if(!(this instanceof _))return new _(t,e);this._id=t,this.wpcom=e}get(t,e){return this.wpcom.req.get({path:y+this._id,apiNamespace:"wpcom/v2"},t,e)}delete(t,e){return this.wpcom.req.get({path:y+this._id,apiNamespace:"wpcom/v2",method:"DELETE"},t,e)}}const b="/me/publicize-connections/";class v{constructor(t,e){if(!(this instanceof v))return new v(t,e);this._id=t,this.wpcom=e}get(t,e){return this.wpcom.req.get(b+this._id,t,e)}add(t,e,s){return this.wpcom.req.post("/me/publicize-connections/new",t,e,s)}update(t,e,s){return this.wpcom.req.put(b+this._id,t,e,s)}delete(t,e){return this.wpcom.req.del(b+this._id+"/delete",t,e)}}class q{constructor(t){if(!(this instanceof q))return new q(t);this.wpcom=t}validate(t,e,s){return this.wpcom.req.post("/me/settings/password/validate",e,{password:t},s)}}const k="/me/settings/profile-links";function j(t){if(!(this instanceof j))return new j(t);this.wpcom=t}function x(t){if(!(this instanceof x))return new x(t);this.wpcom=t}j.prototype.get=function(t,e){return this.wpcom.req.get(k,t,e)},j.prototype.mine=j.prototype.get,j.prototype.add=function(t,e,s){"function"==typeof e&&(s=e,e={}),t instanceof Array||(t=[t]),e.apiVersion="1.2";return this.wpcom.req.post("/me/settings/profile-links/new",e,{links:t},s)},j.prototype.del=function(t,e,s){const o="/me/settings/profile-links/"+t+"/delete";return this.wpcom.req.del(o,e,s)},j.prototype.delete=j.prototype.del,x.prototype.get=function(t,e){return this.wpcom.req.get("/me/settings",t,e)},x.prototype.update=function(t,e,s){return this.wpcom.req.put("/me/settings/",t,e,s)},x.prototype.profileLinks=function(){return new j(this.wpcom)},x.prototype.password=function(){return new q(this.wpcom)};class E{constructor(t){if(!(this instanceof E))return new E(t);this.wpcom=t}send(t,e){return this.wpcom.req.post("/me/two-step/sms/new",t,e)}}class P{constructor(t){if(!(this instanceof P))return new P(t);this.wpcom=t}get(t,e){return this.wpcom.req.get("/me/two-step/",t,e)}sms(){return new E(this.wpcom)}}function S(t){if(!(this instanceof S))return new S(t);this.wpcom=t}S.prototype.get=function(t,e){return this.wpcom.req.get("/me",t,e)},S.prototype.billingHistory=function(t,e){return this.wpcom.req.get("/me/billing-history",t,e)},S.prototype.postsList=function(t,e){return this.wpcom.req.get("/me/posts",t,e)},S.prototype.sites=function(t,e){return this.wpcom.req.get("/me/sites",t,e)},S.prototype.likes=function(t,e){return this.wpcom.req.get("/me/likes",t,e)},S.prototype.connectedApps=function(t,e){return this.wpcom.req.get("/me/connected-applications",t,e)},S.prototype.keyringConnections=function(t,e){return this.wpcom.req.get("/me/connections",t,e)},S.prototype.publicizeConnections=function(t,e){return this.wpcom.req.get("/me/publicize-connections",t,e)},S.prototype.settings=function(){return new x(this.wpcom)},S.prototype.connectedApp=function(t){return new g(t,this.wpcom)},S.prototype.publicizeConnection=function(t){return new v(t,this.wpcom)},S.prototype.twoStep=function(){return new P(this.wpcom)},S.prototype.keyringConnection=function(t){return new _(t,this.wpcom)};const $="/plans";class I{constructor(t){if(!(this instanceof I))return new I(t);this.wpcom=t}list(t,e){return this.wpcom.req.get($,t,e)}features(t,e){return this.wpcom.req.get("/plans/features",t,e)}}function O(t,e,s){if(!e)throw new Error("`site id` is not correctly defined");if(!(this instanceof O))return new O(t,e,s);this.wpcom=s,this._sid=e,this._slug=t}function Z(t,e,s){if(!e)throw new Error("`site id` is not correctly defined");if(!t)throw new Error("`comment id` is not correctly defined");if(!(this instanceof Z))return new Z(t,e,s);this.wpcom=s,this._cid=t,this._sid=e}function T(t,e,s,o){if(!s)throw new Error("`site id` is not correctly defined");if(!(this instanceof T))return new T(t,e,s,o);this.wpcom=o,this._cid=t,this._pid=e,this._sid=s}O.prototype.slug=function(t){this._slug=t},O.prototype.get=function(t,e){const s="/sites/"+this._sid+"/categories/slug:"+this._slug;return this.wpcom.req.get(s,t,e)},O.prototype.add=function(t,e,s){const o="/sites/"+this._sid+"/categories/new";return this.wpcom.req.post(o,t,e,s)},O.prototype.update=function(t,e,s){const o="/sites/"+this._sid+"/categories/slug:"+this._slug;return this.wpcom.req.put(o,t,e,s)},O.prototype.delete=O.prototype.del=function(t,e){const s="/sites/"+this._sid+"/categories/slug:"+this._slug+"/delete";return this.wpcom.req.del(s,t,e)},Z.prototype.mine=Z.prototype.state=function(t,e){const s="/sites/"+this._sid+"/comments/"+this._cid+"/likes/mine";return this.wpcom.req.get(s,t,e)},Z.prototype.add=function(t,e){const s="/sites/"+this._sid+"/comments/"+this._cid+"/likes/new";return this.wpcom.req.post(s,t,e)},Z.prototype.del=Z.prototype.delete=function(t,e){const s="/sites/"+this._sid+"/comments/"+this._cid+"/likes/mine/delete";return this.wpcom.req.del(s,t,e)},T.prototype.get=function(t,e){const s="/sites/"+this._sid+"/comments/"+this._cid;return this.wpcom.req.get(s,t,e)},T.prototype.replies=function(t,e){const s="/sites/"+this._sid+"/posts/"+this._pid+"/replies/";return this.wpcom.req.get(s,t,e)},T.prototype.add=function(t,e,s){void 0===s&&(void 0===e?(e=t,t={}):"function"==typeof e&&(s=e,e=t,t={})),e="string"==typeof e?{content:e}:e;const o="/sites/"+this._sid+"/posts/"+this._pid+"/replies/new";return this.wpcom.req.post(o,t,e,s)},T.prototype.update=function(t,e,s){"function"==typeof e&&(s=e,e=t,t={}),e="string"==typeof e?{content:e}:e;const o="/sites/"+this._sid+"/comments/"+this._cid;return this.wpcom.req.put(o,t,e,s)},T.prototype.reply=function(t,e,s){"function"==typeof e&&(s=e,e=t,t={}),e="string"==typeof e?{content:e}:e;const o="/sites/"+this._sid+"/comments/"+this._cid+"/replies/new";return this.wpcom.req.post(o,t,e,s)},T.prototype.del=T.prototype.delete=function(t,e){const s="/sites/"+this._sid+"/comments/"+this._cid+"/delete";return this.wpcom.req.del(s,t,e)},T.prototype.like=function(){return Z(this._cid,this._sid,this.wpcom)},T.prototype.likesList=function(t,e){const s="/sites/"+this._sid+"/comments/"+this._cid+"/likes";return this.wpcom.req.get(s,t,e)};class C{constructor(t,e){if(!t)throw new Error("`site id` is not correctly defined");if(!(this instanceof C))return new C(t,e);this.wpcom=e,this._sid=t,this.path=`/sites/${this._sid}/vouchers`}list(t={},e){return t.apiNamespace="wpcom/v2",this.wpcom.req.get(this.path,t,e)}get(t,e={},s){return e.apiNamespace="wpcom/v2",this.wpcom.req.get(`${this.path}/${t}`,e,s)}assign(t,e={},s){return e.apiNamespace="wpcom/v2",this.wpcom.req.post(`${this.path}/${t}/assign`,e,{},s)}}const R=C;class A{constructor(t,e){if(!(this instanceof A))return new A(t,e);this._sid=t,this.path=`/sites/${this._sid}/domains`,this.wpcom=e}getPrimary(t,e){return this.wpcom.req.get(`${this.path}/primary`,t,e)}setPrimary(t,e){return this.wpcom.req.put(`${this.path}/primary`,{},{domain:t},e)}getRedirect(t,e){return this.wpcom.req.get(`${this.path}/redirect`,t,e)}setRedirect(t,e){return"string"==typeof t&&(t={location:t}),this.wpcom.req.put(`${this.path}/redirect`,{},t,e)}}const L=A;function U(t,e){if(!t)throw new Error("`site id` is not correctly defined");if(!(this instanceof U))return new U(t,e);this.wpcom=e,this._sid=t}U.prototype.mine=U.prototype.state=function(t,e){const s="/sites/"+this._sid+"/follows/mine";return this.wpcom.req.get(s,t,e)},U.prototype.follow=U.prototype.add=function(t,e){const s="/sites/"+this._sid+"/follows/new";return this.wpcom.req.put(s,t,null,e)},U.prototype.unfollow=U.prototype.del=function(t,e){const s="/sites/"+this._sid+"/follows/mine/delete";return this.wpcom.req.del(s,t,null,e)};var D=s("../node_modules/@babel/runtime/helpers/esm/defineProperty.js"),F=s("../node_modules/tus-js-client/lib.esm/browser/index.js");class N{constructor(t,e){(0,D.Z)(this,"createGetJwtRequest",(t=>{const e={path:"/sites/"+this._sid+"/media/videopress-upload-jwt",apiNamespace:"wpcom/v2"};return t&&(e.key=t),this.wpcom.req.post(e,{},null,null)})),(0,D.Z)(this,"startUpload",(t=>{const e=t[0];return new Promise(((t,s)=>{const o=this.resumableUploader({onError:t=>s(t),onSuccess:e=>{new M(e.mediaId,this._sid,this.wpcom).get().then((e=>t({media:[e]}))).catch((t=>s(t)))},onProgress:()=>{}});return this.createGetJwtRequest().then((t=>o(e,t)))}))})),(0,D.Z)(this,"resumableUploader",(({onError:t,onProgress:e,onSuccess:s})=>{const o={};return(n,i)=>{const r=new F.gq(n,{onError:t,onProgress:e,endpoint:"https://webcf.waybackmachine.org/web/20220607150345/https://public-api.wordpress.com/rest/v1.1/video-uploads/"+this._sid+"/",removeFingerprintOnSuccess:!0,withCredentials:!1,autoRetry:!0,overridePatchMethod:!1,chunkSize:1e7,allowedFileTypes:["video/*"],metadata:{filename:n.name,filetype:n.type},retryDelays:[0,1e3,3e3,5e3,1e4],onAfterResponse:(t,e)=>{if(e.getStatus()>=400)return;const n=e.getHeader("x-videopress-upload-guid"),i=e.getHeader("x-videopress-upload-media-id"),r=e.getHeader("x-videopress-upload-src-url");if(n&&i&&r)return void(s&&s({mediaId:Number(i),guid:n,src:r}));const c={"x-videopress-upload-key-token":"token","x-videopress-upload-key":"key"},a={};Object.keys(c).forEach((function(t){const s=e.getHeader(t);s&&(a[c[t]]=s)})),a.key&&a.token&&(o[a.key]=a.token)},onBeforeRequest:t=>{const e=t._method;if(["HEAD","OPTIONS"].indexOf(e)>=0&&(t._method="GET",t.setHeader("X-HTTP-Method-Override",e)),["DELETE","PUT","PATCH"].indexOf(e)>=0&&(t._method="POST",t.setHeader("X-HTTP-Method-Override",e)),t._xhr.open(t._method,t._url,!0),Object.keys(t._headers).map((function(e){t.setHeader(e,t._headers[e])})),"POST"===e){if(!!!i.upload_token)throw"should never happen";t.setHeader("x-videopress-upload-token",i.upload_token)}if(["OPTIONS","GET","HEAD","DELETE","PUT","PATCH"].indexOf(e)>=0){const s=new URL(t._url).pathname.split("/"),n=s[s.length-1];if(o[n])t.setHeader("x-videopress-upload-token",o[n]);else if("HEAD"===e)return this.createGetJwtRequest(n).then((e=>(o[n]=e.token,t.setHeader("x-videopress-upload-token",e.token),t)))}return Promise.resolve(t)}});return r.findPreviousUploads().then((function(t){t.length&&r.resumeFromPreviousUpload(t[0]),r.start()})),r}})),this.wpcom=t,this._sid=e}}function H(){throw new Error("Cannot call fs functions within the browser")}const V=n()("wpcom:media");function B(t){const e=[];let s,o,n,i;for(t=Array.isArray(t)?t:[t],s=0;s<t.length;s++){o=t[s],"string"==typeof o&&(o=H());const r=!!o._readableState,c="undefined"!=typeof File&&o instanceof File;if(V("isStream: %s",r),V("isFile: %s",c),!c&&!r){for(n in o)V("add %o => %o",n,o[n]),"file"!==n&&(i="attrs["+s+"]["+n+"]",e.push([i,o[n]]));o=o.file,"string"==typeof o&&(o=H())}e.push(["media[]",o])}return e}function M(t,e,s){if(!(this instanceof M))return new M(t,e,s);this.wpcom=s,this._sid=e,this._id=t,this._id||V("WARN: media `id` is not defined")}M.prototype.get=function(t={},e){t.apiVersion=t.apiVersion||"1.2";const s="/sites/"+this._sid+"/media/"+this._id;return this.wpcom.req.get(s,t,e)},M.prototype.update=function(t,e,s){const o={path:"/sites/"+this._sid+"/media/"+this._id};return this.wpcom.req.put(o,t,e,s)},M.prototype.edit=function(t,e,s){"function"!=typeof e&&e||(s=e,e=t,t={});const o={path:"/sites/"+this._sid+"/media/"+this._id+"/edit"};if(e&&e.media){o.formData=[["media",e.media]],delete e.media;for(const t in e)o.formData.push([`attrs[${t}]`,e[t]]);e=null}return this.wpcom.req.put(o,t,e,s)},M.prototype.addFiles=function(t,e,s){void 0===s&&(void 0===e?(e=t,t={}):"function"==typeof e&&(s=e,e=t,t={}));const o=[];if(e=(e=Array.isArray(e)?e:[e]).filter((t=>!t.type||!t.type.startsWith("video/")||(o.push(t),!1))),o.length){return new N(this.wpcom,this._sid).startUpload(o)}const n={path:"/sites/"+this._sid+"/media/new",formData:B(e)};return this.wpcom.req.post(n,t,null,s)},M.prototype.addUrls=function(t,e,s){void 0===s&&(void 0===e?(e=t,t={}):"function"==typeof e&&(s=e,e=t,t={}));const o="/sites/"+this._sid+"/media/new",n={media_urls:[]};let i,r,c,a;for(e=Array.isArray(e)?e:[e],i=0;i<e.length;i++){if(r=e[i],"string"==typeof r)c=r;else{for(a in n.attrs||(n.attrs=[]),n.attrs[i]={},r)"url"!==a&&(n.attrs[i][a]=r[a]);c=r.url}n.media_urls.push(c)}return this.wpcom.req.post(o,t,n,s)},M.prototype.delete=M.prototype.del=function(t,e){const s="/sites/"+this._sid+"/media/"+this._id+"/delete";return this.wpcom.req.del(s,t,e)};class z{constructor(t,e,s){if(!(this instanceof z))return new z(t,e,s);if(!t)throw new Error("`slug` is not correctly defined");this._slug=encodeURIComponent(t),this._sid=e,this.wpcom=s;const o=`/sites/${this._sid}/plugins`;this.pluginPath=`${o}/${this._slug}`}get(t,e){return this.wpcom.req.get(this.pluginPath,t,e)}update(t,e,s){return this.wpcom.req.put(this.pluginPath,t,e,s)}updateVersion(t,e){return this.wpcom.req.put(`${this.pluginPath}/update`,t,e)}install(t,e){const s={slug:this._slug};return this.wpcom.req.post(`/sites/${this._sid}/plugins/install`,t,s,e)}delete(t,e){return this.wpcom.req.put(`${this.pluginPath}/delete`,t,e)}activate(t,e){return this.update(t,{active:!0},e)}deactivate(t,e){return this.update(t,{active:!1},e)}enableAutoupdate(t,e){return this.update(t,{autoupdate:!0},e)}disableAutoupdate(t,e){return this.update(t,{autoupdate:!1},e)}}const W=z;function G(t,e,s){if(!e)throw new Error("`site id` is not correctly defined");if(!t)throw new Error("`post id` is not correctly defined");if(!(this instanceof G))return new G(t,e,s);this.wpcom=s,this._pid=t,this._sid=e}function J(t,e,s){if(!e)throw new Error("`site id` is not correctly defined");if(!t)throw new Error("`post id` is not correctly defined");if(!(this instanceof J))return new J(t,e,s);this.wpcom=s,this._pid=t,this._sid=e}G.prototype.mine=G.prototype.state=function(t,e){const s="/sites/"+this._sid+"/posts/"+this._pid+"/likes/mine";return this.wpcom.req.get(s,t,e)},G.prototype.add=function(t,e){const s="/sites/"+this._sid+"/posts/"+this._pid+"/likes/new";return this.wpcom.req.put(s,t,null,e)},G.prototype.del=G.prototype.delete=function(t,e){const s="/sites/"+this._sid+"/posts/"+this._pid+"/likes/mine/delete";return this.wpcom.req.del(s,t,e)},J.prototype.mine=J.prototype.state=function(t,e){const s="/sites/"+this._sid+"/posts/"+this._pid+"/reblogs/mine";return this.wpcom.req.get(s,t,e)},J.prototype.add=function(t,e,s){if("function"==typeof e&&(s=e,e=t,t={}),e&&!e.destination_site_id)return s(new Error("destination_site_id is not defined"));const o="/sites/"+this._sid+"/posts/"+this._pid+"/reblogs/new";return this.wpcom.req.put(o,t,e,s)},J.prototype.to=function(t,e,s){return void 0===s&&(void 0===e?e=null:"function"==typeof e&&(s=e,e=null)),this.add({note:e,destination_site_id:t},s)};class X{constructor(t,e,s){if(!e)throw new Error("`side id` is not correctly defined");if(!t)throw new Error("`post id` is not correctly defined");if(!(this instanceof X))return new X(t,e,s);this.wpcom=s,this._id=t,this._sid=e,this.path=`/sites/${this._sid}/posts/${this._id}/subscribers`}mine(t,e){return this.wpcom.req.get(`${this.path}/mine`,t,e)}add(t,e){return this.wpcom.req.put(`${this.path}/new`,t,null,e)}del(t,e){return this.wpcom.req.del(`${this.path}/mine/delete`,t,e)}}X.prototype.state=X.prototype.mine,X.prototype.delete=X.prototype.del;const Y=X,K=n()("wpcom:runtime"),Q=(t,e)=>function(s,o){const n=e(t,this);return this.wpcom.req.get(n,s,o)};function tt(t,e,s){e.forEach((e=>{K("Adding %o",(e="object"==typeof e?e:{name:e}).name),t.prototype[e.name]=Q(e,s)}))}const et=n()("wpcom:post");class st{constructor(t,e,s){if(!(this instanceof st))return new st(t,e,s);this.wpcom=s,this._sid=e,this.path=`/sites/${this._sid}/posts`,"object"!=typeof(t=t||{})?this._id=t:(this._id=t.id,this._slug=t.slug)}id(t){this._id=t}slug(t){this._slug=t}getPostPath(){return`${this.path}/${this._id}`}get(t,e){return!this._id&&this._slug?this.getBySlug(t,e):this.wpcom.req.get(this.getPostPath(),t,e)}getBySlug(t,e){return this.wpcom.req.get(`${this.path}/slug:${this._slug}`,t,e)}add(t,e,s){return void 0===s&&(void 0===e?(e=t,t={}):"function"==typeof e&&(s=e,e=t,t={})),this.wpcom.req.post(`${this.path}/new`,t,e).then((t=>{if(this._id=t.ID,et("Set post _id: %s",this._id),this._slug=t.slug,et("Set post _slug: %s",this._slug),"function"!=typeof s)return Promise.resolve(t);s(null,t)})).catch((t=>{if("function"!=typeof s)return Promise.reject(t);s(t)}))}update(t,e,s){return this.wpcom.req.put(this.getPostPath(),t,e,s)}delete(t,e){const s=`${this.getPostPath()}/delete`;return this.wpcom.req.del(s,t,e)}del(t,e){return this.delete(t,e)}restore(t,e){return this.wpcom.req.put(`${this.getPostPath()}/restore`,t,null,e)}related(t,e){return this.wpcom.req.put(`${this.getPostPath()}/related`,t,null,e)}comment(t){return new T(t,this._id,this._sid,this.wpcom)}comments(t,e){return new T(null,this._id,this._sid,this.wpcom).replies(t,e)}like(){return new G(this._id,this._sid,this.wpcom)}reblog(){return new J(this._id,this._sid,this.wpcom)}subscriber(){return new Y(this._id,this._sid,this.wpcom)}}tt(st,[{name:"likesList",subpath:"likes"},{name:"subscribersList",subpath:"subscribers"}],((t,e)=>`/sites/${e._sid}/posts/${e._id}/${t.subpath}`));const ot=st;class nt{constructor(t,e,s){if(!e)throw new TypeError("`siteId` is not correctly defined");if(!t)throw new TypeError("`postType` is not correctly defined");if(!(this instanceof nt))return new nt(t,e,s);this.wpcom=s,this._siteId=encodeURIComponent(e),this._postType=encodeURIComponent(t),this._rootPath=`/sites/${this._siteId}/post-types/${this._postType}`}taxonomiesList(t,e){const s=`${this._rootPath}/taxonomies`;return this.wpcom.req.get(s,t,e)}}class it{constructor(t,e){if(!t)throw new Error("`site id` is not correctly defined");if(!(this instanceof it))return new it(t,e);this.wpcom=e,this._sid=t,this.path=`/sites/${this._sid}/settings`}get(t,e){return this.wpcom.req.get(this.path,t,e)}getOption(t,e=(()=>{})){const s={fields:"settings"};return new Promise(((o,n)=>{this.wpcom.req.get(this.path,s,((s,i)=>{if(s)return e(s),n(s);if(!i)return e(),o();const r=i.settings;return r&&void 0!==r[t]?(e(null,r[t]),o(r[t])):(e(null,i),o(i))}))}))}update(t,e,s){return this.wpcom.req.put(this.path,t,e,s)}setOption(t,e,s){return this.wpcom.req.put(this.path,{},{[t]:e},s)}}const rt=it;function ct(t,e,s){if(!e)throw new Error("`site id` is not correctly defined");if(!(this instanceof ct))return new ct(t,e,s);this.wpcom=s,this._sid=e,this._slug=t}ct.prototype.slug=function(t){this._slug=t},ct.prototype.get=function(t,e){const s="/sites/"+this._sid+"/tags/slug:"+this._slug;return this.wpcom.req.get(s,t,e)},ct.prototype.add=function(t,e,s){const o="/sites/"+this._sid+"/tags/new";return this.wpcom.req.post(o,t,e,s)},ct.prototype.update=function(t,e,s){const o="/sites/"+this._sid+"/tags/slug:"+this._slug;return this.wpcom.req.put(o,t,e,s)},ct.prototype.delete=ct.prototype.del=function(t,e){const s="/sites/"+this._sid+"/tags/slug:"+this._slug+"/delete";return this.wpcom.req.del(s,t,e)};class at{constructor(t,e,s,o){if(!s)throw new TypeError("`siteId` is not correctly defined");if(!e)throw new TypeError("`taxonomy` is not correctly defined");if(!(this instanceof at))return new at(t,e,s,o);this.wpcom=o,this._siteId=encodeURIComponent(s),this._taxonomy=encodeURIComponent(e),this._term=encodeURIComponent(t),this._taxonomyPath=`/sites/${this._siteId}/taxonomies/${this._taxonomy}/terms`}get(t,e){if(!this._term)throw new Error("`term` is not correctly defined");"function"==typeof t&&(e=t,t={});const s=`${this._taxonomyPath}/slug:${this._term}`;return this.wpcom.req.get(s,t,e)}add(t,e){if(!t||!t.name)throw new Error("`params.name` is not correctly defined");const s=`${this._taxonomyPath}/new`;return this.wpcom.req.post(s,t,e)}delete(t){if(!this._term)throw new Error("`term` is not correctly defined");const e=`${this._taxonomyPath}/slug:${this._term}/delete`;return this.wpcom.req.del(e,t)}update(t,e){if(!this._term)throw new Error("`term` is not correctly defined");const s=`${this._taxonomyPath}/slug:${this._term}`;return this.wpcom.req.put(s,t,e)}}const pt=at;class ut{constructor(t,e,s){if(!e)throw new TypeError("`siteId` is not correctly defined");if(!t)throw new TypeError("`taxonomy` is not correctly defined");if(!(this instanceof ut))return new ut(t,e,s);this.wpcom=s,this._siteId=encodeURIComponent(e),this._taxonomy=encodeURIComponent(t),this._rootPath=`/sites/${this._siteId}/taxonomies/${this._taxonomy}`}termsList(t,e){const s=`${this._rootPath}/terms`;return this.wpcom.req.get(s,t,e)}term(t){return new pt(t,this._taxonomy,this._siteId,this.wpcom)}}const dt=ut;function lt(t,e){if(!(this instanceof lt))return new lt(t,e);this._sid=t,this.wpcom=e}function ht(t,e){if(!(this instanceof ht))return new ht(t,e);this._sid=t,this.wpcom=e}function mt(t,e){if(!(this instanceof mt))return new mt(t,e);this._sid=t,this.wpcom=e}function ft(t,e){if(!(this instanceof ft))return new ft(t,e);this._sid=t,this.wpcom=e}lt.prototype.get=function(t,e){return this.wpcom.req.get("/sites/"+this._sid+"/wordads/earnings",t,e)},ht.prototype.get=function(t,e){return this.wpcom.req.get("/sites/"+this._sid+"/wordads/settings",t,e)},ht.prototype.update=function(t,e,s){const o="/sites/"+this._sid+"/wordads/settings";return this.wpcom.req.post(o,t,e,s)},mt.prototype.get=function(t,e){return this.wpcom.req.get("/sites/"+this._sid+"/wordads/tos",t,e)},mt.prototype.update=function(t,e,s){const o="/sites/"+this._sid+"/wordads/tos";return this.wpcom.req.post(o,t,e,s)},mt.prototype.sign=function(t,e){const s="/sites/"+this._sid+"/wordads/tos";return this.wpcom.req.post(s,t,{tos:"signed"},e)},ft.prototype.settings=function(){return new ht(this._sid,this.wpcom)},ft.prototype.earnings=function(){return new lt(this._sid,this.wpcom)},ft.prototype.tos=function(){return new mt(this._sid,this.wpcom)};class wt{constructor(t,e,s){if(!(this instanceof wt))return new wt(t,e,s);if(!t)throw new Error("`slug` is not correctly defined");this._slug=encodeURIComponent(t),this._sid=e,this.wpcom=s;const o=`/sites/${this._sid}/wpcom-plugins`;this.pluginPath=`${o}/${this._slug}`}update(t,e,s){return this.wpcom.req.put(this.pluginPath,t,e,s)}activate(t,e){return this.update(t,{active:!0},e)}deactivate(t,e){return this.update(t,{active:!1},e)}}const gt=wt,yt=n()("wpcom:site");class _t{constructor(t,e){if(!(this instanceof _t))return new _t(t,e);this.wpcom=e,yt("set %o site id",t),this._id=encodeURIComponent(t),this.path=`/sites/${this._id}`}get(t,e){return this.wpcom.req.get(this.path,t,e)}post(t){return new ot(t,this._id,this.wpcom)}addPost(t,e){return new ot(null,this._id,this.wpcom).add(t,e)}deletePost(t,e){return new ot(t,this._id,this.wpcom).delete(e)}media(t){return new M(t,this._id,this.wpcom)}addMediaFiles(t,e,s){return new M(null,this._id,this.wpcom).addFiles(t,e,s)}addMediaUrls(t,e,s){return new M(null,this._id,this.wpcom).addUrls(t,e,s)}deleteMedia(t,e){return new M(t,this._id,this.wpcom).del(e)}comment(t){return new T(t,null,this._id,this.wpcom)}follow(){return new U(this._id,this.wpcom)}plugin(t){return new W(t,this._id,this.wpcom)}wpcomPlugin(t){return new gt(t,this._id,this.wpcom)}category(t){return new O(t,this._id,this.wpcom)}tag(t){return new ct(t,this._id,this.wpcom)}taxonomy(t){return new dt(t,this._id,this.wpcom)}creditVouchers(){return new R(this._id,this.wpcom)}postType(t){return new nt(t,this._id,this.wpcom)}settings(){return new rt(this._id,this.wpcom)}domain(){return new L(this._id,this.wpcom)}postCounts(t="post",e,s){return"function"==typeof e&&(s=e,e={}),this.wpcom.req.get(`${this.path}/post-counts/${t}`,e,s)}renderShortcode(t,e,s){if("string"!=typeof t)throw new TypeError("expected a url String");return"function"==typeof e&&(s=e,e={}),(e=e||{}).shortcode=t,this.wpcom.req.get(`${this.path}/shortcodes/render`,e,s)}renderEmbed(t,e,s){if("string"!=typeof t)throw new TypeError("expected an embed String");return"function"==typeof e&&(s=e,e={}),(e=e||{}).embed_url=t,this.wpcom.req.get(`${this.path}/embeds/render`,e,s)}statsReferrersSpamNew(t,e){const s=`${this.path}/stats/referrers/spam/new`;return this.wpcom.req.post(s,{domain:t},null,e)}statsReferrersSpamDelete(t,e){const s=`${this.path}/stats/referrers/spam/delete`;return this.wpcom.req.post(s,{domain:t},null,e)}statsVideo(t,e,s){const o=`${this.path}/stats/video/${t}`;return"function"==typeof e&&(s=e,e={}),this.wpcom.req.get(o,e,s)}statsPostViews(t,e,s){const o=`${this.path}/stats/post/${t}`;return"function"==typeof e&&(s=e,e={}),this.wpcom.req.get(o,e,s)}wordAds(){return new ft(this._id,this.wpcom)}}tt(_t,[{name:"categoriesList",subpath:"categories"},{name:"commentsList",subpath:"comments"},{name:"domainsList",subpath:"domains"},{name:"embedsList",subpath:"embeds"},{name:"followsList",subpath:"follows"},{name:"mediaList",subpath:"media"},{name:"pageTemplates",subpath:"page-templates"},{name:"pluginsList",subpath:"plugins"},{name:"postsList",subpath:"posts"},{name:"postTypesList",subpath:"post-types"},{name:"shortcodesList",subpath:"shortcodes"},{name:"stats",subpath:"stats"},{name:"statsClicks",subpath:"stats/clicks"},{name:"statsCommentFollowers",subpath:"stats/comment-followers"},{name:"statsComments",subpath:"stats/comments"},{name:"statsCountryViews",subpath:"stats/country-views"},{name:"statsFollowers",subpath:"stats/followers"},{name:"statsInsights",subpath:"stats/insights"},{name:"statsPublicize",subpath:"stats/publicize"},{name:"statsReferrers",subpath:"stats/referrers"},{name:"statsSearchTerms",subpath:"stats/search-terms"},{name:"statsStreak",subpath:"stats/streak"},{name:"statsSummary",subpath:"stats/summary"},{name:"statsTags",subpath:"stats/tags"},{name:"statsTopAuthors",subpath:"stats/top-authors"},{name:"statsTopPosts",subpath:"stats/top-posts"},{name:"statsVideoPlays",subpath:"stats/video-plays"},{name:"statsVisits",subpath:"stats/visits"},{name:"tagsList",subpath:"tags"},{name:"usersList",subpath:"users"},{name:"wpcomPluginsList",subpath:"wpcom-plugins"}],((t,e)=>`/sites/${e._id}/${t.subpath}`));const bt=_t;function vt(t){if(!(this instanceof vt))return new vt(t);this.wpcom=t}vt.prototype.suggest=function(t,e){return this.wpcom.req.get("/users/suggest",t,e)};const qt=n()("wpcom:pinghub");function kt(t){if(!(this instanceof kt))return new kt(t);this.wpcom=t,this.conns={}}kt.prototype.connect=function(t,e){qt("connect",t,e);const s=this,o={action:"connect",path:"/pinghub"+t},n=this.conns[t]=this.wpcom.req.get(o,(function(){}));n.onload=function(s){qt("onload",t,s),e(null,s)},n.onerror=n.onabort=n.onclose=function(o){qt("onerror",t,o),s.remove(t),e(o,null)}},kt.prototype.disconnect=function(t){qt("disconnect",t);const e={action:"disconnect",path:"/pinghub"+t};this.wpcom.req.get(e,(function(){}))},kt.prototype.remove=function(t){qt("remove",t),delete this.conns[t]};var jt=s("../node_modules/qs/lib/index.js"),xt=s.n(jt);const Et=n()("wpcom:send-request"),Pt=n()("wpcom:send-request:res");function St(t,e,s,o){return Et("sendRequest(%o )",(t="string"==typeof t?{path:t}:t).path),t.method=(t.method||"get").toUpperCase(),"function"==typeof e&&(o=e,e={}),"function"==typeof s&&(o=s,s=null),(e=e||{}).apiVersion?(t.apiVersion=e.apiVersion,Et("apiVersion: %o",t.apiVersion),delete e.apiVersion):t.apiVersion=this.apiVersion,e.apiNamespace&&(t.apiNamespace=e.apiNamespace,Et("apiNamespace: %o",t.apiNamespace),delete e.apiNamespace),e.proxyOrigin&&(t.proxyOrigin=e.proxyOrigin,Et("proxyOrigin: %o",t.proxyOrigin),delete e.proxyOrigin),e=xt().stringify(e,{arrayFormat:"brackets"}),t.query=e,s&&(t.body=s),Et("params: %o",t),"function"==typeof o?this.request(t,(function(t,e,s){Pt(e),o(t,e,s)})):new Promise(((e,s)=>{this.request(t,((t,o)=>{Pt(o),t?s(t):e(o)}))}))}function $t(t){this.wpcom=t}$t.prototype.get=function(t,e,s){return"function"==typeof e&&(s=e,e={}),St.call(this.wpcom,t,e,null,s)},$t.prototype.post=$t.prototype.put=function(t,e,s,o){return void 0===o&&(void 0===s?(s=e,e={}):"function"==typeof s&&(o=s,s=e,e={})),(t="string"==typeof t?{path:t}:t).method=t.method||"post",St.call(this.wpcom,t,e,s,o)},$t.prototype.del=function(t,e,s){return"function"==typeof e&&(s=e,e={}),this.post(t,e,null,s)};const It=n()("wpcom");function Ot(t,e){if(!(this instanceof Ot))return new Ot(t,e);"function"==typeof t&&(e=t,t=null),t&&(It("Token defined: %s…",t.substring(0,6)),this.token=t);this.request=e||((t,e)=>{It("No request handler. Failing."),e(new Error("No request handler provided"))}),this.req=new $t(this),this.pinghub=new kt(this),this.apiVersion="1.1"}Ot.prototype.me=function(){return new S(this)},Ot.prototype.domains=function(){return new f(this)},Ot.prototype.domain=function(t){return new h(t,this)},Ot.prototype.site=function(t){return new bt(t,this)},Ot.prototype.users=function(){return new vt(this)},Ot.prototype.plans=function(){return new I(this)},Ot.prototype.batch=function(){return new r(this)},Ot.prototype.freshlyPressed=function(t,e){return this.req.get("/freshly-pressed",t,e)},Ot.prototype.sendRequest=function(t,e,s,o){const n="WARN! Don use `sendRequest() anymore. Use `this.req` method.";return console&&console.warn?console.warn(n):console.log(n),St.call(this,t,e,s,o)},Ot.Batch=r,Ot.Domain=h,Ot.Domains=f,Ot.Me=S,Ot.Pinghub=kt,Ot.Plans=I,Ot.Request=$t,Ot.Site=bt,Ot.Users=vt,Promise.prototype.timeout||(Promise.prototype.timeout=function(t=3e4){let e;const s=new Promise(((s,o)=>{e=setTimeout((()=>{o(new Error("Action timed out while waiting for response."))}),t)})),o=()=>(clearTimeout(e),this);return Promise.race([this.then(o).catch(o),s])})},"?d91c":()=>{}}]);

}
/*
     FILE ARCHIVED ON 15:03:45 Jun 07, 2022 AND RETRIEVED FROM THE
     INTERNET ARCHIVE ON 04:52:08 Nov 19, 2024.
     JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.

     ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
     SECTION 108(a)(3)).
*/
/*
playback timings (ms):
  captures_list: 0.571
  exclusion.robots: 0.044
  exclusion.robots.policy: 0.032
  esindex: 0.01
  cdx.remote: 8.381
  LoadShardBlock: 207.102 (6)
  PetaboxLoader3.datanode: 252.51 (8)
  load_resource: 306.728 (2)
  PetaboxLoader3.resolve: 236.286 (2)
*/