@tryghost/portal 2.62.2 → 2.62.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/umd/portal.min.js +32 -32
- package/umd/portal.min.js.map +1 -1
package/umd/portal.min.js
CHANGED
|
@@ -9,36 +9,36 @@ object-assign
|
|
|
9
9
|
*
|
|
10
10
|
* This source code is licensed under the MIT license found in the
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
|
-
*/var tu=eu,Oa=60103,fh=60106;oe.Fragment=60107,oe.StrictMode=60108,oe.Profiler=60114;var gh=60109,yh=60110,bh=60112;oe.Suspense=60113;var kh=60115,vh=60116;if(typeof Symbol=="function"&&Symbol.for){var _t=Symbol.for;Oa=_t("react.element"),fh=_t("react.portal"),oe.Fragment=_t("react.fragment"),oe.StrictMode=_t("react.strict_mode"),oe.Profiler=_t("react.profiler"),gh=_t("react.provider"),yh=_t("react.context"),bh=_t("react.forward_ref"),oe.Suspense=_t("react.suspense"),kh=_t("react.memo"),vh=_t("react.lazy")}var wh=typeof Symbol=="function"&&Symbol.iterator;function bE(e){return e===null||typeof e!="object"?null:(e=wh&&e[wh]||e["@@iterator"],typeof e=="function"?e:null)}function Hi(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var xh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Eh={};function _a(e,t,n){this.props=e,this.context=t,this.refs=Eh,this.updater=n||xh}_a.prototype.isReactComponent={},_a.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(Hi(85));this.updater.enqueueSetState(this,e,t,"setState")},_a.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Sh(){}Sh.prototype=_a.prototype;function nu(e,t,n){this.props=e,this.context=t,this.refs=Eh,this.updater=n||xh}var au=nu.prototype=new Sh;au.constructor=nu,tu(au,_a.prototype),au.isPureReactComponent=!0;var iu={current:null},Ch=Object.prototype.hasOwnProperty,$h={key:!0,ref:!0,__self:!0,__source:!0};function jh(e,t,n){var a,i={},r=null,o=null;if(t!=null)for(a in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(r=""+t.key),t)Ch.call(t,a)&&!$h.hasOwnProperty(a)&&(i[a]=t[a]);var s=arguments.length-2;if(s===1)i.children=n;else if(1<s){for(var l=Array(s),c=0;c<s;c++)l[c]=arguments[c+2];i.children=l}if(e&&e.defaultProps)for(a in s=e.defaultProps,s)i[a]===void 0&&(i[a]=s[a]);return{$$typeof:Oa,type:e,key:r,ref:o,props:i,_owner:iu.current}}function kE(e,t){return{$$typeof:Oa,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ru(e){return typeof e=="object"&&e!==null&&e.$$typeof===Oa}function vE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Th=/\/+/g;function ou(e,t){return typeof e=="object"&&e!==null&&e.key!=null?vE(""+e.key):t.toString(36)}function Co(e,t,n,a,i){var r=typeof e;(r==="undefined"||r==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(r){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Oa:case fh:o=!0}}if(o)return o=e,i=i(o),e=a===""?"."+ou(o,0):a,Array.isArray(i)?(n="",e!=null&&(n=e.replace(Th,"$&/")+"/"),Co(i,t,n,"",function(c){return c})):i!=null&&(ru(i)&&(i=kE(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Th,"$&/")+"/")+e)),t.push(i)),1;if(o=0,a=a===""?".":a+":",Array.isArray(e))for(var s=0;s<e.length;s++){r=e[s];var l=a+ou(r,s);o+=Co(r,t,n,l,i)}else if(l=bE(e),typeof l=="function")for(e=l.call(e),s=0;!(r=e.next()).done;)r=r.value,l=a+ou(r,s++),o+=Co(r,t,n,l,i);else if(r==="object")throw t=""+e,Error(Hi(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return o}function $o(e,t,n){if(e==null)return e;var a=[],i=0;return Co(e,a,"","",function(r){return t.call(n,r,i++)}),a}function wE(e){if(e._status===-1){var t=e._result;t=t(),e._status=0,e._result=t,t.then(function(n){e._status===0&&(n=n.default,e._status=1,e._result=n)},function(n){e._status===0&&(e._status=2,e._result=n)})}if(e._status===1)return e._result;throw e._result}var Ph={current:null};function un(){var e=Ph.current;if(e===null)throw Error(Hi(321));return e}var xE={ReactCurrentDispatcher:Ph,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:iu,IsSomeRendererActing:{current:!1},assign:tu};oe.Children={map:$o,forEach:function(e,t,n){$o(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return $o(e,function(){t++}),t},toArray:function(e){return $o(e,function(t){return t})||[]},only:function(e){if(!ru(e))throw Error(Hi(143));return e}},oe.Component=_a,oe.PureComponent=nu,oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=xE,oe.cloneElement=function(e,t,n){if(e==null)throw Error(Hi(267,e));var a=tu({},e.props),i=e.key,r=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(r=t.ref,o=iu.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)Ch.call(t,l)&&!$h.hasOwnProperty(l)&&(a[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)a.children=n;else if(1<l){s=Array(l);for(var c=0;c<l;c++)s[c]=arguments[c+2];a.children=s}return{$$typeof:Oa,type:e.type,key:i,ref:r,props:a,_owner:o}},oe.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:yh,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:gh,_context:e},e.Consumer=e},oe.createElement=jh,oe.createFactory=function(e){var t=jh.bind(null,e);return t.type=e,t},oe.createRef=function(){return{current:null}},oe.forwardRef=function(e){return{$$typeof:bh,render:e}},oe.isValidElement=ru,oe.lazy=function(e){return{$$typeof:vh,_payload:{_status:-1,_result:e},_init:wE}},oe.memo=function(e,t){return{$$typeof:kh,type:e,compare:t===void 0?null:t}},oe.useCallback=function(e,t){return un().useCallback(e,t)},oe.useContext=function(e,t){return un().useContext(e,t)},oe.useDebugValue=function(){},oe.useEffect=function(e,t){return un().useEffect(e,t)},oe.useImperativeHandle=function(e,t,n){return un().useImperativeHandle(e,t,n)},oe.useLayoutEffect=function(e,t){return un().useLayoutEffect(e,t)},oe.useMemo=function(e,t){return un().useMemo(e,t)},oe.useReducer=function(e,t,n){return un().useReducer(e,t,n)},oe.useRef=function(e){return un().useRef(e)},oe.useState=function(e){return un().useState(e)},oe.version="17.0.2",hh.exports=oe;var
|
|
12
|
+
*/var tu=eu,Oa=60103,fh=60106;oe.Fragment=60107,oe.StrictMode=60108,oe.Profiler=60114;var gh=60109,yh=60110,bh=60112;oe.Suspense=60113;var kh=60115,vh=60116;if(typeof Symbol=="function"&&Symbol.for){var _t=Symbol.for;Oa=_t("react.element"),fh=_t("react.portal"),oe.Fragment=_t("react.fragment"),oe.StrictMode=_t("react.strict_mode"),oe.Profiler=_t("react.profiler"),gh=_t("react.provider"),yh=_t("react.context"),bh=_t("react.forward_ref"),oe.Suspense=_t("react.suspense"),kh=_t("react.memo"),vh=_t("react.lazy")}var wh=typeof Symbol=="function"&&Symbol.iterator;function bE(e){return e===null||typeof e!="object"?null:(e=wh&&e[wh]||e["@@iterator"],typeof e=="function"?e:null)}function Hi(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var xh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Eh={};function _a(e,t,n){this.props=e,this.context=t,this.refs=Eh,this.updater=n||xh}_a.prototype.isReactComponent={},_a.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(Hi(85));this.updater.enqueueSetState(this,e,t,"setState")},_a.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Sh(){}Sh.prototype=_a.prototype;function nu(e,t,n){this.props=e,this.context=t,this.refs=Eh,this.updater=n||xh}var au=nu.prototype=new Sh;au.constructor=nu,tu(au,_a.prototype),au.isPureReactComponent=!0;var iu={current:null},Ch=Object.prototype.hasOwnProperty,$h={key:!0,ref:!0,__self:!0,__source:!0};function jh(e,t,n){var a,i={},r=null,o=null;if(t!=null)for(a in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(r=""+t.key),t)Ch.call(t,a)&&!$h.hasOwnProperty(a)&&(i[a]=t[a]);var s=arguments.length-2;if(s===1)i.children=n;else if(1<s){for(var l=Array(s),c=0;c<s;c++)l[c]=arguments[c+2];i.children=l}if(e&&e.defaultProps)for(a in s=e.defaultProps,s)i[a]===void 0&&(i[a]=s[a]);return{$$typeof:Oa,type:e,key:r,ref:o,props:i,_owner:iu.current}}function kE(e,t){return{$$typeof:Oa,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ru(e){return typeof e=="object"&&e!==null&&e.$$typeof===Oa}function vE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Th=/\/+/g;function ou(e,t){return typeof e=="object"&&e!==null&&e.key!=null?vE(""+e.key):t.toString(36)}function Co(e,t,n,a,i){var r=typeof e;(r==="undefined"||r==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(r){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Oa:case fh:o=!0}}if(o)return o=e,i=i(o),e=a===""?"."+ou(o,0):a,Array.isArray(i)?(n="",e!=null&&(n=e.replace(Th,"$&/")+"/"),Co(i,t,n,"",function(c){return c})):i!=null&&(ru(i)&&(i=kE(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Th,"$&/")+"/")+e)),t.push(i)),1;if(o=0,a=a===""?".":a+":",Array.isArray(e))for(var s=0;s<e.length;s++){r=e[s];var l=a+ou(r,s);o+=Co(r,t,n,l,i)}else if(l=bE(e),typeof l=="function")for(e=l.call(e),s=0;!(r=e.next()).done;)r=r.value,l=a+ou(r,s++),o+=Co(r,t,n,l,i);else if(r==="object")throw t=""+e,Error(Hi(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return o}function $o(e,t,n){if(e==null)return e;var a=[],i=0;return Co(e,a,"","",function(r){return t.call(n,r,i++)}),a}function wE(e){if(e._status===-1){var t=e._result;t=t(),e._status=0,e._result=t,t.then(function(n){e._status===0&&(n=n.default,e._status=1,e._result=n)},function(n){e._status===0&&(e._status=2,e._result=n)})}if(e._status===1)return e._result;throw e._result}var Ph={current:null};function un(){var e=Ph.current;if(e===null)throw Error(Hi(321));return e}var xE={ReactCurrentDispatcher:Ph,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:iu,IsSomeRendererActing:{current:!1},assign:tu};oe.Children={map:$o,forEach:function(e,t,n){$o(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return $o(e,function(){t++}),t},toArray:function(e){return $o(e,function(t){return t})||[]},only:function(e){if(!ru(e))throw Error(Hi(143));return e}},oe.Component=_a,oe.PureComponent=nu,oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=xE,oe.cloneElement=function(e,t,n){if(e==null)throw Error(Hi(267,e));var a=tu({},e.props),i=e.key,r=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(r=t.ref,o=iu.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)Ch.call(t,l)&&!$h.hasOwnProperty(l)&&(a[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)a.children=n;else if(1<l){s=Array(l);for(var c=0;c<l;c++)s[c]=arguments[c+2];a.children=s}return{$$typeof:Oa,type:e.type,key:i,ref:r,props:a,_owner:o}},oe.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:yh,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:gh,_context:e},e.Consumer=e},oe.createElement=jh,oe.createFactory=function(e){var t=jh.bind(null,e);return t.type=e,t},oe.createRef=function(){return{current:null}},oe.forwardRef=function(e){return{$$typeof:bh,render:e}},oe.isValidElement=ru,oe.lazy=function(e){return{$$typeof:vh,_payload:{_status:-1,_result:e},_init:wE}},oe.memo=function(e,t){return{$$typeof:kh,type:e,compare:t===void 0?null:t}},oe.useCallback=function(e,t){return un().useCallback(e,t)},oe.useContext=function(e,t){return un().useContext(e,t)},oe.useDebugValue=function(){},oe.useEffect=function(e,t){return un().useEffect(e,t)},oe.useImperativeHandle=function(e,t,n){return un().useImperativeHandle(e,t,n)},oe.useLayoutEffect=function(e,t){return un().useLayoutEffect(e,t)},oe.useMemo=function(e,t){return un().useMemo(e,t)},oe.useReducer=function(e,t,n){return un().useReducer(e,t,n)},oe.useRef=function(e){return un().useRef(e)},oe.useState=function(e){return un().useState(e)},oe.version="17.0.2",hh.exports=oe;var C=hh.exports;const re=Bi(C);/** @license React v17.0.2
|
|
13
13
|
* react-jsx-runtime.production.min.js
|
|
14
14
|
*
|
|
15
15
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
16
16
|
*
|
|
17
17
|
* This source code is licensed under the MIT license found in the
|
|
18
18
|
* LICENSE file in the root directory of this source tree.
|
|
19
|
-
*/var EE=
|
|
19
|
+
*/var EE=C,zh=60103;if(Vi.Fragment=60107,typeof Symbol=="function"&&Symbol.for){var Ah=Symbol.for;zh=Ah("react.element"),Vi.Fragment=Ah("react.fragment")}var SE=EE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,CE=Object.prototype.hasOwnProperty,$E={key:!0,ref:!0,__self:!0,__source:!0};function Nh(e,t,n){var a,i={},r=null,o=null;n!==void 0&&(r=""+n),t.key!==void 0&&(r=""+t.key),t.ref!==void 0&&(o=t.ref);for(a in t)CE.call(t,a)&&!$E.hasOwnProperty(a)&&(i[a]=t[a]);if(e&&e.defaultProps)for(a in t=e.defaultProps,t)i[a]===void 0&&(i[a]=t[a]);return{$$typeof:zh,type:e,key:r,ref:o,props:i,_owner:SE.current}}Vi.jsx=Nh,Vi.jsxs=Nh,mh.exports=Vi;var u=mh.exports,Ih={exports:{}},$t={},Mh={exports:{}},Fh={};/** @license React v0.20.2
|
|
20
20
|
* scheduler.production.min.js
|
|
21
21
|
*
|
|
22
22
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
23
23
|
*
|
|
24
24
|
* This source code is licensed under the MIT license found in the
|
|
25
25
|
* LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/(function(e){var t,n,a,i;if(typeof performance=="object"&&typeof performance.now=="function"){var r=performance;e.unstable_now=function(){return r.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}if(typeof window>"u"||typeof MessageChannel!="function"){var l=null,c=null,m=function(){if(l!==null)try{var I=e.unstable_now();l(!0,I),l=null}catch(Y){throw setTimeout(m,0),Y}};t=function(I){l!==null?setTimeout(t,0,I):(l=I,setTimeout(m,0))},n=function(I,Y){c=setTimeout(I,Y)},a=function(){clearTimeout(c)},e.unstable_shouldYield=function(){return!1},i=e.unstable_forceFrameRate=function(){}}else{var f=window.setTimeout,p=window.clearTimeout;if(typeof console<"u"){var y=window.cancelAnimationFrame;typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof y!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var k=!1,
|
|
26
|
+
*/(function(e){var t,n,a,i;if(typeof performance=="object"&&typeof performance.now=="function"){var r=performance;e.unstable_now=function(){return r.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}if(typeof window>"u"||typeof MessageChannel!="function"){var l=null,c=null,m=function(){if(l!==null)try{var I=e.unstable_now();l(!0,I),l=null}catch(Y){throw setTimeout(m,0),Y}};t=function(I){l!==null?setTimeout(t,0,I):(l=I,setTimeout(m,0))},n=function(I,Y){c=setTimeout(I,Y)},a=function(){clearTimeout(c)},e.unstable_shouldYield=function(){return!1},i=e.unstable_forceFrameRate=function(){}}else{var f=window.setTimeout,p=window.clearTimeout;if(typeof console<"u"){var y=window.cancelAnimationFrame;typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof y!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var k=!1,S=null,b=-1,w=5,E=0;e.unstable_shouldYield=function(){return e.unstable_now()>=E},i=function(){},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):w=0<I?Math.floor(1e3/I):5};var P=new MessageChannel,j=P.port2;P.port1.onmessage=function(){if(S!==null){var I=e.unstable_now();E=I+w;try{S(!0,I)?j.postMessage(null):(k=!1,S=null)}catch(Y){throw j.postMessage(null),Y}}else k=!1},t=function(I){S=I,k||(k=!0,j.postMessage(null))},n=function(I,Y){b=f(function(){I(e.unstable_now())},Y)},a=function(){p(b),b=-1}}function F(I,Y){var B=I.length;I.push(Y);e:for(;;){var Z=B-1>>>1,G=I[Z];if(G!==void 0&&0<_(G,Y))I[Z]=Y,I[B]=G,B=Z;else break e}}function z(I){return I=I[0],I===void 0?null:I}function R(I){var Y=I[0];if(Y!==void 0){var B=I.pop();if(B!==Y){I[0]=B;e:for(var Z=0,G=I.length;Z<G;){var Se=2*(Z+1)-1,Re=I[Se],Ne=Se+1,Ze=I[Ne];if(Re!==void 0&&0>_(Re,B))Ze!==void 0&&0>_(Ze,Re)?(I[Z]=Ze,I[Ne]=B,Z=Ne):(I[Z]=Re,I[Se]=B,Z=Se);else if(Ze!==void 0&&0>_(Ze,B))I[Z]=Ze,I[Ne]=B,Z=Ne;else break e}}return Y}return null}function _(I,Y){var B=I.sortIndex-Y.sortIndex;return B!==0?B:I.id-Y.id}var D=[],X=[],ne=1,ye=null,he=3,_e=!1,Ie=!1,Je=!1;function N(I){for(var Y=z(X);Y!==null;){if(Y.callback===null)R(X);else if(Y.startTime<=I)R(X),Y.sortIndex=Y.expirationTime,F(D,Y);else break;Y=z(X)}}function O(I){if(Je=!1,N(I),!Ie)if(z(D)!==null)Ie=!0,t(V);else{var Y=z(X);Y!==null&&n(O,Y.startTime-I)}}function V(I,Y){Ie=!1,Je&&(Je=!1,a()),_e=!0;var B=he;try{for(N(Y),ye=z(D);ye!==null&&(!(ye.expirationTime>Y)||I&&!e.unstable_shouldYield());){var Z=ye.callback;if(typeof Z=="function"){ye.callback=null,he=ye.priorityLevel;var G=Z(ye.expirationTime<=Y);Y=e.unstable_now(),typeof G=="function"?ye.callback=G:ye===z(D)&&R(D),N(Y)}else R(D);ye=z(D)}if(ye!==null)var Se=!0;else{var Re=z(X);Re!==null&&n(O,Re.startTime-Y),Se=!1}return Se}finally{ye=null,he=B,_e=!1}}var ie=i;e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(I){I.callback=null},e.unstable_continueExecution=function(){Ie||_e||(Ie=!0,t(V))},e.unstable_getCurrentPriorityLevel=function(){return he},e.unstable_getFirstCallbackNode=function(){return z(D)},e.unstable_next=function(I){switch(he){case 1:case 2:case 3:var Y=3;break;default:Y=he}var B=he;he=Y;try{return I()}finally{he=B}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=ie,e.unstable_runWithPriority=function(I,Y){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var B=he;he=I;try{return Y()}finally{he=B}},e.unstable_scheduleCallback=function(I,Y,B){var Z=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?Z+B:Z):B=Z,I){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=B+G,I={id:ne++,callback:Y,priorityLevel:I,startTime:B,expirationTime:G,sortIndex:-1},B>Z?(I.sortIndex=B,F(X,I),z(D)===null&&I===z(X)&&(Je?a():Je=!0,n(O,B-Z))):(I.sortIndex=G,F(D,I),Ie||_e||(Ie=!0,t(V))),I},e.unstable_wrapCallback=function(I){var Y=he;return function(){var B=he;he=Y;try{return I.apply(this,arguments)}finally{he=B}}}})(Fh),Mh.exports=Fh;var jE=Mh.exports;/** @license React v17.0.2
|
|
27
27
|
* react-dom.production.min.js
|
|
28
28
|
*
|
|
29
29
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
30
|
*
|
|
31
31
|
* This source code is licensed under the MIT license found in the
|
|
32
32
|
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var jo=
|
|
33
|
+
*/var jo=C,Ce=eu,Le=jE;function L(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!jo)throw Error(L(227));var Dh=new Set,Wi={};function ra(e,t){Ra(e,t),Ra(e+"Capture",t)}function Ra(e,t){for(Wi[e]=t,e=0;e<t.length;e++)Dh.add(t[e])}var cn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),TE=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Oh=Object.prototype.hasOwnProperty,_h={},Rh={};function PE(e){return Oh.call(Rh,e)?!0:Oh.call(_h,e)?!1:TE.test(e)?Rh[e]=!0:(_h[e]=!0,!1)}function zE(e,t,n,a){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return a?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function AE(e,t,n,a){if(t===null||typeof t>"u"||zE(e,t,n,a))return!0;if(a)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function rt(e,t,n,a,i,r,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=a,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=r,this.removeEmptyString=o}var Ve={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ve[e]=new rt(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ve[t]=new rt(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ve[e]=new rt(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ve[e]=new rt(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ve[e]=new rt(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){Ve[e]=new rt(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){Ve[e]=new rt(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){Ve[e]=new rt(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){Ve[e]=new rt(e,5,!1,e.toLowerCase(),null,!1,!1)});var su=/[\-:]([a-z])/g;function lu(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(su,lu);Ve[t]=new rt(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(su,lu);Ve[t]=new rt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(su,lu);Ve[t]=new rt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){Ve[e]=new rt(e,1,!1,e.toLowerCase(),null,!1,!1)}),Ve.xlinkHref=new rt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){Ve[e]=new rt(e,1,!1,e.toLowerCase(),null,!0,!0)});function uu(e,t,n,a){var i=Ve.hasOwnProperty(t)?Ve[t]:null,r=i!==null?i.type===0:a?!1:!(!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N");r||(AE(t,n,i,a)&&(n=null),a||i===null?PE(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,a=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,a?e.setAttributeNS(a,t,n):e.setAttribute(t,n))))}var oa=jo.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Gi=60103,sa=60106,Pn=60107,cu=60108,Ki=60114,du=60109,mu=60110,To=60112,qi=60113,Po=60120,zo=60115,pu=60116,hu=60121,fu=60128,Uh=60129,gu=60130,yu=60131;if(typeof Symbol=="function"&&Symbol.for){var Ye=Symbol.for;Gi=Ye("react.element"),sa=Ye("react.portal"),Pn=Ye("react.fragment"),cu=Ye("react.strict_mode"),Ki=Ye("react.profiler"),du=Ye("react.provider"),mu=Ye("react.context"),To=Ye("react.forward_ref"),qi=Ye("react.suspense"),Po=Ye("react.suspense_list"),zo=Ye("react.memo"),pu=Ye("react.lazy"),hu=Ye("react.block"),Ye("react.scope"),fu=Ye("react.opaque.id"),Uh=Ye("react.debug_trace_mode"),gu=Ye("react.offscreen"),yu=Ye("react.legacy_hidden")}var Lh=typeof Symbol=="function"&&Symbol.iterator;function Ji(e){return e===null||typeof e!="object"?null:(e=Lh&&e[Lh]||e["@@iterator"],typeof e=="function"?e:null)}var bu;function Zi(e){if(bu===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);bu=t&&t[1]||""}return`
|
|
34
34
|
`+bu+e}var ku=!1;function Ao(e,t){if(!e||ku)return"";ku=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var a=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){a=l}e.call(t.prototype)}else{try{throw Error()}catch(l){a=l}e()}}catch(l){if(l&&a&&typeof l.stack=="string"){for(var i=l.stack.split(`
|
|
35
35
|
`),r=a.stack.split(`
|
|
36
36
|
`),o=i.length-1,s=r.length-1;1<=o&&0<=s&&i[o]!==r[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==r[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==r[s])return`
|
|
37
|
-
`+i[o].replace(" at new "," at ");while(1<=o&&0<=s);break}}}finally{ku=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Zi(e):""}function NE(e){switch(e.tag){case 5:return Zi(e.type);case 16:return Zi("Lazy");case 13:return Zi("Suspense");case 19:return Zi("SuspenseList");case 0:case 2:case 15:return e=Ao(e.type,!1),e;case 11:return e=Ao(e.type.render,!1),e;case 22:return e=Ao(e.type._render,!1),e;case 1:return e=Ao(e.type,!0),e;default:return""}}function Ua(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Pn:return"Fragment";case sa:return"Portal";case Ki:return"Profiler";case cu:return"StrictMode";case qi:return"Suspense";case Po:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case mu:return(e.displayName||"Context")+".Consumer";case du:return(e._context.displayName||"Context")+".Provider";case To:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case zo:return Ua(e.type);case hu:return Ua(e._render);case pu:t=e._payload,e=e._init;try{return Ua(e(t))}catch{}}return null}function zn(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Yh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function IE(e){var t=Yh(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),a=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,r=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){a=""+o,r.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(o){a=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function No(e){e._valueTracker||(e._valueTracker=IE(e))}function Bh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=Yh(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function Io(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function vu(e,t){var n=t.checked;return Ce({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Vh(e,t){var n=t.defaultValue==null?"":t.defaultValue,a=t.checked!=null?t.checked:t.defaultChecked;n=zn(t.value!=null?t.value:n),e._wrapperState={initialChecked:a,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Hh(e,t){t=t.checked,t!=null&&uu(e,"checked",t,!1)}function wu(e,t){Hh(e,t);var n=zn(t.value),a=t.type;if(n!=null)a==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(a==="submit"||a==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?xu(e,t.type,n):t.hasOwnProperty("defaultValue")&&xu(e,t.type,zn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Wh(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var a=t.type;if(!(a!=="submit"&&a!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function xu(e,t,n){(t!=="number"||Io(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ME(e){var t="";return jo.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function Eu(e,t){return e=Ce({children:void 0},t),(t=ME(t.children))&&(e.children=t),e}function La(e,t,n,a){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&a&&(e[n].defaultSelected=!0)}else{for(n=""+zn(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,a&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Su(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(L(91));return Ce({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Gh(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(L(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(L(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:zn(n)}}function Kh(e,t){var n=zn(t.value),a=zn(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),a!=null&&(e.defaultValue=""+a)}function qh(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var Cu={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function Jh(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function $u(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Jh(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Mo,Zh=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,a,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,a,i)})}:e}(function(e,t){if(e.namespaceURI!==Cu.svg||"innerHTML"in e)e.innerHTML=t;else{for(Mo=Mo||document.createElement("div"),Mo.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Mo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Xi(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Qi={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},FE=["Webkit","ms","Moz","O"];Object.keys(Qi).forEach(function(e){FE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Qi[t]=Qi[e]})});function Xh(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Qi.hasOwnProperty(e)&&Qi[e]?(""+t).trim():t+"px"}function Qh(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var a=n.indexOf("--")===0,i=Xh(n,t[n],a);n==="float"&&(n="cssFloat"),a?e.setProperty(n,i):e[n]=i}}var DE=Ce({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ju(e,t){if(t){if(DE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(L(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(L(60));if(!(typeof t.dangerouslySetInnerHTML=="object"&&"__html"in t.dangerouslySetInnerHTML))throw Error(L(61))}if(t.style!=null&&typeof t.style!="object")throw Error(L(62))}}function Tu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Pu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zu=null,Ya=null,Ba=null;function ef(e){if(e=br(e)){if(typeof zu!="function")throw Error(L(280));var t=e.stateNode;t&&(t=Xo(t),zu(e.stateNode,e.type,t))}}function tf(e){Ya?Ba?Ba.push(e):Ba=[e]:Ya=e}function nf(){if(Ya){var e=Ya,t=Ba;if(Ba=Ya=null,ef(e),t)for(e=0;e<t.length;e++)ef(t[e])}}function Au(e,t){return e(t)}function af(e,t,n,a,i){return e(t,n,a,i)}function Nu(){}var rf=Au,la=!1,Iu=!1;function Mu(){(Ya!==null||Ba!==null)&&(Nu(),nf())}function OE(e,t,n){if(Iu)return e(t,n);Iu=!0;try{return rf(e,t,n)}finally{Iu=!1,Mu()}}function er(e,t){var n=e.stateNode;if(n===null)return null;var a=Xo(n);if(a===null)return null;n=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(L(231,t,typeof n));return n}var Fu=!1;if(cn)try{var tr={};Object.defineProperty(tr,"passive",{get:function(){Fu=!0}}),window.addEventListener("test",tr,tr),window.removeEventListener("test",tr,tr)}catch{Fu=!1}function _E(e,t,n,a,i,r,o,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(m){this.onError(m)}}var nr=!1,Fo=null,Do=!1,Du=null,RE={onError:function(e){nr=!0,Fo=e}};function UE(e,t,n,a,i,r,o,s,l){nr=!1,Fo=null,_E.apply(RE,arguments)}function LE(e,t,n,a,i,r,o,s,l){if(UE.apply(this,arguments),nr){if(nr){var c=Fo;nr=!1,Fo=null}else throw Error(L(198));Do||(Do=!0,Du=c)}}function ua(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&1026&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function of(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function sf(e){if(ua(e)!==e)throw Error(L(188))}function YE(e){var t=e.alternate;if(!t){if(t=ua(e),t===null)throw Error(L(188));return t!==e?null:e}for(var n=e,a=t;;){var i=n.return;if(i===null)break;var r=i.alternate;if(r===null){if(a=i.return,a!==null){n=a;continue}break}if(i.child===r.child){for(r=i.child;r;){if(r===n)return sf(i),e;if(r===a)return sf(i),t;r=r.sibling}throw Error(L(188))}if(n.return!==a.return)n=i,a=r;else{for(var o=!1,s=i.child;s;){if(s===n){o=!0,n=i,a=r;break}if(s===a){o=!0,a=i,n=r;break}s=s.sibling}if(!o){for(s=r.child;s;){if(s===n){o=!0,n=r,a=i;break}if(s===a){o=!0,a=r,n=i;break}s=s.sibling}if(!o)throw Error(L(189))}}if(n.alternate!==a)throw Error(L(190))}if(n.tag!==3)throw Error(L(188));return n.stateNode.current===n?e:t}function lf(e){if(e=YE(e),!e)return null;for(var t=e;;){if(t.tag===5||t.tag===6)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function uf(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var cf,Ou,df,mf,_u=!1,Gt=[],An=null,Nn=null,In=null,ar=new Map,ir=new Map,rr=[],pf="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ru(e,t,n,a,i){return{blockedOn:e,domEventName:t,eventSystemFlags:n|16,nativeEvent:i,targetContainers:[a]}}function hf(e,t){switch(e){case"focusin":case"focusout":An=null;break;case"dragenter":case"dragleave":Nn=null;break;case"mouseover":case"mouseout":In=null;break;case"pointerover":case"pointerout":ar.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ir.delete(t.pointerId)}}function or(e,t,n,a,i,r){return e===null||e.nativeEvent!==r?(e=Ru(t,n,a,i,r),t!==null&&(t=br(t),t!==null&&Ou(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function BE(e,t,n,a,i){switch(t){case"focusin":return An=or(An,e,t,n,a,i),!0;case"dragenter":return Nn=or(Nn,e,t,n,a,i),!0;case"mouseover":return In=or(In,e,t,n,a,i),!0;case"pointerover":var r=i.pointerId;return ar.set(r,or(ar.get(r)||null,e,t,n,a,i)),!0;case"gotpointercapture":return r=i.pointerId,ir.set(r,or(ir.get(r)||null,e,t,n,a,i)),!0}return!1}function VE(e){var t=ca(e.target);if(t!==null){var n=ua(t);if(n!==null){if(t=n.tag,t===13){if(t=of(n),t!==null){e.blockedOn=t,mf(e.lanePriority,function(){Le.unstable_runWithPriority(e.priority,function(){df(n)})});return}}else if(t===3&&n.stateNode.hydrate){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Oo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Hu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=br(n),t!==null&&Ou(t),e.blockedOn=n,!1;t.shift()}return!0}function ff(e,t,n){Oo(e)&&n.delete(t)}function HE(){for(_u=!1;0<Gt.length;){var e=Gt[0];if(e.blockedOn!==null){e=br(e.blockedOn),e!==null&&cf(e);break}for(var t=e.targetContainers;0<t.length;){var n=Hu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null){e.blockedOn=n;break}t.shift()}e.blockedOn===null&&Gt.shift()}An!==null&&Oo(An)&&(An=null),Nn!==null&&Oo(Nn)&&(Nn=null),In!==null&&Oo(In)&&(In=null),ar.forEach(ff),ir.forEach(ff)}function sr(e,t){e.blockedOn===t&&(e.blockedOn=null,_u||(_u=!0,Le.unstable_scheduleCallback(Le.unstable_NormalPriority,HE)))}function gf(e){function t(i){return sr(i,e)}if(0<Gt.length){sr(Gt[0],e);for(var n=1;n<Gt.length;n++){var a=Gt[n];a.blockedOn===e&&(a.blockedOn=null)}}for(An!==null&&sr(An,e),Nn!==null&&sr(Nn,e),In!==null&&sr(In,e),ar.forEach(t),ir.forEach(t),n=0;n<rr.length;n++)a=rr[n],a.blockedOn===e&&(a.blockedOn=null);for(;0<rr.length&&(n=rr[0],n.blockedOn===null);)VE(n),n.blockedOn===null&&rr.shift()}function _o(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Va={animationend:_o("Animation","AnimationEnd"),animationiteration:_o("Animation","AnimationIteration"),animationstart:_o("Animation","AnimationStart"),transitionend:_o("Transition","TransitionEnd")},Uu={},yf={};cn&&(yf=document.createElement("div").style,"AnimationEvent"in window||(delete Va.animationend.animation,delete Va.animationiteration.animation,delete Va.animationstart.animation),"TransitionEvent"in window||delete Va.transitionend.transition);function Ro(e){if(Uu[e])return Uu[e];if(!Va[e])return e;var t=Va[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in yf)return Uu[e]=t[n];return e}var bf=Ro("animationend"),kf=Ro("animationiteration"),vf=Ro("animationstart"),wf=Ro("transitionend"),xf=new Map,Lu=new Map,WE=["abort","abort",bf,"animationEnd",kf,"animationIteration",vf,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",wf,"transitionEnd","waiting","waiting"];function Yu(e,t){for(var n=0;n<e.length;n+=2){var a=e[n],i=e[n+1];i="on"+(i[0].toUpperCase()+i.slice(1)),Lu.set(a,t),xf.set(a,i),ra(i,[a])}}var GE=Le.unstable_now;GE();var be=8;function Ha(e){if(1&e)return be=15,1;if(2&e)return be=14,2;if(4&e)return be=13,4;var t=24&e;return t!==0?(be=12,t):e&32?(be=11,32):(t=192&e,t!==0?(be=10,t):e&256?(be=9,256):(t=3584&e,t!==0?(be=8,t):e&4096?(be=7,4096):(t=4186112&e,t!==0?(be=6,t):(t=62914560&e,t!==0?(be=5,t):e&67108864?(be=4,67108864):e&134217728?(be=3,134217728):(t=805306368&e,t!==0?(be=2,t):1073741824&e?(be=1,1073741824):(be=8,e))))))}function KE(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function qE(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(L(358,e))}}function lr(e,t){var n=e.pendingLanes;if(n===0)return be=0;var a=0,i=0,r=e.expiredLanes,o=e.suspendedLanes,s=e.pingedLanes;if(r!==0)a=r,i=be=15;else if(r=n&134217727,r!==0){var l=r&~o;l!==0?(a=Ha(l),i=be):(s&=r,s!==0&&(a=Ha(s),i=be))}else r=n&~o,r!==0?(a=Ha(r),i=be):s!==0&&(a=Ha(s),i=be);if(a===0)return 0;if(a=31-Mn(a),a=n&((0>a?0:1<<a)<<1)-1,t!==0&&t!==a&&!(t&o)){if(Ha(t),i<=be)return t;be=i}if(t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=a;0<t;)n=31-Mn(t),i=1<<n,a|=e[n],t&=~i;return a}function Ef(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Uo(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=Wa(24&~t),e===0?Uo(10,t):e;case 10:return e=Wa(192&~t),e===0?Uo(8,t):e;case 8:return e=Wa(3584&~t),e===0&&(e=Wa(4186112&~t),e===0&&(e=512)),e;case 2:return t=Wa(805306368&~t),t===0&&(t=268435456),t}throw Error(L(358,e))}function Wa(e){return e&-e}function Bu(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Lo(e,t,n){e.pendingLanes|=t;var a=t-1;e.suspendedLanes&=a,e.pingedLanes&=a,e=e.eventTimes,t=31-Mn(t),e[t]=n}var Mn=Math.clz32?Math.clz32:XE,JE=Math.log,ZE=Math.LN2;function XE(e){return e===0?32:31-(JE(e)/ZE|0)|0}var QE=Le.unstable_UserBlockingPriority,eS=Le.unstable_runWithPriority,Yo=!0;function tS(e,t,n,a){la||Nu();var i=Vu,r=la;la=!0;try{af(i,e,t,n,a)}finally{(la=r)||Mu()}}function nS(e,t,n,a){eS(QE,Vu.bind(null,e,t,n,a))}function Vu(e,t,n,a){if(Yo){var i;if((i=(t&4)===0)&&0<Gt.length&&-1<pf.indexOf(e))e=Ru(null,e,t,n,a),Gt.push(e);else{var r=Hu(e,t,n,a);if(r===null)i&&hf(e,a);else{if(i){if(-1<pf.indexOf(e)){e=Ru(r,e,t,n,a),Gt.push(e);return}if(BE(r,e,t,n,a))return;hf(e,a)}Xf(e,t,a,null,n)}}}}function Hu(e,t,n,a){var i=Pu(a);if(i=ca(i),i!==null){var r=ua(i);if(r===null)i=null;else{var o=r.tag;if(o===13){if(i=of(r),i!==null)return i;i=null}else if(o===3){if(r.stateNode.hydrate)return r.tag===3?r.stateNode.containerInfo:null;i=null}else r!==i&&(i=null)}}return Xf(e,t,a,i,n),null}var Fn=null,Wu=null,Bo=null;function Sf(){if(Bo)return Bo;var e,t=Wu,n=t.length,a,i="value"in Fn?Fn.value:Fn.textContent,r=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(a=1;a<=o&&t[n-a]===i[r-a];a++);return Bo=i.slice(e,1<a?1-a:void 0)}function Vo(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ho(){return!0}function Cf(){return!1}function vt(e){function t(n,a,i,r,o){this._reactName=n,this._targetInst=i,this.type=a,this.nativeEvent=r,this.target=o,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(r):r[s]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?Ho:Cf,this.isPropagationStopped=Cf,this}return Ce(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ho)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ho)},persist:function(){},isPersistent:Ho}),t}var Ga={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Gu=vt(Ga),ur=Ce({},Ga,{view:0,detail:0}),aS=vt(ur),Ku,qu,cr,Wo=Ce({},ur,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==cr&&(cr&&e.type==="mousemove"?(Ku=e.screenX-cr.screenX,qu=e.screenY-cr.screenY):qu=Ku=0,cr=e),Ku)},movementY:function(e){return"movementY"in e?e.movementY:qu}}),$f=vt(Wo),iS=Ce({},Wo,{dataTransfer:0}),rS=vt(iS),oS=Ce({},ur,{relatedTarget:0}),Ju=vt(oS),sS=Ce({},Ga,{animationName:0,elapsedTime:0,pseudoElement:0}),lS=vt(sS),uS=Ce({},Ga,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),cS=vt(uS),dS=Ce({},Ga,{data:0}),jf=vt(dS),mS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pS={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},hS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=hS[e])?!!t[e]:!1}function Zu(){return fS}var gS=Ce({},ur,{key:function(e){if(e.key){var t=mS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Vo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?pS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zu,charCode:function(e){return e.type==="keypress"?Vo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Vo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),yS=vt(gS),bS=Ce({},Wo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Tf=vt(bS),kS=Ce({},ur,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zu}),vS=vt(kS),wS=Ce({},Ga,{propertyName:0,elapsedTime:0,pseudoElement:0}),xS=vt(wS),ES=Ce({},Wo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),SS=vt(ES),CS=[9,13,27,32],Xu=cn&&"CompositionEvent"in window,dr=null;cn&&"documentMode"in document&&(dr=document.documentMode);var $S=cn&&"TextEvent"in window&&!dr,Pf=cn&&(!Xu||dr&&8<dr&&11>=dr),zf=" ",Af=!1;function Nf(e,t){switch(e){case"keyup":return CS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function If(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ka=!1;function jS(e,t){switch(e){case"compositionend":return If(t);case"keypress":return t.which!==32?null:(Af=!0,zf);case"textInput":return e=t.data,e===zf&&Af?null:e;default:return null}}function TS(e,t){if(Ka)return e==="compositionend"||!Xu&&Nf(e,t)?(e=Sf(),Bo=Wu=Fn=null,Ka=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Pf&&t.locale!=="ko"?null:t.data;default:return null}}var PS={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Mf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!PS[e.type]:t==="textarea"}function Ff(e,t,n,a){tf(a),t=Ko(t,"onChange"),0<t.length&&(n=new Gu("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var mr=null,pr=null;function zS(e){Gf(e,0)}function Go(e){var t=Qa(e);if(Bh(t))return e}function AS(e,t){if(e==="change")return t}var Df=!1;if(cn){var Qu;if(cn){var ec="oninput"in document;if(!ec){var Of=document.createElement("div");Of.setAttribute("oninput","return;"),ec=typeof Of.oninput=="function"}Qu=ec}else Qu=!1;Df=Qu&&(!document.documentMode||9<document.documentMode)}function _f(){mr&&(mr.detachEvent("onpropertychange",Rf),pr=mr=null)}function Rf(e){if(e.propertyName==="value"&&Go(pr)){var t=[];if(Ff(t,pr,e,Pu(e)),e=zS,la)e(t);else{la=!0;try{Au(e,t)}finally{la=!1,Mu()}}}}function NS(e,t,n){e==="focusin"?(_f(),mr=t,pr=n,mr.attachEvent("onpropertychange",Rf)):e==="focusout"&&_f()}function IS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Go(pr)}function MS(e,t){if(e==="click")return Go(t)}function FS(e,t){if(e==="input"||e==="change")return Go(t)}function DS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var jt=typeof Object.is=="function"?Object.is:DS,OS=Object.prototype.hasOwnProperty;function hr(e,t){if(jt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++)if(!OS.call(t,n[a])||!jt(e[n[a]],t[n[a]]))return!1;return!0}function Uf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Lf(e,t){var n=Uf(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Uf(n)}}function Yf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Yf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Bf(){for(var e=window,t=Io();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Io(e.document)}return t}function tc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var _S=cn&&"documentMode"in document&&11>=document.documentMode,qa=null,nc=null,fr=null,ac=!1;function Vf(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ac||qa==null||qa!==Io(a)||(a=qa,"selectionStart"in a&&tc(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),fr&&hr(fr,a)||(fr=a,a=Ko(nc,"onSelect"),0<a.length&&(t=new Gu("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=qa)))}Yu("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Yu("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Yu(WE,2);for(var Hf="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),ic=0;ic<Hf.length;ic++)Lu.set(Hf[ic],0);Ra("onMouseEnter",["mouseout","mouseover"]),Ra("onMouseLeave",["mouseout","mouseover"]),Ra("onPointerEnter",["pointerout","pointerover"]),Ra("onPointerLeave",["pointerout","pointerover"]),ra("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ra("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ra("onBeforeInput",["compositionend","keypress","textInput","paste"]),ra("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ra("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ra("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var gr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),RS=new Set("cancel close invalid load scroll toggle".split(" ").concat(gr));function Wf(e,t,n){var a=e.type||"unknown-event";e.currentTarget=n,LE(a,t,void 0,e),e.currentTarget=null}function Gf(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],i=a.event;a=a.listeners;e:{var r=void 0;if(t)for(var o=a.length-1;0<=o;o--){var s=a[o],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==r&&i.isPropagationStopped())break e;Wf(i,s,c),r=l}else for(o=0;o<a.length;o++){if(s=a[o],l=s.instance,c=s.currentTarget,s=s.listener,l!==r&&i.isPropagationStopped())break e;Wf(i,s,c),r=l}}}if(Do)throw e=Du,Do=!1,Du=null,e}function we(e,t){var n=ig(t),a=e+"__bubble";n.has(a)||(Zf(t,e,2,!1),n.add(a))}var Kf="_reactListening"+Math.random().toString(36).slice(2);function qf(e){e[Kf]||(e[Kf]=!0,Dh.forEach(function(t){RS.has(t)||Jf(t,!1,e,null),Jf(t,!0,e,null)}))}function Jf(e,t,n,a){var i=4<arguments.length&&arguments[4]!==void 0?arguments[4]:0,r=n;e==="selectionchange"&&n.nodeType!==9&&(r=n.ownerDocument);var o=ig(r),s=e+"__"+(t?"capture":"bubble");o.has(s)||(t&&(i|=4),Zf(r,e,i,t),o.add(s))}function Zf(e,t,n,a){var i=Lu.get(t);switch(i===void 0?2:i){case 0:i=tS;break;case 1:i=nS;break;default:i=Vu}n=i.bind(null,t,n,e),i=void 0,!Fu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),a?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Xf(e,t,n,a,i){var r=a;if(!(t&1)&&!(t&2)&&a!==null)e:for(;;){if(a===null)return;var o=a.tag;if(o===3||o===4){var s=a.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=a.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;s!==null;){if(o=ca(s),o===null)return;if(l=o.tag,l===5||l===6){a=r=o;continue e}s=s.parentNode}}a=a.return}OE(function(){var c=r,m=Pu(n),f=[];e:{var p=xf.get(e);if(p!==void 0){var y=Gu,k=e;switch(e){case"keypress":if(Vo(n)===0)break e;case"keydown":case"keyup":y=yS;break;case"focusin":k="focus",y=Ju;break;case"focusout":k="blur",y=Ju;break;case"beforeblur":case"afterblur":y=Ju;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":y=$f;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=rS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=vS;break;case bf:case kf:case vf:y=lS;break;case wf:y=xS;break;case"scroll":y=aS;break;case"wheel":y=SS;break;case"copy":case"cut":case"paste":y=cS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=Tf}var j=(t&4)!==0,b=!j&&e==="scroll",w=j?p!==null?p+"Capture":null:p;j=[];for(var E=c,P;E!==null;){P=E;var $=P.stateNode;if(P.tag===5&&$!==null&&(P=$,w!==null&&($=er(E,w),$!=null&&j.push(yr(E,$,P)))),b)break;E=E.return}0<j.length&&(p=new y(p,k,null,n,m),f.push({event:p,listeners:j}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",p&&!(t&16)&&(k=n.relatedTarget||n.fromElement)&&(ca(k)||k[Xa]))break e;if((y||p)&&(p=m.window===m?m:(p=m.ownerDocument)?p.defaultView||p.parentWindow:window,y?(k=n.relatedTarget||n.toElement,y=c,k=k?ca(k):null,k!==null&&(b=ua(k),k!==b||k.tag!==5&&k.tag!==6)&&(k=null)):(y=null,k=c),y!==k)){if(j=$f,$="onMouseLeave",w="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(j=Tf,$="onPointerLeave",w="onPointerEnter",E="pointer"),b=y==null?p:Qa(y),P=k==null?p:Qa(k),p=new j($,E+"leave",y,n,m),p.target=b,p.relatedTarget=P,$=null,ca(m)===c&&(j=new j(w,E+"enter",k,n,m),j.target=P,j.relatedTarget=b,$=j),b=$,y&&k)t:{for(j=y,w=k,E=0,P=j;P;P=Ja(P))E++;for(P=0,$=w;$;$=Ja($))P++;for(;0<E-P;)j=Ja(j),E--;for(;0<P-E;)w=Ja(w),P--;for(;E--;){if(j===w||w!==null&&j===w.alternate)break t;j=Ja(j),w=Ja(w)}j=null}else j=null;y!==null&&Qf(f,p,y,j,!1),k!==null&&b!==null&&Qf(f,b,k,j,!0)}}e:{if(p=c?Qa(c):window,y=p.nodeName&&p.nodeName.toLowerCase(),y==="select"||y==="input"&&p.type==="file")var F=AS;else if(Mf(p))if(Df)F=FS;else{F=IS;var z=NS}else(y=p.nodeName)&&y.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(F=MS);if(F&&(F=F(e,c))){Ff(f,F,n,m);break e}z&&z(e,p,c),e==="focusout"&&(z=p._wrapperState)&&z.controlled&&p.type==="number"&&xu(p,"number",p.value)}switch(z=c?Qa(c):window,e){case"focusin":(Mf(z)||z.contentEditable==="true")&&(qa=z,nc=c,fr=null);break;case"focusout":fr=nc=qa=null;break;case"mousedown":ac=!0;break;case"contextmenu":case"mouseup":case"dragend":ac=!1,Vf(f,n,m);break;case"selectionchange":if(_S)break;case"keydown":case"keyup":Vf(f,n,m)}var R;if(Xu)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else Ka?Nf(e,n)&&(_="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(_="onCompositionStart");_&&(Pf&&n.locale!=="ko"&&(Ka||_!=="onCompositionStart"?_==="onCompositionEnd"&&Ka&&(R=Sf()):(Fn=m,Wu="value"in Fn?Fn.value:Fn.textContent,Ka=!0)),z=Ko(c,_),0<z.length&&(_=new jf(_,e,null,n,m),f.push({event:_,listeners:z}),R?_.data=R:(R=If(n),R!==null&&(_.data=R)))),(R=$S?jS(e,n):TS(e,n))&&(c=Ko(c,"onBeforeInput"),0<c.length&&(m=new jf("onBeforeInput","beforeinput",null,n,m),f.push({event:m,listeners:c}),m.data=R))}Gf(f,t)})}function yr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ko(e,t){for(var n=t+"Capture",a=[];e!==null;){var i=e,r=i.stateNode;i.tag===5&&r!==null&&(i=r,r=er(e,n),r!=null&&a.unshift(yr(e,r,i)),r=er(e,t),r!=null&&a.push(yr(e,r,i))),e=e.return}return a}function Ja(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Qf(e,t,n,a,i){for(var r=t._reactName,o=[];n!==null&&n!==a;){var s=n,l=s.alternate,c=s.stateNode;if(l!==null&&l===a)break;s.tag===5&&c!==null&&(s=c,i?(l=er(n,r),l!=null&&o.unshift(yr(n,l,s))):i||(l=er(n,r),l!=null&&o.push(yr(n,l,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}function qo(){}var rc=null,oc=null;function eg(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function sc(e,t){return e==="textarea"||e==="option"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var tg=typeof setTimeout=="function"?setTimeout:void 0,US=typeof clearTimeout=="function"?clearTimeout:void 0;function lc(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function Za(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function ng(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var uc=0;function LS(e){return{$$typeof:fu,toString:e,valueOf:e}}var Jo=Math.random().toString(36).slice(2),Dn="__reactFiber$"+Jo,Zo="__reactProps$"+Jo,Xa="__reactContainer$"+Jo,ag="__reactEvents$"+Jo;function ca(e){var t=e[Dn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Xa]||n[Dn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ng(e);e!==null;){if(n=e[Dn])return n;e=ng(e)}return t}e=n,n=e.parentNode}return null}function br(e){return e=e[Dn]||e[Xa],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Qa(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(L(33))}function Xo(e){return e[Zo]||null}function ig(e){var t=e[ag];return t===void 0&&(t=e[ag]=new Set),t}var cc=[],ei=-1;function On(e){return{current:e}}function xe(e){0>ei||(e.current=cc[ei],cc[ei]=null,ei--)}function Te(e,t){ei++,cc[ei]=e.current,e.current=t}var _n={},Qe=On(_n),pt=On(!1),da=_n;function ti(e,t){var n=e.type.contextTypes;if(!n)return _n;var a=e.stateNode;if(a&&a.__reactInternalMemoizedUnmaskedChildContext===t)return a.__reactInternalMemoizedMaskedChildContext;var i={},r;for(r in n)i[r]=t[r];return a&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ht(e){return e=e.childContextTypes,e!=null}function Qo(){xe(pt),xe(Qe)}function rg(e,t,n){if(Qe.current!==_n)throw Error(L(168));Te(Qe,t),Te(pt,n)}function og(e,t,n){var a=e.stateNode;if(e=t.childContextTypes,typeof a.getChildContext!="function")return n;a=a.getChildContext();for(var i in a)if(!(i in e))throw Error(L(108,Ua(t)||"Unknown",i));return Ce({},n,a)}function es(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||_n,da=Qe.current,Te(Qe,e),Te(pt,pt.current),!0}function sg(e,t,n){var a=e.stateNode;if(!a)throw Error(L(169));n?(e=og(e,t,da),a.__reactInternalMemoizedMergedChildContext=e,xe(pt),xe(Qe),Te(Qe,e)):xe(pt),Te(pt,n)}var dc=null,ma=null,YS=Le.unstable_runWithPriority,mc=Le.unstable_scheduleCallback,pc=Le.unstable_cancelCallback,BS=Le.unstable_shouldYield,lg=Le.unstable_requestPaint,hc=Le.unstable_now,VS=Le.unstable_getCurrentPriorityLevel,ts=Le.unstable_ImmediatePriority,ug=Le.unstable_UserBlockingPriority,cg=Le.unstable_NormalPriority,dg=Le.unstable_LowPriority,mg=Le.unstable_IdlePriority,fc={},HS=lg!==void 0?lg:function(){},dn=null,ns=null,gc=!1,pg=hc(),et=1e4>pg?hc:function(){return hc()-pg};function ni(){switch(VS()){case ts:return 99;case ug:return 98;case cg:return 97;case dg:return 96;case mg:return 95;default:throw Error(L(332))}}function hg(e){switch(e){case 99:return ts;case 98:return ug;case 97:return cg;case 96:return dg;case 95:return mg;default:throw Error(L(332))}}function pa(e,t){return e=hg(e),YS(e,t)}function kr(e,t,n){return e=hg(e),mc(e,t,n)}function Kt(){if(ns!==null){var e=ns;ns=null,pc(e)}fg()}function fg(){if(!gc&&dn!==null){gc=!0;var e=0;try{var t=dn;pa(99,function(){for(;e<t.length;e++){var n=t[e];do n=n(!0);while(n!==null)}}),dn=null}catch(n){throw dn!==null&&(dn=dn.slice(e+1)),mc(ts,Kt),n}finally{gc=!1}}}var WS=oa.ReactCurrentBatchConfig;function Rt(e,t){if(e&&e.defaultProps){t=Ce({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var as=On(null),is=null,ai=null,rs=null;function yc(){rs=ai=is=null}function bc(e){var t=as.current;xe(as),e.type._context._currentValue=t}function gg(e,t){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)===t){if(n===null||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,n!==null&&(n.childLanes|=t);e=e.return}}function ii(e,t){is=e,rs=ai=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ut=!0),e.firstContext=null)}function Tt(e,t){if(rs!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(rs=e,t=1073741823),t={context:e,observedBits:t,next:null},ai===null){if(is===null)throw Error(L(308));ai=t,is.dependencies={lanes:0,firstContext:t,responders:null}}else ai=ai.next=t;return e._currentValue}var Rn=!1;function kc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function yg(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Un(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ln(e,t){if(e=e.updateQueue,e!==null){e=e.shared;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function bg(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var i=null,r=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};r===null?i=r=o:r=r.next=o,n=n.next}while(n!==null);r===null?i=r=t:r=r.next=t}else i=r=t;n={baseState:a.baseState,firstBaseUpdate:i,lastBaseUpdate:r,shared:a.shared,effects:a.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function vr(e,t,n,a){var i=e.updateQueue;Rn=!1;var r=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,c=l.next;l.next=null,o===null?r=c:o.next=c,o=l;var m=e.alternate;if(m!==null){m=m.updateQueue;var f=m.lastBaseUpdate;f!==o&&(f===null?m.firstBaseUpdate=c:f.next=c,m.lastBaseUpdate=l)}}if(r!==null){f=i.baseState,o=0,m=c=l=null;do{s=r.lane;var p=r.eventTime;if((a&s)===s){m!==null&&(m=m.next={eventTime:p,lane:0,tag:r.tag,payload:r.payload,callback:r.callback,next:null});e:{var y=e,k=r;switch(s=t,p=n,k.tag){case 1:if(y=k.payload,typeof y=="function"){f=y.call(p,f,s);break e}f=y;break e;case 3:y.flags=y.flags&-4097|64;case 0:if(y=k.payload,s=typeof y=="function"?y.call(p,f,s):y,s==null)break e;f=Ce({},f,s);break e;case 2:Rn=!0}}r.callback!==null&&(e.flags|=32,s=i.effects,s===null?i.effects=[r]:s.push(r))}else p={eventTime:p,lane:s,tag:r.tag,payload:r.payload,callback:r.callback,next:null},m===null?(c=m=p,l=f):m=m.next=p,o|=s;if(r=r.next,r===null){if(s=i.shared.pending,s===null)break;r=s.next,s.next=null,i.lastBaseUpdate=s,i.shared.pending=null}}while(!0);m===null&&(l=f),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=m,Nr|=o,e.lanes=o,e.memoizedState=f}}function kg(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var a=e[t],i=a.callback;if(i!==null){if(a.callback=null,a=n,typeof i!="function")throw Error(L(191,i));i.call(a)}}}var vg=new jo.Component().refs;function os(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:Ce({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ss={isMounted:function(e){return(e=e._reactInternals)?ua(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var a=wt(),i=Vn(e),r=Un(a,i);r.payload=t,n!=null&&(r.callback=n),Ln(e,r),Hn(e,i,a)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=wt(),i=Vn(e),r=Un(a,i);r.tag=1,r.payload=t,n!=null&&(r.callback=n),Ln(e,r),Hn(e,i,a)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=wt(),a=Vn(e),i=Un(n,a);i.tag=2,t!=null&&(i.callback=t),Ln(e,i),Hn(e,a,n)}};function wg(e,t,n,a,i,r,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,r,o):t.prototype&&t.prototype.isPureReactComponent?!hr(n,a)||!hr(i,r):!0}function xg(e,t,n){var a=!1,i=_n,r=t.contextType;return typeof r=="object"&&r!==null?r=Tt(r):(i=ht(t)?da:Qe.current,a=t.contextTypes,r=(a=a!=null)?ti(e,i):_n),t=new t(n,r),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ss,e.stateNode=t,t._reactInternals=e,a&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=r),t}function Eg(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&ss.enqueueReplaceState(t,t.state,null)}function vc(e,t,n,a){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=vg,kc(e);var r=t.contextType;typeof r=="object"&&r!==null?i.context=Tt(r):(r=ht(t)?da:Qe.current,i.context=ti(e,r)),vr(e,n,i,a),i.state=e.memoizedState,r=t.getDerivedStateFromProps,typeof r=="function"&&(os(e,t,r,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&ss.enqueueReplaceState(i,i.state,null),vr(e,n,i,a),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4)}var ls=Array.isArray;function wr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(L(309));var a=n.stateNode}if(!a)throw Error(L(147,e));var i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(r){var o=a.refs;o===vg&&(o=a.refs={}),r===null?delete o[i]:o[i]=r},t._stringRef=i,t)}if(typeof e!="string")throw Error(L(284));if(!n._owner)throw Error(L(290,e))}return e}function us(e,t){if(e.type!=="textarea")throw Error(L(31,Object.prototype.toString.call(t)==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function Sg(e){function t(b,w){if(e){var E=b.lastEffect;E!==null?(E.nextEffect=w,b.lastEffect=w):b.firstEffect=b.lastEffect=w,w.nextEffect=null,w.flags=8}}function n(b,w){if(!e)return null;for(;w!==null;)t(b,w),w=w.sibling;return null}function a(b,w){for(b=new Map;w!==null;)w.key!==null?b.set(w.key,w):b.set(w.index,w),w=w.sibling;return b}function i(b,w){return b=Kn(b,w),b.index=0,b.sibling=null,b}function r(b,w,E){return b.index=E,e?(E=b.alternate,E!==null?(E=E.index,E<w?(b.flags=2,w):E):(b.flags=2,w)):w}function o(b){return e&&b.alternate===null&&(b.flags=2),b}function s(b,w,E,P){return w===null||w.tag!==6?(w=nd(E,b.mode,P),w.return=b,w):(w=i(w,E),w.return=b,w)}function l(b,w,E,P){return w!==null&&w.elementType===E.type?(P=i(w,E.props),P.ref=wr(b,w,E),P.return=b,P):(P=js(E.type,E.key,E.props,null,b.mode,P),P.ref=wr(b,w,E),P.return=b,P)}function c(b,w,E,P){return w===null||w.tag!==4||w.stateNode.containerInfo!==E.containerInfo||w.stateNode.implementation!==E.implementation?(w=ad(E,b.mode,P),w.return=b,w):(w=i(w,E.children||[]),w.return=b,w)}function m(b,w,E,P,$){return w===null||w.tag!==7?(w=mi(E,b.mode,P,$),w.return=b,w):(w=i(w,E),w.return=b,w)}function f(b,w,E){if(typeof w=="string"||typeof w=="number")return w=nd(""+w,b.mode,E),w.return=b,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Gi:return E=js(w.type,w.key,w.props,null,b.mode,E),E.ref=wr(b,null,w),E.return=b,E;case sa:return w=ad(w,b.mode,E),w.return=b,w}if(ls(w)||Ji(w))return w=mi(w,b.mode,E,null),w.return=b,w;us(b,w)}return null}function p(b,w,E,P){var $=w!==null?w.key:null;if(typeof E=="string"||typeof E=="number")return $!==null?null:s(b,w,""+E,P);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case Gi:return E.key===$?E.type===Pn?m(b,w,E.props.children,P,$):l(b,w,E,P):null;case sa:return E.key===$?c(b,w,E,P):null}if(ls(E)||Ji(E))return $!==null?null:m(b,w,E,P,null);us(b,E)}return null}function y(b,w,E,P,$){if(typeof P=="string"||typeof P=="number")return b=b.get(E)||null,s(w,b,""+P,$);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case Gi:return b=b.get(P.key===null?E:P.key)||null,P.type===Pn?m(w,b,P.props.children,$,P.key):l(w,b,P,$);case sa:return b=b.get(P.key===null?E:P.key)||null,c(w,b,P,$)}if(ls(P)||Ji(P))return b=b.get(E)||null,m(w,b,P,$,null);us(w,P)}return null}function k(b,w,E,P){for(var $=null,F=null,z=w,R=w=0,_=null;z!==null&&R<E.length;R++){z.index>R?(_=z,z=null):_=z.sibling;var D=p(b,z,E[R],P);if(D===null){z===null&&(z=_);break}e&&z&&D.alternate===null&&t(b,z),w=r(D,w,R),F===null?$=D:F.sibling=D,F=D,z=_}if(R===E.length)return n(b,z),$;if(z===null){for(;R<E.length;R++)z=f(b,E[R],P),z!==null&&(w=r(z,w,R),F===null?$=z:F.sibling=z,F=z);return $}for(z=a(b,z);R<E.length;R++)_=y(z,b,R,E[R],P),_!==null&&(e&&_.alternate!==null&&z.delete(_.key===null?R:_.key),w=r(_,w,R),F===null?$=_:F.sibling=_,F=_);return e&&z.forEach(function(X){return t(b,X)}),$}function j(b,w,E,P){var $=Ji(E);if(typeof $!="function")throw Error(L(150));if(E=$.call(E),E==null)throw Error(L(151));for(var F=$=null,z=w,R=w=0,_=null,D=E.next();z!==null&&!D.done;R++,D=E.next()){z.index>R?(_=z,z=null):_=z.sibling;var X=p(b,z,D.value,P);if(X===null){z===null&&(z=_);break}e&&z&&X.alternate===null&&t(b,z),w=r(X,w,R),F===null?$=X:F.sibling=X,F=X,z=_}if(D.done)return n(b,z),$;if(z===null){for(;!D.done;R++,D=E.next())D=f(b,D.value,P),D!==null&&(w=r(D,w,R),F===null?$=D:F.sibling=D,F=D);return $}for(z=a(b,z);!D.done;R++,D=E.next())D=y(z,b,R,D.value,P),D!==null&&(e&&D.alternate!==null&&z.delete(D.key===null?R:D.key),w=r(D,w,R),F===null?$=D:F.sibling=D,F=D);return e&&z.forEach(function(ne){return t(b,ne)}),$}return function(b,w,E,P){var $=typeof E=="object"&&E!==null&&E.type===Pn&&E.key===null;$&&(E=E.props.children);var F=typeof E=="object"&&E!==null;if(F)switch(E.$$typeof){case Gi:e:{for(F=E.key,$=w;$!==null;){if($.key===F){switch($.tag){case 7:if(E.type===Pn){n(b,$.sibling),w=i($,E.props.children),w.return=b,b=w;break e}break;default:if($.elementType===E.type){n(b,$.sibling),w=i($,E.props),w.ref=wr(b,$,E),w.return=b,b=w;break e}}n(b,$);break}else t(b,$);$=$.sibling}E.type===Pn?(w=mi(E.props.children,b.mode,P,E.key),w.return=b,b=w):(P=js(E.type,E.key,E.props,null,b.mode,P),P.ref=wr(b,w,E),P.return=b,b=P)}return o(b);case sa:e:{for($=E.key;w!==null;){if(w.key===$)if(w.tag===4&&w.stateNode.containerInfo===E.containerInfo&&w.stateNode.implementation===E.implementation){n(b,w.sibling),w=i(w,E.children||[]),w.return=b,b=w;break e}else{n(b,w);break}else t(b,w);w=w.sibling}w=ad(E,b.mode,P),w.return=b,b=w}return o(b)}if(typeof E=="string"||typeof E=="number")return E=""+E,w!==null&&w.tag===6?(n(b,w.sibling),w=i(w,E),w.return=b,b=w):(n(b,w),w=nd(E,b.mode,P),w.return=b,b=w),o(b);if(ls(E))return k(b,w,E,P);if(Ji(E))return j(b,w,E,P);if(F&&us(b,E),typeof E>"u"&&!$)switch(b.tag){case 1:case 22:case 0:case 11:case 15:throw Error(L(152,Ua(b.type)||"Component"))}return n(b,w)}}var cs=Sg(!0),Cg=Sg(!1),xr={},qt=On(xr),Er=On(xr),Sr=On(xr);function ha(e){if(e===xr)throw Error(L(174));return e}function wc(e,t){switch(Te(Sr,t),Te(Er,e),Te(qt,xr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:$u(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=$u(t,e)}xe(qt),Te(qt,t)}function ri(){xe(qt),xe(Er),xe(Sr)}function $g(e){ha(Sr.current);var t=ha(qt.current),n=$u(t,e.type);t!==n&&(Te(Er,e),Te(qt,n))}function xc(e){Er.current===e&&(xe(qt),xe(Er))}var Pe=On(0);function ds(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&64)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var mn=null,Yn=null,Jt=!1;function jg(e,t){var n=At(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,e.lastEffect!==null?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Tg(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,!0):!1;case 13:return!1;default:return!1}}function Ec(e){if(Jt){var t=Yn;if(t){var n=t;if(!Tg(e,t)){if(t=Za(n.nextSibling),!t||!Tg(e,t)){e.flags=e.flags&-1025|2,Jt=!1,mn=e;return}jg(mn,n)}mn=e,Yn=Za(t.firstChild)}else e.flags=e.flags&-1025|2,Jt=!1,mn=e}}function Pg(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;mn=e}function ms(e){if(e!==mn)return!1;if(!Jt)return Pg(e),Jt=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!sc(t,e.memoizedProps))for(t=Yn;t;)jg(e,t),t=Za(t.nextSibling);if(Pg(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(L(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Yn=Za(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Yn=null}}else Yn=mn?Za(e.stateNode.nextSibling):null;return!0}function Sc(){Yn=mn=null,Jt=!1}var oi=[];function Cc(){for(var e=0;e<oi.length;e++)oi[e]._workInProgressVersionPrimary=null;oi.length=0}var Cr=oa.ReactCurrentDispatcher,Pt=oa.ReactCurrentBatchConfig,$r=0,Ae=null,tt=null,He=null,ps=!1,jr=!1;function ft(){throw Error(L(321))}function $c(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!jt(e[n],t[n]))return!1;return!0}function jc(e,t,n,a,i,r){if($r=r,Ae=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Cr.current=e===null||e.memoizedState===null?KS:qS,e=n(a,i),jr){r=0;do{if(jr=!1,!(25>r))throw Error(L(301));r+=1,He=tt=null,t.updateQueue=null,Cr.current=JS,e=n(a,i)}while(jr)}if(Cr.current=ys,t=tt!==null&&tt.next!==null,$r=0,He=tt=Ae=null,ps=!1,t)throw Error(L(300));return e}function fa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return He===null?Ae.memoizedState=He=e:He=He.next=e,He}function ga(){if(tt===null){var e=Ae.alternate;e=e!==null?e.memoizedState:null}else e=tt.next;var t=He===null?Ae.memoizedState:He.next;if(t!==null)He=t,tt=e;else{if(e===null)throw Error(L(310));tt=e,e={memoizedState:tt.memoizedState,baseState:tt.baseState,baseQueue:tt.baseQueue,queue:tt.queue,next:null},He===null?Ae.memoizedState=He=e:He=He.next=e}return He}function Zt(e,t){return typeof t=="function"?t(e):t}function Tr(e){var t=ga(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var a=tt,i=a.baseQueue,r=n.pending;if(r!==null){if(i!==null){var o=i.next;i.next=r.next,r.next=o}a.baseQueue=i=r,n.pending=null}if(i!==null){i=i.next,a=a.baseState;var s=o=r=null,l=i;do{var c=l.lane;if(($r&c)===c)s!==null&&(s=s.next={lane:0,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null}),a=l.eagerReducer===e?l.eagerState:e(a,l.action);else{var m={lane:c,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null};s===null?(o=s=m,r=a):s=s.next=m,Ae.lanes|=c,Nr|=c}l=l.next}while(l!==null&&l!==i);s===null?r=a:s.next=o,jt(a,t.memoizedState)||(Ut=!0),t.memoizedState=a,t.baseState=r,t.baseQueue=s,n.lastRenderedState=a}return[t.memoizedState,n.dispatch]}function Pr(e){var t=ga(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var a=n.dispatch,i=n.pending,r=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do r=e(r,o.action),o=o.next;while(o!==i);jt(r,t.memoizedState)||(Ut=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),n.lastRenderedState=r}return[r,a]}function zg(e,t,n){var a=t._getVersion;a=a(t._source);var i=t._workInProgressVersionPrimary;if(i!==null?e=i===a:(e=e.mutableReadLanes,(e=($r&e)===e)&&(t._workInProgressVersionPrimary=a,oi.push(t))),e)return n(t._source);throw oi.push(t),Error(L(350))}function Ag(e,t,n,a){var i=ot;if(i===null)throw Error(L(349));var r=t._getVersion,o=r(t._source),s=Cr.current,l=s.useState(function(){return zg(i,t,n)}),c=l[1],m=l[0];l=He;var f=e.memoizedState,p=f.refs,y=p.getSnapshot,k=f.source;f=f.subscribe;var j=Ae;return e.memoizedState={refs:p,source:t,subscribe:a},s.useEffect(function(){p.getSnapshot=n,p.setSnapshot=c;var b=r(t._source);if(!jt(o,b)){b=n(t._source),jt(m,b)||(c(b),b=Vn(j),i.mutableReadLanes|=b&i.pendingLanes),b=i.mutableReadLanes,i.entangledLanes|=b;for(var w=i.entanglements,E=b;0<E;){var P=31-Mn(E),$=1<<P;w[P]|=b,E&=~$}}},[n,t,a]),s.useEffect(function(){return a(t._source,function(){var b=p.getSnapshot,w=p.setSnapshot;try{w(b(t._source));var E=Vn(j);i.mutableReadLanes|=E&i.pendingLanes}catch(P){w(function(){throw P})}})},[t,a]),jt(y,n)&&jt(k,t)&&jt(f,a)||(e={pending:null,dispatch:null,lastRenderedReducer:Zt,lastRenderedState:m},e.dispatch=c=Ac.bind(null,Ae,e),l.queue=e,l.baseQueue=null,m=zg(i,t,n),l.memoizedState=l.baseState=m),m}function Ng(e,t,n){var a=ga();return Ag(a,e,t,n)}function zr(e){var t=fa();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Zt,lastRenderedState:e},e=e.dispatch=Ac.bind(null,Ae,e),[t.memoizedState,e]}function hs(e,t,n,a){return e={tag:e,create:t,destroy:n,deps:a,next:null},t=Ae.updateQueue,t===null?(t={lastEffect:null},Ae.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e)),e}function Ig(e){var t=fa();return e={current:e},t.memoizedState=e}function fs(){return ga().memoizedState}function Tc(e,t,n,a){var i=fa();Ae.flags|=e,i.memoizedState=hs(1|t,n,void 0,a===void 0?null:a)}function Pc(e,t,n,a){var i=ga();a=a===void 0?null:a;var r=void 0;if(tt!==null){var o=tt.memoizedState;if(r=o.destroy,a!==null&&$c(a,o.deps)){hs(t,n,r,a);return}}Ae.flags|=e,i.memoizedState=hs(1|t,n,r,a)}function Mg(e,t){return Tc(516,4,e,t)}function gs(e,t){return Pc(516,4,e,t)}function Fg(e,t){return Pc(4,2,e,t)}function Dg(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Og(e,t,n){return n=n!=null?n.concat([e]):null,Pc(4,2,Dg.bind(null,t,e),n)}function zc(){}function _g(e,t){var n=ga();t=t===void 0?null:t;var a=n.memoizedState;return a!==null&&t!==null&&$c(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Rg(e,t){var n=ga();t=t===void 0?null:t;var a=n.memoizedState;return a!==null&&t!==null&&$c(t,a[1])?a[0]:(e=e(),n.memoizedState=[e,t],e)}function GS(e,t){var n=ni();pa(98>n?98:n,function(){e(!0)}),pa(97<n?97:n,function(){var a=Pt.transition;Pt.transition=1;try{e(!1),t()}finally{Pt.transition=a}})}function Ac(e,t,n){var a=wt(),i=Vn(e),r={lane:i,action:n,eagerReducer:null,eagerState:null,next:null},o=t.pending;if(o===null?r.next=r:(r.next=o.next,o.next=r),t.pending=r,o=e.alternate,e===Ae||o!==null&&o===Ae)jr=ps=!0;else{if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(r.eagerReducer=o,r.eagerState=l,jt(l,s))return}catch{}finally{}Hn(e,i,a)}}var ys={readContext:Tt,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useLayoutEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useMutableSource:ft,useOpaqueIdentifier:ft,unstable_isNewReconciler:!1},KS={readContext:Tt,useCallback:function(e,t){return fa().memoizedState=[e,t===void 0?null:t],e},useContext:Tt,useEffect:Mg,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Tc(4,2,Dg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Tc(4,2,e,t)},useMemo:function(e,t){var n=fa();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var a=fa();return t=n!==void 0?n(t):t,a.memoizedState=a.baseState=t,e=a.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},e=e.dispatch=Ac.bind(null,Ae,e),[a.memoizedState,e]},useRef:Ig,useState:zr,useDebugValue:zc,useDeferredValue:function(e){var t=zr(e),n=t[0],a=t[1];return Mg(function(){var i=Pt.transition;Pt.transition=1;try{a(e)}finally{Pt.transition=i}},[e]),n},useTransition:function(){var e=zr(!1),t=e[0];return e=GS.bind(null,e[1]),Ig(e),[e,t]},useMutableSource:function(e,t,n){var a=fa();return a.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},Ag(a,e,t,n)},useOpaqueIdentifier:function(){if(Jt){var e=!1,t=LS(function(){throw e||(e=!0,n("r:"+(uc++).toString(36))),Error(L(355))}),n=zr(t)[1];return!(Ae.mode&2)&&(Ae.flags|=516,hs(5,function(){n("r:"+(uc++).toString(36))},void 0,null)),t}return t="r:"+(uc++).toString(36),zr(t),t},unstable_isNewReconciler:!1},qS={readContext:Tt,useCallback:_g,useContext:Tt,useEffect:gs,useImperativeHandle:Og,useLayoutEffect:Fg,useMemo:Rg,useReducer:Tr,useRef:fs,useState:function(){return Tr(Zt)},useDebugValue:zc,useDeferredValue:function(e){var t=Tr(Zt),n=t[0],a=t[1];return gs(function(){var i=Pt.transition;Pt.transition=1;try{a(e)}finally{Pt.transition=i}},[e]),n},useTransition:function(){var e=Tr(Zt)[0];return[fs().current,e]},useMutableSource:Ng,useOpaqueIdentifier:function(){return Tr(Zt)[0]},unstable_isNewReconciler:!1},JS={readContext:Tt,useCallback:_g,useContext:Tt,useEffect:gs,useImperativeHandle:Og,useLayoutEffect:Fg,useMemo:Rg,useReducer:Pr,useRef:fs,useState:function(){return Pr(Zt)},useDebugValue:zc,useDeferredValue:function(e){var t=Pr(Zt),n=t[0],a=t[1];return gs(function(){var i=Pt.transition;Pt.transition=1;try{a(e)}finally{Pt.transition=i}},[e]),n},useTransition:function(){var e=Pr(Zt)[0];return[fs().current,e]},useMutableSource:Ng,useOpaqueIdentifier:function(){return Pr(Zt)[0]},unstable_isNewReconciler:!1},ZS=oa.ReactCurrentOwner,Ut=!1;function gt(e,t,n,a){t.child=e===null?Cg(t,null,n,a):cs(t,e.child,n,a)}function Ug(e,t,n,a,i){n=n.render;var r=t.ref;return ii(t,i),a=jc(e,t,n,a,r,i),e!==null&&!Ut?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,pn(e,t,i)):(t.flags|=1,gt(e,t,a,i),t.child)}function Lg(e,t,n,a,i,r){if(e===null){var o=n.type;return typeof o=="function"&&!ed(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Yg(e,t,o,a,i,r)):(e=js(n.type,null,a,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}return o=e.child,!(i&r)&&(i=o.memoizedProps,n=n.compare,n=n!==null?n:hr,n(i,a)&&e.ref===t.ref)?pn(e,t,r):(t.flags|=1,e=Kn(o,a),e.ref=t.ref,e.return=t,t.child=e)}function Yg(e,t,n,a,i,r){if(e!==null&&hr(e.memoizedProps,a)&&e.ref===t.ref)if(Ut=!1,(r&i)!==0)e.flags&16384&&(Ut=!0);else return t.lanes=e.lanes,pn(e,t,r);return Ic(e,t,n,a,r)}function Nc(e,t,n){var a=t.pendingProps,i=a.children,r=e!==null?e.memoizedState:null;if(a.mode==="hidden"||a.mode==="unstable-defer-without-hiding")if(!(t.mode&4))t.memoizedState={baseLanes:0},$s(t,n);else if(n&1073741824)t.memoizedState={baseLanes:0},$s(t,r!==null?r.baseLanes:n);else return e=r!==null?r.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},$s(t,e),null;else r!==null?(a=r.baseLanes|n,t.memoizedState=null):a=n,$s(t,a);return gt(e,t,i,n),t.child}function Bg(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=128)}function Ic(e,t,n,a,i){var r=ht(n)?da:Qe.current;return r=ti(t,r),ii(t,i),n=jc(e,t,n,a,r,i),e!==null&&!Ut?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,pn(e,t,i)):(t.flags|=1,gt(e,t,n,i),t.child)}function Vg(e,t,n,a,i){if(ht(n)){var r=!0;es(t)}else r=!1;if(ii(t,i),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),xg(t,n,a),vc(t,n,a,i),a=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=Tt(c):(c=ht(n)?da:Qe.current,c=ti(t,c));var m=n.getDerivedStateFromProps,f=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==a||l!==c)&&Eg(t,o,a,c),Rn=!1;var p=t.memoizedState;o.state=p,vr(t,a,o,i),l=t.memoizedState,s!==a||p!==l||pt.current||Rn?(typeof m=="function"&&(os(t,n,m,a),l=t.memoizedState),(s=Rn||wg(t,n,s,a,p,l,c))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4)):(typeof o.componentDidMount=="function"&&(t.flags|=4),t.memoizedProps=a,t.memoizedState=l),o.props=a,o.state=l,o.context=c,a=s):(typeof o.componentDidMount=="function"&&(t.flags|=4),a=!1)}else{o=t.stateNode,yg(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Rt(t.type,s),o.props=c,f=t.pendingProps,p=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Tt(l):(l=ht(n)?da:Qe.current,l=ti(t,l));var y=n.getDerivedStateFromProps;(m=typeof y=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==f||p!==l)&&Eg(t,o,a,l),Rn=!1,p=t.memoizedState,o.state=p,vr(t,a,o,i);var k=t.memoizedState;s!==f||p!==k||pt.current||Rn?(typeof y=="function"&&(os(t,n,y,a),k=t.memoizedState),(c=Rn||wg(t,n,c,a,p,k,l))?(m||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(a,k,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(a,k,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=256)):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=256),t.memoizedProps=a,t.memoizedState=k),o.props=a,o.state=k,o.context=l,a=c):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=256),a=!1)}return Mc(e,t,n,a,r,i)}function Mc(e,t,n,a,i,r){Bg(e,t);var o=(t.flags&64)!==0;if(!a&&!o)return i&&sg(t,n,!1),pn(e,t,r);a=t.stateNode,ZS.current=t;var s=o&&typeof n.getDerivedStateFromError!="function"?null:a.render();return t.flags|=1,e!==null&&o?(t.child=cs(t,e.child,null,r),t.child=cs(t,null,s,r)):gt(e,t,s,r),t.memoizedState=a.state,i&&sg(t,n,!0),t.child}function Hg(e){var t=e.stateNode;t.pendingContext?rg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&rg(e,t.context,!1),wc(e,t.containerInfo)}var bs={dehydrated:null,retryLane:0};function Wg(e,t,n){var a=t.pendingProps,i=Pe.current,r=!1,o;return(o=(t.flags&64)!==0)||(o=e!==null&&e.memoizedState===null?!1:(i&2)!==0),o?(r=!0,t.flags&=-65):e!==null&&e.memoizedState===null||a.fallback===void 0||a.unstable_avoidThisFallback===!0||(i|=1),Te(Pe,i&1),e===null?(a.fallback!==void 0&&Ec(t),e=a.children,i=a.fallback,r?(e=Gg(t,e,i,n),t.child.memoizedState={baseLanes:n},t.memoizedState=bs,e):typeof a.unstable_expectedLoadTime=="number"?(e=Gg(t,e,i,n),t.child.memoizedState={baseLanes:n},t.memoizedState=bs,t.lanes=33554432,e):(n=td({mode:"visible",children:e},t.mode,n,null),n.return=t,t.child=n)):e.memoizedState!==null?r?(a=qg(e,t,a.children,a.fallback,n),r=t.child,i=e.child.memoizedState,r.memoizedState=i===null?{baseLanes:n}:{baseLanes:i.baseLanes|n},r.childLanes=e.childLanes&~n,t.memoizedState=bs,a):(n=Kg(e,t,a.children,n),t.memoizedState=null,n):r?(a=qg(e,t,a.children,a.fallback,n),r=t.child,i=e.child.memoizedState,r.memoizedState=i===null?{baseLanes:n}:{baseLanes:i.baseLanes|n},r.childLanes=e.childLanes&~n,t.memoizedState=bs,a):(n=Kg(e,t,a.children,n),t.memoizedState=null,n)}function Gg(e,t,n,a){var i=e.mode,r=e.child;return t={mode:"hidden",children:t},!(i&2)&&r!==null?(r.childLanes=0,r.pendingProps=t):r=td(t,i,0,null),n=mi(n,i,a,null),r.return=e,n.return=e,r.sibling=n,e.child=r,n}function Kg(e,t,n,a){var i=e.child;return e=i.sibling,n=Kn(i,{mode:"visible",children:n}),!(t.mode&2)&&(n.lanes=a),n.return=t,n.sibling=null,e!==null&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function qg(e,t,n,a,i){var r=t.mode,o=e.child;e=o.sibling;var s={mode:"hidden",children:n};return!(r&2)&&t.child!==o?(n=t.child,n.childLanes=0,n.pendingProps=s,o=n.lastEffect,o!==null?(t.firstEffect=n.firstEffect,t.lastEffect=o,o.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Kn(o,s),e!==null?a=Kn(e,a):(a=mi(a,r,i,null),a.flags|=2),a.return=t,n.return=t,n.sibling=a,t.child=n,a}function Jg(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),gg(e.return,t)}function Fc(e,t,n,a,i,r){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:i,lastEffect:r}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=a,o.tail=n,o.tailMode=i,o.lastEffect=r)}function Zg(e,t,n){var a=t.pendingProps,i=a.revealOrder,r=a.tail;if(gt(e,t,a.children,n),a=Pe.current,a&2)a=a&1|2,t.flags|=64;else{if(e!==null&&e.flags&64)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Jg(e,n);else if(e.tag===19)Jg(e,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}a&=1}if(Te(Pe,a),!(t.mode&2))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ds(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Fc(t,!1,i,n,r,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ds(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Fc(t,!0,n,null,r,t.lastEffect);break;case"together":Fc(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function pn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Nr|=t.lanes,n&t.childLanes){if(e!==null&&t.child!==e.child)throw Error(L(153));if(t.child!==null){for(e=t.child,n=Kn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Kn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}return null}var Xg,Dc,Qg,ey;Xg=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Dc=function(){},Qg=function(e,t,n,a){var i=e.memoizedProps;if(i!==a){e=t.stateNode,ha(qt.current);var r=null;switch(n){case"input":i=vu(e,i),a=vu(e,a),r=[];break;case"option":i=Eu(e,i),a=Eu(e,a),r=[];break;case"select":i=Ce({},i,{value:void 0}),a=Ce({},a,{value:void 0}),r=[];break;case"textarea":i=Su(e,i),a=Su(e,a),r=[];break;default:typeof i.onClick!="function"&&typeof a.onClick=="function"&&(e.onclick=qo)}ju(n,a);var o;n=null;for(c in i)if(!a.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var s=i[c];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Wi.hasOwnProperty(c)?r||(r=[]):(r=r||[]).push(c,null));for(c in a){var l=a[c];if(s=i!=null?i[c]:void 0,a.hasOwnProperty(c)&&l!==s&&(l!=null||s!=null))if(c==="style")if(s){for(o in s)!s.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&s[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(r||(r=[]),r.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(r=r||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(r=r||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Wi.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&we("scroll",e),r||s===l||(r=[])):typeof l=="object"&&l!==null&&l.$$typeof===fu?l.toString():(r=r||[]).push(c,l))}n&&(r=r||[]).push("style",n);var c=r;(t.updateQueue=c)&&(t.flags|=4)}},ey=function(e,t,n,a){n!==a&&(t.flags|=4)};function Ar(e,t){if(!Jt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function XS(e,t,n){var a=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return ht(t.type)&&Qo(),null;case 3:return ri(),xe(pt),xe(Qe),Cc(),a=t.stateNode,a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(ms(t)?t.flags|=4:a.hydrate||(t.flags|=256)),Dc(t),null;case 5:xc(t);var i=ha(Sr.current);if(n=t.type,e!==null&&t.stateNode!=null)Qg(e,t,n,a,i),e.ref!==t.ref&&(t.flags|=128);else{if(!a){if(t.stateNode===null)throw Error(L(166));return null}if(e=ha(qt.current),ms(t)){a=t.stateNode,n=t.type;var r=t.memoizedProps;switch(a[Dn]=t,a[Zo]=r,n){case"dialog":we("cancel",a),we("close",a);break;case"iframe":case"object":case"embed":we("load",a);break;case"video":case"audio":for(e=0;e<gr.length;e++)we(gr[e],a);break;case"source":we("error",a);break;case"img":case"image":case"link":we("error",a),we("load",a);break;case"details":we("toggle",a);break;case"input":Vh(a,r),we("invalid",a);break;case"select":a._wrapperState={wasMultiple:!!r.multiple},we("invalid",a);break;case"textarea":Gh(a,r),we("invalid",a)}ju(n,r),e=null;for(var o in r)r.hasOwnProperty(o)&&(i=r[o],o==="children"?typeof i=="string"?a.textContent!==i&&(e=["children",i]):typeof i=="number"&&a.textContent!==""+i&&(e=["children",""+i]):Wi.hasOwnProperty(o)&&i!=null&&o==="onScroll"&&we("scroll",a));switch(n){case"input":No(a),Wh(a,r,!0);break;case"textarea":No(a),qh(a);break;case"select":case"option":break;default:typeof r.onClick=="function"&&(a.onclick=qo)}a=e,t.updateQueue=a,a!==null&&(t.flags|=4)}else{switch(o=i.nodeType===9?i:i.ownerDocument,e===Cu.html&&(e=Jh(n)),e===Cu.html?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof a.is=="string"?e=o.createElement(n,{is:a.is}):(e=o.createElement(n),n==="select"&&(o=e,a.multiple?o.multiple=!0:a.size&&(o.size=a.size))):e=o.createElementNS(e,n),e[Dn]=t,e[Zo]=a,Xg(e,t,!1,!1),t.stateNode=e,o=Tu(n,a),n){case"dialog":we("cancel",e),we("close",e),i=a;break;case"iframe":case"object":case"embed":we("load",e),i=a;break;case"video":case"audio":for(i=0;i<gr.length;i++)we(gr[i],e);i=a;break;case"source":we("error",e),i=a;break;case"img":case"image":case"link":we("error",e),we("load",e),i=a;break;case"details":we("toggle",e),i=a;break;case"input":Vh(e,a),i=vu(e,a),we("invalid",e);break;case"option":i=Eu(e,a);break;case"select":e._wrapperState={wasMultiple:!!a.multiple},i=Ce({},a,{value:void 0}),we("invalid",e);break;case"textarea":Gh(e,a),i=Su(e,a),we("invalid",e);break;default:i=a}ju(n,i);var s=i;for(r in s)if(s.hasOwnProperty(r)){var l=s[r];r==="style"?Qh(e,l):r==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Zh(e,l)):r==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Xi(e,l):typeof l=="number"&&Xi(e,""+l):r!=="suppressContentEditableWarning"&&r!=="suppressHydrationWarning"&&r!=="autoFocus"&&(Wi.hasOwnProperty(r)?l!=null&&r==="onScroll"&&we("scroll",e):l!=null&&uu(e,r,l,o))}switch(n){case"input":No(e),Wh(e,a,!1);break;case"textarea":No(e),qh(e);break;case"option":a.value!=null&&e.setAttribute("value",""+zn(a.value));break;case"select":e.multiple=!!a.multiple,r=a.value,r!=null?La(e,!!a.multiple,r,!1):a.defaultValue!=null&&La(e,!!a.multiple,a.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=qo)}eg(n,a)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)ey(e,t,e.memoizedProps,a);else{if(typeof a!="string"&&t.stateNode===null)throw Error(L(166));n=ha(Sr.current),ha(qt.current),ms(t)?(a=t.stateNode,n=t.memoizedProps,a[Dn]=t,a.nodeValue!==n&&(t.flags|=4)):(a=(n.nodeType===9?n:n.ownerDocument).createTextNode(a),a[Dn]=t,t.stateNode=a)}return null;case 13:return xe(Pe),a=t.memoizedState,t.flags&64?(t.lanes=n,t):(a=a!==null,n=!1,e===null?t.memoizedProps.fallback!==void 0&&ms(t):n=e.memoizedState!==null,a&&!n&&t.mode&2&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||Pe.current&1?We===0&&(We=3):((We===0||We===3)&&(We=4),ot===null||!(Nr&134217727)&&!(li&134217727)||ci(ot,nt))),(a||n)&&(t.flags|=4),null);case 4:return ri(),Dc(t),e===null&&qf(t.stateNode.containerInfo),null;case 10:return bc(t),null;case 17:return ht(t.type)&&Qo(),null;case 19:if(xe(Pe),a=t.memoizedState,a===null)return null;if(r=(t.flags&64)!==0,o=a.rendering,o===null)if(r)Ar(a,!1);else{if(We!==0||e!==null&&e.flags&64)for(e=t.child;e!==null;){if(o=ds(e),o!==null){for(t.flags|=64,Ar(a,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),a.lastEffect===null&&(t.firstEffect=null),t.lastEffect=a.lastEffect,a=n,n=t.child;n!==null;)r=n,e=a,r.flags&=2,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null,o=r.alternate,o===null?(r.childLanes=0,r.lanes=e,r.child=null,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=o.childLanes,r.lanes=o.lanes,r.child=o.child,r.memoizedProps=o.memoizedProps,r.memoizedState=o.memoizedState,r.updateQueue=o.updateQueue,r.type=o.type,e=o.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Te(Pe,Pe.current&1|2),t.child}e=e.sibling}a.tail!==null&&et()>Gc&&(t.flags|=64,r=!0,Ar(a,!1),t.lanes=33554432)}else{if(!r)if(e=ds(o),e!==null){if(t.flags|=64,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ar(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!Jt)return t=t.lastEffect=a.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*et()-a.renderingStartTime>Gc&&n!==1073741824&&(t.flags|=64,r=!0,Ar(a,!1),t.lanes=33554432);a.isBackwards?(o.sibling=t.child,t.child=o):(n=a.last,n!==null?n.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(n=a.tail,a.rendering=n,a.tail=n.sibling,a.lastEffect=t.lastEffect,a.renderingStartTime=et(),n.sibling=null,t=Pe.current,Te(Pe,r?t&1|2:t&1),n):null;case 23:case 24:return Qc(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&a.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error(L(156,t.tag))}function QS(e){switch(e.tag){case 1:ht(e.type)&&Qo();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(ri(),xe(pt),xe(Qe),Cc(),t=e.flags,t&64)throw Error(L(285));return e.flags=t&-4097|64,e;case 5:return xc(e),null;case 13:return xe(Pe),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return xe(Pe),null;case 4:return ri(),null;case 10:return bc(e),null;case 23:case 24:return Qc(),null;default:return null}}function Oc(e,t){try{var n="",a=t;do n+=NE(a),a=a.return;while(a);var i=n}catch(r){i=`
|
|
37
|
+
`+i[o].replace(" at new "," at ");while(1<=o&&0<=s);break}}}finally{ku=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Zi(e):""}function NE(e){switch(e.tag){case 5:return Zi(e.type);case 16:return Zi("Lazy");case 13:return Zi("Suspense");case 19:return Zi("SuspenseList");case 0:case 2:case 15:return e=Ao(e.type,!1),e;case 11:return e=Ao(e.type.render,!1),e;case 22:return e=Ao(e.type._render,!1),e;case 1:return e=Ao(e.type,!0),e;default:return""}}function Ua(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Pn:return"Fragment";case sa:return"Portal";case Ki:return"Profiler";case cu:return"StrictMode";case qi:return"Suspense";case Po:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case mu:return(e.displayName||"Context")+".Consumer";case du:return(e._context.displayName||"Context")+".Provider";case To:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case zo:return Ua(e.type);case hu:return Ua(e._render);case pu:t=e._payload,e=e._init;try{return Ua(e(t))}catch{}}return null}function zn(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Yh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function IE(e){var t=Yh(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),a=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,r=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){a=""+o,r.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(o){a=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function No(e){e._valueTracker||(e._valueTracker=IE(e))}function Bh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=Yh(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function Io(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function vu(e,t){var n=t.checked;return Ce({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Vh(e,t){var n=t.defaultValue==null?"":t.defaultValue,a=t.checked!=null?t.checked:t.defaultChecked;n=zn(t.value!=null?t.value:n),e._wrapperState={initialChecked:a,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Hh(e,t){t=t.checked,t!=null&&uu(e,"checked",t,!1)}function wu(e,t){Hh(e,t);var n=zn(t.value),a=t.type;if(n!=null)a==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(a==="submit"||a==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?xu(e,t.type,n):t.hasOwnProperty("defaultValue")&&xu(e,t.type,zn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Wh(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var a=t.type;if(!(a!=="submit"&&a!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function xu(e,t,n){(t!=="number"||Io(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ME(e){var t="";return jo.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function Eu(e,t){return e=Ce({children:void 0},t),(t=ME(t.children))&&(e.children=t),e}function La(e,t,n,a){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&a&&(e[n].defaultSelected=!0)}else{for(n=""+zn(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,a&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Su(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(L(91));return Ce({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Gh(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(L(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(L(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:zn(n)}}function Kh(e,t){var n=zn(t.value),a=zn(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),a!=null&&(e.defaultValue=""+a)}function qh(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var Cu={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function Jh(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function $u(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Jh(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Mo,Zh=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,a,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,a,i)})}:e}(function(e,t){if(e.namespaceURI!==Cu.svg||"innerHTML"in e)e.innerHTML=t;else{for(Mo=Mo||document.createElement("div"),Mo.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Mo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Xi(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Qi={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},FE=["Webkit","ms","Moz","O"];Object.keys(Qi).forEach(function(e){FE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Qi[t]=Qi[e]})});function Xh(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Qi.hasOwnProperty(e)&&Qi[e]?(""+t).trim():t+"px"}function Qh(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var a=n.indexOf("--")===0,i=Xh(n,t[n],a);n==="float"&&(n="cssFloat"),a?e.setProperty(n,i):e[n]=i}}var DE=Ce({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ju(e,t){if(t){if(DE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(L(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(L(60));if(!(typeof t.dangerouslySetInnerHTML=="object"&&"__html"in t.dangerouslySetInnerHTML))throw Error(L(61))}if(t.style!=null&&typeof t.style!="object")throw Error(L(62))}}function Tu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Pu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zu=null,Ya=null,Ba=null;function ef(e){if(e=br(e)){if(typeof zu!="function")throw Error(L(280));var t=e.stateNode;t&&(t=Xo(t),zu(e.stateNode,e.type,t))}}function tf(e){Ya?Ba?Ba.push(e):Ba=[e]:Ya=e}function nf(){if(Ya){var e=Ya,t=Ba;if(Ba=Ya=null,ef(e),t)for(e=0;e<t.length;e++)ef(t[e])}}function Au(e,t){return e(t)}function af(e,t,n,a,i){return e(t,n,a,i)}function Nu(){}var rf=Au,la=!1,Iu=!1;function Mu(){(Ya!==null||Ba!==null)&&(Nu(),nf())}function OE(e,t,n){if(Iu)return e(t,n);Iu=!0;try{return rf(e,t,n)}finally{Iu=!1,Mu()}}function er(e,t){var n=e.stateNode;if(n===null)return null;var a=Xo(n);if(a===null)return null;n=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(L(231,t,typeof n));return n}var Fu=!1;if(cn)try{var tr={};Object.defineProperty(tr,"passive",{get:function(){Fu=!0}}),window.addEventListener("test",tr,tr),window.removeEventListener("test",tr,tr)}catch{Fu=!1}function _E(e,t,n,a,i,r,o,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(m){this.onError(m)}}var nr=!1,Fo=null,Do=!1,Du=null,RE={onError:function(e){nr=!0,Fo=e}};function UE(e,t,n,a,i,r,o,s,l){nr=!1,Fo=null,_E.apply(RE,arguments)}function LE(e,t,n,a,i,r,o,s,l){if(UE.apply(this,arguments),nr){if(nr){var c=Fo;nr=!1,Fo=null}else throw Error(L(198));Do||(Do=!0,Du=c)}}function ua(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&1026&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function of(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function sf(e){if(ua(e)!==e)throw Error(L(188))}function YE(e){var t=e.alternate;if(!t){if(t=ua(e),t===null)throw Error(L(188));return t!==e?null:e}for(var n=e,a=t;;){var i=n.return;if(i===null)break;var r=i.alternate;if(r===null){if(a=i.return,a!==null){n=a;continue}break}if(i.child===r.child){for(r=i.child;r;){if(r===n)return sf(i),e;if(r===a)return sf(i),t;r=r.sibling}throw Error(L(188))}if(n.return!==a.return)n=i,a=r;else{for(var o=!1,s=i.child;s;){if(s===n){o=!0,n=i,a=r;break}if(s===a){o=!0,a=i,n=r;break}s=s.sibling}if(!o){for(s=r.child;s;){if(s===n){o=!0,n=r,a=i;break}if(s===a){o=!0,a=r,n=i;break}s=s.sibling}if(!o)throw Error(L(189))}}if(n.alternate!==a)throw Error(L(190))}if(n.tag!==3)throw Error(L(188));return n.stateNode.current===n?e:t}function lf(e){if(e=YE(e),!e)return null;for(var t=e;;){if(t.tag===5||t.tag===6)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function uf(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var cf,Ou,df,mf,_u=!1,Gt=[],An=null,Nn=null,In=null,ar=new Map,ir=new Map,rr=[],pf="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ru(e,t,n,a,i){return{blockedOn:e,domEventName:t,eventSystemFlags:n|16,nativeEvent:i,targetContainers:[a]}}function hf(e,t){switch(e){case"focusin":case"focusout":An=null;break;case"dragenter":case"dragleave":Nn=null;break;case"mouseover":case"mouseout":In=null;break;case"pointerover":case"pointerout":ar.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ir.delete(t.pointerId)}}function or(e,t,n,a,i,r){return e===null||e.nativeEvent!==r?(e=Ru(t,n,a,i,r),t!==null&&(t=br(t),t!==null&&Ou(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function BE(e,t,n,a,i){switch(t){case"focusin":return An=or(An,e,t,n,a,i),!0;case"dragenter":return Nn=or(Nn,e,t,n,a,i),!0;case"mouseover":return In=or(In,e,t,n,a,i),!0;case"pointerover":var r=i.pointerId;return ar.set(r,or(ar.get(r)||null,e,t,n,a,i)),!0;case"gotpointercapture":return r=i.pointerId,ir.set(r,or(ir.get(r)||null,e,t,n,a,i)),!0}return!1}function VE(e){var t=ca(e.target);if(t!==null){var n=ua(t);if(n!==null){if(t=n.tag,t===13){if(t=of(n),t!==null){e.blockedOn=t,mf(e.lanePriority,function(){Le.unstable_runWithPriority(e.priority,function(){df(n)})});return}}else if(t===3&&n.stateNode.hydrate){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Oo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Hu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=br(n),t!==null&&Ou(t),e.blockedOn=n,!1;t.shift()}return!0}function ff(e,t,n){Oo(e)&&n.delete(t)}function HE(){for(_u=!1;0<Gt.length;){var e=Gt[0];if(e.blockedOn!==null){e=br(e.blockedOn),e!==null&&cf(e);break}for(var t=e.targetContainers;0<t.length;){var n=Hu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null){e.blockedOn=n;break}t.shift()}e.blockedOn===null&&Gt.shift()}An!==null&&Oo(An)&&(An=null),Nn!==null&&Oo(Nn)&&(Nn=null),In!==null&&Oo(In)&&(In=null),ar.forEach(ff),ir.forEach(ff)}function sr(e,t){e.blockedOn===t&&(e.blockedOn=null,_u||(_u=!0,Le.unstable_scheduleCallback(Le.unstable_NormalPriority,HE)))}function gf(e){function t(i){return sr(i,e)}if(0<Gt.length){sr(Gt[0],e);for(var n=1;n<Gt.length;n++){var a=Gt[n];a.blockedOn===e&&(a.blockedOn=null)}}for(An!==null&&sr(An,e),Nn!==null&&sr(Nn,e),In!==null&&sr(In,e),ar.forEach(t),ir.forEach(t),n=0;n<rr.length;n++)a=rr[n],a.blockedOn===e&&(a.blockedOn=null);for(;0<rr.length&&(n=rr[0],n.blockedOn===null);)VE(n),n.blockedOn===null&&rr.shift()}function _o(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Va={animationend:_o("Animation","AnimationEnd"),animationiteration:_o("Animation","AnimationIteration"),animationstart:_o("Animation","AnimationStart"),transitionend:_o("Transition","TransitionEnd")},Uu={},yf={};cn&&(yf=document.createElement("div").style,"AnimationEvent"in window||(delete Va.animationend.animation,delete Va.animationiteration.animation,delete Va.animationstart.animation),"TransitionEvent"in window||delete Va.transitionend.transition);function Ro(e){if(Uu[e])return Uu[e];if(!Va[e])return e;var t=Va[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in yf)return Uu[e]=t[n];return e}var bf=Ro("animationend"),kf=Ro("animationiteration"),vf=Ro("animationstart"),wf=Ro("transitionend"),xf=new Map,Lu=new Map,WE=["abort","abort",bf,"animationEnd",kf,"animationIteration",vf,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",wf,"transitionEnd","waiting","waiting"];function Yu(e,t){for(var n=0;n<e.length;n+=2){var a=e[n],i=e[n+1];i="on"+(i[0].toUpperCase()+i.slice(1)),Lu.set(a,t),xf.set(a,i),ra(i,[a])}}var GE=Le.unstable_now;GE();var be=8;function Ha(e){if(1&e)return be=15,1;if(2&e)return be=14,2;if(4&e)return be=13,4;var t=24&e;return t!==0?(be=12,t):e&32?(be=11,32):(t=192&e,t!==0?(be=10,t):e&256?(be=9,256):(t=3584&e,t!==0?(be=8,t):e&4096?(be=7,4096):(t=4186112&e,t!==0?(be=6,t):(t=62914560&e,t!==0?(be=5,t):e&67108864?(be=4,67108864):e&134217728?(be=3,134217728):(t=805306368&e,t!==0?(be=2,t):1073741824&e?(be=1,1073741824):(be=8,e))))))}function KE(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function qE(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(L(358,e))}}function lr(e,t){var n=e.pendingLanes;if(n===0)return be=0;var a=0,i=0,r=e.expiredLanes,o=e.suspendedLanes,s=e.pingedLanes;if(r!==0)a=r,i=be=15;else if(r=n&134217727,r!==0){var l=r&~o;l!==0?(a=Ha(l),i=be):(s&=r,s!==0&&(a=Ha(s),i=be))}else r=n&~o,r!==0?(a=Ha(r),i=be):s!==0&&(a=Ha(s),i=be);if(a===0)return 0;if(a=31-Mn(a),a=n&((0>a?0:1<<a)<<1)-1,t!==0&&t!==a&&!(t&o)){if(Ha(t),i<=be)return t;be=i}if(t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=a;0<t;)n=31-Mn(t),i=1<<n,a|=e[n],t&=~i;return a}function Ef(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Uo(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=Wa(24&~t),e===0?Uo(10,t):e;case 10:return e=Wa(192&~t),e===0?Uo(8,t):e;case 8:return e=Wa(3584&~t),e===0&&(e=Wa(4186112&~t),e===0&&(e=512)),e;case 2:return t=Wa(805306368&~t),t===0&&(t=268435456),t}throw Error(L(358,e))}function Wa(e){return e&-e}function Bu(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Lo(e,t,n){e.pendingLanes|=t;var a=t-1;e.suspendedLanes&=a,e.pingedLanes&=a,e=e.eventTimes,t=31-Mn(t),e[t]=n}var Mn=Math.clz32?Math.clz32:XE,JE=Math.log,ZE=Math.LN2;function XE(e){return e===0?32:31-(JE(e)/ZE|0)|0}var QE=Le.unstable_UserBlockingPriority,eS=Le.unstable_runWithPriority,Yo=!0;function tS(e,t,n,a){la||Nu();var i=Vu,r=la;la=!0;try{af(i,e,t,n,a)}finally{(la=r)||Mu()}}function nS(e,t,n,a){eS(QE,Vu.bind(null,e,t,n,a))}function Vu(e,t,n,a){if(Yo){var i;if((i=(t&4)===0)&&0<Gt.length&&-1<pf.indexOf(e))e=Ru(null,e,t,n,a),Gt.push(e);else{var r=Hu(e,t,n,a);if(r===null)i&&hf(e,a);else{if(i){if(-1<pf.indexOf(e)){e=Ru(r,e,t,n,a),Gt.push(e);return}if(BE(r,e,t,n,a))return;hf(e,a)}Xf(e,t,a,null,n)}}}}function Hu(e,t,n,a){var i=Pu(a);if(i=ca(i),i!==null){var r=ua(i);if(r===null)i=null;else{var o=r.tag;if(o===13){if(i=of(r),i!==null)return i;i=null}else if(o===3){if(r.stateNode.hydrate)return r.tag===3?r.stateNode.containerInfo:null;i=null}else r!==i&&(i=null)}}return Xf(e,t,a,i,n),null}var Fn=null,Wu=null,Bo=null;function Sf(){if(Bo)return Bo;var e,t=Wu,n=t.length,a,i="value"in Fn?Fn.value:Fn.textContent,r=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(a=1;a<=o&&t[n-a]===i[r-a];a++);return Bo=i.slice(e,1<a?1-a:void 0)}function Vo(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ho(){return!0}function Cf(){return!1}function vt(e){function t(n,a,i,r,o){this._reactName=n,this._targetInst=i,this.type=a,this.nativeEvent=r,this.target=o,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(r):r[s]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?Ho:Cf,this.isPropagationStopped=Cf,this}return Ce(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ho)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ho)},persist:function(){},isPersistent:Ho}),t}var Ga={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Gu=vt(Ga),ur=Ce({},Ga,{view:0,detail:0}),aS=vt(ur),Ku,qu,cr,Wo=Ce({},ur,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==cr&&(cr&&e.type==="mousemove"?(Ku=e.screenX-cr.screenX,qu=e.screenY-cr.screenY):qu=Ku=0,cr=e),Ku)},movementY:function(e){return"movementY"in e?e.movementY:qu}}),$f=vt(Wo),iS=Ce({},Wo,{dataTransfer:0}),rS=vt(iS),oS=Ce({},ur,{relatedTarget:0}),Ju=vt(oS),sS=Ce({},Ga,{animationName:0,elapsedTime:0,pseudoElement:0}),lS=vt(sS),uS=Ce({},Ga,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),cS=vt(uS),dS=Ce({},Ga,{data:0}),jf=vt(dS),mS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pS={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},hS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=hS[e])?!!t[e]:!1}function Zu(){return fS}var gS=Ce({},ur,{key:function(e){if(e.key){var t=mS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Vo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?pS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zu,charCode:function(e){return e.type==="keypress"?Vo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Vo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),yS=vt(gS),bS=Ce({},Wo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Tf=vt(bS),kS=Ce({},ur,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zu}),vS=vt(kS),wS=Ce({},Ga,{propertyName:0,elapsedTime:0,pseudoElement:0}),xS=vt(wS),ES=Ce({},Wo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),SS=vt(ES),CS=[9,13,27,32],Xu=cn&&"CompositionEvent"in window,dr=null;cn&&"documentMode"in document&&(dr=document.documentMode);var $S=cn&&"TextEvent"in window&&!dr,Pf=cn&&(!Xu||dr&&8<dr&&11>=dr),zf=" ",Af=!1;function Nf(e,t){switch(e){case"keyup":return CS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function If(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ka=!1;function jS(e,t){switch(e){case"compositionend":return If(t);case"keypress":return t.which!==32?null:(Af=!0,zf);case"textInput":return e=t.data,e===zf&&Af?null:e;default:return null}}function TS(e,t){if(Ka)return e==="compositionend"||!Xu&&Nf(e,t)?(e=Sf(),Bo=Wu=Fn=null,Ka=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Pf&&t.locale!=="ko"?null:t.data;default:return null}}var PS={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Mf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!PS[e.type]:t==="textarea"}function Ff(e,t,n,a){tf(a),t=Ko(t,"onChange"),0<t.length&&(n=new Gu("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var mr=null,pr=null;function zS(e){Gf(e,0)}function Go(e){var t=Qa(e);if(Bh(t))return e}function AS(e,t){if(e==="change")return t}var Df=!1;if(cn){var Qu;if(cn){var ec="oninput"in document;if(!ec){var Of=document.createElement("div");Of.setAttribute("oninput","return;"),ec=typeof Of.oninput=="function"}Qu=ec}else Qu=!1;Df=Qu&&(!document.documentMode||9<document.documentMode)}function _f(){mr&&(mr.detachEvent("onpropertychange",Rf),pr=mr=null)}function Rf(e){if(e.propertyName==="value"&&Go(pr)){var t=[];if(Ff(t,pr,e,Pu(e)),e=zS,la)e(t);else{la=!0;try{Au(e,t)}finally{la=!1,Mu()}}}}function NS(e,t,n){e==="focusin"?(_f(),mr=t,pr=n,mr.attachEvent("onpropertychange",Rf)):e==="focusout"&&_f()}function IS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Go(pr)}function MS(e,t){if(e==="click")return Go(t)}function FS(e,t){if(e==="input"||e==="change")return Go(t)}function DS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var jt=typeof Object.is=="function"?Object.is:DS,OS=Object.prototype.hasOwnProperty;function hr(e,t){if(jt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++)if(!OS.call(t,n[a])||!jt(e[n[a]],t[n[a]]))return!1;return!0}function Uf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Lf(e,t){var n=Uf(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Uf(n)}}function Yf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Yf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Bf(){for(var e=window,t=Io();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Io(e.document)}return t}function tc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var _S=cn&&"documentMode"in document&&11>=document.documentMode,qa=null,nc=null,fr=null,ac=!1;function Vf(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ac||qa==null||qa!==Io(a)||(a=qa,"selectionStart"in a&&tc(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),fr&&hr(fr,a)||(fr=a,a=Ko(nc,"onSelect"),0<a.length&&(t=new Gu("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=qa)))}Yu("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Yu("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Yu(WE,2);for(var Hf="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),ic=0;ic<Hf.length;ic++)Lu.set(Hf[ic],0);Ra("onMouseEnter",["mouseout","mouseover"]),Ra("onMouseLeave",["mouseout","mouseover"]),Ra("onPointerEnter",["pointerout","pointerover"]),Ra("onPointerLeave",["pointerout","pointerover"]),ra("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ra("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ra("onBeforeInput",["compositionend","keypress","textInput","paste"]),ra("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ra("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ra("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var gr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),RS=new Set("cancel close invalid load scroll toggle".split(" ").concat(gr));function Wf(e,t,n){var a=e.type||"unknown-event";e.currentTarget=n,LE(a,t,void 0,e),e.currentTarget=null}function Gf(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],i=a.event;a=a.listeners;e:{var r=void 0;if(t)for(var o=a.length-1;0<=o;o--){var s=a[o],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==r&&i.isPropagationStopped())break e;Wf(i,s,c),r=l}else for(o=0;o<a.length;o++){if(s=a[o],l=s.instance,c=s.currentTarget,s=s.listener,l!==r&&i.isPropagationStopped())break e;Wf(i,s,c),r=l}}}if(Do)throw e=Du,Do=!1,Du=null,e}function we(e,t){var n=ig(t),a=e+"__bubble";n.has(a)||(Zf(t,e,2,!1),n.add(a))}var Kf="_reactListening"+Math.random().toString(36).slice(2);function qf(e){e[Kf]||(e[Kf]=!0,Dh.forEach(function(t){RS.has(t)||Jf(t,!1,e,null),Jf(t,!0,e,null)}))}function Jf(e,t,n,a){var i=4<arguments.length&&arguments[4]!==void 0?arguments[4]:0,r=n;e==="selectionchange"&&n.nodeType!==9&&(r=n.ownerDocument);var o=ig(r),s=e+"__"+(t?"capture":"bubble");o.has(s)||(t&&(i|=4),Zf(r,e,i,t),o.add(s))}function Zf(e,t,n,a){var i=Lu.get(t);switch(i===void 0?2:i){case 0:i=tS;break;case 1:i=nS;break;default:i=Vu}n=i.bind(null,t,n,e),i=void 0,!Fu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),a?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Xf(e,t,n,a,i){var r=a;if(!(t&1)&&!(t&2)&&a!==null)e:for(;;){if(a===null)return;var o=a.tag;if(o===3||o===4){var s=a.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=a.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;s!==null;){if(o=ca(s),o===null)return;if(l=o.tag,l===5||l===6){a=r=o;continue e}s=s.parentNode}}a=a.return}OE(function(){var c=r,m=Pu(n),f=[];e:{var p=xf.get(e);if(p!==void 0){var y=Gu,k=e;switch(e){case"keypress":if(Vo(n)===0)break e;case"keydown":case"keyup":y=yS;break;case"focusin":k="focus",y=Ju;break;case"focusout":k="blur",y=Ju;break;case"beforeblur":case"afterblur":y=Ju;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":y=$f;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=rS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=vS;break;case bf:case kf:case vf:y=lS;break;case wf:y=xS;break;case"scroll":y=aS;break;case"wheel":y=SS;break;case"copy":case"cut":case"paste":y=cS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=Tf}var S=(t&4)!==0,b=!S&&e==="scroll",w=S?p!==null?p+"Capture":null:p;S=[];for(var E=c,P;E!==null;){P=E;var j=P.stateNode;if(P.tag===5&&j!==null&&(P=j,w!==null&&(j=er(E,w),j!=null&&S.push(yr(E,j,P)))),b)break;E=E.return}0<S.length&&(p=new y(p,k,null,n,m),f.push({event:p,listeners:S}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",p&&!(t&16)&&(k=n.relatedTarget||n.fromElement)&&(ca(k)||k[Xa]))break e;if((y||p)&&(p=m.window===m?m:(p=m.ownerDocument)?p.defaultView||p.parentWindow:window,y?(k=n.relatedTarget||n.toElement,y=c,k=k?ca(k):null,k!==null&&(b=ua(k),k!==b||k.tag!==5&&k.tag!==6)&&(k=null)):(y=null,k=c),y!==k)){if(S=$f,j="onMouseLeave",w="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(S=Tf,j="onPointerLeave",w="onPointerEnter",E="pointer"),b=y==null?p:Qa(y),P=k==null?p:Qa(k),p=new S(j,E+"leave",y,n,m),p.target=b,p.relatedTarget=P,j=null,ca(m)===c&&(S=new S(w,E+"enter",k,n,m),S.target=P,S.relatedTarget=b,j=S),b=j,y&&k)t:{for(S=y,w=k,E=0,P=S;P;P=Ja(P))E++;for(P=0,j=w;j;j=Ja(j))P++;for(;0<E-P;)S=Ja(S),E--;for(;0<P-E;)w=Ja(w),P--;for(;E--;){if(S===w||w!==null&&S===w.alternate)break t;S=Ja(S),w=Ja(w)}S=null}else S=null;y!==null&&Qf(f,p,y,S,!1),k!==null&&b!==null&&Qf(f,b,k,S,!0)}}e:{if(p=c?Qa(c):window,y=p.nodeName&&p.nodeName.toLowerCase(),y==="select"||y==="input"&&p.type==="file")var F=AS;else if(Mf(p))if(Df)F=FS;else{F=IS;var z=NS}else(y=p.nodeName)&&y.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(F=MS);if(F&&(F=F(e,c))){Ff(f,F,n,m);break e}z&&z(e,p,c),e==="focusout"&&(z=p._wrapperState)&&z.controlled&&p.type==="number"&&xu(p,"number",p.value)}switch(z=c?Qa(c):window,e){case"focusin":(Mf(z)||z.contentEditable==="true")&&(qa=z,nc=c,fr=null);break;case"focusout":fr=nc=qa=null;break;case"mousedown":ac=!0;break;case"contextmenu":case"mouseup":case"dragend":ac=!1,Vf(f,n,m);break;case"selectionchange":if(_S)break;case"keydown":case"keyup":Vf(f,n,m)}var R;if(Xu)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else Ka?Nf(e,n)&&(_="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(_="onCompositionStart");_&&(Pf&&n.locale!=="ko"&&(Ka||_!=="onCompositionStart"?_==="onCompositionEnd"&&Ka&&(R=Sf()):(Fn=m,Wu="value"in Fn?Fn.value:Fn.textContent,Ka=!0)),z=Ko(c,_),0<z.length&&(_=new jf(_,e,null,n,m),f.push({event:_,listeners:z}),R?_.data=R:(R=If(n),R!==null&&(_.data=R)))),(R=$S?jS(e,n):TS(e,n))&&(c=Ko(c,"onBeforeInput"),0<c.length&&(m=new jf("onBeforeInput","beforeinput",null,n,m),f.push({event:m,listeners:c}),m.data=R))}Gf(f,t)})}function yr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ko(e,t){for(var n=t+"Capture",a=[];e!==null;){var i=e,r=i.stateNode;i.tag===5&&r!==null&&(i=r,r=er(e,n),r!=null&&a.unshift(yr(e,r,i)),r=er(e,t),r!=null&&a.push(yr(e,r,i))),e=e.return}return a}function Ja(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Qf(e,t,n,a,i){for(var r=t._reactName,o=[];n!==null&&n!==a;){var s=n,l=s.alternate,c=s.stateNode;if(l!==null&&l===a)break;s.tag===5&&c!==null&&(s=c,i?(l=er(n,r),l!=null&&o.unshift(yr(n,l,s))):i||(l=er(n,r),l!=null&&o.push(yr(n,l,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}function qo(){}var rc=null,oc=null;function eg(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function sc(e,t){return e==="textarea"||e==="option"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var tg=typeof setTimeout=="function"?setTimeout:void 0,US=typeof clearTimeout=="function"?clearTimeout:void 0;function lc(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function Za(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function ng(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var uc=0;function LS(e){return{$$typeof:fu,toString:e,valueOf:e}}var Jo=Math.random().toString(36).slice(2),Dn="__reactFiber$"+Jo,Zo="__reactProps$"+Jo,Xa="__reactContainer$"+Jo,ag="__reactEvents$"+Jo;function ca(e){var t=e[Dn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Xa]||n[Dn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ng(e);e!==null;){if(n=e[Dn])return n;e=ng(e)}return t}e=n,n=e.parentNode}return null}function br(e){return e=e[Dn]||e[Xa],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Qa(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(L(33))}function Xo(e){return e[Zo]||null}function ig(e){var t=e[ag];return t===void 0&&(t=e[ag]=new Set),t}var cc=[],ei=-1;function On(e){return{current:e}}function xe(e){0>ei||(e.current=cc[ei],cc[ei]=null,ei--)}function Te(e,t){ei++,cc[ei]=e.current,e.current=t}var _n={},Qe=On(_n),pt=On(!1),da=_n;function ti(e,t){var n=e.type.contextTypes;if(!n)return _n;var a=e.stateNode;if(a&&a.__reactInternalMemoizedUnmaskedChildContext===t)return a.__reactInternalMemoizedMaskedChildContext;var i={},r;for(r in n)i[r]=t[r];return a&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ht(e){return e=e.childContextTypes,e!=null}function Qo(){xe(pt),xe(Qe)}function rg(e,t,n){if(Qe.current!==_n)throw Error(L(168));Te(Qe,t),Te(pt,n)}function og(e,t,n){var a=e.stateNode;if(e=t.childContextTypes,typeof a.getChildContext!="function")return n;a=a.getChildContext();for(var i in a)if(!(i in e))throw Error(L(108,Ua(t)||"Unknown",i));return Ce({},n,a)}function es(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||_n,da=Qe.current,Te(Qe,e),Te(pt,pt.current),!0}function sg(e,t,n){var a=e.stateNode;if(!a)throw Error(L(169));n?(e=og(e,t,da),a.__reactInternalMemoizedMergedChildContext=e,xe(pt),xe(Qe),Te(Qe,e)):xe(pt),Te(pt,n)}var dc=null,ma=null,YS=Le.unstable_runWithPriority,mc=Le.unstable_scheduleCallback,pc=Le.unstable_cancelCallback,BS=Le.unstable_shouldYield,lg=Le.unstable_requestPaint,hc=Le.unstable_now,VS=Le.unstable_getCurrentPriorityLevel,ts=Le.unstable_ImmediatePriority,ug=Le.unstable_UserBlockingPriority,cg=Le.unstable_NormalPriority,dg=Le.unstable_LowPriority,mg=Le.unstable_IdlePriority,fc={},HS=lg!==void 0?lg:function(){},dn=null,ns=null,gc=!1,pg=hc(),et=1e4>pg?hc:function(){return hc()-pg};function ni(){switch(VS()){case ts:return 99;case ug:return 98;case cg:return 97;case dg:return 96;case mg:return 95;default:throw Error(L(332))}}function hg(e){switch(e){case 99:return ts;case 98:return ug;case 97:return cg;case 96:return dg;case 95:return mg;default:throw Error(L(332))}}function pa(e,t){return e=hg(e),YS(e,t)}function kr(e,t,n){return e=hg(e),mc(e,t,n)}function Kt(){if(ns!==null){var e=ns;ns=null,pc(e)}fg()}function fg(){if(!gc&&dn!==null){gc=!0;var e=0;try{var t=dn;pa(99,function(){for(;e<t.length;e++){var n=t[e];do n=n(!0);while(n!==null)}}),dn=null}catch(n){throw dn!==null&&(dn=dn.slice(e+1)),mc(ts,Kt),n}finally{gc=!1}}}var WS=oa.ReactCurrentBatchConfig;function Rt(e,t){if(e&&e.defaultProps){t=Ce({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var as=On(null),is=null,ai=null,rs=null;function yc(){rs=ai=is=null}function bc(e){var t=as.current;xe(as),e.type._context._currentValue=t}function gg(e,t){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)===t){if(n===null||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,n!==null&&(n.childLanes|=t);e=e.return}}function ii(e,t){is=e,rs=ai=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ut=!0),e.firstContext=null)}function Tt(e,t){if(rs!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(rs=e,t=1073741823),t={context:e,observedBits:t,next:null},ai===null){if(is===null)throw Error(L(308));ai=t,is.dependencies={lanes:0,firstContext:t,responders:null}}else ai=ai.next=t;return e._currentValue}var Rn=!1;function kc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function yg(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Un(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ln(e,t){if(e=e.updateQueue,e!==null){e=e.shared;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function bg(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var i=null,r=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};r===null?i=r=o:r=r.next=o,n=n.next}while(n!==null);r===null?i=r=t:r=r.next=t}else i=r=t;n={baseState:a.baseState,firstBaseUpdate:i,lastBaseUpdate:r,shared:a.shared,effects:a.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function vr(e,t,n,a){var i=e.updateQueue;Rn=!1;var r=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,c=l.next;l.next=null,o===null?r=c:o.next=c,o=l;var m=e.alternate;if(m!==null){m=m.updateQueue;var f=m.lastBaseUpdate;f!==o&&(f===null?m.firstBaseUpdate=c:f.next=c,m.lastBaseUpdate=l)}}if(r!==null){f=i.baseState,o=0,m=c=l=null;do{s=r.lane;var p=r.eventTime;if((a&s)===s){m!==null&&(m=m.next={eventTime:p,lane:0,tag:r.tag,payload:r.payload,callback:r.callback,next:null});e:{var y=e,k=r;switch(s=t,p=n,k.tag){case 1:if(y=k.payload,typeof y=="function"){f=y.call(p,f,s);break e}f=y;break e;case 3:y.flags=y.flags&-4097|64;case 0:if(y=k.payload,s=typeof y=="function"?y.call(p,f,s):y,s==null)break e;f=Ce({},f,s);break e;case 2:Rn=!0}}r.callback!==null&&(e.flags|=32,s=i.effects,s===null?i.effects=[r]:s.push(r))}else p={eventTime:p,lane:s,tag:r.tag,payload:r.payload,callback:r.callback,next:null},m===null?(c=m=p,l=f):m=m.next=p,o|=s;if(r=r.next,r===null){if(s=i.shared.pending,s===null)break;r=s.next,s.next=null,i.lastBaseUpdate=s,i.shared.pending=null}}while(!0);m===null&&(l=f),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=m,Nr|=o,e.lanes=o,e.memoizedState=f}}function kg(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var a=e[t],i=a.callback;if(i!==null){if(a.callback=null,a=n,typeof i!="function")throw Error(L(191,i));i.call(a)}}}var vg=new jo.Component().refs;function os(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:Ce({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ss={isMounted:function(e){return(e=e._reactInternals)?ua(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var a=wt(),i=Vn(e),r=Un(a,i);r.payload=t,n!=null&&(r.callback=n),Ln(e,r),Hn(e,i,a)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=wt(),i=Vn(e),r=Un(a,i);r.tag=1,r.payload=t,n!=null&&(r.callback=n),Ln(e,r),Hn(e,i,a)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=wt(),a=Vn(e),i=Un(n,a);i.tag=2,t!=null&&(i.callback=t),Ln(e,i),Hn(e,a,n)}};function wg(e,t,n,a,i,r,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,r,o):t.prototype&&t.prototype.isPureReactComponent?!hr(n,a)||!hr(i,r):!0}function xg(e,t,n){var a=!1,i=_n,r=t.contextType;return typeof r=="object"&&r!==null?r=Tt(r):(i=ht(t)?da:Qe.current,a=t.contextTypes,r=(a=a!=null)?ti(e,i):_n),t=new t(n,r),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ss,e.stateNode=t,t._reactInternals=e,a&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=r),t}function Eg(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&ss.enqueueReplaceState(t,t.state,null)}function vc(e,t,n,a){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=vg,kc(e);var r=t.contextType;typeof r=="object"&&r!==null?i.context=Tt(r):(r=ht(t)?da:Qe.current,i.context=ti(e,r)),vr(e,n,i,a),i.state=e.memoizedState,r=t.getDerivedStateFromProps,typeof r=="function"&&(os(e,t,r,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&ss.enqueueReplaceState(i,i.state,null),vr(e,n,i,a),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4)}var ls=Array.isArray;function wr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(L(309));var a=n.stateNode}if(!a)throw Error(L(147,e));var i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(r){var o=a.refs;o===vg&&(o=a.refs={}),r===null?delete o[i]:o[i]=r},t._stringRef=i,t)}if(typeof e!="string")throw Error(L(284));if(!n._owner)throw Error(L(290,e))}return e}function us(e,t){if(e.type!=="textarea")throw Error(L(31,Object.prototype.toString.call(t)==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function Sg(e){function t(b,w){if(e){var E=b.lastEffect;E!==null?(E.nextEffect=w,b.lastEffect=w):b.firstEffect=b.lastEffect=w,w.nextEffect=null,w.flags=8}}function n(b,w){if(!e)return null;for(;w!==null;)t(b,w),w=w.sibling;return null}function a(b,w){for(b=new Map;w!==null;)w.key!==null?b.set(w.key,w):b.set(w.index,w),w=w.sibling;return b}function i(b,w){return b=Kn(b,w),b.index=0,b.sibling=null,b}function r(b,w,E){return b.index=E,e?(E=b.alternate,E!==null?(E=E.index,E<w?(b.flags=2,w):E):(b.flags=2,w)):w}function o(b){return e&&b.alternate===null&&(b.flags=2),b}function s(b,w,E,P){return w===null||w.tag!==6?(w=nd(E,b.mode,P),w.return=b,w):(w=i(w,E),w.return=b,w)}function l(b,w,E,P){return w!==null&&w.elementType===E.type?(P=i(w,E.props),P.ref=wr(b,w,E),P.return=b,P):(P=js(E.type,E.key,E.props,null,b.mode,P),P.ref=wr(b,w,E),P.return=b,P)}function c(b,w,E,P){return w===null||w.tag!==4||w.stateNode.containerInfo!==E.containerInfo||w.stateNode.implementation!==E.implementation?(w=ad(E,b.mode,P),w.return=b,w):(w=i(w,E.children||[]),w.return=b,w)}function m(b,w,E,P,j){return w===null||w.tag!==7?(w=mi(E,b.mode,P,j),w.return=b,w):(w=i(w,E),w.return=b,w)}function f(b,w,E){if(typeof w=="string"||typeof w=="number")return w=nd(""+w,b.mode,E),w.return=b,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Gi:return E=js(w.type,w.key,w.props,null,b.mode,E),E.ref=wr(b,null,w),E.return=b,E;case sa:return w=ad(w,b.mode,E),w.return=b,w}if(ls(w)||Ji(w))return w=mi(w,b.mode,E,null),w.return=b,w;us(b,w)}return null}function p(b,w,E,P){var j=w!==null?w.key:null;if(typeof E=="string"||typeof E=="number")return j!==null?null:s(b,w,""+E,P);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case Gi:return E.key===j?E.type===Pn?m(b,w,E.props.children,P,j):l(b,w,E,P):null;case sa:return E.key===j?c(b,w,E,P):null}if(ls(E)||Ji(E))return j!==null?null:m(b,w,E,P,null);us(b,E)}return null}function y(b,w,E,P,j){if(typeof P=="string"||typeof P=="number")return b=b.get(E)||null,s(w,b,""+P,j);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case Gi:return b=b.get(P.key===null?E:P.key)||null,P.type===Pn?m(w,b,P.props.children,j,P.key):l(w,b,P,j);case sa:return b=b.get(P.key===null?E:P.key)||null,c(w,b,P,j)}if(ls(P)||Ji(P))return b=b.get(E)||null,m(w,b,P,j,null);us(w,P)}return null}function k(b,w,E,P){for(var j=null,F=null,z=w,R=w=0,_=null;z!==null&&R<E.length;R++){z.index>R?(_=z,z=null):_=z.sibling;var D=p(b,z,E[R],P);if(D===null){z===null&&(z=_);break}e&&z&&D.alternate===null&&t(b,z),w=r(D,w,R),F===null?j=D:F.sibling=D,F=D,z=_}if(R===E.length)return n(b,z),j;if(z===null){for(;R<E.length;R++)z=f(b,E[R],P),z!==null&&(w=r(z,w,R),F===null?j=z:F.sibling=z,F=z);return j}for(z=a(b,z);R<E.length;R++)_=y(z,b,R,E[R],P),_!==null&&(e&&_.alternate!==null&&z.delete(_.key===null?R:_.key),w=r(_,w,R),F===null?j=_:F.sibling=_,F=_);return e&&z.forEach(function(X){return t(b,X)}),j}function S(b,w,E,P){var j=Ji(E);if(typeof j!="function")throw Error(L(150));if(E=j.call(E),E==null)throw Error(L(151));for(var F=j=null,z=w,R=w=0,_=null,D=E.next();z!==null&&!D.done;R++,D=E.next()){z.index>R?(_=z,z=null):_=z.sibling;var X=p(b,z,D.value,P);if(X===null){z===null&&(z=_);break}e&&z&&X.alternate===null&&t(b,z),w=r(X,w,R),F===null?j=X:F.sibling=X,F=X,z=_}if(D.done)return n(b,z),j;if(z===null){for(;!D.done;R++,D=E.next())D=f(b,D.value,P),D!==null&&(w=r(D,w,R),F===null?j=D:F.sibling=D,F=D);return j}for(z=a(b,z);!D.done;R++,D=E.next())D=y(z,b,R,D.value,P),D!==null&&(e&&D.alternate!==null&&z.delete(D.key===null?R:D.key),w=r(D,w,R),F===null?j=D:F.sibling=D,F=D);return e&&z.forEach(function(ne){return t(b,ne)}),j}return function(b,w,E,P){var j=typeof E=="object"&&E!==null&&E.type===Pn&&E.key===null;j&&(E=E.props.children);var F=typeof E=="object"&&E!==null;if(F)switch(E.$$typeof){case Gi:e:{for(F=E.key,j=w;j!==null;){if(j.key===F){switch(j.tag){case 7:if(E.type===Pn){n(b,j.sibling),w=i(j,E.props.children),w.return=b,b=w;break e}break;default:if(j.elementType===E.type){n(b,j.sibling),w=i(j,E.props),w.ref=wr(b,j,E),w.return=b,b=w;break e}}n(b,j);break}else t(b,j);j=j.sibling}E.type===Pn?(w=mi(E.props.children,b.mode,P,E.key),w.return=b,b=w):(P=js(E.type,E.key,E.props,null,b.mode,P),P.ref=wr(b,w,E),P.return=b,b=P)}return o(b);case sa:e:{for(j=E.key;w!==null;){if(w.key===j)if(w.tag===4&&w.stateNode.containerInfo===E.containerInfo&&w.stateNode.implementation===E.implementation){n(b,w.sibling),w=i(w,E.children||[]),w.return=b,b=w;break e}else{n(b,w);break}else t(b,w);w=w.sibling}w=ad(E,b.mode,P),w.return=b,b=w}return o(b)}if(typeof E=="string"||typeof E=="number")return E=""+E,w!==null&&w.tag===6?(n(b,w.sibling),w=i(w,E),w.return=b,b=w):(n(b,w),w=nd(E,b.mode,P),w.return=b,b=w),o(b);if(ls(E))return k(b,w,E,P);if(Ji(E))return S(b,w,E,P);if(F&&us(b,E),typeof E>"u"&&!j)switch(b.tag){case 1:case 22:case 0:case 11:case 15:throw Error(L(152,Ua(b.type)||"Component"))}return n(b,w)}}var cs=Sg(!0),Cg=Sg(!1),xr={},qt=On(xr),Er=On(xr),Sr=On(xr);function ha(e){if(e===xr)throw Error(L(174));return e}function wc(e,t){switch(Te(Sr,t),Te(Er,e),Te(qt,xr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:$u(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=$u(t,e)}xe(qt),Te(qt,t)}function ri(){xe(qt),xe(Er),xe(Sr)}function $g(e){ha(Sr.current);var t=ha(qt.current),n=$u(t,e.type);t!==n&&(Te(Er,e),Te(qt,n))}function xc(e){Er.current===e&&(xe(qt),xe(Er))}var Pe=On(0);function ds(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&64)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var mn=null,Yn=null,Jt=!1;function jg(e,t){var n=At(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,e.lastEffect!==null?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Tg(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,!0):!1;case 13:return!1;default:return!1}}function Ec(e){if(Jt){var t=Yn;if(t){var n=t;if(!Tg(e,t)){if(t=Za(n.nextSibling),!t||!Tg(e,t)){e.flags=e.flags&-1025|2,Jt=!1,mn=e;return}jg(mn,n)}mn=e,Yn=Za(t.firstChild)}else e.flags=e.flags&-1025|2,Jt=!1,mn=e}}function Pg(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;mn=e}function ms(e){if(e!==mn)return!1;if(!Jt)return Pg(e),Jt=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!sc(t,e.memoizedProps))for(t=Yn;t;)jg(e,t),t=Za(t.nextSibling);if(Pg(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(L(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Yn=Za(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Yn=null}}else Yn=mn?Za(e.stateNode.nextSibling):null;return!0}function Sc(){Yn=mn=null,Jt=!1}var oi=[];function Cc(){for(var e=0;e<oi.length;e++)oi[e]._workInProgressVersionPrimary=null;oi.length=0}var Cr=oa.ReactCurrentDispatcher,Pt=oa.ReactCurrentBatchConfig,$r=0,Ae=null,tt=null,He=null,ps=!1,jr=!1;function ft(){throw Error(L(321))}function $c(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!jt(e[n],t[n]))return!1;return!0}function jc(e,t,n,a,i,r){if($r=r,Ae=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Cr.current=e===null||e.memoizedState===null?KS:qS,e=n(a,i),jr){r=0;do{if(jr=!1,!(25>r))throw Error(L(301));r+=1,He=tt=null,t.updateQueue=null,Cr.current=JS,e=n(a,i)}while(jr)}if(Cr.current=ys,t=tt!==null&&tt.next!==null,$r=0,He=tt=Ae=null,ps=!1,t)throw Error(L(300));return e}function fa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return He===null?Ae.memoizedState=He=e:He=He.next=e,He}function ga(){if(tt===null){var e=Ae.alternate;e=e!==null?e.memoizedState:null}else e=tt.next;var t=He===null?Ae.memoizedState:He.next;if(t!==null)He=t,tt=e;else{if(e===null)throw Error(L(310));tt=e,e={memoizedState:tt.memoizedState,baseState:tt.baseState,baseQueue:tt.baseQueue,queue:tt.queue,next:null},He===null?Ae.memoizedState=He=e:He=He.next=e}return He}function Zt(e,t){return typeof t=="function"?t(e):t}function Tr(e){var t=ga(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var a=tt,i=a.baseQueue,r=n.pending;if(r!==null){if(i!==null){var o=i.next;i.next=r.next,r.next=o}a.baseQueue=i=r,n.pending=null}if(i!==null){i=i.next,a=a.baseState;var s=o=r=null,l=i;do{var c=l.lane;if(($r&c)===c)s!==null&&(s=s.next={lane:0,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null}),a=l.eagerReducer===e?l.eagerState:e(a,l.action);else{var m={lane:c,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null};s===null?(o=s=m,r=a):s=s.next=m,Ae.lanes|=c,Nr|=c}l=l.next}while(l!==null&&l!==i);s===null?r=a:s.next=o,jt(a,t.memoizedState)||(Ut=!0),t.memoizedState=a,t.baseState=r,t.baseQueue=s,n.lastRenderedState=a}return[t.memoizedState,n.dispatch]}function Pr(e){var t=ga(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var a=n.dispatch,i=n.pending,r=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do r=e(r,o.action),o=o.next;while(o!==i);jt(r,t.memoizedState)||(Ut=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),n.lastRenderedState=r}return[r,a]}function zg(e,t,n){var a=t._getVersion;a=a(t._source);var i=t._workInProgressVersionPrimary;if(i!==null?e=i===a:(e=e.mutableReadLanes,(e=($r&e)===e)&&(t._workInProgressVersionPrimary=a,oi.push(t))),e)return n(t._source);throw oi.push(t),Error(L(350))}function Ag(e,t,n,a){var i=ot;if(i===null)throw Error(L(349));var r=t._getVersion,o=r(t._source),s=Cr.current,l=s.useState(function(){return zg(i,t,n)}),c=l[1],m=l[0];l=He;var f=e.memoizedState,p=f.refs,y=p.getSnapshot,k=f.source;f=f.subscribe;var S=Ae;return e.memoizedState={refs:p,source:t,subscribe:a},s.useEffect(function(){p.getSnapshot=n,p.setSnapshot=c;var b=r(t._source);if(!jt(o,b)){b=n(t._source),jt(m,b)||(c(b),b=Vn(S),i.mutableReadLanes|=b&i.pendingLanes),b=i.mutableReadLanes,i.entangledLanes|=b;for(var w=i.entanglements,E=b;0<E;){var P=31-Mn(E),j=1<<P;w[P]|=b,E&=~j}}},[n,t,a]),s.useEffect(function(){return a(t._source,function(){var b=p.getSnapshot,w=p.setSnapshot;try{w(b(t._source));var E=Vn(S);i.mutableReadLanes|=E&i.pendingLanes}catch(P){w(function(){throw P})}})},[t,a]),jt(y,n)&&jt(k,t)&&jt(f,a)||(e={pending:null,dispatch:null,lastRenderedReducer:Zt,lastRenderedState:m},e.dispatch=c=Ac.bind(null,Ae,e),l.queue=e,l.baseQueue=null,m=zg(i,t,n),l.memoizedState=l.baseState=m),m}function Ng(e,t,n){var a=ga();return Ag(a,e,t,n)}function zr(e){var t=fa();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Zt,lastRenderedState:e},e=e.dispatch=Ac.bind(null,Ae,e),[t.memoizedState,e]}function hs(e,t,n,a){return e={tag:e,create:t,destroy:n,deps:a,next:null},t=Ae.updateQueue,t===null?(t={lastEffect:null},Ae.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e)),e}function Ig(e){var t=fa();return e={current:e},t.memoizedState=e}function fs(){return ga().memoizedState}function Tc(e,t,n,a){var i=fa();Ae.flags|=e,i.memoizedState=hs(1|t,n,void 0,a===void 0?null:a)}function Pc(e,t,n,a){var i=ga();a=a===void 0?null:a;var r=void 0;if(tt!==null){var o=tt.memoizedState;if(r=o.destroy,a!==null&&$c(a,o.deps)){hs(t,n,r,a);return}}Ae.flags|=e,i.memoizedState=hs(1|t,n,r,a)}function Mg(e,t){return Tc(516,4,e,t)}function gs(e,t){return Pc(516,4,e,t)}function Fg(e,t){return Pc(4,2,e,t)}function Dg(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Og(e,t,n){return n=n!=null?n.concat([e]):null,Pc(4,2,Dg.bind(null,t,e),n)}function zc(){}function _g(e,t){var n=ga();t=t===void 0?null:t;var a=n.memoizedState;return a!==null&&t!==null&&$c(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Rg(e,t){var n=ga();t=t===void 0?null:t;var a=n.memoizedState;return a!==null&&t!==null&&$c(t,a[1])?a[0]:(e=e(),n.memoizedState=[e,t],e)}function GS(e,t){var n=ni();pa(98>n?98:n,function(){e(!0)}),pa(97<n?97:n,function(){var a=Pt.transition;Pt.transition=1;try{e(!1),t()}finally{Pt.transition=a}})}function Ac(e,t,n){var a=wt(),i=Vn(e),r={lane:i,action:n,eagerReducer:null,eagerState:null,next:null},o=t.pending;if(o===null?r.next=r:(r.next=o.next,o.next=r),t.pending=r,o=e.alternate,e===Ae||o!==null&&o===Ae)jr=ps=!0;else{if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(r.eagerReducer=o,r.eagerState=l,jt(l,s))return}catch{}finally{}Hn(e,i,a)}}var ys={readContext:Tt,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useLayoutEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useMutableSource:ft,useOpaqueIdentifier:ft,unstable_isNewReconciler:!1},KS={readContext:Tt,useCallback:function(e,t){return fa().memoizedState=[e,t===void 0?null:t],e},useContext:Tt,useEffect:Mg,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Tc(4,2,Dg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Tc(4,2,e,t)},useMemo:function(e,t){var n=fa();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var a=fa();return t=n!==void 0?n(t):t,a.memoizedState=a.baseState=t,e=a.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},e=e.dispatch=Ac.bind(null,Ae,e),[a.memoizedState,e]},useRef:Ig,useState:zr,useDebugValue:zc,useDeferredValue:function(e){var t=zr(e),n=t[0],a=t[1];return Mg(function(){var i=Pt.transition;Pt.transition=1;try{a(e)}finally{Pt.transition=i}},[e]),n},useTransition:function(){var e=zr(!1),t=e[0];return e=GS.bind(null,e[1]),Ig(e),[e,t]},useMutableSource:function(e,t,n){var a=fa();return a.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},Ag(a,e,t,n)},useOpaqueIdentifier:function(){if(Jt){var e=!1,t=LS(function(){throw e||(e=!0,n("r:"+(uc++).toString(36))),Error(L(355))}),n=zr(t)[1];return!(Ae.mode&2)&&(Ae.flags|=516,hs(5,function(){n("r:"+(uc++).toString(36))},void 0,null)),t}return t="r:"+(uc++).toString(36),zr(t),t},unstable_isNewReconciler:!1},qS={readContext:Tt,useCallback:_g,useContext:Tt,useEffect:gs,useImperativeHandle:Og,useLayoutEffect:Fg,useMemo:Rg,useReducer:Tr,useRef:fs,useState:function(){return Tr(Zt)},useDebugValue:zc,useDeferredValue:function(e){var t=Tr(Zt),n=t[0],a=t[1];return gs(function(){var i=Pt.transition;Pt.transition=1;try{a(e)}finally{Pt.transition=i}},[e]),n},useTransition:function(){var e=Tr(Zt)[0];return[fs().current,e]},useMutableSource:Ng,useOpaqueIdentifier:function(){return Tr(Zt)[0]},unstable_isNewReconciler:!1},JS={readContext:Tt,useCallback:_g,useContext:Tt,useEffect:gs,useImperativeHandle:Og,useLayoutEffect:Fg,useMemo:Rg,useReducer:Pr,useRef:fs,useState:function(){return Pr(Zt)},useDebugValue:zc,useDeferredValue:function(e){var t=Pr(Zt),n=t[0],a=t[1];return gs(function(){var i=Pt.transition;Pt.transition=1;try{a(e)}finally{Pt.transition=i}},[e]),n},useTransition:function(){var e=Pr(Zt)[0];return[fs().current,e]},useMutableSource:Ng,useOpaqueIdentifier:function(){return Pr(Zt)[0]},unstable_isNewReconciler:!1},ZS=oa.ReactCurrentOwner,Ut=!1;function gt(e,t,n,a){t.child=e===null?Cg(t,null,n,a):cs(t,e.child,n,a)}function Ug(e,t,n,a,i){n=n.render;var r=t.ref;return ii(t,i),a=jc(e,t,n,a,r,i),e!==null&&!Ut?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,pn(e,t,i)):(t.flags|=1,gt(e,t,a,i),t.child)}function Lg(e,t,n,a,i,r){if(e===null){var o=n.type;return typeof o=="function"&&!ed(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Yg(e,t,o,a,i,r)):(e=js(n.type,null,a,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}return o=e.child,!(i&r)&&(i=o.memoizedProps,n=n.compare,n=n!==null?n:hr,n(i,a)&&e.ref===t.ref)?pn(e,t,r):(t.flags|=1,e=Kn(o,a),e.ref=t.ref,e.return=t,t.child=e)}function Yg(e,t,n,a,i,r){if(e!==null&&hr(e.memoizedProps,a)&&e.ref===t.ref)if(Ut=!1,(r&i)!==0)e.flags&16384&&(Ut=!0);else return t.lanes=e.lanes,pn(e,t,r);return Ic(e,t,n,a,r)}function Nc(e,t,n){var a=t.pendingProps,i=a.children,r=e!==null?e.memoizedState:null;if(a.mode==="hidden"||a.mode==="unstable-defer-without-hiding")if(!(t.mode&4))t.memoizedState={baseLanes:0},$s(t,n);else if(n&1073741824)t.memoizedState={baseLanes:0},$s(t,r!==null?r.baseLanes:n);else return e=r!==null?r.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},$s(t,e),null;else r!==null?(a=r.baseLanes|n,t.memoizedState=null):a=n,$s(t,a);return gt(e,t,i,n),t.child}function Bg(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=128)}function Ic(e,t,n,a,i){var r=ht(n)?da:Qe.current;return r=ti(t,r),ii(t,i),n=jc(e,t,n,a,r,i),e!==null&&!Ut?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,pn(e,t,i)):(t.flags|=1,gt(e,t,n,i),t.child)}function Vg(e,t,n,a,i){if(ht(n)){var r=!0;es(t)}else r=!1;if(ii(t,i),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),xg(t,n,a),vc(t,n,a,i),a=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=Tt(c):(c=ht(n)?da:Qe.current,c=ti(t,c));var m=n.getDerivedStateFromProps,f=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==a||l!==c)&&Eg(t,o,a,c),Rn=!1;var p=t.memoizedState;o.state=p,vr(t,a,o,i),l=t.memoizedState,s!==a||p!==l||pt.current||Rn?(typeof m=="function"&&(os(t,n,m,a),l=t.memoizedState),(s=Rn||wg(t,n,s,a,p,l,c))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4)):(typeof o.componentDidMount=="function"&&(t.flags|=4),t.memoizedProps=a,t.memoizedState=l),o.props=a,o.state=l,o.context=c,a=s):(typeof o.componentDidMount=="function"&&(t.flags|=4),a=!1)}else{o=t.stateNode,yg(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Rt(t.type,s),o.props=c,f=t.pendingProps,p=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Tt(l):(l=ht(n)?da:Qe.current,l=ti(t,l));var y=n.getDerivedStateFromProps;(m=typeof y=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==f||p!==l)&&Eg(t,o,a,l),Rn=!1,p=t.memoizedState,o.state=p,vr(t,a,o,i);var k=t.memoizedState;s!==f||p!==k||pt.current||Rn?(typeof y=="function"&&(os(t,n,y,a),k=t.memoizedState),(c=Rn||wg(t,n,c,a,p,k,l))?(m||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(a,k,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(a,k,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=256)):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=256),t.memoizedProps=a,t.memoizedState=k),o.props=a,o.state=k,o.context=l,a=c):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=256),a=!1)}return Mc(e,t,n,a,r,i)}function Mc(e,t,n,a,i,r){Bg(e,t);var o=(t.flags&64)!==0;if(!a&&!o)return i&&sg(t,n,!1),pn(e,t,r);a=t.stateNode,ZS.current=t;var s=o&&typeof n.getDerivedStateFromError!="function"?null:a.render();return t.flags|=1,e!==null&&o?(t.child=cs(t,e.child,null,r),t.child=cs(t,null,s,r)):gt(e,t,s,r),t.memoizedState=a.state,i&&sg(t,n,!0),t.child}function Hg(e){var t=e.stateNode;t.pendingContext?rg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&rg(e,t.context,!1),wc(e,t.containerInfo)}var bs={dehydrated:null,retryLane:0};function Wg(e,t,n){var a=t.pendingProps,i=Pe.current,r=!1,o;return(o=(t.flags&64)!==0)||(o=e!==null&&e.memoizedState===null?!1:(i&2)!==0),o?(r=!0,t.flags&=-65):e!==null&&e.memoizedState===null||a.fallback===void 0||a.unstable_avoidThisFallback===!0||(i|=1),Te(Pe,i&1),e===null?(a.fallback!==void 0&&Ec(t),e=a.children,i=a.fallback,r?(e=Gg(t,e,i,n),t.child.memoizedState={baseLanes:n},t.memoizedState=bs,e):typeof a.unstable_expectedLoadTime=="number"?(e=Gg(t,e,i,n),t.child.memoizedState={baseLanes:n},t.memoizedState=bs,t.lanes=33554432,e):(n=td({mode:"visible",children:e},t.mode,n,null),n.return=t,t.child=n)):e.memoizedState!==null?r?(a=qg(e,t,a.children,a.fallback,n),r=t.child,i=e.child.memoizedState,r.memoizedState=i===null?{baseLanes:n}:{baseLanes:i.baseLanes|n},r.childLanes=e.childLanes&~n,t.memoizedState=bs,a):(n=Kg(e,t,a.children,n),t.memoizedState=null,n):r?(a=qg(e,t,a.children,a.fallback,n),r=t.child,i=e.child.memoizedState,r.memoizedState=i===null?{baseLanes:n}:{baseLanes:i.baseLanes|n},r.childLanes=e.childLanes&~n,t.memoizedState=bs,a):(n=Kg(e,t,a.children,n),t.memoizedState=null,n)}function Gg(e,t,n,a){var i=e.mode,r=e.child;return t={mode:"hidden",children:t},!(i&2)&&r!==null?(r.childLanes=0,r.pendingProps=t):r=td(t,i,0,null),n=mi(n,i,a,null),r.return=e,n.return=e,r.sibling=n,e.child=r,n}function Kg(e,t,n,a){var i=e.child;return e=i.sibling,n=Kn(i,{mode:"visible",children:n}),!(t.mode&2)&&(n.lanes=a),n.return=t,n.sibling=null,e!==null&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function qg(e,t,n,a,i){var r=t.mode,o=e.child;e=o.sibling;var s={mode:"hidden",children:n};return!(r&2)&&t.child!==o?(n=t.child,n.childLanes=0,n.pendingProps=s,o=n.lastEffect,o!==null?(t.firstEffect=n.firstEffect,t.lastEffect=o,o.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Kn(o,s),e!==null?a=Kn(e,a):(a=mi(a,r,i,null),a.flags|=2),a.return=t,n.return=t,n.sibling=a,t.child=n,a}function Jg(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),gg(e.return,t)}function Fc(e,t,n,a,i,r){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:i,lastEffect:r}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=a,o.tail=n,o.tailMode=i,o.lastEffect=r)}function Zg(e,t,n){var a=t.pendingProps,i=a.revealOrder,r=a.tail;if(gt(e,t,a.children,n),a=Pe.current,a&2)a=a&1|2,t.flags|=64;else{if(e!==null&&e.flags&64)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Jg(e,n);else if(e.tag===19)Jg(e,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}a&=1}if(Te(Pe,a),!(t.mode&2))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ds(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Fc(t,!1,i,n,r,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ds(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Fc(t,!0,n,null,r,t.lastEffect);break;case"together":Fc(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function pn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Nr|=t.lanes,n&t.childLanes){if(e!==null&&t.child!==e.child)throw Error(L(153));if(t.child!==null){for(e=t.child,n=Kn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Kn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}return null}var Xg,Dc,Qg,ey;Xg=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Dc=function(){},Qg=function(e,t,n,a){var i=e.memoizedProps;if(i!==a){e=t.stateNode,ha(qt.current);var r=null;switch(n){case"input":i=vu(e,i),a=vu(e,a),r=[];break;case"option":i=Eu(e,i),a=Eu(e,a),r=[];break;case"select":i=Ce({},i,{value:void 0}),a=Ce({},a,{value:void 0}),r=[];break;case"textarea":i=Su(e,i),a=Su(e,a),r=[];break;default:typeof i.onClick!="function"&&typeof a.onClick=="function"&&(e.onclick=qo)}ju(n,a);var o;n=null;for(c in i)if(!a.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var s=i[c];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Wi.hasOwnProperty(c)?r||(r=[]):(r=r||[]).push(c,null));for(c in a){var l=a[c];if(s=i!=null?i[c]:void 0,a.hasOwnProperty(c)&&l!==s&&(l!=null||s!=null))if(c==="style")if(s){for(o in s)!s.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&s[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(r||(r=[]),r.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(r=r||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(r=r||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Wi.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&we("scroll",e),r||s===l||(r=[])):typeof l=="object"&&l!==null&&l.$$typeof===fu?l.toString():(r=r||[]).push(c,l))}n&&(r=r||[]).push("style",n);var c=r;(t.updateQueue=c)&&(t.flags|=4)}},ey=function(e,t,n,a){n!==a&&(t.flags|=4)};function Ar(e,t){if(!Jt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function XS(e,t,n){var a=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return ht(t.type)&&Qo(),null;case 3:return ri(),xe(pt),xe(Qe),Cc(),a=t.stateNode,a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(ms(t)?t.flags|=4:a.hydrate||(t.flags|=256)),Dc(t),null;case 5:xc(t);var i=ha(Sr.current);if(n=t.type,e!==null&&t.stateNode!=null)Qg(e,t,n,a,i),e.ref!==t.ref&&(t.flags|=128);else{if(!a){if(t.stateNode===null)throw Error(L(166));return null}if(e=ha(qt.current),ms(t)){a=t.stateNode,n=t.type;var r=t.memoizedProps;switch(a[Dn]=t,a[Zo]=r,n){case"dialog":we("cancel",a),we("close",a);break;case"iframe":case"object":case"embed":we("load",a);break;case"video":case"audio":for(e=0;e<gr.length;e++)we(gr[e],a);break;case"source":we("error",a);break;case"img":case"image":case"link":we("error",a),we("load",a);break;case"details":we("toggle",a);break;case"input":Vh(a,r),we("invalid",a);break;case"select":a._wrapperState={wasMultiple:!!r.multiple},we("invalid",a);break;case"textarea":Gh(a,r),we("invalid",a)}ju(n,r),e=null;for(var o in r)r.hasOwnProperty(o)&&(i=r[o],o==="children"?typeof i=="string"?a.textContent!==i&&(e=["children",i]):typeof i=="number"&&a.textContent!==""+i&&(e=["children",""+i]):Wi.hasOwnProperty(o)&&i!=null&&o==="onScroll"&&we("scroll",a));switch(n){case"input":No(a),Wh(a,r,!0);break;case"textarea":No(a),qh(a);break;case"select":case"option":break;default:typeof r.onClick=="function"&&(a.onclick=qo)}a=e,t.updateQueue=a,a!==null&&(t.flags|=4)}else{switch(o=i.nodeType===9?i:i.ownerDocument,e===Cu.html&&(e=Jh(n)),e===Cu.html?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof a.is=="string"?e=o.createElement(n,{is:a.is}):(e=o.createElement(n),n==="select"&&(o=e,a.multiple?o.multiple=!0:a.size&&(o.size=a.size))):e=o.createElementNS(e,n),e[Dn]=t,e[Zo]=a,Xg(e,t,!1,!1),t.stateNode=e,o=Tu(n,a),n){case"dialog":we("cancel",e),we("close",e),i=a;break;case"iframe":case"object":case"embed":we("load",e),i=a;break;case"video":case"audio":for(i=0;i<gr.length;i++)we(gr[i],e);i=a;break;case"source":we("error",e),i=a;break;case"img":case"image":case"link":we("error",e),we("load",e),i=a;break;case"details":we("toggle",e),i=a;break;case"input":Vh(e,a),i=vu(e,a),we("invalid",e);break;case"option":i=Eu(e,a);break;case"select":e._wrapperState={wasMultiple:!!a.multiple},i=Ce({},a,{value:void 0}),we("invalid",e);break;case"textarea":Gh(e,a),i=Su(e,a),we("invalid",e);break;default:i=a}ju(n,i);var s=i;for(r in s)if(s.hasOwnProperty(r)){var l=s[r];r==="style"?Qh(e,l):r==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Zh(e,l)):r==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Xi(e,l):typeof l=="number"&&Xi(e,""+l):r!=="suppressContentEditableWarning"&&r!=="suppressHydrationWarning"&&r!=="autoFocus"&&(Wi.hasOwnProperty(r)?l!=null&&r==="onScroll"&&we("scroll",e):l!=null&&uu(e,r,l,o))}switch(n){case"input":No(e),Wh(e,a,!1);break;case"textarea":No(e),qh(e);break;case"option":a.value!=null&&e.setAttribute("value",""+zn(a.value));break;case"select":e.multiple=!!a.multiple,r=a.value,r!=null?La(e,!!a.multiple,r,!1):a.defaultValue!=null&&La(e,!!a.multiple,a.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=qo)}eg(n,a)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)ey(e,t,e.memoizedProps,a);else{if(typeof a!="string"&&t.stateNode===null)throw Error(L(166));n=ha(Sr.current),ha(qt.current),ms(t)?(a=t.stateNode,n=t.memoizedProps,a[Dn]=t,a.nodeValue!==n&&(t.flags|=4)):(a=(n.nodeType===9?n:n.ownerDocument).createTextNode(a),a[Dn]=t,t.stateNode=a)}return null;case 13:return xe(Pe),a=t.memoizedState,t.flags&64?(t.lanes=n,t):(a=a!==null,n=!1,e===null?t.memoizedProps.fallback!==void 0&&ms(t):n=e.memoizedState!==null,a&&!n&&t.mode&2&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||Pe.current&1?We===0&&(We=3):((We===0||We===3)&&(We=4),ot===null||!(Nr&134217727)&&!(li&134217727)||ci(ot,nt))),(a||n)&&(t.flags|=4),null);case 4:return ri(),Dc(t),e===null&&qf(t.stateNode.containerInfo),null;case 10:return bc(t),null;case 17:return ht(t.type)&&Qo(),null;case 19:if(xe(Pe),a=t.memoizedState,a===null)return null;if(r=(t.flags&64)!==0,o=a.rendering,o===null)if(r)Ar(a,!1);else{if(We!==0||e!==null&&e.flags&64)for(e=t.child;e!==null;){if(o=ds(e),o!==null){for(t.flags|=64,Ar(a,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),a.lastEffect===null&&(t.firstEffect=null),t.lastEffect=a.lastEffect,a=n,n=t.child;n!==null;)r=n,e=a,r.flags&=2,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null,o=r.alternate,o===null?(r.childLanes=0,r.lanes=e,r.child=null,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=o.childLanes,r.lanes=o.lanes,r.child=o.child,r.memoizedProps=o.memoizedProps,r.memoizedState=o.memoizedState,r.updateQueue=o.updateQueue,r.type=o.type,e=o.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Te(Pe,Pe.current&1|2),t.child}e=e.sibling}a.tail!==null&&et()>Gc&&(t.flags|=64,r=!0,Ar(a,!1),t.lanes=33554432)}else{if(!r)if(e=ds(o),e!==null){if(t.flags|=64,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ar(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!Jt)return t=t.lastEffect=a.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*et()-a.renderingStartTime>Gc&&n!==1073741824&&(t.flags|=64,r=!0,Ar(a,!1),t.lanes=33554432);a.isBackwards?(o.sibling=t.child,t.child=o):(n=a.last,n!==null?n.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(n=a.tail,a.rendering=n,a.tail=n.sibling,a.lastEffect=t.lastEffect,a.renderingStartTime=et(),n.sibling=null,t=Pe.current,Te(Pe,r?t&1|2:t&1),n):null;case 23:case 24:return Qc(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&a.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error(L(156,t.tag))}function QS(e){switch(e.tag){case 1:ht(e.type)&&Qo();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(ri(),xe(pt),xe(Qe),Cc(),t=e.flags,t&64)throw Error(L(285));return e.flags=t&-4097|64,e;case 5:return xc(e),null;case 13:return xe(Pe),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return xe(Pe),null;case 4:return ri(),null;case 10:return bc(e),null;case 23:case 24:return Qc(),null;default:return null}}function Oc(e,t){try{var n="",a=t;do n+=NE(a),a=a.return;while(a);var i=n}catch(r){i=`
|
|
38
38
|
Error generating stack: `+r.message+`
|
|
39
|
-
`+r.stack}return{value:e,source:t,stack:i}}function _c(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var eC=typeof WeakMap=="function"?WeakMap:Map;function ty(e,t,n){n=Un(-1,n),n.tag=3,n.payload={element:null};var a=t.value;return n.callback=function(){ws||(ws=!0,Kc=a),_c(e,t)},n}function ny(e,t,n){n=Un(-1,n),n.tag=3;var a=e.type.getDerivedStateFromError;if(typeof a=="function"){var i=t.value;n.payload=function(){return _c(e,t),a(i)}}var r=e.stateNode;return r!==null&&typeof r.componentDidCatch=="function"&&(n.callback=function(){typeof a!="function"&&(Xt===null?Xt=new Set([this]):Xt.add(this),_c(e,t));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}var tC=typeof WeakSet=="function"?WeakSet:Set;function ay(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){Gn(e,n)}else t.current=null}function nC(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(t.flags&256&&e!==null){var n=e.memoizedProps,a=e.memoizedState;e=t.stateNode,t=e.getSnapshotBeforeUpdate(t.elementType===t.type?n:Rt(t.type,n),a),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&lc(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(L(163))}function aC(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(t=n.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{if((e.tag&3)===3){var a=e.create;e.destroy=a()}e=e.next}while(e!==t)}if(t=n.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{var i=e;a=i.next,i=i.tag,i&4&&i&1&&(by(n,e),dC(n,e)),e=a}while(e!==t)}return;case 1:e=n.stateNode,n.flags&4&&(t===null?e.componentDidMount():(a=n.elementType===n.type?t.memoizedProps:Rt(n.type,t.memoizedProps),e.componentDidUpdate(a,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&kg(n,t,e);return;case 3:if(t=n.updateQueue,t!==null){if(e=null,n.child!==null)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}kg(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&eg(n.type,n.memoizedProps)&&e.focus();return;case 6:return;case 4:return;case 12:return;case 13:n.memoizedState===null&&(n=n.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&gf(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(L(163))}function iy(e,t){for(var n=e;;){if(n.tag===5){var a=n.stateNode;if(t)a=a.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none";else{a=n.stateNode;var i=n.memoizedProps.style;i=i!=null&&i.hasOwnProperty("display")?i.display:null,a.style.display=Xh("display",i)}}else if(n.tag===6)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((n.tag!==23&&n.tag!==24||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function ry(e,t){if(ma&&typeof ma.onCommitFiberUnmount=="function")try{ma.onCommitFiberUnmount(dc,t)}catch{}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(e=t.updateQueue,e!==null&&(e=e.lastEffect,e!==null)){var n=e=e.next;do{var a=n,i=a.destroy;if(a=a.tag,i!==void 0)if(a&4)by(t,n);else{a=t;try{i()}catch(r){Gn(a,r)}}n=n.next}while(n!==e)}break;case 1:if(ay(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(r){Gn(t,r)}break;case 5:ay(t);break;case 4:uy(e,t)}}function oy(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function sy(e){return e.tag===5||e.tag===3||e.tag===4}function ly(e){e:{for(var t=e.return;t!==null;){if(sy(t))break e;t=t.return}throw Error(L(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var a=!1;break;case 3:t=t.containerInfo,a=!0;break;case 4:t=t.containerInfo,a=!0;break;default:throw Error(L(161))}n.flags&16&&(Xi(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||sy(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue t;n.child.return=n,n=n.child}if(!(n.flags&2)){n=n.stateNode;break e}}a?Rc(e,n,t):Uc(e,n,t)}function Rc(e,t,n){var a=e.tag,i=a===5||a===6;if(i)e=i?e.stateNode:e.stateNode.instance,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=qo));else if(a!==4&&(e=e.child,e!==null))for(Rc(e,t,n),e=e.sibling;e!==null;)Rc(e,t,n),e=e.sibling}function Uc(e,t,n){var a=e.tag,i=a===5||a===6;if(i)e=i?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(e=e.child,e!==null))for(Uc(e,t,n),e=e.sibling;e!==null;)Uc(e,t,n),e=e.sibling}function uy(e,t){for(var n=t,a=!1,i,r;;){if(!a){a=n.return;e:for(;;){if(a===null)throw Error(L(160));switch(i=a.stateNode,a.tag){case 5:r=!1;break e;case 3:i=i.containerInfo,r=!0;break e;case 4:i=i.containerInfo,r=!0;break e}a=a.return}a=!0}if(n.tag===5||n.tag===6){e:for(var o=e,s=n,l=s;;)if(ry(o,l),l.child!==null&&l.tag!==4)l.child.return=l,l=l.child;else{if(l===s)break e;for(;l.sibling===null;){if(l.return===null||l.return===s)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}r?(o=i,s=n.stateNode,o.nodeType===8?o.parentNode.removeChild(s):o.removeChild(s)):i.removeChild(n.stateNode)}else if(n.tag===4){if(n.child!==null){i=n.stateNode.containerInfo,r=!0,n.child.return=n,n=n.child;continue}}else if(ry(e,n),n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return,n.tag===4&&(a=!1)}n.sibling.return=n.return,n=n.sibling}}function Lc(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var a=n=n.next;do(a.tag&3)===3&&(e=a.destroy,a.destroy=void 0,e!==void 0&&e()),a=a.next;while(a!==n)}return;case 1:return;case 5:if(n=t.stateNode,n!=null){a=t.memoizedProps;var i=e!==null?e.memoizedProps:a;e=t.type;var r=t.updateQueue;if(t.updateQueue=null,r!==null){for(n[Zo]=a,e==="input"&&a.type==="radio"&&a.name!=null&&Hh(n,a),Tu(e,i),t=Tu(e,a),i=0;i<r.length;i+=2){var o=r[i],s=r[i+1];o==="style"?Qh(n,s):o==="dangerouslySetInnerHTML"?Zh(n,s):o==="children"?Xi(n,s):uu(n,o,s,t)}switch(e){case"input":wu(n,a);break;case"textarea":Kh(n,a);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!a.multiple,r=a.value,r!=null?La(n,!!a.multiple,r,!1):e!==!!a.multiple&&(a.defaultValue!=null?La(n,!!a.multiple,a.defaultValue,!0):La(n,!!a.multiple,a.multiple?[]:"",!1))}}}return;case 6:if(t.stateNode===null)throw Error(L(162));t.stateNode.nodeValue=t.memoizedProps;return;case 3:n=t.stateNode,n.hydrate&&(n.hydrate=!1,gf(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(Wc=et(),iy(t.child,!0)),cy(t);return;case 19:cy(t);return;case 17:return;case 23:case 24:iy(t,t.memoizedState!==null);return}throw Error(L(163))}function cy(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new tC),t.forEach(function(a){var i=hC.bind(null,e,a);n.has(a)||(n.add(a),a.then(i,i))})}}function iC(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var rC=Math.ceil,ks=oa.ReactCurrentDispatcher,Yc=oa.ReactCurrentOwner,Q=0,ot=null,Fe=null,nt=0,ya=0,Bc=On(0),We=0,vs=null,si=0,Nr=0,li=0,Vc=0,Hc=null,Wc=0,Gc=1/0;function ui(){Gc=et()+500}var W=null,ws=!1,Kc=null,Xt=null,Bn=!1,Ir=null,Mr=90,qc=[],Jc=[],hn=null,Fr=0,Zc=null,xs=-1,fn=0,Es=0,Dr=null,Ss=!1;function wt(){return Q&48?et():xs!==-1?xs:xs=et()}function Vn(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return ni()===99?1:2;if(fn===0&&(fn=si),WS.transition!==0){Es!==0&&(Es=Hc!==null?Hc.pendingLanes:0),e=fn;var t=4186112&~Es;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=ni(),Q&4&&e===98?e=Uo(12,fn):(e=KE(e),e=Uo(e,fn)),e}function Hn(e,t,n){if(50<Fr)throw Fr=0,Zc=null,Error(L(185));if(e=Cs(e,t),e===null)return null;Lo(e,t,n),e===ot&&(li|=t,We===4&&ci(e,nt));var a=ni();t===1?Q&8&&!(Q&48)?Xc(e):(zt(e,n),Q===0&&(ui(),Kt())):(!(Q&4)||a!==98&&a!==99||(hn===null?hn=new Set([e]):hn.add(e)),zt(e,n)),Hc=e}function Cs(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}function zt(e,t){for(var n=e.callbackNode,a=e.suspendedLanes,i=e.pingedLanes,r=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-Mn(o),l=1<<s,c=r[s];if(c===-1){if(!(l&a)||l&i){c=t,Ha(l);var m=be;r[s]=10<=m?c+250:6<=m?c+5e3:-1}}else c<=t&&(e.expiredLanes|=l);o&=~l}if(a=lr(e,e===ot?nt:0),t=be,a===0)n!==null&&(n!==fc&&pc(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==fc&&pc(n)}t===15?(n=Xc.bind(null,e),dn===null?(dn=[n],ns=mc(ts,fg)):dn.push(n),n=fc):t===14?n=kr(99,Xc.bind(null,e)):(n=qE(t),n=kr(n,dy.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function dy(e){if(xs=-1,Es=fn=0,Q&48)throw Error(L(327));var t=e.callbackNode;if(Wn()&&e.callbackNode!==t)return null;var n=lr(e,e===ot?nt:0);if(n===0)return null;var a=n,i=Q;Q|=16;var r=fy();(ot!==e||nt!==a)&&(ui(),di(e,a));do try{lC();break}catch(s){hy(e,s)}while(!0);if(yc(),ks.current=r,Q=i,Fe!==null?a=0:(ot=null,nt=0,a=We),si&li)di(e,0);else if(a!==0){if(a===2&&(Q|=64,e.hydrate&&(e.hydrate=!1,lc(e.containerInfo)),n=Ef(e),n!==0&&(a=Or(e,n))),a===1)throw t=vs,di(e,0),ci(e,n),zt(e,et()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,a){case 0:case 1:throw Error(L(345));case 2:ba(e);break;case 3:if(ci(e,n),(n&62914560)===n&&(a=Wc+500-et(),10<a)){if(lr(e,0)!==0)break;if(i=e.suspendedLanes,(i&n)!==n){wt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=tg(ba.bind(null,e),a);break}ba(e);break;case 4:if(ci(e,n),(n&4186112)===n)break;for(a=e.eventTimes,i=-1;0<n;){var o=31-Mn(n);r=1<<o,o=a[o],o>i&&(i=o),n&=~r}if(n=i,n=et()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*rC(n/1960))-n,10<n){e.timeoutHandle=tg(ba.bind(null,e),n);break}ba(e);break;case 5:ba(e);break;default:throw Error(L(329))}}return zt(e,et()),e.callbackNode===t?dy.bind(null,e):null}function ci(e,t){for(t&=~Vc,t&=~li,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Mn(t),a=1<<n;e[n]=-1,t&=~a}}function Xc(e){if(Q&48)throw Error(L(327));if(Wn(),e===ot&&e.expiredLanes&nt){var t=nt,n=Or(e,t);si&li&&(t=lr(e,t),n=Or(e,t))}else t=lr(e,0),n=Or(e,t);if(e.tag!==0&&n===2&&(Q|=64,e.hydrate&&(e.hydrate=!1,lc(e.containerInfo)),t=Ef(e),t!==0&&(n=Or(e,t))),n===1)throw n=vs,di(e,0),ci(e,t),zt(e,et()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,ba(e),zt(e,et()),null}function oC(){if(hn!==null){var e=hn;hn=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,zt(t,et())})}Kt()}function my(e,t){var n=Q;Q|=1;try{return e(t)}finally{Q=n,Q===0&&(ui(),Kt())}}function py(e,t){var n=Q;Q&=-2,Q|=8;try{return e(t)}finally{Q=n,Q===0&&(ui(),Kt())}}function $s(e,t){Te(Bc,ya),ya|=t,si|=t}function Qc(){ya=Bc.current,xe(Bc)}function di(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,US(n)),Fe!==null)for(n=Fe.return;n!==null;){var a=n;switch(a.tag){case 1:a=a.type.childContextTypes,a!=null&&Qo();break;case 3:ri(),xe(pt),xe(Qe),Cc();break;case 5:xc(a);break;case 4:ri();break;case 13:xe(Pe);break;case 19:xe(Pe);break;case 10:bc(a);break;case 23:case 24:Qc()}n=n.return}ot=e,Fe=Kn(e.current,null),nt=ya=si=t,We=0,vs=null,Vc=li=Nr=0}function hy(e,t){do{var n=Fe;try{if(yc(),Cr.current=ys,ps){for(var a=Ae.memoizedState;a!==null;){var i=a.queue;i!==null&&(i.pending=null),a=a.next}ps=!1}if($r=0,He=tt=Ae=null,jr=!1,Yc.current=null,n===null||n.return===null){We=1,vs=t,Fe=null;break}e:{var r=e,o=n.return,s=n,l=t;if(t=nt,s.flags|=2048,s.firstEffect=s.lastEffect=null,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l;if(!(s.mode&2)){var m=s.alternate;m?(s.updateQueue=m.updateQueue,s.memoizedState=m.memoizedState,s.lanes=m.lanes):(s.updateQueue=null,s.memoizedState=null)}var f=(Pe.current&1)!==0,p=o;do{var y;if(y=p.tag===13){var k=p.memoizedState;if(k!==null)y=k.dehydrated!==null;else{var j=p.memoizedProps;y=j.fallback===void 0?!1:j.unstable_avoidThisFallback!==!0?!0:!f}}if(y){var b=p.updateQueue;if(b===null){var w=new Set;w.add(c),p.updateQueue=w}else b.add(c);if(!(p.mode&2)){if(p.flags|=64,s.flags|=16384,s.flags&=-2981,s.tag===1)if(s.alternate===null)s.tag=17;else{var E=Un(-1,1);E.tag=2,Ln(s,E)}s.lanes|=1;break e}l=void 0,s=t;var P=r.pingCache;if(P===null?(P=r.pingCache=new eC,l=new Set,P.set(c,l)):(l=P.get(c),l===void 0&&(l=new Set,P.set(c,l))),!l.has(s)){l.add(s);var $=pC.bind(null,r,c,s);c.then($,$)}p.flags|=4096,p.lanes=t;break e}p=p.return}while(p!==null);l=Error((Ua(s.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
|
|
39
|
+
`+r.stack}return{value:e,source:t,stack:i}}function _c(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var eC=typeof WeakMap=="function"?WeakMap:Map;function ty(e,t,n){n=Un(-1,n),n.tag=3,n.payload={element:null};var a=t.value;return n.callback=function(){ws||(ws=!0,Kc=a),_c(e,t)},n}function ny(e,t,n){n=Un(-1,n),n.tag=3;var a=e.type.getDerivedStateFromError;if(typeof a=="function"){var i=t.value;n.payload=function(){return _c(e,t),a(i)}}var r=e.stateNode;return r!==null&&typeof r.componentDidCatch=="function"&&(n.callback=function(){typeof a!="function"&&(Xt===null?Xt=new Set([this]):Xt.add(this),_c(e,t));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}var tC=typeof WeakSet=="function"?WeakSet:Set;function ay(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){Gn(e,n)}else t.current=null}function nC(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(t.flags&256&&e!==null){var n=e.memoizedProps,a=e.memoizedState;e=t.stateNode,t=e.getSnapshotBeforeUpdate(t.elementType===t.type?n:Rt(t.type,n),a),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&lc(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(L(163))}function aC(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(t=n.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{if((e.tag&3)===3){var a=e.create;e.destroy=a()}e=e.next}while(e!==t)}if(t=n.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{var i=e;a=i.next,i=i.tag,i&4&&i&1&&(by(n,e),dC(n,e)),e=a}while(e!==t)}return;case 1:e=n.stateNode,n.flags&4&&(t===null?e.componentDidMount():(a=n.elementType===n.type?t.memoizedProps:Rt(n.type,t.memoizedProps),e.componentDidUpdate(a,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&kg(n,t,e);return;case 3:if(t=n.updateQueue,t!==null){if(e=null,n.child!==null)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}kg(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&eg(n.type,n.memoizedProps)&&e.focus();return;case 6:return;case 4:return;case 12:return;case 13:n.memoizedState===null&&(n=n.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&gf(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(L(163))}function iy(e,t){for(var n=e;;){if(n.tag===5){var a=n.stateNode;if(t)a=a.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none";else{a=n.stateNode;var i=n.memoizedProps.style;i=i!=null&&i.hasOwnProperty("display")?i.display:null,a.style.display=Xh("display",i)}}else if(n.tag===6)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((n.tag!==23&&n.tag!==24||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function ry(e,t){if(ma&&typeof ma.onCommitFiberUnmount=="function")try{ma.onCommitFiberUnmount(dc,t)}catch{}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(e=t.updateQueue,e!==null&&(e=e.lastEffect,e!==null)){var n=e=e.next;do{var a=n,i=a.destroy;if(a=a.tag,i!==void 0)if(a&4)by(t,n);else{a=t;try{i()}catch(r){Gn(a,r)}}n=n.next}while(n!==e)}break;case 1:if(ay(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(r){Gn(t,r)}break;case 5:ay(t);break;case 4:uy(e,t)}}function oy(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function sy(e){return e.tag===5||e.tag===3||e.tag===4}function ly(e){e:{for(var t=e.return;t!==null;){if(sy(t))break e;t=t.return}throw Error(L(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var a=!1;break;case 3:t=t.containerInfo,a=!0;break;case 4:t=t.containerInfo,a=!0;break;default:throw Error(L(161))}n.flags&16&&(Xi(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||sy(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue t;n.child.return=n,n=n.child}if(!(n.flags&2)){n=n.stateNode;break e}}a?Rc(e,n,t):Uc(e,n,t)}function Rc(e,t,n){var a=e.tag,i=a===5||a===6;if(i)e=i?e.stateNode:e.stateNode.instance,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=qo));else if(a!==4&&(e=e.child,e!==null))for(Rc(e,t,n),e=e.sibling;e!==null;)Rc(e,t,n),e=e.sibling}function Uc(e,t,n){var a=e.tag,i=a===5||a===6;if(i)e=i?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(e=e.child,e!==null))for(Uc(e,t,n),e=e.sibling;e!==null;)Uc(e,t,n),e=e.sibling}function uy(e,t){for(var n=t,a=!1,i,r;;){if(!a){a=n.return;e:for(;;){if(a===null)throw Error(L(160));switch(i=a.stateNode,a.tag){case 5:r=!1;break e;case 3:i=i.containerInfo,r=!0;break e;case 4:i=i.containerInfo,r=!0;break e}a=a.return}a=!0}if(n.tag===5||n.tag===6){e:for(var o=e,s=n,l=s;;)if(ry(o,l),l.child!==null&&l.tag!==4)l.child.return=l,l=l.child;else{if(l===s)break e;for(;l.sibling===null;){if(l.return===null||l.return===s)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}r?(o=i,s=n.stateNode,o.nodeType===8?o.parentNode.removeChild(s):o.removeChild(s)):i.removeChild(n.stateNode)}else if(n.tag===4){if(n.child!==null){i=n.stateNode.containerInfo,r=!0,n.child.return=n,n=n.child;continue}}else if(ry(e,n),n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return,n.tag===4&&(a=!1)}n.sibling.return=n.return,n=n.sibling}}function Lc(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var a=n=n.next;do(a.tag&3)===3&&(e=a.destroy,a.destroy=void 0,e!==void 0&&e()),a=a.next;while(a!==n)}return;case 1:return;case 5:if(n=t.stateNode,n!=null){a=t.memoizedProps;var i=e!==null?e.memoizedProps:a;e=t.type;var r=t.updateQueue;if(t.updateQueue=null,r!==null){for(n[Zo]=a,e==="input"&&a.type==="radio"&&a.name!=null&&Hh(n,a),Tu(e,i),t=Tu(e,a),i=0;i<r.length;i+=2){var o=r[i],s=r[i+1];o==="style"?Qh(n,s):o==="dangerouslySetInnerHTML"?Zh(n,s):o==="children"?Xi(n,s):uu(n,o,s,t)}switch(e){case"input":wu(n,a);break;case"textarea":Kh(n,a);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!a.multiple,r=a.value,r!=null?La(n,!!a.multiple,r,!1):e!==!!a.multiple&&(a.defaultValue!=null?La(n,!!a.multiple,a.defaultValue,!0):La(n,!!a.multiple,a.multiple?[]:"",!1))}}}return;case 6:if(t.stateNode===null)throw Error(L(162));t.stateNode.nodeValue=t.memoizedProps;return;case 3:n=t.stateNode,n.hydrate&&(n.hydrate=!1,gf(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(Wc=et(),iy(t.child,!0)),cy(t);return;case 19:cy(t);return;case 17:return;case 23:case 24:iy(t,t.memoizedState!==null);return}throw Error(L(163))}function cy(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new tC),t.forEach(function(a){var i=hC.bind(null,e,a);n.has(a)||(n.add(a),a.then(i,i))})}}function iC(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var rC=Math.ceil,ks=oa.ReactCurrentDispatcher,Yc=oa.ReactCurrentOwner,Q=0,ot=null,Fe=null,nt=0,ya=0,Bc=On(0),We=0,vs=null,si=0,Nr=0,li=0,Vc=0,Hc=null,Wc=0,Gc=1/0;function ui(){Gc=et()+500}var W=null,ws=!1,Kc=null,Xt=null,Bn=!1,Ir=null,Mr=90,qc=[],Jc=[],hn=null,Fr=0,Zc=null,xs=-1,fn=0,Es=0,Dr=null,Ss=!1;function wt(){return Q&48?et():xs!==-1?xs:xs=et()}function Vn(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return ni()===99?1:2;if(fn===0&&(fn=si),WS.transition!==0){Es!==0&&(Es=Hc!==null?Hc.pendingLanes:0),e=fn;var t=4186112&~Es;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=ni(),Q&4&&e===98?e=Uo(12,fn):(e=KE(e),e=Uo(e,fn)),e}function Hn(e,t,n){if(50<Fr)throw Fr=0,Zc=null,Error(L(185));if(e=Cs(e,t),e===null)return null;Lo(e,t,n),e===ot&&(li|=t,We===4&&ci(e,nt));var a=ni();t===1?Q&8&&!(Q&48)?Xc(e):(zt(e,n),Q===0&&(ui(),Kt())):(!(Q&4)||a!==98&&a!==99||(hn===null?hn=new Set([e]):hn.add(e)),zt(e,n)),Hc=e}function Cs(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}function zt(e,t){for(var n=e.callbackNode,a=e.suspendedLanes,i=e.pingedLanes,r=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-Mn(o),l=1<<s,c=r[s];if(c===-1){if(!(l&a)||l&i){c=t,Ha(l);var m=be;r[s]=10<=m?c+250:6<=m?c+5e3:-1}}else c<=t&&(e.expiredLanes|=l);o&=~l}if(a=lr(e,e===ot?nt:0),t=be,a===0)n!==null&&(n!==fc&&pc(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==fc&&pc(n)}t===15?(n=Xc.bind(null,e),dn===null?(dn=[n],ns=mc(ts,fg)):dn.push(n),n=fc):t===14?n=kr(99,Xc.bind(null,e)):(n=qE(t),n=kr(n,dy.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function dy(e){if(xs=-1,Es=fn=0,Q&48)throw Error(L(327));var t=e.callbackNode;if(Wn()&&e.callbackNode!==t)return null;var n=lr(e,e===ot?nt:0);if(n===0)return null;var a=n,i=Q;Q|=16;var r=fy();(ot!==e||nt!==a)&&(ui(),di(e,a));do try{lC();break}catch(s){hy(e,s)}while(!0);if(yc(),ks.current=r,Q=i,Fe!==null?a=0:(ot=null,nt=0,a=We),si&li)di(e,0);else if(a!==0){if(a===2&&(Q|=64,e.hydrate&&(e.hydrate=!1,lc(e.containerInfo)),n=Ef(e),n!==0&&(a=Or(e,n))),a===1)throw t=vs,di(e,0),ci(e,n),zt(e,et()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,a){case 0:case 1:throw Error(L(345));case 2:ba(e);break;case 3:if(ci(e,n),(n&62914560)===n&&(a=Wc+500-et(),10<a)){if(lr(e,0)!==0)break;if(i=e.suspendedLanes,(i&n)!==n){wt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=tg(ba.bind(null,e),a);break}ba(e);break;case 4:if(ci(e,n),(n&4186112)===n)break;for(a=e.eventTimes,i=-1;0<n;){var o=31-Mn(n);r=1<<o,o=a[o],o>i&&(i=o),n&=~r}if(n=i,n=et()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*rC(n/1960))-n,10<n){e.timeoutHandle=tg(ba.bind(null,e),n);break}ba(e);break;case 5:ba(e);break;default:throw Error(L(329))}}return zt(e,et()),e.callbackNode===t?dy.bind(null,e):null}function ci(e,t){for(t&=~Vc,t&=~li,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Mn(t),a=1<<n;e[n]=-1,t&=~a}}function Xc(e){if(Q&48)throw Error(L(327));if(Wn(),e===ot&&e.expiredLanes&nt){var t=nt,n=Or(e,t);si&li&&(t=lr(e,t),n=Or(e,t))}else t=lr(e,0),n=Or(e,t);if(e.tag!==0&&n===2&&(Q|=64,e.hydrate&&(e.hydrate=!1,lc(e.containerInfo)),t=Ef(e),t!==0&&(n=Or(e,t))),n===1)throw n=vs,di(e,0),ci(e,t),zt(e,et()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,ba(e),zt(e,et()),null}function oC(){if(hn!==null){var e=hn;hn=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,zt(t,et())})}Kt()}function my(e,t){var n=Q;Q|=1;try{return e(t)}finally{Q=n,Q===0&&(ui(),Kt())}}function py(e,t){var n=Q;Q&=-2,Q|=8;try{return e(t)}finally{Q=n,Q===0&&(ui(),Kt())}}function $s(e,t){Te(Bc,ya),ya|=t,si|=t}function Qc(){ya=Bc.current,xe(Bc)}function di(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,US(n)),Fe!==null)for(n=Fe.return;n!==null;){var a=n;switch(a.tag){case 1:a=a.type.childContextTypes,a!=null&&Qo();break;case 3:ri(),xe(pt),xe(Qe),Cc();break;case 5:xc(a);break;case 4:ri();break;case 13:xe(Pe);break;case 19:xe(Pe);break;case 10:bc(a);break;case 23:case 24:Qc()}n=n.return}ot=e,Fe=Kn(e.current,null),nt=ya=si=t,We=0,vs=null,Vc=li=Nr=0}function hy(e,t){do{var n=Fe;try{if(yc(),Cr.current=ys,ps){for(var a=Ae.memoizedState;a!==null;){var i=a.queue;i!==null&&(i.pending=null),a=a.next}ps=!1}if($r=0,He=tt=Ae=null,jr=!1,Yc.current=null,n===null||n.return===null){We=1,vs=t,Fe=null;break}e:{var r=e,o=n.return,s=n,l=t;if(t=nt,s.flags|=2048,s.firstEffect=s.lastEffect=null,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l;if(!(s.mode&2)){var m=s.alternate;m?(s.updateQueue=m.updateQueue,s.memoizedState=m.memoizedState,s.lanes=m.lanes):(s.updateQueue=null,s.memoizedState=null)}var f=(Pe.current&1)!==0,p=o;do{var y;if(y=p.tag===13){var k=p.memoizedState;if(k!==null)y=k.dehydrated!==null;else{var S=p.memoizedProps;y=S.fallback===void 0?!1:S.unstable_avoidThisFallback!==!0?!0:!f}}if(y){var b=p.updateQueue;if(b===null){var w=new Set;w.add(c),p.updateQueue=w}else b.add(c);if(!(p.mode&2)){if(p.flags|=64,s.flags|=16384,s.flags&=-2981,s.tag===1)if(s.alternate===null)s.tag=17;else{var E=Un(-1,1);E.tag=2,Ln(s,E)}s.lanes|=1;break e}l=void 0,s=t;var P=r.pingCache;if(P===null?(P=r.pingCache=new eC,l=new Set,P.set(c,l)):(l=P.get(c),l===void 0&&(l=new Set,P.set(c,l))),!l.has(s)){l.add(s);var j=pC.bind(null,r,c,s);c.then(j,j)}p.flags|=4096,p.lanes=t;break e}p=p.return}while(p!==null);l=Error((Ua(s.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
|
|
40
40
|
|
|
41
|
-
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}We!==5&&(We=2),l=Oc(l,s),p=o;do{switch(p.tag){case 3:r=l,p.flags|=4096,t&=-t,p.lanes|=t;var F=ty(p,r,t);bg(p,F);break e;case 1:r=l;var z=p.type,R=p.stateNode;if(!(p.flags&64)&&(typeof z.getDerivedStateFromError=="function"||R!==null&&typeof R.componentDidCatch=="function"&&(Xt===null||!Xt.has(R)))){p.flags|=4096,t&=-t,p.lanes|=t;var _=ny(p,r,t);bg(p,_);break e}}p=p.return}while(p!==null)}yy(n)}catch(D){t=D,Fe===n&&n!==null&&(Fe=n=n.return);continue}break}while(!0)}function fy(){var e=ks.current;return ks.current=ys,e===null?ys:e}function Or(e,t){var n=Q;Q|=16;var a=fy();ot===e&&nt===t||di(e,t);do try{sC();break}catch(i){hy(e,i)}while(!0);if(yc(),Q=n,ks.current=a,Fe!==null)throw Error(L(261));return ot=null,nt=0,We}function sC(){for(;Fe!==null;)gy(Fe)}function lC(){for(;Fe!==null&&!BS();)gy(Fe)}function gy(e){var t=vy(e.alternate,e,ya);e.memoizedProps=e.pendingProps,t===null?yy(e):Fe=t,Yc.current=null}function yy(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=QS(t),n!==null){n.flags&=2047,Fe=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=XS(n,t,ya),n!==null){Fe=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||ya&1073741824||!(n.mode&4)){for(var a=0,i=n.child;i!==null;)a|=i.lanes|i.childLanes,i=i.sibling;n.childLanes=a}e!==null&&!(e.flags&2048)&&(e.firstEffect===null&&(e.firstEffect=t.firstEffect),t.lastEffect!==null&&(e.lastEffect!==null&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(e.lastEffect!==null?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}if(t=t.sibling,t!==null){Fe=t;return}Fe=t=e}while(t!==null);We===0&&(We=5)}function ba(e){var t=ni();return pa(99,uC.bind(null,e,t)),null}function uC(e,t){do Wn();while(Ir!==null);if(Q&48)throw Error(L(327));var n=e.finishedWork;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(L(177));e.callbackNode=null;var a=n.lanes|n.childLanes,i=a,r=e.pendingLanes&~i;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=i,e.mutableReadLanes&=i,e.entangledLanes&=i,i=e.entanglements;for(var o=e.eventTimes,s=e.expirationTimes;0<r;){var l=31-Mn(r),c=1<<l;i[l]=0,o[l]=-1,s[l]=-1,r&=~c}if(hn!==null&&!(a&24)&&hn.has(e)&&hn.delete(e),e===ot&&(Fe=ot=null,nt=0),1<n.flags?n.lastEffect!==null?(n.lastEffect.nextEffect=n,a=n.firstEffect):a=n:a=n.firstEffect,a!==null){if(i=Q,Q|=32,Yc.current=null,rc=Yo,o=Bf(),tc(o)){if("selectionStart"in o)s={start:o.selectionStart,end:o.selectionEnd};else e:if(s=(s=o.ownerDocument)&&s.defaultView||window,(c=s.getSelection&&s.getSelection())&&c.rangeCount!==0){s=c.anchorNode,r=c.anchorOffset,l=c.focusNode,c=c.focusOffset;try{s.nodeType,l.nodeType}catch{s=null;break e}var m=0,f=-1,p=-1,y=0,k=0,j=o,b=null;t:for(;;){for(var w;j!==s||r!==0&&j.nodeType!==3||(f=m+r),j!==l||c!==0&&j.nodeType!==3||(p=m+c),j.nodeType===3&&(m+=j.nodeValue.length),(w=j.firstChild)!==null;)b=j,j=w;for(;;){if(j===o)break t;if(b===s&&++y===r&&(f=m),b===l&&++k===c&&(p=m),(w=j.nextSibling)!==null)break;j=b,b=j.parentNode}j=w}s=f===-1||p===-1?null:{start:f,end:p}}else s=null;s=s||{start:0,end:0}}else s=null;oc={focusedElem:o,selectionRange:s},Yo=!1,Dr=null,Ss=!1,W=a;do try{cC()}catch(D){if(W===null)throw Error(L(330));Gn(W,D),W=W.nextEffect}while(W!==null);Dr=null,W=a;do try{for(o=e;W!==null;){var E=W.flags;if(E&16&&Xi(W.stateNode,""),E&128){var P=W.alternate;if(P!==null){var $=P.ref;$!==null&&(typeof $=="function"?$(null):$.current=null)}}switch(E&1038){case 2:ly(W),W.flags&=-3;break;case 6:ly(W),W.flags&=-3,Lc(W.alternate,W);break;case 1024:W.flags&=-1025;break;case 1028:W.flags&=-1025,Lc(W.alternate,W);break;case 4:Lc(W.alternate,W);break;case 8:s=W,uy(o,s);var F=s.alternate;oy(s),F!==null&&oy(F)}W=W.nextEffect}}catch(D){if(W===null)throw Error(L(330));Gn(W,D),W=W.nextEffect}while(W!==null);if($=oc,P=Bf(),E=$.focusedElem,o=$.selectionRange,P!==E&&E&&E.ownerDocument&&Yf(E.ownerDocument.documentElement,E)){for(o!==null&&tc(E)&&(P=o.start,$=o.end,$===void 0&&($=P),"selectionStart"in E?(E.selectionStart=P,E.selectionEnd=Math.min($,E.value.length)):($=(P=E.ownerDocument||document)&&P.defaultView||window,$.getSelection&&($=$.getSelection(),s=E.textContent.length,F=Math.min(o.start,s),o=o.end===void 0?F:Math.min(o.end,s),!$.extend&&F>o&&(s=o,o=F,F=s),s=Lf(E,F),r=Lf(E,o),s&&r&&($.rangeCount!==1||$.anchorNode!==s.node||$.anchorOffset!==s.offset||$.focusNode!==r.node||$.focusOffset!==r.offset)&&(P=P.createRange(),P.setStart(s.node,s.offset),$.removeAllRanges(),F>o?($.addRange(P),$.extend(r.node,r.offset)):(P.setEnd(r.node,r.offset),$.addRange(P)))))),P=[],$=E;$=$.parentNode;)$.nodeType===1&&P.push({element:$,left:$.scrollLeft,top:$.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<P.length;E++)$=P[E],$.element.scrollLeft=$.left,$.element.scrollTop=$.top}Yo=!!rc,oc=rc=null,e.current=n,W=a;do try{for(E=e;W!==null;){var z=W.flags;if(z&36&&aC(E,W.alternate,W),z&128){P=void 0;var R=W.ref;if(R!==null){var _=W.stateNode;switch(W.tag){case 5:P=_;break;default:P=_}typeof R=="function"?R(P):R.current=P}}W=W.nextEffect}}catch(D){if(W===null)throw Error(L(330));Gn(W,D),W=W.nextEffect}while(W!==null);W=null,HS(),Q=i}else e.current=n;if(Bn)Bn=!1,Ir=e,Mr=t;else for(W=a;W!==null;)t=W.nextEffect,W.nextEffect=null,W.flags&8&&(z=W,z.sibling=null,z.stateNode=null),W=t;if(a=e.pendingLanes,a===0&&(Xt=null),a===1?e===Zc?Fr++:(Fr=0,Zc=e):Fr=0,n=n.stateNode,ma&&typeof ma.onCommitFiberRoot=="function")try{ma.onCommitFiberRoot(dc,n,void 0,(n.current.flags&64)===64)}catch{}if(zt(e,et()),ws)throw ws=!1,e=Kc,Kc=null,e;return Q&8||Kt(),null}function cC(){for(;W!==null;){var e=W.alternate;Ss||Dr===null||(W.flags&8?uf(W,Dr)&&(Ss=!0):W.tag===13&&iC(e,W)&&uf(W,Dr)&&(Ss=!0));var t=W.flags;t&256&&nC(e,W),!(t&512)||Bn||(Bn=!0,kr(97,function(){return Wn(),null})),W=W.nextEffect}}function Wn(){if(Mr!==90){var e=97<Mr?97:Mr;return Mr=90,pa(e,mC)}return!1}function dC(e,t){qc.push(t,e),Bn||(Bn=!0,kr(97,function(){return Wn(),null}))}function by(e,t){Jc.push(t,e),Bn||(Bn=!0,kr(97,function(){return Wn(),null}))}function mC(){if(Ir===null)return!1;var e=Ir;if(Ir=null,Q&48)throw Error(L(331));var t=Q;Q|=32;var n=Jc;Jc=[];for(var a=0;a<n.length;a+=2){var i=n[a],r=n[a+1],o=i.destroy;if(i.destroy=void 0,typeof o=="function")try{o()}catch(l){if(r===null)throw Error(L(330));Gn(r,l)}}for(n=qc,qc=[],a=0;a<n.length;a+=2){i=n[a],r=n[a+1];try{var s=i.create;i.destroy=s()}catch(l){if(r===null)throw Error(L(330));Gn(r,l)}}for(s=e.current.firstEffect;s!==null;)e=s.nextEffect,s.nextEffect=null,s.flags&8&&(s.sibling=null,s.stateNode=null),s=e;return Q=t,Kt(),!0}function ky(e,t,n){t=Oc(n,t),t=ty(e,t,1),Ln(e,t),t=wt(),e=Cs(e,1),e!==null&&(Lo(e,1,t),zt(e,t))}function Gn(e,t){if(e.tag===3)ky(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){ky(n,e,t);break}else if(n.tag===1){var a=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Xt===null||!Xt.has(a))){e=Oc(t,e);var i=ny(n,e,1);if(Ln(n,i),i=wt(),n=Cs(n,1),n!==null)Lo(n,1,i),zt(n,i);else if(typeof a.componentDidCatch=="function"&&(Xt===null||!Xt.has(a)))try{a.componentDidCatch(t,e)}catch{}break}}n=n.return}}function pC(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),t=wt(),e.pingedLanes|=e.suspendedLanes&n,ot===e&&(nt&n)===n&&(We===4||We===3&&(nt&62914560)===nt&&500>et()-Wc?di(e,0):Vc|=n),zt(e,t)}function hC(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(fn===0&&(fn=si),t=Wa(62914560&~fn),t===0&&(t=4194304)):t=ni()===99?1:2:t=1),n=wt(),e=Cs(e,t),e!==null&&(Lo(e,t,n),zt(e,n))}var vy;vy=function(e,t,n){var a=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||pt.current)Ut=!0;else if(n&a)Ut=!!(e.flags&16384);else{switch(Ut=!1,t.tag){case 3:Hg(t),Sc();break;case 5:$g(t);break;case 1:ht(t.type)&&es(t);break;case 4:wc(t,t.stateNode.containerInfo);break;case 10:a=t.memoizedProps.value;var i=t.type._context;Te(as,i._currentValue),i._currentValue=a;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?Wg(e,t,n):(Te(Pe,Pe.current&1),t=pn(e,t,n),t!==null?t.sibling:null);Te(Pe,Pe.current&1);break;case 19:if(a=(n&t.childLanes)!==0,e.flags&64){if(a)return Zg(e,t,n);t.flags|=64}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Te(Pe,Pe.current),a)break;return null;case 23:case 24:return t.lanes=0,Nc(e,t,n)}return pn(e,t,n)}else Ut=!1;switch(t.lanes=0,t.tag){case 2:if(a=t.type,e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=ti(t,Qe.current),ii(t,n),i=jc(null,t,a,e,i,n),t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,ht(a)){var r=!0;es(t)}else r=!1;t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,kc(t);var o=a.getDerivedStateFromProps;typeof o=="function"&&os(t,a,o,e),i.updater=ss,t.stateNode=i,i._reactInternals=t,vc(t,a,e,n),t=Mc(null,t,a,!0,r,n)}else t.tag=0,gt(null,t,i,n),t=t.child;return t;case 16:i=t.elementType;e:{switch(e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,r=i._init,i=r(i._payload),t.type=i,r=t.tag=gC(i),e=Rt(i,e),r){case 0:t=Ic(null,t,i,e,n);break e;case 1:t=Vg(null,t,i,e,n);break e;case 11:t=Ug(null,t,i,e,n);break e;case 14:t=Lg(null,t,i,Rt(i.type,e),a,n);break e}throw Error(L(306,i,""))}return t;case 0:return a=t.type,i=t.pendingProps,i=t.elementType===a?i:Rt(a,i),Ic(e,t,a,i,n);case 1:return a=t.type,i=t.pendingProps,i=t.elementType===a?i:Rt(a,i),Vg(e,t,a,i,n);case 3:if(Hg(t),a=t.updateQueue,e===null||a===null)throw Error(L(282));if(a=t.pendingProps,i=t.memoizedState,i=i!==null?i.element:null,yg(e,t),vr(t,a,null,n),a=t.memoizedState.element,a===i)Sc(),t=pn(e,t,n);else{if(i=t.stateNode,(r=i.hydrate)&&(Yn=Za(t.stateNode.containerInfo.firstChild),mn=t,r=Jt=!0),r){if(e=i.mutableSourceEagerHydrationData,e!=null)for(i=0;i<e.length;i+=2)r=e[i],r._workInProgressVersionPrimary=e[i+1],oi.push(r);for(n=Cg(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else gt(e,t,a,n),Sc();t=t.child}return t;case 5:return $g(t),e===null&&Ec(t),a=t.type,i=t.pendingProps,r=e!==null?e.memoizedProps:null,o=i.children,sc(a,i)?o=null:r!==null&&sc(a,r)&&(t.flags|=16),Bg(e,t),gt(e,t,o,n),t.child;case 6:return e===null&&Ec(t),null;case 13:return Wg(e,t,n);case 4:return wc(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=cs(t,null,a,n):gt(e,t,a,n),t.child;case 11:return a=t.type,i=t.pendingProps,i=t.elementType===a?i:Rt(a,i),Ug(e,t,a,i,n);case 7:return gt(e,t,t.pendingProps,n),t.child;case 8:return gt(e,t,t.pendingProps.children,n),t.child;case 12:return gt(e,t,t.pendingProps.children,n),t.child;case 10:e:{a=t.type._context,i=t.pendingProps,o=t.memoizedProps,r=i.value;var s=t.type._context;if(Te(as,s._currentValue),s._currentValue=r,o!==null)if(s=o.value,r=jt(s,r)?0:(typeof a._calculateChangedBits=="function"?a._calculateChangedBits(s,r):1073741823)|0,r===0){if(o.children===i.children&&!pt.current){t=pn(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var l=s.dependencies;if(l!==null){o=s.child;for(var c=l.firstContext;c!==null;){if(c.context===a&&c.observedBits&r){s.tag===1&&(c=Un(-1,n&-n),c.tag=2,Ln(s,c)),s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),gg(s.return,n),l.lanes|=n;break}c=c.next}}else o=s.tag===10&&s.type===t.type?null:s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}gt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps,a=r.children,ii(t,n),i=Tt(i,r.unstable_observedBits),a=a(i),t.flags|=1,gt(e,t,a,n),t.child;case 14:return i=t.type,r=Rt(i,t.pendingProps),r=Rt(i.type,r),Lg(e,t,i,r,a,n);case 15:return Yg(e,t,t.type,t.pendingProps,a,n);case 17:return a=t.type,i=t.pendingProps,i=t.elementType===a?i:Rt(a,i),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,ht(a)?(e=!0,es(t)):e=!1,ii(t,n),xg(t,a,i),vc(t,a,i,n),Mc(null,t,a,!0,e,n);case 19:return Zg(e,t,n);case 23:return Nc(e,t,n);case 24:return Nc(e,t,n)}throw Error(L(156,t.tag))};function fC(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function At(e,t,n,a){return new fC(e,t,n,a)}function ed(e){return e=e.prototype,!(!e||!e.isReactComponent)}function gC(e){if(typeof e=="function")return ed(e)?1:0;if(e!=null){if(e=e.$$typeof,e===To)return 11;if(e===zo)return 14}return 2}function Kn(e,t){var n=e.alternate;return n===null?(n=At(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function js(e,t,n,a,i,r){var o=2;if(a=e,typeof e=="function")ed(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Pn:return mi(n.children,i,r,t);case Uh:o=8,i|=16;break;case cu:o=8,i|=1;break;case Ki:return e=At(12,n,t,i|8),e.elementType=Ki,e.type=Ki,e.lanes=r,e;case qi:return e=At(13,n,t,i),e.type=qi,e.elementType=qi,e.lanes=r,e;case Po:return e=At(19,n,t,i),e.elementType=Po,e.lanes=r,e;case gu:return td(n,i,r,t);case yu:return e=At(24,n,t,i),e.elementType=yu,e.lanes=r,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case du:o=10;break e;case mu:o=9;break e;case To:o=11;break e;case zo:o=14;break e;case pu:o=16,a=null;break e;case hu:o=22;break e}throw Error(L(130,e==null?e:typeof e,""))}return t=At(o,n,t,i),t.elementType=e,t.type=a,t.lanes=r,t}function mi(e,t,n,a){return e=At(7,e,a,t),e.lanes=n,e}function td(e,t,n,a){return e=At(23,e,a,t),e.elementType=gu,e.lanes=n,e}function nd(e,t,n){return e=At(6,e,null,t),e.lanes=n,e}function ad(e,t,n){return t=At(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function yC(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Bu(0),this.expirationTimes=Bu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bu(0),this.mutableSourceEagerHydrationData=null}function bC(e,t,n){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:sa,key:a==null?null:""+a,children:e,containerInfo:t,implementation:n}}function Ts(e,t,n,a){var i=t.current,r=wt(),o=Vn(i);e:if(n){n=n._reactInternals;t:{if(ua(n)!==n||n.tag!==1)throw Error(L(170));var s=n;do{switch(s.tag){case 3:s=s.stateNode.context;break t;case 1:if(ht(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break t}}s=s.return}while(s!==null);throw Error(L(171))}if(n.tag===1){var l=n.type;if(ht(l)){n=og(n,l,s);break e}}n=s}else n=_n;return t.context===null?t.context=n:t.pendingContext=n,t=Un(r,o),t.payload={element:e},a=a===void 0?null:a,a!==null&&(t.callback=a),Ln(i,t),Hn(i,o,r),o}function id(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function wy(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function rd(e,t){wy(e,t),(e=e.alternate)&&wy(e,t)}function kC(){return null}function od(e,t,n){var a=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new yC(e,t,n!=null&&n.hydrate===!0),t=At(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,kc(t),e[Xa]=n.current,qf(e.nodeType===8?e.parentNode:e),a)for(e=0;e<a.length;e++){t=a[e];var i=t._getVersion;i=i(t._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[t,i]:n.mutableSourceEagerHydrationData.push(t,i)}this._internalRoot=n}od.prototype.render=function(e){Ts(e,this._internalRoot,null,null)},od.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Ts(null,e,null,function(){t[Xa]=null})};function _r(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function vC(e,t){if(t||(t=e?e.nodeType===9?e.documentElement:e.firstChild:null,t=!(!t||t.nodeType!==1||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new od(e,0,t?{hydrate:!0}:void 0)}function Ps(e,t,n,a,i){var r=n._reactRootContainer;if(r){var o=r._internalRoot;if(typeof i=="function"){var s=i;i=function(){var c=id(o);s.call(c)}}Ts(t,o,e,i)}else{if(r=n._reactRootContainer=vC(n,a),o=r._internalRoot,typeof i=="function"){var l=i;i=function(){var c=id(o);l.call(c)}}py(function(){Ts(t,o,e,i)})}return id(o)}cf=function(e){if(e.tag===13){var t=wt();Hn(e,4,t),rd(e,4)}},Ou=function(e){if(e.tag===13){var t=wt();Hn(e,67108864,t),rd(e,67108864)}},df=function(e){if(e.tag===13){var t=wt(),n=Vn(e);Hn(e,n,t),rd(e,n)}},mf=function(e,t){return t()},zu=function(e,t,n){switch(t){case"input":if(wu(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var i=Xo(a);if(!i)throw Error(L(90));Bh(a),wu(a,i)}}}break;case"textarea":Kh(e,n);break;case"select":t=n.value,t!=null&&La(e,!!n.multiple,t,!1)}},Au=my,af=function(e,t,n,a,i){var r=Q;Q|=4;try{return pa(98,e.bind(null,t,n,a,i))}finally{Q=r,Q===0&&(ui(),Kt())}},Nu=function(){!(Q&49)&&(oC(),Wn())},rf=function(e,t){var n=Q;Q|=2;try{return e(t)}finally{Q=n,Q===0&&(ui(),Kt())}};function xy(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!_r(t))throw Error(L(200));return bC(e,t,null,n)}var wC={Events:[br,Qa,Xo,tf,nf,Wn,{current:!1}]},Rr={findFiberByHostInstance:ca,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},xC={bundleType:Rr.bundleType,version:Rr.version,rendererPackageName:Rr.rendererPackageName,rendererConfig:Rr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:oa.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=lf(e),e===null?null:e.stateNode},findFiberByHostInstance:Rr.findFiberByHostInstance||kC,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zs.isDisabled&&zs.supportsFiber)try{dc=zs.inject(xC),ma=zs}catch{}}$t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=wC,$t.createPortal=xy,$t.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(L(188)):Error(L(268,Object.keys(e)));return e=lf(t),e=e===null?null:e.stateNode,e},$t.flushSync=function(e,t){var n=Q;if(n&48)return e(t);Q|=1;try{if(e)return pa(99,e.bind(null,t))}finally{Q=n,Kt()}},$t.hydrate=function(e,t,n){if(!_r(t))throw Error(L(200));return Ps(null,e,t,!0,n)},$t.render=function(e,t,n){if(!_r(t))throw Error(L(200));return Ps(null,e,t,!1,n)},$t.unmountComponentAtNode=function(e){if(!_r(e))throw Error(L(40));return e._reactRootContainer?(py(function(){Ps(null,null,e,!1,function(){e._reactRootContainer=null,e[Xa]=null})}),!0):!1},$t.unstable_batchedUpdates=my,$t.unstable_createPortal=function(e,t){return xy(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)},$t.unstable_renderSubtreeIntoContainer=function(e,t,n,a){if(!_r(n))throw Error(L(200));if(e==null||e._reactInternals===void 0)throw Error(L(38));return Ps(e,t,n,!1,a)},$t.version="17.0.2";function Ey(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ey)}catch(e){console.error(e)}}Ey(),Ih.exports=$t;var sd=Ih.exports;const EC=Bi(sd),Sy=Object.prototype.toString;function ld(e){switch(Sy.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return ka(e,Error)}}function pi(e,t){return Sy.call(e)===`[object ${t}]`}function ud(e){return pi(e,"ErrorEvent")}function Cy(e){return pi(e,"DOMError")}function SC(e){return pi(e,"DOMException")}function gn(e){return pi(e,"String")}function cd(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function dd(e){return e===null||cd(e)||typeof e!="object"&&typeof e!="function"}function hi(e){return pi(e,"Object")}function As(e){return typeof Event<"u"&&ka(e,Event)}function CC(e){return typeof Element<"u"&&ka(e,Element)}function $C(e){return pi(e,"RegExp")}function Ns(e){return!!(e&&e.then&&typeof e.then=="function")}function jC(e){return hi(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function TC(e){return typeof e=="number"&&e!==e}function ka(e,t){try{return e instanceof t}catch{return!1}}function $y(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function fi(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function jy(e,t){if(!Array.isArray(e))return"";const n=[];for(let a=0;a<e.length;a++){const i=e[a];try{$y(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function PC(e,t,n=!1){return gn(e)?$C(t)?t.test(e):gn(t)?n?e===t:e.includes(t):!1:!1}function Is(e,t=[],n=!1){return t.some(a=>PC(e,a,n))}function zC(e,t,n=250,a,i,r,o){if(!r.exception||!r.exception.values||!o||!ka(o.originalException,Error))return;const s=r.exception.values.length>0?r.exception.values[r.exception.values.length-1]:void 0;s&&(r.exception.values=AC(md(e,t,i,o.originalException,a,r.exception.values,s,0),n))}function md(e,t,n,a,i,r,o,s){if(r.length>=n+1)return r;let l=[...r];if(ka(a[i],Error)){Ty(o,s);const c=e(t,a[i]),m=l.length;Py(c,i,m,s),l=md(e,t,n,a[i],i,[c,...l],c,m)}return Array.isArray(a.errors)&&a.errors.forEach((c,m)=>{if(ka(c,Error)){Ty(o,s);const f=e(t,c),p=l.length;Py(f,`errors[${m}]`,p,s),l=md(e,t,n,c,i,[f,...l],f,p)}}),l}function Ty(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function Py(e,t,n,a){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:a}}function AC(e,t){return e.map(n=>(n.value&&(n.value=fi(n.value,t)),n))}function Ms(e){return e&&e.Math==Math?e:void 0}const pe=typeof globalThis=="object"&&Ms(globalThis)||typeof window=="object"&&Ms(window)||typeof self=="object"&&Ms(self)||typeof global=="object"&&Ms(global)||function(){return this}()||{};function pd(){return pe}function zy(e,t,n){const a=n||pe,i=a.__SENTRY__=a.__SENTRY__||{};return i[e]||(i[e]=t())}const hd=pd(),NC=80;function Ay(e,t={}){if(!e)return"<unknown>";try{let n=e;const a=5,i=[];let r=0,o=0;const s=" > ",l=s.length;let c;const m=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||NC;for(;n&&r++<a&&(c=IC(n,m),!(c==="html"||r>1&&o+i.length*l+c.length>=f));)i.push(c),o+=c.length,n=n.parentNode;return i.reverse().join(s)}catch{return"<unknown>"}}function IC(e,t){const n=e,a=[];let i,r,o,s,l;if(!n||!n.tagName)return"";if(hd.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;a.push(n.tagName.toLowerCase());const c=t&&t.length?t.filter(f=>n.getAttribute(f)).map(f=>[f,n.getAttribute(f)]):null;if(c&&c.length)c.forEach(f=>{a.push(`[${f[0]}="${f[1]}"]`)});else if(n.id&&a.push(`#${n.id}`),i=n.className,i&&gn(i))for(r=i.split(/\s+/),l=0;l<r.length;l++)a.push(`.${r[l]}`);const m=["aria-label","type","name","title","alt"];for(l=0;l<m.length;l++)o=m[l],s=n.getAttribute(o),s&&a.push(`[${o}="${s}"]`);return a.join("")}function MC(){try{return hd.document.location.href}catch{return""}}function FC(e){if(!hd.HTMLElement)return null;let t=e;const n=5;for(let a=0;a<n;a++){if(!t)return null;if(t instanceof HTMLElement&&t.dataset.sentryComponent)return t.dataset.sentryComponent;t=t.parentNode}return null}const Ur=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,DC="Sentry Logger ",fd=["debug","info","warn","error","log","assert","trace"],Fs={};function Ds(e){if(!("console"in pe))return e();const t=pe.console,n={},a=Object.keys(Fs);a.forEach(i=>{const r=Fs[i];n[i]=t[i],t[i]=r});try{return e()}finally{a.forEach(i=>{t[i]=n[i]})}}function OC(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return Ur?fd.forEach(n=>{t[n]=(...a)=>{e&&Ds(()=>{pe.console[n](`${DC}[${n}]:`,...a)})}}):fd.forEach(n=>{t[n]=()=>{}}),t}const J=OC(),_C=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function RC(e){return e==="http"||e==="https"}function gi(e,t=!1){const{host:n,path:a,pass:i,port:r,projectId:o,protocol:s,publicKey:l}=e;return`${s}://${l}${t&&i?`:${i}`:""}@${n}${r?`:${r}`:""}/${a&&`${a}/`}${o}`}function UC(e){const t=_C.exec(e);if(!t){Ds(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,a,i="",r,o="",s]=t.slice(1);let l="",c=s;const m=c.split("/");if(m.length>1&&(l=m.slice(0,-1).join("/"),c=m.pop()),c){const f=c.match(/^\d+/);f&&(c=f[0])}return Ny({host:r,pass:i,path:l,projectId:c,port:o,protocol:n,publicKey:a})}function Ny(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function LC(e){if(!Ur)return!0;const{port:t,projectId:n,protocol:a}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(J.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?RC(a)?t&&isNaN(parseInt(t,10))?(J.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(J.error(`Invalid Sentry Dsn: Invalid protocol ${a}`),!1):(J.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Iy(e){const t=typeof e=="string"?UC(e):Ny(e);if(!(!t||!LC(t)))return t}class Qt extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function Ge(e,t,n){if(!(t in e))return;const a=e[t],i=n(a);typeof i=="function"&&My(i,a),e[t]=i}function Lr(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{Ur&&J.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function My(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Lr(e,"__sentry_original__",t)}catch{}}function gd(e){return e.__sentry_original__}function YC(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function Fy(e){if(ld(e))return{message:e.message,name:e.name,stack:e.stack,...Oy(e)};if(As(e)){const t={type:e.type,target:Dy(e.target),currentTarget:Dy(e.currentTarget),...Oy(e)};return typeof CustomEvent<"u"&&ka(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Dy(e){try{return CC(e)?Ay(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Oy(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function BC(e,t=40){const n=Object.keys(Fy(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return fi(n[0],t);for(let a=n.length;a>0;a--){const i=n.slice(0,a).join(", ");if(!(i.length>t))return a===n.length?i:fi(i,t)}return""}function yn(e){return yd(e,new Map)}function yd(e,t){if(VC(e)){const n=t.get(e);if(n!==void 0)return n;const a={};t.set(e,a);for(const i of Object.keys(e))typeof e[i]<"u"&&(a[i]=yd(e[i],t));return a}if(Array.isArray(e)){const n=t.get(e);if(n!==void 0)return n;const a=[];return t.set(e,a),e.forEach(i=>{a.push(yd(i,t))}),a}return e}function VC(e){if(!hi(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const _y=50,Ry=/\(error: (.*)\)/,Uy=/captureMessage|captureException/;function Ly(...e){const t=e.sort((n,a)=>n[0]-a[0]).map(n=>n[1]);return(n,a=0)=>{const i=[],r=n.split(`
|
|
41
|
+
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}We!==5&&(We=2),l=Oc(l,s),p=o;do{switch(p.tag){case 3:r=l,p.flags|=4096,t&=-t,p.lanes|=t;var F=ty(p,r,t);bg(p,F);break e;case 1:r=l;var z=p.type,R=p.stateNode;if(!(p.flags&64)&&(typeof z.getDerivedStateFromError=="function"||R!==null&&typeof R.componentDidCatch=="function"&&(Xt===null||!Xt.has(R)))){p.flags|=4096,t&=-t,p.lanes|=t;var _=ny(p,r,t);bg(p,_);break e}}p=p.return}while(p!==null)}yy(n)}catch(D){t=D,Fe===n&&n!==null&&(Fe=n=n.return);continue}break}while(!0)}function fy(){var e=ks.current;return ks.current=ys,e===null?ys:e}function Or(e,t){var n=Q;Q|=16;var a=fy();ot===e&&nt===t||di(e,t);do try{sC();break}catch(i){hy(e,i)}while(!0);if(yc(),Q=n,ks.current=a,Fe!==null)throw Error(L(261));return ot=null,nt=0,We}function sC(){for(;Fe!==null;)gy(Fe)}function lC(){for(;Fe!==null&&!BS();)gy(Fe)}function gy(e){var t=vy(e.alternate,e,ya);e.memoizedProps=e.pendingProps,t===null?yy(e):Fe=t,Yc.current=null}function yy(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=QS(t),n!==null){n.flags&=2047,Fe=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=XS(n,t,ya),n!==null){Fe=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||ya&1073741824||!(n.mode&4)){for(var a=0,i=n.child;i!==null;)a|=i.lanes|i.childLanes,i=i.sibling;n.childLanes=a}e!==null&&!(e.flags&2048)&&(e.firstEffect===null&&(e.firstEffect=t.firstEffect),t.lastEffect!==null&&(e.lastEffect!==null&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(e.lastEffect!==null?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}if(t=t.sibling,t!==null){Fe=t;return}Fe=t=e}while(t!==null);We===0&&(We=5)}function ba(e){var t=ni();return pa(99,uC.bind(null,e,t)),null}function uC(e,t){do Wn();while(Ir!==null);if(Q&48)throw Error(L(327));var n=e.finishedWork;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(L(177));e.callbackNode=null;var a=n.lanes|n.childLanes,i=a,r=e.pendingLanes&~i;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=i,e.mutableReadLanes&=i,e.entangledLanes&=i,i=e.entanglements;for(var o=e.eventTimes,s=e.expirationTimes;0<r;){var l=31-Mn(r),c=1<<l;i[l]=0,o[l]=-1,s[l]=-1,r&=~c}if(hn!==null&&!(a&24)&&hn.has(e)&&hn.delete(e),e===ot&&(Fe=ot=null,nt=0),1<n.flags?n.lastEffect!==null?(n.lastEffect.nextEffect=n,a=n.firstEffect):a=n:a=n.firstEffect,a!==null){if(i=Q,Q|=32,Yc.current=null,rc=Yo,o=Bf(),tc(o)){if("selectionStart"in o)s={start:o.selectionStart,end:o.selectionEnd};else e:if(s=(s=o.ownerDocument)&&s.defaultView||window,(c=s.getSelection&&s.getSelection())&&c.rangeCount!==0){s=c.anchorNode,r=c.anchorOffset,l=c.focusNode,c=c.focusOffset;try{s.nodeType,l.nodeType}catch{s=null;break e}var m=0,f=-1,p=-1,y=0,k=0,S=o,b=null;t:for(;;){for(var w;S!==s||r!==0&&S.nodeType!==3||(f=m+r),S!==l||c!==0&&S.nodeType!==3||(p=m+c),S.nodeType===3&&(m+=S.nodeValue.length),(w=S.firstChild)!==null;)b=S,S=w;for(;;){if(S===o)break t;if(b===s&&++y===r&&(f=m),b===l&&++k===c&&(p=m),(w=S.nextSibling)!==null)break;S=b,b=S.parentNode}S=w}s=f===-1||p===-1?null:{start:f,end:p}}else s=null;s=s||{start:0,end:0}}else s=null;oc={focusedElem:o,selectionRange:s},Yo=!1,Dr=null,Ss=!1,W=a;do try{cC()}catch(D){if(W===null)throw Error(L(330));Gn(W,D),W=W.nextEffect}while(W!==null);Dr=null,W=a;do try{for(o=e;W!==null;){var E=W.flags;if(E&16&&Xi(W.stateNode,""),E&128){var P=W.alternate;if(P!==null){var j=P.ref;j!==null&&(typeof j=="function"?j(null):j.current=null)}}switch(E&1038){case 2:ly(W),W.flags&=-3;break;case 6:ly(W),W.flags&=-3,Lc(W.alternate,W);break;case 1024:W.flags&=-1025;break;case 1028:W.flags&=-1025,Lc(W.alternate,W);break;case 4:Lc(W.alternate,W);break;case 8:s=W,uy(o,s);var F=s.alternate;oy(s),F!==null&&oy(F)}W=W.nextEffect}}catch(D){if(W===null)throw Error(L(330));Gn(W,D),W=W.nextEffect}while(W!==null);if(j=oc,P=Bf(),E=j.focusedElem,o=j.selectionRange,P!==E&&E&&E.ownerDocument&&Yf(E.ownerDocument.documentElement,E)){for(o!==null&&tc(E)&&(P=o.start,j=o.end,j===void 0&&(j=P),"selectionStart"in E?(E.selectionStart=P,E.selectionEnd=Math.min(j,E.value.length)):(j=(P=E.ownerDocument||document)&&P.defaultView||window,j.getSelection&&(j=j.getSelection(),s=E.textContent.length,F=Math.min(o.start,s),o=o.end===void 0?F:Math.min(o.end,s),!j.extend&&F>o&&(s=o,o=F,F=s),s=Lf(E,F),r=Lf(E,o),s&&r&&(j.rangeCount!==1||j.anchorNode!==s.node||j.anchorOffset!==s.offset||j.focusNode!==r.node||j.focusOffset!==r.offset)&&(P=P.createRange(),P.setStart(s.node,s.offset),j.removeAllRanges(),F>o?(j.addRange(P),j.extend(r.node,r.offset)):(P.setEnd(r.node,r.offset),j.addRange(P)))))),P=[],j=E;j=j.parentNode;)j.nodeType===1&&P.push({element:j,left:j.scrollLeft,top:j.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<P.length;E++)j=P[E],j.element.scrollLeft=j.left,j.element.scrollTop=j.top}Yo=!!rc,oc=rc=null,e.current=n,W=a;do try{for(E=e;W!==null;){var z=W.flags;if(z&36&&aC(E,W.alternate,W),z&128){P=void 0;var R=W.ref;if(R!==null){var _=W.stateNode;switch(W.tag){case 5:P=_;break;default:P=_}typeof R=="function"?R(P):R.current=P}}W=W.nextEffect}}catch(D){if(W===null)throw Error(L(330));Gn(W,D),W=W.nextEffect}while(W!==null);W=null,HS(),Q=i}else e.current=n;if(Bn)Bn=!1,Ir=e,Mr=t;else for(W=a;W!==null;)t=W.nextEffect,W.nextEffect=null,W.flags&8&&(z=W,z.sibling=null,z.stateNode=null),W=t;if(a=e.pendingLanes,a===0&&(Xt=null),a===1?e===Zc?Fr++:(Fr=0,Zc=e):Fr=0,n=n.stateNode,ma&&typeof ma.onCommitFiberRoot=="function")try{ma.onCommitFiberRoot(dc,n,void 0,(n.current.flags&64)===64)}catch{}if(zt(e,et()),ws)throw ws=!1,e=Kc,Kc=null,e;return Q&8||Kt(),null}function cC(){for(;W!==null;){var e=W.alternate;Ss||Dr===null||(W.flags&8?uf(W,Dr)&&(Ss=!0):W.tag===13&&iC(e,W)&&uf(W,Dr)&&(Ss=!0));var t=W.flags;t&256&&nC(e,W),!(t&512)||Bn||(Bn=!0,kr(97,function(){return Wn(),null})),W=W.nextEffect}}function Wn(){if(Mr!==90){var e=97<Mr?97:Mr;return Mr=90,pa(e,mC)}return!1}function dC(e,t){qc.push(t,e),Bn||(Bn=!0,kr(97,function(){return Wn(),null}))}function by(e,t){Jc.push(t,e),Bn||(Bn=!0,kr(97,function(){return Wn(),null}))}function mC(){if(Ir===null)return!1;var e=Ir;if(Ir=null,Q&48)throw Error(L(331));var t=Q;Q|=32;var n=Jc;Jc=[];for(var a=0;a<n.length;a+=2){var i=n[a],r=n[a+1],o=i.destroy;if(i.destroy=void 0,typeof o=="function")try{o()}catch(l){if(r===null)throw Error(L(330));Gn(r,l)}}for(n=qc,qc=[],a=0;a<n.length;a+=2){i=n[a],r=n[a+1];try{var s=i.create;i.destroy=s()}catch(l){if(r===null)throw Error(L(330));Gn(r,l)}}for(s=e.current.firstEffect;s!==null;)e=s.nextEffect,s.nextEffect=null,s.flags&8&&(s.sibling=null,s.stateNode=null),s=e;return Q=t,Kt(),!0}function ky(e,t,n){t=Oc(n,t),t=ty(e,t,1),Ln(e,t),t=wt(),e=Cs(e,1),e!==null&&(Lo(e,1,t),zt(e,t))}function Gn(e,t){if(e.tag===3)ky(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){ky(n,e,t);break}else if(n.tag===1){var a=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Xt===null||!Xt.has(a))){e=Oc(t,e);var i=ny(n,e,1);if(Ln(n,i),i=wt(),n=Cs(n,1),n!==null)Lo(n,1,i),zt(n,i);else if(typeof a.componentDidCatch=="function"&&(Xt===null||!Xt.has(a)))try{a.componentDidCatch(t,e)}catch{}break}}n=n.return}}function pC(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),t=wt(),e.pingedLanes|=e.suspendedLanes&n,ot===e&&(nt&n)===n&&(We===4||We===3&&(nt&62914560)===nt&&500>et()-Wc?di(e,0):Vc|=n),zt(e,t)}function hC(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(fn===0&&(fn=si),t=Wa(62914560&~fn),t===0&&(t=4194304)):t=ni()===99?1:2:t=1),n=wt(),e=Cs(e,t),e!==null&&(Lo(e,t,n),zt(e,n))}var vy;vy=function(e,t,n){var a=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||pt.current)Ut=!0;else if(n&a)Ut=!!(e.flags&16384);else{switch(Ut=!1,t.tag){case 3:Hg(t),Sc();break;case 5:$g(t);break;case 1:ht(t.type)&&es(t);break;case 4:wc(t,t.stateNode.containerInfo);break;case 10:a=t.memoizedProps.value;var i=t.type._context;Te(as,i._currentValue),i._currentValue=a;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?Wg(e,t,n):(Te(Pe,Pe.current&1),t=pn(e,t,n),t!==null?t.sibling:null);Te(Pe,Pe.current&1);break;case 19:if(a=(n&t.childLanes)!==0,e.flags&64){if(a)return Zg(e,t,n);t.flags|=64}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Te(Pe,Pe.current),a)break;return null;case 23:case 24:return t.lanes=0,Nc(e,t,n)}return pn(e,t,n)}else Ut=!1;switch(t.lanes=0,t.tag){case 2:if(a=t.type,e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=ti(t,Qe.current),ii(t,n),i=jc(null,t,a,e,i,n),t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,ht(a)){var r=!0;es(t)}else r=!1;t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,kc(t);var o=a.getDerivedStateFromProps;typeof o=="function"&&os(t,a,o,e),i.updater=ss,t.stateNode=i,i._reactInternals=t,vc(t,a,e,n),t=Mc(null,t,a,!0,r,n)}else t.tag=0,gt(null,t,i,n),t=t.child;return t;case 16:i=t.elementType;e:{switch(e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,r=i._init,i=r(i._payload),t.type=i,r=t.tag=gC(i),e=Rt(i,e),r){case 0:t=Ic(null,t,i,e,n);break e;case 1:t=Vg(null,t,i,e,n);break e;case 11:t=Ug(null,t,i,e,n);break e;case 14:t=Lg(null,t,i,Rt(i.type,e),a,n);break e}throw Error(L(306,i,""))}return t;case 0:return a=t.type,i=t.pendingProps,i=t.elementType===a?i:Rt(a,i),Ic(e,t,a,i,n);case 1:return a=t.type,i=t.pendingProps,i=t.elementType===a?i:Rt(a,i),Vg(e,t,a,i,n);case 3:if(Hg(t),a=t.updateQueue,e===null||a===null)throw Error(L(282));if(a=t.pendingProps,i=t.memoizedState,i=i!==null?i.element:null,yg(e,t),vr(t,a,null,n),a=t.memoizedState.element,a===i)Sc(),t=pn(e,t,n);else{if(i=t.stateNode,(r=i.hydrate)&&(Yn=Za(t.stateNode.containerInfo.firstChild),mn=t,r=Jt=!0),r){if(e=i.mutableSourceEagerHydrationData,e!=null)for(i=0;i<e.length;i+=2)r=e[i],r._workInProgressVersionPrimary=e[i+1],oi.push(r);for(n=Cg(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else gt(e,t,a,n),Sc();t=t.child}return t;case 5:return $g(t),e===null&&Ec(t),a=t.type,i=t.pendingProps,r=e!==null?e.memoizedProps:null,o=i.children,sc(a,i)?o=null:r!==null&&sc(a,r)&&(t.flags|=16),Bg(e,t),gt(e,t,o,n),t.child;case 6:return e===null&&Ec(t),null;case 13:return Wg(e,t,n);case 4:return wc(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=cs(t,null,a,n):gt(e,t,a,n),t.child;case 11:return a=t.type,i=t.pendingProps,i=t.elementType===a?i:Rt(a,i),Ug(e,t,a,i,n);case 7:return gt(e,t,t.pendingProps,n),t.child;case 8:return gt(e,t,t.pendingProps.children,n),t.child;case 12:return gt(e,t,t.pendingProps.children,n),t.child;case 10:e:{a=t.type._context,i=t.pendingProps,o=t.memoizedProps,r=i.value;var s=t.type._context;if(Te(as,s._currentValue),s._currentValue=r,o!==null)if(s=o.value,r=jt(s,r)?0:(typeof a._calculateChangedBits=="function"?a._calculateChangedBits(s,r):1073741823)|0,r===0){if(o.children===i.children&&!pt.current){t=pn(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var l=s.dependencies;if(l!==null){o=s.child;for(var c=l.firstContext;c!==null;){if(c.context===a&&c.observedBits&r){s.tag===1&&(c=Un(-1,n&-n),c.tag=2,Ln(s,c)),s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),gg(s.return,n),l.lanes|=n;break}c=c.next}}else o=s.tag===10&&s.type===t.type?null:s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}gt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps,a=r.children,ii(t,n),i=Tt(i,r.unstable_observedBits),a=a(i),t.flags|=1,gt(e,t,a,n),t.child;case 14:return i=t.type,r=Rt(i,t.pendingProps),r=Rt(i.type,r),Lg(e,t,i,r,a,n);case 15:return Yg(e,t,t.type,t.pendingProps,a,n);case 17:return a=t.type,i=t.pendingProps,i=t.elementType===a?i:Rt(a,i),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,ht(a)?(e=!0,es(t)):e=!1,ii(t,n),xg(t,a,i),vc(t,a,i,n),Mc(null,t,a,!0,e,n);case 19:return Zg(e,t,n);case 23:return Nc(e,t,n);case 24:return Nc(e,t,n)}throw Error(L(156,t.tag))};function fC(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function At(e,t,n,a){return new fC(e,t,n,a)}function ed(e){return e=e.prototype,!(!e||!e.isReactComponent)}function gC(e){if(typeof e=="function")return ed(e)?1:0;if(e!=null){if(e=e.$$typeof,e===To)return 11;if(e===zo)return 14}return 2}function Kn(e,t){var n=e.alternate;return n===null?(n=At(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function js(e,t,n,a,i,r){var o=2;if(a=e,typeof e=="function")ed(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Pn:return mi(n.children,i,r,t);case Uh:o=8,i|=16;break;case cu:o=8,i|=1;break;case Ki:return e=At(12,n,t,i|8),e.elementType=Ki,e.type=Ki,e.lanes=r,e;case qi:return e=At(13,n,t,i),e.type=qi,e.elementType=qi,e.lanes=r,e;case Po:return e=At(19,n,t,i),e.elementType=Po,e.lanes=r,e;case gu:return td(n,i,r,t);case yu:return e=At(24,n,t,i),e.elementType=yu,e.lanes=r,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case du:o=10;break e;case mu:o=9;break e;case To:o=11;break e;case zo:o=14;break e;case pu:o=16,a=null;break e;case hu:o=22;break e}throw Error(L(130,e==null?e:typeof e,""))}return t=At(o,n,t,i),t.elementType=e,t.type=a,t.lanes=r,t}function mi(e,t,n,a){return e=At(7,e,a,t),e.lanes=n,e}function td(e,t,n,a){return e=At(23,e,a,t),e.elementType=gu,e.lanes=n,e}function nd(e,t,n){return e=At(6,e,null,t),e.lanes=n,e}function ad(e,t,n){return t=At(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function yC(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Bu(0),this.expirationTimes=Bu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bu(0),this.mutableSourceEagerHydrationData=null}function bC(e,t,n){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:sa,key:a==null?null:""+a,children:e,containerInfo:t,implementation:n}}function Ts(e,t,n,a){var i=t.current,r=wt(),o=Vn(i);e:if(n){n=n._reactInternals;t:{if(ua(n)!==n||n.tag!==1)throw Error(L(170));var s=n;do{switch(s.tag){case 3:s=s.stateNode.context;break t;case 1:if(ht(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break t}}s=s.return}while(s!==null);throw Error(L(171))}if(n.tag===1){var l=n.type;if(ht(l)){n=og(n,l,s);break e}}n=s}else n=_n;return t.context===null?t.context=n:t.pendingContext=n,t=Un(r,o),t.payload={element:e},a=a===void 0?null:a,a!==null&&(t.callback=a),Ln(i,t),Hn(i,o,r),o}function id(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function wy(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function rd(e,t){wy(e,t),(e=e.alternate)&&wy(e,t)}function kC(){return null}function od(e,t,n){var a=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new yC(e,t,n!=null&&n.hydrate===!0),t=At(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,kc(t),e[Xa]=n.current,qf(e.nodeType===8?e.parentNode:e),a)for(e=0;e<a.length;e++){t=a[e];var i=t._getVersion;i=i(t._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[t,i]:n.mutableSourceEagerHydrationData.push(t,i)}this._internalRoot=n}od.prototype.render=function(e){Ts(e,this._internalRoot,null,null)},od.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Ts(null,e,null,function(){t[Xa]=null})};function _r(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function vC(e,t){if(t||(t=e?e.nodeType===9?e.documentElement:e.firstChild:null,t=!(!t||t.nodeType!==1||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new od(e,0,t?{hydrate:!0}:void 0)}function Ps(e,t,n,a,i){var r=n._reactRootContainer;if(r){var o=r._internalRoot;if(typeof i=="function"){var s=i;i=function(){var c=id(o);s.call(c)}}Ts(t,o,e,i)}else{if(r=n._reactRootContainer=vC(n,a),o=r._internalRoot,typeof i=="function"){var l=i;i=function(){var c=id(o);l.call(c)}}py(function(){Ts(t,o,e,i)})}return id(o)}cf=function(e){if(e.tag===13){var t=wt();Hn(e,4,t),rd(e,4)}},Ou=function(e){if(e.tag===13){var t=wt();Hn(e,67108864,t),rd(e,67108864)}},df=function(e){if(e.tag===13){var t=wt(),n=Vn(e);Hn(e,n,t),rd(e,n)}},mf=function(e,t){return t()},zu=function(e,t,n){switch(t){case"input":if(wu(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var i=Xo(a);if(!i)throw Error(L(90));Bh(a),wu(a,i)}}}break;case"textarea":Kh(e,n);break;case"select":t=n.value,t!=null&&La(e,!!n.multiple,t,!1)}},Au=my,af=function(e,t,n,a,i){var r=Q;Q|=4;try{return pa(98,e.bind(null,t,n,a,i))}finally{Q=r,Q===0&&(ui(),Kt())}},Nu=function(){!(Q&49)&&(oC(),Wn())},rf=function(e,t){var n=Q;Q|=2;try{return e(t)}finally{Q=n,Q===0&&(ui(),Kt())}};function xy(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!_r(t))throw Error(L(200));return bC(e,t,null,n)}var wC={Events:[br,Qa,Xo,tf,nf,Wn,{current:!1}]},Rr={findFiberByHostInstance:ca,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},xC={bundleType:Rr.bundleType,version:Rr.version,rendererPackageName:Rr.rendererPackageName,rendererConfig:Rr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:oa.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=lf(e),e===null?null:e.stateNode},findFiberByHostInstance:Rr.findFiberByHostInstance||kC,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zs.isDisabled&&zs.supportsFiber)try{dc=zs.inject(xC),ma=zs}catch{}}$t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=wC,$t.createPortal=xy,$t.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(L(188)):Error(L(268,Object.keys(e)));return e=lf(t),e=e===null?null:e.stateNode,e},$t.flushSync=function(e,t){var n=Q;if(n&48)return e(t);Q|=1;try{if(e)return pa(99,e.bind(null,t))}finally{Q=n,Kt()}},$t.hydrate=function(e,t,n){if(!_r(t))throw Error(L(200));return Ps(null,e,t,!0,n)},$t.render=function(e,t,n){if(!_r(t))throw Error(L(200));return Ps(null,e,t,!1,n)},$t.unmountComponentAtNode=function(e){if(!_r(e))throw Error(L(40));return e._reactRootContainer?(py(function(){Ps(null,null,e,!1,function(){e._reactRootContainer=null,e[Xa]=null})}),!0):!1},$t.unstable_batchedUpdates=my,$t.unstable_createPortal=function(e,t){return xy(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)},$t.unstable_renderSubtreeIntoContainer=function(e,t,n,a){if(!_r(n))throw Error(L(200));if(e==null||e._reactInternals===void 0)throw Error(L(38));return Ps(e,t,n,!1,a)},$t.version="17.0.2";function Ey(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ey)}catch(e){console.error(e)}}Ey(),Ih.exports=$t;var sd=Ih.exports;const EC=Bi(sd),Sy=Object.prototype.toString;function ld(e){switch(Sy.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return ka(e,Error)}}function pi(e,t){return Sy.call(e)===`[object ${t}]`}function ud(e){return pi(e,"ErrorEvent")}function Cy(e){return pi(e,"DOMError")}function SC(e){return pi(e,"DOMException")}function gn(e){return pi(e,"String")}function cd(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function dd(e){return e===null||cd(e)||typeof e!="object"&&typeof e!="function"}function hi(e){return pi(e,"Object")}function As(e){return typeof Event<"u"&&ka(e,Event)}function CC(e){return typeof Element<"u"&&ka(e,Element)}function $C(e){return pi(e,"RegExp")}function Ns(e){return!!(e&&e.then&&typeof e.then=="function")}function jC(e){return hi(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function TC(e){return typeof e=="number"&&e!==e}function ka(e,t){try{return e instanceof t}catch{return!1}}function $y(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function fi(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function jy(e,t){if(!Array.isArray(e))return"";const n=[];for(let a=0;a<e.length;a++){const i=e[a];try{$y(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function PC(e,t,n=!1){return gn(e)?$C(t)?t.test(e):gn(t)?n?e===t:e.includes(t):!1:!1}function Is(e,t=[],n=!1){return t.some(a=>PC(e,a,n))}function zC(e,t,n=250,a,i,r,o){if(!r.exception||!r.exception.values||!o||!ka(o.originalException,Error))return;const s=r.exception.values.length>0?r.exception.values[r.exception.values.length-1]:void 0;s&&(r.exception.values=AC(md(e,t,i,o.originalException,a,r.exception.values,s,0),n))}function md(e,t,n,a,i,r,o,s){if(r.length>=n+1)return r;let l=[...r];if(ka(a[i],Error)){Ty(o,s);const c=e(t,a[i]),m=l.length;Py(c,i,m,s),l=md(e,t,n,a[i],i,[c,...l],c,m)}return Array.isArray(a.errors)&&a.errors.forEach((c,m)=>{if(ka(c,Error)){Ty(o,s);const f=e(t,c),p=l.length;Py(f,`errors[${m}]`,p,s),l=md(e,t,n,c,i,[f,...l],f,p)}}),l}function Ty(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function Py(e,t,n,a){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:a}}function AC(e,t){return e.map(n=>(n.value&&(n.value=fi(n.value,t)),n))}function Ms(e){return e&&e.Math==Math?e:void 0}const pe=typeof globalThis=="object"&&Ms(globalThis)||typeof window=="object"&&Ms(window)||typeof self=="object"&&Ms(self)||typeof global=="object"&&Ms(global)||function(){return this}()||{};function pd(){return pe}function zy(e,t,n){const a=n||pe,i=a.__SENTRY__=a.__SENTRY__||{};return i[e]||(i[e]=t())}const hd=pd(),NC=80;function Ay(e,t={}){if(!e)return"<unknown>";try{let n=e;const a=5,i=[];let r=0,o=0;const s=" > ",l=s.length;let c;const m=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||NC;for(;n&&r++<a&&(c=IC(n,m),!(c==="html"||r>1&&o+i.length*l+c.length>=f));)i.push(c),o+=c.length,n=n.parentNode;return i.reverse().join(s)}catch{return"<unknown>"}}function IC(e,t){const n=e,a=[];let i,r,o,s,l;if(!n||!n.tagName)return"";if(hd.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;a.push(n.tagName.toLowerCase());const c=t&&t.length?t.filter(f=>n.getAttribute(f)).map(f=>[f,n.getAttribute(f)]):null;if(c&&c.length)c.forEach(f=>{a.push(`[${f[0]}="${f[1]}"]`)});else if(n.id&&a.push(`#${n.id}`),i=n.className,i&&gn(i))for(r=i.split(/\s+/),l=0;l<r.length;l++)a.push(`.${r[l]}`);const m=["aria-label","type","name","title","alt"];for(l=0;l<m.length;l++)o=m[l],s=n.getAttribute(o),s&&a.push(`[${o}="${s}"]`);return a.join("")}function MC(){try{return hd.document.location.href}catch{return""}}function FC(e){if(!hd.HTMLElement)return null;let t=e;const n=5;for(let a=0;a<n;a++){if(!t)return null;if(t instanceof HTMLElement&&t.dataset.sentryComponent)return t.dataset.sentryComponent;t=t.parentNode}return null}const Ur=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,DC="Sentry Logger ",fd=["debug","info","warn","error","log","assert","trace"],Fs={};function Ds(e){if(!("console"in pe))return e();const t=pe.console,n={},a=Object.keys(Fs);a.forEach(i=>{const r=Fs[i];n[i]=t[i],t[i]=r});try{return e()}finally{a.forEach(i=>{t[i]=n[i]})}}function OC(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return Ur?fd.forEach(n=>{t[n]=(...a)=>{e&&Ds(()=>{pe.console[n](`${DC}[${n}]:`,...a)})}}):fd.forEach(n=>{t[n]=()=>{}}),t}const J=OC(),_C=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function RC(e){return e==="http"||e==="https"}function gi(e,t=!1){const{host:n,path:a,pass:i,port:r,projectId:o,protocol:s,publicKey:l}=e;return`${s}://${l}${t&&i?`:${i}`:""}@${n}${r?`:${r}`:""}/${a&&`${a}/`}${o}`}function UC(e){const t=_C.exec(e);if(!t){Ds(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,a,i="",r,o="",s]=t.slice(1);let l="",c=s;const m=c.split("/");if(m.length>1&&(l=m.slice(0,-1).join("/"),c=m.pop()),c){const f=c.match(/^\d+/);f&&(c=f[0])}return Ny({host:r,pass:i,path:l,projectId:c,port:o,protocol:n,publicKey:a})}function Ny(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function LC(e){if(!Ur)return!0;const{port:t,projectId:n,protocol:a}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(J.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?RC(a)?t&&isNaN(parseInt(t,10))?(J.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(J.error(`Invalid Sentry Dsn: Invalid protocol ${a}`),!1):(J.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Iy(e){const t=typeof e=="string"?UC(e):Ny(e);if(!(!t||!LC(t)))return t}class Qt extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function Ge(e,t,n){if(!(t in e))return;const a=e[t],i=n(a);typeof i=="function"&&My(i,a),e[t]=i}function Lr(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{Ur&&J.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function My(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Lr(e,"__sentry_original__",t)}catch{}}function gd(e){return e.__sentry_original__}function YC(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function Fy(e){if(ld(e))return{message:e.message,name:e.name,stack:e.stack,...Oy(e)};if(As(e)){const t={type:e.type,target:Dy(e.target),currentTarget:Dy(e.currentTarget),...Oy(e)};return typeof CustomEvent<"u"&&ka(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Dy(e){try{return CC(e)?Ay(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Oy(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function BC(e,t=40){const n=Object.keys(Fy(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return fi(n[0],t);for(let a=n.length;a>0;a--){const i=n.slice(0,a).join(", ");if(!(i.length>t))return a===n.length?i:fi(i,t)}return""}function yn(e){return yd(e,new Map)}function yd(e,t){if(VC(e)){const n=t.get(e);if(n!==void 0)return n;const a={};t.set(e,a);for(const i of Object.keys(e))typeof e[i]<"u"&&(a[i]=yd(e[i],t));return a}if(Array.isArray(e)){const n=t.get(e);if(n!==void 0)return n;const a=[];return t.set(e,a),e.forEach(i=>{a.push(yd(i,t))}),a}return e}function VC(e){if(!hi(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const _y=50,Ry=/\(error: (.*)\)/,Uy=/captureMessage|captureException/;function Ly(...e){const t=e.sort((n,a)=>n[0]-a[0]).map(n=>n[1]);return(n,a=0)=>{const i=[],r=n.split(`
|
|
42
42
|
`);for(let o=a;o<r.length;o++){const s=r[o];if(s.length>1024)continue;const l=Ry.test(s)?s.replace(Ry,"$1"):s;if(!l.match(/\S*Error: /)){for(const c of t){const m=c(l);if(m){i.push(m);break}}if(i.length>=_y)break}}return WC(i)}}function HC(e){return Array.isArray(e)?Ly(...e):e}function WC(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),Uy.test(t[t.length-1].function||"")&&(t.pop(),Uy.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,_y).map(n=>({...n,filename:n.filename||t[t.length-1].filename,function:n.function||"?"}))}const bd="<anonymous>";function qn(e){try{return!e||typeof e!="function"?bd:e.name||bd}catch{return bd}}const Os={},Yy={};function va(e,t){Os[e]=Os[e]||[],Os[e].push(t)}function wa(e,t){Yy[e]||(t(),Yy[e]=!0)}function Lt(e,t){const n=e&&Os[e];if(n)for(const a of n)try{a(t)}catch(i){Ur&&J.error(`Error while triggering instrumentation handler.
|
|
43
43
|
Type: ${e}
|
|
44
44
|
Name: ${qn(a)}
|
|
@@ -48,7 +48,7 @@ ${JSON.stringify(s)}
|
|
|
48
48
|
Sentry.addTracingExtensions();
|
|
49
49
|
Sentry.init({...});
|
|
50
50
|
`):J.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),a}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const n=this.getStackTop().scope,a=n.getSession();a&&ib(a),this._sendSessionUpdate(),n.setSession()}startSession(t){const{scope:n,client:a}=this.getStackTop(),{release:i,environment:r=Ys}=a&&a.getOptions()||{},{userAgent:o}=pe.navigator||{},s=ab({release:i,environment:r,user:n.getUser(),...o&&{userAgent:o},...t}),l=n.getSession&&n.getSession();return l&&l.status==="ok"&&xa(l,{status:"exited"}),this.endSession(),n.setSession(s),s}shouldSendDefaultPii(){const t=this.getClient(),n=t&&t.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:n}=this.getStackTop(),a=t.getSession();a&&n&&n.captureSession&&n.captureSession(a)}_callExtensionMethod(t,...n){const i=Hs().__SENTRY__;if(i&&i.extensions&&typeof i.extensions[t]=="function")return i.extensions[t].apply(this,n);ke&&J.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function Hs(){return pe.__SENTRY__=pe.__SENTRY__||{extensions:{},hub:void 0},pe}function kb(e){const t=Hs(),n=Nd(t);return vb(t,e),n}function en(){const e=Hs();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return u0(e)}function Ws(){return en().getIsolationScope()}function u0(e=Hs()){return(!c0(e)||Nd(e).isOlderThan(yb))&&vb(e,new bb),Nd(e)}function c0(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function Nd(e){return zy("hub",()=>new bb,e)}function vb(e,t){if(!e)return!1;const n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}function d0(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function m0(e,t,n,a){const i=nb(n),r={sent_at:new Date().toISOString(),...i&&{sdk:i},...!!a&&t&&{dsn:gi(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return ki(r,[o])}function p0(e,t,n,a){const i=nb(n),r=e.type&&e.type!=="replay_event"?e.type:"event";d0(e,n&&n.sdk);const o=z$(e,i,a,t);return delete e.sdkProcessingMetadata,ki(o,[[{type:r},e]])}const h0="7";function wb(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function f0(e){return`${wb(e)}${e.projectId}/envelope/`}function g0(e,t){return YC({sentry_key:e.publicKey,sentry_version:h0,...t&&{sentry_client:`${t.name}/${t.version}`}})}function y0(e,t={}){const n=typeof t=="string"?t:t.tunnel,a=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return n||`${f0(e)}?${g0(e,a)}`}function b0(e,t){const n=Iy(e);if(!n)return"";const a=`${wb(n)}embed/error-page/`;let i=`dsn=${gi(n)}`;for(const r in t)if(r!=="dsn"&&r!=="onClose")if(r==="user"){const o=t.user;if(!o)continue;o.name&&(i+=`&name=${encodeURIComponent(o.name)}`),o.email&&(i+=`&email=${encodeURIComponent(o.email)}`)}else i+=`&${encodeURIComponent(r)}=${encodeURIComponent(t[r])}`;return`${a}?${i}`}const xb=[];function k0(e){const t={};return e.forEach(n=>{const{name:a}=n,i=t[a];i&&!i.isDefaultInstance&&n.isDefaultInstance||(t[a]=n)}),Object.keys(t).map(n=>t[n])}function v0(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let a;Array.isArray(n)?a=[...t,...n]:typeof n=="function"?a=Hy(n(t)):a=t;const i=k0(a),r=x0(i,o=>o.name==="Debug");if(r!==-1){const[o]=i.splice(r,1);i.push(o)}return i}function w0(e,t){const n={};return t.forEach(a=>{a&&Sb(e,a,n)}),n}function Eb(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function Sb(e,t,n){if(n[t.name]){ke&&J.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,xb.indexOf(t.name)===-1&&(t.setupOnce(O$,en),xb.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),e.on&&typeof t.preprocessEvent=="function"){const a=t.preprocessEvent.bind(t);e.on("preprocessEvent",(i,r)=>a(i,r,e))}if(e.addEventProcessor&&typeof t.processEvent=="function"){const a=t.processEvent.bind(t),i=(r,o)=>a(r,o,e);i.id=t.name,e.addEventProcessor(i)}ke&&J.log(`Integration installed: ${t.name}`)}function x0(e,t){for(let n=0;n<e.length;n++)if(t(e[n])===!0)return n;return-1}function nY(e){return e}function E0(e){let t="";for(const n of e){const a=Object.entries(n.tags),i=a.length>0?`|#${a.map(([r,o])=>`${r}:${o}`).join(",")}`:"";t+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${i}|T${n.timestamp}
|
|
51
|
-
`}return t}function S0(e,t,n,a){const i={sent_at:new Date().toISOString()};n&&n.sdk&&(i.sdk={name:n.sdk.name,version:n.sdk.version}),a&&t&&(i.dsn=gi(t));const r=C0(e);return ki(i,[r])}function C0(e){const t=E0(e);return[{type:"statsd",length:t.length},t]}const Cb="Not capturing exception because it's already been captured.";class $0{constructor(t){if(this._options=t,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Iy(t.dsn):ke&&J.warn("No DSN provided, client will not send events."),this._dsn){const n=y0(this._dsn,t);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,a){if(Vy(t)){ke&&J.log(Cb);return}let i=n&&n.event_id;return this._process(this.eventFromException(t,n).then(r=>this._captureEvent(r,n,a)).then(r=>{i=r})),i}captureMessage(t,n,a,i){let r=a&&a.event_id;const o=cd(t)?t:String(t),s=dd(t)?this.eventFromMessage(o,n,a):this.eventFromException(t,a);return this._process(s.then(l=>this._captureEvent(l,a,i)).then(l=>{r=l})),r}captureEvent(t,n,a){if(n&&n.originalException&&Vy(n.originalException)){ke&&J.log(Cb);return}let i=n&&n.event_id;const o=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,n,o||a).then(s=>{i=s})),i}captureSession(t){typeof t.release!="string"?ke&&J.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),xa(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(t).then(a=>n.flush(t).then(i=>a&&i))):bi(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}setupIntegrations(t){(t&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(t){return this.getIntegrationByName(t)}getIntegrationByName(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch{return ke&&J.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){const n=this._integrations[t.name];Sb(this,t,this._integrations),n||Eb(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let a=p0(t,this._dsn,this._options._metadata,this._options.tunnel);for(const r of n.attachments||[])a=C$(a,T$(r,this._options.transportOptions&&this._options.transportOptions.textEncoder));const i=this._sendEnvelope(a);i&&i.then(r=>this.emit("afterSendEvent",t,r),null)}sendSession(t){const n=m0(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}recordDroppedEvent(t,n,a){if(this._options.sendClientReports){const i=typeof a=="number"?a:1,r=`${t}:${n}`;ke&&J.log(`Recording outcome: "${r}"${i>1?` (${i} times)`:""}`),this._outcomes[r]=(this._outcomes[r]||0)+i}}captureAggregateMetrics(t){ke&&J.log(`Flushing aggregated metrics, number of metrics: ${t.length}`);const n=S0(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}on(t,n){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(n)}emit(t,...n){this._hooks[t]&&this._hooks[t].forEach(a=>a(...n))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=w0(this,t),Eb(this,t),this._integrationsInitialized=!0}_updateSessionFromEvent(t,n){let a=!1,i=!1;const r=n.exception&&n.exception.values;if(r){i=!0;for(const l of r){const c=l.mechanism;if(c&&c.handled===!1){a=!0;break}}}const o=t.status==="ok";(o&&t.errors===0||o&&a)&&(xa(t,{...a&&{status:"crashed"},errors:t.errors||Number(i||a)}),this.captureSession(t))}_isClientDoneProcessing(t){return new xt(n=>{let a=0;const i=1,r=setInterval(()=>{this._numProcessing==0?(clearInterval(r),n(!0)):(a+=i,t&&a>=t&&(clearInterval(r),n(!1)))},i)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,a,i=Ws()){const r=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o.length>0&&(n.integrations=o),this.emit("preprocessEvent",t,n),B$(r,t,n,a,this,i).then(s=>{if(s===null)return s;const l={...i.getPropagationContext(),...a?a.getPropagationContext():void 0};if(!(s.contexts&&s.contexts.trace)&&l){const{traceId:m,spanId:f,parentSpanId:p,dsc:y}=l;s.contexts={trace:{trace_id:m,span_id:f,parent_span_id:p},...s.contexts};const k=y||pb(m,this,a);s.sdkProcessingMetadata={dynamicSamplingContext:k,...s.sdkProcessingMetadata}}return s})}_captureEvent(t,n={},a){return this._processEvent(t,n,a).then(i=>i.event_id,i=>{if(ke){const r=i;r.logLevel==="log"?J.log(r.message):J.warn(r)}})}_processEvent(t,n,a){const i=this.getOptions(),{sampleRate:r}=i,o=jb(t),s=$b(t),l=t.type||"error",c=`before send for type \`${l}\``;if(s&&typeof r=="number"&&Math.random()>r)return this.recordDroppedEvent("sample_rate","error",t),$d(new Qt(`Discarding event because it's not included in the random sample (sampling rate = ${r})`,"log"));const m=l==="replay_event"?"replay":l,p=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,n,a,p).then(y=>{if(y===null)throw this.recordDroppedEvent("event_processor",m,t),new Qt("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return y;const
|
|
51
|
+
`}return t}function S0(e,t,n,a){const i={sent_at:new Date().toISOString()};n&&n.sdk&&(i.sdk={name:n.sdk.name,version:n.sdk.version}),a&&t&&(i.dsn=gi(t));const r=C0(e);return ki(i,[r])}function C0(e){const t=E0(e);return[{type:"statsd",length:t.length},t]}const Cb="Not capturing exception because it's already been captured.";class $0{constructor(t){if(this._options=t,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Iy(t.dsn):ke&&J.warn("No DSN provided, client will not send events."),this._dsn){const n=y0(this._dsn,t);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,a){if(Vy(t)){ke&&J.log(Cb);return}let i=n&&n.event_id;return this._process(this.eventFromException(t,n).then(r=>this._captureEvent(r,n,a)).then(r=>{i=r})),i}captureMessage(t,n,a,i){let r=a&&a.event_id;const o=cd(t)?t:String(t),s=dd(t)?this.eventFromMessage(o,n,a):this.eventFromException(t,a);return this._process(s.then(l=>this._captureEvent(l,a,i)).then(l=>{r=l})),r}captureEvent(t,n,a){if(n&&n.originalException&&Vy(n.originalException)){ke&&J.log(Cb);return}let i=n&&n.event_id;const o=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,n,o||a).then(s=>{i=s})),i}captureSession(t){typeof t.release!="string"?ke&&J.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),xa(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(t).then(a=>n.flush(t).then(i=>a&&i))):bi(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}setupIntegrations(t){(t&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(t){return this.getIntegrationByName(t)}getIntegrationByName(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch{return ke&&J.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){const n=this._integrations[t.name];Sb(this,t,this._integrations),n||Eb(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let a=p0(t,this._dsn,this._options._metadata,this._options.tunnel);for(const r of n.attachments||[])a=C$(a,T$(r,this._options.transportOptions&&this._options.transportOptions.textEncoder));const i=this._sendEnvelope(a);i&&i.then(r=>this.emit("afterSendEvent",t,r),null)}sendSession(t){const n=m0(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}recordDroppedEvent(t,n,a){if(this._options.sendClientReports){const i=typeof a=="number"?a:1,r=`${t}:${n}`;ke&&J.log(`Recording outcome: "${r}"${i>1?` (${i} times)`:""}`),this._outcomes[r]=(this._outcomes[r]||0)+i}}captureAggregateMetrics(t){ke&&J.log(`Flushing aggregated metrics, number of metrics: ${t.length}`);const n=S0(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}on(t,n){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(n)}emit(t,...n){this._hooks[t]&&this._hooks[t].forEach(a=>a(...n))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=w0(this,t),Eb(this,t),this._integrationsInitialized=!0}_updateSessionFromEvent(t,n){let a=!1,i=!1;const r=n.exception&&n.exception.values;if(r){i=!0;for(const l of r){const c=l.mechanism;if(c&&c.handled===!1){a=!0;break}}}const o=t.status==="ok";(o&&t.errors===0||o&&a)&&(xa(t,{...a&&{status:"crashed"},errors:t.errors||Number(i||a)}),this.captureSession(t))}_isClientDoneProcessing(t){return new xt(n=>{let a=0;const i=1,r=setInterval(()=>{this._numProcessing==0?(clearInterval(r),n(!0)):(a+=i,t&&a>=t&&(clearInterval(r),n(!1)))},i)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,a,i=Ws()){const r=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o.length>0&&(n.integrations=o),this.emit("preprocessEvent",t,n),B$(r,t,n,a,this,i).then(s=>{if(s===null)return s;const l={...i.getPropagationContext(),...a?a.getPropagationContext():void 0};if(!(s.contexts&&s.contexts.trace)&&l){const{traceId:m,spanId:f,parentSpanId:p,dsc:y}=l;s.contexts={trace:{trace_id:m,span_id:f,parent_span_id:p},...s.contexts};const k=y||pb(m,this,a);s.sdkProcessingMetadata={dynamicSamplingContext:k,...s.sdkProcessingMetadata}}return s})}_captureEvent(t,n={},a){return this._processEvent(t,n,a).then(i=>i.event_id,i=>{if(ke){const r=i;r.logLevel==="log"?J.log(r.message):J.warn(r)}})}_processEvent(t,n,a){const i=this.getOptions(),{sampleRate:r}=i,o=jb(t),s=$b(t),l=t.type||"error",c=`before send for type \`${l}\``;if(s&&typeof r=="number"&&Math.random()>r)return this.recordDroppedEvent("sample_rate","error",t),$d(new Qt(`Discarding event because it's not included in the random sample (sampling rate = ${r})`,"log"));const m=l==="replay_event"?"replay":l,p=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,n,a,p).then(y=>{if(y===null)throw this.recordDroppedEvent("event_processor",m,t),new Qt("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return y;const S=T0(i,y,n);return j0(S,c)}).then(y=>{if(y===null){if(this.recordDroppedEvent("before_send",m,t),o){const w=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",w)}throw new Qt(`${c} returned \`null\`, will not send event.`,"log")}const k=a&&a.getSession();if(!o&&k&&this._updateSessionFromEvent(k,y),o){const b=y.sdkProcessingMetadata&&y.sdkProcessingMetadata.spanCountBeforeProcessing||0,w=y.spans?y.spans.length:0,E=b-w;E>0&&this.recordDroppedEvent("before_send","span",E)}const S=y.transaction_info;if(o&&S&&y.transaction!==t.transaction){const b="custom";y.transaction_info={...S,source:b}}return this.sendEvent(y,n),y}).then(null,y=>{throw y instanceof Qt?y:(this.captureException(y,{data:{__sentry__:!0},originalException:y}),new Qt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
52
52
|
Reason: ${y}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)return this._transport.send(t).then(null,n=>{ke&&J.error("Error while sending event:",n)});ke&&J.error("Transport disabled")}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.keys(t).map(n=>{const[a,i]=n.split(":");return{reason:a,category:i,quantity:t[n]}})}}function j0(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Ns(e))return e.then(a=>{if(!hi(a)&&a!==null)throw new Qt(n);return a},a=>{throw new Qt(`${t} rejected with ${a}`)});if(!hi(e)&&e!==null)throw new Qt(n);return e}function T0(e,t,n){const{beforeSend:a,beforeSendTransaction:i}=e;if($b(t)&&a)return a(t,n);if(jb(t)&&i){if(t.spans){const r=t.spans.length;t.sdkProcessingMetadata={...t.sdkProcessingMetadata,spanCountBeforeProcessing:r}}return i(t,n)}return t}function $b(e){return e.type===void 0}function jb(e){return e.type==="transaction"}function P0(e,t){t.debug===!0&&(ke?J.enable():Ds(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Gr().update(t.initialScope);const a=new e(t);z0(a),A0(a)}function z0(e){const n=en().getStackTop();n.client=e,n.scope.setClient(e)}function A0(e){e.init?e.init():e.setupIntegrations&&e.setupIntegrations()}const N0=30;function Tb(e,t,n=w$(e.bufferSize||N0)){let a={};const i=o=>n.drain(o);function r(o){const s=[];if(eb(o,(f,p)=>{const y=tb(p);if(F$(a,y)){const k=Pb(f,p);e.recordDroppedEvent("ratelimit_backoff",y,k)}else s.push(f)}),s.length===0)return bi();const l=ki(o[0],s),c=f=>{eb(l,(p,y)=>{const k=Pb(p,y);e.recordDroppedEvent(f,tb(y),k)})},m=()=>t({body:$$(l,e.textEncoder)}).then(f=>(f.statusCode!==void 0&&(f.statusCode<200||f.statusCode>=300)&&ke&&J.warn(`Sentry responded with status code ${f.statusCode} to sent event.`),a=D$(a,f),f),f=>{throw c("network_error"),f});return n.add(m).then(f=>f,f=>{if(f instanceof Qt)return ke&&J.error("Skipped sending event because buffer is full."),c("queue_overflow"),bi();throw f})}return r.__sentry__baseTransport__=!0,{send:r,flush:i}}function Pb(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function zb(e,t,n=[t],a="npm"){const i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:n.map(r=>({name:`${a}:@sentry/${r}`,version:Ad})),version:Ad}),e._metadata=i}const I0=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],M0=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],F0="InboundFilters",D0=(e={})=>({name:F0,setupOnce(){},processEvent(t,n,a){const i=a.getOptions(),r=O0(e,i);return _0(t,r)?null:t}});function O0(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:I0],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:M0],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function _0(e,t){return t.ignoreInternal&&V0(e)?(ke&&J.warn(`Event dropped due to being internal Sentry Error.
|
|
53
53
|
Event: ${Jn(e)}`),!0):R0(e,t.ignoreErrors)?(ke&&J.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
54
54
|
Event: ${Jn(e)}`),!0):U0(e,t.ignoreTransactions)?(ke&&J.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
@@ -63,7 +63,7 @@ Url: ${Gs(e)}`),!0)}function R0(e,t){return e.type||!t||!t.length?!1:B0(e).some(
|
|
|
63
63
|
*
|
|
64
64
|
* This source code is licensed under the MIT license found in the
|
|
65
65
|
* LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/var Be=typeof Symbol=="function"&&Symbol.for,Rd=Be?Symbol.for("react.element"):60103,Ud=Be?Symbol.for("react.portal"):60106,Zs=Be?Symbol.for("react.fragment"):60107,Xs=Be?Symbol.for("react.strict_mode"):60108,Qs=Be?Symbol.for("react.profiler"):60114,el=Be?Symbol.for("react.provider"):60109,tl=Be?Symbol.for("react.context"):60110,Ld=Be?Symbol.for("react.async_mode"):60111,nl=Be?Symbol.for("react.concurrent_mode"):60111,al=Be?Symbol.for("react.forward_ref"):60112,il=Be?Symbol.for("react.suspense"):60113,fT=Be?Symbol.for("react.suspense_list"):60120,rl=Be?Symbol.for("react.memo"):60115,ol=Be?Symbol.for("react.lazy"):60116,gT=Be?Symbol.for("react.block"):60121,yT=Be?Symbol.for("react.fundamental"):60117,bT=Be?Symbol.for("react.responder"):60118,kT=Be?Symbol.for("react.scope"):60119;function Et(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Rd:switch(e=e.type,e){case Ld:case nl:case Zs:case Qs:case Xs:case il:return e;default:switch(e=e&&e.$$typeof,e){case tl:case al:case ol:case rl:case el:return e;default:return t}}case Ud:return t}}}function qb(e){return Et(e)===nl}fe.AsyncMode=Ld,fe.ConcurrentMode=nl,fe.ContextConsumer=tl,fe.ContextProvider=el,fe.Element=Rd,fe.ForwardRef=al,fe.Fragment=Zs,fe.Lazy=ol,fe.Memo=rl,fe.Portal=Ud,fe.Profiler=Qs,fe.StrictMode=Xs,fe.Suspense=il,fe.isAsyncMode=function(e){return qb(e)||Et(e)===Ld},fe.isConcurrentMode=qb,fe.isContextConsumer=function(e){return Et(e)===tl},fe.isContextProvider=function(e){return Et(e)===el},fe.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Rd},fe.isForwardRef=function(e){return Et(e)===al},fe.isFragment=function(e){return Et(e)===Zs},fe.isLazy=function(e){return Et(e)===ol},fe.isMemo=function(e){return Et(e)===rl},fe.isPortal=function(e){return Et(e)===Ud},fe.isProfiler=function(e){return Et(e)===Qs},fe.isStrictMode=function(e){return Et(e)===Xs},fe.isSuspense=function(e){return Et(e)===il},fe.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Zs||e===nl||e===Qs||e===Xs||e===il||e===fT||typeof e=="object"&&e!==null&&(e.$$typeof===ol||e.$$typeof===rl||e.$$typeof===el||e.$$typeof===tl||e.$$typeof===al||e.$$typeof===yT||e.$$typeof===bT||e.$$typeof===kT||e.$$typeof===gT)},fe.typeOf=Et,Kb.exports=fe;var vT=Kb.exports,Jb=vT,wT={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},xT={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Zb={};Zb[Jb.ForwardRef]=wT,Zb[Jb.Memo]=xT;const ET=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function ST(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}const Xb={componentStack:null,error:null,eventId:null};function CT(e,t){const n=new WeakMap;function a(i,r){if(!n.has(i)){if(i.cause)return n.set(i,!0),a(i.cause,r);i.cause=r}}a(e,t)}class Yd extends S.Component{constructor(t){super(t),Yd.prototype.__init.call(this),this.state=Xb,this._openFallbackReportDialog=!0;const n=st();n&&n.on&&t.showDialog&&(this._openFallbackReportDialog=!1,n.on("afterSendEvent",a=>{!a.type&&a.event_id===this._lastEventId&&Vb({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,{componentStack:n}){const{beforeCapture:a,onError:i,showDialog:r,dialogOptions:o}=this.props;sb(s=>{if(ST(S.version)&&ld(t)){const c=new Error(t.message);c.name=`React ErrorBoundary ${t.name}`,c.stack=n,CT(t,c)}a&&a(s,t,n);const l=Vs(t,{captureContext:{contexts:{react:{componentStack:n}}},mechanism:{handled:!!this.props.fallback}});i&&i(t,n,l),r&&(this._lastEventId=l,this._openFallbackReportDialog&&Vb({...o,eventId:l})),this.setState({error:t,componentStack:n,eventId:l})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:n,eventId:a}=this.state,{onUnmount:i}=this.props;i&&i(t,n,a)}__init(){this.resetErrorBoundary=()=>{const{onReset:t}=this.props,{error:n,componentStack:a,eventId:i}=this.state;t&&t(n,a,i),this.setState(Xb)}}render(){const{fallback:t,children:n}=this.props,a=this.state;if(a.error){let i;return typeof t=="function"?i=t({error:a.error,componentStack:a.componentStack,resetError:this.resetErrorBoundary,eventId:a.eventId}):i=t,S.isValidElement(i)?i:(t&&ET&&J.warn("fallback did not produce a valid ReactElement"),null)}return typeof n=="function"?n():n}}var wi={exports:{}},Jr={exports:{}};const ee=e=>typeof e=="string",Zr=()=>{let e,t;const n=new Promise((a,i)=>{e=a,t=i});return n.resolve=e,n.reject=t,n},Qb=e=>e==null?"":""+e,$T=(e,t,n)=>{e.forEach(a=>{t[a]&&(n[a]=t[a])})},jT=/###/g,ek=e=>e&&e.indexOf("###")>-1?e.replace(jT,"."):e,tk=e=>!e||ee(e),Xr=(e,t,n)=>{const a=ee(t)?t.split("."):t;let i=0;for(;i<a.length-1;){if(tk(e))return{};const r=ek(a[i]);!e[r]&&n&&(e[r]=new n),Object.prototype.hasOwnProperty.call(e,r)?e=e[r]:e={},++i}return tk(e)?{}:{obj:e,k:ek(a[i])}},nk=(e,t,n)=>{const{obj:a,k:i}=Xr(e,t,Object);if(a!==void 0||t.length===1){a[i]=n;return}let r=t[t.length-1],o=t.slice(0,t.length-1),s=Xr(e,o,Object);for(;s.obj===void 0&&o.length;)r=`${o[o.length-1]}.${r}`,o=o.slice(0,o.length-1),s=Xr(e,o,Object),s&&s.obj&&typeof s.obj[`${s.k}.${r}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${r}`]=n},TT=(e,t,n,a)=>{const{obj:i,k:r}=Xr(e,t,Object);i[r]=i[r]||[],i[r].push(n)},sl=(e,t)=>{const{obj:n,k:a}=Xr(e,t);if(n)return n[a]},PT=(e,t,n)=>{const a=sl(e,n);return a!==void 0?a:sl(t,n)},ak=(e,t,n)=>{for(const a in t)a!=="__proto__"&&a!=="constructor"&&(a in e?ee(e[a])||e[a]instanceof String||ee(t[a])||t[a]instanceof String?n&&(e[a]=t[a]):ak(e[a],t[a],n):e[a]=t[a]);return e},xi=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var zT={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const AT=e=>ee(e)?e.replace(/[&<>"'\/]/g,t=>zT[t]):e;class NT{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const a=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,a),this.regExpQueue.push(t),a}}const IT=[" ",",","?","!",";"],MT=new NT(20),FT=(e,t,n)=>{t=t||"",n=n||"";const a=IT.filter(o=>t.indexOf(o)<0&&n.indexOf(o)<0);if(a.length===0)return!0;const i=MT.getRegExp(`(${a.map(o=>o==="?"?"\\?":o).join("|")})`);let r=!i.test(e);if(!r){const o=e.indexOf(n);o>0&&!i.test(e.substring(0,o))&&(r=!0)}return r},Bd=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const a=t.split(n);let i=e;for(let r=0;r<a.length;){if(!i||typeof i!="object")return;let o,s="";for(let l=r;l<a.length;++l)if(l!==r&&(s+=n),s+=a[l],o=i[s],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&l<a.length-1)continue;r+=l-r+1;break}i=o}return i},ll=e=>e&&e.replace("_","-"),DT={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class ul{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||DT,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,a,i){return i&&!this.debug?null:(ee(t[0])&&(t[0]=`${a}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new ul(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new ul(this.logger,t)}}var tn=new ul;class cl{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(a=>{this.observers[a]||(this.observers[a]=new Map);const i=this.observers[a].get(n)||0;this.observers[a].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,a=new Array(n>1?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(o=>{let[s,l]=o;for(let c=0;c<l;c++)s(...a)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[s,l]=o;for(let c=0;c<l;c++)s.apply(s,[t,...a])})}}class ik extends cl{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,a){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;t.indexOf(".")>-1?s=t.split("."):(s=[t,n],a&&(Array.isArray(a)?s.push(...a):ee(a)&&r?s.push(...a.split(r)):s.push(a)));const l=sl(this.data,s);return!l&&!n&&!a&&t.indexOf(".")>-1&&(t=s[0],n=s[1],a=s.slice(2).join(".")),l||!o||!ee(a)?l:Bd(this.data&&this.data[t]&&this.data[t][n],a,r)}addResource(t,n,a,i){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let s=[t,n];a&&(s=s.concat(o?a.split(o):a)),t.indexOf(".")>-1&&(s=t.split("."),i=n,n=s[1]),this.addNamespaces(n),nk(this.data,s,i),r.silent||this.emit("added",t,n,a,i)}addResources(t,n,a){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const r in a)(ee(a[r])||Array.isArray(a[r]))&&this.addResource(t,n,r,a[r],{silent:!0});i.silent||this.emit("added",t,n,a)}addResourceBundle(t,n,a,i,r){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},s=[t,n];t.indexOf(".")>-1&&(s=t.split("."),i=a,a=n,n=s[1]),this.addNamespaces(n);let l=sl(this.data,s)||{};o.skipCopy||(a=JSON.parse(JSON.stringify(a))),i?ak(l,a,r):l={...l,...a},nk(this.data,s,l),o.silent||this.emit("added",t,n,a)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var rk={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,a,i){return e.forEach(r=>{this.processors[r]&&(t=this.processors[r].process(t,n,a,i))}),t}};const ok={};class dl extends cl{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),$T(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=tn.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const a=this.resolve(t,n);return a&&a.res!==void 0}extractFromKey(t,n){let a=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let r=n.ns||this.options.defaultNS||[];const o=a&&t.indexOf(a)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!FT(t,a,i);if(o&&!s){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:ee(r)?[r]:r};const c=t.split(a);(a!==i||a===i&&this.options.ns.indexOf(c[0])>-1)&&(r=c.shift()),t=c.join(i)}return{key:t,namespaces:ee(r)?[r]:r}}translate(t,n,a){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,r=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:o,namespaces:s}=this.extractFromKey(t[t.length-1],n),l=s[s.length-1],c=n.lng||this.language,m=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(m){const $=n.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${$}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${$}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:o}const f=this.resolve(t,n);let p=f&&f.res;const y=f&&f.usedKey||o,k=f&&f.exactUsedKey||o,j=Object.prototype.toString.apply(p),b=["[object Number]","[object Function]","[object RegExp]"],w=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,P=!ee(p)&&typeof p!="boolean"&&typeof p!="number";if(E&&p&&P&&b.indexOf(j)<0&&!(ee(w)&&Array.isArray(p))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const $=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,p,{...n,ns:s}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(f.res=$,f.usedParams=this.getUsedParamsDetails(n),f):$}if(r){const $=Array.isArray(p),F=$?[]:{},z=$?k:y;for(const R in p)if(Object.prototype.hasOwnProperty.call(p,R)){const _=`${z}${r}${R}`;F[R]=this.translate(_,{...n,joinArrays:!1,ns:s}),F[R]===_&&(F[R]=p[R])}p=F}}else if(E&&ee(w)&&Array.isArray(p))p=p.join(w),p&&(p=this.extendTranslation(p,t,n,a));else{let $=!1,F=!1;const z=n.count!==void 0&&!ee(n.count),R=dl.hasDefaultValue(n),_=z?this.pluralResolver.getSuffix(c,n.count,n):"",D=n.ordinal&&z?this.pluralResolver.getSuffix(c,n.count,{ordinal:!1}):"",X=z&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),ne=X&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${_}`]||n[`defaultValue${D}`]||n.defaultValue;!this.isValidLookup(p)&&R&&($=!0,p=ne),this.isValidLookup(p)||(F=!0,p=o);const he=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&F?void 0:p,_e=R&&ne!==p&&this.options.updateMissing;if(F||$||_e){if(this.logger.log(_e?"updateKey":"missingKey",c,l,o,_e?ne:p),r){const O=this.resolve(o,{...n,keySeparator:!1});O&&O.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let Ie=[];const Je=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Je&&Je[0])for(let O=0;O<Je.length;O++)Ie.push(Je[O]);else this.options.saveMissingTo==="all"?Ie=this.languageUtils.toResolveHierarchy(n.lng||this.language):Ie.push(n.lng||this.language);const N=(O,V,ie)=>{const I=R&&ie!==p?ie:he;this.options.missingKeyHandler?this.options.missingKeyHandler(O,l,V,I,_e,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(O,l,V,I,_e,n),this.emit("missingKey",O,l,V,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&z?Ie.forEach(O=>{const V=this.pluralResolver.getSuffixes(O,n);X&&n[`defaultValue${this.options.pluralSeparator}zero`]&&V.indexOf(`${this.options.pluralSeparator}zero`)<0&&V.push(`${this.options.pluralSeparator}zero`),V.forEach(ie=>{N([O],o+ie,n[`defaultValue${ie}`]||ne)})}):N(Ie,o,ne))}p=this.extendTranslation(p,t,n,f,a),F&&p===o&&this.options.appendNamespaceToMissingKey&&(p=`${l}:${o}`),(F||$)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${o}`:o,$?p:void 0):p=this.options.parseMissingKeyHandler(p))}return i?(f.res=p,f.usedParams=this.getUsedParamsDetails(n),f):p}extendTranslation(t,n,a,i,r){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...a},a.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!a.skipInterpolation){a.interpolation&&this.interpolator.init({...a,interpolation:{...this.options.interpolation,...a.interpolation}});const c=ee(t)&&(a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(c){const p=t.match(this.interpolator.nestingRegexp);m=p&&p.length}let f=a.replace&&!ee(a.replace)?a.replace:a;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,a.lng||this.language||i.usedLng,a),c){const p=t.match(this.interpolator.nestingRegexp),y=p&&p.length;m<y&&(a.nest=!1)}!a.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(a.lng=this.language||i.usedLng),a.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var p=arguments.length,y=new Array(p),k=0;k<p;k++)y[k]=arguments[k];return r&&r[0]===y[0]&&!a.context?(o.logger.warn(`It seems you are nesting recursively key: ${y[0]} in key: ${n[0]}`),null):o.translate(...y,n)},a)),a.interpolation&&this.interpolator.reset()}const s=a.postProcess||this.options.postProcess,l=ee(s)?[s]:s;return t!=null&&l&&l.length&&a.applyPostProcessor!==!1&&(t=rk.handle(l,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(a)},...a}:a,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a,i,r,o,s;return ee(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(a))return;const c=this.extractFromKey(l,n),m=c.key;i=m;let f=c.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const p=n.count!==void 0&&!ee(n.count),y=p&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),k=n.context!==void 0&&(ee(n.context)||typeof n.context=="number")&&n.context!=="",j=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(b=>{this.isValidLookup(a)||(s=b,!ok[`${j[0]}-${b}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(ok[`${j[0]}-${b}`]=!0,this.logger.warn(`key "${i}" for languages "${j.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),j.forEach(w=>{if(this.isValidLookup(a))return;o=w;const E=[m];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(E,m,w,b,n);else{let $;p&&($=this.pluralResolver.getSuffix(w,n.count,n));const F=`${this.options.pluralSeparator}zero`,z=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(E.push(m+$),n.ordinal&&$.indexOf(z)===0&&E.push(m+$.replace(z,this.options.pluralSeparator)),y&&E.push(m+F)),k){const R=`${m}${this.options.contextSeparator}${n.context}`;E.push(R),p&&(E.push(R+$),n.ordinal&&$.indexOf(z)===0&&E.push(R+$.replace(z,this.options.pluralSeparator)),y&&E.push(R+F))}}let P;for(;P=E.pop();)this.isValidLookup(a)||(r=P,a=this.getResource(w,b,P,n))}))})}),{res:a,usedKey:i,exactUsedKey:r,usedLng:o,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,a){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,a,i):this.resourceStore.getResource(t,n,a,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],a=t.replace&&!ee(t.replace);let i=a?t.replace:t;if(a&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!a){i={...i};for(const r of n)delete i[r]}return i}static hasDefaultValue(t){const n="defaultValue";for(const a in t)if(Object.prototype.hasOwnProperty.call(t,a)&&n===a.substring(0,n.length)&&t[a]!==void 0)return!0;return!1}}const Vd=e=>e.charAt(0).toUpperCase()+e.slice(1);class sk{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=tn.create("languageUtils")}getScriptPartFromCode(t){if(t=ll(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=ll(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(ee(t)&&t.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let i=Intl.getCanonicalLocales(t)[0];if(i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i)return i}catch{}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let a=t.split("-");return this.options.lowerCaseLng?a=a.map(i=>i.toLowerCase()):a.length===2?(a[0]=a[0].toLowerCase(),a[1]=a[1].toUpperCase(),n.indexOf(a[1].toLowerCase())>-1&&(a[1]=Vd(a[1].toLowerCase()))):a.length===3&&(a[0]=a[0].toLowerCase(),a[1].length===2&&(a[1]=a[1].toUpperCase()),a[0]!=="sgn"&&a[2].length===2&&(a[2]=a[2].toUpperCase()),n.indexOf(a[1].toLowerCase())>-1&&(a[1]=Vd(a[1].toLowerCase())),n.indexOf(a[2].toLowerCase())>-1&&(a[2]=Vd(a[2].toLowerCase()))),a.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(a=>{if(n)return;const i=this.formatLanguageCode(a);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(a=>{if(n)return;const i=this.getLanguagePartFromCode(a);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(r=>{if(r===i)return r;if(!(r.indexOf("-")<0&&i.indexOf("-")<0)&&(r.indexOf("-")>0&&i.indexOf("-")<0&&r.substring(0,r.indexOf("-"))===i||r.indexOf(i)===0&&i.length>1))return r})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),ee(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let a=t[n];return a||(a=t[this.getScriptPartFromCode(n)]),a||(a=t[this.formatLanguageCode(n)]),a||(a=t[this.getLanguagePartFromCode(n)]),a||(a=t.default),a||[]}toResolveHierarchy(t,n){const a=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],r=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return ee(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&r(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&r(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&r(this.getLanguagePartFromCode(t))):ee(t)&&r(this.formatLanguageCode(t)),a.forEach(o=>{i.indexOf(o)<0&&r(this.formatLanguageCode(o))}),i}}let OT=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],_T={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const RT=["v1","v2","v3"],UT=["v4"],lk={zero:0,one:1,two:2,few:3,many:4,other:5},LT=()=>{const e={};return OT.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:_T[t.fc]}})}),e};class YT{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=tn.create("pluralResolver"),(!this.options.compatibilityJSON||UT.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=LT(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const a=ll(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:a,type:i});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];let o;try{o=new Intl.PluralRules(a,{type:i})}catch{if(!t.match(/-|_/))return;const l=this.languageUtils.getLanguagePartFromCode(t);o=this.getRule(l,n)}return this.pluralRulesCache[r]=o,o}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const a=this.getRule(t,n);return this.shouldUseIntlApi()?a&&a.resolvedOptions().pluralCategories.length>1:a&&a.numbers.length>1}getPluralFormsOfKey(t,n){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,a).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const a=this.getRule(t,n);return a?this.shouldUseIntlApi()?a.resolvedOptions().pluralCategories.sort((i,r)=>lk[i]-lk[r]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):a.numbers.map(i=>this.getSuffix(t,i,n)):[]}getSuffix(t,n){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,a);return i?this.shouldUseIntlApi()?`${this.options.prepend}${a.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:this.getSuffixRetroCompatible(i,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const a=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let i=t.numbers[a];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const r=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:r():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?r():this.options.prepend&&a.toString()?this.options.prepend+a.toString():a.toString()}shouldUseIntlApi(){return!RT.includes(this.options.compatibilityJSON)}}const uk=function(e,t,n){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,r=PT(e,t,n);return!r&&i&&ee(n)&&(r=Bd(e,n,a),r===void 0&&(r=Bd(t,n,a))),r},Hd=e=>e.replace(/\$/g,"$$$$");class BT{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=tn.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:a,useRawValueToEscape:i,prefix:r,prefixEscaped:o,suffix:s,suffixEscaped:l,formatSeparator:c,unescapeSuffix:m,unescapePrefix:f,nestingPrefix:p,nestingPrefixEscaped:y,nestingSuffix:k,nestingSuffixEscaped:j,nestingOptionsSeparator:b,maxReplaces:w,alwaysFormat:E}=t.interpolation;this.escape=n!==void 0?n:AT,this.escapeValue=a!==void 0?a:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=r?xi(r):o||"{{",this.suffix=s?xi(s):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=m?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":m||"",this.nestingPrefix=p?xi(p):y||xi("$t("),this.nestingSuffix=k?xi(k):j||xi(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=w||1e3,this.alwaysFormat=E!==void 0?E:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,a)=>n&&n.source===a?(n.lastIndex=0,n):new RegExp(a,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,a,i){let r,o,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=y=>{if(y.indexOf(this.formatSeparator)<0){const w=uk(n,l,y,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,a,{...i,...n,interpolationkey:y}):w}const k=y.split(this.formatSeparator),j=k.shift().trim(),b=k.join(this.formatSeparator).trim();return this.format(uk(n,l,j,this.options.keySeparator,this.options.ignoreJSONStructure),b,a,{...i,...n,interpolationkey:j})};this.resetRegExp();const m=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,f=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:y=>Hd(y)},{regex:this.regexp,safeValue:y=>this.escapeValue?Hd(this.escape(y)):Hd(y)}].forEach(y=>{for(s=0;r=y.regex.exec(t);){const k=r[1].trim();if(o=c(k),o===void 0)if(typeof m=="function"){const b=m(t,r,i);o=ee(b)?b:""}else if(i&&Object.prototype.hasOwnProperty.call(i,k))o="";else if(f){o=r[0];continue}else this.logger.warn(`missed to pass in variable ${k} for interpolating ${t}`),o="";else!ee(o)&&!this.useRawValueToEscape&&(o=Qb(o));const j=y.safeValue(o);if(t=t.replace(r[0],j),f?(y.regex.lastIndex+=o.length,y.regex.lastIndex-=r[0].length):y.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,n){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,r,o;const s=(l,c)=>{const m=this.nestingOptionsSeparator;if(l.indexOf(m)<0)return l;const f=l.split(new RegExp(`${m}[ ]*{`));let p=`{${f[1]}`;l=f[0],p=this.interpolate(p,o);const y=p.match(/'/g),k=p.match(/"/g);(y&&y.length%2===0&&!k||k.length%2!==0)&&(p=p.replace(/'/g,'"'));try{o=JSON.parse(p),c&&(o={...c,...o})}catch(j){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,j),`${l}${m}${p}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;i=this.nestingRegexp.exec(t);){let l=[];o={...a},o=o.replace&&!ee(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let c=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const m=i[1].split(this.formatSeparator).map(f=>f.trim());i[1]=m.shift(),l=m,c=!0}if(r=n(s.call(this,i[1].trim(),o),o),r&&i[0]===t&&!ee(r))return r;ee(r)||(r=Qb(r)),r||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),r=""),c&&(r=l.reduce((m,f)=>this.format(m,f,a.lng,{...a,interpolationkey:i[1].trim()}),r.trim())),t=t.replace(i[0],r),this.regexp.lastIndex=0}return t}}const VT=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const a=e.split("(");t=a[0].toLowerCase().trim();const i=a[1].substring(0,a[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(o=>{if(o){const[s,...l]=o.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),m=s.trim();n[m]||(n[m]=c),c==="false"&&(n[m]=!1),c==="true"&&(n[m]=!0),isNaN(c)||(n[m]=parseInt(c,10))}})}return{formatName:t,formatOptions:n}},Ei=e=>{const t={};return(n,a,i)=>{let r=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(r={...r,[i.interpolationkey]:void 0});const o=a+JSON.stringify(r);let s=t[o];return s||(s=e(ll(a),i),t[o]=s),s(n)}};class HT{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=tn.create("formatter"),this.options=t,this.formats={number:Ei((n,a)=>{const i=new Intl.NumberFormat(n,{...a});return r=>i.format(r)}),currency:Ei((n,a)=>{const i=new Intl.NumberFormat(n,{...a,style:"currency"});return r=>i.format(r)}),datetime:Ei((n,a)=>{const i=new Intl.DateTimeFormat(n,{...a});return r=>i.format(r)}),relativetime:Ei((n,a)=>{const i=new Intl.RelativeTimeFormat(n,{...a});return r=>i.format(r,a.range||"day")}),list:Ei((n,a)=>{const i=new Intl.ListFormat(n,{...a});return r=>i.format(r)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Ei(n)}format(t,n,a){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=n.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&r[0].indexOf(")")<0&&r.find(s=>s.indexOf(")")>-1)){const s=r.findIndex(l=>l.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,s)].join(this.formatSeparator)}return r.reduce((s,l)=>{const{formatName:c,formatOptions:m}=VT(l);if(this.formats[c]){let f=s;try{const p=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},y=p.locale||p.lng||i.locale||i.lng||a;f=this.formats[c](s,y,{...m,...i,...p})}catch(p){this.logger.warn(p)}return f}else this.logger.warn(`there was no format function for ${c}`);return s},t)}}const WT=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class GT extends cl{constructor(t,n,a){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=a,this.languageUtils=a.languageUtils,this.options=i,this.logger=tn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(a,i.backend,i)}queueLoad(t,n,a,i){const r={},o={},s={},l={};return t.forEach(c=>{let m=!0;n.forEach(f=>{const p=`${c}|${f}`;!a.reload&&this.store.hasResourceBundle(c,f)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?o[p]===void 0&&(o[p]=!0):(this.state[p]=1,m=!1,o[p]===void 0&&(o[p]=!0),r[p]===void 0&&(r[p]=!0),l[f]===void 0&&(l[f]=!0)))}),m||(s[c]=!0)}),(Object.keys(r).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(t,n,a){const i=t.split("|"),r=i[0],o=i[1];n&&this.emit("failedLoading",r,o,n),!n&&a&&this.store.addResourceBundle(r,o,a,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&a&&(this.state[t]=0);const s={};this.queue.forEach(l=>{TT(l.loaded,[r],o),WT(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{s[c]||(s[c]={});const m=l.loaded[c];m.length&&m.forEach(f=>{s[c][f]===void 0&&(s[c][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(t,n,a){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:a,tried:i,wait:r,callback:o});return}this.readingCalls++;const s=(c,m)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(c&&m&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,a,i+1,r*2,o)},r);return}o(c,m)},l=this.backend[a].bind(this.backend);if(l.length===2){try{const c=l(t,n);c&&typeof c.then=="function"?c.then(m=>s(null,m)).catch(s):s(null,c)}catch(c){s(c)}return}return l(t,n,s)}prepareLoading(t,n){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();ee(t)&&(t=this.languageUtils.toResolveHierarchy(t)),ee(n)&&(n=[n]);const r=this.queueLoad(t,n,a,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach(o=>{this.loadOne(o)})}load(t,n,a){this.prepareLoading(t,n,{},a)}reload(t,n,a){this.prepareLoading(t,n,{reload:!0},a)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const a=t.split("|"),i=a[0],r=a[1];this.read(i,r,"read",void 0,void 0,(o,s)=>{o&&this.logger.warn(`${n}loading namespace ${r} for language ${i} failed`,o),!o&&s&&this.logger.log(`${n}loaded namespace ${r} for language ${i}`,s),this.loaded(t,o,s)})}saveMissing(t,n,a,i,r){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${a}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(a==null||a==="")){if(this.backend&&this.backend.create){const l={...o,isUpdate:r},c=this.backend.create.bind(this.backend);if(c.length<6)try{let m;c.length===5?m=c(t,n,a,i,l):m=c(t,n,a,i),m&&typeof m.then=="function"?m.then(f=>s(null,f)).catch(s):s(null,m)}catch(m){s(m)}else c(t,n,a,i,s,l)}!t||!t[0]||this.store.addResource(t[0],n,a,i)}}}const ck=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),ee(e[1])&&(t.defaultValue=e[1]),ee(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(a=>{t[a]=n[a]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),dk=e=>(ee(e.ns)&&(e.ns=[e.ns]),ee(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),ee(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),ml=()=>{},KT=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Qr extends cl{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=dk(t),this.services={},this.logger=tn,this.modules={external:[]},KT(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(a=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(ee(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=ck();this.options={...i,...this.options,...dk(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const r=m=>m?typeof m=="function"?new m:m:null;if(!this.options.isClone){this.modules.logger?tn.init(r(this.modules.logger),this.options):tn.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:typeof Intl<"u"&&(m=HT);const f=new sk(this.options);this.store=new ik(this.options.resources,this.options);const p=this.services;p.logger=tn,p.resourceStore=this.store,p.languageUtils=f,p.pluralResolver=new YT(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),m&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(p.formatter=r(m),p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new BT(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new GT(r(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",function(y){for(var k=arguments.length,j=new Array(k>1?k-1:0),b=1;b<k;b++)j[b-1]=arguments[b];t.emit(y,...j)}),this.modules.languageDetector&&(p.languageDetector=r(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=r(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new dl(this.services,this.options),this.translator.on("*",function(y){for(var k=arguments.length,j=new Array(k>1?k-1:0),b=1;b<k;b++)j[b-1]=arguments[b];t.emit(y,...j)}),this.modules.external.forEach(y=>{y.init&&y.init(this)})}if(this.format=this.options.interpolation.format,a||(a=ml),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(m=>{this[m]=function(){return t.store[m](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=function(){return t.store[m](...arguments),t}});const l=Zr(),c=()=>{const m=(f,p)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(p),a(f,p)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return m(null,this.t.bind(this));this.changeLanguage(this.options.lng,m)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}loadResources(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ml;const i=ee(t)?t:this.language;if(typeof t=="function"&&(a=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return a();const r=[],o=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(c=>{c!=="cimode"&&r.indexOf(c)<0&&r.push(c)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>o(l)),this.options.preload&&this.options.preload.forEach(s=>o(s)),this.services.backendConnector.load(r,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),a(s)})}else a(null)}reloadResources(t,n,a){const i=Zr();return typeof t=="function"&&(a=t,t=void 0),typeof n=="function"&&(a=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),a||(a=ml),this.services.backendConnector.reload(t,n,r=>{i.resolve(),a(r)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&rk.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const a=this.languages[n];if(!(["cimode","dev"].indexOf(a)>-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}}changeLanguage(t,n){var a=this;this.isLanguageChangingTo=t;const i=Zr();this.emit("languageChanging",t);const r=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},o=(l,c)=>{c?(r(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,i.resolve(function(){return a.t(...arguments)}),n&&n(l,function(){return a.t(...arguments)})},s=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const c=ee(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);c&&(this.language||r(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,m=>{o(m,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),i}getFixedT(t,n,a){var i=this;const r=function(o,s){let l;if(typeof s!="object"){for(var c=arguments.length,m=new Array(c>2?c-2:0),f=2;f<c;f++)m[f-2]=arguments[f];l=i.options.overloadTranslationOptionHandler([o,s].concat(m))}else l={...s};l.lng=l.lng||r.lng,l.lngs=l.lngs||r.lngs,l.ns=l.ns||r.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||a||r.keyPrefix);const p=i.options.keySeparator||".";let y;return l.keyPrefix&&Array.isArray(o)?y=o.map(k=>`${l.keyPrefix}${p}${k}`):y=l.keyPrefix?`${l.keyPrefix}${p}${o}`:o,i.t(y,l)};return ee(t)?r.lng=t:r.lngs=t,r.ns=n,r.keyPrefix=a,r}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const a=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,r=this.languages[this.languages.length-1];if(a.toLowerCase()==="cimode")return!0;const o=(s,l)=>{const c=this.services.backendConnector.state[`${s}|${l}`];return c===-1||c===0||c===2};if(n.precheck){const s=n.precheck(this,o);if(s!==void 0)return s}return!!(this.hasResourceBundle(a,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(a,t)&&(!i||o(r,t)))}loadNamespaces(t,n){const a=Zr();return this.options.ns?(ee(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{a.resolve(),n&&n(i)}),a):(n&&n(),Promise.resolve())}loadLanguages(t,n){const a=Zr();ee(t)&&(t=[t]);const i=this.options.preload||[],r=t.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return r.length?(this.options.preload=i.concat(r),this.loadResources(o=>{a.resolve(),n&&n(o)}),a):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],a=this.services&&this.services.languageUtils||new sk(ck());return n.indexOf(a.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Qr(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ml;const a=t.forkResourceStore;a&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},r=new Qr(i);return(t.debug!==void 0||t.prefix!==void 0)&&(r.logger=r.logger.clone(t)),["store","services","language"].forEach(s=>{r[s]=this[s]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},a&&(r.store=new ik(this.store.data,i),r.services.resourceStore=r.store),r.translator=new dl(r.services,i),r.translator.on("*",function(s){for(var l=arguments.length,c=new Array(l>1?l-1:0),m=1;m<l;m++)c[m-1]=arguments[m];r.emit(s,...c)}),r.init(i,n),r.translator.options=i,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const mk=Qr.createInstance();mk.createInstance=Qr.createInstance;var qT=mk;const Si=dh(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let pl;const JT=new Uint8Array(16);function ZT(){if(!pl&&(pl=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!pl))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return pl(JT)}const Ke=[];for(let e=0;e<256;++e)Ke.push((e+256).toString(16).slice(1));function XT(e,t=0){return Ke[e[t+0]]+Ke[e[t+1]]+Ke[e[t+2]]+Ke[e[t+3]]+"-"+Ke[e[t+4]]+Ke[e[t+5]]+"-"+Ke[e[t+6]]+Ke[e[t+7]]+"-"+Ke[e[t+8]]+Ke[e[t+9]]+"-"+Ke[e[t+10]]+Ke[e[t+11]]+Ke[e[t+12]]+Ke[e[t+13]]+Ke[e[t+14]]+Ke[e[t+15]]}let pk,Wd,Gd=0,Kd=0;function QT(e,t,n){let a=0;const i=new Array(16);e=e||{};let r=e.node||pk,o=e.clockseq!==void 0?e.clockseq:Wd;if(r==null||o==null){const p=e.random||(e.rng||ZT)();r==null&&(r=pk=[p[0]|1,p[1],p[2],p[3],p[4],p[5]]),o==null&&(o=Wd=(p[6]<<8|p[7])&16383)}let s=e.msecs!==void 0?e.msecs:Date.now(),l=e.nsecs!==void 0?e.nsecs:Kd+1;const c=s-Gd+(l-Kd)/1e4;if(c<0&&e.clockseq===void 0&&(o=o+1&16383),(c<0||s>Gd)&&e.nsecs===void 0&&(l=0),l>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Gd=s,Kd=l,Wd=o,s+=122192928e5;const m=((s&268435455)*1e4+l)%4294967296;i[a++]=m>>>24&255,i[a++]=m>>>16&255,i[a++]=m>>>8&255,i[a++]=m&255;const f=s/4294967296*1e4&268435455;i[a++]=f>>>8&255,i[a++]=f&255,i[a++]=f>>>24&15|16,i[a++]=f>>>16&255,i[a++]=o>>>8|128,i[a++]=o&255;for(let p=0;p<6;++p)i[a+p]=r[p];return t||XT(i)}function eP(e,t){var r,o;const n=(((r=e.stack)==null?void 0:r.split(/\n/g))||[])[1],[a,...i]=((o=t.stack)==null?void 0:o.split(/\n/g))||[];return[a,n,...i].join(`
|
|
66
|
+
*/var Be=typeof Symbol=="function"&&Symbol.for,Rd=Be?Symbol.for("react.element"):60103,Ud=Be?Symbol.for("react.portal"):60106,Zs=Be?Symbol.for("react.fragment"):60107,Xs=Be?Symbol.for("react.strict_mode"):60108,Qs=Be?Symbol.for("react.profiler"):60114,el=Be?Symbol.for("react.provider"):60109,tl=Be?Symbol.for("react.context"):60110,Ld=Be?Symbol.for("react.async_mode"):60111,nl=Be?Symbol.for("react.concurrent_mode"):60111,al=Be?Symbol.for("react.forward_ref"):60112,il=Be?Symbol.for("react.suspense"):60113,fT=Be?Symbol.for("react.suspense_list"):60120,rl=Be?Symbol.for("react.memo"):60115,ol=Be?Symbol.for("react.lazy"):60116,gT=Be?Symbol.for("react.block"):60121,yT=Be?Symbol.for("react.fundamental"):60117,bT=Be?Symbol.for("react.responder"):60118,kT=Be?Symbol.for("react.scope"):60119;function Et(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Rd:switch(e=e.type,e){case Ld:case nl:case Zs:case Qs:case Xs:case il:return e;default:switch(e=e&&e.$$typeof,e){case tl:case al:case ol:case rl:case el:return e;default:return t}}case Ud:return t}}}function qb(e){return Et(e)===nl}fe.AsyncMode=Ld,fe.ConcurrentMode=nl,fe.ContextConsumer=tl,fe.ContextProvider=el,fe.Element=Rd,fe.ForwardRef=al,fe.Fragment=Zs,fe.Lazy=ol,fe.Memo=rl,fe.Portal=Ud,fe.Profiler=Qs,fe.StrictMode=Xs,fe.Suspense=il,fe.isAsyncMode=function(e){return qb(e)||Et(e)===Ld},fe.isConcurrentMode=qb,fe.isContextConsumer=function(e){return Et(e)===tl},fe.isContextProvider=function(e){return Et(e)===el},fe.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Rd},fe.isForwardRef=function(e){return Et(e)===al},fe.isFragment=function(e){return Et(e)===Zs},fe.isLazy=function(e){return Et(e)===ol},fe.isMemo=function(e){return Et(e)===rl},fe.isPortal=function(e){return Et(e)===Ud},fe.isProfiler=function(e){return Et(e)===Qs},fe.isStrictMode=function(e){return Et(e)===Xs},fe.isSuspense=function(e){return Et(e)===il},fe.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Zs||e===nl||e===Qs||e===Xs||e===il||e===fT||typeof e=="object"&&e!==null&&(e.$$typeof===ol||e.$$typeof===rl||e.$$typeof===el||e.$$typeof===tl||e.$$typeof===al||e.$$typeof===yT||e.$$typeof===bT||e.$$typeof===kT||e.$$typeof===gT)},fe.typeOf=Et,Kb.exports=fe;var vT=Kb.exports,Jb=vT,wT={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},xT={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Zb={};Zb[Jb.ForwardRef]=wT,Zb[Jb.Memo]=xT;const ET=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function ST(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}const Xb={componentStack:null,error:null,eventId:null};function CT(e,t){const n=new WeakMap;function a(i,r){if(!n.has(i)){if(i.cause)return n.set(i,!0),a(i.cause,r);i.cause=r}}a(e,t)}class Yd extends C.Component{constructor(t){super(t),Yd.prototype.__init.call(this),this.state=Xb,this._openFallbackReportDialog=!0;const n=st();n&&n.on&&t.showDialog&&(this._openFallbackReportDialog=!1,n.on("afterSendEvent",a=>{!a.type&&a.event_id===this._lastEventId&&Vb({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,{componentStack:n}){const{beforeCapture:a,onError:i,showDialog:r,dialogOptions:o}=this.props;sb(s=>{if(ST(C.version)&&ld(t)){const c=new Error(t.message);c.name=`React ErrorBoundary ${t.name}`,c.stack=n,CT(t,c)}a&&a(s,t,n);const l=Vs(t,{captureContext:{contexts:{react:{componentStack:n}}},mechanism:{handled:!!this.props.fallback}});i&&i(t,n,l),r&&(this._lastEventId=l,this._openFallbackReportDialog&&Vb({...o,eventId:l})),this.setState({error:t,componentStack:n,eventId:l})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:n,eventId:a}=this.state,{onUnmount:i}=this.props;i&&i(t,n,a)}__init(){this.resetErrorBoundary=()=>{const{onReset:t}=this.props,{error:n,componentStack:a,eventId:i}=this.state;t&&t(n,a,i),this.setState(Xb)}}render(){const{fallback:t,children:n}=this.props,a=this.state;if(a.error){let i;return typeof t=="function"?i=t({error:a.error,componentStack:a.componentStack,resetError:this.resetErrorBoundary,eventId:a.eventId}):i=t,C.isValidElement(i)?i:(t&&ET&&J.warn("fallback did not produce a valid ReactElement"),null)}return typeof n=="function"?n():n}}var wi={exports:{}},Jr={exports:{}};const ee=e=>typeof e=="string",Zr=()=>{let e,t;const n=new Promise((a,i)=>{e=a,t=i});return n.resolve=e,n.reject=t,n},Qb=e=>e==null?"":""+e,$T=(e,t,n)=>{e.forEach(a=>{t[a]&&(n[a]=t[a])})},jT=/###/g,ek=e=>e&&e.indexOf("###")>-1?e.replace(jT,"."):e,tk=e=>!e||ee(e),Xr=(e,t,n)=>{const a=ee(t)?t.split("."):t;let i=0;for(;i<a.length-1;){if(tk(e))return{};const r=ek(a[i]);!e[r]&&n&&(e[r]=new n),Object.prototype.hasOwnProperty.call(e,r)?e=e[r]:e={},++i}return tk(e)?{}:{obj:e,k:ek(a[i])}},nk=(e,t,n)=>{const{obj:a,k:i}=Xr(e,t,Object);if(a!==void 0||t.length===1){a[i]=n;return}let r=t[t.length-1],o=t.slice(0,t.length-1),s=Xr(e,o,Object);for(;s.obj===void 0&&o.length;)r=`${o[o.length-1]}.${r}`,o=o.slice(0,o.length-1),s=Xr(e,o,Object),s&&s.obj&&typeof s.obj[`${s.k}.${r}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${r}`]=n},TT=(e,t,n,a)=>{const{obj:i,k:r}=Xr(e,t,Object);i[r]=i[r]||[],i[r].push(n)},sl=(e,t)=>{const{obj:n,k:a}=Xr(e,t);if(n)return n[a]},PT=(e,t,n)=>{const a=sl(e,n);return a!==void 0?a:sl(t,n)},ak=(e,t,n)=>{for(const a in t)a!=="__proto__"&&a!=="constructor"&&(a in e?ee(e[a])||e[a]instanceof String||ee(t[a])||t[a]instanceof String?n&&(e[a]=t[a]):ak(e[a],t[a],n):e[a]=t[a]);return e},xi=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var zT={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const AT=e=>ee(e)?e.replace(/[&<>"'\/]/g,t=>zT[t]):e;class NT{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const a=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,a),this.regExpQueue.push(t),a}}const IT=[" ",",","?","!",";"],MT=new NT(20),FT=(e,t,n)=>{t=t||"",n=n||"";const a=IT.filter(o=>t.indexOf(o)<0&&n.indexOf(o)<0);if(a.length===0)return!0;const i=MT.getRegExp(`(${a.map(o=>o==="?"?"\\?":o).join("|")})`);let r=!i.test(e);if(!r){const o=e.indexOf(n);o>0&&!i.test(e.substring(0,o))&&(r=!0)}return r},Bd=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const a=t.split(n);let i=e;for(let r=0;r<a.length;){if(!i||typeof i!="object")return;let o,s="";for(let l=r;l<a.length;++l)if(l!==r&&(s+=n),s+=a[l],o=i[s],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&l<a.length-1)continue;r+=l-r+1;break}i=o}return i},ll=e=>e&&e.replace("_","-"),DT={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class ul{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||DT,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,a,i){return i&&!this.debug?null:(ee(t[0])&&(t[0]=`${a}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new ul(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new ul(this.logger,t)}}var tn=new ul;class cl{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(a=>{this.observers[a]||(this.observers[a]=new Map);const i=this.observers[a].get(n)||0;this.observers[a].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,a=new Array(n>1?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(o=>{let[s,l]=o;for(let c=0;c<l;c++)s(...a)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[s,l]=o;for(let c=0;c<l;c++)s.apply(s,[t,...a])})}}class ik extends cl{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,a){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;t.indexOf(".")>-1?s=t.split("."):(s=[t,n],a&&(Array.isArray(a)?s.push(...a):ee(a)&&r?s.push(...a.split(r)):s.push(a)));const l=sl(this.data,s);return!l&&!n&&!a&&t.indexOf(".")>-1&&(t=s[0],n=s[1],a=s.slice(2).join(".")),l||!o||!ee(a)?l:Bd(this.data&&this.data[t]&&this.data[t][n],a,r)}addResource(t,n,a,i){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let s=[t,n];a&&(s=s.concat(o?a.split(o):a)),t.indexOf(".")>-1&&(s=t.split("."),i=n,n=s[1]),this.addNamespaces(n),nk(this.data,s,i),r.silent||this.emit("added",t,n,a,i)}addResources(t,n,a){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const r in a)(ee(a[r])||Array.isArray(a[r]))&&this.addResource(t,n,r,a[r],{silent:!0});i.silent||this.emit("added",t,n,a)}addResourceBundle(t,n,a,i,r){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},s=[t,n];t.indexOf(".")>-1&&(s=t.split("."),i=a,a=n,n=s[1]),this.addNamespaces(n);let l=sl(this.data,s)||{};o.skipCopy||(a=JSON.parse(JSON.stringify(a))),i?ak(l,a,r):l={...l,...a},nk(this.data,s,l),o.silent||this.emit("added",t,n,a)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var rk={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,a,i){return e.forEach(r=>{this.processors[r]&&(t=this.processors[r].process(t,n,a,i))}),t}};const ok={};class dl extends cl{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),$T(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=tn.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const a=this.resolve(t,n);return a&&a.res!==void 0}extractFromKey(t,n){let a=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let r=n.ns||this.options.defaultNS||[];const o=a&&t.indexOf(a)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!FT(t,a,i);if(o&&!s){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:ee(r)?[r]:r};const c=t.split(a);(a!==i||a===i&&this.options.ns.indexOf(c[0])>-1)&&(r=c.shift()),t=c.join(i)}return{key:t,namespaces:ee(r)?[r]:r}}translate(t,n,a){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,r=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:o,namespaces:s}=this.extractFromKey(t[t.length-1],n),l=s[s.length-1],c=n.lng||this.language,m=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(m){const j=n.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${j}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${j}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:o}const f=this.resolve(t,n);let p=f&&f.res;const y=f&&f.usedKey||o,k=f&&f.exactUsedKey||o,S=Object.prototype.toString.apply(p),b=["[object Number]","[object Function]","[object RegExp]"],w=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,P=!ee(p)&&typeof p!="boolean"&&typeof p!="number";if(E&&p&&P&&b.indexOf(S)<0&&!(ee(w)&&Array.isArray(p))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const j=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,p,{...n,ns:s}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(f.res=j,f.usedParams=this.getUsedParamsDetails(n),f):j}if(r){const j=Array.isArray(p),F=j?[]:{},z=j?k:y;for(const R in p)if(Object.prototype.hasOwnProperty.call(p,R)){const _=`${z}${r}${R}`;F[R]=this.translate(_,{...n,joinArrays:!1,ns:s}),F[R]===_&&(F[R]=p[R])}p=F}}else if(E&&ee(w)&&Array.isArray(p))p=p.join(w),p&&(p=this.extendTranslation(p,t,n,a));else{let j=!1,F=!1;const z=n.count!==void 0&&!ee(n.count),R=dl.hasDefaultValue(n),_=z?this.pluralResolver.getSuffix(c,n.count,n):"",D=n.ordinal&&z?this.pluralResolver.getSuffix(c,n.count,{ordinal:!1}):"",X=z&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),ne=X&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${_}`]||n[`defaultValue${D}`]||n.defaultValue;!this.isValidLookup(p)&&R&&(j=!0,p=ne),this.isValidLookup(p)||(F=!0,p=o);const he=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&F?void 0:p,_e=R&&ne!==p&&this.options.updateMissing;if(F||j||_e){if(this.logger.log(_e?"updateKey":"missingKey",c,l,o,_e?ne:p),r){const O=this.resolve(o,{...n,keySeparator:!1});O&&O.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let Ie=[];const Je=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Je&&Je[0])for(let O=0;O<Je.length;O++)Ie.push(Je[O]);else this.options.saveMissingTo==="all"?Ie=this.languageUtils.toResolveHierarchy(n.lng||this.language):Ie.push(n.lng||this.language);const N=(O,V,ie)=>{const I=R&&ie!==p?ie:he;this.options.missingKeyHandler?this.options.missingKeyHandler(O,l,V,I,_e,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(O,l,V,I,_e,n),this.emit("missingKey",O,l,V,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&z?Ie.forEach(O=>{const V=this.pluralResolver.getSuffixes(O,n);X&&n[`defaultValue${this.options.pluralSeparator}zero`]&&V.indexOf(`${this.options.pluralSeparator}zero`)<0&&V.push(`${this.options.pluralSeparator}zero`),V.forEach(ie=>{N([O],o+ie,n[`defaultValue${ie}`]||ne)})}):N(Ie,o,ne))}p=this.extendTranslation(p,t,n,f,a),F&&p===o&&this.options.appendNamespaceToMissingKey&&(p=`${l}:${o}`),(F||j)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${o}`:o,j?p:void 0):p=this.options.parseMissingKeyHandler(p))}return i?(f.res=p,f.usedParams=this.getUsedParamsDetails(n),f):p}extendTranslation(t,n,a,i,r){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...a},a.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!a.skipInterpolation){a.interpolation&&this.interpolator.init({...a,interpolation:{...this.options.interpolation,...a.interpolation}});const c=ee(t)&&(a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(c){const p=t.match(this.interpolator.nestingRegexp);m=p&&p.length}let f=a.replace&&!ee(a.replace)?a.replace:a;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,a.lng||this.language||i.usedLng,a),c){const p=t.match(this.interpolator.nestingRegexp),y=p&&p.length;m<y&&(a.nest=!1)}!a.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(a.lng=this.language||i.usedLng),a.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var p=arguments.length,y=new Array(p),k=0;k<p;k++)y[k]=arguments[k];return r&&r[0]===y[0]&&!a.context?(o.logger.warn(`It seems you are nesting recursively key: ${y[0]} in key: ${n[0]}`),null):o.translate(...y,n)},a)),a.interpolation&&this.interpolator.reset()}const s=a.postProcess||this.options.postProcess,l=ee(s)?[s]:s;return t!=null&&l&&l.length&&a.applyPostProcessor!==!1&&(t=rk.handle(l,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(a)},...a}:a,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a,i,r,o,s;return ee(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(a))return;const c=this.extractFromKey(l,n),m=c.key;i=m;let f=c.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const p=n.count!==void 0&&!ee(n.count),y=p&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),k=n.context!==void 0&&(ee(n.context)||typeof n.context=="number")&&n.context!=="",S=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(b=>{this.isValidLookup(a)||(s=b,!ok[`${S[0]}-${b}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(ok[`${S[0]}-${b}`]=!0,this.logger.warn(`key "${i}" for languages "${S.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),S.forEach(w=>{if(this.isValidLookup(a))return;o=w;const E=[m];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(E,m,w,b,n);else{let j;p&&(j=this.pluralResolver.getSuffix(w,n.count,n));const F=`${this.options.pluralSeparator}zero`,z=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(E.push(m+j),n.ordinal&&j.indexOf(z)===0&&E.push(m+j.replace(z,this.options.pluralSeparator)),y&&E.push(m+F)),k){const R=`${m}${this.options.contextSeparator}${n.context}`;E.push(R),p&&(E.push(R+j),n.ordinal&&j.indexOf(z)===0&&E.push(R+j.replace(z,this.options.pluralSeparator)),y&&E.push(R+F))}}let P;for(;P=E.pop();)this.isValidLookup(a)||(r=P,a=this.getResource(w,b,P,n))}))})}),{res:a,usedKey:i,exactUsedKey:r,usedLng:o,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,a){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,a,i):this.resourceStore.getResource(t,n,a,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],a=t.replace&&!ee(t.replace);let i=a?t.replace:t;if(a&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!a){i={...i};for(const r of n)delete i[r]}return i}static hasDefaultValue(t){const n="defaultValue";for(const a in t)if(Object.prototype.hasOwnProperty.call(t,a)&&n===a.substring(0,n.length)&&t[a]!==void 0)return!0;return!1}}const Vd=e=>e.charAt(0).toUpperCase()+e.slice(1);class sk{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=tn.create("languageUtils")}getScriptPartFromCode(t){if(t=ll(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=ll(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(ee(t)&&t.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let i=Intl.getCanonicalLocales(t)[0];if(i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i)return i}catch{}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let a=t.split("-");return this.options.lowerCaseLng?a=a.map(i=>i.toLowerCase()):a.length===2?(a[0]=a[0].toLowerCase(),a[1]=a[1].toUpperCase(),n.indexOf(a[1].toLowerCase())>-1&&(a[1]=Vd(a[1].toLowerCase()))):a.length===3&&(a[0]=a[0].toLowerCase(),a[1].length===2&&(a[1]=a[1].toUpperCase()),a[0]!=="sgn"&&a[2].length===2&&(a[2]=a[2].toUpperCase()),n.indexOf(a[1].toLowerCase())>-1&&(a[1]=Vd(a[1].toLowerCase())),n.indexOf(a[2].toLowerCase())>-1&&(a[2]=Vd(a[2].toLowerCase()))),a.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(a=>{if(n)return;const i=this.formatLanguageCode(a);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(a=>{if(n)return;const i=this.getLanguagePartFromCode(a);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(r=>{if(r===i)return r;if(!(r.indexOf("-")<0&&i.indexOf("-")<0)&&(r.indexOf("-")>0&&i.indexOf("-")<0&&r.substring(0,r.indexOf("-"))===i||r.indexOf(i)===0&&i.length>1))return r})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),ee(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let a=t[n];return a||(a=t[this.getScriptPartFromCode(n)]),a||(a=t[this.formatLanguageCode(n)]),a||(a=t[this.getLanguagePartFromCode(n)]),a||(a=t.default),a||[]}toResolveHierarchy(t,n){const a=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],r=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return ee(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&r(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&r(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&r(this.getLanguagePartFromCode(t))):ee(t)&&r(this.formatLanguageCode(t)),a.forEach(o=>{i.indexOf(o)<0&&r(this.formatLanguageCode(o))}),i}}let OT=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],_T={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const RT=["v1","v2","v3"],UT=["v4"],lk={zero:0,one:1,two:2,few:3,many:4,other:5},LT=()=>{const e={};return OT.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:_T[t.fc]}})}),e};class YT{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=tn.create("pluralResolver"),(!this.options.compatibilityJSON||UT.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=LT(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const a=ll(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:a,type:i});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];let o;try{o=new Intl.PluralRules(a,{type:i})}catch{if(!t.match(/-|_/))return;const l=this.languageUtils.getLanguagePartFromCode(t);o=this.getRule(l,n)}return this.pluralRulesCache[r]=o,o}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const a=this.getRule(t,n);return this.shouldUseIntlApi()?a&&a.resolvedOptions().pluralCategories.length>1:a&&a.numbers.length>1}getPluralFormsOfKey(t,n){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,a).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const a=this.getRule(t,n);return a?this.shouldUseIntlApi()?a.resolvedOptions().pluralCategories.sort((i,r)=>lk[i]-lk[r]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):a.numbers.map(i=>this.getSuffix(t,i,n)):[]}getSuffix(t,n){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,a);return i?this.shouldUseIntlApi()?`${this.options.prepend}${a.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:this.getSuffixRetroCompatible(i,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const a=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let i=t.numbers[a];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const r=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:r():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?r():this.options.prepend&&a.toString()?this.options.prepend+a.toString():a.toString()}shouldUseIntlApi(){return!RT.includes(this.options.compatibilityJSON)}}const uk=function(e,t,n){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,r=PT(e,t,n);return!r&&i&&ee(n)&&(r=Bd(e,n,a),r===void 0&&(r=Bd(t,n,a))),r},Hd=e=>e.replace(/\$/g,"$$$$");class BT{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=tn.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:a,useRawValueToEscape:i,prefix:r,prefixEscaped:o,suffix:s,suffixEscaped:l,formatSeparator:c,unescapeSuffix:m,unescapePrefix:f,nestingPrefix:p,nestingPrefixEscaped:y,nestingSuffix:k,nestingSuffixEscaped:S,nestingOptionsSeparator:b,maxReplaces:w,alwaysFormat:E}=t.interpolation;this.escape=n!==void 0?n:AT,this.escapeValue=a!==void 0?a:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=r?xi(r):o||"{{",this.suffix=s?xi(s):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=m?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":m||"",this.nestingPrefix=p?xi(p):y||xi("$t("),this.nestingSuffix=k?xi(k):S||xi(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=w||1e3,this.alwaysFormat=E!==void 0?E:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,a)=>n&&n.source===a?(n.lastIndex=0,n):new RegExp(a,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,a,i){let r,o,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=y=>{if(y.indexOf(this.formatSeparator)<0){const w=uk(n,l,y,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,a,{...i,...n,interpolationkey:y}):w}const k=y.split(this.formatSeparator),S=k.shift().trim(),b=k.join(this.formatSeparator).trim();return this.format(uk(n,l,S,this.options.keySeparator,this.options.ignoreJSONStructure),b,a,{...i,...n,interpolationkey:S})};this.resetRegExp();const m=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,f=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:y=>Hd(y)},{regex:this.regexp,safeValue:y=>this.escapeValue?Hd(this.escape(y)):Hd(y)}].forEach(y=>{for(s=0;r=y.regex.exec(t);){const k=r[1].trim();if(o=c(k),o===void 0)if(typeof m=="function"){const b=m(t,r,i);o=ee(b)?b:""}else if(i&&Object.prototype.hasOwnProperty.call(i,k))o="";else if(f){o=r[0];continue}else this.logger.warn(`missed to pass in variable ${k} for interpolating ${t}`),o="";else!ee(o)&&!this.useRawValueToEscape&&(o=Qb(o));const S=y.safeValue(o);if(t=t.replace(r[0],S),f?(y.regex.lastIndex+=o.length,y.regex.lastIndex-=r[0].length):y.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,n){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,r,o;const s=(l,c)=>{const m=this.nestingOptionsSeparator;if(l.indexOf(m)<0)return l;const f=l.split(new RegExp(`${m}[ ]*{`));let p=`{${f[1]}`;l=f[0],p=this.interpolate(p,o);const y=p.match(/'/g),k=p.match(/"/g);(y&&y.length%2===0&&!k||k.length%2!==0)&&(p=p.replace(/'/g,'"'));try{o=JSON.parse(p),c&&(o={...c,...o})}catch(S){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,S),`${l}${m}${p}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;i=this.nestingRegexp.exec(t);){let l=[];o={...a},o=o.replace&&!ee(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let c=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const m=i[1].split(this.formatSeparator).map(f=>f.trim());i[1]=m.shift(),l=m,c=!0}if(r=n(s.call(this,i[1].trim(),o),o),r&&i[0]===t&&!ee(r))return r;ee(r)||(r=Qb(r)),r||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),r=""),c&&(r=l.reduce((m,f)=>this.format(m,f,a.lng,{...a,interpolationkey:i[1].trim()}),r.trim())),t=t.replace(i[0],r),this.regexp.lastIndex=0}return t}}const VT=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const a=e.split("(");t=a[0].toLowerCase().trim();const i=a[1].substring(0,a[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(o=>{if(o){const[s,...l]=o.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),m=s.trim();n[m]||(n[m]=c),c==="false"&&(n[m]=!1),c==="true"&&(n[m]=!0),isNaN(c)||(n[m]=parseInt(c,10))}})}return{formatName:t,formatOptions:n}},Ei=e=>{const t={};return(n,a,i)=>{let r=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(r={...r,[i.interpolationkey]:void 0});const o=a+JSON.stringify(r);let s=t[o];return s||(s=e(ll(a),i),t[o]=s),s(n)}};class HT{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=tn.create("formatter"),this.options=t,this.formats={number:Ei((n,a)=>{const i=new Intl.NumberFormat(n,{...a});return r=>i.format(r)}),currency:Ei((n,a)=>{const i=new Intl.NumberFormat(n,{...a,style:"currency"});return r=>i.format(r)}),datetime:Ei((n,a)=>{const i=new Intl.DateTimeFormat(n,{...a});return r=>i.format(r)}),relativetime:Ei((n,a)=>{const i=new Intl.RelativeTimeFormat(n,{...a});return r=>i.format(r,a.range||"day")}),list:Ei((n,a)=>{const i=new Intl.ListFormat(n,{...a});return r=>i.format(r)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Ei(n)}format(t,n,a){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=n.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&r[0].indexOf(")")<0&&r.find(s=>s.indexOf(")")>-1)){const s=r.findIndex(l=>l.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,s)].join(this.formatSeparator)}return r.reduce((s,l)=>{const{formatName:c,formatOptions:m}=VT(l);if(this.formats[c]){let f=s;try{const p=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},y=p.locale||p.lng||i.locale||i.lng||a;f=this.formats[c](s,y,{...m,...i,...p})}catch(p){this.logger.warn(p)}return f}else this.logger.warn(`there was no format function for ${c}`);return s},t)}}const WT=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class GT extends cl{constructor(t,n,a){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=a,this.languageUtils=a.languageUtils,this.options=i,this.logger=tn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(a,i.backend,i)}queueLoad(t,n,a,i){const r={},o={},s={},l={};return t.forEach(c=>{let m=!0;n.forEach(f=>{const p=`${c}|${f}`;!a.reload&&this.store.hasResourceBundle(c,f)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?o[p]===void 0&&(o[p]=!0):(this.state[p]=1,m=!1,o[p]===void 0&&(o[p]=!0),r[p]===void 0&&(r[p]=!0),l[f]===void 0&&(l[f]=!0)))}),m||(s[c]=!0)}),(Object.keys(r).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(t,n,a){const i=t.split("|"),r=i[0],o=i[1];n&&this.emit("failedLoading",r,o,n),!n&&a&&this.store.addResourceBundle(r,o,a,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&a&&(this.state[t]=0);const s={};this.queue.forEach(l=>{TT(l.loaded,[r],o),WT(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{s[c]||(s[c]={});const m=l.loaded[c];m.length&&m.forEach(f=>{s[c][f]===void 0&&(s[c][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(t,n,a){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:a,tried:i,wait:r,callback:o});return}this.readingCalls++;const s=(c,m)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(c&&m&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,a,i+1,r*2,o)},r);return}o(c,m)},l=this.backend[a].bind(this.backend);if(l.length===2){try{const c=l(t,n);c&&typeof c.then=="function"?c.then(m=>s(null,m)).catch(s):s(null,c)}catch(c){s(c)}return}return l(t,n,s)}prepareLoading(t,n){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();ee(t)&&(t=this.languageUtils.toResolveHierarchy(t)),ee(n)&&(n=[n]);const r=this.queueLoad(t,n,a,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach(o=>{this.loadOne(o)})}load(t,n,a){this.prepareLoading(t,n,{},a)}reload(t,n,a){this.prepareLoading(t,n,{reload:!0},a)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const a=t.split("|"),i=a[0],r=a[1];this.read(i,r,"read",void 0,void 0,(o,s)=>{o&&this.logger.warn(`${n}loading namespace ${r} for language ${i} failed`,o),!o&&s&&this.logger.log(`${n}loaded namespace ${r} for language ${i}`,s),this.loaded(t,o,s)})}saveMissing(t,n,a,i,r){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${a}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(a==null||a==="")){if(this.backend&&this.backend.create){const l={...o,isUpdate:r},c=this.backend.create.bind(this.backend);if(c.length<6)try{let m;c.length===5?m=c(t,n,a,i,l):m=c(t,n,a,i),m&&typeof m.then=="function"?m.then(f=>s(null,f)).catch(s):s(null,m)}catch(m){s(m)}else c(t,n,a,i,s,l)}!t||!t[0]||this.store.addResource(t[0],n,a,i)}}}const ck=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),ee(e[1])&&(t.defaultValue=e[1]),ee(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(a=>{t[a]=n[a]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),dk=e=>(ee(e.ns)&&(e.ns=[e.ns]),ee(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),ee(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),ml=()=>{},KT=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Qr extends cl{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=dk(t),this.services={},this.logger=tn,this.modules={external:[]},KT(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(a=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(ee(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=ck();this.options={...i,...this.options,...dk(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const r=m=>m?typeof m=="function"?new m:m:null;if(!this.options.isClone){this.modules.logger?tn.init(r(this.modules.logger),this.options):tn.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:typeof Intl<"u"&&(m=HT);const f=new sk(this.options);this.store=new ik(this.options.resources,this.options);const p=this.services;p.logger=tn,p.resourceStore=this.store,p.languageUtils=f,p.pluralResolver=new YT(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),m&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(p.formatter=r(m),p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new BT(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new GT(r(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",function(y){for(var k=arguments.length,S=new Array(k>1?k-1:0),b=1;b<k;b++)S[b-1]=arguments[b];t.emit(y,...S)}),this.modules.languageDetector&&(p.languageDetector=r(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=r(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new dl(this.services,this.options),this.translator.on("*",function(y){for(var k=arguments.length,S=new Array(k>1?k-1:0),b=1;b<k;b++)S[b-1]=arguments[b];t.emit(y,...S)}),this.modules.external.forEach(y=>{y.init&&y.init(this)})}if(this.format=this.options.interpolation.format,a||(a=ml),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(m=>{this[m]=function(){return t.store[m](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=function(){return t.store[m](...arguments),t}});const l=Zr(),c=()=>{const m=(f,p)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(p),a(f,p)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return m(null,this.t.bind(this));this.changeLanguage(this.options.lng,m)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}loadResources(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ml;const i=ee(t)?t:this.language;if(typeof t=="function"&&(a=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return a();const r=[],o=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(c=>{c!=="cimode"&&r.indexOf(c)<0&&r.push(c)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>o(l)),this.options.preload&&this.options.preload.forEach(s=>o(s)),this.services.backendConnector.load(r,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),a(s)})}else a(null)}reloadResources(t,n,a){const i=Zr();return typeof t=="function"&&(a=t,t=void 0),typeof n=="function"&&(a=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),a||(a=ml),this.services.backendConnector.reload(t,n,r=>{i.resolve(),a(r)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&rk.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const a=this.languages[n];if(!(["cimode","dev"].indexOf(a)>-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}}changeLanguage(t,n){var a=this;this.isLanguageChangingTo=t;const i=Zr();this.emit("languageChanging",t);const r=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},o=(l,c)=>{c?(r(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,i.resolve(function(){return a.t(...arguments)}),n&&n(l,function(){return a.t(...arguments)})},s=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const c=ee(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);c&&(this.language||r(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,m=>{o(m,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),i}getFixedT(t,n,a){var i=this;const r=function(o,s){let l;if(typeof s!="object"){for(var c=arguments.length,m=new Array(c>2?c-2:0),f=2;f<c;f++)m[f-2]=arguments[f];l=i.options.overloadTranslationOptionHandler([o,s].concat(m))}else l={...s};l.lng=l.lng||r.lng,l.lngs=l.lngs||r.lngs,l.ns=l.ns||r.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||a||r.keyPrefix);const p=i.options.keySeparator||".";let y;return l.keyPrefix&&Array.isArray(o)?y=o.map(k=>`${l.keyPrefix}${p}${k}`):y=l.keyPrefix?`${l.keyPrefix}${p}${o}`:o,i.t(y,l)};return ee(t)?r.lng=t:r.lngs=t,r.ns=n,r.keyPrefix=a,r}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const a=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,r=this.languages[this.languages.length-1];if(a.toLowerCase()==="cimode")return!0;const o=(s,l)=>{const c=this.services.backendConnector.state[`${s}|${l}`];return c===-1||c===0||c===2};if(n.precheck){const s=n.precheck(this,o);if(s!==void 0)return s}return!!(this.hasResourceBundle(a,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(a,t)&&(!i||o(r,t)))}loadNamespaces(t,n){const a=Zr();return this.options.ns?(ee(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{a.resolve(),n&&n(i)}),a):(n&&n(),Promise.resolve())}loadLanguages(t,n){const a=Zr();ee(t)&&(t=[t]);const i=this.options.preload||[],r=t.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return r.length?(this.options.preload=i.concat(r),this.loadResources(o=>{a.resolve(),n&&n(o)}),a):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],a=this.services&&this.services.languageUtils||new sk(ck());return n.indexOf(a.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Qr(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ml;const a=t.forkResourceStore;a&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},r=new Qr(i);return(t.debug!==void 0||t.prefix!==void 0)&&(r.logger=r.logger.clone(t)),["store","services","language"].forEach(s=>{r[s]=this[s]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},a&&(r.store=new ik(this.store.data,i),r.services.resourceStore=r.store),r.translator=new dl(r.services,i),r.translator.on("*",function(s){for(var l=arguments.length,c=new Array(l>1?l-1:0),m=1;m<l;m++)c[m-1]=arguments[m];r.emit(s,...c)}),r.init(i,n),r.translator.options=i,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const mk=Qr.createInstance();mk.createInstance=Qr.createInstance;var qT=mk;const Si=dh(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let pl;const JT=new Uint8Array(16);function ZT(){if(!pl&&(pl=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!pl))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return pl(JT)}const Ke=[];for(let e=0;e<256;++e)Ke.push((e+256).toString(16).slice(1));function XT(e,t=0){return Ke[e[t+0]]+Ke[e[t+1]]+Ke[e[t+2]]+Ke[e[t+3]]+"-"+Ke[e[t+4]]+Ke[e[t+5]]+"-"+Ke[e[t+6]]+Ke[e[t+7]]+"-"+Ke[e[t+8]]+Ke[e[t+9]]+"-"+Ke[e[t+10]]+Ke[e[t+11]]+Ke[e[t+12]]+Ke[e[t+13]]+Ke[e[t+14]]+Ke[e[t+15]]}let pk,Wd,Gd=0,Kd=0;function QT(e,t,n){let a=0;const i=new Array(16);e=e||{};let r=e.node||pk,o=e.clockseq!==void 0?e.clockseq:Wd;if(r==null||o==null){const p=e.random||(e.rng||ZT)();r==null&&(r=pk=[p[0]|1,p[1],p[2],p[3],p[4],p[5]]),o==null&&(o=Wd=(p[6]<<8|p[7])&16383)}let s=e.msecs!==void 0?e.msecs:Date.now(),l=e.nsecs!==void 0?e.nsecs:Kd+1;const c=s-Gd+(l-Kd)/1e4;if(c<0&&e.clockseq===void 0&&(o=o+1&16383),(c<0||s>Gd)&&e.nsecs===void 0&&(l=0),l>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Gd=s,Kd=l,Wd=o,s+=122192928e5;const m=((s&268435455)*1e4+l)%4294967296;i[a++]=m>>>24&255,i[a++]=m>>>16&255,i[a++]=m>>>8&255,i[a++]=m&255;const f=s/4294967296*1e4&268435455;i[a++]=f>>>8&255,i[a++]=f&255,i[a++]=f>>>24&15|16,i[a++]=f>>>16&255,i[a++]=o>>>8|128,i[a++]=o&255;for(let p=0;p<6;++p)i[a+p]=r[p];return t||XT(i)}function eP(e,t){var r,o;const n=(((r=e.stack)==null?void 0:r.split(/\n/g))||[])[1],[a,...i]=((o=t.stack)==null?void 0:o.split(/\n/g))||[];return[a,n,...i].join(`
|
|
67
67
|
`)}var tP=Object.defineProperty,nP=(e,t,n)=>t in e?tP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yt=(e,t,n)=>(nP(e,typeof t!="symbol"?t+"":t,n),n);class ce extends Error{constructor(t={}){super(),Yt(this,"statusCode"),Yt(this,"errorType"),Yt(this,"level"),Yt(this,"id"),Yt(this,"context"),Yt(this,"help"),Yt(this,"errorDetails"),Yt(this,"code"),Yt(this,"property"),Yt(this,"redirect"),Yt(this,"hideStack"),this.statusCode=500,this.errorType="InternalServerError",this.level="normal",this.message="The server has encountered an error.",this.id=QT(),this.id=t.id||this.id,this.statusCode=t.statusCode||this.statusCode,this.level=t.level||this.level,this.context=t.context,this.help=t.help,this.errorType=this.name=t.errorType||this.errorType,this.errorDetails=t.errorDetails,this.code=t.code||null,this.property=t.property||null,this.redirect=t.redirect||null,this.message=t.message||this.message,this.hideStack=t.hideStack||!1,t.err&&(typeof t.err=="string"&&(t.err=new Error(t.err)),Object.getOwnPropertyNames(t.err).forEach(n=>{if(["errorType","name","statusCode","message","level"].indexOf(n)===-1){if(n==="code"){this[n]=this[n]||t.err[n];return}if(n==="stack"&&!this.hideStack){this[n]=eP(this,t.err);return}this[n]=t.err[n]||this[n]}}))}}const ge=(e,t)=>{const n={...t};return Object.keys(e).forEach(a=>{e[a]!==void 0&&(n[a]=e[a])}),n};class Ci extends ce{constructor(t={}){super(ge(t,{statusCode:500,level:"critical",errorType:"InternalServerError",message:"The server has encountered an error."}))}}class hk extends ce{constructor(t={}){super(ge(t,{statusCode:400,level:"critical",errorType:"IncorrectUsageError",message:"We detected a misuse. Please read the stack trace."}))}}class fk extends ce{constructor(t={}){super(ge(t,{statusCode:404,errorType:"NotFoundError",message:"Resource could not be found.",hideStack:!0}))}}class qd extends ce{constructor(t={}){super(ge(t,{statusCode:400,errorType:"BadRequestError",message:"The request could not be understood."}))}}class gk extends ce{constructor(t={}){super(ge(t,{statusCode:401,errorType:"UnauthorizedError",message:"You are not authorised to make this request."}))}}class Jd extends ce{constructor(t={}){super(ge(t,{statusCode:403,errorType:"NoPermissionError",message:"You do not have permission to perform this request."}))}}class Zd extends ce{constructor(t={}){super(ge(t,{statusCode:422,errorType:"ValidationError",message:"The request failed validation."}))}}class yk extends ce{constructor(t={}){super(ge(t,{statusCode:415,errorType:"UnsupportedMediaTypeError",message:"The media in the request is not supported by the server."}))}}class bk extends ce{constructor(t={}){super(ge(t,{statusCode:429,errorType:"TooManyRequestsError",message:"Server has received too many similar requests in a short space of time."}))}}class Xd extends ce{constructor(t={}){super(ge(t,{statusCode:503,errorType:"MaintenanceError",message:"The server is temporarily down for maintenance."}))}}class kk extends ce{constructor(t={}){super(ge(t,{statusCode:405,errorType:"MethodNotAllowedError",message:"Method not allowed for resource."}))}}class vk extends ce{constructor(t={}){super(ge(t,{statusCode:406,errorType:"RequestNotAcceptableError",message:"Request not acceptable for provided Accept-Version header.",hideStack:!0}))}}class wk extends ce{constructor(t={}){super(ge(t,{statusCode:416,errorType:"RangeNotSatisfiableError",message:"Range not satisfiable for provided Range header.",hideStack:!0}))}}class xk extends ce{constructor(t={}){super(ge(t,{statusCode:413,errorType:"RequestEntityTooLargeError",message:"Request was too big for the server to handle."}))}}class Ek extends ce{constructor(t={}){super(ge(t,{statusCode:503,errorType:"TokenRevocationError",message:"Token is no longer available."}))}}class Sk extends ce{constructor(t={}){super(ge(t,{statusCode:400,errorType:"VersionMismatchError",message:"Requested version does not match server version."}))}}class Ck extends ce{constructor(t={}){super(ge(t,{statusCode:500,errorType:"DataExportError",message:"The server encountered an error whilst exporting data."}))}}class $k extends ce{constructor(t={}){super(ge(t,{statusCode:500,errorType:"DataImportError",message:"The server encountered an error whilst importing data."}))}}class jk extends ce{constructor(t={}){super(ge(t,{statusCode:500,errorType:"EmailError",message:"The server encountered an error whilst sending email."}))}}class Tk extends ce{constructor(t={}){super(ge(t,{statusCode:422,errorType:"ThemeValidationError",message:"The theme has a validation error.",errorDetails:{}}))}}class Pk extends ce{constructor(t={}){super(ge(t,{statusCode:409,errorType:"DisabledFeatureError",message:"Unable to complete the request, this feature is disabled."}))}}class zk extends ce{constructor(t={}){super(ge(t,{statusCode:409,errorType:"UpdateCollisionError",message:"Unable to complete the request, there was a conflict."}))}}class Ak extends ce{constructor(t={}){super(ge(t,{errorType:"HostLimitError",hideStack:!0,statusCode:403,message:"Unable to complete the request, this resource is limited."}))}}class Nk extends ce{constructor(t={}){super(ge(t,{errorType:"HelperWarning",hideStack:!0,statusCode:400,message:"A theme helper has done something unexpected."}))}}class Ik extends ce{constructor(t={}){super(ge(t,{errorType:"PasswordResetRequiredError",statusCode:401,message:"For security, you need to create a new password. An email has been sent to you with instructions!"}))}}class Mk extends ce{constructor(t={}){super(ge(t,{errorType:"UnhandledJobError",message:"Processed job threw an unhandled error",level:"critical"}))}}class Fk extends ce{constructor(t={}){super(ge(t,{errorType:"NoContentError",statusCode:204,hideStack:!0}))}}class Dk extends ce{constructor(t={}){super(ge(t,{errorType:"ConflictError",statusCode:409,message:"The server has encountered an conflict."}))}}class Ok extends ce{constructor(t={}){super(ge(t,{errorType:"MigrationError",message:"An error has occurred applying a database migration.",level:"critical"}))}}const _k=Object.freeze(Object.defineProperty({__proto__:null,BadRequestError:qd,ConflictError:Dk,DataExportError:Ck,DataImportError:$k,DisabledFeatureError:Pk,EmailError:jk,HelperWarning:Nk,HostLimitError:Ak,IncorrectUsageError:hk,InternalServerError:Ci,MaintenanceError:Xd,MethodNotAllowedError:kk,MigrationError:Ok,NoContentError:Fk,NoPermissionError:Jd,NotFoundError:fk,PasswordResetRequiredError:Ik,RangeNotSatisfiableError:wk,RequestEntityTooLargeError:xk,RequestNotAcceptableError:vk,ThemeValidationError:Tk,TokenRevocationError:Ek,TooManyRequestsError:bk,UnauthorizedError:gk,UnhandledJobError:Mk,UnsupportedMediaTypeError:yk,UpdateCollisionError:zk,ValidationError:Zd,VersionMismatchError:Sk},Symbol.toStringTag,{value:"Module"}));/**
|
|
68
68
|
* @license Apache-2.0
|
|
69
69
|
*
|
|
@@ -2608,12 +2608,12 @@ Url: ${Gs(e)}`),!0)}function R0(e,t){return e.type||!t||!t.length?!1:B0(e).some(
|
|
|
2608
2608
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2609
2609
|
* See the License for the specific language governing permissions and
|
|
2610
2610
|
* limitations under the License.
|
|
2611
|
-
*/var y3=g3,b3=y3,Jv={},xl={};xl.byteLength=w3,xl.toByteArray=E3,xl.fromByteArray=$3;for(var nn=[],Mt=[],k3=typeof Uint8Array<"u"?Uint8Array:Array,Em="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Pi=0,v3=Em.length;Pi<v3;++Pi)nn[Pi]=Em[Pi],Mt[Em.charCodeAt(Pi)]=Pi;Mt[45]=62,Mt[95]=63;function Zv(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var a=n===t?0:4-n%4;return[n,a]}function w3(e){var t=Zv(e),n=t[0],a=t[1];return(n+a)*3/4-a}function x3(e,t,n){return(t+n)*3/4-n}function E3(e){var t,n=Zv(e),a=n[0],i=n[1],r=new k3(x3(e,a,i)),o=0,s=i>0?a-4:a,l;for(l=0;l<s;l+=4)t=Mt[e.charCodeAt(l)]<<18|Mt[e.charCodeAt(l+1)]<<12|Mt[e.charCodeAt(l+2)]<<6|Mt[e.charCodeAt(l+3)],r[o++]=t>>16&255,r[o++]=t>>8&255,r[o++]=t&255;return i===2&&(t=Mt[e.charCodeAt(l)]<<2|Mt[e.charCodeAt(l+1)]>>4,r[o++]=t&255),i===1&&(t=Mt[e.charCodeAt(l)]<<10|Mt[e.charCodeAt(l+1)]<<4|Mt[e.charCodeAt(l+2)]>>2,r[o++]=t>>8&255,r[o++]=t&255),r}function S3(e){return nn[e>>18&63]+nn[e>>12&63]+nn[e>>6&63]+nn[e&63]}function C3(e,t,n){for(var a,i=[],r=t;r<n;r+=3)a=(e[r]<<16&16711680)+(e[r+1]<<8&65280)+(e[r+2]&255),i.push(S3(a));return i.join("")}function $3(e){for(var t,n=e.length,a=n%3,i=[],r=16383,o=0,s=n-a;o<s;o+=r)i.push(C3(e,o,o+r>s?s:o+r));return a===1?(t=e[n-1],i.push(nn[t>>2]+nn[t<<4&63]+"==")):a===2&&(t=(e[n-2]<<8)+e[n-1],i.push(nn[t>>10]+nn[t>>4&63]+nn[t<<2&63]+"=")),i.join("")}var Sm={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Sm.read=function(e,t,n,a,i){var r,o,s=i*8-a-1,l=(1<<s)-1,c=l>>1,m=-7,f=n?i-1:0,p=n?-1:1,y=e[t+f];for(f+=p,r=y&(1<<-m)-1,y>>=-m,m+=s;m>0;r=r*256+e[t+f],f+=p,m-=8);for(o=r&(1<<-m)-1,r>>=-m,m+=a;m>0;o=o*256+e[t+f],f+=p,m-=8);if(r===0)r=1-c;else{if(r===l)return o?NaN:(y?-1:1)*(1/0);o=o+Math.pow(2,a),r=r-c}return(y?-1:1)*o*Math.pow(2,r-a)},Sm.write=function(e,t,n,a,i,r){var o,s,l,c=r*8-i-1,m=(1<<c)-1,f=m>>1,p=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=a?0:r-1,k=a?1:-1,
|
|
2611
|
+
*/var y3=g3,b3=y3,Jv={},xl={};xl.byteLength=w3,xl.toByteArray=E3,xl.fromByteArray=$3;for(var nn=[],Mt=[],k3=typeof Uint8Array<"u"?Uint8Array:Array,Em="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Pi=0,v3=Em.length;Pi<v3;++Pi)nn[Pi]=Em[Pi],Mt[Em.charCodeAt(Pi)]=Pi;Mt[45]=62,Mt[95]=63;function Zv(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var a=n===t?0:4-n%4;return[n,a]}function w3(e){var t=Zv(e),n=t[0],a=t[1];return(n+a)*3/4-a}function x3(e,t,n){return(t+n)*3/4-n}function E3(e){var t,n=Zv(e),a=n[0],i=n[1],r=new k3(x3(e,a,i)),o=0,s=i>0?a-4:a,l;for(l=0;l<s;l+=4)t=Mt[e.charCodeAt(l)]<<18|Mt[e.charCodeAt(l+1)]<<12|Mt[e.charCodeAt(l+2)]<<6|Mt[e.charCodeAt(l+3)],r[o++]=t>>16&255,r[o++]=t>>8&255,r[o++]=t&255;return i===2&&(t=Mt[e.charCodeAt(l)]<<2|Mt[e.charCodeAt(l+1)]>>4,r[o++]=t&255),i===1&&(t=Mt[e.charCodeAt(l)]<<10|Mt[e.charCodeAt(l+1)]<<4|Mt[e.charCodeAt(l+2)]>>2,r[o++]=t>>8&255,r[o++]=t&255),r}function S3(e){return nn[e>>18&63]+nn[e>>12&63]+nn[e>>6&63]+nn[e&63]}function C3(e,t,n){for(var a,i=[],r=t;r<n;r+=3)a=(e[r]<<16&16711680)+(e[r+1]<<8&65280)+(e[r+2]&255),i.push(S3(a));return i.join("")}function $3(e){for(var t,n=e.length,a=n%3,i=[],r=16383,o=0,s=n-a;o<s;o+=r)i.push(C3(e,o,o+r>s?s:o+r));return a===1?(t=e[n-1],i.push(nn[t>>2]+nn[t<<4&63]+"==")):a===2&&(t=(e[n-2]<<8)+e[n-1],i.push(nn[t>>10]+nn[t>>4&63]+nn[t<<2&63]+"=")),i.join("")}var Sm={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Sm.read=function(e,t,n,a,i){var r,o,s=i*8-a-1,l=(1<<s)-1,c=l>>1,m=-7,f=n?i-1:0,p=n?-1:1,y=e[t+f];for(f+=p,r=y&(1<<-m)-1,y>>=-m,m+=s;m>0;r=r*256+e[t+f],f+=p,m-=8);for(o=r&(1<<-m)-1,r>>=-m,m+=a;m>0;o=o*256+e[t+f],f+=p,m-=8);if(r===0)r=1-c;else{if(r===l)return o?NaN:(y?-1:1)*(1/0);o=o+Math.pow(2,a),r=r-c}return(y?-1:1)*o*Math.pow(2,r-a)},Sm.write=function(e,t,n,a,i,r){var o,s,l,c=r*8-i-1,m=(1<<c)-1,f=m>>1,p=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=a?0:r-1,k=a?1:-1,S=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=m):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+f>=1?t+=p/l:t+=p*Math.pow(2,1-f),t*l>=2&&(o++,l/=2),o+f>=m?(s=0,o=m):o+f>=1?(s=(t*l-1)*Math.pow(2,i),o=o+f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[n+y]=s&255,y+=k,s/=256,i-=8);for(o=o<<i|s,c+=i;c>0;e[n+y]=o&255,y+=k,o/=256,c-=8);e[n+y-k]|=S*128};/*!
|
|
2612
2612
|
* The buffer module from node.js, for the browser.
|
|
2613
2613
|
*
|
|
2614
2614
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
2615
2615
|
* @license MIT
|
|
2616
|
-
*/(function(e){const t=xl,n=Sm,a=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=E,e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=r(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function r(){try{const g=new Uint8Array(1),d={foo:function(){return 42}};return Object.setPrototypeOf(d,Uint8Array.prototype),Object.setPrototypeOf(g,d),g.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(g){if(g>i)throw new RangeError('The value "'+g+'" is invalid for option "size"');const d=new Uint8Array(g);return Object.setPrototypeOf(d,s.prototype),d}function s(g,d,h){if(typeof g=="number"){if(typeof d=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(g)}return l(g,d,h)}s.poolSize=8192;function l(g,d,h){if(typeof g=="string")return p(g,d);if(ArrayBuffer.isView(g))return k(g);if(g==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof g);if(Ct(g,ArrayBuffer)||g&&Ct(g.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ct(g,SharedArrayBuffer)||g&&Ct(g.buffer,SharedArrayBuffer)))return j(g,d,h);if(typeof g=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const x=g.valueOf&&g.valueOf();if(x!=null&&x!==g)return s.from(x,d,h);const T=b(g);if(T)return T;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof g[Symbol.toPrimitive]=="function")return s.from(g[Symbol.toPrimitive]("string"),d,h);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof g)}s.from=function(g,d,h){return l(g,d,h)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function c(g){if(typeof g!="number")throw new TypeError('"size" argument must be of type number');if(g<0)throw new RangeError('The value "'+g+'" is invalid for option "size"')}function m(g,d,h){return c(g),g<=0?o(g):d!==void 0?typeof h=="string"?o(g).fill(d,h):o(g).fill(d):o(g)}s.alloc=function(g,d,h){return m(g,d,h)};function f(g){return c(g),o(g<0?0:w(g)|0)}s.allocUnsafe=function(g){return f(g)},s.allocUnsafeSlow=function(g){return f(g)};function p(g,d){if((typeof d!="string"||d==="")&&(d="utf8"),!s.isEncoding(d))throw new TypeError("Unknown encoding: "+d);const h=P(g,d)|0;let x=o(h);const T=x.write(g,d);return T!==h&&(x=x.slice(0,T)),x}function y(g){const d=g.length<0?0:w(g.length)|0,h=o(d);for(let x=0;x<d;x+=1)h[x]=g[x]&255;return h}function k(g){if(Ct(g,Uint8Array)){const d=new Uint8Array(g);return j(d.buffer,d.byteOffset,d.byteLength)}return y(g)}function j(g,d,h){if(d<0||g.byteLength<d)throw new RangeError('"offset" is outside of buffer bounds');if(g.byteLength<d+(h||0))throw new RangeError('"length" is outside of buffer bounds');let x;return d===void 0&&h===void 0?x=new Uint8Array(g):h===void 0?x=new Uint8Array(g,d):x=new Uint8Array(g,d,h),Object.setPrototypeOf(x,s.prototype),x}function b(g){if(s.isBuffer(g)){const d=w(g.length)|0,h=o(d);return h.length===0||g.copy(h,0,0,d),h}if(g.length!==void 0)return typeof g.length!="number"||xo(g.length)?o(0):y(g);if(g.type==="Buffer"&&Array.isArray(g.data))return y(g.data)}function w(g){if(g>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return g|0}function E(g){return+g!=g&&(g=0),s.alloc(+g)}s.isBuffer=function(d){return d!=null&&d._isBuffer===!0&&d!==s.prototype},s.compare=function(d,h){if(Ct(d,Uint8Array)&&(d=s.from(d,d.offset,d.byteLength)),Ct(h,Uint8Array)&&(h=s.from(h,h.offset,h.byteLength)),!s.isBuffer(d)||!s.isBuffer(h))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(d===h)return 0;let x=d.length,T=h.length;for(let A=0,M=Math.min(x,T);A<M;++A)if(d[A]!==h[A]){x=d[A],T=h[A];break}return x<T?-1:T<x?1:0},s.isEncoding=function(d){switch(String(d).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(d,h){if(!Array.isArray(d))throw new TypeError('"list" argument must be an Array of Buffers');if(d.length===0)return s.alloc(0);let x;if(h===void 0)for(h=0,x=0;x<d.length;++x)h+=d[x].length;const T=s.allocUnsafe(h);let A=0;for(x=0;x<d.length;++x){let M=d[x];if(Ct(M,Uint8Array))A+M.length>T.length?(s.isBuffer(M)||(M=s.from(M)),M.copy(T,A)):Uint8Array.prototype.set.call(T,M,A);else if(s.isBuffer(M))M.copy(T,A);else throw new TypeError('"list" argument must be an Array of Buffers');A+=M.length}return T};function P(g,d){if(s.isBuffer(g))return g.length;if(ArrayBuffer.isView(g)||Ct(g,ArrayBuffer))return g.byteLength;if(typeof g!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof g);const h=g.length,x=arguments.length>2&&arguments[2]===!0;if(!x&&h===0)return 0;let T=!1;for(;;)switch(d){case"ascii":case"latin1":case"binary":return h;case"utf8":case"utf-8":return Ia(g).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return h*2;case"hex":return h>>>1;case"base64":return Ma(g).length;default:if(T)return x?-1:Ia(g).length;d=(""+d).toLowerCase(),T=!0}}s.byteLength=P;function $(g,d,h){let x=!1;if((d===void 0||d<0)&&(d=0),d>this.length||((h===void 0||h>this.length)&&(h=this.length),h<=0)||(h>>>=0,d>>>=0,h<=d))return"";for(g||(g="utf8");;)switch(g){case"hex":return V(this,d,h);case"utf8":case"utf-8":return _e(this,d,h);case"ascii":return N(this,d,h);case"latin1":case"binary":return O(this,d,h);case"base64":return he(this,d,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ie(this,d,h);default:if(x)throw new TypeError("Unknown encoding: "+g);g=(g+"").toLowerCase(),x=!0}}s.prototype._isBuffer=!0;function F(g,d,h){const x=g[d];g[d]=g[h],g[h]=x}s.prototype.swap16=function(){const d=this.length;if(d%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let h=0;h<d;h+=2)F(this,h,h+1);return this},s.prototype.swap32=function(){const d=this.length;if(d%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let h=0;h<d;h+=4)F(this,h,h+3),F(this,h+1,h+2);return this},s.prototype.swap64=function(){const d=this.length;if(d%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let h=0;h<d;h+=8)F(this,h,h+7),F(this,h+1,h+6),F(this,h+2,h+5),F(this,h+3,h+4);return this},s.prototype.toString=function(){const d=this.length;return d===0?"":arguments.length===0?_e(this,0,d):$.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(d){if(!s.isBuffer(d))throw new TypeError("Argument must be a Buffer");return this===d?!0:s.compare(this,d)===0},s.prototype.inspect=function(){let d="";const h=e.INSPECT_MAX_BYTES;return d=this.toString("hex",0,h).replace(/(.{2})/g,"$1 ").trim(),this.length>h&&(d+=" ... "),"<Buffer "+d+">"},a&&(s.prototype[a]=s.prototype.inspect),s.prototype.compare=function(d,h,x,T,A){if(Ct(d,Uint8Array)&&(d=s.from(d,d.offset,d.byteLength)),!s.isBuffer(d))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof d);if(h===void 0&&(h=0),x===void 0&&(x=d?d.length:0),T===void 0&&(T=0),A===void 0&&(A=this.length),h<0||x>d.length||T<0||A>this.length)throw new RangeError("out of range index");if(T>=A&&h>=x)return 0;if(T>=A)return-1;if(h>=x)return 1;if(h>>>=0,x>>>=0,T>>>=0,A>>>=0,this===d)return 0;let M=A-T,te=x-h;const ue=Math.min(M,te),de=this.slice(T,A),ve=d.slice(h,x);for(let me=0;me<ue;++me)if(de[me]!==ve[me]){M=de[me],te=ve[me];break}return M<te?-1:te<M?1:0};function z(g,d,h,x,T){if(g.length===0)return-1;if(typeof h=="string"?(x=h,h=0):h>2147483647?h=2147483647:h<-2147483648&&(h=-2147483648),h=+h,xo(h)&&(h=T?0:g.length-1),h<0&&(h=g.length+h),h>=g.length){if(T)return-1;h=g.length-1}else if(h<0)if(T)h=0;else return-1;if(typeof d=="string"&&(d=s.from(d,x)),s.isBuffer(d))return d.length===0?-1:R(g,d,h,x,T);if(typeof d=="number")return d=d&255,typeof Uint8Array.prototype.indexOf=="function"?T?Uint8Array.prototype.indexOf.call(g,d,h):Uint8Array.prototype.lastIndexOf.call(g,d,h):R(g,[d],h,x,T);throw new TypeError("val must be string, number or Buffer")}function R(g,d,h,x,T){let A=1,M=g.length,te=d.length;if(x!==void 0&&(x=String(x).toLowerCase(),x==="ucs2"||x==="ucs-2"||x==="utf16le"||x==="utf-16le")){if(g.length<2||d.length<2)return-1;A=2,M/=2,te/=2,h/=2}function ue(ve,me){return A===1?ve[me]:ve.readUInt16BE(me*A)}let de;if(T){let ve=-1;for(de=h;de<M;de++)if(ue(g,de)===ue(d,ve===-1?0:de-ve)){if(ve===-1&&(ve=de),de-ve+1===te)return ve*A}else ve!==-1&&(de-=de-ve),ve=-1}else for(h+te>M&&(h=M-te),de=h;de>=0;de--){let ve=!0;for(let me=0;me<te;me++)if(ue(g,de+me)!==ue(d,me)){ve=!1;break}if(ve)return de}return-1}s.prototype.includes=function(d,h,x){return this.indexOf(d,h,x)!==-1},s.prototype.indexOf=function(d,h,x){return z(this,d,h,x,!0)},s.prototype.lastIndexOf=function(d,h,x){return z(this,d,h,x,!1)};function _(g,d,h,x){h=Number(h)||0;const T=g.length-h;x?(x=Number(x),x>T&&(x=T)):x=T;const A=d.length;x>A/2&&(x=A/2);let M;for(M=0;M<x;++M){const te=parseInt(d.substr(M*2,2),16);if(xo(te))return M;g[h+M]=te}return M}function D(g,d,h,x){return Fa(Ia(d,g.length-h),g,h,x)}function X(g,d,h,x){return Fa(aa(d),g,h,x)}function ne(g,d,h,x){return Fa(Ma(d),g,h,x)}function ye(g,d,h,x){return Fa(Ui(d,g.length-h),g,h,x)}s.prototype.write=function(d,h,x,T){if(h===void 0)T="utf8",x=this.length,h=0;else if(x===void 0&&typeof h=="string")T=h,x=this.length,h=0;else if(isFinite(h))h=h>>>0,isFinite(x)?(x=x>>>0,T===void 0&&(T="utf8")):(T=x,x=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const A=this.length-h;if((x===void 0||x>A)&&(x=A),d.length>0&&(x<0||h<0)||h>this.length)throw new RangeError("Attempt to write outside buffer bounds");T||(T="utf8");let M=!1;for(;;)switch(T){case"hex":return _(this,d,h,x);case"utf8":case"utf-8":return D(this,d,h,x);case"ascii":case"latin1":case"binary":return X(this,d,h,x);case"base64":return ne(this,d,h,x);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ye(this,d,h,x);default:if(M)throw new TypeError("Unknown encoding: "+T);T=(""+T).toLowerCase(),M=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function he(g,d,h){return d===0&&h===g.length?t.fromByteArray(g):t.fromByteArray(g.slice(d,h))}function _e(g,d,h){h=Math.min(g.length,h);const x=[];let T=d;for(;T<h;){const A=g[T];let M=null,te=A>239?4:A>223?3:A>191?2:1;if(T+te<=h){let ue,de,ve,me;switch(te){case 1:A<128&&(M=A);break;case 2:ue=g[T+1],(ue&192)===128&&(me=(A&31)<<6|ue&63,me>127&&(M=me));break;case 3:ue=g[T+1],de=g[T+2],(ue&192)===128&&(de&192)===128&&(me=(A&15)<<12|(ue&63)<<6|de&63,me>2047&&(me<55296||me>57343)&&(M=me));break;case 4:ue=g[T+1],de=g[T+2],ve=g[T+3],(ue&192)===128&&(de&192)===128&&(ve&192)===128&&(me=(A&15)<<18|(ue&63)<<12|(de&63)<<6|ve&63,me>65535&&me<1114112&&(M=me))}}M===null?(M=65533,te=1):M>65535&&(M-=65536,x.push(M>>>10&1023|55296),M=56320|M&1023),x.push(M),T+=te}return Je(x)}const Ie=4096;function Je(g){const d=g.length;if(d<=Ie)return String.fromCharCode.apply(String,g);let h="",x=0;for(;x<d;)h+=String.fromCharCode.apply(String,g.slice(x,x+=Ie));return h}function N(g,d,h){let x="";h=Math.min(g.length,h);for(let T=d;T<h;++T)x+=String.fromCharCode(g[T]&127);return x}function O(g,d,h){let x="";h=Math.min(g.length,h);for(let T=d;T<h;++T)x+=String.fromCharCode(g[T]);return x}function V(g,d,h){const x=g.length;(!d||d<0)&&(d=0),(!h||h<0||h>x)&&(h=x);let T="";for(let A=d;A<h;++A)T+=Eo[g[A]];return T}function ie(g,d,h){const x=g.slice(d,h);let T="";for(let A=0;A<x.length-1;A+=2)T+=String.fromCharCode(x[A]+x[A+1]*256);return T}s.prototype.slice=function(d,h){const x=this.length;d=~~d,h=h===void 0?x:~~h,d<0?(d+=x,d<0&&(d=0)):d>x&&(d=x),h<0?(h+=x,h<0&&(h=0)):h>x&&(h=x),h<d&&(h=d);const T=this.subarray(d,h);return Object.setPrototypeOf(T,s.prototype),T};function I(g,d,h){if(g%1!==0||g<0)throw new RangeError("offset is not uint");if(g+d>h)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(d,h,x){d=d>>>0,h=h>>>0,x||I(d,h,this.length);let T=this[d],A=1,M=0;for(;++M<h&&(A*=256);)T+=this[d+M]*A;return T},s.prototype.readUintBE=s.prototype.readUIntBE=function(d,h,x){d=d>>>0,h=h>>>0,x||I(d,h,this.length);let T=this[d+--h],A=1;for(;h>0&&(A*=256);)T+=this[d+--h]*A;return T},s.prototype.readUint8=s.prototype.readUInt8=function(d,h){return d=d>>>0,h||I(d,1,this.length),this[d]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(d,h){return d=d>>>0,h||I(d,2,this.length),this[d]|this[d+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(d,h){return d=d>>>0,h||I(d,2,this.length),this[d]<<8|this[d+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(d,h){return d=d>>>0,h||I(d,4,this.length),(this[d]|this[d+1]<<8|this[d+2]<<16)+this[d+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(d,h){return d=d>>>0,h||I(d,4,this.length),this[d]*16777216+(this[d+1]<<16|this[d+2]<<8|this[d+3])},s.prototype.readBigUInt64LE=bt(function(d){d=d>>>0,St(d,"offset");const h=this[d],x=this[d+7];(h===void 0||x===void 0)&&sn(d,this.length-8);const T=h+this[++d]*2**8+this[++d]*2**16+this[++d]*2**24,A=this[++d]+this[++d]*2**8+this[++d]*2**16+x*2**24;return BigInt(T)+(BigInt(A)<<BigInt(32))}),s.prototype.readBigUInt64BE=bt(function(d){d=d>>>0,St(d,"offset");const h=this[d],x=this[d+7];(h===void 0||x===void 0)&&sn(d,this.length-8);const T=h*2**24+this[++d]*2**16+this[++d]*2**8+this[++d],A=this[++d]*2**24+this[++d]*2**16+this[++d]*2**8+x;return(BigInt(T)<<BigInt(32))+BigInt(A)}),s.prototype.readIntLE=function(d,h,x){d=d>>>0,h=h>>>0,x||I(d,h,this.length);let T=this[d],A=1,M=0;for(;++M<h&&(A*=256);)T+=this[d+M]*A;return A*=128,T>=A&&(T-=Math.pow(2,8*h)),T},s.prototype.readIntBE=function(d,h,x){d=d>>>0,h=h>>>0,x||I(d,h,this.length);let T=h,A=1,M=this[d+--T];for(;T>0&&(A*=256);)M+=this[d+--T]*A;return A*=128,M>=A&&(M-=Math.pow(2,8*h)),M},s.prototype.readInt8=function(d,h){return d=d>>>0,h||I(d,1,this.length),this[d]&128?(255-this[d]+1)*-1:this[d]},s.prototype.readInt16LE=function(d,h){d=d>>>0,h||I(d,2,this.length);const x=this[d]|this[d+1]<<8;return x&32768?x|4294901760:x},s.prototype.readInt16BE=function(d,h){d=d>>>0,h||I(d,2,this.length);const x=this[d+1]|this[d]<<8;return x&32768?x|4294901760:x},s.prototype.readInt32LE=function(d,h){return d=d>>>0,h||I(d,4,this.length),this[d]|this[d+1]<<8|this[d+2]<<16|this[d+3]<<24},s.prototype.readInt32BE=function(d,h){return d=d>>>0,h||I(d,4,this.length),this[d]<<24|this[d+1]<<16|this[d+2]<<8|this[d+3]},s.prototype.readBigInt64LE=bt(function(d){d=d>>>0,St(d,"offset");const h=this[d],x=this[d+7];(h===void 0||x===void 0)&&sn(d,this.length-8);const T=this[d+4]+this[d+5]*2**8+this[d+6]*2**16+(x<<24);return(BigInt(T)<<BigInt(32))+BigInt(h+this[++d]*2**8+this[++d]*2**16+this[++d]*2**24)}),s.prototype.readBigInt64BE=bt(function(d){d=d>>>0,St(d,"offset");const h=this[d],x=this[d+7];(h===void 0||x===void 0)&&sn(d,this.length-8);const T=(h<<24)+this[++d]*2**16+this[++d]*2**8+this[++d];return(BigInt(T)<<BigInt(32))+BigInt(this[++d]*2**24+this[++d]*2**16+this[++d]*2**8+x)}),s.prototype.readFloatLE=function(d,h){return d=d>>>0,h||I(d,4,this.length),n.read(this,d,!0,23,4)},s.prototype.readFloatBE=function(d,h){return d=d>>>0,h||I(d,4,this.length),n.read(this,d,!1,23,4)},s.prototype.readDoubleLE=function(d,h){return d=d>>>0,h||I(d,8,this.length),n.read(this,d,!0,52,8)},s.prototype.readDoubleBE=function(d,h){return d=d>>>0,h||I(d,8,this.length),n.read(this,d,!1,52,8)};function Y(g,d,h,x,T,A){if(!s.isBuffer(g))throw new TypeError('"buffer" argument must be a Buffer instance');if(d>T||d<A)throw new RangeError('"value" argument is out of bounds');if(h+x>g.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(d,h,x,T){if(d=+d,h=h>>>0,x=x>>>0,!T){const te=Math.pow(2,8*x)-1;Y(this,d,h,x,te,0)}let A=1,M=0;for(this[h]=d&255;++M<x&&(A*=256);)this[h+M]=d/A&255;return h+x},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(d,h,x,T){if(d=+d,h=h>>>0,x=x>>>0,!T){const te=Math.pow(2,8*x)-1;Y(this,d,h,x,te,0)}let A=x-1,M=1;for(this[h+A]=d&255;--A>=0&&(M*=256);)this[h+A]=d/M&255;return h+x},s.prototype.writeUint8=s.prototype.writeUInt8=function(d,h,x){return d=+d,h=h>>>0,x||Y(this,d,h,1,255,0),this[h]=d&255,h+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(d,h,x){return d=+d,h=h>>>0,x||Y(this,d,h,2,65535,0),this[h]=d&255,this[h+1]=d>>>8,h+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(d,h,x){return d=+d,h=h>>>0,x||Y(this,d,h,2,65535,0),this[h]=d>>>8,this[h+1]=d&255,h+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(d,h,x){return d=+d,h=h>>>0,x||Y(this,d,h,4,4294967295,0),this[h+3]=d>>>24,this[h+2]=d>>>16,this[h+1]=d>>>8,this[h]=d&255,h+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(d,h,x){return d=+d,h=h>>>0,x||Y(this,d,h,4,4294967295,0),this[h]=d>>>24,this[h+1]=d>>>16,this[h+2]=d>>>8,this[h+3]=d&255,h+4};function B(g,d,h,x,T){vo(d,x,T,g,h,7);let A=Number(d&BigInt(4294967295));g[h++]=A,A=A>>8,g[h++]=A,A=A>>8,g[h++]=A,A=A>>8,g[h++]=A;let M=Number(d>>BigInt(32)&BigInt(4294967295));return g[h++]=M,M=M>>8,g[h++]=M,M=M>>8,g[h++]=M,M=M>>8,g[h++]=M,h}function Z(g,d,h,x,T){vo(d,x,T,g,h,7);let A=Number(d&BigInt(4294967295));g[h+7]=A,A=A>>8,g[h+6]=A,A=A>>8,g[h+5]=A,A=A>>8,g[h+4]=A;let M=Number(d>>BigInt(32)&BigInt(4294967295));return g[h+3]=M,M=M>>8,g[h+2]=M,M=M>>8,g[h+1]=M,M=M>>8,g[h]=M,h+8}s.prototype.writeBigUInt64LE=bt(function(d,h=0){return B(this,d,h,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=bt(function(d,h=0){return Z(this,d,h,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(d,h,x,T){if(d=+d,h=h>>>0,!T){const ue=Math.pow(2,8*x-1);Y(this,d,h,x,ue-1,-ue)}let A=0,M=1,te=0;for(this[h]=d&255;++A<x&&(M*=256);)d<0&&te===0&&this[h+A-1]!==0&&(te=1),this[h+A]=(d/M>>0)-te&255;return h+x},s.prototype.writeIntBE=function(d,h,x,T){if(d=+d,h=h>>>0,!T){const ue=Math.pow(2,8*x-1);Y(this,d,h,x,ue-1,-ue)}let A=x-1,M=1,te=0;for(this[h+A]=d&255;--A>=0&&(M*=256);)d<0&&te===0&&this[h+A+1]!==0&&(te=1),this[h+A]=(d/M>>0)-te&255;return h+x},s.prototype.writeInt8=function(d,h,x){return d=+d,h=h>>>0,x||Y(this,d,h,1,127,-128),d<0&&(d=255+d+1),this[h]=d&255,h+1},s.prototype.writeInt16LE=function(d,h,x){return d=+d,h=h>>>0,x||Y(this,d,h,2,32767,-32768),this[h]=d&255,this[h+1]=d>>>8,h+2},s.prototype.writeInt16BE=function(d,h,x){return d=+d,h=h>>>0,x||Y(this,d,h,2,32767,-32768),this[h]=d>>>8,this[h+1]=d&255,h+2},s.prototype.writeInt32LE=function(d,h,x){return d=+d,h=h>>>0,x||Y(this,d,h,4,2147483647,-2147483648),this[h]=d&255,this[h+1]=d>>>8,this[h+2]=d>>>16,this[h+3]=d>>>24,h+4},s.prototype.writeInt32BE=function(d,h,x){return d=+d,h=h>>>0,x||Y(this,d,h,4,2147483647,-2147483648),d<0&&(d=4294967295+d+1),this[h]=d>>>24,this[h+1]=d>>>16,this[h+2]=d>>>8,this[h+3]=d&255,h+4},s.prototype.writeBigInt64LE=bt(function(d,h=0){return B(this,d,h,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=bt(function(d,h=0){return Z(this,d,h,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function G(g,d,h,x,T,A){if(h+x>g.length)throw new RangeError("Index out of range");if(h<0)throw new RangeError("Index out of range")}function Se(g,d,h,x,T){return d=+d,h=h>>>0,T||G(g,d,h,4),n.write(g,d,h,x,23,4),h+4}s.prototype.writeFloatLE=function(d,h,x){return Se(this,d,h,!0,x)},s.prototype.writeFloatBE=function(d,h,x){return Se(this,d,h,!1,x)};function Re(g,d,h,x,T){return d=+d,h=h>>>0,T||G(g,d,h,8),n.write(g,d,h,x,52,8),h+8}s.prototype.writeDoubleLE=function(d,h,x){return Re(this,d,h,!0,x)},s.prototype.writeDoubleBE=function(d,h,x){return Re(this,d,h,!1,x)},s.prototype.copy=function(d,h,x,T){if(!s.isBuffer(d))throw new TypeError("argument should be a Buffer");if(x||(x=0),!T&&T!==0&&(T=this.length),h>=d.length&&(h=d.length),h||(h=0),T>0&&T<x&&(T=x),T===x||d.length===0||this.length===0)return 0;if(h<0)throw new RangeError("targetStart out of bounds");if(x<0||x>=this.length)throw new RangeError("Index out of range");if(T<0)throw new RangeError("sourceEnd out of bounds");T>this.length&&(T=this.length),d.length-h<T-x&&(T=d.length-h+x);const A=T-x;return this===d&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(h,x,T):Uint8Array.prototype.set.call(d,this.subarray(x,T),h),A},s.prototype.fill=function(d,h,x,T){if(typeof d=="string"){if(typeof h=="string"?(T=h,h=0,x=this.length):typeof x=="string"&&(T=x,x=this.length),T!==void 0&&typeof T!="string")throw new TypeError("encoding must be a string");if(typeof T=="string"&&!s.isEncoding(T))throw new TypeError("Unknown encoding: "+T);if(d.length===1){const M=d.charCodeAt(0);(T==="utf8"&&M<128||T==="latin1")&&(d=M)}}else typeof d=="number"?d=d&255:typeof d=="boolean"&&(d=Number(d));if(h<0||this.length<h||this.length<x)throw new RangeError("Out of range index");if(x<=h)return this;h=h>>>0,x=x===void 0?this.length:x>>>0,d||(d=0);let A;if(typeof d=="number")for(A=h;A<x;++A)this[A]=d;else{const M=s.isBuffer(d)?d:s.from(d,T),te=M.length;if(te===0)throw new TypeError('The value "'+d+'" is invalid for argument "value"');for(A=0;A<x-h;++A)this[A+h]=M[A%te]}return this};const Ne={};function Ze(g,d,h){Ne[g]=class extends h{constructor(){super(),Object.defineProperty(this,"message",{value:d.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${g}]`,this.stack,delete this.name}get code(){return g}set code(T){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:T,writable:!0})}toString(){return`${this.name} [${g}]: ${this.message}`}}}Ze("ERR_BUFFER_OUT_OF_BOUNDS",function(g){return g?`${g} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Ze("ERR_INVALID_ARG_TYPE",function(g,d){return`The "${g}" argument must be of type number. Received type ${typeof d}`},TypeError),Ze("ERR_OUT_OF_RANGE",function(g,d,h){let x=`The value of "${g}" is out of range.`,T=h;return Number.isInteger(h)&&Math.abs(h)>2**32?T=na(String(h)):typeof h=="bigint"&&(T=String(h),(h>BigInt(2)**BigInt(32)||h<-(BigInt(2)**BigInt(32)))&&(T=na(T)),T+="n"),x+=` It must be ${d}. Received ${T}`,x},RangeError);function na(g){let d="",h=g.length;const x=g[0]==="-"?1:0;for(;h>=x+4;h-=3)d=`_${g.slice(h-3,h)}${d}`;return`${g.slice(0,h)}${d}`}function Zl(g,d,h){St(d,"offset"),(g[d]===void 0||g[d+h]===void 0)&&sn(d,g.length-(h+1))}function vo(g,d,h,x,T,A){if(g>h||g<d){const M=typeof d=="bigint"?"n":"";let te;throw d===0||d===BigInt(0)?te=`>= 0${M} and < 2${M} ** ${(A+1)*8}${M}`:te=`>= -(2${M} ** ${(A+1)*8-1}${M}) and < 2 ** ${(A+1)*8-1}${M}`,new Ne.ERR_OUT_OF_RANGE("value",te,g)}Zl(x,T,A)}function St(g,d){if(typeof g!="number")throw new Ne.ERR_INVALID_ARG_TYPE(d,"number",g)}function sn(g,d,h){throw Math.floor(g)!==g?(St(g,h),new Ne.ERR_OUT_OF_RANGE("offset","an integer",g)):d<0?new Ne.ERR_BUFFER_OUT_OF_BOUNDS:new Ne.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${d}`,g)}const Cn=/[^+/0-9A-Za-z-_]/g;function wo(g){if(g=g.split("=")[0],g=g.trim().replace(Cn,""),g.length<2)return"";for(;g.length%4!==0;)g=g+"=";return g}function Ia(g,d){d=d||1/0;let h;const x=g.length;let T=null;const A=[];for(let M=0;M<x;++M){if(h=g.charCodeAt(M),h>55295&&h<57344){if(!T){if(h>56319){(d-=3)>-1&&A.push(239,191,189);continue}else if(M+1===x){(d-=3)>-1&&A.push(239,191,189);continue}T=h;continue}if(h<56320){(d-=3)>-1&&A.push(239,191,189),T=h;continue}h=(T-55296<<10|h-56320)+65536}else T&&(d-=3)>-1&&A.push(239,191,189);if(T=null,h<128){if((d-=1)<0)break;A.push(h)}else if(h<2048){if((d-=2)<0)break;A.push(h>>6|192,h&63|128)}else if(h<65536){if((d-=3)<0)break;A.push(h>>12|224,h>>6&63|128,h&63|128)}else if(h<1114112){if((d-=4)<0)break;A.push(h>>18|240,h>>12&63|128,h>>6&63|128,h&63|128)}else throw new Error("Invalid code point")}return A}function aa(g){const d=[];for(let h=0;h<g.length;++h)d.push(g.charCodeAt(h)&255);return d}function Ui(g,d){let h,x,T;const A=[];for(let M=0;M<g.length&&!((d-=2)<0);++M)h=g.charCodeAt(M),x=h>>8,T=h%256,A.push(T),A.push(x);return A}function Ma(g){return t.toByteArray(wo(g))}function Fa(g,d,h,x){let T;for(T=0;T<x&&!(T+h>=d.length||T>=g.length);++T)d[T+h]=g[T];return T}function Ct(g,d){return g instanceof d||g!=null&&g.constructor!=null&&g.constructor.name!=null&&g.constructor.name===d.name}function xo(g){return g!==g}const Eo=function(){const g="0123456789abcdef",d=new Array(256);for(let h=0;h<16;++h){const x=h*16;for(let T=0;T<16;++T)d[x+T]=g[h]+g[T]}return d}();function bt(g){return typeof BigInt>"u"?ia:g}function ia(){throw new Error("BigInt not supported")}})(Jv);/**
|
|
2616
|
+
*/(function(e){const t=xl,n=Sm,a=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=E,e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=r(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function r(){try{const g=new Uint8Array(1),d={foo:function(){return 42}};return Object.setPrototypeOf(d,Uint8Array.prototype),Object.setPrototypeOf(g,d),g.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(g){if(g>i)throw new RangeError('The value "'+g+'" is invalid for option "size"');const d=new Uint8Array(g);return Object.setPrototypeOf(d,s.prototype),d}function s(g,d,h){if(typeof g=="number"){if(typeof d=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(g)}return l(g,d,h)}s.poolSize=8192;function l(g,d,h){if(typeof g=="string")return p(g,d);if(ArrayBuffer.isView(g))return k(g);if(g==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof g);if(Ct(g,ArrayBuffer)||g&&Ct(g.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ct(g,SharedArrayBuffer)||g&&Ct(g.buffer,SharedArrayBuffer)))return S(g,d,h);if(typeof g=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const x=g.valueOf&&g.valueOf();if(x!=null&&x!==g)return s.from(x,d,h);const T=b(g);if(T)return T;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof g[Symbol.toPrimitive]=="function")return s.from(g[Symbol.toPrimitive]("string"),d,h);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof g)}s.from=function(g,d,h){return l(g,d,h)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function c(g){if(typeof g!="number")throw new TypeError('"size" argument must be of type number');if(g<0)throw new RangeError('The value "'+g+'" is invalid for option "size"')}function m(g,d,h){return c(g),g<=0?o(g):d!==void 0?typeof h=="string"?o(g).fill(d,h):o(g).fill(d):o(g)}s.alloc=function(g,d,h){return m(g,d,h)};function f(g){return c(g),o(g<0?0:w(g)|0)}s.allocUnsafe=function(g){return f(g)},s.allocUnsafeSlow=function(g){return f(g)};function p(g,d){if((typeof d!="string"||d==="")&&(d="utf8"),!s.isEncoding(d))throw new TypeError("Unknown encoding: "+d);const h=P(g,d)|0;let x=o(h);const T=x.write(g,d);return T!==h&&(x=x.slice(0,T)),x}function y(g){const d=g.length<0?0:w(g.length)|0,h=o(d);for(let x=0;x<d;x+=1)h[x]=g[x]&255;return h}function k(g){if(Ct(g,Uint8Array)){const d=new Uint8Array(g);return S(d.buffer,d.byteOffset,d.byteLength)}return y(g)}function S(g,d,h){if(d<0||g.byteLength<d)throw new RangeError('"offset" is outside of buffer bounds');if(g.byteLength<d+(h||0))throw new RangeError('"length" is outside of buffer bounds');let x;return d===void 0&&h===void 0?x=new Uint8Array(g):h===void 0?x=new Uint8Array(g,d):x=new Uint8Array(g,d,h),Object.setPrototypeOf(x,s.prototype),x}function b(g){if(s.isBuffer(g)){const d=w(g.length)|0,h=o(d);return h.length===0||g.copy(h,0,0,d),h}if(g.length!==void 0)return typeof g.length!="number"||xo(g.length)?o(0):y(g);if(g.type==="Buffer"&&Array.isArray(g.data))return y(g.data)}function w(g){if(g>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return g|0}function E(g){return+g!=g&&(g=0),s.alloc(+g)}s.isBuffer=function(d){return d!=null&&d._isBuffer===!0&&d!==s.prototype},s.compare=function(d,h){if(Ct(d,Uint8Array)&&(d=s.from(d,d.offset,d.byteLength)),Ct(h,Uint8Array)&&(h=s.from(h,h.offset,h.byteLength)),!s.isBuffer(d)||!s.isBuffer(h))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(d===h)return 0;let x=d.length,T=h.length;for(let A=0,M=Math.min(x,T);A<M;++A)if(d[A]!==h[A]){x=d[A],T=h[A];break}return x<T?-1:T<x?1:0},s.isEncoding=function(d){switch(String(d).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(d,h){if(!Array.isArray(d))throw new TypeError('"list" argument must be an Array of Buffers');if(d.length===0)return s.alloc(0);let x;if(h===void 0)for(h=0,x=0;x<d.length;++x)h+=d[x].length;const T=s.allocUnsafe(h);let A=0;for(x=0;x<d.length;++x){let M=d[x];if(Ct(M,Uint8Array))A+M.length>T.length?(s.isBuffer(M)||(M=s.from(M)),M.copy(T,A)):Uint8Array.prototype.set.call(T,M,A);else if(s.isBuffer(M))M.copy(T,A);else throw new TypeError('"list" argument must be an Array of Buffers');A+=M.length}return T};function P(g,d){if(s.isBuffer(g))return g.length;if(ArrayBuffer.isView(g)||Ct(g,ArrayBuffer))return g.byteLength;if(typeof g!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof g);const h=g.length,x=arguments.length>2&&arguments[2]===!0;if(!x&&h===0)return 0;let T=!1;for(;;)switch(d){case"ascii":case"latin1":case"binary":return h;case"utf8":case"utf-8":return Ia(g).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return h*2;case"hex":return h>>>1;case"base64":return Ma(g).length;default:if(T)return x?-1:Ia(g).length;d=(""+d).toLowerCase(),T=!0}}s.byteLength=P;function j(g,d,h){let x=!1;if((d===void 0||d<0)&&(d=0),d>this.length||((h===void 0||h>this.length)&&(h=this.length),h<=0)||(h>>>=0,d>>>=0,h<=d))return"";for(g||(g="utf8");;)switch(g){case"hex":return V(this,d,h);case"utf8":case"utf-8":return _e(this,d,h);case"ascii":return N(this,d,h);case"latin1":case"binary":return O(this,d,h);case"base64":return he(this,d,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ie(this,d,h);default:if(x)throw new TypeError("Unknown encoding: "+g);g=(g+"").toLowerCase(),x=!0}}s.prototype._isBuffer=!0;function F(g,d,h){const x=g[d];g[d]=g[h],g[h]=x}s.prototype.swap16=function(){const d=this.length;if(d%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let h=0;h<d;h+=2)F(this,h,h+1);return this},s.prototype.swap32=function(){const d=this.length;if(d%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let h=0;h<d;h+=4)F(this,h,h+3),F(this,h+1,h+2);return this},s.prototype.swap64=function(){const d=this.length;if(d%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let h=0;h<d;h+=8)F(this,h,h+7),F(this,h+1,h+6),F(this,h+2,h+5),F(this,h+3,h+4);return this},s.prototype.toString=function(){const d=this.length;return d===0?"":arguments.length===0?_e(this,0,d):j.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(d){if(!s.isBuffer(d))throw new TypeError("Argument must be a Buffer");return this===d?!0:s.compare(this,d)===0},s.prototype.inspect=function(){let d="";const h=e.INSPECT_MAX_BYTES;return d=this.toString("hex",0,h).replace(/(.{2})/g,"$1 ").trim(),this.length>h&&(d+=" ... "),"<Buffer "+d+">"},a&&(s.prototype[a]=s.prototype.inspect),s.prototype.compare=function(d,h,x,T,A){if(Ct(d,Uint8Array)&&(d=s.from(d,d.offset,d.byteLength)),!s.isBuffer(d))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof d);if(h===void 0&&(h=0),x===void 0&&(x=d?d.length:0),T===void 0&&(T=0),A===void 0&&(A=this.length),h<0||x>d.length||T<0||A>this.length)throw new RangeError("out of range index");if(T>=A&&h>=x)return 0;if(T>=A)return-1;if(h>=x)return 1;if(h>>>=0,x>>>=0,T>>>=0,A>>>=0,this===d)return 0;let M=A-T,te=x-h;const ue=Math.min(M,te),de=this.slice(T,A),ve=d.slice(h,x);for(let me=0;me<ue;++me)if(de[me]!==ve[me]){M=de[me],te=ve[me];break}return M<te?-1:te<M?1:0};function z(g,d,h,x,T){if(g.length===0)return-1;if(typeof h=="string"?(x=h,h=0):h>2147483647?h=2147483647:h<-2147483648&&(h=-2147483648),h=+h,xo(h)&&(h=T?0:g.length-1),h<0&&(h=g.length+h),h>=g.length){if(T)return-1;h=g.length-1}else if(h<0)if(T)h=0;else return-1;if(typeof d=="string"&&(d=s.from(d,x)),s.isBuffer(d))return d.length===0?-1:R(g,d,h,x,T);if(typeof d=="number")return d=d&255,typeof Uint8Array.prototype.indexOf=="function"?T?Uint8Array.prototype.indexOf.call(g,d,h):Uint8Array.prototype.lastIndexOf.call(g,d,h):R(g,[d],h,x,T);throw new TypeError("val must be string, number or Buffer")}function R(g,d,h,x,T){let A=1,M=g.length,te=d.length;if(x!==void 0&&(x=String(x).toLowerCase(),x==="ucs2"||x==="ucs-2"||x==="utf16le"||x==="utf-16le")){if(g.length<2||d.length<2)return-1;A=2,M/=2,te/=2,h/=2}function ue(ve,me){return A===1?ve[me]:ve.readUInt16BE(me*A)}let de;if(T){let ve=-1;for(de=h;de<M;de++)if(ue(g,de)===ue(d,ve===-1?0:de-ve)){if(ve===-1&&(ve=de),de-ve+1===te)return ve*A}else ve!==-1&&(de-=de-ve),ve=-1}else for(h+te>M&&(h=M-te),de=h;de>=0;de--){let ve=!0;for(let me=0;me<te;me++)if(ue(g,de+me)!==ue(d,me)){ve=!1;break}if(ve)return de}return-1}s.prototype.includes=function(d,h,x){return this.indexOf(d,h,x)!==-1},s.prototype.indexOf=function(d,h,x){return z(this,d,h,x,!0)},s.prototype.lastIndexOf=function(d,h,x){return z(this,d,h,x,!1)};function _(g,d,h,x){h=Number(h)||0;const T=g.length-h;x?(x=Number(x),x>T&&(x=T)):x=T;const A=d.length;x>A/2&&(x=A/2);let M;for(M=0;M<x;++M){const te=parseInt(d.substr(M*2,2),16);if(xo(te))return M;g[h+M]=te}return M}function D(g,d,h,x){return Fa(Ia(d,g.length-h),g,h,x)}function X(g,d,h,x){return Fa(aa(d),g,h,x)}function ne(g,d,h,x){return Fa(Ma(d),g,h,x)}function ye(g,d,h,x){return Fa(Ui(d,g.length-h),g,h,x)}s.prototype.write=function(d,h,x,T){if(h===void 0)T="utf8",x=this.length,h=0;else if(x===void 0&&typeof h=="string")T=h,x=this.length,h=0;else if(isFinite(h))h=h>>>0,isFinite(x)?(x=x>>>0,T===void 0&&(T="utf8")):(T=x,x=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const A=this.length-h;if((x===void 0||x>A)&&(x=A),d.length>0&&(x<0||h<0)||h>this.length)throw new RangeError("Attempt to write outside buffer bounds");T||(T="utf8");let M=!1;for(;;)switch(T){case"hex":return _(this,d,h,x);case"utf8":case"utf-8":return D(this,d,h,x);case"ascii":case"latin1":case"binary":return X(this,d,h,x);case"base64":return ne(this,d,h,x);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ye(this,d,h,x);default:if(M)throw new TypeError("Unknown encoding: "+T);T=(""+T).toLowerCase(),M=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function he(g,d,h){return d===0&&h===g.length?t.fromByteArray(g):t.fromByteArray(g.slice(d,h))}function _e(g,d,h){h=Math.min(g.length,h);const x=[];let T=d;for(;T<h;){const A=g[T];let M=null,te=A>239?4:A>223?3:A>191?2:1;if(T+te<=h){let ue,de,ve,me;switch(te){case 1:A<128&&(M=A);break;case 2:ue=g[T+1],(ue&192)===128&&(me=(A&31)<<6|ue&63,me>127&&(M=me));break;case 3:ue=g[T+1],de=g[T+2],(ue&192)===128&&(de&192)===128&&(me=(A&15)<<12|(ue&63)<<6|de&63,me>2047&&(me<55296||me>57343)&&(M=me));break;case 4:ue=g[T+1],de=g[T+2],ve=g[T+3],(ue&192)===128&&(de&192)===128&&(ve&192)===128&&(me=(A&15)<<18|(ue&63)<<12|(de&63)<<6|ve&63,me>65535&&me<1114112&&(M=me))}}M===null?(M=65533,te=1):M>65535&&(M-=65536,x.push(M>>>10&1023|55296),M=56320|M&1023),x.push(M),T+=te}return Je(x)}const Ie=4096;function Je(g){const d=g.length;if(d<=Ie)return String.fromCharCode.apply(String,g);let h="",x=0;for(;x<d;)h+=String.fromCharCode.apply(String,g.slice(x,x+=Ie));return h}function N(g,d,h){let x="";h=Math.min(g.length,h);for(let T=d;T<h;++T)x+=String.fromCharCode(g[T]&127);return x}function O(g,d,h){let x="";h=Math.min(g.length,h);for(let T=d;T<h;++T)x+=String.fromCharCode(g[T]);return x}function V(g,d,h){const x=g.length;(!d||d<0)&&(d=0),(!h||h<0||h>x)&&(h=x);let T="";for(let A=d;A<h;++A)T+=Eo[g[A]];return T}function ie(g,d,h){const x=g.slice(d,h);let T="";for(let A=0;A<x.length-1;A+=2)T+=String.fromCharCode(x[A]+x[A+1]*256);return T}s.prototype.slice=function(d,h){const x=this.length;d=~~d,h=h===void 0?x:~~h,d<0?(d+=x,d<0&&(d=0)):d>x&&(d=x),h<0?(h+=x,h<0&&(h=0)):h>x&&(h=x),h<d&&(h=d);const T=this.subarray(d,h);return Object.setPrototypeOf(T,s.prototype),T};function I(g,d,h){if(g%1!==0||g<0)throw new RangeError("offset is not uint");if(g+d>h)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(d,h,x){d=d>>>0,h=h>>>0,x||I(d,h,this.length);let T=this[d],A=1,M=0;for(;++M<h&&(A*=256);)T+=this[d+M]*A;return T},s.prototype.readUintBE=s.prototype.readUIntBE=function(d,h,x){d=d>>>0,h=h>>>0,x||I(d,h,this.length);let T=this[d+--h],A=1;for(;h>0&&(A*=256);)T+=this[d+--h]*A;return T},s.prototype.readUint8=s.prototype.readUInt8=function(d,h){return d=d>>>0,h||I(d,1,this.length),this[d]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(d,h){return d=d>>>0,h||I(d,2,this.length),this[d]|this[d+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(d,h){return d=d>>>0,h||I(d,2,this.length),this[d]<<8|this[d+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(d,h){return d=d>>>0,h||I(d,4,this.length),(this[d]|this[d+1]<<8|this[d+2]<<16)+this[d+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(d,h){return d=d>>>0,h||I(d,4,this.length),this[d]*16777216+(this[d+1]<<16|this[d+2]<<8|this[d+3])},s.prototype.readBigUInt64LE=bt(function(d){d=d>>>0,St(d,"offset");const h=this[d],x=this[d+7];(h===void 0||x===void 0)&&sn(d,this.length-8);const T=h+this[++d]*2**8+this[++d]*2**16+this[++d]*2**24,A=this[++d]+this[++d]*2**8+this[++d]*2**16+x*2**24;return BigInt(T)+(BigInt(A)<<BigInt(32))}),s.prototype.readBigUInt64BE=bt(function(d){d=d>>>0,St(d,"offset");const h=this[d],x=this[d+7];(h===void 0||x===void 0)&&sn(d,this.length-8);const T=h*2**24+this[++d]*2**16+this[++d]*2**8+this[++d],A=this[++d]*2**24+this[++d]*2**16+this[++d]*2**8+x;return(BigInt(T)<<BigInt(32))+BigInt(A)}),s.prototype.readIntLE=function(d,h,x){d=d>>>0,h=h>>>0,x||I(d,h,this.length);let T=this[d],A=1,M=0;for(;++M<h&&(A*=256);)T+=this[d+M]*A;return A*=128,T>=A&&(T-=Math.pow(2,8*h)),T},s.prototype.readIntBE=function(d,h,x){d=d>>>0,h=h>>>0,x||I(d,h,this.length);let T=h,A=1,M=this[d+--T];for(;T>0&&(A*=256);)M+=this[d+--T]*A;return A*=128,M>=A&&(M-=Math.pow(2,8*h)),M},s.prototype.readInt8=function(d,h){return d=d>>>0,h||I(d,1,this.length),this[d]&128?(255-this[d]+1)*-1:this[d]},s.prototype.readInt16LE=function(d,h){d=d>>>0,h||I(d,2,this.length);const x=this[d]|this[d+1]<<8;return x&32768?x|4294901760:x},s.prototype.readInt16BE=function(d,h){d=d>>>0,h||I(d,2,this.length);const x=this[d+1]|this[d]<<8;return x&32768?x|4294901760:x},s.prototype.readInt32LE=function(d,h){return d=d>>>0,h||I(d,4,this.length),this[d]|this[d+1]<<8|this[d+2]<<16|this[d+3]<<24},s.prototype.readInt32BE=function(d,h){return d=d>>>0,h||I(d,4,this.length),this[d]<<24|this[d+1]<<16|this[d+2]<<8|this[d+3]},s.prototype.readBigInt64LE=bt(function(d){d=d>>>0,St(d,"offset");const h=this[d],x=this[d+7];(h===void 0||x===void 0)&&sn(d,this.length-8);const T=this[d+4]+this[d+5]*2**8+this[d+6]*2**16+(x<<24);return(BigInt(T)<<BigInt(32))+BigInt(h+this[++d]*2**8+this[++d]*2**16+this[++d]*2**24)}),s.prototype.readBigInt64BE=bt(function(d){d=d>>>0,St(d,"offset");const h=this[d],x=this[d+7];(h===void 0||x===void 0)&&sn(d,this.length-8);const T=(h<<24)+this[++d]*2**16+this[++d]*2**8+this[++d];return(BigInt(T)<<BigInt(32))+BigInt(this[++d]*2**24+this[++d]*2**16+this[++d]*2**8+x)}),s.prototype.readFloatLE=function(d,h){return d=d>>>0,h||I(d,4,this.length),n.read(this,d,!0,23,4)},s.prototype.readFloatBE=function(d,h){return d=d>>>0,h||I(d,4,this.length),n.read(this,d,!1,23,4)},s.prototype.readDoubleLE=function(d,h){return d=d>>>0,h||I(d,8,this.length),n.read(this,d,!0,52,8)},s.prototype.readDoubleBE=function(d,h){return d=d>>>0,h||I(d,8,this.length),n.read(this,d,!1,52,8)};function Y(g,d,h,x,T,A){if(!s.isBuffer(g))throw new TypeError('"buffer" argument must be a Buffer instance');if(d>T||d<A)throw new RangeError('"value" argument is out of bounds');if(h+x>g.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(d,h,x,T){if(d=+d,h=h>>>0,x=x>>>0,!T){const te=Math.pow(2,8*x)-1;Y(this,d,h,x,te,0)}let A=1,M=0;for(this[h]=d&255;++M<x&&(A*=256);)this[h+M]=d/A&255;return h+x},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(d,h,x,T){if(d=+d,h=h>>>0,x=x>>>0,!T){const te=Math.pow(2,8*x)-1;Y(this,d,h,x,te,0)}let A=x-1,M=1;for(this[h+A]=d&255;--A>=0&&(M*=256);)this[h+A]=d/M&255;return h+x},s.prototype.writeUint8=s.prototype.writeUInt8=function(d,h,x){return d=+d,h=h>>>0,x||Y(this,d,h,1,255,0),this[h]=d&255,h+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(d,h,x){return d=+d,h=h>>>0,x||Y(this,d,h,2,65535,0),this[h]=d&255,this[h+1]=d>>>8,h+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(d,h,x){return d=+d,h=h>>>0,x||Y(this,d,h,2,65535,0),this[h]=d>>>8,this[h+1]=d&255,h+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(d,h,x){return d=+d,h=h>>>0,x||Y(this,d,h,4,4294967295,0),this[h+3]=d>>>24,this[h+2]=d>>>16,this[h+1]=d>>>8,this[h]=d&255,h+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(d,h,x){return d=+d,h=h>>>0,x||Y(this,d,h,4,4294967295,0),this[h]=d>>>24,this[h+1]=d>>>16,this[h+2]=d>>>8,this[h+3]=d&255,h+4};function B(g,d,h,x,T){vo(d,x,T,g,h,7);let A=Number(d&BigInt(4294967295));g[h++]=A,A=A>>8,g[h++]=A,A=A>>8,g[h++]=A,A=A>>8,g[h++]=A;let M=Number(d>>BigInt(32)&BigInt(4294967295));return g[h++]=M,M=M>>8,g[h++]=M,M=M>>8,g[h++]=M,M=M>>8,g[h++]=M,h}function Z(g,d,h,x,T){vo(d,x,T,g,h,7);let A=Number(d&BigInt(4294967295));g[h+7]=A,A=A>>8,g[h+6]=A,A=A>>8,g[h+5]=A,A=A>>8,g[h+4]=A;let M=Number(d>>BigInt(32)&BigInt(4294967295));return g[h+3]=M,M=M>>8,g[h+2]=M,M=M>>8,g[h+1]=M,M=M>>8,g[h]=M,h+8}s.prototype.writeBigUInt64LE=bt(function(d,h=0){return B(this,d,h,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=bt(function(d,h=0){return Z(this,d,h,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(d,h,x,T){if(d=+d,h=h>>>0,!T){const ue=Math.pow(2,8*x-1);Y(this,d,h,x,ue-1,-ue)}let A=0,M=1,te=0;for(this[h]=d&255;++A<x&&(M*=256);)d<0&&te===0&&this[h+A-1]!==0&&(te=1),this[h+A]=(d/M>>0)-te&255;return h+x},s.prototype.writeIntBE=function(d,h,x,T){if(d=+d,h=h>>>0,!T){const ue=Math.pow(2,8*x-1);Y(this,d,h,x,ue-1,-ue)}let A=x-1,M=1,te=0;for(this[h+A]=d&255;--A>=0&&(M*=256);)d<0&&te===0&&this[h+A+1]!==0&&(te=1),this[h+A]=(d/M>>0)-te&255;return h+x},s.prototype.writeInt8=function(d,h,x){return d=+d,h=h>>>0,x||Y(this,d,h,1,127,-128),d<0&&(d=255+d+1),this[h]=d&255,h+1},s.prototype.writeInt16LE=function(d,h,x){return d=+d,h=h>>>0,x||Y(this,d,h,2,32767,-32768),this[h]=d&255,this[h+1]=d>>>8,h+2},s.prototype.writeInt16BE=function(d,h,x){return d=+d,h=h>>>0,x||Y(this,d,h,2,32767,-32768),this[h]=d>>>8,this[h+1]=d&255,h+2},s.prototype.writeInt32LE=function(d,h,x){return d=+d,h=h>>>0,x||Y(this,d,h,4,2147483647,-2147483648),this[h]=d&255,this[h+1]=d>>>8,this[h+2]=d>>>16,this[h+3]=d>>>24,h+4},s.prototype.writeInt32BE=function(d,h,x){return d=+d,h=h>>>0,x||Y(this,d,h,4,2147483647,-2147483648),d<0&&(d=4294967295+d+1),this[h]=d>>>24,this[h+1]=d>>>16,this[h+2]=d>>>8,this[h+3]=d&255,h+4},s.prototype.writeBigInt64LE=bt(function(d,h=0){return B(this,d,h,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=bt(function(d,h=0){return Z(this,d,h,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function G(g,d,h,x,T,A){if(h+x>g.length)throw new RangeError("Index out of range");if(h<0)throw new RangeError("Index out of range")}function Se(g,d,h,x,T){return d=+d,h=h>>>0,T||G(g,d,h,4),n.write(g,d,h,x,23,4),h+4}s.prototype.writeFloatLE=function(d,h,x){return Se(this,d,h,!0,x)},s.prototype.writeFloatBE=function(d,h,x){return Se(this,d,h,!1,x)};function Re(g,d,h,x,T){return d=+d,h=h>>>0,T||G(g,d,h,8),n.write(g,d,h,x,52,8),h+8}s.prototype.writeDoubleLE=function(d,h,x){return Re(this,d,h,!0,x)},s.prototype.writeDoubleBE=function(d,h,x){return Re(this,d,h,!1,x)},s.prototype.copy=function(d,h,x,T){if(!s.isBuffer(d))throw new TypeError("argument should be a Buffer");if(x||(x=0),!T&&T!==0&&(T=this.length),h>=d.length&&(h=d.length),h||(h=0),T>0&&T<x&&(T=x),T===x||d.length===0||this.length===0)return 0;if(h<0)throw new RangeError("targetStart out of bounds");if(x<0||x>=this.length)throw new RangeError("Index out of range");if(T<0)throw new RangeError("sourceEnd out of bounds");T>this.length&&(T=this.length),d.length-h<T-x&&(T=d.length-h+x);const A=T-x;return this===d&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(h,x,T):Uint8Array.prototype.set.call(d,this.subarray(x,T),h),A},s.prototype.fill=function(d,h,x,T){if(typeof d=="string"){if(typeof h=="string"?(T=h,h=0,x=this.length):typeof x=="string"&&(T=x,x=this.length),T!==void 0&&typeof T!="string")throw new TypeError("encoding must be a string");if(typeof T=="string"&&!s.isEncoding(T))throw new TypeError("Unknown encoding: "+T);if(d.length===1){const M=d.charCodeAt(0);(T==="utf8"&&M<128||T==="latin1")&&(d=M)}}else typeof d=="number"?d=d&255:typeof d=="boolean"&&(d=Number(d));if(h<0||this.length<h||this.length<x)throw new RangeError("Out of range index");if(x<=h)return this;h=h>>>0,x=x===void 0?this.length:x>>>0,d||(d=0);let A;if(typeof d=="number")for(A=h;A<x;++A)this[A]=d;else{const M=s.isBuffer(d)?d:s.from(d,T),te=M.length;if(te===0)throw new TypeError('The value "'+d+'" is invalid for argument "value"');for(A=0;A<x-h;++A)this[A+h]=M[A%te]}return this};const Ne={};function Ze(g,d,h){Ne[g]=class extends h{constructor(){super(),Object.defineProperty(this,"message",{value:d.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${g}]`,this.stack,delete this.name}get code(){return g}set code(T){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:T,writable:!0})}toString(){return`${this.name} [${g}]: ${this.message}`}}}Ze("ERR_BUFFER_OUT_OF_BOUNDS",function(g){return g?`${g} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Ze("ERR_INVALID_ARG_TYPE",function(g,d){return`The "${g}" argument must be of type number. Received type ${typeof d}`},TypeError),Ze("ERR_OUT_OF_RANGE",function(g,d,h){let x=`The value of "${g}" is out of range.`,T=h;return Number.isInteger(h)&&Math.abs(h)>2**32?T=na(String(h)):typeof h=="bigint"&&(T=String(h),(h>BigInt(2)**BigInt(32)||h<-(BigInt(2)**BigInt(32)))&&(T=na(T)),T+="n"),x+=` It must be ${d}. Received ${T}`,x},RangeError);function na(g){let d="",h=g.length;const x=g[0]==="-"?1:0;for(;h>=x+4;h-=3)d=`_${g.slice(h-3,h)}${d}`;return`${g.slice(0,h)}${d}`}function Zl(g,d,h){St(d,"offset"),(g[d]===void 0||g[d+h]===void 0)&&sn(d,g.length-(h+1))}function vo(g,d,h,x,T,A){if(g>h||g<d){const M=typeof d=="bigint"?"n":"";let te;throw d===0||d===BigInt(0)?te=`>= 0${M} and < 2${M} ** ${(A+1)*8}${M}`:te=`>= -(2${M} ** ${(A+1)*8-1}${M}) and < 2 ** ${(A+1)*8-1}${M}`,new Ne.ERR_OUT_OF_RANGE("value",te,g)}Zl(x,T,A)}function St(g,d){if(typeof g!="number")throw new Ne.ERR_INVALID_ARG_TYPE(d,"number",g)}function sn(g,d,h){throw Math.floor(g)!==g?(St(g,h),new Ne.ERR_OUT_OF_RANGE("offset","an integer",g)):d<0?new Ne.ERR_BUFFER_OUT_OF_BOUNDS:new Ne.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${d}`,g)}const Cn=/[^+/0-9A-Za-z-_]/g;function wo(g){if(g=g.split("=")[0],g=g.trim().replace(Cn,""),g.length<2)return"";for(;g.length%4!==0;)g=g+"=";return g}function Ia(g,d){d=d||1/0;let h;const x=g.length;let T=null;const A=[];for(let M=0;M<x;++M){if(h=g.charCodeAt(M),h>55295&&h<57344){if(!T){if(h>56319){(d-=3)>-1&&A.push(239,191,189);continue}else if(M+1===x){(d-=3)>-1&&A.push(239,191,189);continue}T=h;continue}if(h<56320){(d-=3)>-1&&A.push(239,191,189),T=h;continue}h=(T-55296<<10|h-56320)+65536}else T&&(d-=3)>-1&&A.push(239,191,189);if(T=null,h<128){if((d-=1)<0)break;A.push(h)}else if(h<2048){if((d-=2)<0)break;A.push(h>>6|192,h&63|128)}else if(h<65536){if((d-=3)<0)break;A.push(h>>12|224,h>>6&63|128,h&63|128)}else if(h<1114112){if((d-=4)<0)break;A.push(h>>18|240,h>>12&63|128,h>>6&63|128,h&63|128)}else throw new Error("Invalid code point")}return A}function aa(g){const d=[];for(let h=0;h<g.length;++h)d.push(g.charCodeAt(h)&255);return d}function Ui(g,d){let h,x,T;const A=[];for(let M=0;M<g.length&&!((d-=2)<0);++M)h=g.charCodeAt(M),x=h>>8,T=h%256,A.push(T),A.push(x);return A}function Ma(g){return t.toByteArray(wo(g))}function Fa(g,d,h,x){let T;for(T=0;T<x&&!(T+h>=d.length||T>=g.length);++T)d[T+h]=g[T];return T}function Ct(g,d){return g instanceof d||g!=null&&g.constructor!=null&&g.constructor.name!=null&&g.constructor.name===d.name}function xo(g){return g!==g}const Eo=function(){const g="0123456789abcdef",d=new Array(256);for(let h=0;h<16;++h){const x=h*16;for(let T=0;T<16;++T)d[x+T]=g[h]+g[T]}return d}();function bt(g){return typeof BigInt>"u"?ia:g}function ia(){throw new Error("BigInt not supported")}})(Jv);/**
|
|
2617
2617
|
* @license Apache-2.0
|
|
2618
2618
|
*
|
|
2619
2619
|
* Copyright (c) 2018 The Stdlib Authors.
|
|
@@ -4070,7 +4070,7 @@ Url: ${Gs(e)}`),!0)}function R0(e,t){return e.type||!t||!t.length?!1:B0(e).some(
|
|
|
4070
4070
|
* See the License for the specific language governing permissions and
|
|
4071
4071
|
* limitations under the License.
|
|
4072
4072
|
*/var AR=zR,NR=AR;const IR=Bi(NR),dw={..._k,GhostError:ce},an={serialize(e){try{return{id:e.id,status:e.statusCode,code:e.code||e.errorType,title:e.name,detail:e.message,meta:{context:e.context,help:e.help,errorDetails:e.errorDetails,level:e.level,errorType:e.errorType}}}catch{return{detail:"Something went wrong."}}},deserialize(e){return{id:e.id,message:e.detail||e.error_description||e.message,statusCode:e.status,code:e.code||e.error,level:e.meta&&e.meta.level,help:e.meta&&e.meta.help,context:e.meta&&e.meta.context}},OAuthSerialize(e){const t={[Jd.name]:"access_denied",[Xd.name]:"temporarily_unavailable",[qd.name]:"invalid_request",[Zd.name]:"invalid_request",default:"server_error"},{detail:n,code:a,...i}=an.serialize(e);return{error:e.code||t[e.name]||"server_error",error_description:e.message,...i}},OAuthDeserialize(e){try{return new dw[e.title||e.name||Ci.name](an.deserialize(e))}catch{return new Ci({errorType:e.title||e.name,...an.deserialize(e)})}},JSONAPISerialize(e){const t={errors:[an.serialize(e)]};return t.errors[0].source={},e.property&&(t.errors[0].source.pointer="/data/attributes/"+e.property),t},JSONAPIDeserialize(e){e=e.errors&&e.errors[0]||{};let t;try{t=new dw[e.title||e.name||Ci.name](an.deserialize(e))}catch{t=new Ci({errorType:e.title||e.name,...an.deserialize(e)})}return e.source&&e.source.pointer&&(t.property=e.source.pointer.split("/")[3]),t}};function MR(e,t){t=t||{format:"jsonapi"};let n={};try{t.format==="jsonapi"?n=an.JSONAPISerialize(e):n=an.OAuthSerialize(e)}catch{n.message="Something went wrong."}return n}function FR(e){let t={};return e.errors?t=an.JSONAPIDeserialize(e):t=an.OAuthDeserialize(e),t}function DR(e){var i;const t=((i=e.stack)==null?void 0:i.split(/\n/))||[];"hideStack"in e&&e.hideStack?t.splice(1,t.length-1):t.splice(1,0,"Stack Trace:"),"help"in e&&e.help&&t.splice(1,0,`${e.help}`),"context"in e&&e.context&&t.splice(1,0,`${e.context}`);const a=IR(e);return a.stack=t.join(`
|
|
4073
|
-
`),a}function OR(e){const t=ce.name,n="IgnitionError";return function i(r){return!r||!r.name?!1:r.name===t||r.name===n?!0:i(Object.getPrototypeOf(r))}(e.constructor)}var _R=_k;const RR=dh(Object.freeze(Object.defineProperty({__proto__:null,BadRequestError:qd,ConflictError:Dk,DataExportError:Ck,DataImportError:$k,DisabledFeatureError:Pk,EmailError:jk,HelperWarning:Nk,HostLimitError:Ak,IncorrectUsageError:hk,InternalServerError:Ci,MaintenanceError:Xd,MethodNotAllowedError:kk,MigrationError:Ok,NoContentError:Fk,NoPermissionError:Jd,NotFoundError:fk,PasswordResetRequiredError:Ik,RangeNotSatisfiableError:wk,RequestEntityTooLargeError:xk,RequestNotAcceptableError:vk,ThemeValidationError:Tk,TokenRevocationError:Ek,TooManyRequestsError:bk,UnauthorizedError:gk,UnhandledJobError:Mk,UnsupportedMediaTypeError:yk,UpdateCollisionError:zk,ValidationError:Zd,VersionMismatchError:Sk,default:_R,utils:{serialize:MR,deserialize:FR,isGhostError:OR,prepareStackForUser:DR}},Symbol.toStringTag,{value:"Module"})));var Lm={exports:{}},Ym={},mw={exports:{}};(function(e){var t=Si,n=Si;function a(r){return n.existsSync(t.join(r,"package.json"))}function i(r,o){if(r=r||e.parent.filename,o=o||a,typeof r=="string"&&(r[r.length-1]!==t.sep&&(r+=t.sep),r=r.split(t.sep)),!r.length)throw new Error("package.json not found in path");r.pop();var s=r.join(t.sep);try{if(o(s))return s}catch{}return i(r,o)}e.exports=i})(mw);var UR=mw.exports,pw={exports:{}},hw={},LR=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"},Bm={exports:{}};typeof Object.create=="function"?Bm.exports=function(t,n){t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:Bm.exports=function(t,n){t.super_=n;var a=function(){};a.prototype=n.prototype,t.prototype=new a,t.prototype.constructor=t};var YR=Bm.exports;(function(e){var t=/%[sdj%]/g;e.format=function(N){if(!P(N)){for(var O=[],V=0;V<arguments.length;V++)O.push(i(arguments[V]));return O.join(" ")}for(var V=1,ie=arguments,I=ie.length,Y=String(N).replace(t,function(Z){if(Z==="%%")return"%";if(V>=I)return Z;switch(Z){case"%s":return String(ie[V++]);case"%d":return Number(ie[V++]);case"%j":try{return JSON.stringify(ie[V++])}catch{return"[Circular]"}default:return Z}}),B=ie[V];V<I;B=ie[++V])b(B)||!R(B)?Y+=" "+B:Y+=" "+i(B);return Y},e.deprecate=function(N,O){if(F(Tn.process))return function(){return e.deprecate(N,O).apply(this,arguments)};if(process.noDeprecation===!0)return N;var V=!1;function ie(){if(!V){if(process.throwDeprecation)throw new Error(O);process.traceDeprecation?console.trace(O):console.error(O),V=!0}return N.apply(this,arguments)}return ie};var n={},a;e.debuglog=function(N){if(F(a)&&(a=process.env.NODE_DEBUG||""),N=N.toUpperCase(),!n[N])if(new RegExp("\\b"+N+"\\b","i").test(a)){var O=process.pid;n[N]=function(){var V=e.format.apply(e,arguments);console.error("%s %d: %s",N,O,V)}}else n[N]=function(){};return n[N]};function i(N,O){var V={seen:[],stylize:o};return arguments.length>=3&&(V.depth=arguments[2]),arguments.length>=4&&(V.colors=arguments[3]),
|
|
4073
|
+
`),a}function OR(e){const t=ce.name,n="IgnitionError";return function i(r){return!r||!r.name?!1:r.name===t||r.name===n?!0:i(Object.getPrototypeOf(r))}(e.constructor)}var _R=_k;const RR=dh(Object.freeze(Object.defineProperty({__proto__:null,BadRequestError:qd,ConflictError:Dk,DataExportError:Ck,DataImportError:$k,DisabledFeatureError:Pk,EmailError:jk,HelperWarning:Nk,HostLimitError:Ak,IncorrectUsageError:hk,InternalServerError:Ci,MaintenanceError:Xd,MethodNotAllowedError:kk,MigrationError:Ok,NoContentError:Fk,NoPermissionError:Jd,NotFoundError:fk,PasswordResetRequiredError:Ik,RangeNotSatisfiableError:wk,RequestEntityTooLargeError:xk,RequestNotAcceptableError:vk,ThemeValidationError:Tk,TokenRevocationError:Ek,TooManyRequestsError:bk,UnauthorizedError:gk,UnhandledJobError:Mk,UnsupportedMediaTypeError:yk,UpdateCollisionError:zk,ValidationError:Zd,VersionMismatchError:Sk,default:_R,utils:{serialize:MR,deserialize:FR,isGhostError:OR,prepareStackForUser:DR}},Symbol.toStringTag,{value:"Module"})));var Lm={exports:{}},Ym={},mw={exports:{}};(function(e){var t=Si,n=Si;function a(r){return n.existsSync(t.join(r,"package.json"))}function i(r,o){if(r=r||e.parent.filename,o=o||a,typeof r=="string"&&(r[r.length-1]!==t.sep&&(r+=t.sep),r=r.split(t.sep)),!r.length)throw new Error("package.json not found in path");r.pop();var s=r.join(t.sep);try{if(o(s))return s}catch{}return i(r,o)}e.exports=i})(mw);var UR=mw.exports,pw={exports:{}},hw={},LR=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"},Bm={exports:{}};typeof Object.create=="function"?Bm.exports=function(t,n){t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:Bm.exports=function(t,n){t.super_=n;var a=function(){};a.prototype=n.prototype,t.prototype=new a,t.prototype.constructor=t};var YR=Bm.exports;(function(e){var t=/%[sdj%]/g;e.format=function(N){if(!P(N)){for(var O=[],V=0;V<arguments.length;V++)O.push(i(arguments[V]));return O.join(" ")}for(var V=1,ie=arguments,I=ie.length,Y=String(N).replace(t,function(Z){if(Z==="%%")return"%";if(V>=I)return Z;switch(Z){case"%s":return String(ie[V++]);case"%d":return Number(ie[V++]);case"%j":try{return JSON.stringify(ie[V++])}catch{return"[Circular]"}default:return Z}}),B=ie[V];V<I;B=ie[++V])b(B)||!R(B)?Y+=" "+B:Y+=" "+i(B);return Y},e.deprecate=function(N,O){if(F(Tn.process))return function(){return e.deprecate(N,O).apply(this,arguments)};if(process.noDeprecation===!0)return N;var V=!1;function ie(){if(!V){if(process.throwDeprecation)throw new Error(O);process.traceDeprecation?console.trace(O):console.error(O),V=!0}return N.apply(this,arguments)}return ie};var n={},a;e.debuglog=function(N){if(F(a)&&(a=process.env.NODE_DEBUG||""),N=N.toUpperCase(),!n[N])if(new RegExp("\\b"+N+"\\b","i").test(a)){var O=process.pid;n[N]=function(){var V=e.format.apply(e,arguments);console.error("%s %d: %s",N,O,V)}}else n[N]=function(){};return n[N]};function i(N,O){var V={seen:[],stylize:o};return arguments.length>=3&&(V.depth=arguments[2]),arguments.length>=4&&(V.colors=arguments[3]),S(O)?V.showHidden=O:O&&e._extend(V,O),F(V.showHidden)&&(V.showHidden=!1),F(V.depth)&&(V.depth=2),F(V.colors)&&(V.colors=!1),F(V.customInspect)&&(V.customInspect=!0),V.colors&&(V.stylize=r),l(V,N,V.depth)}e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function r(N,O){var V=i.styles[O];return V?"\x1B["+i.colors[V][0]+"m"+N+"\x1B["+i.colors[V][1]+"m":N}function o(N,O){return N}function s(N){var O={};return N.forEach(function(V,ie){O[V]=!0}),O}function l(N,O,V){if(N.customInspect&&O&&X(O.inspect)&&O.inspect!==e.inspect&&!(O.constructor&&O.constructor.prototype===O)){var ie=O.inspect(V,N);return P(ie)||(ie=l(N,ie,V)),ie}var I=c(N,O);if(I)return I;var Y=Object.keys(O),B=s(Y);if(N.showHidden&&(Y=Object.getOwnPropertyNames(O)),D(O)&&(Y.indexOf("message")>=0||Y.indexOf("description")>=0))return m(O);if(Y.length===0){if(X(O)){var Z=O.name?": "+O.name:"";return N.stylize("[Function"+Z+"]","special")}if(z(O))return N.stylize(RegExp.prototype.toString.call(O),"regexp");if(_(O))return N.stylize(Date.prototype.toString.call(O),"date");if(D(O))return m(O)}var G="",Se=!1,Re=["{","}"];if(k(O)&&(Se=!0,Re=["[","]"]),X(O)){var Ne=O.name?": "+O.name:"";G=" [Function"+Ne+"]"}if(z(O)&&(G=" "+RegExp.prototype.toString.call(O)),_(O)&&(G=" "+Date.prototype.toUTCString.call(O)),D(O)&&(G=" "+m(O)),Y.length===0&&(!Se||O.length==0))return Re[0]+G+Re[1];if(V<0)return z(O)?N.stylize(RegExp.prototype.toString.call(O),"regexp"):N.stylize("[Object]","special");N.seen.push(O);var Ze;return Se?Ze=f(N,O,V,B,Y):Ze=Y.map(function(na){return p(N,O,V,B,na,Se)}),N.seen.pop(),y(Ze,G,Re)}function c(N,O){if(F(O))return N.stylize("undefined","undefined");if(P(O)){var V="'"+JSON.stringify(O).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return N.stylize(V,"string")}if(E(O))return N.stylize(""+O,"number");if(S(O))return N.stylize(""+O,"boolean");if(b(O))return N.stylize("null","null")}function m(N){return"["+Error.prototype.toString.call(N)+"]"}function f(N,O,V,ie,I){for(var Y=[],B=0,Z=O.length;B<Z;++B)Je(O,String(B))?Y.push(p(N,O,V,ie,String(B),!0)):Y.push("");return I.forEach(function(G){G.match(/^\d+$/)||Y.push(p(N,O,V,ie,G,!0))}),Y}function p(N,O,V,ie,I,Y){var B,Z,G;if(G=Object.getOwnPropertyDescriptor(O,I)||{value:O[I]},G.get?G.set?Z=N.stylize("[Getter/Setter]","special"):Z=N.stylize("[Getter]","special"):G.set&&(Z=N.stylize("[Setter]","special")),Je(ie,I)||(B="["+I+"]"),Z||(N.seen.indexOf(G.value)<0?(b(V)?Z=l(N,G.value,null):Z=l(N,G.value,V-1),Z.indexOf(`
|
|
4074
4074
|
`)>-1&&(Y?Z=Z.split(`
|
|
4075
4075
|
`).map(function(Se){return" "+Se}).join(`
|
|
4076
4076
|
`).substr(2):Z=`
|
|
@@ -4079,14 +4079,14 @@ Url: ${Gs(e)}`),!0)}function R0(e,t){return e.type||!t||!t.length?!1:B0(e).some(
|
|
|
4079
4079
|
`))):Z=N.stylize("[Circular]","special")),F(B)){if(Y&&I.match(/^\d+$/))return Z;B=JSON.stringify(""+I),B.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(B=B.substr(1,B.length-2),B=N.stylize(B,"name")):(B=B.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),B=N.stylize(B,"string"))}return B+": "+Z}function y(N,O,V){var ie=N.reduce(function(I,Y){return Y.indexOf(`
|
|
4080
4080
|
`)>=0,I+Y.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ie>60?V[0]+(O===""?"":O+`
|
|
4081
4081
|
`)+" "+N.join(`,
|
|
4082
|
-
`)+" "+V[1]:V[0]+O+" "+N.join(", ")+" "+V[1]}function k(N){return Array.isArray(N)}e.isArray=k;function
|
|
4082
|
+
`)+" "+V[1]:V[0]+O+" "+N.join(", ")+" "+V[1]}function k(N){return Array.isArray(N)}e.isArray=k;function S(N){return typeof N=="boolean"}e.isBoolean=S;function b(N){return N===null}e.isNull=b;function w(N){return N==null}e.isNullOrUndefined=w;function E(N){return typeof N=="number"}e.isNumber=E;function P(N){return typeof N=="string"}e.isString=P;function j(N){return typeof N=="symbol"}e.isSymbol=j;function F(N){return N===void 0}e.isUndefined=F;function z(N){return R(N)&&ye(N)==="[object RegExp]"}e.isRegExp=z;function R(N){return typeof N=="object"&&N!==null}e.isObject=R;function _(N){return R(N)&&ye(N)==="[object Date]"}e.isDate=_;function D(N){return R(N)&&(ye(N)==="[object Error]"||N instanceof Error)}e.isError=D;function X(N){return typeof N=="function"}e.isFunction=X;function ne(N){return N===null||typeof N=="boolean"||typeof N=="number"||typeof N=="string"||typeof N=="symbol"||typeof N>"u"}e.isPrimitive=ne,e.isBuffer=LR;function ye(N){return Object.prototype.toString.call(N)}function he(N){return N<10?"0"+N.toString(10):N.toString(10)}var _e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ie(){var N=new Date,O=[he(N.getHours()),he(N.getMinutes()),he(N.getSeconds())].join(":");return[N.getDate(),_e[N.getMonth()],O].join(" ")}e.log=function(){console.log("%s - %s",Ie(),e.format.apply(e,arguments))},e.inherits=YR,e._extend=function(N,O){if(!O||!R(O))return N;for(var V=Object.keys(O),ie=V.length;ie--;)N[V[ie]]=O[V[ie]];return N};function Je(N,O){return Object.prototype.hasOwnProperty.call(N,O)}})(hw);var BR=eu;/*!
|
|
4083
4083
|
* The buffer module from node.js, for the browser.
|
|
4084
4084
|
*
|
|
4085
4085
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
4086
4086
|
* @license MIT
|
|
4087
4087
|
*/function fw(e,t){if(e===t)return 0;for(var n=e.length,a=t.length,i=0,r=Math.min(n,a);i<r;++i)if(e[i]!==t[i]){n=e[i],a=t[i];break}return n<a?-1:a<n?1:0}function io(e){return Tn.Buffer&&typeof Tn.Buffer.isBuffer=="function"?Tn.Buffer.isBuffer(e):!!(e!=null&&e._isBuffer)}var Bt=hw,VR=Object.prototype.hasOwnProperty,gw=Array.prototype.slice,yw=function(){return(function(){}).name==="foo"}();function bw(e){return Object.prototype.toString.call(e)}function kw(e){return io(e)||typeof Tn.ArrayBuffer!="function"?!1:typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e?!!(e instanceof DataView||e.buffer&&e.buffer instanceof ArrayBuffer):!1}var le=pw.exports=Ew,HR=/\s*function\s+([^\(\s]*)\s*/;function vw(e){if(Bt.isFunction(e)){if(yw)return e.name;var t=e.toString(),n=t.match(HR);return n&&n[1]}}le.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=WR(this),this.generatedMessage=!0);var n=t.stackStartFunction||yt;if(Error.captureStackTrace)Error.captureStackTrace(this,n);else{var a=new Error;if(a.stack){var i=a.stack,r=vw(n),o=i.indexOf(`
|
|
4088
4088
|
`+r);if(o>=0){var s=i.indexOf(`
|
|
4089
|
-
`,o+1);i=i.substring(s+1)}this.stack=i}}},Bt.inherits(le.AssertionError,Error);function ww(e,t){return typeof e=="string"?e.length<t?e:e.slice(0,t):e}function xw(e){if(yw||!Bt.isFunction(e))return Bt.inspect(e);var t=vw(e),n=t?": "+t:"";return"[Function"+n+"]"}function WR(e){return ww(xw(e.actual),128)+" "+e.operator+" "+ww(xw(e.expected),128)}function yt(e,t,n,a,i){throw new le.AssertionError({message:n,actual:e,expected:t,operator:a,stackStartFunction:i})}le.fail=yt;function Ew(e,t){e||yt(e,!0,t,"==",le.ok)}le.ok=Ew,le.equal=function(t,n,a){t!=n&&yt(t,n,a,"==",le.equal)},le.notEqual=function(t,n,a){t==n&&yt(t,n,a,"!=",le.notEqual)},le.deepEqual=function(t,n,a){zi(t,n,!1)||yt(t,n,a,"deepEqual",le.deepEqual)},le.deepStrictEqual=function(t,n,a){zi(t,n,!0)||yt(t,n,a,"deepStrictEqual",le.deepStrictEqual)};function zi(e,t,n,a){if(e===t)return!0;if(io(e)&&io(t))return fw(e,t)===0;if(Bt.isDate(e)&&Bt.isDate(t))return e.getTime()===t.getTime();if(Bt.isRegExp(e)&&Bt.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if((e===null||typeof e!="object")&&(t===null||typeof t!="object"))return n?e===t:e==t;if(kw(e)&&kw(t)&&bw(e)===bw(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return fw(new Uint8Array(e.buffer),new Uint8Array(t.buffer))===0;if(io(e)!==io(t))return!1;a=a||{actual:[],expected:[]};var i=a.actual.indexOf(e);return i!==-1&&i===a.expected.indexOf(t)?!0:(a.actual.push(e),a.expected.push(t),GR(e,t,n,a))}function Sw(e){return Object.prototype.toString.call(e)=="[object Arguments]"}function GR(e,t,n,a){if(e==null||t===null||t===void 0)return!1;if(Bt.isPrimitive(e)||Bt.isPrimitive(t))return e===t;if(n&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=Sw(e),r=Sw(t);if(i&&!r||!i&&r)return!1;if(i)return e=gw.call(e),t=gw.call(t),zi(e,t,n);var o=Pw(e),s=Pw(t),l,c;if(o.length!==s.length)return!1;for(o.sort(),s.sort(),c=o.length-1;c>=0;c--)if(o[c]!==s[c])return!1;for(c=o.length-1;c>=0;c--)if(l=o[c],!zi(e[l],t[l],n,a))return!1;return!0}le.notDeepEqual=function(t,n,a){zi(t,n,!1)&&yt(t,n,a,"notDeepEqual",le.notDeepEqual)},le.notDeepStrictEqual=Cw;function Cw(e,t,n){zi(e,t,!0)&&yt(e,t,n,"notDeepStrictEqual",Cw)}le.strictEqual=function(t,n,a){t!==n&&yt(t,n,a,"===",le.strictEqual)},le.notStrictEqual=function(t,n,a){t===n&&yt(t,n,a,"!==",le.notStrictEqual)};function $w(e,t){if(!e||!t)return!1;if(Object.prototype.toString.call(t)=="[object RegExp]")return t.test(e);try{if(e instanceof t)return!0}catch{}return Error.isPrototypeOf(t)?!1:t.call({},e)===!0}function KR(e){var t;try{e()}catch(n){t=n}return t}function jw(e,t,n,a){var i;if(typeof t!="function")throw new TypeError('"block" argument must be a function');typeof n=="string"&&(a=n,n=null),i=KR(t),a=(n&&n.name?" ("+n.name+").":".")+(a?" "+a:"."),e&&!i&&yt(i,n,"Missing expected exception"+a);var r=typeof a=="string",o=!e&&Bt.isError(i),s=!e&&i&&!n;if((o&&r&&$w(i,n)||s)&&yt(i,n,"Got unwanted exception"+a),e&&i&&n&&!$w(i,n)||!e&&i)throw i}le.throws=function(e,t,n){jw(!0,e,t,n)},le.doesNotThrow=function(e,t,n){jw(!1,e,t,n)},le.ifError=function(e){if(e)throw e};function Tw(e,t){e||yt(e,!0,t,"==",Tw)}le.strict=BR(Tw,le,{equal:le.strictEqual,deepEqual:le.deepStrictEqual,notEqual:le.notStrictEqual,notDeepEqual:le.notDeepStrictEqual}),le.strict.strict=le.strict;var Pw=Object.keys||function(e){var t=[];for(var n in e)VR.call(e,n)&&t.push(n);return t},qR=pw.exports,JR=qR,ZR=function(e){var t,n,a,i,r;for(t=Error.prepareStackTrace,Error.prepareStackTrace=function(o,s){return Error.prepareStackTrace=t,s},n=new Error().stack,r=0;r<n.length&&n[r].getFileName()!==__filename;)r++;JR(r<n.length,"Unexpected: unable to find caller/index.js in the stack"),e=!e||isNaN(e)?1:e>n.length-2?n.length-2:e,n=n.slice(r+e+1);do i=n.shift(),a=i&&i.getFileName();while(n.length&&a==="module.js");return a};const XR=Si,QR=Si,zw=UR,eU=ZR;Ym.getCallerRoot=function(){try{return zw(eU(2))}catch{return}},Ym.getProcessRoot=function(){let t=process.cwd();const n=QR.join(t,"current");try{XR.statSync(n).isDirectory()&&(t=n)}catch{}try{return zw(t)}catch{return}};var tU=Ym,Vm={exports:{}},Hm,Aw;function nU(){if(Aw)return Hm;Aw=1;var e=1e3,t=e*60,n=t*60,a=n*24,i=a*7,r=a*365.25;Hm=function(m,f){f=f||{};var p=typeof m;if(p==="string"&&m.length>0)return o(m);if(p==="number"&&isFinite(m))return f.long?l(m):s(m);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(m))};function o(m){if(m=String(m),!(m.length>100)){var f=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(m);if(f){var p=parseFloat(f[1]),y=(f[2]||"ms").toLowerCase();switch(y){case"years":case"year":case"yrs":case"yr":case"y":return p*r;case"weeks":case"week":case"w":return p*i;case"days":case"day":case"d":return p*a;case"hours":case"hour":case"hrs":case"hr":case"h":return p*n;case"minutes":case"minute":case"mins":case"min":case"m":return p*t;case"seconds":case"second":case"secs":case"sec":case"s":return p*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return p;default:return}}}}function s(m){var f=Math.abs(m);return f>=a?Math.round(m/a)+"d":f>=n?Math.round(m/n)+"h":f>=t?Math.round(m/t)+"m":f>=e?Math.round(m/e)+"s":m+"ms"}function l(m){var f=Math.abs(m);return f>=a?c(m,f,a,"day"):f>=n?c(m,f,n,"hour"):f>=t?c(m,f,t,"minute"):f>=e?c(m,f,e,"second"):m+" ms"}function c(m,f,p,y){var k=f>=p*1.5;return Math.round(m/p)+" "+y+(k?"s":"")}return Hm}function aU(e){n.debug=n,n.default=n,n.coerce=l,n.disable=o,n.enable=i,n.enabled=s,n.humanize=nU(),n.destroy=c,Object.keys(e).forEach(m=>{n[m]=e[m]}),n.names=[],n.skips=[],n.formatters={};function t(m){let f=0;for(let p=0;p<m.length;p++)f=(f<<5)-f+m.charCodeAt(p),f|=0;return n.colors[Math.abs(f)%n.colors.length]}n.selectColor=t;function n(m){let f,p=null,y,k;function j(...b){if(!j.enabled)return;const w=j,E=Number(new Date),P=E-(f||E);w.diff=P,w.prev=f,w.curr=E,f=E,b[0]=n.coerce(b[0]),typeof b[0]!="string"&&b.unshift("%O");let $=0;b[0]=b[0].replace(/%([a-zA-Z%])/g,(z,R)=>{if(z==="%%")return"%";$++;const _=n.formatters[R];if(typeof _=="function"){const D=b[$];z=_.call(w,D),b.splice($,1),$--}return z}),n.formatArgs.call(w,b),(w.log||n.log).apply(w,b)}return j.namespace=m,j.useColors=n.useColors(),j.color=n.selectColor(m),j.extend=a,j.destroy=n.destroy,Object.defineProperty(j,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(y!==n.namespaces&&(y=n.namespaces,k=n.enabled(m)),k),set:b=>{p=b}}),typeof n.init=="function"&&n.init(j),j}function a(m,f){const p=n(this.namespace+(typeof f>"u"?":":f)+m);return p.log=this.log,p}function i(m){n.save(m),n.namespaces=m,n.names=[],n.skips=[];const f=(typeof m=="string"?m:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const p of f)p[0]==="-"?n.skips.push(p.slice(1)):n.names.push(p)}function r(m,f){let p=0,y=0,k=-1,j=0;for(;p<m.length;)if(y<f.length&&(f[y]===m[p]||f[y]==="*"))f[y]==="*"?(k=y,j=p,y++):(p++,y++);else if(k!==-1)y=k+1,j++,p=j;else return!1;for(;y<f.length&&f[y]==="*";)y++;return y===f.length}function o(){const m=[...n.names,...n.skips.map(f=>"-"+f)].join(",");return n.enable(""),m}function s(m){for(const f of n.skips)if(r(m,f))return!1;for(const f of n.names)if(r(m,f))return!0;return!1}function l(m){return m instanceof Error?m.stack||m.message:m}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}var iU=aU;(function(e,t){t.formatArgs=a,t.save=i,t.load=r,t.useColors=n,t.storage=o(),t.destroy=(()=>{let l=!1;return()=>{l||(l=!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"];function n(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let l;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(l=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(l[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function a(l){if(l[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+l[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const c="color: "+this.color;l.splice(1,0,c,"color: inherit");let m=0,f=0;l[0].replace(/%[a-zA-Z%]/g,p=>{p!=="%%"&&(m++,p==="%c"&&(f=m))}),l.splice(f,0,c)}t.log=console.debug||console.log||(()=>{});function i(l){try{l?t.storage.setItem("debug",l):t.storage.removeItem("debug")}catch{}}function r(){let l;try{l=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch{}return!l&&typeof process<"u"&&"env"in process&&(l=process.env.DEBUG),l}function o(){try{return localStorage}catch{}}e.exports=iU(t);const{formatters:s}=e.exports;s.j=function(l){try{return JSON.stringify(l)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}}})(Vm,Vm.exports);var rU=Vm.exports;const oU=tU,Nw=rU;Lm.exports=function(t){const n=oU.getCallerRoot();let a;try{const i=Sa("/node_modules/@tryghost/debug/lib")(n+"/package.json");i.alias?a=i.alias:a=i.name}catch{a="undefined"}return Nw(a+":"+t)},Lm.exports._base=Nw;var sU=Lm.exports,lU=sU;const uU=[{code:"af",label:"Afrikaans"},{code:"ar",label:"Arabic"},{code:"bg",label:"Bulgarian"},{code:"bn",label:"Bengali"},{code:"bs",label:"Bosnian"},{code:"ca",label:"Catalan"},{code:"cs",label:"Czech"},{code:"da",label:"Danish"},{code:"de",label:"German"},{code:"de-CH",label:"Swiss German"},{code:"el",label:"Greek"},{code:"en",label:"English"},{code:"eo",label:"Esperanto"},{code:"es",label:"Spanish"},{code:"et",label:"Estonian"},{code:"eu",label:"Basque"},{code:"fa",label:"Persian/Farsi"},{code:"fi",label:"Finnish"},{code:"fr",label:"French"},{code:"gd",label:"Gaelic (Scottish)"},{code:"he",label:"Hebrew"},{code:"hi",label:"Hindi"},{code:"hr",label:"Croatian"},{code:"hu",label:"Hungarian"},{code:"id",label:"Indonesian"},{code:"is",label:"Icelandic"},{code:"it",label:"Italian"},{code:"ja",label:"Japanese"},{code:"ko",label:"Korean"},{code:"kz",label:"Kazakh"},{code:"lt",label:"Lithuanian"},{code:"lv",label:"Latvian"},{code:"mk",label:"Macedonian"},{code:"mn",label:"Mongolian"},{code:"ms",label:"Malay"},{code:"nb",label:"Norwegian Bokmål"},{code:"ne",label:"Nepali"},{code:"nl",label:"Dutch"},{code:"nn",label:"Norwegian Nynorsk"},{code:"pa",label:"Punjabi"},{code:"pl",label:"Polish"},{code:"pt",label:"Portuguese"},{code:"pt-BR",label:"Portuguese (Brazil)"},{code:"ro",label:"Romanian"},{code:"ru",label:"Russian"},{code:"si",label:"Sinhala"},{code:"sk",label:"Slovak"},{code:"sl",label:"Slovenian"},{code:"sq",label:"Albanian"},{code:"sr",label:"Serbian"},{code:"sr-Cyrl",label:"Serbian (Cyrillic)"},{code:"sv",label:"Swedish"},{code:"sw",label:"Swahili"},{code:"ta",label:"Tamil"},{code:"th",label:"Thai"},{code:"tr",label:"Turkish"},{code:"uk",label:"Ukrainian"},{code:"ur",label:"Urdu"},{code:"uz",label:"Uzbek"},{code:"vi",label:"Vietnamese"},{code:"zh",label:"Chinese"},{code:"zh-Hant",label:"Traditional Chinese"}],cU=qT,Iw=Si,Wm=Si,dU=RR,Gm=lU("i18n"),Mw=uU,Fw=Mw.map(e=>e.code);function Dw(e,t){return e.reduce((n,a)=>{let i;try{i=Sa("/ghost/i18n/lib")(`../locales/${a}/${t}.json`)}catch{i=Sa("/ghost/i18n/lib")(`../locales/en/${t}.json`)}return n[a]={[t]:{...i,...i.default&&typeof i.default=="object"?i.default:{}}},n},{})}function mU(e,t){if(!t)return{[e]:{theme:{}}};let n=[];try{n=Wm.readdirSync(t).filter(r=>r.endsWith(".json")).map(r=>r.replace(".json",""))}catch{n=[e,"en"]}return[...new Set([e,...n,"en"])].reduce((i,r)=>{let o;try{const s=Iw.join(t,`${r}.json`);if(Wm.existsSync(s))delete require.cache[Sa("/ghost/i18n/lib").resolve(s)],o=Sa("/ghost/i18n/lib")(s);else throw new dU.IncorrectUsageError({message:`Locale file not found: ${r}`,context:r})}catch{if(Gm(`Error loading theme locale file: ${r}`),r!=="en")try{const l=Iw.join(t,"en.json");Wm.existsSync(l)?(delete require.cache[Sa("/ghost/i18n/lib").resolve(l)],o=Sa("/ghost/i18n/lib")(l)):o={}}catch{o={}}else Gm("Theme en.json file not found"),o={}}return i[r]={theme:{...o,...o.default&&typeof o.default=="object"?o.default:{}}},i},{})}Jr.exports=(e="en",t="portal",n={})=>{const a=cU.createInstance(),i={prefix:"{",suffix:"}"};t==="theme"&&(i.escapeValue=!1);let r;return t!=="theme"?r=Dw(Fw,t):(Gm(`generateThemeResources: ${e}, ${n.themePath}`),r=mU(e,n.themePath)),a.init({lng:e,nsSeparator:!1,keySeparator:!1,returnEmptyString:!1,fallbackLng:{no:["nb","en"],default:["en"]},ns:t,defaultNS:t,interpolation:i,resources:r}),a},Jr.exports.SUPPORTED_LOCALES=Fw,Jr.exports.LOCALE_DATA=Mw,Jr.exports.generateResources=Dw;var pU=Jr.exports;const ro=pU;wi.exports=ro,wi.exports.default=ro,wi.exports.LOCALE_DATA=ro.LOCALE_DATA,wi.exports.SUPPORTED_LOCALES=ro.SUPPORTED_LOCALES,wi.exports.generateResources=ro.generateResources;var hU=wi.exports;const Sl=Bi(hU)("en","portal"),v=Sl.t.bind(Sl);class wn extends Error{static async fromApiResponse(t){if(t.status===400||t.status===429)try{const n=await t.json();if(n.errors&&Array.isArray(n.errors)&&n.errors.length>0&&n.errors[0].message)return new wn(n.errors[0].message)}catch{return}if(t.status===500)return new wn("A server error occurred")}}const Cl=[];function xn(e,t){const n=(o,s=null)=>s?v(o,{number:s}):v(o),a=()=>{const o=s=>Cl.push(s);Cl.length===0&&(o("No member exists with this email address. Please sign up first."),o("No member exists with this email address."),o("This site is invite-only, contact the owner for access."),o("Unable to initiate checkout session"),o("This site is not accepting payments at the moment."),o("Too many attempts try again in {number} minutes."),o("Too many attempts try again in {number} hours."),o("Too many attempts try again in {number} days."),o("Too many different sign-in attempts, try again in {number} minutes"),o("Too many different sign-in attempts, try again in {number} hours"),o("Too many different sign-in attempts, try again in {number} days"),o("Failed to send magic link email"),o("This site only accepts paid members."),o("Signups from this email domain are currently restricted."),o("Too many sign-up attempts, try again later"),o("Memberships from this email domain are currently restricted."),o("Invalid verification code"))},i=o=>(Cl.length===0&&a(),!!Cl.includes(o)),r=(o=null)=>{if(!o)return{preparedMessage:"An error occurred",number:null};const s=o.match(/\d+/);return s&&(o=o.replace(s[0],"{number}")),{preparedMessage:o,number:s?s[0]:null}};if(!e&&!t)return v("An error occurred");if(e instanceof wn||e.message){const{preparedMessage:o,number:s}=r(e.message);return i(o)?n(o,s):t||n(e==null?void 0:e.message)}else return t||v("An error occurred")+": "+e.toString()}class Km extends S.Component{constructor(){super(...arguments),this.handleLoad=()=>{this.setupFrameBaseStyle()}}componentDidMount(){this.node.addEventListener("load",this.handleLoad)}componentWillUnmout(){this.node.removeEventListener("load",this.handleLoad)}setupFrameBaseStyle(){this.node.contentDocument&&(this.iframeHtml=this.node.contentDocument.documentElement,this.iframeHead=this.node.contentDocument.head,this.iframeRoot=this.node.contentDocument.body,this.iframeHtml.setAttribute("dir",this.props.dataDir),this.forceUpdate())}render(){const{children:t,head:n,title:a="",style:i={},dataTestId:r="",dataDir:o="ltr",...s}=this.props;return u.jsxs("iframe",{srcDoc:"<!DOCTYPE html>","data-testid":r,ref:l=>this.node=l,title:a,style:i,frameBorder:"0",dir:o,...s,children:[this.iframeHead&&sd.createPortal(n,this.iframeHead),this.iframeRoot&&sd.createPortal(t,this.iframeRoot)]})}}const qm=e=>S.createElement("svg",{id:"Regular",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},S.createElement("defs",null,S.createElement("style",null,".cls-1{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.8px;}")),S.createElement("circle",{className:"cls-1",cx:12,cy:9.75,r:5.25}),S.createElement("path",{className:"cls-1",d:"M18.913,20.876a9.746,9.746,0,0,0-13.826,0"}),S.createElement("circle",{className:"cls-1",cx:12,cy:12,r:11.25})),Ow=`
|
|
4089
|
+
`,o+1);i=i.substring(s+1)}this.stack=i}}},Bt.inherits(le.AssertionError,Error);function ww(e,t){return typeof e=="string"?e.length<t?e:e.slice(0,t):e}function xw(e){if(yw||!Bt.isFunction(e))return Bt.inspect(e);var t=vw(e),n=t?": "+t:"";return"[Function"+n+"]"}function WR(e){return ww(xw(e.actual),128)+" "+e.operator+" "+ww(xw(e.expected),128)}function yt(e,t,n,a,i){throw new le.AssertionError({message:n,actual:e,expected:t,operator:a,stackStartFunction:i})}le.fail=yt;function Ew(e,t){e||yt(e,!0,t,"==",le.ok)}le.ok=Ew,le.equal=function(t,n,a){t!=n&&yt(t,n,a,"==",le.equal)},le.notEqual=function(t,n,a){t==n&&yt(t,n,a,"!=",le.notEqual)},le.deepEqual=function(t,n,a){zi(t,n,!1)||yt(t,n,a,"deepEqual",le.deepEqual)},le.deepStrictEqual=function(t,n,a){zi(t,n,!0)||yt(t,n,a,"deepStrictEqual",le.deepStrictEqual)};function zi(e,t,n,a){if(e===t)return!0;if(io(e)&&io(t))return fw(e,t)===0;if(Bt.isDate(e)&&Bt.isDate(t))return e.getTime()===t.getTime();if(Bt.isRegExp(e)&&Bt.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if((e===null||typeof e!="object")&&(t===null||typeof t!="object"))return n?e===t:e==t;if(kw(e)&&kw(t)&&bw(e)===bw(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return fw(new Uint8Array(e.buffer),new Uint8Array(t.buffer))===0;if(io(e)!==io(t))return!1;a=a||{actual:[],expected:[]};var i=a.actual.indexOf(e);return i!==-1&&i===a.expected.indexOf(t)?!0:(a.actual.push(e),a.expected.push(t),GR(e,t,n,a))}function Sw(e){return Object.prototype.toString.call(e)=="[object Arguments]"}function GR(e,t,n,a){if(e==null||t===null||t===void 0)return!1;if(Bt.isPrimitive(e)||Bt.isPrimitive(t))return e===t;if(n&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=Sw(e),r=Sw(t);if(i&&!r||!i&&r)return!1;if(i)return e=gw.call(e),t=gw.call(t),zi(e,t,n);var o=Pw(e),s=Pw(t),l,c;if(o.length!==s.length)return!1;for(o.sort(),s.sort(),c=o.length-1;c>=0;c--)if(o[c]!==s[c])return!1;for(c=o.length-1;c>=0;c--)if(l=o[c],!zi(e[l],t[l],n,a))return!1;return!0}le.notDeepEqual=function(t,n,a){zi(t,n,!1)&&yt(t,n,a,"notDeepEqual",le.notDeepEqual)},le.notDeepStrictEqual=Cw;function Cw(e,t,n){zi(e,t,!0)&&yt(e,t,n,"notDeepStrictEqual",Cw)}le.strictEqual=function(t,n,a){t!==n&&yt(t,n,a,"===",le.strictEqual)},le.notStrictEqual=function(t,n,a){t===n&&yt(t,n,a,"!==",le.notStrictEqual)};function $w(e,t){if(!e||!t)return!1;if(Object.prototype.toString.call(t)=="[object RegExp]")return t.test(e);try{if(e instanceof t)return!0}catch{}return Error.isPrototypeOf(t)?!1:t.call({},e)===!0}function KR(e){var t;try{e()}catch(n){t=n}return t}function jw(e,t,n,a){var i;if(typeof t!="function")throw new TypeError('"block" argument must be a function');typeof n=="string"&&(a=n,n=null),i=KR(t),a=(n&&n.name?" ("+n.name+").":".")+(a?" "+a:"."),e&&!i&&yt(i,n,"Missing expected exception"+a);var r=typeof a=="string",o=!e&&Bt.isError(i),s=!e&&i&&!n;if((o&&r&&$w(i,n)||s)&&yt(i,n,"Got unwanted exception"+a),e&&i&&n&&!$w(i,n)||!e&&i)throw i}le.throws=function(e,t,n){jw(!0,e,t,n)},le.doesNotThrow=function(e,t,n){jw(!1,e,t,n)},le.ifError=function(e){if(e)throw e};function Tw(e,t){e||yt(e,!0,t,"==",Tw)}le.strict=BR(Tw,le,{equal:le.strictEqual,deepEqual:le.deepStrictEqual,notEqual:le.notStrictEqual,notDeepEqual:le.notDeepStrictEqual}),le.strict.strict=le.strict;var Pw=Object.keys||function(e){var t=[];for(var n in e)VR.call(e,n)&&t.push(n);return t},qR=pw.exports,JR=qR,ZR=function(e){var t,n,a,i,r;for(t=Error.prepareStackTrace,Error.prepareStackTrace=function(o,s){return Error.prepareStackTrace=t,s},n=new Error().stack,r=0;r<n.length&&n[r].getFileName()!==__filename;)r++;JR(r<n.length,"Unexpected: unable to find caller/index.js in the stack"),e=!e||isNaN(e)?1:e>n.length-2?n.length-2:e,n=n.slice(r+e+1);do i=n.shift(),a=i&&i.getFileName();while(n.length&&a==="module.js");return a};const XR=Si,QR=Si,zw=UR,eU=ZR;Ym.getCallerRoot=function(){try{return zw(eU(2))}catch{return}},Ym.getProcessRoot=function(){let t=process.cwd();const n=QR.join(t,"current");try{XR.statSync(n).isDirectory()&&(t=n)}catch{}try{return zw(t)}catch{return}};var tU=Ym,Vm={exports:{}},Hm,Aw;function nU(){if(Aw)return Hm;Aw=1;var e=1e3,t=e*60,n=t*60,a=n*24,i=a*7,r=a*365.25;Hm=function(m,f){f=f||{};var p=typeof m;if(p==="string"&&m.length>0)return o(m);if(p==="number"&&isFinite(m))return f.long?l(m):s(m);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(m))};function o(m){if(m=String(m),!(m.length>100)){var f=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(m);if(f){var p=parseFloat(f[1]),y=(f[2]||"ms").toLowerCase();switch(y){case"years":case"year":case"yrs":case"yr":case"y":return p*r;case"weeks":case"week":case"w":return p*i;case"days":case"day":case"d":return p*a;case"hours":case"hour":case"hrs":case"hr":case"h":return p*n;case"minutes":case"minute":case"mins":case"min":case"m":return p*t;case"seconds":case"second":case"secs":case"sec":case"s":return p*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return p;default:return}}}}function s(m){var f=Math.abs(m);return f>=a?Math.round(m/a)+"d":f>=n?Math.round(m/n)+"h":f>=t?Math.round(m/t)+"m":f>=e?Math.round(m/e)+"s":m+"ms"}function l(m){var f=Math.abs(m);return f>=a?c(m,f,a,"day"):f>=n?c(m,f,n,"hour"):f>=t?c(m,f,t,"minute"):f>=e?c(m,f,e,"second"):m+" ms"}function c(m,f,p,y){var k=f>=p*1.5;return Math.round(m/p)+" "+y+(k?"s":"")}return Hm}function aU(e){n.debug=n,n.default=n,n.coerce=l,n.disable=o,n.enable=i,n.enabled=s,n.humanize=nU(),n.destroy=c,Object.keys(e).forEach(m=>{n[m]=e[m]}),n.names=[],n.skips=[],n.formatters={};function t(m){let f=0;for(let p=0;p<m.length;p++)f=(f<<5)-f+m.charCodeAt(p),f|=0;return n.colors[Math.abs(f)%n.colors.length]}n.selectColor=t;function n(m){let f,p=null,y,k;function S(...b){if(!S.enabled)return;const w=S,E=Number(new Date),P=E-(f||E);w.diff=P,w.prev=f,w.curr=E,f=E,b[0]=n.coerce(b[0]),typeof b[0]!="string"&&b.unshift("%O");let j=0;b[0]=b[0].replace(/%([a-zA-Z%])/g,(z,R)=>{if(z==="%%")return"%";j++;const _=n.formatters[R];if(typeof _=="function"){const D=b[j];z=_.call(w,D),b.splice(j,1),j--}return z}),n.formatArgs.call(w,b),(w.log||n.log).apply(w,b)}return S.namespace=m,S.useColors=n.useColors(),S.color=n.selectColor(m),S.extend=a,S.destroy=n.destroy,Object.defineProperty(S,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(y!==n.namespaces&&(y=n.namespaces,k=n.enabled(m)),k),set:b=>{p=b}}),typeof n.init=="function"&&n.init(S),S}function a(m,f){const p=n(this.namespace+(typeof f>"u"?":":f)+m);return p.log=this.log,p}function i(m){n.save(m),n.namespaces=m,n.names=[],n.skips=[];const f=(typeof m=="string"?m:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const p of f)p[0]==="-"?n.skips.push(p.slice(1)):n.names.push(p)}function r(m,f){let p=0,y=0,k=-1,S=0;for(;p<m.length;)if(y<f.length&&(f[y]===m[p]||f[y]==="*"))f[y]==="*"?(k=y,S=p,y++):(p++,y++);else if(k!==-1)y=k+1,S++,p=S;else return!1;for(;y<f.length&&f[y]==="*";)y++;return y===f.length}function o(){const m=[...n.names,...n.skips.map(f=>"-"+f)].join(",");return n.enable(""),m}function s(m){for(const f of n.skips)if(r(m,f))return!1;for(const f of n.names)if(r(m,f))return!0;return!1}function l(m){return m instanceof Error?m.stack||m.message:m}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}var iU=aU;(function(e,t){t.formatArgs=a,t.save=i,t.load=r,t.useColors=n,t.storage=o(),t.destroy=(()=>{let l=!1;return()=>{l||(l=!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"];function n(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let l;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(l=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(l[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function a(l){if(l[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+l[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const c="color: "+this.color;l.splice(1,0,c,"color: inherit");let m=0,f=0;l[0].replace(/%[a-zA-Z%]/g,p=>{p!=="%%"&&(m++,p==="%c"&&(f=m))}),l.splice(f,0,c)}t.log=console.debug||console.log||(()=>{});function i(l){try{l?t.storage.setItem("debug",l):t.storage.removeItem("debug")}catch{}}function r(){let l;try{l=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch{}return!l&&typeof process<"u"&&"env"in process&&(l=process.env.DEBUG),l}function o(){try{return localStorage}catch{}}e.exports=iU(t);const{formatters:s}=e.exports;s.j=function(l){try{return JSON.stringify(l)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}}})(Vm,Vm.exports);var rU=Vm.exports;const oU=tU,Nw=rU;Lm.exports=function(t){const n=oU.getCallerRoot();let a;try{const i=Sa("/node_modules/@tryghost/debug/lib")(n+"/package.json");i.alias?a=i.alias:a=i.name}catch{a="undefined"}return Nw(a+":"+t)},Lm.exports._base=Nw;var sU=Lm.exports,lU=sU;const uU=[{code:"af",label:"Afrikaans"},{code:"ar",label:"Arabic"},{code:"bg",label:"Bulgarian"},{code:"bn",label:"Bengali"},{code:"bs",label:"Bosnian"},{code:"ca",label:"Catalan"},{code:"cs",label:"Czech"},{code:"da",label:"Danish"},{code:"de",label:"German"},{code:"de-CH",label:"Swiss German"},{code:"el",label:"Greek"},{code:"en",label:"English"},{code:"eo",label:"Esperanto"},{code:"es",label:"Spanish"},{code:"et",label:"Estonian"},{code:"eu",label:"Basque"},{code:"fa",label:"Persian/Farsi"},{code:"fi",label:"Finnish"},{code:"fr",label:"French"},{code:"gd",label:"Gaelic (Scottish)"},{code:"he",label:"Hebrew"},{code:"hi",label:"Hindi"},{code:"hr",label:"Croatian"},{code:"hu",label:"Hungarian"},{code:"id",label:"Indonesian"},{code:"is",label:"Icelandic"},{code:"it",label:"Italian"},{code:"ja",label:"Japanese"},{code:"ko",label:"Korean"},{code:"kz",label:"Kazakh"},{code:"lt",label:"Lithuanian"},{code:"lv",label:"Latvian"},{code:"mk",label:"Macedonian"},{code:"mn",label:"Mongolian"},{code:"ms",label:"Malay"},{code:"nb",label:"Norwegian Bokmål"},{code:"ne",label:"Nepali"},{code:"nl",label:"Dutch"},{code:"nn",label:"Norwegian Nynorsk"},{code:"pa",label:"Punjabi"},{code:"pl",label:"Polish"},{code:"pt",label:"Portuguese"},{code:"pt-BR",label:"Portuguese (Brazil)"},{code:"ro",label:"Romanian"},{code:"ru",label:"Russian"},{code:"si",label:"Sinhala"},{code:"sk",label:"Slovak"},{code:"sl",label:"Slovenian"},{code:"sq",label:"Albanian"},{code:"sr",label:"Serbian"},{code:"sr-Cyrl",label:"Serbian (Cyrillic)"},{code:"sv",label:"Swedish"},{code:"sw",label:"Swahili"},{code:"ta",label:"Tamil"},{code:"th",label:"Thai"},{code:"tr",label:"Turkish"},{code:"uk",label:"Ukrainian"},{code:"ur",label:"Urdu"},{code:"uz",label:"Uzbek"},{code:"vi",label:"Vietnamese"},{code:"zh",label:"Chinese"},{code:"zh-Hant",label:"Traditional Chinese"}],cU=qT,Iw=Si,Wm=Si,dU=RR,Gm=lU("i18n"),Mw=uU,Fw=Mw.map(e=>e.code);function Dw(e,t){return e.reduce((n,a)=>{let i;try{i=Sa("/ghost/i18n/lib")(`../locales/${a}/${t}.json`)}catch{i=Sa("/ghost/i18n/lib")(`../locales/en/${t}.json`)}return n[a]={[t]:{...i,...i.default&&typeof i.default=="object"?i.default:{}}},n},{})}function mU(e,t){if(!t)return{[e]:{theme:{}}};let n=[];try{n=Wm.readdirSync(t).filter(r=>r.endsWith(".json")).map(r=>r.replace(".json",""))}catch{n=[e,"en"]}return[...new Set([e,...n,"en"])].reduce((i,r)=>{let o;try{const s=Iw.join(t,`${r}.json`);if(Wm.existsSync(s))delete require.cache[Sa("/ghost/i18n/lib").resolve(s)],o=Sa("/ghost/i18n/lib")(s);else throw new dU.IncorrectUsageError({message:`Locale file not found: ${r}`,context:r})}catch{if(Gm(`Error loading theme locale file: ${r}`),r!=="en")try{const l=Iw.join(t,"en.json");Wm.existsSync(l)?(delete require.cache[Sa("/ghost/i18n/lib").resolve(l)],o=Sa("/ghost/i18n/lib")(l)):o={}}catch{o={}}else Gm("Theme en.json file not found"),o={}}return i[r]={theme:{...o,...o.default&&typeof o.default=="object"?o.default:{}}},i},{})}Jr.exports=(e="en",t="portal",n={})=>{const a=cU.createInstance(),i={prefix:"{",suffix:"}"};t==="theme"&&(i.escapeValue=!1);let r;return t!=="theme"?r=Dw(Fw,t):(Gm(`generateThemeResources: ${e}, ${n.themePath}`),r=mU(e,n.themePath)),a.init({lng:e,nsSeparator:!1,keySeparator:!1,returnEmptyString:!1,fallbackLng:{no:["nb","en"],default:["en"]},ns:t,defaultNS:t,interpolation:i,resources:r}),a},Jr.exports.SUPPORTED_LOCALES=Fw,Jr.exports.LOCALE_DATA=Mw,Jr.exports.generateResources=Dw;var pU=Jr.exports;const ro=pU;wi.exports=ro,wi.exports.default=ro,wi.exports.LOCALE_DATA=ro.LOCALE_DATA,wi.exports.SUPPORTED_LOCALES=ro.SUPPORTED_LOCALES,wi.exports.generateResources=ro.generateResources;var hU=wi.exports;const Sl=Bi(hU)("en","portal"),v=Sl.t.bind(Sl);class wn extends Error{static async fromApiResponse(t){if(t.status===400||t.status===429)try{const n=await t.json();if(n.errors&&Array.isArray(n.errors)&&n.errors.length>0&&n.errors[0].message)return new wn(n.errors[0].message)}catch{return}if(t.status===500)return new wn("A server error occurred")}}const Cl=[];function xn(e,t){const n=(o,s=null)=>s?v(o,{number:s}):v(o),a=()=>{const o=s=>Cl.push(s);Cl.length===0&&(o("No member exists with this email address. Please sign up first."),o("No member exists with this email address."),o("This site is invite-only, contact the owner for access."),o("Unable to initiate checkout session"),o("This site is not accepting payments at the moment."),o("Too many attempts try again in {number} minutes."),o("Too many attempts try again in {number} hours."),o("Too many attempts try again in {number} days."),o("Too many different sign-in attempts, try again in {number} minutes"),o("Too many different sign-in attempts, try again in {number} hours"),o("Too many different sign-in attempts, try again in {number} days"),o("Failed to send magic link email"),o("This site only accepts paid members."),o("Signups from this email domain are currently restricted."),o("Too many sign-up attempts, try again later"),o("Memberships from this email domain are currently restricted."),o("Invalid verification code"))},i=o=>(Cl.length===0&&a(),!!Cl.includes(o)),r=(o=null)=>{if(!o)return{preparedMessage:"An error occurred",number:null};const s=o.match(/\d+/);return s&&(o=o.replace(s[0],"{number}")),{preparedMessage:o,number:s?s[0]:null}};if(!e&&!t)return v("An error occurred");if(e instanceof wn||e.message){const{preparedMessage:o,number:s}=r(e.message);return i(o)?n(o,s):t||n(e==null?void 0:e.message)}else return t||v("An error occurred")+": "+e.toString()}class Km extends C.Component{constructor(){super(...arguments),this.handleLoad=()=>{this.setupFrameBaseStyle()}}componentDidMount(){this.node.addEventListener("load",this.handleLoad)}componentWillUnmout(){this.node.removeEventListener("load",this.handleLoad)}setupFrameBaseStyle(){this.node.contentDocument&&(this.iframeHtml=this.node.contentDocument.documentElement,this.iframeHead=this.node.contentDocument.head,this.iframeRoot=this.node.contentDocument.body,this.iframeHtml.setAttribute("dir",this.props.dataDir),this.forceUpdate())}render(){const{children:t,head:n,title:a="",style:i={},dataTestId:r="",dataDir:o="ltr",...s}=this.props;return u.jsxs("iframe",{srcDoc:"<!DOCTYPE html>","data-testid":r,ref:l=>this.node=l,title:a,style:i,frameBorder:"0",dir:o,...s,children:[this.iframeHead&&sd.createPortal(n,this.iframeHead),this.iframeRoot&&sd.createPortal(t,this.iframeRoot)]})}}const qm=e=>C.createElement("svg",{id:"Regular",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},C.createElement("defs",null,C.createElement("style",null,".cls-1{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.8px;}")),C.createElement("circle",{className:"cls-1",cx:12,cy:9.75,r:5.25}),C.createElement("path",{className:"cls-1",d:"M18.913,20.876a9.746,9.746,0,0,0-13.826,0"}),C.createElement("circle",{className:"cls-1",cx:12,cy:12,r:11.25})),Ow=`
|
|
4090
4090
|
.gh-portal-avatar {
|
|
4091
4091
|
position: relative;
|
|
4092
4092
|
display: flex;
|
|
@@ -4109,7 +4109,7 @@ Url: ${Gs(e)}`),!0)}function R0(e,t){return e.type||!t||!t.length?!1:B0(e).some(
|
|
|
4109
4109
|
opacity: 1;
|
|
4110
4110
|
max-width: unset;
|
|
4111
4111
|
}
|
|
4112
|
-
`,fU=({style:e={}})=>({avatarContainer:{...e.avatarContainer||{}},gravatar:{...e.avatarContainer||{}},userIcon:{width:"34px",height:"34px",color:"#fff",...e.userIcon||{}}});function Jm({gravatar:e,style:t}){let n=fU({style:t});return u.jsxs("figure",{className:"gh-portal-avatar",style:n.avatarContainer,children:[u.jsx(qm,{style:n.userIcon}),e?u.jsx("img",{style:n.gravatar,src:e,alt:""}):null]})}const H=re.createContext({site:{},member:{},offers:[],action:"",actionErrorMessage:null,lastPage:"",brandColor:"",pageData:{},doAction:(e,t)=>({action:e,data:t}),dir:"ltr"}),gU=e=>
|
|
4112
|
+
`,fU=({style:e={}})=>({avatarContainer:{...e.avatarContainer||{}},gravatar:{...e.avatarContainer||{}},userIcon:{width:"34px",height:"34px",color:"#fff",...e.userIcon||{}}});function Jm({gravatar:e,style:t}){let n=fU({style:t});return u.jsxs("figure",{className:"gh-portal-avatar",style:n.avatarContainer,children:[u.jsx(qm,{style:n.userIcon}),e?u.jsx("img",{style:n.gravatar,src:e,alt:""}):null]})}const H=re.createContext({site:{},member:{},offers:[],action:"",actionErrorMessage:null,lastPage:"",brandColor:"",pageData:{},doAction:(e,t)=>({action:e,data:t}),dir:"ltr"}),gU=e=>C.createElement("svg",{width:21,height:24,viewBox:"0 0 21 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},C.createElement("path",{d:"M10.533 11.267c2.835 0 5.134-2.299 5.134-5.134C15.667 3.298 13.368 1 10.533 1 7.698 1 5.4 3.298 5.4 6.133s2.298 5.134 5.133 5.134zM1 23c0-2.529 1.004-4.953 2.792-6.741 1.788-1.788 4.213-2.792 6.741-2.792 2.529 0 4.954 1.004 6.741 2.792 1.788 1.788 2.793 4.212 2.793 6.74",stroke:"#fff",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),yU=e=>C.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},C.createElement("g",{fill:"none",fillRule:"evenodd"},C.createElement("path",{stroke:"#FFF",strokeWidth:1.5,strokeLinecap:"round",d:"M12.5 2v20M2 12.5h20"}))),bU=e=>C.createElement("svg",{width:25,height:24,viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},C.createElement("path",{d:"M23.5 6v14.25c0 .597-.237 1.169-.659 1.591-.422.422-.994.659-1.591.659s-1.169-.237-1.591-.659c-.422-.422-.659-.994-.659-1.591V3c0-.398-.158-.78-.44-1.06-.28-.282-.662-.44-1.06-.44h-15c-.398 0-.78.158-1.06.44C1.157 2.22 1 2.601 1 3v17.25c0 .597.237 1.169.659 1.591.422.422.994.659 1.591.659h18M4.75 15h10.5M4.75 18h6",stroke:"#fff",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M14.5 5.25h-9c-.414 0-.75.336-.75.75v4.5c0 .414.336.75.75.75h9c.414 0 .75-.336.75-.75V6c0-.414-.336-.75-.75-.75z",stroke:"#fff",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),kU=e=>C.createElement("svg",{width:24,height:18,viewBox:"0 0 24 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},C.createElement("path",{d:"M21.75 1.5H2.25c-.828 0-1.5.672-1.5 1.5v12c0 .828.672 1.5 1.5 1.5h19.5c.828 0 1.5-.672 1.5-1.5V3c0-.828-.672-1.5-1.5-1.5zM15.687 6.975L19.5 10.5M8.313 6.975L4.5 10.5",stroke:"#fff",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M22.88 2.014l-9.513 6.56C12.965 8.851 12.488 9 12 9s-.965-.149-1.367-.426L1.12 2.014",stroke:"#fff",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),vU=e=>C.createElement("svg",{width:26,height:26,viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},C.createElement("path",{d:"M17.903 12.016c-.332-1.665-1.491-3.032-3.031-3.654M11.037 8.4C9.252 9.163 8 10.935 8 13c0 .432.055.85.158 1.25M10.44 17.296c.748.447 1.624.704 2.56.704 1.71 0 3.22-.858 4.12-2.167M15.171 21.22c3.643-.96 6.329-4.276 6.329-8.22 0-1.084-.203-2.121-.573-3.075M18.611 6.615C17.114 5.3 15.151 4.5 13 4.5c-2.149 0-4.112.797-5.608 2.113M5.112 9.826c-.395.98-.612 2.052-.612 3.174 0 4.015 2.783 7.38 6.526 8.27",stroke:"#fff",strokeWidth:1.5,strokeLinecap:"round"}),C.createElement("path",{d:"M8.924 24.29c1.273.46 2.645.71 4.076.71 5.52 0 10.17-3.727 11.57-8.803M6.712 2.777C3.285 4.89 1 8.678 1 13c0 3.545 1.537 6.731 3.982 8.928M24.849 11.089C23.933 5.369 18.977 1 13 1c-.69 0-1.367.058-2.025.17",stroke:"#fff",strokeWidth:1.5,strokeLinecap:"round"})),Zm=`
|
|
4113
4113
|
/* Colors
|
|
4114
4114
|
/* ----------------------------------------------------- */
|
|
4115
4115
|
:root {
|
|
@@ -4577,7 +4577,7 @@ Url: ${Gs(e)}`),!0)}function R0(e,t){return e.type||!t||!t.length?!1:B0(e).some(
|
|
|
4577
4577
|
animation-name: notification-slideout-mobile;
|
|
4578
4578
|
}
|
|
4579
4579
|
}
|
|
4580
|
-
`,up=e=>
|
|
4580
|
+
`,up=e=>C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},C.createElement("defs",null,C.createElement("style",null,".a{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.2px !important;}")),C.createElement("path",{className:"a",d:"M.75 23.249l22.5-22.5M23.25 23.249L.75.749"})),Xw=e=>C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},C.createElement("defs",null,C.createElement("style",null,".checkmark-icon-fill{fill:currentColor;}")),C.createElement("path",{className:"checkmark-icon-fill",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})),cp=e=>C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},C.createElement("defs",null,C.createElement("style",null,".warning-icon-fill{fill:currentColor;}")),C.createElement("path",{className:"warning-icon-fill",d:"M23.25,23.235a.75.75,0,0,0,.661-1.105l-11.25-21a.782.782,0,0,0-1.322,0l-11.25,21A.75.75,0,0,0,.75,23.235ZM12,20.485a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,20.485Zm0-12.25a1,1,0,0,1,1,1V14.7a1,1,0,0,1-2,0V9.235A1,1,0,0,1,12,8.235Z"})),eL=({action:e,status:t})=>{if(t&&["true","false"].includes(t)){const n=JSON.parse(t);return{type:e,status:n?"success":"error",duration:3e3,autoHide:!!n}}return{}},tL=({status:e,billingOnly:t})=>{if(!t&&["success"].includes(e))return{type:"stripe:checkout",status:["success"].includes(e)?"success":"warning",duration:3e3,autoHide:!0};if(t&&["billing-portal-closed","billing-update-success","billing-update-cancel"].includes(e))return{type:"stripe:billing-update",status:e==="billing-update-cancel"?"warning":"success",duration:3e3,autoHide:!0,closeable:!0}},dp=(e=[])=>{const t=window.location.search||"",n=new URLSearchParams(t);e.forEach(i=>{n.delete(i)});const a=n.toString()?`?${n}`:"";window.history.replaceState({},"",`${window.location.pathname}${a}`)};function Qw({billingOnly:e=!1}={}){const t=window.location.search;if(!t)return null;const n=new URLSearchParams(t),a=n.get("action"),i=n.get("success"),r=n.get("stripe");let o=null;return r?tL({status:r,billingOnly:e}):a&&i&&!e?eL({action:a,status:i}):o}const nL=()=>({frame:{zIndex:"4000000",position:"fixed",top:"0",right:"0",maxWidth:"481px",width:"100%",height:"220px",animation:"250ms ease 0s 1 normal none running animation-bhegco",transition:"opacity 0.3s ease 0s",overflow:"hidden"}}),aL=({type:e,status:t,context:n})=>{const a=Rw({page:"signin",siteUrl:n.site.url}),i=Rw({page:"signup",siteUrl:n.site.url});if(e==="signin"&&t==="success"&&n.member){const r=n.member.firstname||"";return u.jsxs("p",{children:[u.jsx("strong",{children:r?v("Welcome back, {name}!",{name:r}):v("Welcome back!")}),u.jsx("br",{}),v("You've successfully signed in.")]})}else{if(e==="signin"&&t==="error")return u.jsxs("p",{children:[v("Could not sign in. Login link expired.")," ",u.jsx("br",{}),u.jsx("a",{href:a,target:"_parent",children:v("Click here to retry")})]});if(e==="signup"&&t==="success")return u.jsxs("p",{children:[v("You've successfully subscribed to")," ",u.jsx("br",{}),u.jsx("strong",{children:n.site.title})]});if(e==="signup-paid"&&t==="success")return u.jsxs("p",{children:[v("You've successfully subscribed to")," ",u.jsx("br",{}),u.jsx("strong",{children:n.site.title})]});if(e==="updateEmail"&&t==="success")return u.jsx("p",{children:v("Success! Your email is updated.")});if(e==="updateEmail"&&t==="error")return u.jsx("p",{children:v("Could not update email! Invalid link.")});if(e==="signup"&&t==="error")return u.jsxs("p",{children:[v("Signup error: Invalid link"),u.jsx("br",{}),u.jsx("a",{href:i,target:"_parent",children:v("Click here to retry")})]});if(e==="signup-paid"&&t==="error")return u.jsxs("p",{children:[v("Signup error: Invalid link"),u.jsx("br",{}),u.jsx("a",{href:i,target:"_parent",children:v("Click here to retry")})]});if(e==="stripe:checkout"&&t==="success")return n.member?u.jsx("p",{children:v("Success! Your account is fully activated, you now have access to all content.")}):u.jsx("p",{children:v("Success! Check your email for magic link to sign-in.")});if(e==="stripe:checkout"&&t==="warning")return n.member?u.jsx("p",{children:v("Plan upgrade was cancelled.")}):u.jsx("p",{children:v("Plan checkout was cancelled.")});if(e==="support"&&t==="success")return u.jsx("p",{children:v("Thank you for your support!")})}return u.jsx("p",{children:v(t==="success"?"Success":"Error")})},Kp=class Kp extends re.Component{constructor(){super(),this.state={className:""}}componentWillUnmount(){clearTimeout(this.timeoutId)}onNotificationClose(){this.props.onHideNotification()}componentDidUpdate(){const{showPopup:t}=this.context;!this.state.className&&t&&this.setState({className:"slideout"})}componentDidMount(){const{autoHide:t,duration:n=2400}=this.props,{showPopup:a}=this.context;a?this.setState({className:"slideout"}):t&&(this.timeoutId=setTimeout(()=>{this.setState({className:"slideout"})},n))}onAnimationEnd(t){(t.animationName==="notification-slideout"||t.animationName==="notification-slideout-mobile")&&this.props.onHideNotification(t)}render(){const{type:t,status:n}=this.props,{className:a=""}=this.state,i=n?` ${n}`:" neutral",r=a?` ${a}`:"";return u.jsx("div",{className:"gh-portal-notification-wrapper",children:u.jsxs("div",{className:`gh-portal-notification${i}${r}`,onAnimationEnd:o=>this.onAnimationEnd(o),children:[n==="error"?u.jsx(cp,{className:"gh-portal-notification-icon error",alt:""}):u.jsx(Xw,{className:"gh-portal-notification-icon success",alt:""}),u.jsx(aL,{type:t,status:n,context:this.context}),u.jsx(up,{className:"gh-portal-notification-closeicon",alt:"Close",onClick:o=>this.onNotificationClose(o)})]})})}};Kp.contextType=H;let mp=Kp;const qp=class qp extends re.Component{constructor(){super();const{type:t,status:n,autoHide:a,duration:i}=Qw()||{};this.state={active:!0,type:t,status:n,autoHide:a,duration:i,className:""}}componentDidMount(){const{showPopup:t}=this.context;t&&this.setState({active:!1})}onHideNotification(){const t=this.state.type,n=[];["signin","signup"].includes(t)?n.push("action","success"):["stripe:checkout"].includes(t)&&n.push("stripe"),dp(n),this.context.doAction("refreshMemberData"),this.setState({active:!1})}renderFrameStyles(){const{brandColor:t}=this.context,n=t?`:root { --brandcolor: ${t} }`+lp:lp;return u.jsx("style",{dangerouslySetInnerHTML:{__html:n}})}render(){const n={...nL({brandColor:this.context.brandColor}).frame};if(!this.state.active)return null;const{type:a,status:i,autoHide:r,duration:o}=this.state;return a&&i?u.jsx(Km,{style:n,title:"portal-notification",head:this.renderFrameStyles(),className:"gh-portal-notification-iframe","data-testid":"portal-notification-frame",children:u.jsx(mp,{type:a,status:i,autoHide:r,duration:o,onHideNotification:s=>this.onHideNotification(s)})}):null}};qp.contextType=H;let pp=qp;const Ii=e=>C.createElement("svg",{id:"loader-1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",width:"40px",height:"40px",viewBox:"0 0 40 40",enableBackground:"new 0 0 40 40",xmlSpace:"preserve",...e},C.createElement("path",{opacity:.2,fill:"#000",d:"M20.201,5.169c-8.254,0-14.946,6.692-14.946,14.946c0,8.255,6.692,14.946,14.946,14.946 s14.946-6.691,14.946-14.946C35.146,11.861,28.455,5.169,20.201,5.169z M20.201,31.749c-6.425,0-11.634-5.208-11.634-11.634 c0-6.425,5.209-11.634,11.634-11.634c6.425,0,11.633,5.209,11.633,11.634C31.834,26.541,26.626,31.749,20.201,31.749z"}),C.createElement("path",{fill:"#000",d:"M26.013,10.047l1.654-2.866c-2.198-1.272-4.743-2.012-7.466-2.012h0v3.312h0 C22.32,8.481,24.301,9.057,26.013,10.047z"},C.createElement("animateTransform",{attributeType:"xml",attributeName:"transform",type:"rotate",from:"0 20 20",to:"360 20 20",dur:"0.5s",repeatCount:"indefinite"}))),iL=`
|
|
4581
4581
|
.gh-portal-btn-main {
|
|
4582
4582
|
box-shadow: none;
|
|
4583
4583
|
position: relative;
|
|
@@ -4637,7 +4637,7 @@ Url: ${Gs(e)}`),!0)}function R0(e,t){return e.type||!t||!t.length?!1:B0(e).some(
|
|
|
4637
4637
|
.gh-portal-loadingicon.dark rect {
|
|
4638
4638
|
fill: var(--grey0);
|
|
4639
4639
|
}
|
|
4640
|
-
`,rL=({brandColor:e,disabled:t,style:n={},isPrimary:a})=>{let i=e||"#3eb0ef",r="1.0",o="auto";return t&&(r="0.5",o="none"),{button:{...a?{backgroundColor:i}:{},opacity:r,pointerEvents:o,...n||{}}}};function ze({label:e,onClick:t,disabled:n=!1,retry:a=!1,brandColor:i,isRunning:r,isPrimary:o=!0,isDestructive:s=!1,classes:l="",style:c={},tabIndex:m=void 0,dataTestId:f}){let p=rL({disabled:n,brandColor:i,style:c,isPrimary:o}),y="gh-portal-btn";o&&(y+=" gh-portal-btn-main gh-portal-btn-primary"),s&&(y+=" gh-portal-btn-destructive"),l&&(y+=" "+l),Ai()&&(n=!0);const k=o?"gh-portal-loadingicon":"gh-portal-loadingicon dark";return u.jsx("button",{className:y,style:p.button,onClick:
|
|
4640
|
+
`,rL=({brandColor:e,disabled:t,style:n={},isPrimary:a})=>{let i=e||"#3eb0ef",r="1.0",o="auto";return t&&(r="0.5",o="none"),{button:{...a?{backgroundColor:i}:{},opacity:r,pointerEvents:o,...n||{}}}};function ze({label:e,onClick:t,disabled:n=!1,retry:a=!1,brandColor:i,isRunning:r,isPrimary:o=!0,isDestructive:s=!1,classes:l="",style:c={},tabIndex:m=void 0,dataTestId:f}){let p=rL({disabled:n,brandColor:i,style:c,isPrimary:o}),y="gh-portal-btn";o&&(y+=" gh-portal-btn-main gh-portal-btn-primary"),s&&(y+=" gh-portal-btn-destructive"),l&&(y+=" "+l),Ai()&&(n=!0);const k=o?"gh-portal-loadingicon":"gh-portal-loadingicon dark";return u.jsx("button",{className:y,style:p.button,onClick:S=>t(S),disabled:n,type:"submit",tabIndex:m,"data-test-button":f,children:r?u.jsx(Ii,{className:k}):e})}const oL=e=>C.createElement("svg",{id:"Regular",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},C.createElement("defs",null,C.createElement("style",null,".cls-1{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px;fill-rule:evenodd;}")),C.createElement("path",{className:"cls-1",d:"M16.25,23.25,5.53,12.53a.749.749,0,0,1,0-1.06L16.25.75"})),sL=`
|
|
4641
4641
|
.gh-portal-btn-back,
|
|
4642
4642
|
.gh-portal-btn-back:hover {
|
|
4643
4643
|
box-shadow: none;
|
|
@@ -4760,8 +4760,8 @@ Url: ${Gs(e)}`),!0)}function R0(e,t){return e.type||!t||!t.length?!1:B0(e).some(
|
|
|
4760
4760
|
width: 38px !important;
|
|
4761
4761
|
height: 22px !important;
|
|
4762
4762
|
}
|
|
4763
|
-
`;function Dl({id:e,label:t="",onToggle:n,checked:a=!1,dataTestId:i="switch-input"}){const[r,o]=
|
|
4764
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var r=!0,o=!1,s;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return r=c.done,c},e:function(c){o=!0,s=c},f:function(){try{!r&&n.return!=null&&n.return()}finally{if(o)throw s}}}}function EL(e,t){if(e){if(typeof e=="string")return mx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mx(e,t)}}function mx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function SL(e,t){var n=[],a=xL(t),i;try{for(a.s();!(i=a.n()).done;)for(var r=i.value,o=r.type,s=r.regex,l;(l=s.exec(e))!==null;)n.push({type:o,string:l[0],name:l[1],start:l.index,end:l.index+l[0].length})}catch(y){a.e(y)}finally{a.f()}n.sort(function(y,k){return y.start-k.start});var c=[],m=0;n.forEach(function(y){if(y.start===m){m=y.end;return}var k=y.start,
|
|
4763
|
+
`;function Dl({id:e,label:t="",onToggle:n,checked:a=!1,dataTestId:i="switch-input"}){const[r,o]=C.useState(a);C.useEffect(()=>{o(a)},[a]);const s=C.useRef(null);return C.useEffect(()=>{s.current&&s.current.checked!==r&&(s.current.checked=r)},[r,e]),u.jsx("div",{className:"gh-portal-for-switch","data-test-switch":i,children:u.jsxs("label",{className:"switch",htmlFor:e,children:[u.jsx("input",{ref:s,type:"checkbox",checked:r,id:e,onChange:()=>{},"aria-label":t}),u.jsx("span",{className:"input-toggle-component",onClick:l=>{o(!r),n(l,!r)},"data-testid":i})]})})}const uL=".gh-portal-account-header{display:flex;flex-direction:column;align-items:center;margin:0 0 32px}.gh-portal-account-header .gh-portal-avatar{margin:6px 0 8px!important}.gh-portal-account-data{margin-bottom:40px}footer.gh-portal-account-footer{display:flex}.gh-portal-account-footer.paid{margin-top:12px}.gh-portal-account-footermenu{display:flex;align-items:center;list-style:none;padding:0;margin:0}.gh-portal-account-footerright{display:flex;flex-grow:1;align-items:center;justify-content:flex-end}.gh-portal-account-footermenu li{margin-inline-end:16px}.gh-portal-account-footermenu li:last-of-type{margin-inline-end:0}.gh-portal-freeaccount-newsletter{display:flex;align-items:center;justify-content:space-between;margin-top:24px}.gh-portal-freeaccount-newsletter .label{display:flex;flex-direction:column;flex-grow:1}.gh-portal-free-ctatext{margin-top:-12px}.gh-portal-cancelcontinue-container{margin:24px 0 32px}.gh-portal-list-detail .gh-portal-email-notice{display:flex;align-items:center;gap:5px;margin-top:6px;color:var(--red);font-weight:500;font-size:1.25rem;letter-spacing:.2px}.gh-portal-email-notice-icon{width:20px;height:20px}.gh-portal-billing-button-loader{width:32px;height:32px;margin-inline-end:-3px;opacity:.6}.gh-portal-product-icon{width:52px;margin-inline-end:12px;border-radius:2px}.gh-portal-account-discountcontainer{position:relative;display:flex;align-items:center}.gh-portal-account-old-price{text-decoration:line-through;color:var(--grey9)!important}.gh-portal-account-tagicon{width:16px;height:16px;color:var(--brandcolor);margin-inline-end:5px;z-index:999}@media (max-width: 390px){.gh-portal-account-footer{padding:0!important}}@media (max-width: 340px){.gh-portal-account-footer{padding:0!important;flex-wrap:wrap;gap:12px}.gh-portal-account-footer .gh-portal-account-footerright{justify-content:flex-start}}";let Oe=(Ri=class extends re.Component{constructor(){super(...arguments),this.closePopup=()=>{this.context.doAction("closePopup")}}render(){const{onClick:t}=this.props;return u.jsx("div",{className:"gh-portal-closeicon-container","data-test-button":"close-popup",children:u.jsx(up,{className:"gh-portal-closeicon",alt:"Close",onClick:t||this.closePopup,"data-testid":"close-popup"})})}},Ri.contextType=H,Ri);const ex=e=>C.createElement("svg",{width:15,height:14,viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},C.createElement("path",{d:"M1 6.89286L6.10714 12L13.9643 1",stroke:"#222222",strokeWidth:2}));function tx(e,t){if(isNaN(e)||isNaN(t))return 0;const n=e?100-Math.floor(t/12*100/e):0;return n>=1&&n<100?n:0}var nx={exports:{}},cL="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",dL=cL,mL=dL;function ax(){}function ix(){}ix.resetWarningCache=ax;var pL=function(){function e(a,i,r,o,s,l){if(l!==mL){var c=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 c.name="Invariant Violation",c}}e.isRequired=e;function t(){return 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:ix,resetWarningCache:ax};return n.PropTypes=n,n};nx.exports=pL();var hL=nx.exports;const hp=Bi(hL);function rx(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mo(e){"@babel/helpers - typeof";return mo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mo(e)}function fL(e,t){if(mo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(mo(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function gL(e){var t=fL(e,"string");return mo(t)=="symbol"?t:t+""}function yL(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,gL(a.key),a)}}function ox(e,t,n){return t&&yL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function bL(e,t){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.includes(a))continue;n[a]=e[a]}return n}function kL(e,t){if(e==null)return{};var n,a,i=bL(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var fp="TOKEN_PLACEHOLDER",Ol="TOKEN_OPEN_TAG",gp="TOKEN_CLOSE_TAG",yp="TOKEN_SELF_TAG",_l="TOKEN_TEXT",sx="NODE_FRAGMENT",lx="NODE_TAG_ELEMENT",ux="NODE_VOID_ELEMENT",cx="NODE_PLACEHOLDER",dx="NODE_TEXT",vL=["type","children"],lt=function(){function e(t){var n=t.type,a=t.children,i=kL(t,vL);rx(this,e),this.type=n,this.children=a||[];for(var r in i)this[r]=i[r];i.token&&(this.string=i.token.string)}return ox(e,[{key:"appendChild",value:function(n){this.children.push(n)}},{key:"isLeaf",get:function(){return this.children.length===0}}]),e}();lt.createTagNode=function(e,t){return new lt({type:lx,children:t,name:e.name,token:e})},lt.createFragmentNode=function(e){return new lt({type:sx,children:e})},lt.createVoidNode=function(e){return new lt({type:ux,name:e.name,token:e})},lt.createTextNode=function(e){return new lt({type:dx,text:e.string,token:e})},lt.createPlaceholderNode=function(e){return new lt({type:cx,name:e.name,token:e})};var wL=[{type:fp,regex:/{\s*(\w+)\s*}/g},{type:Ol,regex:/<(\w+)>/g},{type:gp,regex:/<\/(\w+)>/g},{type:yp,regex:/<(\w+)\s*\/>/g}];function xL(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=EL(e))||t){n&&(e=n);var a=0,i=function(){};return{s:i,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
4764
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var r=!0,o=!1,s;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return r=c.done,c},e:function(c){o=!0,s=c},f:function(){try{!r&&n.return!=null&&n.return()}finally{if(o)throw s}}}}function EL(e,t){if(e){if(typeof e=="string")return mx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mx(e,t)}}function mx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function SL(e,t){var n=[],a=xL(t),i;try{for(a.s();!(i=a.n()).done;)for(var r=i.value,o=r.type,s=r.regex,l;(l=s.exec(e))!==null;)n.push({type:o,string:l[0],name:l[1],start:l.index,end:l.index+l[0].length})}catch(y){a.e(y)}finally{a.f()}n.sort(function(y,k){return y.start-k.start});var c=[],m=0;n.forEach(function(y){if(y.start===m){m=y.end;return}var k=y.start,S=e.substring(m,k);c.push({type:_l,string:S,text:S,start:m,end:k}),m=y.end});var f=e.substring(m);f!==""&&c.push({type:_l,string:f,start:m,end:e.length});var p=[].concat(c,n).sort(function(y,k){return y.start-k.start});return p}function CL(e,t){t||(t=wL);var n=SL(e,t),a=new $L(n);return a.parse()}var po="Syntax error. Please check if each open tag is closed correctly",px={type:"EPSILON"},$L=function(){function e(t){rx(this,e),this.tokens=[].concat(t),this.tags=[]}return ox(e,[{key:"parse",value:function(){var n=this.document();if(!this.predict(px.type))throw new Error(po);return n}},{key:"document",value:function(){var n=this.elementOrData();return lt.createFragmentNode(n)}},{key:"element",value:function(){var n=this.openTag(),a=this.elementOrData();return this.endTag(),lt.createTagNode(n,a)}},{key:"openTag",value:function(){if(!this.predict(Ol))throw new Error(po);return this.pushTag(this.lookahead),this.match(Ol)}},{key:"elementOrData",value:function(){var n=[];if(this.predict(Ol)&&(n.push(this.element()),n=n.concat(this.elementOrData())),this.predict(yp,_l,fp)){var a=this.match(this.lookahead.type),i;switch(a.type){case yp:i=lt.createVoidNode(a);break;case _l:i=lt.createTextNode(a);break;case fp:i=lt.createPlaceholderNode(a);break}n.push(i),n=n.concat(this.elementOrData())}return n}},{key:"endTag",value:function(){if(!this.predict(gp))throw new Error(po);var n=this.tags.pop();if(n.name!==this.lookahead.name)throw new Error(po);this.match(gp)}},{key:"lookahead",get:function(){return this.tokens.length===0?px:this.tokens[0]}},{key:"predict",value:function(){for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return a.includes(this.lookahead.type)}},{key:"match",value:function(n){if(!this.predict(n))throw new Error(po);var a=this.tokens.shift();return a}},{key:"pushTag",value:function(n){this.tags.push(n)}}]),e}(),jL=function e(t,n,a){var i=t.children.map(function(l,c){return re.createElement(re.Fragment,{key:a+c},e(l,n,a))});switch(t.type){case dx:return t.text;case sx:return re.createElement(re.Fragment,null,i);case ux:{var r=n[t.name];return typeof r=="function"?r():r||re.createElement(t.name,null)}case lx:{var o=n[t.name];if(o===void 0)return re.createElement(t.name,null,i);if(typeof o=="function")return o(i);if(re.isValidElement(o)){if(re.Children.count(o.props.children)!==0)throw new Error("when passing an element as value, the element should not contains children");return re.cloneElement(o,{children:i})}throw new Error('Invalid mapping value for "'.concat(t.name,'". Only element or render function are accepted'))}case cx:{var s=n[t.name];return s===void 0?(console.warn('missing "'.concat(t.name,'" in mapping')),t.string):typeof s=="function"?s():s}default:return}};function ut(e){var t=e.string,n=e.syntax,a=e.mapping,i=a===void 0?{}:a,r=e.graceful,o=r===void 0?!0:r;try{var s=CL(t,n);return jL(s,i,t)}catch(l){if(o)return console.error(l),t;throw l}}ut.propTypes={string:hp.string.isRequired,mapping:hp.object,graceful:hp.bool};const TL=()=>`
|
|
4765
4765
|
.gh-portal-products {
|
|
4766
4766
|
display: flex;
|
|
4767
4767
|
flex-direction: column;
|
|
@@ -5278,7 +5278,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
5278
5278
|
min-height: unset;
|
|
5279
5279
|
}
|
|
5280
5280
|
}
|
|
5281
|
-
`,Fi=re.createContext({selectedInterval:"month",selectedProduct:"free",selectedPlan:null,setSelectedProduct:null});function PL({product:e}){return!e.benefits||!e.benefits.length?null:e.benefits.map((t,n)=>{const a=(t==null?void 0:t.id)||`benefit-${n}`;return u.jsxs("div",{className:"gh-portal-product-benefit",children:[u.jsx(ex,{className:"gh-portal-benefit-checkmark",alt:""}),u.jsx("div",{className:"gh-portal-benefit-title",children:t.name})]},a)})}function bp({product:e,hide:t=!1}){return!e.benefits||!e.benefits.length||t?null:u.jsx("div",{className:"gh-portal-product-benefits",children:u.jsx(PL,{product:e})})}function hx({price:e}){const{site:t}=S.useContext(H),{portal_plans:n}=t;return!n.includes("monthly")||!n.includes("yearly")?u.jsx("div",{className:"gh-portal-product-alternative-price"}):u.jsx("div",{className:"gh-portal-product-alternative-price",children:BU(e)})}function zL({trialDays:e,discount:t,selectedInterval:n}){const{site:a}=S.useContext(H);return Nl({site:a})?e?u.jsx("span",{className:"gh-portal-discount-label",children:v("{trialDays} days free",{trialDays:e})}):null:n==="year"?u.jsx("span",{className:"gh-portal-discount-label",children:v("{discount}% discount",{discount:t})}):null}function fx({product:e}){const{selectedInterval:t}=S.useContext(Fi),{site:n}=S.useContext(H),a=e.monthlyPrice,i=e.yearlyPrice,r=e.trial_days,o=t==="month"?a:i,s=t==="month"?i:a,l=o.interval==="year"?v("year"):v("month");if(!a||!i)return null;const c=tx(e.monthlyPrice.amount,e.yearlyPrice.amount),m=De(o.currency);return Nl({site:n})?u.jsx(u.Fragment,{children:u.jsxs("div",{className:"gh-portal-product-card-pricecontainer",children:[u.jsxs("div",{className:"gh-portal-product-card-price-trial",children:[u.jsxs("div",{className:"gh-portal-product-price",children:[u.jsx("span",{className:"currency-sign"+(m.length>1?" long":""),children:m}),u.jsx("span",{className:"amount","data-testid":"product-amount",children:ta(rp(o.amount))}),u.jsxs("span",{className:"billing-period",children:["/",l]})]}),u.jsx(zL,{trialDays:r,discount:c,selectedInterval:t})]}),t==="year"?u.jsx(gx,{discount:c,trialDays:r}):"",u.jsx(hx,{price:s})]})}):u.jsxs("div",{className:"gh-portal-product-card-pricecontainer",children:[u.jsxs("div",{className:"gh-portal-product-card-price-trial",children:[u.jsxs("div",{className:"gh-portal-product-price",children:[u.jsx("span",{className:"currency-sign"+(m.length>1?" long":""),children:m}),u.jsx("span",{className:"amount","data-testid":"product-amount",children:ta(rp(o.amount))}),u.jsxs("span",{className:"billing-period",children:["/",l]})]}),t==="year"?u.jsx(gx,{discount:c}):""]}),u.jsx(hx,{price:s})]})}function AL({products:e,handleChooseSignup:t,error:n}){const{site:a,action:i}=S.useContext(H),{selectedProduct:r,setSelectedProduct:o}=S.useContext(Fi);let s=r==="free"?"gh-portal-product-card free checked":"gh-portal-product-card free";const l=Ta({site:a});let c=MU({site:a}),m=i==="signup:running";Ai()&&(m=!0);let f="$";e&&e[1]?f=De(e[1].monthlyPrice.currency):f="$";const p=Hw({site:a}),y=IU({site:a});if(p){if(!c&&!y.length)return null;s+=" only-free"}return!c&&!y.length&&(c="Free preview"),u.jsx(u.Fragment,{children:u.jsxs("div",{className:s,onClick:k=>{k.stopPropagation(),o("free")},"data-test-tier":"free",children:[u.jsxs("div",{className:"gh-portal-product-card-header",children:[u.jsx("h4",{className:"gh-portal-product-name",children:Bw({site:a})}),p?"":u.jsx("div",{className:"gh-portal-product-card-pricecontainer free-trial-disabled",children:u.jsxs("div",{className:"gh-portal-product-price",children:[u.jsx("span",{className:"currency-sign"+(f.length>1?" long":""),children:f}),u.jsx("span",{className:"amount","data-testid":"product-amount",children:"0"})]})})]}),u.jsxs("div",{className:"gh-portal-product-card-details",children:[u.jsxs("div",{className:"gh-portal-product-card-detaildata",children:[c?u.jsx("div",{className:"gh-portal-product-description","data-testid":"product-description",children:c}):"",u.jsx(bp,{product:l})]}),p?"":u.jsxs("div",{className:"gh-portal-btn-product",children:[u.jsx("button",{"data-test-button":"select-tier",className:"gh-portal-btn",disabled:m,onClick:k=>{t(k,"free")},children:r==="free"&&m?u.jsx(Ii,{className:"gh-portal-loadingicon"}):v("Choose")}),n&&u.jsx("div",{className:"gh-portal-error-message",children:n})]})]})]})})}function NL({selectedProduct:e,product:t,disabled:n,noOfProducts:a,trialDays:i}){return e===t.id&&n?u.jsx(Ii,{className:"gh-portal-loadingicon"}):i>0?u.jsx(ut,{string:v("Start {amount}-day free trial"),mapping:{amount:i}}):a>1?v("Choose"):v("Continue")}function IL({product:e,products:t,selectedInterval:n,handleChooseSignup:a,error:i}){var y;const{selectedProduct:r,setSelectedProduct:o}=S.useContext(Fi),{action:s}=S.useContext(H),l=e.trial_days,c=r===e.id?"gh-portal-product-card checked":"gh-portal-product-card",m=(y=t==null?void 0:t.filter(k=>k.type==="paid"))==null?void 0:y.length;let f=!!["signup:running","checkoutPlan:running"].includes(s);Ai()&&(f=!0);let p=e.description;return(!e.benefits||!e.benefits.length)&&!p&&(p="Full access"),u.jsx(u.Fragment,{children:u.jsxs("div",{className:c,onClick:k=>{k.stopPropagation(),o(e.id)},"data-test-tier":"paid",children:[u.jsxs("div",{className:"gh-portal-product-card-header",children:[u.jsx("h4",{className:"gh-portal-product-name",children:e.name}),u.jsx(fx,{product:e})]}),u.jsxs("div",{className:"gh-portal-product-card-details",children:[u.jsxs("div",{className:"gh-portal-product-card-detaildata",children:[u.jsx("div",{className:"gh-portal-product-description","data-testid":"product-description",children:p}),u.jsx(bp,{product:e})]}),u.jsxs("div",{className:"gh-portal-btn-product",children:[u.jsx("button",{"data-test-button":"select-tier",disabled:f,className:"gh-portal-btn",onClick:k=>{const j=kp({products:t,selectedInterval:n,selectedProduct:e.id});a(k,j.id)},children:u.jsx(NL,{selectedProduct:r,product:e,disabled:f,noOfProducts:m,trialDays:l})}),i&&u.jsx("div",{className:"gh-portal-error-message",children:i})]})]})]},e.id)})}function ML({product:e,products:t,selectedInterval:n,errors:a}){const i=kp({products:t,selectedInterval:n,selectedProduct:e.id});return i&&i.id&&a&&a[i.id]?a[i.id]:null}function FL({products:e,selectedInterval:t,handleChooseSignup:n,errors:a}){return e.map(i=>{const r=ML({product:i,products:e,selectedInterval:t,errors:a});return i.id==="free"?u.jsx(AL,{products:e,handleChooseSignup:n,error:r},i.id):u.jsx(IL,{products:e,product:i,selectedInterval:t,handleChooseSignup:n,error:r},i.id)})}function gx({discount:e}){const{site:t}=S.useContext(H),{portal_plans:n}=t;return e===0||!n.includes("monthly")?null:Nl({site:t})?u.jsx(u.Fragment,{children:u.jsx("span",{className:"gh-portal-discount-label-trial",children:v("{discount}% discount",{discount:e})})}):u.jsx(u.Fragment,{children:u.jsx("span",{className:"gh-portal-discount-label",children:v("{discount}% discount",{discount:e})})})}function yx({selectedInterval:e,setSelectedInterval:t,products:n}){const{site:a}=S.useContext(H),{portal_plans:i}=a,o=n.filter(l=>l.type!=="free").map(l=>{var c,m;return tx((c=l.monthlyPrice)==null?void 0:c.amount,(m=l.yearlyPrice)==null?void 0:m.amount)}),s=Math.max(...o);return!i.includes("monthly")||!i.includes("yearly")?null:u.jsx("div",{className:"gh-portal-logged-out-form-container",children:u.jsxs("div",{className:"gh-portal-products-pricetoggle"+(e==="month"?" left":""),children:[u.jsx("button",{"data-test-button":"switch-monthly","data-testid":"monthly-switch",className:"gh-portal-btn"+(e==="month"?" active":""),onClick:()=>{t("month")},children:v("Monthly")}),u.jsxs("button",{"data-test-button":"switch-yearly","data-testid":"yearly-switch",className:"gh-portal-btn"+(e==="year"?" active":""),onClick:()=>{t("year")},children:[v("Yearly"),s>0&&u.jsx("span",{className:"gh-portal-maximum-discount",children:v("(save {highestYearlyDiscount}%)",{highestYearlyDiscount:s})})]})]})})}function kp({products:e,selectedProduct:t,selectedInterval:n}){let a=null;if(t==="free")a={id:"free"};else{let i=e.find(r=>r.id===t);i||(i=e.find(r=>r.type==="paid")),a=n==="month"?i==null?void 0:i.monthlyPrice:i==null?void 0:i.yearlyPrice}return a}function vp({portalPlans:e,portalDefaultPlan:t,selectedInterval:n}){if(n==="month"&&e.includes("monthly"))return"month";if(n==="year"&&e.includes("yearly"))return"year";if(t&&t==="monthly"&&e.includes("monthly"))return"month";if(e.includes("yearly"))return"year";if(e.includes("monthly"))return"month"}function bx({onPlanSelect:e,products:t,type:n=null,handleChooseSignup:a,errors:i}){var $,F;const{site:r,member:o}=S.useContext(H),{portal_plans:s,portal_default_plan:l}=r,c=t.length>0?t[0].id:"free",[m,f]=S.useState(null),[p,y]=S.useState(c),k=kp({products:t,selectedInterval:m,selectedProduct:p}),j=vp({portalPlans:s,portalDefaultPlan:l,selectedInterval:m}),b=Qn({member:o}),w=Hw({site:r});if(S.useEffect(()=>{y(c)},[c]),S.useEffect(()=>{e(null,k.id)},[k.id,e]),t.length===0)if(b){const z=uo({site:r});return u.jsx("p",{style:{textAlign:"center"},children:v("Please contact {supportAddress} to adjust your complimentary subscription.",{supportAddress:z})})}else return null;let E="gh-portal-products";n==="upgrade"&&(E+=" gh-portal-upgrade-product");let P=(($=t.find(z=>z.id===p))==null?void 0:$.id)||((F=t.find(z=>z.type==="paid"))==null?void 0:F.id);return u.jsx(Fi.Provider,{value:{selectedInterval:j,selectedProduct:P,setSelectedProduct:y},children:u.jsxs("section",{className:E,children:[w?"":u.jsx(yx,{products:t,selectedInterval:j,setSelectedInterval:f}),u.jsx("div",{className:"gh-portal-products-grid",children:u.jsx(FL,{products:t,selectedInterval:j,handleChooseSignup:a,errors:i})})]})})}function DL({onPlanSelect:e,selectedPlan:t,products:n,type:a=null}){var w;const{site:i,member:r}=S.useContext(H),{portal_plans:o}=i,s=ja({member:r}),l=Ww({site:i,priceId:s.id}),c=vp({portalPlans:o,selectedInterval:s.interval}),m=(l==null?void 0:l.id)||((w=n==null?void 0:n[0])==null?void 0:w.id),[f,p]=S.useState(c),[y,k]=S.useState(m),j=vp({portalPlans:o,selectedInterval:f});if(S.useEffect(()=>{k(m)},[m]),!o.includes("monthly")&&!o.includes("yearly")||n.length===0)return null;let b="gh-portal-products";return a==="upgrade"&&(b+=" gh-portal-upgrade-product"),a==="changePlan"&&(b+=" gh-portal-upgrade-product gh-portal-change-plan"),u.jsx(Fi.Provider,{value:{selectedInterval:j,selectedProduct:y,selectedPlan:t,setSelectedProduct:k},children:u.jsxs("section",{className:b,children:[u.jsx(yx,{selectedInterval:j,setSelectedInterval:p,products:n}),u.jsx("div",{className:"gh-portal-products-grid",children:u.jsx(RL,{products:n,onPlanSelect:e})})]})})}function OL({product:e}){return e!=null&&e.description?u.jsx("div",{className:"gh-portal-product-description","data-testid":"product-description",children:e.description}):null}function _L({product:e,onPlanSelect:t}){const{member:n,site:a}=S.useContext(H),{selectedProduct:i,setSelectedProduct:r,selectedInterval:o}=S.useContext(Fi),s=i===e.id?"gh-portal-product-card checked":"gh-portal-product-card",l=e.monthlyPrice,c=e.yearlyPrice,m=ja({member:n}),f=o==="month"?l:c,p=$U({member:n,site:a,priceId:f.id});return u.jsxs("div",{className:s+(p?" disabled":""),onClick:y=>{y.stopPropagation(),r(e.id)},"data-test-tier":"paid",children:[u.jsxs("div",{className:"gh-portal-product-card-header",children:[u.jsx("h4",{className:"gh-portal-product-name",children:e.name}),u.jsx(fx,{product:e})]}),u.jsxs("div",{className:"gh-portal-product-card-details",children:[u.jsxs("div",{className:"gh-portal-product-card-detaildata",children:[e.description?u.jsx(OL,{product:e,selectedPrice:f,activePrice:m}):"",u.jsx(bp,{product:e})]}),p?u.jsx("div",{className:"gh-portal-btn-product",children:u.jsx("span",{className:"gh-portal-current-plan",children:u.jsx("span",{children:v("Current plan")})})}):u.jsx("div",{className:"gh-portal-btn-product",children:u.jsx("button",{"data-test-button":"select-tier",className:"gh-portal-btn",onClick:()=>{t(null,f==null?void 0:f.id)},children:v("Choose")})})]})]},e.id)}function RL({products:e,onPlanSelect:t}){return e.map(n=>!n||n.id==="free"?null:u.jsx(_L,{product:n,onPlanSelect:t},n.id))}function UL({products:e,selectedPlan:t,onPlanSelect:n,onPlanCheckout:a,changePlan:i=!1}){return Ai()&&(n=()=>{}),i?u.jsx("section",{className:"gh-portal-plans",children:u.jsx("div",{children:u.jsx(DL,{type:"changePlan",products:e,selectedPlan:t,onPlanSelect:n})})}):u.jsx("section",{className:"gh-portal-plans",children:u.jsx("div",{children:u.jsx(bx,{type:"upgrade",products:e,onPlanSelect:n,handleChooseSignup:(...o)=>{a(...o)}})})})}const LL=`
|
|
5281
|
+
`,Fi=re.createContext({selectedInterval:"month",selectedProduct:"free",selectedPlan:null,setSelectedProduct:null});function PL({product:e}){return!e.benefits||!e.benefits.length?null:e.benefits.map((t,n)=>{const a=(t==null?void 0:t.id)||`benefit-${n}`;return u.jsxs("div",{className:"gh-portal-product-benefit",children:[u.jsx(ex,{className:"gh-portal-benefit-checkmark",alt:""}),u.jsx("div",{className:"gh-portal-benefit-title",children:t.name})]},a)})}function bp({product:e,hide:t=!1}){return!e.benefits||!e.benefits.length||t?null:u.jsx("div",{className:"gh-portal-product-benefits",children:u.jsx(PL,{product:e})})}function hx({price:e}){const{site:t}=C.useContext(H),{portal_plans:n}=t;return!n.includes("monthly")||!n.includes("yearly")?u.jsx("div",{className:"gh-portal-product-alternative-price"}):u.jsx("div",{className:"gh-portal-product-alternative-price",children:BU(e)})}function zL({trialDays:e,discount:t,selectedInterval:n}){const{site:a}=C.useContext(H);return Nl({site:a})?e?u.jsx("span",{className:"gh-portal-discount-label",children:v("{trialDays} days free",{trialDays:e})}):null:n==="year"?u.jsx("span",{className:"gh-portal-discount-label",children:v("{discount}% discount",{discount:t})}):null}function fx({product:e}){const{selectedInterval:t}=C.useContext(Fi),{site:n}=C.useContext(H),a=e.monthlyPrice,i=e.yearlyPrice,r=e.trial_days,o=t==="month"?a:i,s=t==="month"?i:a,l=o.interval==="year"?v("year"):v("month");if(!a||!i)return null;const c=tx(e.monthlyPrice.amount,e.yearlyPrice.amount),m=De(o.currency);return Nl({site:n})?u.jsx(u.Fragment,{children:u.jsxs("div",{className:"gh-portal-product-card-pricecontainer",children:[u.jsxs("div",{className:"gh-portal-product-card-price-trial",children:[u.jsxs("div",{className:"gh-portal-product-price",children:[u.jsx("span",{className:"currency-sign"+(m.length>1?" long":""),children:m}),u.jsx("span",{className:"amount","data-testid":"product-amount",children:ta(rp(o.amount))}),u.jsxs("span",{className:"billing-period",children:["/",l]})]}),u.jsx(zL,{trialDays:r,discount:c,selectedInterval:t})]}),t==="year"?u.jsx(gx,{discount:c,trialDays:r}):"",u.jsx(hx,{price:s})]})}):u.jsxs("div",{className:"gh-portal-product-card-pricecontainer",children:[u.jsxs("div",{className:"gh-portal-product-card-price-trial",children:[u.jsxs("div",{className:"gh-portal-product-price",children:[u.jsx("span",{className:"currency-sign"+(m.length>1?" long":""),children:m}),u.jsx("span",{className:"amount","data-testid":"product-amount",children:ta(rp(o.amount))}),u.jsxs("span",{className:"billing-period",children:["/",l]})]}),t==="year"?u.jsx(gx,{discount:c}):""]}),u.jsx(hx,{price:s})]})}function AL({products:e,handleChooseSignup:t,error:n}){const{site:a,action:i}=C.useContext(H),{selectedProduct:r,setSelectedProduct:o}=C.useContext(Fi);let s=r==="free"?"gh-portal-product-card free checked":"gh-portal-product-card free";const l=Ta({site:a});let c=MU({site:a}),m=i==="signup:running";Ai()&&(m=!0);let f="$";e&&e[1]?f=De(e[1].monthlyPrice.currency):f="$";const p=Hw({site:a}),y=IU({site:a});if(p){if(!c&&!y.length)return null;s+=" only-free"}return!c&&!y.length&&(c="Free preview"),u.jsx(u.Fragment,{children:u.jsxs("div",{className:s,onClick:k=>{k.stopPropagation(),o("free")},"data-test-tier":"free",children:[u.jsxs("div",{className:"gh-portal-product-card-header",children:[u.jsx("h4",{className:"gh-portal-product-name",children:Bw({site:a})}),p?"":u.jsx("div",{className:"gh-portal-product-card-pricecontainer free-trial-disabled",children:u.jsxs("div",{className:"gh-portal-product-price",children:[u.jsx("span",{className:"currency-sign"+(f.length>1?" long":""),children:f}),u.jsx("span",{className:"amount","data-testid":"product-amount",children:"0"})]})})]}),u.jsxs("div",{className:"gh-portal-product-card-details",children:[u.jsxs("div",{className:"gh-portal-product-card-detaildata",children:[c?u.jsx("div",{className:"gh-portal-product-description","data-testid":"product-description",children:c}):"",u.jsx(bp,{product:l})]}),p?"":u.jsxs("div",{className:"gh-portal-btn-product",children:[u.jsx("button",{"data-test-button":"select-tier",className:"gh-portal-btn",disabled:m,onClick:k=>{t(k,"free")},children:r==="free"&&m?u.jsx(Ii,{className:"gh-portal-loadingicon"}):v("Choose")}),n&&u.jsx("div",{className:"gh-portal-error-message",children:n})]})]})]})})}function NL({selectedProduct:e,product:t,disabled:n,noOfProducts:a,trialDays:i}){return e===t.id&&n?u.jsx(Ii,{className:"gh-portal-loadingicon"}):i>0?u.jsx(ut,{string:v("Start {amount}-day free trial"),mapping:{amount:i}}):a>1?v("Choose"):v("Continue")}function IL({product:e,products:t,selectedInterval:n,handleChooseSignup:a,error:i}){var y;const{selectedProduct:r,setSelectedProduct:o}=C.useContext(Fi),{action:s}=C.useContext(H),l=e.trial_days,c=r===e.id?"gh-portal-product-card checked":"gh-portal-product-card",m=(y=t==null?void 0:t.filter(k=>k.type==="paid"))==null?void 0:y.length;let f=!!["signup:running","checkoutPlan:running"].includes(s);Ai()&&(f=!0);let p=e.description;return(!e.benefits||!e.benefits.length)&&!p&&(p="Full access"),u.jsx(u.Fragment,{children:u.jsxs("div",{className:c,onClick:k=>{k.stopPropagation(),o(e.id)},"data-test-tier":"paid",children:[u.jsxs("div",{className:"gh-portal-product-card-header",children:[u.jsx("h4",{className:"gh-portal-product-name",children:e.name}),u.jsx(fx,{product:e})]}),u.jsxs("div",{className:"gh-portal-product-card-details",children:[u.jsxs("div",{className:"gh-portal-product-card-detaildata",children:[u.jsx("div",{className:"gh-portal-product-description","data-testid":"product-description",children:p}),u.jsx(bp,{product:e})]}),u.jsxs("div",{className:"gh-portal-btn-product",children:[u.jsx("button",{"data-test-button":"select-tier",disabled:f,className:"gh-portal-btn",onClick:k=>{const S=kp({products:t,selectedInterval:n,selectedProduct:e.id});a(k,S.id)},children:u.jsx(NL,{selectedProduct:r,product:e,disabled:f,noOfProducts:m,trialDays:l})}),i&&u.jsx("div",{className:"gh-portal-error-message",children:i})]})]})]},e.id)})}function ML({product:e,products:t,selectedInterval:n,errors:a}){const i=kp({products:t,selectedInterval:n,selectedProduct:e.id});return i&&i.id&&a&&a[i.id]?a[i.id]:null}function FL({products:e,selectedInterval:t,handleChooseSignup:n,errors:a}){return e.map(i=>{const r=ML({product:i,products:e,selectedInterval:t,errors:a});return i.id==="free"?u.jsx(AL,{products:e,handleChooseSignup:n,error:r},i.id):u.jsx(IL,{products:e,product:i,selectedInterval:t,handleChooseSignup:n,error:r},i.id)})}function gx({discount:e}){const{site:t}=C.useContext(H),{portal_plans:n}=t;return e===0||!n.includes("monthly")?null:Nl({site:t})?u.jsx(u.Fragment,{children:u.jsx("span",{className:"gh-portal-discount-label-trial",children:v("{discount}% discount",{discount:e})})}):u.jsx(u.Fragment,{children:u.jsx("span",{className:"gh-portal-discount-label",children:v("{discount}% discount",{discount:e})})})}function yx({selectedInterval:e,setSelectedInterval:t,products:n}){const{site:a}=C.useContext(H),{portal_plans:i}=a,o=n.filter(l=>l.type!=="free").map(l=>{var c,m;return tx((c=l.monthlyPrice)==null?void 0:c.amount,(m=l.yearlyPrice)==null?void 0:m.amount)}),s=Math.max(...o);return!i.includes("monthly")||!i.includes("yearly")?null:u.jsx("div",{className:"gh-portal-logged-out-form-container",children:u.jsxs("div",{className:"gh-portal-products-pricetoggle"+(e==="month"?" left":""),children:[u.jsx("button",{"data-test-button":"switch-monthly","data-testid":"monthly-switch",className:"gh-portal-btn"+(e==="month"?" active":""),onClick:()=>{t("month")},children:v("Monthly")}),u.jsxs("button",{"data-test-button":"switch-yearly","data-testid":"yearly-switch",className:"gh-portal-btn"+(e==="year"?" active":""),onClick:()=>{t("year")},children:[v("Yearly"),s>0&&u.jsx("span",{className:"gh-portal-maximum-discount",children:v("(save {highestYearlyDiscount}%)",{highestYearlyDiscount:s})})]})]})})}function kp({products:e,selectedProduct:t,selectedInterval:n}){let a=null;if(t==="free")a={id:"free"};else{let i=e.find(r=>r.id===t);i||(i=e.find(r=>r.type==="paid")),a=n==="month"?i==null?void 0:i.monthlyPrice:i==null?void 0:i.yearlyPrice}return a}function vp({portalPlans:e,portalDefaultPlan:t,selectedInterval:n}){if(n==="month"&&e.includes("monthly"))return"month";if(n==="year"&&e.includes("yearly"))return"year";if(t&&t==="monthly"&&e.includes("monthly"))return"month";if(e.includes("yearly"))return"year";if(e.includes("monthly"))return"month"}function bx({onPlanSelect:e,products:t,type:n=null,handleChooseSignup:a,errors:i}){var j,F;const{site:r,member:o}=C.useContext(H),{portal_plans:s,portal_default_plan:l}=r,c=t.length>0?t[0].id:"free",[m,f]=C.useState(null),[p,y]=C.useState(c),k=kp({products:t,selectedInterval:m,selectedProduct:p}),S=vp({portalPlans:s,portalDefaultPlan:l,selectedInterval:m}),b=Qn({member:o}),w=Hw({site:r});if(C.useEffect(()=>{y(c)},[c]),C.useEffect(()=>{e(null,k.id)},[k.id,e]),t.length===0)if(b){const z=uo({site:r});return u.jsx("p",{style:{textAlign:"center"},children:v("Please contact {supportAddress} to adjust your complimentary subscription.",{supportAddress:z})})}else return null;let E="gh-portal-products";n==="upgrade"&&(E+=" gh-portal-upgrade-product");let P=((j=t.find(z=>z.id===p))==null?void 0:j.id)||((F=t.find(z=>z.type==="paid"))==null?void 0:F.id);return u.jsx(Fi.Provider,{value:{selectedInterval:S,selectedProduct:P,setSelectedProduct:y},children:u.jsxs("section",{className:E,children:[w?"":u.jsx(yx,{products:t,selectedInterval:S,setSelectedInterval:f}),u.jsx("div",{className:"gh-portal-products-grid",children:u.jsx(FL,{products:t,selectedInterval:S,handleChooseSignup:a,errors:i})})]})})}function DL({onPlanSelect:e,selectedPlan:t,products:n,type:a=null}){var w;const{site:i,member:r}=C.useContext(H),{portal_plans:o}=i,s=ja({member:r}),l=Ww({site:i,priceId:s.id}),c=vp({portalPlans:o,selectedInterval:s.interval}),m=(l==null?void 0:l.id)||((w=n==null?void 0:n[0])==null?void 0:w.id),[f,p]=C.useState(c),[y,k]=C.useState(m),S=vp({portalPlans:o,selectedInterval:f});if(C.useEffect(()=>{k(m)},[m]),!o.includes("monthly")&&!o.includes("yearly")||n.length===0)return null;let b="gh-portal-products";return a==="upgrade"&&(b+=" gh-portal-upgrade-product"),a==="changePlan"&&(b+=" gh-portal-upgrade-product gh-portal-change-plan"),u.jsx(Fi.Provider,{value:{selectedInterval:S,selectedProduct:y,selectedPlan:t,setSelectedProduct:k},children:u.jsxs("section",{className:b,children:[u.jsx(yx,{selectedInterval:S,setSelectedInterval:p,products:n}),u.jsx("div",{className:"gh-portal-products-grid",children:u.jsx(RL,{products:n,onPlanSelect:e})})]})})}function OL({product:e}){return e!=null&&e.description?u.jsx("div",{className:"gh-portal-product-description","data-testid":"product-description",children:e.description}):null}function _L({product:e,onPlanSelect:t}){const{member:n,site:a}=C.useContext(H),{selectedProduct:i,setSelectedProduct:r,selectedInterval:o}=C.useContext(Fi),s=i===e.id?"gh-portal-product-card checked":"gh-portal-product-card",l=e.monthlyPrice,c=e.yearlyPrice,m=ja({member:n}),f=o==="month"?l:c,p=$U({member:n,site:a,priceId:f.id});return u.jsxs("div",{className:s+(p?" disabled":""),onClick:y=>{y.stopPropagation(),r(e.id)},"data-test-tier":"paid",children:[u.jsxs("div",{className:"gh-portal-product-card-header",children:[u.jsx("h4",{className:"gh-portal-product-name",children:e.name}),u.jsx(fx,{product:e})]}),u.jsxs("div",{className:"gh-portal-product-card-details",children:[u.jsxs("div",{className:"gh-portal-product-card-detaildata",children:[e.description?u.jsx(OL,{product:e,selectedPrice:f,activePrice:m}):"",u.jsx(bp,{product:e})]}),p?u.jsx("div",{className:"gh-portal-btn-product",children:u.jsx("span",{className:"gh-portal-current-plan",children:u.jsx("span",{children:v("Current plan")})})}):u.jsx("div",{className:"gh-portal-btn-product",children:u.jsx("button",{"data-test-button":"select-tier",className:"gh-portal-btn",onClick:()=>{t(null,f==null?void 0:f.id)},children:v("Choose")})})]})]},e.id)}function RL({products:e,onPlanSelect:t}){return e.map(n=>!n||n.id==="free"?null:u.jsx(_L,{product:n,onPlanSelect:t},n.id))}function UL({products:e,selectedPlan:t,onPlanSelect:n,onPlanCheckout:a,changePlan:i=!1}){return Ai()&&(n=()=>{}),i?u.jsx("section",{className:"gh-portal-plans",children:u.jsx("div",{children:u.jsx(DL,{type:"changePlan",products:e,selectedPlan:t,onPlanSelect:n})})}):u.jsx("section",{className:"gh-portal-plans",children:u.jsx("div",{children:u.jsx(bx,{type:"upgrade",products:e,onPlanSelect:n,handleChooseSignup:(...o)=>{a(...o)}})})})}const LL=`
|
|
5282
5282
|
.account-plan.full-size .gh-portal-main-title {
|
|
5283
5283
|
font-size: 3.2rem;
|
|
5284
5284
|
margin-top: 44px;
|
|
@@ -5318,7 +5318,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
5318
5318
|
.gh-portal-retention-offer-price .gh-portal-offer-oldprice {
|
|
5319
5319
|
margin: 4px 0 0;
|
|
5320
5320
|
}
|
|
5321
|
-
`;function YL({confirmationType:e}){if(e==="changePlan")return v("Confirm subscription");if(e==="cancel")return v("Cancel subscription");if(e==="subscribe")return v("Subscribe");if(e==="offerRetention")return"Before you go"}const BL=({showConfirmation:e,confirmationType:t})=>{const{member:n}=S.useContext(H);let a=rn({member:n})?v("Change plan"):v("Choose a plan");return e&&(a=YL({confirmationType:t})),u.jsx("header",{className:"gh-portal-detail-header",children:u.jsx("h3",{className:"gh-portal-main-title",children:a})})},VL=({member:e,onCancelSubscription:t,action:n,brandColor:a})=>{const{site:i}=S.useContext(H);if(!e.paid)return null;const r=Ft({member:e});if(!r||r.cancel_at_period_end)return null;const o=v("Cancel subscription"),s=["cancelSubscription:running"].includes(n),l=!!s,c=!!r.cancel_at_period_end,m=!r.cancelAtPeriodEnd;return u.jsx("div",{className:"gh-portal-expire-container",children:u.jsx(ze,{dataTestId:"cancel-subscription",onClick:()=>{t({subscriptionId:r.id,cancelAtPeriodEnd:!0})},isRunning:s,disabled:l,isPrimary:c,isDestructive:m,classes:jl({site:i})?"gh-portal-btn-text mt2 mb4":"",brandColor:a,label:o,style:{width:"100%"}})})},HL=({plan:e,type:t,onConfirm:n})=>{const{site:a,action:i,member:r,brandColor:o}=S.useContext(H),[s,l]=S.useState(""),c=Ft({member:r}),m=["updateSubscription:running","checkoutPlan:running","cancelSubscription:running"].includes(i),f=v("Confirm"),p=En(c.current_period_end),y=ja({member:r});let k=v("Starting {startDate}",{startDate:p});y.id!==e.id&&(k=v("Starting today"));const j=ta(e.price),b=`${e.currency_symbol}${j}/${v(e.interval)} – ${k}`,w=Ww({site:a,priceId:e==null?void 0:e.id}),E=jl({site:a})?w==null?void 0:w.name:v("Price");return t==="changePlan"?u.jsxs("div",{className:"gh-portal-logged-out-form-container",children:[u.jsxs("div",{className:"gh-portal-list mb6",children:[u.jsx("section",{children:u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:v("Account")}),u.jsx("p",{children:r.email})]})}),u.jsx("section",{children:u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:E}),u.jsx("p",{children:b})]})})]}),u.jsx(ze,{dataTestId:"confirm-action",onClick:P=>n(P,e),isRunning:m,isPrimary:!0,brandColor:o,label:f,style:{width:"100%",height:"40px"}})]}):u.jsxs("div",{className:"gh-portal-logged-out-form-container gh-portal-cancellation-form",children:[u.jsx("p",{children:u.jsx(ut,{string:v("If you cancel your subscription now, you will continue to have access until {periodEnd}."),mapping:{periodEnd:u.jsx("strong",{children:En(c.current_period_end)})}})}),u.jsxs("section",{className:"gh-portal-input-section",children:[u.jsx("div",{className:"gh-portal-input-labelcontainer",children:u.jsx("label",{className:"gh-portal-input-label",children:v("Cancellation reason")})}),u.jsx("textarea",{"data-test-input":"cancellation-reason",className:"gh-portal-input",label:"Cancellation reason",type:"text",name:"cancellation_reason",placeholder:"",value:s,onChange:P=>l(P.target.value),rows:"2",maxLength:"500"},"cancellation_reason")]}),u.jsx(ze,{dataTestId:"confirm-cancel-subscription",onClick:P=>n(P,s),isRunning:m,isPrimary:!0,brandColor:o,label:v("Confirm cancellation"),style:{width:"100%",height:"40px"}})]})},WL=({plans:e,selectedPlan:t,onPlanSelect:n,onCancelSubscription:a})=>{const{member:i,action:r,brandColor:o}=S.useContext(H);return u.jsxs("section",{children:[u.jsx("div",{className:"gh-portal-section gh-portal-accountplans-main",children:u.jsx(kx,{showLabel:!1,plans:e,selectedPlan:t,onPlanSelect:n,changePlan:!0})}),u.jsx(VL,{member:i,onCancelSubscription:a,action:r,brandColor:o})]})};function kx({selectedPlan:e,onPlanSelect:t,onPlanCheckout:n,changePlan:a=!1}){const{site:i,member:r}=S.useContext(H),o=SU({site:i,member:r}),s=Qn({member:r}),l=Uw({member:r,site:i});return u.jsx(UL,{products:o.length>0||s||!l?o:[l],selectedPlan:e,changePlan:a,onPlanSelect:t,onPlanCheckout:n})}function GL(e){return e.type==="percent"?`${e.amount}% off`:e.type==="fixed"?`${e.currency?De(e.currency):""}${e.amount/100} off`:""}function KL(e){if(e.duration==="once")return"your next payment";if(e.duration==="forever")return"forever";if(e.duration==="repeating"&&e.duration_in_months){const t=e.duration_in_months;return t===1?"for the next month":`for the next ${t} months`}return""}const qL=({offer:e,product:t,price:n,onAcceptOffer:a,onDeclineOffer:i})=>{const{brandColor:r,action:o}=S.useContext(H),s=o==="applyOffer:running",l=ta(n.amount/100),c=ta(VU({offer:e,price:n})),m=De(n.currency),f=GL(e),p=KL(e),y=e.cadence==="month"?"month":"year";let k=`${f} ${p}.`;return e.duration!=="forever"&&(k+=` Renews at ${m}${l}/${y}.`),u.jsxs("div",{className:"gh-portal-logged-out-form-container gh-portal-offer gh-portal-retention-offer",children:[u.jsx("p",{className:"gh-portal-text-center",children:"We'd hate to see you go! How about a special offer to stay?"}),u.jsxs("div",{className:"gh-portal-offer-bar",children:[u.jsxs("div",{className:"gh-portal-offer-title",children:[u.jsxs("h4",{children:[t.name," - ",e.cadence==="month"?"Monthly":"Yearly"]}),u.jsx("h5",{className:"gh-portal-discount-label",children:f})]}),u.jsxs("div",{className:"gh-portal-offer-details",children:[u.jsxs("div",{className:"gh-portal-retention-offer-price",children:[u.jsxs("div",{className:"gh-portal-product-price",children:[u.jsx("span",{className:"currency-sign",children:m}),u.jsx("span",{className:"amount",children:c})]}),u.jsxs("div",{className:"gh-portal-offer-oldprice",children:[m,l]})]}),u.jsx("p",{className:"footnote",children:k})]}),u.jsx(ze,{dataTestId:"accept-retention-offer",onClick:a,isRunning:s,disabled:s,isPrimary:!0,brandColor:r,label:"Accept offer",style:{width:"100%",height:"40px",marginTop:"28px"}})]}),u.jsx(ze,{dataTestId:"decline-retention-offer",onClick:i,isPrimary:!1,isDestructive:!0,classes:"gh-portal-btn-text",brandColor:r,label:"No thanks, I want to cancel",style:{width:"100%",marginTop:"32px",marginBottom:"24px"}})]})},JL=({plans:e,selectedPlan:t,onPlanSelect:n,onPlanCheckout:a})=>{let i="";return e.length===1&&(i="singleplan"),u.jsx("section",{children:u.jsx("div",{className:`gh-portal-section gh-portal-accountplans-main ${i}`,children:u.jsx(kx,{showLabel:!1,plans:e,selectedPlan:t,onPlanSelect:n,onPlanCheckout:a})})})},ZL=({plans:e,selectedPlan:t,confirmationPlan:n,confirmationType:a,showConfirmation:i=!1,pendingOffer:r,onPlanSelect:o,onPlanCheckout:s,onConfirm:l,onCancelSubscription:c,onAcceptRetentionOffer:m,onDeclineRetentionOffer:f})=>{const{member:p,site:y}=S.useContext(H);if(!rn({member:p})||Qn({member:p}))return u.jsx(JL,{plans:e,selectedPlan:t,onPlanSelect:o,onPlanCheckout:s});if(!i)return u.jsx(WL,{plans:e,selectedPlan:t,onCancelSubscription:c,onPlanSelect:o});if(a==="offerRetention"&&r){const k=r.tier?Pa({site:y,productId:r.tier.id}):Uw({member:p,site:y}),j=r.cadence==="month"?k==null?void 0:k.monthlyPrice:k==null?void 0:k.yearlyPrice;if(k&&j)return u.jsx(qL,{offer:r,product:k,price:j,onAcceptOffer:m,onDeclineOffer:f})}return u.jsx(HL,{plan:n,type:a,onConfirm:l})},Jp=class Jp extends re.Component{constructor(t,n){super(t,n),this.onPlanSelect=(a,i)=>{a==null||a.preventDefault();const{member:r}=this.context;if(!rn({member:r})||Qn({member:r}))this.timeoutId=setTimeout(()=>{this.setState(()=>({selectedPlan:i}))},5);else{const o=this.prices.find(c=>c.id===i),l=this.getActivePriceId({member:r})?"changePlan":"subscribe";i!==this.state.selectedPlan&&this.setState({confirmationPlan:o,confirmationType:l,showConfirmation:!0})}},this.state=this.getInitialState()}componentDidMount(){const{member:t}=this.context;t||this.context.doAction("switchPage",{page:"signin"})}componentWillUnmount(){clearTimeout(this.timeoutId)}getInitialState(){const{member:t,site:n}=this.context;this.prices=Il({site:n});let a=ja({member:t});a&&(this.prices=CU({prices:this.prices,currency:a.currency}));let i=a?this.prices.find(o=>o.id===a.id):null;return!rn({member:t})&&this.prices.length>0&&(i=this.prices[0]),{selectedPlan:i?i.id:null,pendingOffer:null,targetSubscriptionId:null}}handleSignout(t){t.preventDefault(),this.context.doAction("signout")}onBack(){this.state.showConfirmation?this.cancelConfirmPage():this.context.doAction("back")}cancelConfirmPage(){this.setState({showConfirmation:!1,confirmationPlan:null,confirmationType:null,pendingOffer:null,targetSubscriptionId:null})}onPlanCheckout(t,n){const{doAction:a,member:i}=this.context;let{confirmationPlan:r,selectedPlan:o}=this.state;if(n&&(o=n),rn({member:i})&&!Qn({member:i})){const s=Ft({member:i}),l=s?s.id:"";l&&a("updateSubscription",{plan:r.name,planId:r.id,subscriptionId:l,cancelAtPeriodEnd:!1})}else a("checkoutPlan",{plan:o})}onCancelSubscription({subscriptionId:t}){const{member:n,offers:a}=this.context,i=jU({subscriptionId:t,member:n}),r=ep({subscription:i}),o=(a||[]).filter(s=>s.redemption_type==="retention");o.length>0?this.setState({showConfirmation:!0,confirmationPlan:r,confirmationType:"offerRetention",pendingOffer:o[0],targetSubscriptionId:t}):this.setState({showConfirmation:!0,confirmationPlan:r,confirmationType:"cancel",pendingOffer:null,targetSubscriptionId:t})}onAcceptRetentionOffer(){const{pendingOffer:t,targetSubscriptionId:n}=this.state;!n||!t||this.context.doAction("applyOffer",{subscriptionId:n,offerId:t.id})}onDeclineRetentionOffer(){this.setState({confirmationType:"cancel",pendingOffer:null})}onCancelSubscriptionConfirmation(t){const{targetSubscriptionId:n}=this.state;if(!n)return null;this.context.doAction("cancelSubscription",{subscriptionId:n,cancelAtPeriodEnd:!0,cancellationReason:t})}getActivePriceId({member:t}){const n=ja({member:t});return n?n.id:null}onConfirm(t,n){const{confirmationType:a}=this.state;if(a==="cancel")return this.onCancelSubscriptionConfirmation(n);if(["changePlan","subscribe"].includes(a))return this.onPlanCheckout()}render(){const t=this.prices,{selectedPlan:n,showConfirmation:a,confirmationPlan:i,confirmationType:r,pendingOffer:o}=this.state,{lastPage:s}=this.context;return u.jsx(u.Fragment,{children:u.jsxs("div",{className:"gh-portal-content",children:[u.jsx(Mi,{onClick:l=>this.onBack(l),hidden:!s&&!a}),u.jsx(Oe,{}),u.jsx(BL,{onBack:l=>this.onBack(l),confirmationType:r,showConfirmation:a}),u.jsx(ZL,{plans:t,selectedPlan:n,showConfirmation:a,confirmationPlan:i,confirmationType:r,pendingOffer:o,onConfirm:(...l)=>this.onConfirm(...l),onCancelSubscription:l=>this.onCancelSubscription(l),onAcceptRetentionOffer:()=>this.onAcceptRetentionOffer(),onDeclineRetentionOffer:()=>this.onDeclineRetentionOffer(),onPlanSelect:this.onPlanSelect,onPlanCheckout:(l,c)=>this.onPlanCheckout(l,c)})]})})}};Jp.contextType=H;let wp=Jp;const XL=`
|
|
5321
|
+
`;function YL({confirmationType:e}){if(e==="changePlan")return v("Confirm subscription");if(e==="cancel")return v("Cancel subscription");if(e==="subscribe")return v("Subscribe");if(e==="offerRetention")return"Before you go"}const BL=({showConfirmation:e,confirmationType:t})=>{const{member:n}=C.useContext(H);let a=rn({member:n})?v("Change plan"):v("Choose a plan");return e&&(a=YL({confirmationType:t})),u.jsx("header",{className:"gh-portal-detail-header",children:u.jsx("h3",{className:"gh-portal-main-title",children:a})})},VL=({member:e,onCancelSubscription:t,action:n,brandColor:a})=>{const{site:i}=C.useContext(H);if(!e.paid)return null;const r=Ft({member:e});if(!r||r.cancel_at_period_end)return null;const o=v("Cancel subscription"),s=["cancelSubscription:running"].includes(n),l=!!s,c=!!r.cancel_at_period_end,m=!r.cancelAtPeriodEnd;return u.jsx("div",{className:"gh-portal-expire-container",children:u.jsx(ze,{dataTestId:"cancel-subscription",onClick:()=>{t({subscriptionId:r.id,cancelAtPeriodEnd:!0})},isRunning:s,disabled:l,isPrimary:c,isDestructive:m,classes:jl({site:i})?"gh-portal-btn-text mt2 mb4":"",brandColor:a,label:o,style:{width:"100%"}})})},HL=({plan:e,type:t,onConfirm:n})=>{const{site:a,action:i,member:r,brandColor:o}=C.useContext(H),[s,l]=C.useState(""),c=Ft({member:r}),m=["updateSubscription:running","checkoutPlan:running","cancelSubscription:running"].includes(i),f=v("Confirm"),p=En(c.current_period_end),y=ja({member:r});let k=v("Starting {startDate}",{startDate:p});y.id!==e.id&&(k=v("Starting today"));const S=ta(e.price),b=`${e.currency_symbol}${S}/${v(e.interval)} – ${k}`,w=Ww({site:a,priceId:e==null?void 0:e.id}),E=jl({site:a})?w==null?void 0:w.name:v("Price");return t==="changePlan"?u.jsxs("div",{className:"gh-portal-logged-out-form-container",children:[u.jsxs("div",{className:"gh-portal-list mb6",children:[u.jsx("section",{children:u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:v("Account")}),u.jsx("p",{children:r.email})]})}),u.jsx("section",{children:u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:E}),u.jsx("p",{children:b})]})})]}),u.jsx(ze,{dataTestId:"confirm-action",onClick:P=>n(P,e),isRunning:m,isPrimary:!0,brandColor:o,label:f,style:{width:"100%",height:"40px"}})]}):u.jsxs("div",{className:"gh-portal-logged-out-form-container gh-portal-cancellation-form",children:[u.jsx("p",{children:u.jsx(ut,{string:v("If you cancel your subscription now, you will continue to have access until {periodEnd}."),mapping:{periodEnd:u.jsx("strong",{children:En(c.current_period_end)})}})}),u.jsxs("section",{className:"gh-portal-input-section",children:[u.jsx("div",{className:"gh-portal-input-labelcontainer",children:u.jsx("label",{className:"gh-portal-input-label",children:v("Cancellation reason")})}),u.jsx("textarea",{"data-test-input":"cancellation-reason",className:"gh-portal-input",label:"Cancellation reason",type:"text",name:"cancellation_reason",placeholder:"",value:s,onChange:P=>l(P.target.value),rows:"2",maxLength:"500"},"cancellation_reason")]}),u.jsx(ze,{dataTestId:"confirm-cancel-subscription",onClick:P=>n(P,s),isRunning:m,isPrimary:!0,brandColor:o,label:v("Confirm cancellation"),style:{width:"100%",height:"40px"}})]})},WL=({plans:e,selectedPlan:t,onPlanSelect:n,onCancelSubscription:a})=>{const{member:i,action:r,brandColor:o}=C.useContext(H);return u.jsxs("section",{children:[u.jsx("div",{className:"gh-portal-section gh-portal-accountplans-main",children:u.jsx(kx,{showLabel:!1,plans:e,selectedPlan:t,onPlanSelect:n,changePlan:!0})}),u.jsx(VL,{member:i,onCancelSubscription:a,action:r,brandColor:o})]})};function kx({selectedPlan:e,onPlanSelect:t,onPlanCheckout:n,changePlan:a=!1}){const{site:i,member:r}=C.useContext(H),o=SU({site:i,member:r}),s=Qn({member:r}),l=Uw({member:r,site:i});return u.jsx(UL,{products:o.length>0||s||!l?o:[l],selectedPlan:e,changePlan:a,onPlanSelect:t,onPlanCheckout:n})}function GL(e){return e.type==="percent"?`${e.amount}% off`:e.type==="fixed"?`${e.currency?De(e.currency):""}${e.amount/100} off`:""}function KL(e){if(e.duration==="once")return"your next payment";if(e.duration==="forever")return"forever";if(e.duration==="repeating"&&e.duration_in_months){const t=e.duration_in_months;return t===1?"for the next month":`for the next ${t} months`}return""}const qL=({offer:e,product:t,price:n,onAcceptOffer:a,onDeclineOffer:i})=>{const{brandColor:r,action:o}=C.useContext(H),s=o==="applyOffer:running",l=ta(n.amount/100),c=ta(VU({offer:e,price:n})),m=De(n.currency),f=GL(e),p=KL(e),y=e.cadence==="month"?"month":"year";let k=`${f} ${p}.`;return e.duration!=="forever"&&(k+=` Renews at ${m}${l}/${y}.`),u.jsxs("div",{className:"gh-portal-logged-out-form-container gh-portal-offer gh-portal-retention-offer",children:[u.jsx("p",{className:"gh-portal-text-center",children:"We'd hate to see you go! How about a special offer to stay?"}),u.jsxs("div",{className:"gh-portal-offer-bar",children:[u.jsxs("div",{className:"gh-portal-offer-title",children:[u.jsxs("h4",{children:[t.name," - ",e.cadence==="month"?"Monthly":"Yearly"]}),u.jsx("h5",{className:"gh-portal-discount-label",children:f})]}),u.jsxs("div",{className:"gh-portal-offer-details",children:[u.jsxs("div",{className:"gh-portal-retention-offer-price",children:[u.jsxs("div",{className:"gh-portal-product-price",children:[u.jsx("span",{className:"currency-sign",children:m}),u.jsx("span",{className:"amount",children:c})]}),u.jsxs("div",{className:"gh-portal-offer-oldprice",children:[m,l]})]}),u.jsx("p",{className:"footnote",children:k})]}),u.jsx(ze,{dataTestId:"accept-retention-offer",onClick:a,isRunning:s,disabled:s,isPrimary:!0,brandColor:r,label:"Accept offer",style:{width:"100%",height:"40px",marginTop:"28px"}})]}),u.jsx(ze,{dataTestId:"decline-retention-offer",onClick:i,isPrimary:!1,isDestructive:!0,classes:"gh-portal-btn-text",brandColor:r,label:"No thanks, I want to cancel",style:{width:"100%",marginTop:"32px",marginBottom:"24px"}})]})},JL=({plans:e,selectedPlan:t,onPlanSelect:n,onPlanCheckout:a})=>{let i="";return e.length===1&&(i="singleplan"),u.jsx("section",{children:u.jsx("div",{className:`gh-portal-section gh-portal-accountplans-main ${i}`,children:u.jsx(kx,{showLabel:!1,plans:e,selectedPlan:t,onPlanSelect:n,onPlanCheckout:a})})})},ZL=({plans:e,selectedPlan:t,confirmationPlan:n,confirmationType:a,showConfirmation:i=!1,pendingOffer:r,onPlanSelect:o,onPlanCheckout:s,onConfirm:l,onCancelSubscription:c,onAcceptRetentionOffer:m,onDeclineRetentionOffer:f})=>{const{member:p,site:y}=C.useContext(H);if(!rn({member:p})||Qn({member:p}))return u.jsx(JL,{plans:e,selectedPlan:t,onPlanSelect:o,onPlanCheckout:s});if(!i)return u.jsx(WL,{plans:e,selectedPlan:t,onCancelSubscription:c,onPlanSelect:o});if(a==="offerRetention"&&r){const k=r.tier?Pa({site:y,productId:r.tier.id}):Uw({member:p,site:y}),S=r.cadence==="month"?k==null?void 0:k.monthlyPrice:k==null?void 0:k.yearlyPrice;if(k&&S)return u.jsx(qL,{offer:r,product:k,price:S,onAcceptOffer:m,onDeclineOffer:f})}return u.jsx(HL,{plan:n,type:a,onConfirm:l})},Jp=class Jp extends re.Component{constructor(t,n){super(t,n),this.onPlanSelect=(a,i)=>{a==null||a.preventDefault();const{member:r}=this.context;if(!rn({member:r})||Qn({member:r}))this.timeoutId=setTimeout(()=>{this.setState(()=>({selectedPlan:i}))},5);else{const o=this.prices.find(c=>c.id===i),l=this.getActivePriceId({member:r})?"changePlan":"subscribe";i!==this.state.selectedPlan&&this.setState({confirmationPlan:o,confirmationType:l,showConfirmation:!0})}},this.state=this.getInitialState()}componentDidMount(){const{member:t,pageData:n}=this.context;if(!t){this.context.doAction("switchPage",{page:"signin"});return}(n==null?void 0:n.action)==="cancel"&&(n!=null&&n.subscriptionId)&&(this.onCancelSubscription({subscriptionId:n.subscriptionId}),n.action=null)}componentWillUnmount(){clearTimeout(this.timeoutId)}getInitialState(){const{member:t,site:n}=this.context;this.prices=Il({site:n});let a=ja({member:t});a&&(this.prices=CU({prices:this.prices,currency:a.currency}));let i=a?this.prices.find(o=>o.id===a.id):null;return!rn({member:t})&&this.prices.length>0&&(i=this.prices[0]),{selectedPlan:i?i.id:null,pendingOffer:null,targetSubscriptionId:null}}handleSignout(t){t.preventDefault(),this.context.doAction("signout")}onBack(){this.state.showConfirmation?this.cancelConfirmPage():this.context.doAction("back")}cancelConfirmPage(){this.setState({showConfirmation:!1,confirmationPlan:null,confirmationType:null,pendingOffer:null,targetSubscriptionId:null})}onPlanCheckout(t,n){const{doAction:a,member:i}=this.context;let{confirmationPlan:r,selectedPlan:o}=this.state;if(n&&(o=n),rn({member:i})&&!Qn({member:i})){const s=Ft({member:i}),l=s?s.id:"";l&&a("updateSubscription",{plan:r.name,planId:r.id,subscriptionId:l,cancelAtPeriodEnd:!1})}else a("checkoutPlan",{plan:o})}onCancelSubscription({subscriptionId:t}){const{member:n,offers:a}=this.context,i=jU({subscriptionId:t,member:n});if(!i)return;const r=ep({subscription:i}),o=(a||[]).filter(s=>s.redemption_type==="retention");o.length>0?this.setState({showConfirmation:!0,confirmationPlan:r,confirmationType:"offerRetention",pendingOffer:o[0],targetSubscriptionId:t}):this.setState({showConfirmation:!0,confirmationPlan:r,confirmationType:"cancel",pendingOffer:null,targetSubscriptionId:t})}onAcceptRetentionOffer(){const{pendingOffer:t,targetSubscriptionId:n}=this.state;!n||!t||this.context.doAction("applyOffer",{subscriptionId:n,offerId:t.id})}onDeclineRetentionOffer(){this.setState({confirmationType:"cancel",pendingOffer:null})}onCancelSubscriptionConfirmation(t){const{targetSubscriptionId:n}=this.state;if(!n)return null;this.context.doAction("cancelSubscription",{subscriptionId:n,cancelAtPeriodEnd:!0,cancellationReason:t})}getActivePriceId({member:t}){const n=ja({member:t});return n?n.id:null}onConfirm(t,n){const{confirmationType:a}=this.state;if(a==="cancel")return this.onCancelSubscriptionConfirmation(n);if(["changePlan","subscribe"].includes(a))return this.onPlanCheckout()}render(){const t=this.prices,{selectedPlan:n,showConfirmation:a,confirmationPlan:i,confirmationType:r,pendingOffer:o}=this.state,{lastPage:s}=this.context;return u.jsx(u.Fragment,{children:u.jsxs("div",{className:"gh-portal-content",children:[u.jsx(Mi,{onClick:l=>this.onBack(l),hidden:!s&&!a}),u.jsx(Oe,{}),u.jsx(BL,{onBack:l=>this.onBack(l),confirmationType:r,showConfirmation:a}),u.jsx(ZL,{plans:t,selectedPlan:n,showConfirmation:a,confirmationPlan:i,confirmationType:r,pendingOffer:o,onConfirm:(...l)=>this.onConfirm(...l),onCancelSubscription:l=>this.onCancelSubscription(l),onAcceptRetentionOffer:()=>this.onAcceptRetentionOffer(),onDeclineRetentionOffer:()=>this.onDeclineRetentionOffer(),onPlanSelect:this.onPlanSelect,onPlanCheckout:(l,c)=>this.onPlanCheckout(l,c)})]})})}};Jp.contextType=H;let wp=Jp;const XL=`
|
|
5322
5322
|
.gh-portal-input-section.hidden {
|
|
5323
5323
|
display: none;
|
|
5324
5324
|
}
|
|
@@ -5382,8 +5382,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
5382
5382
|
.gh-portal-popup-container:not(.preview) .gh-portal-input:disabled::placeholder {
|
|
5383
5383
|
color: var(--grey9);
|
|
5384
5384
|
}
|
|
5385
|
-
`;function QL({message:e,style:t}){return e?u.jsx("p",{style:{...t||{}},children:e}):null}function e6({name:e,id:t,hidden:n,label:a,hideLabel:i,type:r,value:o,placeholder:s,disabled:l=!1,onChange:c=()=>{},onBlur:m=()=>{},onKeyDown:f=()=>{},tabIndex:p,maxLength:y,autoFocus:k,errorMessage:j}){const b=S.useRef(null);t=t||`input-${e}`;const w=n?"gh-portal-input-section hidden":"gh-portal-input-section",E=i?"gh-portal-input-label hidden":"gh-portal-input-label",P=j?"gh-portal-input error":"gh-portal-input";Ai()&&(l=!0),$e(["preview"])&&(l=!0);let $="",F="",z="",R,_;switch(t){case"input-email":$="off",F="off",z="off";break;case"input-name":$="off",F="off";break;case"input-otc":$="one-time-code",F="off",z="off",R="numeric",_="[0-9]*",s??(s="• • • • • •");break}return S.useEffect(()=>{k&&b.current.focus()},[k]),u.jsxs("section",{className:w,children:[u.jsxs("div",{className:"gh-portal-input-labelcontainer",children:[u.jsxs("label",{htmlFor:t,className:E,children:[" ",a," "]}),u.jsx(QL,{message:j,name:e})]}),u.jsx("input",{"data-test-input":t,ref:b,id:t,className:P,type:r,name:e,value:o,placeholder:s,onChange:D=>c(D,e),onKeyDown:D=>f(D,e),onBlur:D=>m(D,e),disabled:l,tabIndex:p,maxLength:y,autoComplete:$,autoCorrect:F,autoCapitalize:z,"aria-label":a,inputMode:R,pattern:_})]})}const Zp=class Zp extends re.Component{render(){return u.jsx(u.Fragment,{children:u.jsxs("button",{className:"gh-portal-btn gh-portal-btn-site-title-back",onClick:()=>{this.props.onBack?this.props.onBack():this.context.doAction("closePopup")},children:[u.jsx("span",{children:"← "})," ",v("Back")]})})}};Zp.contextType=H;let xp=Zp;const t6=e=>S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",...e},S.createElement("g",{transform:"matrix(0.6666666666666666,0,0,0.6666666666666666,0,0)"},S.createElement("path",{d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-7.5,9a2,2,0,1,1,2-2A2,2,0,0,1,12,18.5ZM16.25,9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5V6.75a4.25,4.25,0,0,1,8.5,0Z",style:{fill:"#000000"}})));function n6({newsletter:e,subscribedNewsletters:t,setSubscribedNewsletters:n}){const a=t.some(i=>i.id===(e==null?void 0:e.id));return e.paid?u.jsxs("section",{className:"gh-portal-list-toggle-wrapper","data-testid":"toggle-wrapper",children:[u.jsxs("div",{className:"gh-portal-list-detail gh-portal-list-big",children:[u.jsx("h3",{children:e.name}),u.jsx("p",{children:e.description})]}),u.jsx("div",{className:"gh-portal-lock-icon-container",children:u.jsx(t6,{className:"gh-portal-lock-icon",alt:"",title:v("Unlock access to all newsletters by becoming a paid subscriber.")})})]}):u.jsxs("section",{className:"gh-portal-list-toggle-wrapper","data-testid":"toggle-wrapper",children:[u.jsxs("div",{className:"gh-portal-list-detail gh-portal-list-big",children:[u.jsx("h3",{children:e.name}),u.jsx("p",{children:e.description})]}),u.jsx("div",{children:u.jsx(Dl,{id:e.id,onToggle:(i,r)=>{let o=[];r?o=t.filter(s=>s.id!==e.id).concat(e):o=t.filter(s=>s.id!==e.id),n(o)},checked:a})})]})}function a6({subscribedNewsletters:e,setSubscribedNewsletters:t}){const{site:n}=S.useContext(H);return za({site:n}).map(i=>u.jsx(n6,{newsletter:i,subscribedNewsletters:e,setSubscribedNewsletters:t},i==null?void 0:i.id))}function Ep({pageData:e,onBack:t}){const{brandColor:n,site:a,doAction:i,action:r}=S.useContext(H),s=za({site:a}).filter(k=>k.subscribe_on_signup);let l=!1;r==="signup:running"&&(l=!0);let c=v("Continue"),m=!1;r==="signup:failed"&&(c=v("Retry"),m=!0);const f=r==="signup:running",[p,y]=S.useState(s);return u.jsxs("div",{className:"gh-portal-content with-footer gh-portal-newsletter-selection",children:[u.jsx("p",{className:"gh-portal-text-center gh-portal-text-large",children:v("Choose your newsletters")}),u.jsx("div",{className:"gh-portal-section",children:u.jsx("div",{className:"gh-portal-list",children:u.jsx(a6,{subscribedNewsletters:p,setSubscribedNewsletters:y})})}),u.jsx("footer",{className:"gh-portal-action-footer",children:u.jsxs("div",{style:{width:"100%"},children:[u.jsx("div",{style:{marginBottom:"20px"},children:u.jsx(ze,{isRunning:l,retry:m,disabled:f,onClick:()=>{let k=p.map($=>({id:$.id,name:$.name}));const{name:j,email:b,plan:w,phonenumber:E,offerId:P}=e;i("signup",{name:j,email:b,plan:w,phonenumber:E,newsletters:k,offerId:P})},brandColor:n,label:c,style:{width:"100%"}})}),Ni({site:a})?null:u.jsx("div",{children:u.jsx("button",{className:"gh-portal-btn gh-portal-btn-link gh-portal-btn-different-plan",onClick:()=>{t()},children:u.jsx("span",{children:v("Choose a different plan")})})})]})})]})}const i6=({field:e,onChange:t,onBlur:n=()=>{},onKeyDown:a=()=>{}})=>e?u.jsx(u.Fragment,{children:u.jsx(e6,{label:e.label,type:e.type,name:e.name,hidden:e.hidden,placeholder:e.placeholder,disabled:e.disabled,value:e.value,onKeyDown:a,onChange:i=>t(i,e),onBlur:i=>n(i,e),tabIndex:e.tabIndex,errorMessage:e.errorMessage,autoFocus:e.autoFocus},e.name)}):null;class Rl extends S.Component{constructor(t){super(t),this.state={}}render(){const{fields:t,onChange:n,onBlur:a,onKeyDown:i}=this.props,r=t.map(o=>u.jsx(i6,{field:o,onChange:n,onBlur:a,onKeyDown:i},o.name));return u.jsx(u.Fragment,{children:r})}}const r6=e=>!!e&&/^[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])?)*$/.test(String(e).toLowerCase()),o6=({field:e})=>{if(e.required&&!e.value)switch(e.name){case"name":return v("Enter your name");case"email":return v("Enter your email address");default:return v("Please enter {fieldName}",{fieldName:e.name})}return e.type==="email"&&!r6(e.value)?v("Invalid email address"):null},Ul=({fields:e})=>{const t={};return e.forEach(n=>{const a=n.name,i=o6({field:n});t[a]=i}),t},vx=e=>S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",...e},S.createElement("defs",null,S.createElement("style",null,".inviteicon{fill: currentColor;}")),S.createElement("path",{className:"inviteicon",d:"M23.991 11.464l-.036-.146-.028-.068-.011-.027-.115-.114-.018-.021-.008-.005h-.001l-3.774-2.596v-7.987c0-.276-.224-.5-.5-.5h-15c-.276 0-.5.224-.5.5v7.987l-3.774 2.595-.003.002-.006.004-.015.016-.118.118-.011.027-.028.068-.036.146-.009.037v10.5c0 1.103.897 2 2 2h20c1.103 0 2-.897 2-2v-10.5l-.009-.036zm-1.383.03l-2.608 1.738v-3.531l2.608 1.793zm-18.608 1.738l-2.608-1.739 2.608-1.792v3.531zm18 9.768h-20c-.551 0-1-.449-1-1v-9.566l5.223 3.482c.085.057.181.084.276.084.162 0 .32-.078.417-.223.153-.23.091-.54-.139-.693l-1.777-1.185v-12.899h14v12.899l-1.777 1.185c-.23.153-.292.463-.139.693.096.145.255.223.416.223.095 0 .191-.027.277-.084l5.223-3.482v9.566c0 .551-.449 1-1 1zM15.812 16.109c-.088-.07-.198-.109-.312-.109h-7c-.114 0-.224.039-.312.109l-5 4c-.215.173-.25.487-.078.703.173.215.487.251.703.078l4.862-3.89h6.649l4.863 3.891c.093.073.203.109.313.109.147 0 .292-.065.391-.188.172-.216.137-.53-.078-.703l-5.001-4zM11.706 12.779c.087.064.191.096.294.096s.207-.032.294-.096c.482-.35 4.706-3.497 4.706-6.101 0-1.868-1.387-2.984-2.728-2.984-.772 0-1.674.379-2.272 1.368-.598-.988-1.5-1.368-2.272-1.368-1.341-.001-2.728 1.116-2.728 2.984 0 2.604 4.224 5.751 4.706 6.101zm-1.978-8.086c.844 0 1.511.681 1.786 1.822.108.45.864.45.973 0 .274-1.141.942-1.822 1.786-1.822.85 0 1.728.742 1.728 1.984 0 1.646-2.658 4.037-4 5.072-1.342-1.035-4-3.426-4-5.072-.001-1.241.877-1.984 1.727-1.984z"})),wx=e=>{if(e.currentTarget.contains(e.target)){const t=e.target.closest("a");t&&(e.preventDefault(),window.open(t.href,"_blank"))}};/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */const{entries:xx,setPrototypeOf:Ex,isFrozen:s6,getPrototypeOf:l6,getOwnPropertyDescriptor:u6}=Object;let{freeze:ct,seal:Dt,create:Sp}=Object,{apply:Cp,construct:$p}=typeof Reflect<"u"&&Reflect;ct||(ct=function(t){return t}),Dt||(Dt=function(t){return t}),Cp||(Cp=function(t,n){for(var a=arguments.length,i=new Array(a>2?a-2:0),r=2;r<a;r++)i[r-2]=arguments[r];return t.apply(n,i)}),$p||($p=function(t){for(var n=arguments.length,a=new Array(n>1?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];return new t(...a)});const Ll=mt(Array.prototype.forEach),c6=mt(Array.prototype.lastIndexOf),Sx=mt(Array.prototype.pop),ho=mt(Array.prototype.push),d6=mt(Array.prototype.splice),Yl=mt(String.prototype.toLowerCase),jp=mt(String.prototype.toString),Tp=mt(String.prototype.match),fo=mt(String.prototype.replace),m6=mt(String.prototype.indexOf),p6=mt(String.prototype.trim),Ht=mt(Object.prototype.hasOwnProperty),dt=mt(RegExp.prototype.test),go=h6(TypeError);function mt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,a=new Array(n>1?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];return Cp(e,t,a)}}function h6(e){return function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return $p(e,n)}}function ae(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Yl;Ex&&Ex(e,null);let a=t.length;for(;a--;){let i=t[a];if(typeof i=="string"){const r=n(i);r!==i&&(s6(t)||(t[a]=r),i=r)}e[i]=!0}return e}function f6(e){for(let t=0;t<e.length;t++)Ht(e,t)||(e[t]=null);return e}function on(e){const t=Sp(null);for(const[n,a]of xx(e))Ht(e,n)&&(Array.isArray(a)?t[n]=f6(a):a&&typeof a=="object"&&a.constructor===Object?t[n]=on(a):t[n]=a);return t}function yo(e,t){for(;e!==null;){const a=u6(e,t);if(a){if(a.get)return mt(a.get);if(typeof a.value=="function")return mt(a.value)}e=l6(e)}function n(){return null}return n}const Cx=ct(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Pp=ct(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),zp=ct(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),g6=ct(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ap=ct(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),y6=ct(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),$x=ct(["#text"]),jx=ct(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Np=ct(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Tx=ct(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Bl=ct(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),b6=Dt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),k6=Dt(/<%[\w\W]*|[\w\W]*%>/gm),v6=Dt(/\$\{[\w\W]*/gm),w6=Dt(/^data-[\-\w.\u00B7-\uFFFF]+$/),x6=Dt(/^aria-[\-\w]+$/),Px=Dt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),E6=Dt(/^(?:\w+script|data):/i),S6=Dt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),zx=Dt(/^html$/i),C6=Dt(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ax=Object.freeze({__proto__:null,ARIA_ATTR:x6,ATTR_WHITESPACE:S6,CUSTOM_ELEMENT:C6,DATA_ATTR:w6,DOCTYPE_NAME:zx,ERB_EXPR:k6,IS_ALLOWED_URI:Px,IS_SCRIPT_OR_DATA:E6,MUSTACHE_EXPR:b6,TMPLIT_EXPR:v6});const bo={element:1,text:3,progressingInstruction:7,comment:8,document:9},$6=function(){return typeof window>"u"?null:window},j6=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let a=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(a=n.getAttribute(i));const r="dompurify"+(a?"#"+a:"");try{return t.createPolicy(r,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},Nx=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ix(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$6();const t=q=>Ix(q);if(t.version="3.3.1",t.removed=[],!e||!e.document||e.document.nodeType!==bo.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const a=n,i=a.currentScript,{DocumentFragment:r,HTMLTemplateElement:o,Node:s,Element:l,NodeFilter:c,NamedNodeMap:m=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:p,trustedTypes:y}=e,k=l.prototype,j=yo(k,"cloneNode"),b=yo(k,"remove"),w=yo(k,"nextSibling"),E=yo(k,"childNodes"),P=yo(k,"parentNode");if(typeof o=="function"){const q=n.createElement("template");q.content&&q.content.ownerDocument&&(n=q.content.ownerDocument)}let $,F="";const{implementation:z,createNodeIterator:R,createDocumentFragment:_,getElementsByTagName:D}=n,{importNode:X}=a;let ne=Nx();t.isSupported=typeof xx=="function"&&typeof P=="function"&&z&&z.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ye,ERB_EXPR:he,TMPLIT_EXPR:_e,DATA_ATTR:Ie,ARIA_ATTR:Je,IS_SCRIPT_OR_DATA:N,ATTR_WHITESPACE:O,CUSTOM_ELEMENT:V}=Ax;let{IS_ALLOWED_URI:ie}=Ax,I=null;const Y=ae({},[...Cx,...Pp,...zp,...Ap,...$x]);let B=null;const Z=ae({},[...jx,...Np,...Tx,...Bl]);let G=Object.seal(Sp(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Se=null,Re=null;const Ne=Object.seal(Sp(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ze=!0,na=!0,Zl=!1,vo=!0,St=!1,sn=!0,Cn=!1,wo=!1,Ia=!1,aa=!1,Ui=!1,Ma=!1,Fa=!0,Ct=!1;const xo="user-content-";let Eo=!0,bt=!1,ia={},g=null;const d=ae({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let h=null;const x=ae({},["audio","video","img","source","image","track"]);let T=null;const A=ae({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),M="http://www.w3.org/1998/Math/MathML",te="http://www.w3.org/2000/svg",ue="http://www.w3.org/1999/xhtml";let de=ue,ve=!1,me=null;const q8=ae({},[M,te,ue],jp);let Xl=ae({},["mi","mo","mn","ms","mtext"]),Ql=ae({},["annotation-xml"]);const J8=ae({},["title","style","font","a","script"]);let So=null;const Z8=["application/xhtml+xml","text/html"],X8="text/html";let Ue=null,Li=null;const Q8=n.createElement("form"),nE=function(C){return C instanceof RegExp||C instanceof Function},lh=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Li&&Li===C)){if((!C||typeof C!="object")&&(C={}),C=on(C),So=Z8.indexOf(C.PARSER_MEDIA_TYPE)===-1?X8:C.PARSER_MEDIA_TYPE,Ue=So==="application/xhtml+xml"?jp:Yl,I=Ht(C,"ALLOWED_TAGS")?ae({},C.ALLOWED_TAGS,Ue):Y,B=Ht(C,"ALLOWED_ATTR")?ae({},C.ALLOWED_ATTR,Ue):Z,me=Ht(C,"ALLOWED_NAMESPACES")?ae({},C.ALLOWED_NAMESPACES,jp):q8,T=Ht(C,"ADD_URI_SAFE_ATTR")?ae(on(A),C.ADD_URI_SAFE_ATTR,Ue):A,h=Ht(C,"ADD_DATA_URI_TAGS")?ae(on(x),C.ADD_DATA_URI_TAGS,Ue):x,g=Ht(C,"FORBID_CONTENTS")?ae({},C.FORBID_CONTENTS,Ue):d,Se=Ht(C,"FORBID_TAGS")?ae({},C.FORBID_TAGS,Ue):on({}),Re=Ht(C,"FORBID_ATTR")?ae({},C.FORBID_ATTR,Ue):on({}),ia=Ht(C,"USE_PROFILES")?C.USE_PROFILES:!1,Ze=C.ALLOW_ARIA_ATTR!==!1,na=C.ALLOW_DATA_ATTR!==!1,Zl=C.ALLOW_UNKNOWN_PROTOCOLS||!1,vo=C.ALLOW_SELF_CLOSE_IN_ATTR!==!1,St=C.SAFE_FOR_TEMPLATES||!1,sn=C.SAFE_FOR_XML!==!1,Cn=C.WHOLE_DOCUMENT||!1,aa=C.RETURN_DOM||!1,Ui=C.RETURN_DOM_FRAGMENT||!1,Ma=C.RETURN_TRUSTED_TYPE||!1,Ia=C.FORCE_BODY||!1,Fa=C.SANITIZE_DOM!==!1,Ct=C.SANITIZE_NAMED_PROPS||!1,Eo=C.KEEP_CONTENT!==!1,bt=C.IN_PLACE||!1,ie=C.ALLOWED_URI_REGEXP||Px,de=C.NAMESPACE||ue,Xl=C.MATHML_TEXT_INTEGRATION_POINTS||Xl,Ql=C.HTML_INTEGRATION_POINTS||Ql,G=C.CUSTOM_ELEMENT_HANDLING||{},C.CUSTOM_ELEMENT_HANDLING&&nE(C.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(G.tagNameCheck=C.CUSTOM_ELEMENT_HANDLING.tagNameCheck),C.CUSTOM_ELEMENT_HANDLING&&nE(C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(G.attributeNameCheck=C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),C.CUSTOM_ELEMENT_HANDLING&&typeof C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(G.allowCustomizedBuiltInElements=C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),St&&(na=!1),Ui&&(aa=!0),ia&&(I=ae({},$x),B=[],ia.html===!0&&(ae(I,Cx),ae(B,jx)),ia.svg===!0&&(ae(I,Pp),ae(B,Np),ae(B,Bl)),ia.svgFilters===!0&&(ae(I,zp),ae(B,Np),ae(B,Bl)),ia.mathMl===!0&&(ae(I,Ap),ae(B,Tx),ae(B,Bl))),C.ADD_TAGS&&(typeof C.ADD_TAGS=="function"?Ne.tagCheck=C.ADD_TAGS:(I===Y&&(I=on(I)),ae(I,C.ADD_TAGS,Ue))),C.ADD_ATTR&&(typeof C.ADD_ATTR=="function"?Ne.attributeCheck=C.ADD_ATTR:(B===Z&&(B=on(B)),ae(B,C.ADD_ATTR,Ue))),C.ADD_URI_SAFE_ATTR&&ae(T,C.ADD_URI_SAFE_ATTR,Ue),C.FORBID_CONTENTS&&(g===d&&(g=on(g)),ae(g,C.FORBID_CONTENTS,Ue)),C.ADD_FORBID_CONTENTS&&(g===d&&(g=on(g)),ae(g,C.ADD_FORBID_CONTENTS,Ue)),Eo&&(I["#text"]=!0),Cn&&ae(I,["html","head","body"]),I.table&&(ae(I,["tbody"]),delete Se.tbody),C.TRUSTED_TYPES_POLICY){if(typeof C.TRUSTED_TYPES_POLICY.createHTML!="function")throw go('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof C.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw go('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');$=C.TRUSTED_TYPES_POLICY,F=$.createHTML("")}else $===void 0&&($=j6(y,i)),$!==null&&typeof F=="string"&&(F=$.createHTML(""));ct&&ct(C),Li=C}},aE=ae({},[...Pp,...zp,...g6]),iE=ae({},[...Ap,...y6]),eY=function(C){let U=P(C);(!U||!U.tagName)&&(U={namespaceURI:de,tagName:"template"});const K=Yl(C.tagName),je=Yl(U.tagName);return me[C.namespaceURI]?C.namespaceURI===te?U.namespaceURI===ue?K==="svg":U.namespaceURI===M?K==="svg"&&(je==="annotation-xml"||Xl[je]):!!aE[K]:C.namespaceURI===M?U.namespaceURI===ue?K==="math":U.namespaceURI===te?K==="math"&&Ql[je]:!!iE[K]:C.namespaceURI===ue?U.namespaceURI===te&&!Ql[je]||U.namespaceURI===M&&!Xl[je]?!1:!iE[K]&&(J8[K]||!aE[K]):!!(So==="application/xhtml+xml"&&me[C.namespaceURI]):!1},ln=function(C){ho(t.removed,{element:C});try{P(C).removeChild(C)}catch{b(C)}},Da=function(C,U){try{ho(t.removed,{attribute:U.getAttributeNode(C),from:U})}catch{ho(t.removed,{attribute:null,from:U})}if(U.removeAttribute(C),C==="is")if(aa||Ui)try{ln(U)}catch{}else try{U.setAttribute(C,"")}catch{}},rE=function(C){let U=null,K=null;if(Ia)C="<remove></remove>"+C;else{const Me=Tp(C,/^[\r\n\t ]+/);K=Me&&Me[0]}So==="application/xhtml+xml"&&de===ue&&(C='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+C+"</body></html>");const je=$?$.createHTML(C):C;if(de===ue)try{U=new p().parseFromString(je,So)}catch{}if(!U||!U.documentElement){U=z.createDocument(de,"template",null);try{U.documentElement.innerHTML=ve?F:je}catch{}}const it=U.body||U.documentElement;return C&&K&&it.insertBefore(n.createTextNode(K),it.childNodes[0]||null),de===ue?D.call(U,Cn?"html":"body")[0]:Cn?U.documentElement:it},oE=function(C){return R.call(C.ownerDocument||C,C,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},uh=function(C){return C instanceof f&&(typeof C.nodeName!="string"||typeof C.textContent!="string"||typeof C.removeChild!="function"||!(C.attributes instanceof m)||typeof C.removeAttribute!="function"||typeof C.setAttribute!="function"||typeof C.namespaceURI!="string"||typeof C.insertBefore!="function"||typeof C.hasChildNodes!="function")},sE=function(C){return typeof s=="function"&&C instanceof s};function $n(q,C,U){Ll(q,K=>{K.call(t,C,U,Li)})}const lE=function(C){let U=null;if($n(ne.beforeSanitizeElements,C,null),uh(C))return ln(C),!0;const K=Ue(C.nodeName);if($n(ne.uponSanitizeElement,C,{tagName:K,allowedTags:I}),sn&&C.hasChildNodes()&&!sE(C.firstElementChild)&&dt(/<[/\w!]/g,C.innerHTML)&&dt(/<[/\w!]/g,C.textContent)||C.nodeType===bo.progressingInstruction||sn&&C.nodeType===bo.comment&&dt(/<[/\w]/g,C.data))return ln(C),!0;if(!(Ne.tagCheck instanceof Function&&Ne.tagCheck(K))&&(!I[K]||Se[K])){if(!Se[K]&&cE(K)&&(G.tagNameCheck instanceof RegExp&&dt(G.tagNameCheck,K)||G.tagNameCheck instanceof Function&&G.tagNameCheck(K)))return!1;if(Eo&&!g[K]){const je=P(C)||C.parentNode,it=E(C)||C.childNodes;if(it&&je){const Me=it.length;for(let kt=Me-1;kt>=0;--kt){const jn=j(it[kt],!0);jn.__removalCount=(C.__removalCount||0)+1,je.insertBefore(jn,w(C))}}}return ln(C),!0}return C instanceof l&&!eY(C)||(K==="noscript"||K==="noembed"||K==="noframes")&&dt(/<\/no(script|embed|frames)/i,C.innerHTML)?(ln(C),!0):(St&&C.nodeType===bo.text&&(U=C.textContent,Ll([ye,he,_e],je=>{U=fo(U,je," ")}),C.textContent!==U&&(ho(t.removed,{element:C.cloneNode()}),C.textContent=U)),$n(ne.afterSanitizeElements,C,null),!1)},uE=function(C,U,K){if(Fa&&(U==="id"||U==="name")&&(K in n||K in Q8))return!1;if(!(na&&!Re[U]&&dt(Ie,U))){if(!(Ze&&dt(Je,U))){if(!(Ne.attributeCheck instanceof Function&&Ne.attributeCheck(U,C))){if(!B[U]||Re[U]){if(!(cE(C)&&(G.tagNameCheck instanceof RegExp&&dt(G.tagNameCheck,C)||G.tagNameCheck instanceof Function&&G.tagNameCheck(C))&&(G.attributeNameCheck instanceof RegExp&&dt(G.attributeNameCheck,U)||G.attributeNameCheck instanceof Function&&G.attributeNameCheck(U,C))||U==="is"&&G.allowCustomizedBuiltInElements&&(G.tagNameCheck instanceof RegExp&&dt(G.tagNameCheck,K)||G.tagNameCheck instanceof Function&&G.tagNameCheck(K))))return!1}else if(!T[U]){if(!dt(ie,fo(K,O,""))){if(!((U==="src"||U==="xlink:href"||U==="href")&&C!=="script"&&m6(K,"data:")===0&&h[C])){if(!(Zl&&!dt(N,fo(K,O,"")))){if(K)return!1}}}}}}}return!0},cE=function(C){return C!=="annotation-xml"&&Tp(C,V)},dE=function(C){$n(ne.beforeSanitizeAttributes,C,null);const{attributes:U}=C;if(!U||uh(C))return;const K={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:B,forceKeepAttr:void 0};let je=U.length;for(;je--;){const it=U[je],{name:Me,namespaceURI:kt,value:jn}=it,Yi=Ue(Me),ch=jn;let Xe=Me==="value"?ch:p6(ch);if(K.attrName=Yi,K.attrValue=Xe,K.keepAttr=!0,K.forceKeepAttr=void 0,$n(ne.uponSanitizeAttribute,C,K),Xe=K.attrValue,Ct&&(Yi==="id"||Yi==="name")&&(Da(Me,C),Xe=xo+Xe),sn&&dt(/((--!?|])>)|<\/(style|title|textarea)/i,Xe)){Da(Me,C);continue}if(Yi==="attributename"&&Tp(Xe,"href")){Da(Me,C);continue}if(K.forceKeepAttr)continue;if(!K.keepAttr){Da(Me,C);continue}if(!vo&&dt(/\/>/i,Xe)){Da(Me,C);continue}St&&Ll([ye,he,_e],pE=>{Xe=fo(Xe,pE," ")});const mE=Ue(C.nodeName);if(!uE(mE,Yi,Xe)){Da(Me,C);continue}if($&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!kt)switch(y.getAttributeType(mE,Yi)){case"TrustedHTML":{Xe=$.createHTML(Xe);break}case"TrustedScriptURL":{Xe=$.createScriptURL(Xe);break}}if(Xe!==ch)try{kt?C.setAttributeNS(kt,Me,Xe):C.setAttribute(Me,Xe),uh(C)?ln(C):Sx(t.removed)}catch{Da(Me,C)}}$n(ne.afterSanitizeAttributes,C,null)},tY=function q(C){let U=null;const K=oE(C);for($n(ne.beforeSanitizeShadowDOM,C,null);U=K.nextNode();)$n(ne.uponSanitizeShadowNode,U,null),lE(U),dE(U),U.content instanceof r&&q(U.content);$n(ne.afterSanitizeShadowDOM,C,null)};return t.sanitize=function(q){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},U=null,K=null,je=null,it=null;if(ve=!q,ve&&(q="<!-->"),typeof q!="string"&&!sE(q))if(typeof q.toString=="function"){if(q=q.toString(),typeof q!="string")throw go("dirty is not a string, aborting")}else throw go("toString is not a function");if(!t.isSupported)return q;if(wo||lh(C),t.removed=[],typeof q=="string"&&(bt=!1),bt){if(q.nodeName){const jn=Ue(q.nodeName);if(!I[jn]||Se[jn])throw go("root node is forbidden and cannot be sanitized in-place")}}else if(q instanceof s)U=rE("<!---->"),K=U.ownerDocument.importNode(q,!0),K.nodeType===bo.element&&K.nodeName==="BODY"||K.nodeName==="HTML"?U=K:U.appendChild(K);else{if(!aa&&!St&&!Cn&&q.indexOf("<")===-1)return $&&Ma?$.createHTML(q):q;if(U=rE(q),!U)return aa?null:Ma?F:""}U&&Ia&&ln(U.firstChild);const Me=oE(bt?q:U);for(;je=Me.nextNode();)lE(je),dE(je),je.content instanceof r&&tY(je.content);if(bt)return q;if(aa){if(Ui)for(it=_.call(U.ownerDocument);U.firstChild;)it.appendChild(U.firstChild);else it=U;return(B.shadowroot||B.shadowrootmode)&&(it=X.call(a,it,!0)),it}let kt=Cn?U.outerHTML:U.innerHTML;return Cn&&I["!doctype"]&&U.ownerDocument&&U.ownerDocument.doctype&&U.ownerDocument.doctype.name&&dt(zx,U.ownerDocument.doctype.name)&&(kt="<!DOCTYPE "+U.ownerDocument.doctype.name+`>
|
|
5386
|
-
`+kt),St&&Ll([ye,he,_e],jn=>{kt=fo(kt,jn," ")})
|
|
5385
|
+
`;function QL({message:e,style:t}){return e?u.jsx("p",{style:{...t||{}},children:e}):null}function e6({name:e,id:t,hidden:n,label:a,hideLabel:i,type:r,value:o,placeholder:s,disabled:l=!1,onChange:c=()=>{},onBlur:m=()=>{},onKeyDown:f=()=>{},tabIndex:p,maxLength:y,autoFocus:k,errorMessage:S}){const b=C.useRef(null);t=t||`input-${e}`;const w=n?"gh-portal-input-section hidden":"gh-portal-input-section",E=i?"gh-portal-input-label hidden":"gh-portal-input-label",P=S?"gh-portal-input error":"gh-portal-input";Ai()&&(l=!0),$e(["preview"])&&(l=!0);let j="",F="",z="",R,_;switch(t){case"input-email":j="off",F="off",z="off";break;case"input-name":j="off",F="off";break;case"input-otc":j="one-time-code",F="off",z="off",R="numeric",_="[0-9]*",s??(s="• • • • • •");break}return C.useEffect(()=>{k&&b.current.focus()},[k]),u.jsxs("section",{className:w,children:[u.jsxs("div",{className:"gh-portal-input-labelcontainer",children:[u.jsxs("label",{htmlFor:t,className:E,children:[" ",a," "]}),u.jsx(QL,{message:S,name:e})]}),u.jsx("input",{"data-test-input":t,ref:b,id:t,className:P,type:r,name:e,value:o,placeholder:s,onChange:D=>c(D,e),onKeyDown:D=>f(D,e),onBlur:D=>m(D,e),disabled:l,tabIndex:p,maxLength:y,autoComplete:j,autoCorrect:F,autoCapitalize:z,"aria-label":a,inputMode:R,pattern:_})]})}const Zp=class Zp extends re.Component{render(){return u.jsx(u.Fragment,{children:u.jsxs("button",{className:"gh-portal-btn gh-portal-btn-site-title-back",onClick:()=>{this.props.onBack?this.props.onBack():this.context.doAction("closePopup")},children:[u.jsx("span",{children:"← "})," ",v("Back")]})})}};Zp.contextType=H;let xp=Zp;const t6=e=>C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",...e},C.createElement("g",{transform:"matrix(0.6666666666666666,0,0,0.6666666666666666,0,0)"},C.createElement("path",{d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-7.5,9a2,2,0,1,1,2-2A2,2,0,0,1,12,18.5ZM16.25,9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5V6.75a4.25,4.25,0,0,1,8.5,0Z",style:{fill:"#000000"}})));function n6({newsletter:e,subscribedNewsletters:t,setSubscribedNewsletters:n}){const a=t.some(i=>i.id===(e==null?void 0:e.id));return e.paid?u.jsxs("section",{className:"gh-portal-list-toggle-wrapper","data-testid":"toggle-wrapper",children:[u.jsxs("div",{className:"gh-portal-list-detail gh-portal-list-big",children:[u.jsx("h3",{children:e.name}),u.jsx("p",{children:e.description})]}),u.jsx("div",{className:"gh-portal-lock-icon-container",children:u.jsx(t6,{className:"gh-portal-lock-icon",alt:"",title:v("Unlock access to all newsletters by becoming a paid subscriber.")})})]}):u.jsxs("section",{className:"gh-portal-list-toggle-wrapper","data-testid":"toggle-wrapper",children:[u.jsxs("div",{className:"gh-portal-list-detail gh-portal-list-big",children:[u.jsx("h3",{children:e.name}),u.jsx("p",{children:e.description})]}),u.jsx("div",{children:u.jsx(Dl,{id:e.id,onToggle:(i,r)=>{let o=[];r?o=t.filter(s=>s.id!==e.id).concat(e):o=t.filter(s=>s.id!==e.id),n(o)},checked:a})})]})}function a6({subscribedNewsletters:e,setSubscribedNewsletters:t}){const{site:n}=C.useContext(H);return za({site:n}).map(i=>u.jsx(n6,{newsletter:i,subscribedNewsletters:e,setSubscribedNewsletters:t},i==null?void 0:i.id))}function Ep({pageData:e,onBack:t}){const{brandColor:n,site:a,doAction:i,action:r}=C.useContext(H),s=za({site:a}).filter(k=>k.subscribe_on_signup);let l=!1;r==="signup:running"&&(l=!0);let c=v("Continue"),m=!1;r==="signup:failed"&&(c=v("Retry"),m=!0);const f=r==="signup:running",[p,y]=C.useState(s);return u.jsxs("div",{className:"gh-portal-content with-footer gh-portal-newsletter-selection",children:[u.jsx("p",{className:"gh-portal-text-center gh-portal-text-large",children:v("Choose your newsletters")}),u.jsx("div",{className:"gh-portal-section",children:u.jsx("div",{className:"gh-portal-list",children:u.jsx(a6,{subscribedNewsletters:p,setSubscribedNewsletters:y})})}),u.jsx("footer",{className:"gh-portal-action-footer",children:u.jsxs("div",{style:{width:"100%"},children:[u.jsx("div",{style:{marginBottom:"20px"},children:u.jsx(ze,{isRunning:l,retry:m,disabled:f,onClick:()=>{let k=p.map(j=>({id:j.id,name:j.name}));const{name:S,email:b,plan:w,phonenumber:E,offerId:P}=e;i("signup",{name:S,email:b,plan:w,phonenumber:E,newsletters:k,offerId:P})},brandColor:n,label:c,style:{width:"100%"}})}),Ni({site:a})?null:u.jsx("div",{children:u.jsx("button",{className:"gh-portal-btn gh-portal-btn-link gh-portal-btn-different-plan",onClick:()=>{t()},children:u.jsx("span",{children:v("Choose a different plan")})})})]})})]})}const i6=({field:e,onChange:t,onBlur:n=()=>{},onKeyDown:a=()=>{}})=>e?u.jsx(u.Fragment,{children:u.jsx(e6,{label:e.label,type:e.type,name:e.name,hidden:e.hidden,placeholder:e.placeholder,disabled:e.disabled,value:e.value,onKeyDown:a,onChange:i=>t(i,e),onBlur:i=>n(i,e),tabIndex:e.tabIndex,errorMessage:e.errorMessage,autoFocus:e.autoFocus},e.name)}):null;class Rl extends C.Component{constructor(t){super(t),this.state={}}render(){const{fields:t,onChange:n,onBlur:a,onKeyDown:i}=this.props,r=t.map(o=>u.jsx(i6,{field:o,onChange:n,onBlur:a,onKeyDown:i},o.name));return u.jsx(u.Fragment,{children:r})}}const r6=e=>!!e&&/^[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])?)*$/.test(String(e).toLowerCase()),o6=({field:e})=>{if(e.required&&!e.value)switch(e.name){case"name":return v("Enter your name");case"email":return v("Enter your email address");default:return v("Please enter {fieldName}",{fieldName:e.name})}return e.type==="email"&&!r6(e.value)?v("Invalid email address"):null},Ul=({fields:e})=>{const t={};return e.forEach(n=>{const a=n.name,i=o6({field:n});t[a]=i}),t},vx=e=>C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",...e},C.createElement("defs",null,C.createElement("style",null,".inviteicon{fill: currentColor;}")),C.createElement("path",{className:"inviteicon",d:"M23.991 11.464l-.036-.146-.028-.068-.011-.027-.115-.114-.018-.021-.008-.005h-.001l-3.774-2.596v-7.987c0-.276-.224-.5-.5-.5h-15c-.276 0-.5.224-.5.5v7.987l-3.774 2.595-.003.002-.006.004-.015.016-.118.118-.011.027-.028.068-.036.146-.009.037v10.5c0 1.103.897 2 2 2h20c1.103 0 2-.897 2-2v-10.5l-.009-.036zm-1.383.03l-2.608 1.738v-3.531l2.608 1.793zm-18.608 1.738l-2.608-1.739 2.608-1.792v3.531zm18 9.768h-20c-.551 0-1-.449-1-1v-9.566l5.223 3.482c.085.057.181.084.276.084.162 0 .32-.078.417-.223.153-.23.091-.54-.139-.693l-1.777-1.185v-12.899h14v12.899l-1.777 1.185c-.23.153-.292.463-.139.693.096.145.255.223.416.223.095 0 .191-.027.277-.084l5.223-3.482v9.566c0 .551-.449 1-1 1zM15.812 16.109c-.088-.07-.198-.109-.312-.109h-7c-.114 0-.224.039-.312.109l-5 4c-.215.173-.25.487-.078.703.173.215.487.251.703.078l4.862-3.89h6.649l4.863 3.891c.093.073.203.109.313.109.147 0 .292-.065.391-.188.172-.216.137-.53-.078-.703l-5.001-4zM11.706 12.779c.087.064.191.096.294.096s.207-.032.294-.096c.482-.35 4.706-3.497 4.706-6.101 0-1.868-1.387-2.984-2.728-2.984-.772 0-1.674.379-2.272 1.368-.598-.988-1.5-1.368-2.272-1.368-1.341-.001-2.728 1.116-2.728 2.984 0 2.604 4.224 5.751 4.706 6.101zm-1.978-8.086c.844 0 1.511.681 1.786 1.822.108.45.864.45.973 0 .274-1.141.942-1.822 1.786-1.822.85 0 1.728.742 1.728 1.984 0 1.646-2.658 4.037-4 5.072-1.342-1.035-4-3.426-4-5.072-.001-1.241.877-1.984 1.727-1.984z"})),wx=e=>{if(e.currentTarget.contains(e.target)){const t=e.target.closest("a");t&&(e.preventDefault(),window.open(t.href,"_blank"))}};/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */const{entries:xx,setPrototypeOf:Ex,isFrozen:s6,getPrototypeOf:l6,getOwnPropertyDescriptor:u6}=Object;let{freeze:ct,seal:Dt,create:Sp}=Object,{apply:Cp,construct:$p}=typeof Reflect<"u"&&Reflect;ct||(ct=function(t){return t}),Dt||(Dt=function(t){return t}),Cp||(Cp=function(t,n){for(var a=arguments.length,i=new Array(a>2?a-2:0),r=2;r<a;r++)i[r-2]=arguments[r];return t.apply(n,i)}),$p||($p=function(t){for(var n=arguments.length,a=new Array(n>1?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];return new t(...a)});const Ll=mt(Array.prototype.forEach),c6=mt(Array.prototype.lastIndexOf),Sx=mt(Array.prototype.pop),ho=mt(Array.prototype.push),d6=mt(Array.prototype.splice),Yl=mt(String.prototype.toLowerCase),jp=mt(String.prototype.toString),Tp=mt(String.prototype.match),fo=mt(String.prototype.replace),m6=mt(String.prototype.indexOf),p6=mt(String.prototype.trim),Ht=mt(Object.prototype.hasOwnProperty),dt=mt(RegExp.prototype.test),go=h6(TypeError);function mt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,a=new Array(n>1?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];return Cp(e,t,a)}}function h6(e){return function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return $p(e,n)}}function ae(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Yl;Ex&&Ex(e,null);let a=t.length;for(;a--;){let i=t[a];if(typeof i=="string"){const r=n(i);r!==i&&(s6(t)||(t[a]=r),i=r)}e[i]=!0}return e}function f6(e){for(let t=0;t<e.length;t++)Ht(e,t)||(e[t]=null);return e}function on(e){const t=Sp(null);for(const[n,a]of xx(e))Ht(e,n)&&(Array.isArray(a)?t[n]=f6(a):a&&typeof a=="object"&&a.constructor===Object?t[n]=on(a):t[n]=a);return t}function yo(e,t){for(;e!==null;){const a=u6(e,t);if(a){if(a.get)return mt(a.get);if(typeof a.value=="function")return mt(a.value)}e=l6(e)}function n(){return null}return n}const Cx=ct(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Pp=ct(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),zp=ct(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),g6=ct(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ap=ct(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),y6=ct(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),$x=ct(["#text"]),jx=ct(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Np=ct(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Tx=ct(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Bl=ct(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),b6=Dt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),k6=Dt(/<%[\w\W]*|[\w\W]*%>/gm),v6=Dt(/\$\{[\w\W]*/gm),w6=Dt(/^data-[\-\w.\u00B7-\uFFFF]+$/),x6=Dt(/^aria-[\-\w]+$/),Px=Dt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),E6=Dt(/^(?:\w+script|data):/i),S6=Dt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),zx=Dt(/^html$/i),C6=Dt(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ax=Object.freeze({__proto__:null,ARIA_ATTR:x6,ATTR_WHITESPACE:S6,CUSTOM_ELEMENT:C6,DATA_ATTR:w6,DOCTYPE_NAME:zx,ERB_EXPR:k6,IS_ALLOWED_URI:Px,IS_SCRIPT_OR_DATA:E6,MUSTACHE_EXPR:b6,TMPLIT_EXPR:v6});const bo={element:1,text:3,progressingInstruction:7,comment:8,document:9},$6=function(){return typeof window>"u"?null:window},j6=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let a=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(a=n.getAttribute(i));const r="dompurify"+(a?"#"+a:"");try{return t.createPolicy(r,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},Nx=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ix(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$6();const t=q=>Ix(q);if(t.version="3.3.1",t.removed=[],!e||!e.document||e.document.nodeType!==bo.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const a=n,i=a.currentScript,{DocumentFragment:r,HTMLTemplateElement:o,Node:s,Element:l,NodeFilter:c,NamedNodeMap:m=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:p,trustedTypes:y}=e,k=l.prototype,S=yo(k,"cloneNode"),b=yo(k,"remove"),w=yo(k,"nextSibling"),E=yo(k,"childNodes"),P=yo(k,"parentNode");if(typeof o=="function"){const q=n.createElement("template");q.content&&q.content.ownerDocument&&(n=q.content.ownerDocument)}let j,F="";const{implementation:z,createNodeIterator:R,createDocumentFragment:_,getElementsByTagName:D}=n,{importNode:X}=a;let ne=Nx();t.isSupported=typeof xx=="function"&&typeof P=="function"&&z&&z.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ye,ERB_EXPR:he,TMPLIT_EXPR:_e,DATA_ATTR:Ie,ARIA_ATTR:Je,IS_SCRIPT_OR_DATA:N,ATTR_WHITESPACE:O,CUSTOM_ELEMENT:V}=Ax;let{IS_ALLOWED_URI:ie}=Ax,I=null;const Y=ae({},[...Cx,...Pp,...zp,...Ap,...$x]);let B=null;const Z=ae({},[...jx,...Np,...Tx,...Bl]);let G=Object.seal(Sp(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Se=null,Re=null;const Ne=Object.seal(Sp(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ze=!0,na=!0,Zl=!1,vo=!0,St=!1,sn=!0,Cn=!1,wo=!1,Ia=!1,aa=!1,Ui=!1,Ma=!1,Fa=!0,Ct=!1;const xo="user-content-";let Eo=!0,bt=!1,ia={},g=null;const d=ae({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let h=null;const x=ae({},["audio","video","img","source","image","track"]);let T=null;const A=ae({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),M="http://www.w3.org/1998/Math/MathML",te="http://www.w3.org/2000/svg",ue="http://www.w3.org/1999/xhtml";let de=ue,ve=!1,me=null;const q8=ae({},[M,te,ue],jp);let Xl=ae({},["mi","mo","mn","ms","mtext"]),Ql=ae({},["annotation-xml"]);const J8=ae({},["title","style","font","a","script"]);let So=null;const Z8=["application/xhtml+xml","text/html"],X8="text/html";let Ue=null,Li=null;const Q8=n.createElement("form"),nE=function($){return $ instanceof RegExp||$ instanceof Function},lh=function(){let $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Li&&Li===$)){if((!$||typeof $!="object")&&($={}),$=on($),So=Z8.indexOf($.PARSER_MEDIA_TYPE)===-1?X8:$.PARSER_MEDIA_TYPE,Ue=So==="application/xhtml+xml"?jp:Yl,I=Ht($,"ALLOWED_TAGS")?ae({},$.ALLOWED_TAGS,Ue):Y,B=Ht($,"ALLOWED_ATTR")?ae({},$.ALLOWED_ATTR,Ue):Z,me=Ht($,"ALLOWED_NAMESPACES")?ae({},$.ALLOWED_NAMESPACES,jp):q8,T=Ht($,"ADD_URI_SAFE_ATTR")?ae(on(A),$.ADD_URI_SAFE_ATTR,Ue):A,h=Ht($,"ADD_DATA_URI_TAGS")?ae(on(x),$.ADD_DATA_URI_TAGS,Ue):x,g=Ht($,"FORBID_CONTENTS")?ae({},$.FORBID_CONTENTS,Ue):d,Se=Ht($,"FORBID_TAGS")?ae({},$.FORBID_TAGS,Ue):on({}),Re=Ht($,"FORBID_ATTR")?ae({},$.FORBID_ATTR,Ue):on({}),ia=Ht($,"USE_PROFILES")?$.USE_PROFILES:!1,Ze=$.ALLOW_ARIA_ATTR!==!1,na=$.ALLOW_DATA_ATTR!==!1,Zl=$.ALLOW_UNKNOWN_PROTOCOLS||!1,vo=$.ALLOW_SELF_CLOSE_IN_ATTR!==!1,St=$.SAFE_FOR_TEMPLATES||!1,sn=$.SAFE_FOR_XML!==!1,Cn=$.WHOLE_DOCUMENT||!1,aa=$.RETURN_DOM||!1,Ui=$.RETURN_DOM_FRAGMENT||!1,Ma=$.RETURN_TRUSTED_TYPE||!1,Ia=$.FORCE_BODY||!1,Fa=$.SANITIZE_DOM!==!1,Ct=$.SANITIZE_NAMED_PROPS||!1,Eo=$.KEEP_CONTENT!==!1,bt=$.IN_PLACE||!1,ie=$.ALLOWED_URI_REGEXP||Px,de=$.NAMESPACE||ue,Xl=$.MATHML_TEXT_INTEGRATION_POINTS||Xl,Ql=$.HTML_INTEGRATION_POINTS||Ql,G=$.CUSTOM_ELEMENT_HANDLING||{},$.CUSTOM_ELEMENT_HANDLING&&nE($.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(G.tagNameCheck=$.CUSTOM_ELEMENT_HANDLING.tagNameCheck),$.CUSTOM_ELEMENT_HANDLING&&nE($.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(G.attributeNameCheck=$.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),$.CUSTOM_ELEMENT_HANDLING&&typeof $.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(G.allowCustomizedBuiltInElements=$.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),St&&(na=!1),Ui&&(aa=!0),ia&&(I=ae({},$x),B=[],ia.html===!0&&(ae(I,Cx),ae(B,jx)),ia.svg===!0&&(ae(I,Pp),ae(B,Np),ae(B,Bl)),ia.svgFilters===!0&&(ae(I,zp),ae(B,Np),ae(B,Bl)),ia.mathMl===!0&&(ae(I,Ap),ae(B,Tx),ae(B,Bl))),$.ADD_TAGS&&(typeof $.ADD_TAGS=="function"?Ne.tagCheck=$.ADD_TAGS:(I===Y&&(I=on(I)),ae(I,$.ADD_TAGS,Ue))),$.ADD_ATTR&&(typeof $.ADD_ATTR=="function"?Ne.attributeCheck=$.ADD_ATTR:(B===Z&&(B=on(B)),ae(B,$.ADD_ATTR,Ue))),$.ADD_URI_SAFE_ATTR&&ae(T,$.ADD_URI_SAFE_ATTR,Ue),$.FORBID_CONTENTS&&(g===d&&(g=on(g)),ae(g,$.FORBID_CONTENTS,Ue)),$.ADD_FORBID_CONTENTS&&(g===d&&(g=on(g)),ae(g,$.ADD_FORBID_CONTENTS,Ue)),Eo&&(I["#text"]=!0),Cn&&ae(I,["html","head","body"]),I.table&&(ae(I,["tbody"]),delete Se.tbody),$.TRUSTED_TYPES_POLICY){if(typeof $.TRUSTED_TYPES_POLICY.createHTML!="function")throw go('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof $.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw go('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');j=$.TRUSTED_TYPES_POLICY,F=j.createHTML("")}else j===void 0&&(j=j6(y,i)),j!==null&&typeof F=="string"&&(F=j.createHTML(""));ct&&ct($),Li=$}},aE=ae({},[...Pp,...zp,...g6]),iE=ae({},[...Ap,...y6]),eY=function($){let U=P($);(!U||!U.tagName)&&(U={namespaceURI:de,tagName:"template"});const K=Yl($.tagName),je=Yl(U.tagName);return me[$.namespaceURI]?$.namespaceURI===te?U.namespaceURI===ue?K==="svg":U.namespaceURI===M?K==="svg"&&(je==="annotation-xml"||Xl[je]):!!aE[K]:$.namespaceURI===M?U.namespaceURI===ue?K==="math":U.namespaceURI===te?K==="math"&&Ql[je]:!!iE[K]:$.namespaceURI===ue?U.namespaceURI===te&&!Ql[je]||U.namespaceURI===M&&!Xl[je]?!1:!iE[K]&&(J8[K]||!aE[K]):!!(So==="application/xhtml+xml"&&me[$.namespaceURI]):!1},ln=function($){ho(t.removed,{element:$});try{P($).removeChild($)}catch{b($)}},Da=function($,U){try{ho(t.removed,{attribute:U.getAttributeNode($),from:U})}catch{ho(t.removed,{attribute:null,from:U})}if(U.removeAttribute($),$==="is")if(aa||Ui)try{ln(U)}catch{}else try{U.setAttribute($,"")}catch{}},rE=function($){let U=null,K=null;if(Ia)$="<remove></remove>"+$;else{const Me=Tp($,/^[\r\n\t ]+/);K=Me&&Me[0]}So==="application/xhtml+xml"&&de===ue&&($='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+$+"</body></html>");const je=j?j.createHTML($):$;if(de===ue)try{U=new p().parseFromString(je,So)}catch{}if(!U||!U.documentElement){U=z.createDocument(de,"template",null);try{U.documentElement.innerHTML=ve?F:je}catch{}}const it=U.body||U.documentElement;return $&&K&&it.insertBefore(n.createTextNode(K),it.childNodes[0]||null),de===ue?D.call(U,Cn?"html":"body")[0]:Cn?U.documentElement:it},oE=function($){return R.call($.ownerDocument||$,$,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},uh=function($){return $ instanceof f&&(typeof $.nodeName!="string"||typeof $.textContent!="string"||typeof $.removeChild!="function"||!($.attributes instanceof m)||typeof $.removeAttribute!="function"||typeof $.setAttribute!="function"||typeof $.namespaceURI!="string"||typeof $.insertBefore!="function"||typeof $.hasChildNodes!="function")},sE=function($){return typeof s=="function"&&$ instanceof s};function $n(q,$,U){Ll(q,K=>{K.call(t,$,U,Li)})}const lE=function($){let U=null;if($n(ne.beforeSanitizeElements,$,null),uh($))return ln($),!0;const K=Ue($.nodeName);if($n(ne.uponSanitizeElement,$,{tagName:K,allowedTags:I}),sn&&$.hasChildNodes()&&!sE($.firstElementChild)&&dt(/<[/\w!]/g,$.innerHTML)&&dt(/<[/\w!]/g,$.textContent)||$.nodeType===bo.progressingInstruction||sn&&$.nodeType===bo.comment&&dt(/<[/\w]/g,$.data))return ln($),!0;if(!(Ne.tagCheck instanceof Function&&Ne.tagCheck(K))&&(!I[K]||Se[K])){if(!Se[K]&&cE(K)&&(G.tagNameCheck instanceof RegExp&&dt(G.tagNameCheck,K)||G.tagNameCheck instanceof Function&&G.tagNameCheck(K)))return!1;if(Eo&&!g[K]){const je=P($)||$.parentNode,it=E($)||$.childNodes;if(it&&je){const Me=it.length;for(let kt=Me-1;kt>=0;--kt){const jn=S(it[kt],!0);jn.__removalCount=($.__removalCount||0)+1,je.insertBefore(jn,w($))}}}return ln($),!0}return $ instanceof l&&!eY($)||(K==="noscript"||K==="noembed"||K==="noframes")&&dt(/<\/no(script|embed|frames)/i,$.innerHTML)?(ln($),!0):(St&&$.nodeType===bo.text&&(U=$.textContent,Ll([ye,he,_e],je=>{U=fo(U,je," ")}),$.textContent!==U&&(ho(t.removed,{element:$.cloneNode()}),$.textContent=U)),$n(ne.afterSanitizeElements,$,null),!1)},uE=function($,U,K){if(Fa&&(U==="id"||U==="name")&&(K in n||K in Q8))return!1;if(!(na&&!Re[U]&&dt(Ie,U))){if(!(Ze&&dt(Je,U))){if(!(Ne.attributeCheck instanceof Function&&Ne.attributeCheck(U,$))){if(!B[U]||Re[U]){if(!(cE($)&&(G.tagNameCheck instanceof RegExp&&dt(G.tagNameCheck,$)||G.tagNameCheck instanceof Function&&G.tagNameCheck($))&&(G.attributeNameCheck instanceof RegExp&&dt(G.attributeNameCheck,U)||G.attributeNameCheck instanceof Function&&G.attributeNameCheck(U,$))||U==="is"&&G.allowCustomizedBuiltInElements&&(G.tagNameCheck instanceof RegExp&&dt(G.tagNameCheck,K)||G.tagNameCheck instanceof Function&&G.tagNameCheck(K))))return!1}else if(!T[U]){if(!dt(ie,fo(K,O,""))){if(!((U==="src"||U==="xlink:href"||U==="href")&&$!=="script"&&m6(K,"data:")===0&&h[$])){if(!(Zl&&!dt(N,fo(K,O,"")))){if(K)return!1}}}}}}}return!0},cE=function($){return $!=="annotation-xml"&&Tp($,V)},dE=function($){$n(ne.beforeSanitizeAttributes,$,null);const{attributes:U}=$;if(!U||uh($))return;const K={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:B,forceKeepAttr:void 0};let je=U.length;for(;je--;){const it=U[je],{name:Me,namespaceURI:kt,value:jn}=it,Yi=Ue(Me),ch=jn;let Xe=Me==="value"?ch:p6(ch);if(K.attrName=Yi,K.attrValue=Xe,K.keepAttr=!0,K.forceKeepAttr=void 0,$n(ne.uponSanitizeAttribute,$,K),Xe=K.attrValue,Ct&&(Yi==="id"||Yi==="name")&&(Da(Me,$),Xe=xo+Xe),sn&&dt(/((--!?|])>)|<\/(style|title|textarea)/i,Xe)){Da(Me,$);continue}if(Yi==="attributename"&&Tp(Xe,"href")){Da(Me,$);continue}if(K.forceKeepAttr)continue;if(!K.keepAttr){Da(Me,$);continue}if(!vo&&dt(/\/>/i,Xe)){Da(Me,$);continue}St&&Ll([ye,he,_e],pE=>{Xe=fo(Xe,pE," ")});const mE=Ue($.nodeName);if(!uE(mE,Yi,Xe)){Da(Me,$);continue}if(j&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!kt)switch(y.getAttributeType(mE,Yi)){case"TrustedHTML":{Xe=j.createHTML(Xe);break}case"TrustedScriptURL":{Xe=j.createScriptURL(Xe);break}}if(Xe!==ch)try{kt?$.setAttributeNS(kt,Me,Xe):$.setAttribute(Me,Xe),uh($)?ln($):Sx(t.removed)}catch{Da(Me,$)}}$n(ne.afterSanitizeAttributes,$,null)},tY=function q($){let U=null;const K=oE($);for($n(ne.beforeSanitizeShadowDOM,$,null);U=K.nextNode();)$n(ne.uponSanitizeShadowNode,U,null),lE(U),dE(U),U.content instanceof r&&q(U.content);$n(ne.afterSanitizeShadowDOM,$,null)};return t.sanitize=function(q){let $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},U=null,K=null,je=null,it=null;if(ve=!q,ve&&(q="<!-->"),typeof q!="string"&&!sE(q))if(typeof q.toString=="function"){if(q=q.toString(),typeof q!="string")throw go("dirty is not a string, aborting")}else throw go("toString is not a function");if(!t.isSupported)return q;if(wo||lh($),t.removed=[],typeof q=="string"&&(bt=!1),bt){if(q.nodeName){const jn=Ue(q.nodeName);if(!I[jn]||Se[jn])throw go("root node is forbidden and cannot be sanitized in-place")}}else if(q instanceof s)U=rE("<!---->"),K=U.ownerDocument.importNode(q,!0),K.nodeType===bo.element&&K.nodeName==="BODY"||K.nodeName==="HTML"?U=K:U.appendChild(K);else{if(!aa&&!St&&!Cn&&q.indexOf("<")===-1)return j&&Ma?j.createHTML(q):q;if(U=rE(q),!U)return aa?null:Ma?F:""}U&&Ia&&ln(U.firstChild);const Me=oE(bt?q:U);for(;je=Me.nextNode();)lE(je),dE(je),je.content instanceof r&&tY(je.content);if(bt)return q;if(aa){if(Ui)for(it=_.call(U.ownerDocument);U.firstChild;)it.appendChild(U.firstChild);else it=U;return(B.shadowroot||B.shadowrootmode)&&(it=X.call(a,it,!0)),it}let kt=Cn?U.outerHTML:U.innerHTML;return Cn&&I["!doctype"]&&U.ownerDocument&&U.ownerDocument.doctype&&U.ownerDocument.doctype.name&&dt(zx,U.ownerDocument.doctype.name)&&(kt="<!DOCTYPE "+U.ownerDocument.doctype.name+`>
|
|
5386
|
+
`+kt),St&&Ll([ye,he,_e],jn=>{kt=fo(kt,jn," ")}),j&&Ma?j.createHTML(kt):kt},t.setConfig=function(){let q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};lh(q),wo=!0},t.clearConfig=function(){Li=null,wo=!1},t.isValidAttribute=function(q,$,U){Li||lh({});const K=Ue(q),je=Ue($);return uE(K,je,U)},t.addHook=function(q,$){typeof $=="function"&&ho(ne[q],$)},t.removeHook=function(q,$){if($!==void 0){const U=c6(ne[q],$);return U===-1?void 0:d6(ne[q],U,1)[0]}return Sx(ne[q])},t.removeHooks=function(q){ne[q]=[]},t.removeAllHooks=function(){ne=Nx()},t}var T6=Ix();function Mx(e){return e?T6.sanitize(e,{ALLOWED_TAGS:["a","b","i","em","strong","p","br","ul","ol","li","span"],ALLOWED_ATTR:["href","target","rel","class"]}):""}function P6(e){return!e||typeof e!="string"||!/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{4}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/.test(e)?"":e}const z6=`
|
|
5387
5387
|
.gh-portal-back-sitetitle {
|
|
5388
5388
|
position: absolute;
|
|
5389
5389
|
top: 35px;
|
|
@@ -5723,7 +5723,7 @@ html[dir=rtl] .gh-portal-signup-terms .checkbox:before {
|
|
|
5723
5723
|
transform: translateX(-50%);
|
|
5724
5724
|
}
|
|
5725
5725
|
}
|
|
5726
|
-
`,Xp=class Xp extends re.Component{constructor(t){super(t),this.handleSelectPlan=(n,a)=>{n&&n.preventDefault(),this.timeoutId=setTimeout(()=>{this.setState(()=>({plan:a}))},5)},this.state={name:"",email:"",plan:"free",showNewsletterSelection:!1,termsCheckboxChecked:!1},this.termsRef=re.createRef()}componentDidMount(){const{member:t}=this.context;t&&this.context.doAction("switchPage",{page:"accountHome"}),this.handleSelectedPlan()}componentDidUpdate(){this.handleSelectedPlan()}handleSelectedPlan(){const{site:t,pageQuery:n}=this.context,a=Ml({site:t,pageQuery:n}),i=this.getSelectedPriceId(a,this.state.plan);i!==this.state.plan&&this.setState({plan:i})}componentWillUnmount(){clearTimeout(this.timeoutId)}getFormErrors(t){const a=this.context.site.portal_signup_checkbox_required&&this.context.site.portal_signup_terms_html&&!t.termsCheckboxChecked;return{...Ul({fields:this.getInputFields({state:t})}),checkbox:a}}doSignup(){this.setState(t=>({errors:this.getFormErrors(t)}),()=>{const{site:t,doAction:n}=this.context,{name:a,email:i,plan:r,phonenumber:o,token:s,errors:l}=this.state,c=l&&Object.values(l).filter(p=>!!p).length>0,m={...l};delete m.checkbox,(l==null?void 0:l.checkbox)&&Object.values(m).every(p=>!p)&&this.termsRef.current&&this.termsRef.current.scrollIntoView({behavior:"smooth",block:"center"}),c||(lo({site:t})?this.setState({showNewsletterSelection:!0,pageData:{name:a,email:i,plan:r,phonenumber:o,token:s},errors:{}}):(this.setState({errors:{}}),n("signup",{name:a,email:i,phonenumber:o,plan:r,token:s})))})}handleSignup(t){t.preventDefault(),this.doSignup()}handleChooseSignup(t,n){t.preventDefault(),this.setState({plan:n},()=>{this.doSignup()})}handleInputChange(t,n){const a=n.name,i=t.target.value;this.setState({[a]:i})}onKeyDown(t){t.keyCode===13&&this.handleSignup(t)}getSelectedPriceId(t=[],n){return!t||t.length===0||n==="free"?"free":t.some(i=>i.id===n)?n:t[0].id||"free"}getInputFields({state:t,fieldNames:n}){const{site:{portal_name:a}}=this.context,i=t.errors||{},r=[{type:"email",value:t.email,placeholder:v("jamie@example.com"),label:v("Email"),name:"email",required:!0,tabIndex:2,errorMessage:i.email||""},{type:"text",value:t.phonenumber,placeholder:v("+1 (123) 456-7890"),label:v("Phone number"),name:"phonenumber",required:!1,tabIndex:-1,autoComplete:"off",hidden:!0}];return a&&r.unshift({type:"text",value:t.name,placeholder:v("Jamie Larson"),label:v("Name"),name:"name",required:!0,tabIndex:1,errorMessage:i.name||""}),r[0].autoFocus=!0,n&&n.length>0?r.filter(o=>n.includes(o.name)):r}renderSignupTerms(){var s;const{site:t}=this.context;if(t.portal_signup_terms_html===null||t.portal_signup_terms_html==="")return null;const n=l=>{this.setState({termsCheckboxChecked:l.target.checked})},a=u.jsx("div",{className:"gh-portal-signup-terms-content",dangerouslySetInnerHTML:{__html:Mx(t.portal_signup_terms_html)}}),i=t.portal_signup_checkbox_required?u.jsxs("label",{children:[u.jsx("input",{type:"checkbox",checked:!!this.state.termsCheckboxChecked,required:!0,onChange:n}),u.jsx("span",{className:"checkbox"}),a]}):a,o=`gh-portal-signup-terms ${(s=this.state.errors)!=null&&s.checkbox?"gh-portal-error":""}`;return u.jsx("div",{className:o,onClick:wx,ref:this.termsRef,children:i})}renderSubmitButton(){const{action:t,site:n,brandColor:a,pageQuery:i}=this.context;if(Vt({site:n})||!Sn({site:n,pageQuery:i}))return null;let r=v("Continue");const o=i==="free"&&tp({site:n});if(Ni({site:n})||o)r=v("Sign up");else return null;let s=!1;t==="signup:running"&&(r=v("Sending..."),s=!0);let l=!1;t==="signup:failed"&&(r=v("Retry"),l=!0);const c=t==="signup:running";return u.jsx(ze,{style:{width:"100%"},retry:l,onClick:m=>this.handleSignup(m),disabled:c,brandColor:a,label:r,isRunning:s,tabIndex:3})}renderProducts(){const{site:t,pageQuery:n}=this.context,a=Al({site:t,pageQuery:n}),i=this.state.errors||{},r={};return Object.keys(i).length>0&&this.state.plan&&(r[this.state.plan]=v("Please fill in required fields")),u.jsx(u.Fragment,{children:u.jsx(bx,{handleChooseSignup:(...o)=>this.handleChooseSignup(...o),products:a,onPlanSelect:this.handleSelectPlan,errors:r})})}renderFreeTrialMessage(){const{site:t,pageQuery:n}=this.context;return Nl({site:t,pageQuery:n})&&!Vt({site:t})&&Sn({site:t,pageQuery:n})?u.jsx("p",{className:"gh-portal-free-trial-notification","data-testid":"free-trial-notification-text",children:v("After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.")}):null}renderLoginMessage(){const{brandColor:t,doAction:n}=this.context;return u.jsxs("div",{children:[this.renderFreeTrialMessage(),u.jsxs("div",{className:"gh-portal-signup-message",children:[u.jsx("div",{children:v("Already a member?")}),u.jsx("button",{"data-test-button":"signin-switch","data-testid":"signin-switch",className:"gh-portal-btn gh-portal-btn-link",style:{color:t},onClick:()=>n("switchPage",{page:"signin"}),children:u.jsx("span",{children:v("Sign in")})})]})]})}renderForm(){const t=this.getInputFields({state:this.state}),{site:n,pageQuery:a}=this.context;if(this.state.showNewsletterSelection)return u.jsx(Ep,{pageData:this.state.pageData,onBack:()=>{this.setState({showNewsletterSelection:!1})}});if(Vt({site:n}))return this.renderInviteOnlyMessage();if(zU({site:n})&&a==="free")return this.renderPaidMembersOnlyMessage();if(!$l({site:n})||!Sn({site:n,pageQuery:a}))return ea({site:n})?this.renderInviteOnlyMessage():this.renderMembersDisabledMessage();const i=a==="free"&&tp({site:n}),r=Ni({site:n})||i,o=this.renderSignupTerms();return u.jsx("section",{className:"gh-portal-signup",children:u.jsxs("div",{className:"gh-portal-section",children:[u.jsx("div",{className:"gh-portal-logged-out-form-container",children:u.jsx(Rl,{fields:t,onChange:(s,l)=>this.handleInputChange(s,l),onKeyDown:s=>this.onKeyDown(s)})}),u.jsxs("div",{children:[r?u.jsxs(u.Fragment,{children:[this.renderProducts(),o&&u.jsx("div",{className:"gh-portal-signup-terms-wrapper free-only",children:o})]}):u.jsxs(u.Fragment,{children:[o&&u.jsx("div",{className:"gh-portal-signup-terms-wrapper",children:o}),this.renderProducts()]}),r?u.jsx("div",{className:"gh-portal-btn-container",children:u.jsxs("div",{className:"gh-portal-logged-out-form-container",children:[this.renderSubmitButton(),this.renderLoginMessage()]})}):this.renderLoginMessage()]})]})})}renderPaidMembersOnlyMessage(){return u.jsx("section",{children:u.jsxs("div",{className:"gh-portal-section",children:[u.jsx("p",{className:"gh-portal-paid-members-only-notification","data-testid":"paid-members-only-notification-text",children:v("This site only accepts paid members.")}),this.renderLoginMessage()]})})}renderInviteOnlyMessage(){return u.jsx("section",{children:u.jsxs("div",{className:"gh-portal-section",children:[u.jsx("p",{className:"gh-portal-invite-only-notification","data-testid":"invite-only-notification-text",children:v("This site is invite-only, contact the owner for access.")}),this.renderLoginMessage()]})})}renderMembersDisabledMessage(){return u.jsx("section",{children:u.jsx("div",{className:"gh-portal-section",children:u.jsx("p",{className:"gh-portal-members-disabled-notification","data-testid":"members-disabled-notification-text",children:v("Memberships unavailable, contact the owner for access.")})})})}renderSiteIcon(){const{site:t,pageQuery:n}=this.context,a=t.icon;return a?u.jsx("img",{className:"gh-portal-signup-logo",src:a,alt:t.title}):!Sn({site:t,pageQuery:n})||Vt({site:t})||!$l({site:t})?u.jsx(vx,{className:"gh-portal-icon gh-portal-icon-invitation"}):null}renderFormHeader(){const{site:t}=this.context,n=t.title||"";return u.jsxs("header",{className:"gh-portal-signup-header",children:[this.renderSiteIcon(),u.jsx("h1",{className:"gh-portal-main-title","data-testid":"site-title-text",children:n})]})}getClassNames(){const{site:t,pageQuery:n}=this.context,a=Ml({site:t,pageQuery:n}),i=this.getInputFields({state:this.state});let r="",o="";return(a.length<=1||Vt({site:t}))&&(a.length===1&&a[0].type==="free"||Vt({site:t})?(r=FU({site:t})?"singleplan":"noplan",i.length===1&&(r="single-field"),Vt({site:t})&&(o="invite-only",r="invite-only")):r="singleplan"),{sectionClass:r,footerClass:o}}render(){let{sectionClass:t}=this.getClassNames();return u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"gh-portal-back-sitetitle",children:u.jsx(xp,{onBack:()=>{this.state.showNewsletterSelection?this.setState({showNewsletterSelection:!1}):this.context.doAction("closePopup")}})}),u.jsx(Oe,{}),u.jsxs("div",{className:"gh-portal-content signup "+t,children:[this.renderFormHeader(),this.renderForm()]})]})}};Xp.contextType=H;let Ip=Xp;const Fx=e=>S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},S.createElement("defs",null,S.createElement("style",null,".a{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1px;}")),S.createElement("rect",{className:"a",x:.75,y:4.5,width:22.5,height:15,rx:1.5,ry:1.5}),S.createElement("line",{className:"a",x1:15.687,y1:9.975,x2:19.5,y2:13.5}),S.createElement("line",{className:"a",x1:8.313,y1:9.975,x2:4.5,y2:13.5}),S.createElement("path",{className:"a",d:"M22.88,5.014l-9.513,6.56a2.406,2.406,0,0,1-2.734,0L1.12,5.014"})),A6=e=>{var t;return typeof((t=e.userAgentData)==null?void 0:t.platform)=="string"?e.userAgentData.platform==="Android":/android/i.test(e.userAgent)},N6=e=>/chrome/i.test(e.userAgent),I6=e=>A6(e)&&N6(e),Dx=(e,t)=>Object.hasOwn(e,t)?e[t]:void 0,M6=u.jsx("svg",{height:"24",width:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 49.4 512 399.4200000000001",children:u.jsxs("g",{fill:"none",fillRule:"evenodd",children:[u.jsxs("g",{fillRule:"nonzero",children:[u.jsx("path",{d:"M34.91 448.818h81.454V251L0 163.727V413.91c0 19.287 15.622 34.91 34.91 34.91z",fill:"#4285f4"}),u.jsx("path",{d:"M395.636 448.818h81.455c19.287 0 34.909-15.622 34.909-34.909V163.727L395.636 251z",fill:"#34a853"}),u.jsx("path",{d:"M395.636 99.727V251L512 163.727v-46.545c0-43.142-49.25-67.782-83.782-41.891z",fill:"#fbbc04"})]}),u.jsx("path",{d:"M116.364 251V99.727L256 204.455 395.636 99.727V251L256 355.727z",fill:"#ea4335"}),u.jsx("path",{d:"M0 117.182v46.545L116.364 251V99.727L83.782 75.291C49.25 49.4 0 74.04 0 117.18z",fill:"#c5221f",fillRule:"nonzero"})]})}),F6=u.jsx("svg",{clipRule:"evenodd",fillRule:"evenodd",height:"2500",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 6876 6994",width:"2457",xmlns:"http://www.w3.org/2000/svg",children:u.jsx("path",{d:"M0 779L4033 0l-14 6994L0 6160zm1430 3632c-305-357-390-918-244-1384 203-648 718-867 1149-717 246 86 465 293 582 610 56 152 86 326 88 503 4 318-106 692-324 953-335 400-903 441-1250 35zm314-339c-150-223-191-573-120-864 99-404 352-541 563-447 121 54 228 183 285 381 27 95 42 203 43 314 2 198-52 432-159 595-164 250-442 275-612 22zm2552-2598h2341c131 0 238 107 238 238v86L5035 3039c-24 16-83 62-132 93-72 47-77 38-153-5-117-65-319-203-455-297V1474zm2580 875v2504c0 200-164 365-365 365H4296V3366c133 88 310 204 419 271 88 54 104 79 202 22 45-26 89-60 119-80l1840-1229z",fill:"#0072c6"})}),D6=u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 3386.34 3010.5",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",imageRendering:"optimizeQuality",fillRule:"evenodd",clipRule:"evenodd",children:u.jsx("path",{d:"M0 732.88h645.84l376.07 962.1 380.96-962.1h628.76l-946.8 2277.62H451.98l259.19-603.53L.02 732.88zm2763.84 768.75h-704.26L2684.65 0l701.69.03-622.5 1501.6zm-519.78 143.72c216.09 0 391.25 175.17 391.25 391.22 0 216.06-175.16 391.23-391.25 391.23-216.06 0-391.19-175.17-391.19-391.23 0-216.05 175.16-391.22 391.19-391.22z",fill:"#5f01d1",fillRule:"nonzero"})}),O6=u.jsxs("svg",{viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2",children:[u.jsx("path",{d:"M22.86 13.464l.002.002-10.005 11.105L0 10.419V4.315a.827.827 0 011.356-.637l14.265 11.846a3.722 3.722 0 004.758 0l2.481-2.06z",fill:"url(#prefix___Linear1)",transform:"matrix(13.8889 0 0 13.8889 6 6)"}),u.jsx("path",{d:"M28.286 8.958l-5.426 4.506.002.002-7.184 6.345a3.31 3.31 0 01-4.308.065L0 10.42v18.142a3.724 3.724 0 003.724 3.724h24.562l2.571-11.664-2.571-11.664z",fill:"url(#prefix___Radial2)",fillRule:"nonzero",transform:"matrix(13.8889 0 0 13.8889 6 6)"}),u.jsx("path",{d:"M28.286 8.963v23.323h3.99A3.724 3.724 0 0036 28.562V4.315a.827.827 0 00-1.356-.637l-6.358 5.285z",fill:"url(#prefix___Linear3)",transform:"matrix(13.8889 0 0 13.8889 6 6)"}),u.jsxs("defs",{children:[u.jsxs("linearGradient",{id:"prefix___Linear1",x1:"0",y1:"0",x2:"1",y2:"0",gradientUnits:"userSpaceOnUse",gradientTransform:"scale(-43.6455) rotate(73.941 .222 -.49)",children:[u.jsx("stop",{offset:"0",stopColor:"#e3d9ff"}),u.jsx("stop",{offset:"1",stopColor:"#7341ff"})]}),u.jsxs("linearGradient",{id:"prefix___Linear3",x1:"0",y1:"0",x2:"1",y2:"0",gradientUnits:"userSpaceOnUse",gradientTransform:"scale(-66.0342) rotate(65.129 .243 -.95)",children:[u.jsx("stop",{offset:"0",stopColor:"#e3d9ff"}),u.jsx("stop",{offset:".27",stopColor:"#e3d9ff"}),u.jsx("stop",{offset:"1",stopColor:"#7341ff"})]}),u.jsxs("radialGradient",{id:"prefix___Radial2",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(35.9848 0 0 33.9185 30.723 11.814)",children:[u.jsx("stop",{offset:"0",stopColor:"#6d4aff"}),u.jsx("stop",{offset:".56",stopColor:"#6d4aff"}),u.jsx("stop",{offset:".99",stopColor:"#aa8eff"}),u.jsx("stop",{offset:"1",stopColor:"#aa8eff"})]})]})]}),_6=u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"2500",height:"2432",viewBox:"85.04 232.402 412.912 401.703",children:[u.jsx("path",{d:"M391.631 424.861l-4.477-1.119v-4.477c0-40.281-32.449-72.73-71.611-72.73-29.094 0-55.947 17.904-67.138 44.758l-3.355 7.834-5.595-5.596c-5.597-5.594-13.429-8.951-21.262-8.951a30.086 30.086 0 0 0-30.211 30.211l1.118 6.715-4.476 1.117c-21.26 6.715-35.807 25.736-35.807 46.996 0 26.854 22.38 49.234 49.234 49.234h185.745c25.734 0 48.113-21.262 48.113-48.115-1.114-22.379-16.78-41.401-40.278-45.877z",fill:"#333"}),u.jsx("path",{d:"M394.989 232.402H189.102c-58.185 0-104.062 46.996-104.062 104.062v193.578c0 58.186 46.995 104.062 104.062 104.062H393.87c58.187 0 104.062-46.996 104.062-104.062V337.583c1.118-58.185-45.877-105.181-102.943-105.181zm-11.19 298.76H198.054c-33.568 0-60.424-26.855-60.424-60.424 0-25.734 15.666-46.996 39.164-55.947 1.118-22.379 19.021-40.281 41.4-40.281 7.833 0 15.666 2.238 22.379 6.713 14.547-27.973 42.521-44.758 73.852-44.758 44.758 0 81.684 35.809 82.802 79.447 25.736 6.713 44.759 30.211 44.759 57.066-.001 31.328-25.737 58.184-58.187 58.184z",fill:"#333"}),u.jsx("path",{d:"M398.345 414.791c-2.237-44.758-38.044-79.445-82.802-79.445-31.33 0-60.424 17.904-73.852 44.76-6.714-4.477-14.546-6.715-22.379-6.715-22.379 0-40.282 17.902-41.401 40.281-23.498 8.951-39.163 31.33-39.163 55.947 0 33.568 26.855 60.424 60.424 60.424h185.746c32.448 0 59.304-26.854 59.304-59.305-2.237-25.737-20.14-49.233-45.877-55.947zm-14.546 105.181H198.054c-26.854 0-49.233-22.379-49.233-49.232 0-22.379 14.546-40.283 35.806-46.996l4.476-1.119-1.118-6.713c0-16.785 13.427-30.213 30.211-30.213 7.833 0 15.666 3.357 21.262 8.953l5.595 5.594 3.355-7.832c11.189-26.855 36.925-44.758 67.138-44.758 40.281 0 71.611 32.449 71.611 72.73v4.477l4.477 1.119c23.498 3.355 39.164 23.498 39.164 46.996-.003 25.734-21.264 46.994-46.999 46.994z",fill:"#e4e4e4"})]}),Vl=u.jsx(Fx,{className:"gh-portal-inbox-link-icon"}),R6={gmail:M6,outlook:F6,yahoo:D6,proton:O6,icloud:_6,hey:Vl,aol:Vl,mailru:Vl},U6={gmail:v("Open Gmail"),outlook:v("Open Outlook"),yahoo:v("Open Yahoo Mail"),proton:v("Open Proton Mail"),icloud:v("Open iCloud Mail"),hey:v("Open Hey"),aol:v("Open AOL Mail"),mailru:v("Open Mail.ru")};function Ox({inboxLinks:{android:e,desktop:t,provider:n}}){return u.jsxs("a",{href:I6(navigator)?e:t,target:"_blank",rel:"noreferrer noopener",className:"gh-portal-btn gh-portal-btn-inbox-link",children:[Dx(R6,n)??Vl,u.jsx("span",{children:Dx(U6,n)??v("Open email")})]})}const L6=`
|
|
5726
|
+
`,Xp=class Xp extends re.Component{constructor(t){super(t),this.handleSelectPlan=(n,a)=>{n&&n.preventDefault(),this.timeoutId=setTimeout(()=>{this.setState(()=>({plan:a}))},5)},this.state={name:"",email:"",plan:"free",showNewsletterSelection:!1,termsCheckboxChecked:!1},this.termsRef=re.createRef()}componentDidMount(){const{member:t}=this.context;t&&this.context.doAction("switchPage",{page:"accountHome"}),this.handleSelectedPlan()}componentDidUpdate(){this.handleSelectedPlan()}handleSelectedPlan(){const{site:t,pageQuery:n}=this.context,a=Ml({site:t,pageQuery:n}),i=this.getSelectedPriceId(a,this.state.plan);i!==this.state.plan&&this.setState({plan:i})}componentWillUnmount(){clearTimeout(this.timeoutId)}getFormErrors(t){const a=this.context.site.portal_signup_checkbox_required&&this.context.site.portal_signup_terms_html&&!t.termsCheckboxChecked;return{...Ul({fields:this.getInputFields({state:t})}),checkbox:a}}doSignup(){this.setState(t=>({errors:this.getFormErrors(t)}),()=>{const{site:t,doAction:n}=this.context,{name:a,email:i,plan:r,phonenumber:o,token:s,errors:l}=this.state,c=l&&Object.values(l).filter(p=>!!p).length>0,m={...l};delete m.checkbox,(l==null?void 0:l.checkbox)&&Object.values(m).every(p=>!p)&&this.termsRef.current&&this.termsRef.current.scrollIntoView({behavior:"smooth",block:"center"}),c||(lo({site:t})?this.setState({showNewsletterSelection:!0,pageData:{name:a,email:i,plan:r,phonenumber:o,token:s},errors:{}}):(this.setState({errors:{}}),n("signup",{name:a,email:i,phonenumber:o,plan:r,token:s})))})}handleSignup(t){t.preventDefault(),this.doSignup()}handleChooseSignup(t,n){t.preventDefault(),this.setState({plan:n},()=>{this.doSignup()})}handleInputChange(t,n){const a=n.name,i=t.target.value;this.setState({[a]:i})}onKeyDown(t){t.keyCode===13&&this.handleSignup(t)}getSelectedPriceId(t=[],n){return!t||t.length===0||n==="free"?"free":t.some(i=>i.id===n)?n:t[0].id||"free"}getInputFields({state:t,fieldNames:n}){const{site:{portal_name:a}}=this.context,i=t.errors||{},r=[{type:"email",value:t.email,placeholder:v("jamie@example.com"),label:v("Email"),name:"email",required:!0,tabIndex:2,errorMessage:i.email||""},{type:"text",value:t.phonenumber,placeholder:v("+1 (123) 456-7890"),label:v("Phone number"),name:"phonenumber",required:!1,tabIndex:-1,autoComplete:"off",hidden:!0}];return a&&r.unshift({type:"text",value:t.name,placeholder:v("Jamie Larson"),label:v("Name"),name:"name",required:!0,tabIndex:1,errorMessage:i.name||""}),r[0].autoFocus=!0,n&&n.length>0?r.filter(o=>n.includes(o.name)):r}renderSignupTerms(){var s;const{site:t}=this.context;if(t.portal_signup_terms_html===null||t.portal_signup_terms_html==="")return null;const n=l=>{this.setState({termsCheckboxChecked:l.target.checked})},a=u.jsx("div",{className:"gh-portal-signup-terms-content",dangerouslySetInnerHTML:{__html:Mx(t.portal_signup_terms_html)}}),i=t.portal_signup_checkbox_required?u.jsxs("label",{children:[u.jsx("input",{type:"checkbox",checked:!!this.state.termsCheckboxChecked,required:!0,onChange:n}),u.jsx("span",{className:"checkbox"}),a]}):a,o=`gh-portal-signup-terms ${(s=this.state.errors)!=null&&s.checkbox?"gh-portal-error":""}`;return u.jsx("div",{className:o,onClick:wx,ref:this.termsRef,children:i})}renderSubmitButton(){const{action:t,site:n,brandColor:a,pageQuery:i}=this.context;if(Vt({site:n})||!Sn({site:n,pageQuery:i}))return null;let r=v("Continue");const o=i==="free"&&tp({site:n});if(Ni({site:n})||o)r=v("Sign up");else return null;let s=!1;t==="signup:running"&&(r=v("Sending..."),s=!0);let l=!1;t==="signup:failed"&&(r=v("Retry"),l=!0);const c=t==="signup:running";return u.jsx(ze,{style:{width:"100%"},retry:l,onClick:m=>this.handleSignup(m),disabled:c,brandColor:a,label:r,isRunning:s,tabIndex:3})}renderProducts(){const{site:t,pageQuery:n}=this.context,a=Al({site:t,pageQuery:n}),i=this.state.errors||{},r={};return Object.keys(i).length>0&&this.state.plan&&(r[this.state.plan]=v("Please fill in required fields")),u.jsx(u.Fragment,{children:u.jsx(bx,{handleChooseSignup:(...o)=>this.handleChooseSignup(...o),products:a,onPlanSelect:this.handleSelectPlan,errors:r})})}renderFreeTrialMessage(){const{site:t,pageQuery:n}=this.context;return Nl({site:t,pageQuery:n})&&!Vt({site:t})&&Sn({site:t,pageQuery:n})?u.jsx("p",{className:"gh-portal-free-trial-notification","data-testid":"free-trial-notification-text",children:v("After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.")}):null}renderLoginMessage(){const{brandColor:t,doAction:n}=this.context;return u.jsxs("div",{children:[this.renderFreeTrialMessage(),u.jsxs("div",{className:"gh-portal-signup-message",children:[u.jsx("div",{children:v("Already a member?")}),u.jsx("button",{"data-test-button":"signin-switch","data-testid":"signin-switch",className:"gh-portal-btn gh-portal-btn-link",style:{color:t},onClick:()=>n("switchPage",{page:"signin"}),children:u.jsx("span",{children:v("Sign in")})})]})]})}renderForm(){const t=this.getInputFields({state:this.state}),{site:n,pageQuery:a}=this.context;if(this.state.showNewsletterSelection)return u.jsx(Ep,{pageData:this.state.pageData,onBack:()=>{this.setState({showNewsletterSelection:!1})}});if(Vt({site:n}))return this.renderInviteOnlyMessage();if(zU({site:n})&&a==="free")return this.renderPaidMembersOnlyMessage();if(!$l({site:n})||!Sn({site:n,pageQuery:a}))return ea({site:n})?this.renderInviteOnlyMessage():this.renderMembersDisabledMessage();const i=a==="free"&&tp({site:n}),r=Ni({site:n})||i,o=this.renderSignupTerms();return u.jsx("section",{className:"gh-portal-signup",children:u.jsxs("div",{className:"gh-portal-section",children:[u.jsx("div",{className:"gh-portal-logged-out-form-container",children:u.jsx(Rl,{fields:t,onChange:(s,l)=>this.handleInputChange(s,l),onKeyDown:s=>this.onKeyDown(s)})}),u.jsxs("div",{children:[r?u.jsxs(u.Fragment,{children:[this.renderProducts(),o&&u.jsx("div",{className:"gh-portal-signup-terms-wrapper free-only",children:o})]}):u.jsxs(u.Fragment,{children:[o&&u.jsx("div",{className:"gh-portal-signup-terms-wrapper",children:o}),this.renderProducts()]}),r?u.jsx("div",{className:"gh-portal-btn-container",children:u.jsxs("div",{className:"gh-portal-logged-out-form-container",children:[this.renderSubmitButton(),this.renderLoginMessage()]})}):this.renderLoginMessage()]})]})})}renderPaidMembersOnlyMessage(){return u.jsx("section",{children:u.jsxs("div",{className:"gh-portal-section",children:[u.jsx("p",{className:"gh-portal-paid-members-only-notification","data-testid":"paid-members-only-notification-text",children:v("This site only accepts paid members.")}),this.renderLoginMessage()]})})}renderInviteOnlyMessage(){return u.jsx("section",{children:u.jsxs("div",{className:"gh-portal-section",children:[u.jsx("p",{className:"gh-portal-invite-only-notification","data-testid":"invite-only-notification-text",children:v("This site is invite-only, contact the owner for access.")}),this.renderLoginMessage()]})})}renderMembersDisabledMessage(){return u.jsx("section",{children:u.jsx("div",{className:"gh-portal-section",children:u.jsx("p",{className:"gh-portal-members-disabled-notification","data-testid":"members-disabled-notification-text",children:v("Memberships unavailable, contact the owner for access.")})})})}renderSiteIcon(){const{site:t,pageQuery:n}=this.context,a=t.icon;return a?u.jsx("img",{className:"gh-portal-signup-logo",src:a,alt:t.title}):!Sn({site:t,pageQuery:n})||Vt({site:t})||!$l({site:t})?u.jsx(vx,{className:"gh-portal-icon gh-portal-icon-invitation"}):null}renderFormHeader(){const{site:t}=this.context,n=t.title||"";return u.jsxs("header",{className:"gh-portal-signup-header",children:[this.renderSiteIcon(),u.jsx("h1",{className:"gh-portal-main-title","data-testid":"site-title-text",children:n})]})}getClassNames(){const{site:t,pageQuery:n}=this.context,a=Ml({site:t,pageQuery:n}),i=this.getInputFields({state:this.state});let r="",o="";return(a.length<=1||Vt({site:t}))&&(a.length===1&&a[0].type==="free"||Vt({site:t})?(r=FU({site:t})?"singleplan":"noplan",i.length===1&&(r="single-field"),Vt({site:t})&&(o="invite-only",r="invite-only")):r="singleplan"),{sectionClass:r,footerClass:o}}render(){let{sectionClass:t}=this.getClassNames();return u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"gh-portal-back-sitetitle",children:u.jsx(xp,{onBack:()=>{this.state.showNewsletterSelection?this.setState({showNewsletterSelection:!1}):this.context.doAction("closePopup")}})}),u.jsx(Oe,{}),u.jsxs("div",{className:"gh-portal-content signup "+t,children:[this.renderFormHeader(),this.renderForm()]})]})}};Xp.contextType=H;let Ip=Xp;const Fx=e=>C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},C.createElement("defs",null,C.createElement("style",null,".a{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1px;}")),C.createElement("rect",{className:"a",x:.75,y:4.5,width:22.5,height:15,rx:1.5,ry:1.5}),C.createElement("line",{className:"a",x1:15.687,y1:9.975,x2:19.5,y2:13.5}),C.createElement("line",{className:"a",x1:8.313,y1:9.975,x2:4.5,y2:13.5}),C.createElement("path",{className:"a",d:"M22.88,5.014l-9.513,6.56a2.406,2.406,0,0,1-2.734,0L1.12,5.014"})),A6=e=>{var t;return typeof((t=e.userAgentData)==null?void 0:t.platform)=="string"?e.userAgentData.platform==="Android":/android/i.test(e.userAgent)},N6=e=>/chrome/i.test(e.userAgent),I6=e=>A6(e)&&N6(e),Dx=(e,t)=>Object.hasOwn(e,t)?e[t]:void 0,M6=u.jsx("svg",{height:"24",width:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 49.4 512 399.4200000000001",children:u.jsxs("g",{fill:"none",fillRule:"evenodd",children:[u.jsxs("g",{fillRule:"nonzero",children:[u.jsx("path",{d:"M34.91 448.818h81.454V251L0 163.727V413.91c0 19.287 15.622 34.91 34.91 34.91z",fill:"#4285f4"}),u.jsx("path",{d:"M395.636 448.818h81.455c19.287 0 34.909-15.622 34.909-34.909V163.727L395.636 251z",fill:"#34a853"}),u.jsx("path",{d:"M395.636 99.727V251L512 163.727v-46.545c0-43.142-49.25-67.782-83.782-41.891z",fill:"#fbbc04"})]}),u.jsx("path",{d:"M116.364 251V99.727L256 204.455 395.636 99.727V251L256 355.727z",fill:"#ea4335"}),u.jsx("path",{d:"M0 117.182v46.545L116.364 251V99.727L83.782 75.291C49.25 49.4 0 74.04 0 117.18z",fill:"#c5221f",fillRule:"nonzero"})]})}),F6=u.jsx("svg",{clipRule:"evenodd",fillRule:"evenodd",height:"2500",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 6876 6994",width:"2457",xmlns:"http://www.w3.org/2000/svg",children:u.jsx("path",{d:"M0 779L4033 0l-14 6994L0 6160zm1430 3632c-305-357-390-918-244-1384 203-648 718-867 1149-717 246 86 465 293 582 610 56 152 86 326 88 503 4 318-106 692-324 953-335 400-903 441-1250 35zm314-339c-150-223-191-573-120-864 99-404 352-541 563-447 121 54 228 183 285 381 27 95 42 203 43 314 2 198-52 432-159 595-164 250-442 275-612 22zm2552-2598h2341c131 0 238 107 238 238v86L5035 3039c-24 16-83 62-132 93-72 47-77 38-153-5-117-65-319-203-455-297V1474zm2580 875v2504c0 200-164 365-365 365H4296V3366c133 88 310 204 419 271 88 54 104 79 202 22 45-26 89-60 119-80l1840-1229z",fill:"#0072c6"})}),D6=u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 3386.34 3010.5",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",imageRendering:"optimizeQuality",fillRule:"evenodd",clipRule:"evenodd",children:u.jsx("path",{d:"M0 732.88h645.84l376.07 962.1 380.96-962.1h628.76l-946.8 2277.62H451.98l259.19-603.53L.02 732.88zm2763.84 768.75h-704.26L2684.65 0l701.69.03-622.5 1501.6zm-519.78 143.72c216.09 0 391.25 175.17 391.25 391.22 0 216.06-175.16 391.23-391.25 391.23-216.06 0-391.19-175.17-391.19-391.23 0-216.05 175.16-391.22 391.19-391.22z",fill:"#5f01d1",fillRule:"nonzero"})}),O6=u.jsxs("svg",{viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2",children:[u.jsx("path",{d:"M22.86 13.464l.002.002-10.005 11.105L0 10.419V4.315a.827.827 0 011.356-.637l14.265 11.846a3.722 3.722 0 004.758 0l2.481-2.06z",fill:"url(#prefix___Linear1)",transform:"matrix(13.8889 0 0 13.8889 6 6)"}),u.jsx("path",{d:"M28.286 8.958l-5.426 4.506.002.002-7.184 6.345a3.31 3.31 0 01-4.308.065L0 10.42v18.142a3.724 3.724 0 003.724 3.724h24.562l2.571-11.664-2.571-11.664z",fill:"url(#prefix___Radial2)",fillRule:"nonzero",transform:"matrix(13.8889 0 0 13.8889 6 6)"}),u.jsx("path",{d:"M28.286 8.963v23.323h3.99A3.724 3.724 0 0036 28.562V4.315a.827.827 0 00-1.356-.637l-6.358 5.285z",fill:"url(#prefix___Linear3)",transform:"matrix(13.8889 0 0 13.8889 6 6)"}),u.jsxs("defs",{children:[u.jsxs("linearGradient",{id:"prefix___Linear1",x1:"0",y1:"0",x2:"1",y2:"0",gradientUnits:"userSpaceOnUse",gradientTransform:"scale(-43.6455) rotate(73.941 .222 -.49)",children:[u.jsx("stop",{offset:"0",stopColor:"#e3d9ff"}),u.jsx("stop",{offset:"1",stopColor:"#7341ff"})]}),u.jsxs("linearGradient",{id:"prefix___Linear3",x1:"0",y1:"0",x2:"1",y2:"0",gradientUnits:"userSpaceOnUse",gradientTransform:"scale(-66.0342) rotate(65.129 .243 -.95)",children:[u.jsx("stop",{offset:"0",stopColor:"#e3d9ff"}),u.jsx("stop",{offset:".27",stopColor:"#e3d9ff"}),u.jsx("stop",{offset:"1",stopColor:"#7341ff"})]}),u.jsxs("radialGradient",{id:"prefix___Radial2",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(35.9848 0 0 33.9185 30.723 11.814)",children:[u.jsx("stop",{offset:"0",stopColor:"#6d4aff"}),u.jsx("stop",{offset:".56",stopColor:"#6d4aff"}),u.jsx("stop",{offset:".99",stopColor:"#aa8eff"}),u.jsx("stop",{offset:"1",stopColor:"#aa8eff"})]})]})]}),_6=u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"2500",height:"2432",viewBox:"85.04 232.402 412.912 401.703",children:[u.jsx("path",{d:"M391.631 424.861l-4.477-1.119v-4.477c0-40.281-32.449-72.73-71.611-72.73-29.094 0-55.947 17.904-67.138 44.758l-3.355 7.834-5.595-5.596c-5.597-5.594-13.429-8.951-21.262-8.951a30.086 30.086 0 0 0-30.211 30.211l1.118 6.715-4.476 1.117c-21.26 6.715-35.807 25.736-35.807 46.996 0 26.854 22.38 49.234 49.234 49.234h185.745c25.734 0 48.113-21.262 48.113-48.115-1.114-22.379-16.78-41.401-40.278-45.877z",fill:"#333"}),u.jsx("path",{d:"M394.989 232.402H189.102c-58.185 0-104.062 46.996-104.062 104.062v193.578c0 58.186 46.995 104.062 104.062 104.062H393.87c58.187 0 104.062-46.996 104.062-104.062V337.583c1.118-58.185-45.877-105.181-102.943-105.181zm-11.19 298.76H198.054c-33.568 0-60.424-26.855-60.424-60.424 0-25.734 15.666-46.996 39.164-55.947 1.118-22.379 19.021-40.281 41.4-40.281 7.833 0 15.666 2.238 22.379 6.713 14.547-27.973 42.521-44.758 73.852-44.758 44.758 0 81.684 35.809 82.802 79.447 25.736 6.713 44.759 30.211 44.759 57.066-.001 31.328-25.737 58.184-58.187 58.184z",fill:"#333"}),u.jsx("path",{d:"M398.345 414.791c-2.237-44.758-38.044-79.445-82.802-79.445-31.33 0-60.424 17.904-73.852 44.76-6.714-4.477-14.546-6.715-22.379-6.715-22.379 0-40.282 17.902-41.401 40.281-23.498 8.951-39.163 31.33-39.163 55.947 0 33.568 26.855 60.424 60.424 60.424h185.746c32.448 0 59.304-26.854 59.304-59.305-2.237-25.737-20.14-49.233-45.877-55.947zm-14.546 105.181H198.054c-26.854 0-49.233-22.379-49.233-49.232 0-22.379 14.546-40.283 35.806-46.996l4.476-1.119-1.118-6.713c0-16.785 13.427-30.213 30.211-30.213 7.833 0 15.666 3.357 21.262 8.953l5.595 5.594 3.355-7.832c11.189-26.855 36.925-44.758 67.138-44.758 40.281 0 71.611 32.449 71.611 72.73v4.477l4.477 1.119c23.498 3.355 39.164 23.498 39.164 46.996-.003 25.734-21.264 46.994-46.999 46.994z",fill:"#e4e4e4"})]}),Vl=u.jsx(Fx,{className:"gh-portal-inbox-link-icon"}),R6={gmail:M6,outlook:F6,yahoo:D6,proton:O6,icloud:_6,hey:Vl,aol:Vl,mailru:Vl},U6={gmail:v("Open Gmail"),outlook:v("Open Outlook"),yahoo:v("Open Yahoo Mail"),proton:v("Open Proton Mail"),icloud:v("Open iCloud Mail"),hey:v("Open Hey"),aol:v("Open AOL Mail"),mailru:v("Open Mail.ru")};function Ox({inboxLinks:{android:e,desktop:t,provider:n}}){return u.jsxs("a",{href:I6(navigator)?e:t,target:"_blank",rel:"noreferrer noopener",className:"gh-portal-btn gh-portal-btn-inbox-link",children:[Dx(R6,n)??Vl,u.jsx("span",{children:Dx(U6,n)??v("Open email")})]})}const L6=`
|
|
5727
5727
|
.gh-portal-icon-envelope {
|
|
5728
5728
|
width: 44px;
|
|
5729
5729
|
margin: 12px 0 10px;
|
|
@@ -5941,7 +5941,7 @@ html[dir="rtl"] .gh-portal-offer-title h4 {
|
|
|
5941
5941
|
.gh-portal-offer .gh-portal-signup-terms.gh-portal-error {
|
|
5942
5942
|
margin: 0;
|
|
5943
5943
|
}
|
|
5944
|
-
`,th=class th extends re.Component{constructor(t,n){var a,i;super(t,n),this.state={name:((a=n==null?void 0:n.member)==null?void 0:a.name)||"",email:((i=n==null?void 0:n.member)==null?void 0:i.email)||"",plan:"free",showNewsletterSelection:!1,termsCheckboxChecked:!1}}getFormErrors(t){const a=this.context.site.portal_signup_checkbox_required&&this.context.site.portal_signup_terms_html&&!t.termsCheckboxChecked;return{...Ul({fields:this.getInputFields({state:t})}),checkbox:a}}getInputFields({state:t,fieldNames:n}){const{portal_name:a}=this.context.site,{member:i}=this.context,r=t.errors||{},o=[{type:"email",value:(i==null?void 0:i.email)||t.email,placeholder:v("jamie@example.com"),label:v("Email"),name:"email",disabled:!!i,required:!0,tabIndex:2,errorMessage:r.email||""}];let s=!!a;return i&&!(i!=null&&i.name)&&(s=!1),s&&o.unshift({type:"text",value:(i==null?void 0:i.name)||t.name,placeholder:v("Jamie Larson"),label:v("Name"),name:"name",disabled:!!i,required:!0,tabIndex:1,errorMessage:r.name||""}),o[0].autoFocus=!0,n&&n.length>0?o.filter(l=>n.includes(l.name)):o}renderSignupTerms(){var s;const{site:t}=this.context;if(t.portal_signup_terms_html===null||t.portal_signup_terms_html==="")return null;const n=l=>{this.setState({termsCheckboxChecked:l.target.checked})},a=u.jsx("div",{className:"gh-portal-signup-terms-content",dangerouslySetInnerHTML:{__html:Mx(t.portal_signup_terms_html)}}),i=t.portal_signup_checkbox_required?u.jsxs("label",{children:[u.jsx("input",{type:"checkbox",checked:!!this.state.termsCheckboxChecked,required:!0,onChange:n}),u.jsx("span",{className:"checkbox"}),a]}):a,o=`gh-portal-signup-terms ${(s=this.state.errors)!=null&&s.checkbox?"gh-portal-error":""}`;return u.jsx("div",{className:o,onClick:wx,children:i})}onKeyDown(t){t.keyCode===13&&this.handleSignup(t)}handleSignup(t){t.preventDefault();const{pageData:n,site:a}=this.context;if(!n||!n.tier)return null;const i=Pa({site:a,productId:n.tier.id}),r=n.cadence==="month"?i.monthlyPrice:i.yearlyPrice;this.setState(o=>({errors:this.getFormErrors(o)}),()=>{const{doAction:o}=this.context,{name:s,email:l,phonenumber:c,errors:m}=this.state;if(!(m&&Object.values(m).filter(p=>!!p).length>0)){const p={name:s,email:l,plan:r==null?void 0:r.id,offerId:n==null?void 0:n.id,phonenumber:c};lo({site:a})?this.setState({showNewsletterSelection:!0,pageData:p,errors:{}}):(o("signup",p),this.setState({errors:{}}))}})}handleInputChange(t,n){const a=n.name,i=t.target.value;this.setState({[a]:i})}renderSiteLogo(){const{site:t}=this.context,n=t.icon;return n?u.jsx("img",{className:"gh-portal-signup-logo",src:n,alt:t.title}):null}renderFormHeader(){const{site:t}=this.context,n=t.title||"";return u.jsxs("header",{className:"gh-portal-signup-header",children:[this.renderSiteLogo(),u.jsx("h2",{className:"gh-portal-main-title",children:n})]})}renderForm(){const t=this.getInputFields({state:this.state});return this.state.showNewsletterSelection?u.jsx(Ep,{pageData:this.state.pageData,onBack:()=>{this.setState({showNewsletterSelection:!1})}}):u.jsx("section",{children:u.jsx("div",{className:"gh-portal-section",children:u.jsx(Rl,{fields:t,onChange:(n,a)=>this.handleInputChange(n,a),onKeyDown:n=>this.onKeyDown(n)})})})}renderSubmitButton(){const{action:t,brandColor:n}=this.context,{pageData:a}=this.context;let i=v("Continue");a.type==="trial"&&(i=v("Start {amount}-day free trial",{amount:a.amount}));let r=!1;t==="signup:running"&&(i=v("Sending..."),r=!0);let o=!1;t==="signup:failed"&&(i=v("Retry"),o=!0);const s=t==="signup:running";return u.jsx(ze,{style:{width:"100%"},retry:o,onClick:l=>this.handleSignup(l),disabled:s,brandColor:n,label:i,isRunning:r,tabIndex:3,classes:"sticky bottom"})}renderLoginMessage(){const{member:t}=this.context;if(t)return null;const{brandColor:n,doAction:a}=this.context;return u.jsxs("div",{className:"gh-portal-signup-message",children:[u.jsx("div",{children:v("Already a member?")}),u.jsx("button",{className:"gh-portal-btn gh-portal-btn-link",style:{color:n},onClick:()=>a("switchPage",{page:"signin"}),children:u.jsx("span",{children:v("Sign in")})})]})}renderOfferTag(){const{pageData:t}=this.context;return t.amount<=0?u.jsx(u.Fragment,{}):t.type==="fixed"?u.jsx("h5",{className:"gh-portal-discount-label",children:v("{amount} off",{amount:`${De(t.currency)}${t.amount/100}`})}):t.type==="trial"?u.jsx("h5",{className:"gh-portal-discount-label",children:v("{amount} days free",{amount:t.amount})}):u.jsx("h5",{className:"gh-portal-discount-label",children:v("{amount} off",{amount:t.amount+"%"})})}renderBenefits({product:t}){const n=t.benefits||[];if(!(n!=null&&n.length))return;const a=n.map((i,r)=>u.jsxs("div",{className:"gh-portal-product-benefit",children:[u.jsx(ex,{className:"gh-portal-benefit-checkmark"}),u.jsx("div",{className:"gh-portal-benefit-title",children:i.name})]},`${i.name}-${r}`));return u.jsx("div",{className:"gh-portal-product-benefits",children:a})}getOriginalPrice({offer:t,product:n}){const a=t.cadence==="month"?n.monthlyPrice:n.yearlyPrice,i=this.renderRoundedPrice(a.amount/100);return`${De(a.currency)}${i}/${t.cadence}`}getUpdatedPrice({offer:t,product:n}){const a=t.cadence==="month"?n.monthlyPrice:n.yearlyPrice,i=a.amount;let r;return t.type==="fixed"&&Fl(t.currency,a.currency)?(r=(i-t.amount)/100,r>0?r:0):t.type==="percent"?(r=(i-i*t.amount/100)/100,r):i/100}renderRoundedPrice(t){if(t%1!==0){const n=Math.round(t*100)/100;return Number(n).toFixed(2)}return t}getOffAmount({offer:t}){return t.type==="fixed"?`${De(t.currency)}${t.amount/100}`:t.type==="percent"?`${t.amount}%`:t.type==="trial"?t.amount:""}renderOfferMessage({offer:t,product:n}){const a={forever:v("{amount} off forever.",{amount:this.getOffAmount({offer:t})}),firstPeriod:v("{amount} off for first {period}.",{amount:this.getOffAmount({offer:t}),period:t.cadence}),firstNMonths:v("{amount} off for first {number} months.",{amount:this.getOffAmount({offer:t}),number:t.duration_in_months||""})},i=this.getOriginalPrice({offer:t,product:n}),r=v("Renews at {price}.",{price:i,interpolation:{escapeValue:!1}});let o="",s=!1;const l=t.duration;return l==="once"?(o=a.firstPeriod,s=!0):l==="forever"?o=a.forever:l==="repeating"&&((t.duration_in_months||"")===1?o=a.firstPeriod:o=a.firstNMonths,s=!0),l==="trial"?u.jsxs("p",{className:"footnote",children:[v("Try free for {amount} days, then {originalPrice}.",{amount:t.amount,originalPrice:i,interpolation:{escapeValue:!1}})," ",u.jsx("span",{className:"gh-portal-cancel",children:v("Cancel anytime.")})]}):u.jsxs("p",{className:"footnote",children:[o," ",s?r:""]})}renderProductLabel({product:t,offer:n}){const{site:a}=this.context;return jl({site:a})?u.jsxs("h4",{className:"gh-portal-plan-name",children:[t.name," - ",n.cadence==="month"?v("Monthly"):v("Yearly")]}):u.jsx("h4",{className:"gh-portal-plan-name",children:n.cadence==="month"?v("Monthly"):v("Yearly")})}renderUpdatedTierPrice({offer:t,currencyClass:n,updatedPrice:a,price:i}){return t.type==="trial"?u.jsx("div",{className:"gh-portal-product-card-pricecontainer offer-type-trial",children:u.jsxs("div",{className:"gh-portal-product-price",children:[u.jsx("span",{className:"currency-sign "+n,children:De(i.currency)}),u.jsx("span",{className:"amount",children:ta(this.renderRoundedPrice(a))})]})}):u.jsx("div",{className:"gh-portal-product-card-pricecontainer",children:u.jsxs("div",{className:"gh-portal-product-price",children:[u.jsx("span",{className:"currency-sign "+n,children:De(i.currency)}),u.jsx("span",{className:"amount",children:ta(this.renderRoundedPrice(a))})]})})}renderOldTierPrice({offer:t,price:n}){return t.type==="trial"?null:u.jsxs("div",{className:"gh-portal-offer-oldprice",children:[De(n.currency)," ",ta(n.amount/100)]})}renderProductCard({product:t,offer:n,currencyClass:a,updatedPrice:i,price:r,benefits:o}){return this.state.showNewsletterSelection?null:u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"gh-portal-product-card top",children:u.jsxs("div",{className:"gh-portal-product-card-header",children:[u.jsxs("h4",{className:"gh-portal-product-name",children:[t.name," - ",n.cadence==="month"?v("Monthly"):v("Yearly")]}),this.renderOldTierPrice({offer:n,price:r}),this.renderUpdatedTierPrice({offer:n,currencyClass:a,updatedPrice:i,price:r}),this.renderOfferMessage({offer:n,product:t,price:r})]})}),u.jsxs("div",{children:[u.jsx("div",{className:"gh-portal-product-card bottom",children:u.jsxs("div",{className:"gh-portal-product-card-detaildata",children:[t.description?u.jsx("div",{className:"gh-portal-product-description",children:t.description}):"",o.length?this.renderBenefits({product:t}):""]})}),u.jsxs("div",{className:"gh-portal-btn-container sticky m32",children:[u.jsx("div",{className:"gh-portal-signup-terms-wrapper",children:this.renderSignupTerms()}),this.renderSubmitButton()]}),this.renderLoginMessage()]})]})}render(){const{pageData:t,site:n}=this.context;if(!t||!t.tier)return null;const a=Pa({site:n,productId:t.tier.id});if(!a)return null;const i=t.cadence==="month"?a.monthlyPrice:a.yearlyPrice,r=this.getUpdatedPrice({offer:t,product:a}),o=a.benefits||[],s=De(i.currency).length>1?"long":"";return u.jsx(u.Fragment,{children:u.jsxs("div",{className:"gh-portal-content gh-portal-offer",children:[u.jsx(Oe,{}),this.renderFormHeader(),u.jsxs("div",{className:"gh-portal-offer-bar",children:[u.jsxs("div",{className:"gh-portal-offer-title",children:[t.display_title?u.jsx("h4",{children:t.display_title}):u.jsx("h4",{className:"placeholder",children:v("Black Friday")}),this.renderOfferTag()]}),t.display_description?u.jsx("p",{children:t.display_description}):""]}),this.renderForm(),this.renderProductCard({product:a,offer:t,currencyClass:s,updatedPrice:r,price:i,benefits:o})]})})}};th.contextType=H;let Dp=th;const _x=e=>S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 48 48",...e},S.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M42 26.572h-6.2A3.43 3.43 0 0 0 33.024 28l-8.31 12.771a2.92 2.92 0 0 1-3.587.967 2.875 2.875 0 0 1-1.609-3.366l1.5-5.656a3.36 3.36 0 0 0-1.788-3.895 3.438 3.438 0 0 0-1.5-.348H9.397a3.388 3.388 0 0 1-3.251-4.367v-.02l3.24-10.815v-.029c1.32-4.248 3.585-7.146 8.044-7.146 10.682 0 10.072-1.231 22.544 5.073.679.338 1.354.682 2.027 1.03v18.1"})),Rx=e=>S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 48 48",...e},S.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M6.002 21.429H12.2a3.432 3.432 0 0 0 2.777-1.43L23.29 7.23a2.916 2.916 0 0 1 3.586-.967A2.876 2.876 0 0 1 28.48 9.63l-1.497 5.652a3.36 3.36 0 0 0 1.787 3.897c.466.229.98.347 1.498.35h8.334a3.39 3.39 0 0 1 3.253 4.366v.02l-3.24 10.815v.027c-1.32 4.248-3.588 7.146-8.047 7.146-10.68 0-10.067 1.231-22.544-5.073-.675-.338-1.35-.684-2.025-1.026V18.002"})),W6=e=>S.createElement("svg",{width:96,height:56,viewBox:"0 0 96 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},S.createElement("path",{d:"M9.00004 34.973C9.66499 35.3085 10.3322 35.6418 11.0017 35.9729C23.3405 42.0995 22.7366 40.9062 33.3011 40.9062C37.7115 40.9062 39.954 38.0862 41.2567 33.9563V33.9296L44.4627 23.4164V23.3964C44.6151 22.9038 44.6477 22.3828 44.5578 21.8756C44.4679 21.3683 44.2581 20.8888 43.9453 20.4757C43.6324 20.0626 43.2253 19.7275 42.7565 19.4972C42.2878 19.2669 41.7706 19.1479 41.2466 19.1498H33.0026C32.489 19.1484 31.9825 19.0325 31.5211 18.8108C31.0598 18.5891 30.6558 18.2673 30.3394 17.8698C30.025 17.4718 29.8084 17.0078 29.7066 16.5141C29.6048 16.0203 29.6205 15.51 29.7525 15.0232L31.235 9.5266C31.3503 9.09972 31.3609 8.65208 31.2659 8.2204C31.171 7.78873 30.9732 7.38533 30.6888 7.0433C30.4078 6.70494 30.0511 6.43489 29.6465 6.2542C29.2418 6.07351 28.8002 5.98706 28.3559 6.00157C27.9117 6.01609 27.4769 6.13118 27.0854 6.33789C26.6938 6.5446 26.3562 6.83734 26.0987 7.19329L17.8784 19.6098C17.5652 20.0388 17.1527 20.3885 16.6749 20.6301C16.1971 20.8718 15.6678 20.9985 15.1304 20.9998H9.00004M9 17.6666L9 40.9997",stroke:"black",strokeWidth:2.85,strokeLinecap:"round",strokeLinejoin:"round"}),S.createElement("path",{d:"M86.2148 20.027C85.5499 19.6915 84.8826 19.3582 84.2132 19.0271C71.8743 12.9005 72.4782 14.0938 61.9137 14.0938C57.5034 14.0938 55.2609 16.9138 53.9581 21.0437V21.0704L50.7521 31.5836V31.6036C50.5997 32.0962 50.5672 32.6172 50.657 33.1244C50.7469 33.6317 50.9567 34.1112 51.2695 34.5243C51.5824 34.9374 51.9896 35.2725 52.4583 35.5028C52.927 35.7331 53.4442 35.8521 53.9683 35.8502H62.2123C62.7258 35.8516 63.2324 35.9675 63.6937 36.1892C64.155 36.4109 64.5591 36.7327 64.8754 37.1302C65.1899 37.5282 65.4064 37.9922 65.5082 38.4859C65.61 38.9797 65.5943 39.49 65.4624 39.9768L63.9798 45.4734C63.8646 45.9003 63.854 46.3479 63.9489 46.7796C64.0439 47.2113 64.2416 47.6147 64.526 47.9567C64.807 48.2951 65.1637 48.5651 65.5684 48.7458C65.973 48.9265 66.4147 49.0129 66.8589 48.9984C67.3031 48.9839 67.7379 48.8688 68.1295 48.6621C68.521 48.4554 68.8587 48.1627 69.1162 47.8067L77.3364 35.3902C77.6497 34.9612 78.0622 34.6115 78.5399 34.3699C79.0177 34.1282 79.547 34.0015 80.0844 34.0002H86.2148M86.2148 37.3334V14.0003",stroke:"black",strokeWidth:2.85,strokeLinecap:"round",strokeLinejoin:"round"}));function Hl({siteUrl:e=window.location.origin,apiUrl:t,apiKey:n}){const a="members/api";function i({type:l,resource:c}){return`${e.replace(/\/$/,"")}/${a}/${c}/`}function r({resource:l,params:c={}}){if(t&&n){const m=new URLSearchParams({...c,key:n});return`${t.replace(/\/$/,"")}/${l}/?${m.toString()}`}return""}function o({url:l,method:c="GET",headers:m={},credentials:f=void 0,body:p=void 0}){return fetch(l,{method:c,headers:m,credentials:f,body:p})}const s={};return s.site={read(){const l=i({type:"members",resource:"site"});return o({url:l,method:"GET",headers:{"Content-Type":"application/json"}}).then(function(c){if(c.ok)return c.json();throw new Error("Failed to fetch site data")})},newsletters(){const l=r({resource:"newsletters",params:{limit:100}});return o({url:l,method:"GET",headers:{"Content-Type":"application/json"}}).then(function(c){if(c.ok)return c.json();throw new Error("Failed to fetch site data")})},tiers(){const l=r({resource:"tiers",params:{limit:100,include:"monthly_price,yearly_price,benefits"}});return o({url:l,method:"GET",headers:{"Content-Type":"application/json"}}).then(function(c){if(c.ok)return c.json();throw new Error("Failed to fetch site data")})},settings(){const l=r({resource:"settings"});return o({url:l,method:"GET",headers:{"Content-Type":"application/json"}}).then(function(c){if(c.ok)return c.json();throw new Error("Failed to fetch site data")})},offer({offerId:l}){const c=r({resource:`offers/${l}`});return o({url:c,method:"GET",headers:{"Content-Type":"application/json"}}).then(function(m){if(m.ok)return m.json();throw new Error("Failed to fetch offer data")})},recommendations({limit:l=100}={limit:100}){const c=r({resource:"recommendations",params:{limit:l}});return o({url:c,method:"GET",headers:{"Content-Type":"application/json"}}).then(function(m){if(m.ok)return m.json();throw new Error("Failed to fetch recommendations")})}},s.feedback={async add({uuid:l,key:c,postId:m,score:f}){let p=i({type:"members",resource:"feedback"});l&&c&&(p=p+`?uuid=${l}&key=${c}`);const k=await o({url:p,method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({feedback:[{post_id:m,score:f}]})});if(k.ok)return k.json();throw await wn.fromApiResponse(k)??new Error("Failed to save feedback")}},s.recommendations={trackClicked({recommendationId:l}){let c=i({type:"members",resource:"recommendations/"+l+"/clicked"});navigator.sendBeacon(c)},trackSubscribed({recommendationId:l}){let c=i({type:"members",resource:"recommendations/"+l+"/subscribed"});navigator.sendBeacon(c)}},s.member={identity(){const l=i({type:"members",resource:"session"});return o({url:l,credentials:"same-origin"}).then(function(c){return!c.ok||c.status===204?null:c.text()})},sessionData(){const l=i({type:"members",resource:"member"});return o({url:l,credentials:"same-origin"}).then(function(c){return!c.ok||c.status===204?null:c.json()})},update({name:l,subscribed:c,newsletters:m,enableCommentNotifications:f}){const p=i({type:"members",resource:"member"}),y={name:l,subscribed:c,newsletters:m};return f!==void 0&&(y.enable_comment_notifications=f),o({url:p,method:"PUT",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(y)}).then(function(k){return k.ok?k.json():null})},deleteSuppression(){const l=i({type:"members",resource:"member/suppression"});return o({url:l,method:"DELETE"}).then(function(c){if(!c.ok)throw new Error("Your email has failed to resubscribe, please try again");return!0})},async getIntegrityToken(){const l=i({type:"members",resource:"integrity-token"}),c=await o({url:l,method:"GET"});if(c.ok)return c.text();{const m=await wn.fromApiResponse(c);throw m||new Error("Failed to start a members session")}},async sendMagicLink({email:l,emailType:c,labels:m,name:f,oldEmail:p,newsletters:y,redirect:k,integrityToken:j,phonenumber:b,customUrlHistory:w,token:E,autoRedirect:P=!0,includeOTC:$}){const F=i({type:"members",resource:"send-magic-link"}),z={name:f,email:l,newsletters:y,oldEmail:p,emailType:c,labels:m,requestSrc:"portal",redirect:k,integrityToken:j,honeypot:b,token:E,autoRedirect:P,includeOTC:$},R=w??co();R&&(z.urlHistory=R);const _=await o({url:F,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)});if(_.ok){if((_.headers.get("content-type")||"").toLowerCase().includes("application/json"))try{return await _.json()}catch{}return{}}else{const D=await wn.fromApiResponse(_);throw D||new Error("Failed to send magic link email")}},async verifyOTC({otc:l,otcRef:c,redirect:m,integrityToken:f}){const p=i({type:"members",resource:"verify-otc"}),k=await o({url:p,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({otc:l,otcRef:c,redirect:m,integrityToken:f})});if(k.ok)return await k.json();{const j=await wn.fromApiResponse(k);throw j||new Error("Failed to verify code")}},signout(l=!1){const c=i({type:"members",resource:"session"});return o({url:c,method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({all:l})}).then(function(m){if(m.ok)return window.location.replace(e),"Success";throw new Error("Failed to signout")})},async newsletters({uuid:l,key:c}){let m=i({type:"members",resource:"member/newsletters"});return m=m+`?uuid=${l}&key=${c}`,o({url:m,credentials:"same-origin"}).then(function(f){return!f.ok||f.status===204?null:f.json()})},async updateNewsletters({uuid:l,newsletters:c,key:m,enableCommentNotifications:f}){let p=i({type:"members",resource:"member/newsletters"});p=p+`?uuid=${l}&key=${m}`;const y={newsletters:c};return f!==void 0&&(y.enable_comment_notifications=f),o({url:p,method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(y)}).then(function(k){if(k.ok)return k.json();throw new Error("Failed to update email preferences")})},async updateEmailAddress({email:l}){const c=await s.member.identity(),m=i({type:"members",resource:"member/email"});return o({url:m,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:l,identity:c})}).then(async function(p){var y,k;if(p.ok)return"Success";{const j=await p.json(),b=((k=(y=j==null?void 0:j.errors)==null?void 0:y[0])==null?void 0:k.message)||"Failed to send email address verification email";throw new Error(b)}})},async checkoutPlan({plan:l,tierId:c,cadence:m,cancelUrl:f,successUrl:p,email:y,name:k,offerId:j,newsletters:b,metadata:w={}}={}){var R,_;const E=new URL(e),P=await s.member.identity(),$=i({type:"members",resource:"create-stripe-checkout-session"});if(!f){const D=window.location.href.startsWith(E.href)?new URL(window.location.href):new URL(e);D.searchParams.set("stripe","cancel"),f=D.href}const F={name:k,newsletters:JSON.stringify(b),requestSrc:"portal",fp_tid:(_=(R=window.FPROM||window.$FPROM)==null?void 0:R.data)==null?void 0:_.tid,urlHistory:co(),...w},z={priceId:j?null:l,offerId:j,identity:P,metadata:F,successUrl:p,cancelUrl:f};return y&&(z.customerEmail=y),c&&m&&(delete z.priceId,z.tierId=j?null:c,z.cadence=j?null:m),o({url:$,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)}).then(async function(D){var X,ne;if(!D.ok){const ye=await D.json(),he=((ne=(X=ye==null?void 0:ye.errors)==null?void 0:X[0])==null?void 0:ne.message)||"Failed to signup, please try again.";throw new Error(he)}return D.json()}).then(function(D){return D.url?window.location.assign(D.url):window.Stripe(D.publicKey).redirectToCheckout({sessionId:D.sessionId}).then(function(ne){if(ne.error)throw new Error(ne.error.message)})})},async checkoutDonation({successUrl:l,cancelUrl:c,metadata:m={},personalNote:f=""}={}){var E,P,$;const p=await s.member.identity(),y=i({type:"members",resource:"create-stripe-checkout-session"}),k={fp_tid:(P=(E=window.FPROM||window.$FPROM)==null?void 0:E.data)==null?void 0:P.tid,urlHistory:co(),...m},b=await o({url:y,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:p,metadata:k,successUrl:l,cancelUrl:c,type:"donation",personalNote:f})}),w=await b.json();if(!b.ok){const F=($=w==null?void 0:w.errors)==null?void 0:$[0];throw F||new Error("We're unable to process your payment right now. Please try again later.")}return w},async editBilling({successUrl:l,cancelUrl:c,subscriptionId:m}={}){const f=new URL(e),p=await s.member.identity(),y=i({type:"members",resource:"create-stripe-update-session"});if(!l){const k=new URL(e);k.searchParams.set("stripe","billing-update-success"),l=k.href}if(!c){const k=window.location.href.startsWith(f.href)?new URL(window.location.href):new URL(e);k.searchParams.set("stripe","billing-update-cancel"),c=k.href}return o({url:y,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:p,subscription_id:m,successUrl:l,cancelUrl:c})}).then(function(k){if(!k.ok)throw new Error("Unable to create stripe checkout session");return k.json()}).then(function(k){return window.Stripe(k.publicKey).redirectToCheckout({sessionId:k.sessionId})}).then(function(k){if(k.error)throw new Error(k.error.message)}).catch(function(k){throw k})},async manageBilling({returnUrl:l,subscriptionId:c}={}){const m=await s.member.identity(),f=i({type:"members",resource:"create-stripe-billing-portal-session"});if(!l){const p=new URL(e);p.searchParams.set("stripe","billing-portal-closed"),l=p.href}return o({url:f,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:m,subscription_id:c,returnUrl:l})}).then(function(p){if(!p.ok)throw new Error("Unable to create Stripe billing portal session");return p.json()}).then(function(p){return window.location.assign(p.url)}).catch(function(p){throw p})},async updateSubscription({subscriptionId:l,tierId:c,cadence:m,planId:f,smartCancel:p,cancelAtPeriodEnd:y,cancellationReason:k}){const j=await s.member.identity(),b=i({type:"members",resource:"subscriptions"})+l+"/",w={smart_cancel:p,cancel_at_period_end:y,cancellation_reason:k,identity:j,priceId:f};return c&&m&&(delete w.priceId,w.tierId=c,w.cadence=m),o({url:b,method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(w)})},async offers(){const l=await s.member.identity(),c=i({type:"members",resource:"member/offers"});return o({url:c,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:l})}).then(function(m){return m.ok?m.json():{offers:[]}}).catch(function(){return{offers:[]}})},async applyOffer({offerId:l,subscriptionId:c}){const m=await s.member.identity(),f=i({type:"members",resource:`subscriptions/${c}/apply-offer`}),p=await o({url:f,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:m,offer_id:l})});if(!p.ok){const y=await p.text();throw new Error(y||"Failed to apply offer")}return!0}},s.init=async()=>{let[l]=await Promise.all([s.member.sessionData()]),c={},m=[],f=[],p={},y=[];try{[{settings:p},{tiers:f},{newsletters:m}]=await Promise.all([s.site.settings(),s.site.tiers(),s.site.newsletters()]),c={...p,newsletters:m,tiers:qU({tiers:f})}}catch{}if(l&&l.paid)try{y=(await s.member.offers()).offers||[]}catch(k){console.warn("[Portal] Failed to load member offers:",k)}return c=NU({site:c}),{site:c,member:l,offers:y}},s}class ko extends re.Component{render(){return u.jsx("div",{style:{display:"flex",flexDirection:"column",color:"#313131"},children:u.jsx("div",{style:{paddingLeft:"16px",paddingRight:"16px",paddingTop:"12px",height:"50px"},children:u.jsx(Ii,{className:"gh-portal-loadingicon dark","data-testid":"loaderIcon"})})})}}const G6=`
|
|
5944
|
+
`,th=class th extends re.Component{constructor(t,n){var a,i;super(t,n),this.state={name:((a=n==null?void 0:n.member)==null?void 0:a.name)||"",email:((i=n==null?void 0:n.member)==null?void 0:i.email)||"",plan:"free",showNewsletterSelection:!1,termsCheckboxChecked:!1}}getFormErrors(t){const a=this.context.site.portal_signup_checkbox_required&&this.context.site.portal_signup_terms_html&&!t.termsCheckboxChecked;return{...Ul({fields:this.getInputFields({state:t})}),checkbox:a}}getInputFields({state:t,fieldNames:n}){const{portal_name:a}=this.context.site,{member:i}=this.context,r=t.errors||{},o=[{type:"email",value:(i==null?void 0:i.email)||t.email,placeholder:v("jamie@example.com"),label:v("Email"),name:"email",disabled:!!i,required:!0,tabIndex:2,errorMessage:r.email||""}];let s=!!a;return i&&!(i!=null&&i.name)&&(s=!1),s&&o.unshift({type:"text",value:(i==null?void 0:i.name)||t.name,placeholder:v("Jamie Larson"),label:v("Name"),name:"name",disabled:!!i,required:!0,tabIndex:1,errorMessage:r.name||""}),o[0].autoFocus=!0,n&&n.length>0?o.filter(l=>n.includes(l.name)):o}renderSignupTerms(){var s;const{site:t}=this.context;if(t.portal_signup_terms_html===null||t.portal_signup_terms_html==="")return null;const n=l=>{this.setState({termsCheckboxChecked:l.target.checked})},a=u.jsx("div",{className:"gh-portal-signup-terms-content",dangerouslySetInnerHTML:{__html:Mx(t.portal_signup_terms_html)}}),i=t.portal_signup_checkbox_required?u.jsxs("label",{children:[u.jsx("input",{type:"checkbox",checked:!!this.state.termsCheckboxChecked,required:!0,onChange:n}),u.jsx("span",{className:"checkbox"}),a]}):a,o=`gh-portal-signup-terms ${(s=this.state.errors)!=null&&s.checkbox?"gh-portal-error":""}`;return u.jsx("div",{className:o,onClick:wx,children:i})}onKeyDown(t){t.keyCode===13&&this.handleSignup(t)}handleSignup(t){t.preventDefault();const{pageData:n,site:a}=this.context;if(!n||!n.tier)return null;const i=Pa({site:a,productId:n.tier.id}),r=n.cadence==="month"?i.monthlyPrice:i.yearlyPrice;this.setState(o=>({errors:this.getFormErrors(o)}),()=>{const{doAction:o}=this.context,{name:s,email:l,phonenumber:c,errors:m}=this.state;if(!(m&&Object.values(m).filter(p=>!!p).length>0)){const p={name:s,email:l,plan:r==null?void 0:r.id,offerId:n==null?void 0:n.id,phonenumber:c};lo({site:a})?this.setState({showNewsletterSelection:!0,pageData:p,errors:{}}):(o("signup",p),this.setState({errors:{}}))}})}handleInputChange(t,n){const a=n.name,i=t.target.value;this.setState({[a]:i})}renderSiteLogo(){const{site:t}=this.context,n=t.icon;return n?u.jsx("img",{className:"gh-portal-signup-logo",src:n,alt:t.title}):null}renderFormHeader(){const{site:t}=this.context,n=t.title||"";return u.jsxs("header",{className:"gh-portal-signup-header",children:[this.renderSiteLogo(),u.jsx("h2",{className:"gh-portal-main-title",children:n})]})}renderForm(){const t=this.getInputFields({state:this.state});return this.state.showNewsletterSelection?u.jsx(Ep,{pageData:this.state.pageData,onBack:()=>{this.setState({showNewsletterSelection:!1})}}):u.jsx("section",{children:u.jsx("div",{className:"gh-portal-section",children:u.jsx(Rl,{fields:t,onChange:(n,a)=>this.handleInputChange(n,a),onKeyDown:n=>this.onKeyDown(n)})})})}renderSubmitButton(){const{action:t,brandColor:n}=this.context,{pageData:a}=this.context;let i=v("Continue");a.type==="trial"&&(i=v("Start {amount}-day free trial",{amount:a.amount}));let r=!1;t==="signup:running"&&(i=v("Sending..."),r=!0);let o=!1;t==="signup:failed"&&(i=v("Retry"),o=!0);const s=t==="signup:running";return u.jsx(ze,{style:{width:"100%"},retry:o,onClick:l=>this.handleSignup(l),disabled:s,brandColor:n,label:i,isRunning:r,tabIndex:3,classes:"sticky bottom"})}renderLoginMessage(){const{member:t}=this.context;if(t)return null;const{brandColor:n,doAction:a}=this.context;return u.jsxs("div",{className:"gh-portal-signup-message",children:[u.jsx("div",{children:v("Already a member?")}),u.jsx("button",{className:"gh-portal-btn gh-portal-btn-link",style:{color:n},onClick:()=>a("switchPage",{page:"signin"}),children:u.jsx("span",{children:v("Sign in")})})]})}renderOfferTag(){const{pageData:t}=this.context;return t.amount<=0?u.jsx(u.Fragment,{}):t.type==="fixed"?u.jsx("h5",{className:"gh-portal-discount-label",children:v("{amount} off",{amount:`${De(t.currency)}${t.amount/100}`})}):t.type==="trial"?u.jsx("h5",{className:"gh-portal-discount-label",children:v("{amount} days free",{amount:t.amount})}):u.jsx("h5",{className:"gh-portal-discount-label",children:v("{amount} off",{amount:t.amount+"%"})})}renderBenefits({product:t}){const n=t.benefits||[];if(!(n!=null&&n.length))return;const a=n.map((i,r)=>u.jsxs("div",{className:"gh-portal-product-benefit",children:[u.jsx(ex,{className:"gh-portal-benefit-checkmark"}),u.jsx("div",{className:"gh-portal-benefit-title",children:i.name})]},`${i.name}-${r}`));return u.jsx("div",{className:"gh-portal-product-benefits",children:a})}getOriginalPrice({offer:t,product:n}){const a=t.cadence==="month"?n.monthlyPrice:n.yearlyPrice,i=this.renderRoundedPrice(a.amount/100);return`${De(a.currency)}${i}/${t.cadence}`}getUpdatedPrice({offer:t,product:n}){const a=t.cadence==="month"?n.monthlyPrice:n.yearlyPrice,i=a.amount;let r;return t.type==="fixed"&&Fl(t.currency,a.currency)?(r=(i-t.amount)/100,r>0?r:0):t.type==="percent"?(r=(i-i*t.amount/100)/100,r):i/100}renderRoundedPrice(t){if(t%1!==0){const n=Math.round(t*100)/100;return Number(n).toFixed(2)}return t}getOffAmount({offer:t}){return t.type==="fixed"?`${De(t.currency)}${t.amount/100}`:t.type==="percent"?`${t.amount}%`:t.type==="trial"?t.amount:""}renderOfferMessage({offer:t,product:n}){const a={forever:v("{amount} off forever.",{amount:this.getOffAmount({offer:t})}),firstPeriod:v("{amount} off for first {period}.",{amount:this.getOffAmount({offer:t}),period:t.cadence}),firstNMonths:v("{amount} off for first {number} months.",{amount:this.getOffAmount({offer:t}),number:t.duration_in_months||""})},i=this.getOriginalPrice({offer:t,product:n}),r=v("Renews at {price}.",{price:i,interpolation:{escapeValue:!1}});let o="",s=!1;const l=t.duration;return l==="once"?(o=a.firstPeriod,s=!0):l==="forever"?o=a.forever:l==="repeating"&&((t.duration_in_months||"")===1?o=a.firstPeriod:o=a.firstNMonths,s=!0),l==="trial"?u.jsxs("p",{className:"footnote",children:[v("Try free for {amount} days, then {originalPrice}.",{amount:t.amount,originalPrice:i,interpolation:{escapeValue:!1}})," ",u.jsx("span",{className:"gh-portal-cancel",children:v("Cancel anytime.")})]}):u.jsxs("p",{className:"footnote",children:[o," ",s?r:""]})}renderProductLabel({product:t,offer:n}){const{site:a}=this.context;return jl({site:a})?u.jsxs("h4",{className:"gh-portal-plan-name",children:[t.name," - ",n.cadence==="month"?v("Monthly"):v("Yearly")]}):u.jsx("h4",{className:"gh-portal-plan-name",children:n.cadence==="month"?v("Monthly"):v("Yearly")})}renderUpdatedTierPrice({offer:t,currencyClass:n,updatedPrice:a,price:i}){return t.type==="trial"?u.jsx("div",{className:"gh-portal-product-card-pricecontainer offer-type-trial",children:u.jsxs("div",{className:"gh-portal-product-price",children:[u.jsx("span",{className:"currency-sign "+n,children:De(i.currency)}),u.jsx("span",{className:"amount",children:ta(this.renderRoundedPrice(a))})]})}):u.jsx("div",{className:"gh-portal-product-card-pricecontainer",children:u.jsxs("div",{className:"gh-portal-product-price",children:[u.jsx("span",{className:"currency-sign "+n,children:De(i.currency)}),u.jsx("span",{className:"amount",children:ta(this.renderRoundedPrice(a))})]})})}renderOldTierPrice({offer:t,price:n}){return t.type==="trial"?null:u.jsxs("div",{className:"gh-portal-offer-oldprice",children:[De(n.currency)," ",ta(n.amount/100)]})}renderProductCard({product:t,offer:n,currencyClass:a,updatedPrice:i,price:r,benefits:o}){return this.state.showNewsletterSelection?null:u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"gh-portal-product-card top",children:u.jsxs("div",{className:"gh-portal-product-card-header",children:[u.jsxs("h4",{className:"gh-portal-product-name",children:[t.name," - ",n.cadence==="month"?v("Monthly"):v("Yearly")]}),this.renderOldTierPrice({offer:n,price:r}),this.renderUpdatedTierPrice({offer:n,currencyClass:a,updatedPrice:i,price:r}),this.renderOfferMessage({offer:n,product:t,price:r})]})}),u.jsxs("div",{children:[u.jsx("div",{className:"gh-portal-product-card bottom",children:u.jsxs("div",{className:"gh-portal-product-card-detaildata",children:[t.description?u.jsx("div",{className:"gh-portal-product-description",children:t.description}):"",o.length?this.renderBenefits({product:t}):""]})}),u.jsxs("div",{className:"gh-portal-btn-container sticky m32",children:[u.jsx("div",{className:"gh-portal-signup-terms-wrapper",children:this.renderSignupTerms()}),this.renderSubmitButton()]}),this.renderLoginMessage()]})]})}render(){const{pageData:t,site:n}=this.context;if(!t||!t.tier)return null;const a=Pa({site:n,productId:t.tier.id});if(!a)return null;const i=t.cadence==="month"?a.monthlyPrice:a.yearlyPrice,r=this.getUpdatedPrice({offer:t,product:a}),o=a.benefits||[],s=De(i.currency).length>1?"long":"";return u.jsx(u.Fragment,{children:u.jsxs("div",{className:"gh-portal-content gh-portal-offer",children:[u.jsx(Oe,{}),this.renderFormHeader(),u.jsxs("div",{className:"gh-portal-offer-bar",children:[u.jsxs("div",{className:"gh-portal-offer-title",children:[t.display_title?u.jsx("h4",{children:t.display_title}):u.jsx("h4",{className:"placeholder",children:v("Black Friday")}),this.renderOfferTag()]}),t.display_description?u.jsx("p",{children:t.display_description}):""]}),this.renderForm(),this.renderProductCard({product:a,offer:t,currencyClass:s,updatedPrice:r,price:i,benefits:o})]})})}};th.contextType=H;let Dp=th;const _x=e=>C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 48 48",...e},C.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M42 26.572h-6.2A3.43 3.43 0 0 0 33.024 28l-8.31 12.771a2.92 2.92 0 0 1-3.587.967 2.875 2.875 0 0 1-1.609-3.366l1.5-5.656a3.36 3.36 0 0 0-1.788-3.895 3.438 3.438 0 0 0-1.5-.348H9.397a3.388 3.388 0 0 1-3.251-4.367v-.02l3.24-10.815v-.029c1.32-4.248 3.585-7.146 8.044-7.146 10.682 0 10.072-1.231 22.544 5.073.679.338 1.354.682 2.027 1.03v18.1"})),Rx=e=>C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 48 48",...e},C.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M6.002 21.429H12.2a3.432 3.432 0 0 0 2.777-1.43L23.29 7.23a2.916 2.916 0 0 1 3.586-.967A2.876 2.876 0 0 1 28.48 9.63l-1.497 5.652a3.36 3.36 0 0 0 1.787 3.897c.466.229.98.347 1.498.35h8.334a3.39 3.39 0 0 1 3.253 4.366v.02l-3.24 10.815v.027c-1.32 4.248-3.588 7.146-8.047 7.146-10.68 0-10.067 1.231-22.544-5.073-.675-.338-1.35-.684-2.025-1.026V18.002"})),W6=e=>C.createElement("svg",{width:96,height:56,viewBox:"0 0 96 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},C.createElement("path",{d:"M9.00004 34.973C9.66499 35.3085 10.3322 35.6418 11.0017 35.9729C23.3405 42.0995 22.7366 40.9062 33.3011 40.9062C37.7115 40.9062 39.954 38.0862 41.2567 33.9563V33.9296L44.4627 23.4164V23.3964C44.6151 22.9038 44.6477 22.3828 44.5578 21.8756C44.4679 21.3683 44.2581 20.8888 43.9453 20.4757C43.6324 20.0626 43.2253 19.7275 42.7565 19.4972C42.2878 19.2669 41.7706 19.1479 41.2466 19.1498H33.0026C32.489 19.1484 31.9825 19.0325 31.5211 18.8108C31.0598 18.5891 30.6558 18.2673 30.3394 17.8698C30.025 17.4718 29.8084 17.0078 29.7066 16.5141C29.6048 16.0203 29.6205 15.51 29.7525 15.0232L31.235 9.5266C31.3503 9.09972 31.3609 8.65208 31.2659 8.2204C31.171 7.78873 30.9732 7.38533 30.6888 7.0433C30.4078 6.70494 30.0511 6.43489 29.6465 6.2542C29.2418 6.07351 28.8002 5.98706 28.3559 6.00157C27.9117 6.01609 27.4769 6.13118 27.0854 6.33789C26.6938 6.5446 26.3562 6.83734 26.0987 7.19329L17.8784 19.6098C17.5652 20.0388 17.1527 20.3885 16.6749 20.6301C16.1971 20.8718 15.6678 20.9985 15.1304 20.9998H9.00004M9 17.6666L9 40.9997",stroke:"black",strokeWidth:2.85,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M86.2148 20.027C85.5499 19.6915 84.8826 19.3582 84.2132 19.0271C71.8743 12.9005 72.4782 14.0938 61.9137 14.0938C57.5034 14.0938 55.2609 16.9138 53.9581 21.0437V21.0704L50.7521 31.5836V31.6036C50.5997 32.0962 50.5672 32.6172 50.657 33.1244C50.7469 33.6317 50.9567 34.1112 51.2695 34.5243C51.5824 34.9374 51.9896 35.2725 52.4583 35.5028C52.927 35.7331 53.4442 35.8521 53.9683 35.8502H62.2123C62.7258 35.8516 63.2324 35.9675 63.6937 36.1892C64.155 36.4109 64.5591 36.7327 64.8754 37.1302C65.1899 37.5282 65.4064 37.9922 65.5082 38.4859C65.61 38.9797 65.5943 39.49 65.4624 39.9768L63.9798 45.4734C63.8646 45.9003 63.854 46.3479 63.9489 46.7796C64.0439 47.2113 64.2416 47.6147 64.526 47.9567C64.807 48.2951 65.1637 48.5651 65.5684 48.7458C65.973 48.9265 66.4147 49.0129 66.8589 48.9984C67.3031 48.9839 67.7379 48.8688 68.1295 48.6621C68.521 48.4554 68.8587 48.1627 69.1162 47.8067L77.3364 35.3902C77.6497 34.9612 78.0622 34.6115 78.5399 34.3699C79.0177 34.1282 79.547 34.0015 80.0844 34.0002H86.2148M86.2148 37.3334V14.0003",stroke:"black",strokeWidth:2.85,strokeLinecap:"round",strokeLinejoin:"round"}));function Hl({siteUrl:e=window.location.origin,apiUrl:t,apiKey:n}){const a="members/api";function i({type:l,resource:c}){return`${e.replace(/\/$/,"")}/${a}/${c}/`}function r({resource:l,params:c={}}){if(t&&n){const m=new URLSearchParams({...c,key:n});return`${t.replace(/\/$/,"")}/${l}/?${m.toString()}`}return""}function o({url:l,method:c="GET",headers:m={},credentials:f=void 0,body:p=void 0}){return fetch(l,{method:c,headers:m,credentials:f,body:p})}const s={};return s.site={read(){const l=i({type:"members",resource:"site"});return o({url:l,method:"GET",headers:{"Content-Type":"application/json"}}).then(function(c){if(c.ok)return c.json();throw new Error("Failed to fetch site data")})},newsletters(){const l=r({resource:"newsletters",params:{limit:100}});return o({url:l,method:"GET",headers:{"Content-Type":"application/json"}}).then(function(c){if(c.ok)return c.json();throw new Error("Failed to fetch site data")})},tiers(){const l=r({resource:"tiers",params:{limit:100,include:"monthly_price,yearly_price,benefits"}});return o({url:l,method:"GET",headers:{"Content-Type":"application/json"}}).then(function(c){if(c.ok)return c.json();throw new Error("Failed to fetch site data")})},settings(){const l=r({resource:"settings"});return o({url:l,method:"GET",headers:{"Content-Type":"application/json"}}).then(function(c){if(c.ok)return c.json();throw new Error("Failed to fetch site data")})},offer({offerId:l}){const c=r({resource:`offers/${l}`});return o({url:c,method:"GET",headers:{"Content-Type":"application/json"}}).then(function(m){if(m.ok)return m.json();throw new Error("Failed to fetch offer data")})},recommendations({limit:l=100}={limit:100}){const c=r({resource:"recommendations",params:{limit:l}});return o({url:c,method:"GET",headers:{"Content-Type":"application/json"}}).then(function(m){if(m.ok)return m.json();throw new Error("Failed to fetch recommendations")})}},s.feedback={async add({uuid:l,key:c,postId:m,score:f}){let p=i({type:"members",resource:"feedback"});l&&c&&(p=p+`?uuid=${l}&key=${c}`);const k=await o({url:p,method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({feedback:[{post_id:m,score:f}]})});if(k.ok)return k.json();throw await wn.fromApiResponse(k)??new Error("Failed to save feedback")}},s.recommendations={trackClicked({recommendationId:l}){let c=i({type:"members",resource:"recommendations/"+l+"/clicked"});navigator.sendBeacon(c)},trackSubscribed({recommendationId:l}){let c=i({type:"members",resource:"recommendations/"+l+"/subscribed"});navigator.sendBeacon(c)}},s.member={identity(){const l=i({type:"members",resource:"session"});return o({url:l,credentials:"same-origin"}).then(function(c){return!c.ok||c.status===204?null:c.text()})},sessionData(){const l=i({type:"members",resource:"member"});return o({url:l,credentials:"same-origin"}).then(function(c){return!c.ok||c.status===204?null:c.json()})},update({name:l,subscribed:c,newsletters:m,enableCommentNotifications:f}){const p=i({type:"members",resource:"member"}),y={name:l,subscribed:c,newsletters:m};return f!==void 0&&(y.enable_comment_notifications=f),o({url:p,method:"PUT",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(y)}).then(function(k){return k.ok?k.json():null})},deleteSuppression(){const l=i({type:"members",resource:"member/suppression"});return o({url:l,method:"DELETE"}).then(function(c){if(!c.ok)throw new Error("Your email has failed to resubscribe, please try again");return!0})},async getIntegrityToken(){const l=i({type:"members",resource:"integrity-token"}),c=await o({url:l,method:"GET"});if(c.ok)return c.text();{const m=await wn.fromApiResponse(c);throw m||new Error("Failed to start a members session")}},async sendMagicLink({email:l,emailType:c,labels:m,name:f,oldEmail:p,newsletters:y,redirect:k,integrityToken:S,phonenumber:b,customUrlHistory:w,token:E,autoRedirect:P=!0,includeOTC:j}){const F=i({type:"members",resource:"send-magic-link"}),z={name:f,email:l,newsletters:y,oldEmail:p,emailType:c,labels:m,requestSrc:"portal",redirect:k,integrityToken:S,honeypot:b,token:E,autoRedirect:P,includeOTC:j},R=w??co();R&&(z.urlHistory=R);const _=await o({url:F,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)});if(_.ok){if((_.headers.get("content-type")||"").toLowerCase().includes("application/json"))try{return await _.json()}catch{}return{}}else{const D=await wn.fromApiResponse(_);throw D||new Error("Failed to send magic link email")}},async verifyOTC({otc:l,otcRef:c,redirect:m,integrityToken:f}){const p=i({type:"members",resource:"verify-otc"}),k=await o({url:p,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({otc:l,otcRef:c,redirect:m,integrityToken:f})});if(k.ok)return await k.json();{const S=await wn.fromApiResponse(k);throw S||new Error("Failed to verify code")}},signout(l=!1){const c=i({type:"members",resource:"session"});return o({url:c,method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({all:l})}).then(function(m){if(m.ok)return window.location.replace(e),"Success";throw new Error("Failed to signout")})},async newsletters({uuid:l,key:c}){let m=i({type:"members",resource:"member/newsletters"});return m=m+`?uuid=${l}&key=${c}`,o({url:m,credentials:"same-origin"}).then(function(f){return!f.ok||f.status===204?null:f.json()})},async updateNewsletters({uuid:l,newsletters:c,key:m,enableCommentNotifications:f}){let p=i({type:"members",resource:"member/newsletters"});p=p+`?uuid=${l}&key=${m}`;const y={newsletters:c};return f!==void 0&&(y.enable_comment_notifications=f),o({url:p,method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(y)}).then(function(k){if(k.ok)return k.json();throw new Error("Failed to update email preferences")})},async updateEmailAddress({email:l}){const c=await s.member.identity(),m=i({type:"members",resource:"member/email"});return o({url:m,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:l,identity:c})}).then(async function(p){var y,k;if(p.ok)return"Success";{const S=await p.json(),b=((k=(y=S==null?void 0:S.errors)==null?void 0:y[0])==null?void 0:k.message)||"Failed to send email address verification email";throw new Error(b)}})},async checkoutPlan({plan:l,tierId:c,cadence:m,cancelUrl:f,successUrl:p,email:y,name:k,offerId:S,newsletters:b,metadata:w={}}={}){var R,_;const E=new URL(e),P=await s.member.identity(),j=i({type:"members",resource:"create-stripe-checkout-session"});if(!f){const D=window.location.href.startsWith(E.href)?new URL(window.location.href):new URL(e);D.searchParams.set("stripe","cancel"),f=D.href}const F={name:k,newsletters:JSON.stringify(b),requestSrc:"portal",fp_tid:(_=(R=window.FPROM||window.$FPROM)==null?void 0:R.data)==null?void 0:_.tid,urlHistory:co(),...w},z={priceId:S?null:l,offerId:S,identity:P,metadata:F,successUrl:p,cancelUrl:f};return y&&(z.customerEmail=y),c&&m&&(delete z.priceId,z.tierId=S?null:c,z.cadence=S?null:m),o({url:j,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)}).then(async function(D){var X,ne;if(!D.ok){const ye=await D.json(),he=((ne=(X=ye==null?void 0:ye.errors)==null?void 0:X[0])==null?void 0:ne.message)||"Failed to signup, please try again.";throw new Error(he)}return D.json()}).then(function(D){return D.url?window.location.assign(D.url):window.Stripe(D.publicKey).redirectToCheckout({sessionId:D.sessionId}).then(function(ne){if(ne.error)throw new Error(ne.error.message)})})},async checkoutDonation({successUrl:l,cancelUrl:c,metadata:m={},personalNote:f=""}={}){var E,P,j;const p=await s.member.identity(),y=i({type:"members",resource:"create-stripe-checkout-session"}),k={fp_tid:(P=(E=window.FPROM||window.$FPROM)==null?void 0:E.data)==null?void 0:P.tid,urlHistory:co(),...m},b=await o({url:y,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:p,metadata:k,successUrl:l,cancelUrl:c,type:"donation",personalNote:f})}),w=await b.json();if(!b.ok){const F=(j=w==null?void 0:w.errors)==null?void 0:j[0];throw F||new Error("We're unable to process your payment right now. Please try again later.")}return w},async editBilling({successUrl:l,cancelUrl:c,subscriptionId:m}={}){const f=new URL(e),p=await s.member.identity(),y=i({type:"members",resource:"create-stripe-update-session"});if(!l){const k=new URL(e);k.searchParams.set("stripe","billing-update-success"),l=k.href}if(!c){const k=window.location.href.startsWith(f.href)?new URL(window.location.href):new URL(e);k.searchParams.set("stripe","billing-update-cancel"),c=k.href}return o({url:y,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:p,subscription_id:m,successUrl:l,cancelUrl:c})}).then(function(k){if(!k.ok)throw new Error("Unable to create stripe checkout session");return k.json()}).then(function(k){return window.Stripe(k.publicKey).redirectToCheckout({sessionId:k.sessionId})}).then(function(k){if(k.error)throw new Error(k.error.message)}).catch(function(k){throw k})},async manageBilling({returnUrl:l,subscriptionId:c}={}){const m=await s.member.identity(),f=i({type:"members",resource:"create-stripe-billing-portal-session"});if(!l){const p=new URL(e);p.searchParams.set("stripe","billing-portal-closed"),l=p.href}return o({url:f,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:m,subscription_id:c,returnUrl:l})}).then(function(p){if(!p.ok)throw new Error("Unable to create Stripe billing portal session");return p.json()}).then(function(p){return window.location.assign(p.url)}).catch(function(p){throw p})},async updateSubscription({subscriptionId:l,tierId:c,cadence:m,planId:f,smartCancel:p,cancelAtPeriodEnd:y,cancellationReason:k}){const S=await s.member.identity(),b=i({type:"members",resource:"subscriptions"})+l+"/",w={smart_cancel:p,cancel_at_period_end:y,cancellation_reason:k,identity:S,priceId:f};return c&&m&&(delete w.priceId,w.tierId=c,w.cadence=m),o({url:b,method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(w)})},async offers(){const l=await s.member.identity(),c=i({type:"members",resource:"member/offers"});return o({url:c,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:l})}).then(function(m){return m.ok?m.json():{offers:[]}}).catch(function(){return{offers:[]}})},async applyOffer({offerId:l,subscriptionId:c}){const m=await s.member.identity(),f=i({type:"members",resource:`subscriptions/${c}/apply-offer`}),p=await o({url:f,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:m,offer_id:l})});if(!p.ok){const y=await p.text();throw new Error(y||"Failed to apply offer")}return!0}},s.init=async()=>{let[l]=await Promise.all([s.member.sessionData()]),c={},m=[],f=[],p={},y=[];try{[{settings:p},{tiers:f},{newsletters:m}]=await Promise.all([s.site.settings(),s.site.tiers(),s.site.newsletters()]),c={...p,newsletters:m,tiers:qU({tiers:f})}}catch{}if(l&&l.paid)try{y=(await s.member.offers()).offers||[]}catch(k){console.warn("[Portal] Failed to load member offers:",k)}return c=NU({site:c}),{site:c,member:l,offers:y}},s}class ko extends re.Component{render(){return u.jsx("div",{style:{display:"flex",flexDirection:"column",color:"#313131"},children:u.jsx("div",{style:{paddingLeft:"16px",paddingRight:"16px",paddingTop:"12px",height:"50px"},children:u.jsx(Ii,{className:"gh-portal-loadingicon dark","data-testid":"loaderIcon"})})})}}const G6=`
|
|
5945
5945
|
.gh-portal-feedback {
|
|
5946
5946
|
|
|
5947
5947
|
}
|
|
@@ -6099,9 +6099,9 @@ html[dir="rtl"] .gh-portal-offer-title h4 {
|
|
|
6099
6099
|
}
|
|
6100
6100
|
}
|
|
6101
6101
|
}
|
|
6102
|
-
`;function K6({error:e}){const{doAction:t}=
|
|
6102
|
+
`;function K6({error:e}){const{doAction:t}=C.useContext(H);return u.jsxs("div",{className:"gh-portal-content gh-portal-feedback with-footer",children:[u.jsx(Oe,{}),u.jsx("div",{className:"gh-feedback-icon gh-feedback-icon-error",children:u.jsx(W6,{})}),u.jsx("h1",{className:"gh-portal-main-title",children:v("Sorry, that didn’t work.")}),u.jsx("div",{children:u.jsx("p",{className:"gh-portal-text-center",children:e})}),u.jsx(ze,{style:{width:"100%"},retry:!1,onClick:()=>t("closePopup"),disabled:!1,brandColor:"#000000",label:v("Close"),isRunning:!1,tabIndex:3,classes:"sticky bottom"})]})}const q6=({onConfirm:e,loading:t,initialScore:n})=>{const{doAction:a,brandColor:i}=C.useContext(H),[r,o]=C.useState(n),s=p=>{p.stopPropagation()},l=()=>{a("closePopup")},c=async p=>{p.stopPropagation(),await e(r)},m=p=>{const y="gh-feedback-button";return p===r?`${y} gh-feedback-button-selected`:y},f=p=>p===r?{color:i}:{};return u.jsxs("div",{className:"gh-portal-confirm-dialog",onMouseDown:s,children:[u.jsx("h1",{className:"gh-portal-confirm-title",children:v("Give feedback on this post")}),u.jsxs("div",{className:"gh-feedback-buttons-group",children:[u.jsxs("button",{className:m(1),style:f(1),onClick:()=>o(1),children:[u.jsx(Rx,{}),v("More like this")]}),u.jsxs("button",{className:m(0),style:f(0),onClick:()=>o(0),children:[u.jsx(_x,{}),v("Less like this")]})]}),u.jsx(ze,{classes:"gh-portal-confirm-button",retry:!1,onClick:c,disabled:!1,brandColor:i,label:v("Submit feedback"),isRunning:t,tabIndex:3}),u.jsx(Oe,{close:()=>l()})]})};async function J6({siteUrl:e,uuid:t,key:n,postId:a,score:i},r){await(r||Hl({siteUrl:e})).feedback.add({uuid:t,postId:a,key:n,score:i})}const Z6=({action:e,score:t})=>(C.useEffect(()=>{e(t)}),u.jsx(ko,{})),X6=({positive:e})=>{const{doAction:t,brandColor:n}=C.useContext(H),a=e?u.jsx(Rx,{}):u.jsx(_x,{});return u.jsxs("div",{className:"gh-portal-content gh-portal-feedback",children:[u.jsx(Oe,{}),u.jsx("div",{className:"gh-feedback-icon",children:a}),u.jsx("h1",{className:"gh-portal-main-title",children:v("Thanks for the feedback!")}),u.jsx("p",{className:"gh-portal-text-center",children:v("Your input helps shape what gets published.")}),u.jsx(ze,{style:{width:"100%"},retry:!1,onClick:()=>t("closePopup"),disabled:!1,brandColor:n,label:v("Close"),isRunning:!1,tabIndex:3,classes:"sticky bottom"})]})};function Q6(){const{site:e,pageData:t,member:n,api:a}=C.useContext(H),{uuid:i,key:r,postId:o,score:s}=t,[l,c]=C.useState(s),m=l===1,f=!!n,[p,y]=C.useState(f),[k,S]=C.useState(f),[b,w]=C.useState(null),E=async j=>{S(!0);try{await J6({siteUrl:e.url,uuid:i,key:r,postId:o,score:j},a),c(j)}catch(F){const z=xn(F,v("There was a problem submitting your feedback. Please try again a little later."));w(z)}S(!1)},P=async j=>{await E(j),y(!0)};if(b)return u.jsx(K6,{error:b});if(p){if(k)return u.jsx(Z6,{action:E,score:l})}else return u.jsx(q6,{onConfirm:P,loading:k,initialScore:l});return u.jsx(X6,{positive:m})}const e5=".gh-email-suppressed-page-title{margin-bottom:14px}.gh-email-suppressed-page-icon{display:block;width:38px;height:38px;margin:0 auto 18px}.gh-email-suppressed-page-text{padding:0 14px;text-align:center;color:var(--grey6)}.gh-email-faq-footer-text{color:var(--grey8)}.gh-portal-list-detail.email-newsletter .gh-email-faq-page-button{display:block;margin-top:3px}.gh-portal-action-footer .gh-email-faq-page-button{margin-inline-start:4px}.emailReceivingFAQ .gh-portal-btn-back,.emailReceivingFAQ .gh-portal-btn-back:hover{left:calc(6vmin - 14px)}html[dir=rtl] .emailReceivingFAQ .gh-portal-btn-back,html[dir=rtl] .emailReceivingFAQ .gh-portal-btn-back:hover{right:calc(6vmin - 14px);left:unset}.emailReceivingFAQ .gh-portal-closeicon-container{right:calc(6vmin - 20px)}@media (max-width: 480px){.emailReceivingFAQ .gh-portal-btn-back,.emailReceivingFAQ .gh-portal-btn-back:hover{left:16px}.emailReceivingFAQ .gh-portal-closeicon-container{right:24px}}.gh-email-faq-page-button{color:var(--brandcolor);cursor:pointer;background:none;transition:color linear .1s;font-size:1.45rem}html[dir=rtl] .gh-email-faq-page-button span{transform:scaleX(-1);display:inline-flex}",t5="",n5="",a5=e=>C.createElement("svg",{id:"Regular",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},C.createElement("title",null,"confetti"),C.createElement("defs",null,C.createElement("style",null,`
|
|
6103
6103
|
.cls-1{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px}
|
|
6104
|
-
`)),
|
|
6104
|
+
`)),C.createElement("ellipse",{className:"cls-1",cx:11.531,cy:12.469,rx:2.625,ry:5.25,transform:"rotate(-45 11.531 12.47)"}),C.createElement("path",{className:"cls-1",d:"M7.4 9.7.888 21.121a1.5 1.5 0 0 0 1.991 1.991L14.3 16.605M15.773 7.7a.375.375 0 0 1 0 .531m-.53-.531a.375.375 0 0 1 .53 0m-.53.527a.377.377 0 0 1 0-.531m.53.531a.375.375 0 0 1-.53 0m4.773-4.773a.374.374 0 0 1 0 .53m-.53-.53a.374.374 0 0 1 .53 0m-.53.53a.374.374 0 0 1 0-.53m.53.53a.375.375 0 0 1-.53 0m.53 10.076a.375.375 0 0 1 0 .531m-.53-.531a.375.375 0 0 1 .53 0m-.53.531a.375.375 0 0 1 0-.531m.53.531a.375.375 0 0 1-.53 0M8.349 4.514a.377.377 0 0 1 0 .531m-.53-.531a.375.375 0 0 1 .53 0m-.53.531a.375.375 0 0 1 0-.531m.53.531a.375.375 0 0 1-.53 0M12.857.75a13.836 13.836 0 0 1-.531 5.62m4.243-4.242-.53 2.651m7.211 6.364a13.836 13.836 0 0 0-5.62.531m4.242-4.243-2.651.53"})),i5=`
|
|
6105
6105
|
.gh-portal-tips-and-donations .gh-portal-signup-header {
|
|
6106
6106
|
margin-bottom: 12px;
|
|
6107
6107
|
padding: 0;
|
|
@@ -6127,7 +6127,7 @@ html[dir="rtl"] .gh-portal-offer-title h4 {
|
|
|
6127
6127
|
.gh-portal-tips-and-donations .gh-portal-text-center {
|
|
6128
6128
|
padding: 16px 32px 12px;
|
|
6129
6129
|
}
|
|
6130
|
-
`,r5=()=>{const{doAction:e,brandColor:t,site:n}=
|
|
6130
|
+
`,r5=()=>{const{doAction:e,brandColor:t,site:n}=C.useContext(H),a=v("Thank you for your support"),i=v("To continue to stay up to date, subscribe to {publication} below.",{publication:n==null?void 0:n.title}),r=v("Sign up");return u.jsxs("div",{className:"gh-portal-content gh-portal-tips-and-donations",children:[u.jsx(Oe,{}),u.jsxs("div",{className:"gh-portal-signup-header",children:[n.icon?u.jsx("img",{className:"gh-portal-signup-logo",src:n.icon,alt:n.title}):u.jsx("div",{className:"gh-tips-and-donations-icon-success",children:u.jsx(a5,{})}),u.jsx("h1",{className:"gh-portal-main-title",children:a})]}),u.jsx("p",{className:"gh-portal-text-center",children:i}),u.jsx(ze,{style:{width:"100%"},retry:!1,onClick:()=>e("switchPage",{page:"signup"}),disabled:!1,brandColor:t,label:r,isRunning:!1,tabIndex:3,classes:"sticky bottom"}),u.jsxs("div",{className:"gh-portal-signup-message",children:[u.jsx("div",{children:v("Already a member?")}),u.jsx("button",{"data-test-button":"signin-switch","data-testid":"signin-switch",className:"gh-portal-btn gh-portal-btn-link",style:{color:t},onClick:()=>e("switchPage",{page:"signin"}),children:u.jsx("span",{children:v("Sign in")})})]})]})},o5=e=>C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},C.createElement("title",null,"warning-stroke"),C.createElement("path",{d:"M13.313 2.275a1.5 1.5 0 0 0-2.626 0l-9.75 18A1.5 1.5 0 0 0 2.25 22.5h19.5a1.5 1.5 0 0 0 1.313-2.225zM12 18a.375.375 0 0 1 .375.375m-.75 0A.375.375 0 0 1 12 18m0 .75a.375.375 0 0 1-.375-.375m.75 0a.375.375 0 0 1-.375.375M12 15V8.25",style:{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5px"}})),s5=`
|
|
6131
6131
|
.gh-portal-tips-and-donations .gh-tips-and-donations-icon-error {
|
|
6132
6132
|
padding: 10px 0;
|
|
6133
6133
|
text-align: center;
|
|
@@ -6144,8 +6144,8 @@ html[dir="rtl"] .gh-portal-offer-title h4 {
|
|
|
6144
6144
|
.gh-portal-tips-and-donations .gh-portal-text-center {
|
|
6145
6145
|
padding: 16px 32px 12px;
|
|
6146
6146
|
}
|
|
6147
|
-
`,Op=({error:e})=>{const{doAction:t}=
|
|
6148
|
-
`)),
|
|
6147
|
+
`,Op=({error:e})=>{const{doAction:t}=C.useContext(H),n=v("Sorry, that didn’t work."),a=e||v("There was an error processing your payment. Please try again."),i=v("Close");return e&&Vs(e),u.jsxs("div",{className:"gh-portal-content gh-portal-tips-and-donations",children:[u.jsx(Oe,{}),u.jsx("div",{className:"gh-tips-and-donations-icon-error",children:u.jsx(o5,{})}),u.jsx("h1",{className:"gh-portal-main-title",children:n}),u.jsx("p",{className:"gh-portal-text-center",children:a}),u.jsx(ze,{style:{width:"100%"},retry:!0,onClick:()=>t("closePopup"),disabled:!1,brandColor:"#000000",label:i,isDestructive:!0,isRunning:!1,tabIndex:3,classes:"sticky bottom"})]})},l5=e=>C.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},C.createElement("path",{d:"M3.84 20.25L19.75 4.34",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M19.75 19.3398V4.33984H4.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),u5=e=>C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},C.createElement("defs",null,C.createElement("style",null,`.a{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px!important;}
|
|
6148
|
+
`)),C.createElement("title",null,"check-circle-1"),C.createElement("path",{className:"a",d:"M6,13.223,8.45,16.7a1.049,1.049,0,0,0,1.707.051L18,6.828"}),C.createElement("circle",{className:"a",cx:12,cy:11.999,r:11.25})),c5=`
|
|
6149
6149
|
.gh-portal-recommendations-header .gh-portal-main-title {
|
|
6150
6150
|
padding: 0 32px;
|
|
6151
6151
|
text-wrap: balance;
|
|
@@ -6278,7 +6278,7 @@ html[dir="rtl"] .gh-portal-offer-title h4 {
|
|
|
6278
6278
|
color: var(--grey6);
|
|
6279
6279
|
font-weight: 400;
|
|
6280
6280
|
}
|
|
6281
|
-
`,Ux=e=>{let t=e.length,n;for(;t>0;)n=Math.floor(Math.random()*t),t-=1,[e[t],e[n]]=[e[n],e[t]];return e},d5=({title:e,favicon:t,featuredImage:n})=>{const[a,i]=
|
|
6281
|
+
`,Ux=e=>{let t=e.length,n;for(;t>0;)n=Math.floor(Math.random()*t),t-=1,[e[t],e[n]]=[e[n],e[t]];return e},d5=({title:e,favicon:t,featuredImage:n})=>{const[a,i]=C.useState(t||n),r=()=>{i(null)};return a?u.jsx("img",{className:"gh-portal-recommendation-item-favicon",src:a,alt:e,onError:r}):u.jsx("div",{className:"gh-portal-recommendation-item-favicon"})},Lx=e=>{const t=window.open(e,"_blank");t?t.focus():window.location.href=e},m5=e=>{const{doAction:t,member:n,site:a}=C.useContext(H),{title:i,url:r,description:o,favicon:s,one_click_subscribe:l,featured_image:c}=e,m=n&&l,[f,p]=C.useState(!1),[y,k]=C.useState(!1),[S,b]=C.useState(!1),w=a.outbound_link_tagging??!1,E=C.useMemo(()=>{if(!w)return r;try{const z=new URL(r);return z.searchParams.has("ref")||z.searchParams.has("utm_source")||z.searchParams.has("source")?r:(z.searchParams.set("ref",Yw()),z.toString())}catch{return r}},[r,w]),P=C.useCallback(()=>{Lx(E),y||(t("trackRecommendationClicked",{recommendationId:e.id}),k(!0))},[E,e.id,y]),j=C.useCallback(async()=>{try{b(!0),await t("oneClickSubscribe",{siteUrl:r,throwErrors:!0}),t("trackRecommendationSubscribed",{recommendationId:e.id}),p(!0)}catch{const R=new URL("#/portal/signup",E);Lx(R),y||(t("trackRecommendationClicked",{recommendationId:e.id}),k(!0))}b(!1)},[p,r,E,e.id,y]),F=C.useCallback(z=>{S||(m?j(z):P(z))},[S,m,j,P]);return u.jsxs("section",{className:"gh-portal-recommendation-item",children:[u.jsxs("div",{className:"gh-portal-list-detail gh-portal-list-big",onClick:P,children:[u.jsxs("div",{className:"gh-portal-recommendation-item-header",children:[u.jsx(d5,{title:i,favicon:s,featuredImage:c}),u.jsx("h3",{children:i}),u.jsx(l5,{className:"gh-portal-recommendation-arrow-icon"})]}),u.jsxs("div",{className:"gh-portal-recommendation-description-container",children:[f&&u.jsxs("div",{className:"gh-portal-recommendation-subscribed "+(o?"with-description":"without-description"),children:[u.jsx("span",{children:v("Verification link sent, check your inbox")}),u.jsx(u5,{className:"gh-portal-recommendation-checkmark-icon",alt:""})]}),o&&u.jsx("p",{className:f?"gh-portal-recommendation-description-hidden":"",children:o})]})]}),u.jsxs("div",{className:"gh-portal-recommendation-item-action",children:[!f&&S&&u.jsx("span",{className:"gh-portal-recommendations-loading-container",children:u.jsx(Ii,{className:"gh-portal-loadingicon dark"})}),!f&&!S&&m&&u.jsx("button",{type:"button",className:"gh-portal-btn gh-portal-btn-list",onClick:F,children:v("Subscribe")})]})]})},p5=()=>{const{api:e,site:t,pageData:n,doAction:a}=C.useContext(H),{title:i,icon:r}=t,{recommendations_enabled:o=!1}=t,[s,l]=C.useState(null);C.useEffect(()=>{e.site.recommendations({limit:100}).then(k=>{const S=k.recommendations.filter(w=>w.one_click_subscribe),b=k.recommendations.filter(w=>!w.one_click_subscribe);l([...Ux(S),...Ux(b)])}).catch(k=>{console.error(k)})},[]);const[c,m]=C.useState(5),f=()=>{m(s.length)};if(C.useEffect(()=>()=>{if(n.signup){const k=[];k.push("action","success"),dp(k)}},[]),s===null)return u.jsx(ko,{});const p=n&&n.signup?v("Welcome to {siteTitle}",{siteTitle:i,interpolation:{escapeValue:!1}}):v("Recommendations");let y;return o&&s&&s.length>0?n&&n.signup?y=v("Thank you for subscribing. Before you start reading, below are a few other sites you may enjoy."):y=v("Here are a few other sites you may enjoy."):y=v("Sorry, no recommendations are available right now."),u.jsxs("div",{className:"gh-portal-content with-footer",children:[u.jsx(Oe,{}),u.jsxs("div",{className:"gh-portal-recommendations-header",children:[r&&u.jsx("img",{className:"gh-portal-signup-logo",alt:i,src:r}),u.jsx("h1",{className:"gh-portal-main-title",children:p})]}),u.jsx("p",{className:"gh-portal-recommendations-description",children:y}),o?u.jsx("div",{className:"gh-portal-list",children:s.slice(0,c).map((k,S)=>u.jsx(m5,{...k},S))}):null,(c<s.length||n&&n.signup)&&u.jsxs("footer",{className:"gh-portal-action-footer",children:[c<s.length&&u.jsx("button",{className:"gh-portal-btn gh-portal-center",style:{width:"100%"},onClick:f,children:u.jsx("span",{children:v("Show all")})}),n&&n.signup&&u.jsx("button",{className:"gh-portal-btn gh-portal-center gh-portal-btn-link gh-portal-btn-recommendations-later",style:{width:"100%"},onClick:f,children:u.jsx("span",{onClick:()=>a("closePopup"),children:v("Maybe later")})})]})]})},h5=`
|
|
6282
6282
|
.gh-portal-action-transistor {
|
|
6283
6283
|
animation: fadeIn 0.3s ease-in-out;
|
|
6284
6284
|
}
|
|
@@ -7533,5 +7533,5 @@ html[dir="rtl"] .gh-portal-list-toggle-wrapper .gh-portal-list-detail {
|
|
|
7533
7533
|
.gh-portal-hide {
|
|
7534
7534
|
display: none;
|
|
7535
7535
|
}
|
|
7536
|
-
`;function k5({site:e}){return Zm+g5+uL+LL+XL+TL()+lL+iL+sL+Ow+L6+z6+H6()+lp+Y6+y5+b5+G6+e5+t5+n5+i5+s5+c5+h5}const nh=class nh extends re.Component{constructor(t){super(t),this.state={email:"",token:void 0}}componentDidMount(){const{member:t}=this.context;t&&this.context.doAction("switchPage",{page:"accountHome"})}handleSignin(t){t.preventDefault(),this.doSignin()}doSignin(){this.setState(t=>({errors:Ul({fields:this.getInputFields({state:t})})}),async()=>{const{email:t,phonenumber:n,errors:a,token:i}=this.state,{redirect:r}=this.context.pageData??{};a&&Object.values(a).filter(s=>!!s).length>0||this.context.doAction("signin",{email:t,phonenumber:n,redirect:r,token:i})})}handleInputChange(t,n){const a=n.name;this.setState({[a]:t.target.value})}onKeyDown(t){t.keyCode===13&&this.handleSignin(t)}getInputFields({state:t}){const n=t.errors||{};return[{type:"email",value:t.email,placeholder:v("jamie@example.com"),label:v("Email"),name:"email",required:!0,errorMessage:n.email||"",autoFocus:!0},{type:"text",value:t.phonenumber,placeholder:"+1 (123) 456-7890",label:"Phone number",name:"phonenumber",required:!1,tabIndex:-1,autoComplete:"off",hidden:!0}]}renderSubmitButton(){const{action:t}=this.context;let n=!1;const a=t==="signin:running";let i=v(a?"Sending login link...":"Continue");const r=!!a;return t==="signin:failed"&&(i=v("Retry"),n=!0),u.jsx(ze,{dataTestId:"signin",retry:n,style:{width:"100%"},onClick:o=>this.handleSignin(o),disabled:r,brandColor:this.context.brandColor,label:i,isRunning:a})}renderSignupMessage(){const{brandColor:t}=this.context;return u.jsxs("div",{className:"gh-portal-signup-message",children:[u.jsx("div",{children:v("Don't have an account?")}),u.jsx("button",{"data-test-button":"signup-switch",className:"gh-portal-btn gh-portal-btn-link",style:{color:t},onClick:()=>this.context.doAction("switchPage",{page:"signup"}),children:u.jsx("span",{children:v("Sign up")})})]})}renderForm(){const{site:t}=this.context,n=$l({site:t})&&Sn({site:t});return ea({site:t})?u.jsxs("section",{children:[u.jsx("div",{className:"gh-portal-section",children:u.jsx(Rl,{fields:this.getInputFields({state:this.state}),onChange:(a,i)=>this.handleInputChange(a,i),onKeyDown:(a,i)=>this.onKeyDown(a,i)})}),u.jsxs("footer",{className:"gh-portal-signin-footer",children:[this.renderSubmitButton(),n&&this.renderSignupMessage()]})]}):u.jsx("section",{children:u.jsx("div",{className:"gh-portal-section",children:u.jsx("p",{className:"gh-portal-members-disabled-notification","data-testid":"members-disabled-notification-text",children:v("Memberships unavailable, contact the owner for access.")})})})}renderSiteIcon(){const{site:t}=this.context,n=t.icon;return n?u.jsx("img",{className:"gh-portal-signup-logo",src:n,alt:this.context.site.title}):ea({site:t})?null:u.jsx(vx,{className:"gh-portal-icon gh-portal-icon-invitation"})}renderSiteTitle(){const{site:t}=this.context,n=t.title;return ea({site:t})?u.jsx("h1",{className:"gh-portal-main-title",children:v("Sign in")}):u.jsx("h1",{className:"gh-portal-main-title",children:n})}renderFormHeader(){return u.jsxs("header",{className:"gh-portal-signin-header",children:[this.renderSiteIcon(),this.renderSiteTitle()]})}render(){return u.jsxs(u.Fragment,{children:[u.jsx(Oe,{}),u.jsx("div",{className:"gh-portal-logged-out-form-container",children:u.jsxs("div",{className:"gh-portal-content signin",children:[this.renderFormHeader(),this.renderForm()]})})]})}};nh.contextType=H;let _p=nh;const v5=({handleSignout:e,supportAddress:t=""})=>{const n=`mailto:${t}`;return u.jsxs("footer",{className:"gh-portal-account-footer",children:[u.jsx("ul",{className:"gh-portal-account-footermenu",children:u.jsx("li",{children:u.jsx("button",{"data-test-button":"footer-signout",className:"gh-portal-btn",name:"logout","aria-label":"logout",onClick:a=>e(a),children:v("Sign out")})})}),u.jsx("div",{className:"gh-portal-account-footerright",children:u.jsx("ul",{className:"gh-portal-account-footermenu",children:u.jsx("li",{children:u.jsx("a",{"data-test-link":"footer-support",className:"gh-portal-btn gh-portal-btn-branded",href:n,onClick:()=>{n&&window.open(n)},children:v("Contact support")})})})})]})},w5=()=>{const{member:e,brandColor:t}=S.useContext(H),n=e.avatar_image;return u.jsxs("header",{className:"gh-portal-account-header",children:[u.jsx(Jm,{gravatar:n,style:{userIcon:{color:t,width:"56px",height:"56px",padding:"2px"}}}),u.jsx("h2",{className:"gh-portal-main-title",children:v("Your account")})]})},x5=()=>{const{site:e,action:t,brandColor:n,doAction:a}=S.useContext(H);if(!$l({site:e})||!Sn({site:e}))return null;const i=["checkoutPlan:running"].includes(t),r=()=>{a("switchPage",{page:"accountPlan",lastPage:"accountHome"})};return u.jsx(ze,{dataTestId:"view-plans",isRunning:i,label:v("View plans"),onClick:()=>r(),brandColor:n,style:{width:"100%"}})},E5=()=>{const{member:e,site:t}=S.useContext(H),{is_stripe_configured:n}=t;if(!n||Ni({site:t}))return null;const a=Ft({member:e}),i=Qn({member:e});if(i&&!a)return null;if(a){const r=a==null?void 0:a.current_period_end;if(i&&Qm({member:e})){const o=Qm({member:e}),s=En(o);return u.jsx("div",{className:"gh-portal-section",children:u.jsx("p",{className:"gh-portal-text-center gh-portal-free-ctatext",children:v("Your subscription will expire on {expiryDate}",{expiryDate:s})})})}if(a!=null&&a.cancel_at_period_end||i)return null;if(np({sub:a})){const o=En(a.trial_end_at);return u.jsx("div",{className:"gh-portal-section",children:u.jsx("p",{className:"gh-portal-text-center gh-portal-free-ctatext",children:v("Your subscription will start on {subscriptionStart}",{subscriptionStart:o})})})}return u.jsx("div",{className:"gh-portal-section",children:u.jsx("p",{className:"gh-portal-text-center gh-portal-free-ctatext",children:v("Your subscription will renew on {renewalDate}",{renewalDate:En(r)})})})}return u.jsxs("div",{className:"gh-portal-section",children:[u.jsx("p",{className:"gh-portal-text-center gh-portal-free-ctatext",children:v("You currently have a free membership, upgrade to a paid subscription for full access.")}),u.jsx(x5,{})]})},S5=()=>{const{member:e,doAction:t,action:n,brandColor:a}=S.useContext(H),i=Ft({member:e});if(!i||!i.cancel_at_period_end)return null;const r=i.cancel_at_period_end?v("Continue subscription"):v("Cancel subscription"),o=["cancelSubscription:running"].includes(n),s=!!o,l=!!i.cancel_at_period_end,c=()=>{if(!i.cancel_at_period_end)return null;const m=i.current_period_end;return u.jsx("p",{className:"gh-portal-text-center gh-portal-free-ctatext",children:v("Your subscription will expire on {expiryDate}",{expiryDate:En(m)})})};return u.jsxs("div",{className:"gh-portal-cancelcontinue-container",children:[u.jsx(c,{}),u.jsx(ze,{onClick:()=>{t("continueSubscription",{subscriptionId:i.id})},isRunning:o,disabled:s,isPrimary:l,brandColor:a,label:r,style:{width:"100%"}})]})},C5=e=>S.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},S.createElement("defs",null,S.createElement("style",null,".a{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px;}")),S.createElement("path",{d:"M22.939 2.56V8.817C22.9391 9.61244 22.6232 10.3754 22.061 10.938L10.5 22.5C10.2187 22.7812 9.83721 22.9392 9.43946 22.9392C9.04172 22.9392 8.66026 22.7812 8.37896 22.5L1.49997 15.62C1.21876 15.3387 1.06079 14.9572 1.06079 14.5595C1.06079 14.1618 1.21876 13.7803 1.49997 13.499L13.061 1.938C13.6236 1.37572 14.3865 1.0599 15.182 1.06H21.439C21.8368 1.06 22.2183 1.21803 22.4996 1.49934C22.7809 1.78064 22.939 2.16217 22.939 2.56V2.56Z",className:"a"}),S.createElement("path",{d:"M17.689 7.81C16.8605 7.81 16.189 7.13842 16.189 6.31C16.189 5.48157 16.8605 4.81 17.689 4.81C18.5174 4.81 19.189 5.48157 19.189 6.31C19.189 7.13842 18.5174 7.81 17.689 7.81Z",className:"a"})),$5=()=>{const{member:e,site:t,doAction:n}=S.useContext(H),a=()=>{const p=Ft({member:e});n("manageBilling",{subscriptionId:p.id})},i=()=>{const{is_stripe_configured:p}=t;p&&n("switchPage",{page:"accountPlan",lastPage:"accountHome"})},r=({price:p,isComplimentary:y,subscription:k})=>{const{next_payment:j}=k||{};let b="";if(p){const{amount:z=0,currency:R,interval:_}=p;b=`${Intl.NumberFormat("en",{currency:R,style:"currency"}).format(z/100)}/${v(_)}`}const w=Qm({member:e});y&&(w?b=`${v("Complimentary")} - ${v("Expires {expiryDate}",{expiryDate:w})}`:b=b?`${v("Complimentary")} (${b})`:v("Complimentary"));let E="";const P=np({sub:k});if(P&&(E="gh-portal-account-old-price"),P)return u.jsxs(u.Fragment,{children:[u.jsx("p",{className:E,children:b}),u.jsx(j5,{subscription:k})]});let $=T5({nextPayment:j});$&&(E="gh-portal-account-old-price");const F=()=>$?u.jsxs("p",{className:"gh-portal-account-discountcontainer","data-testid":"offer-label",children:[u.jsx(C5,{className:"gh-portal-account-tagicon"}),u.jsx("span",{children:$})]}):null;return u.jsxs(u.Fragment,{children:[u.jsx("p",{className:E,children:b}),u.jsx(F,{})]})},o=({isPaid:p})=>Ni({site:t})&&!p?null:u.jsx("button",{className:"gh-portal-btn gh-portal-btn-list",onClick:y=>i(),"data-test-button":"change-plan",children:v("Change")}),s=({defaultCardLast4:p})=>{if(p){const y=`**** **** **** ${p}`;return u.jsx("p",{children:y})}return null},l=({defaultCardLast4:p,isComplimentary:y})=>{const{action:k}=S.useContext(H),j=k==="manageBilling:running"?u.jsx(Ii,{className:"gh-portal-billing-button-loader"}):v("Update");return y?null:u.jsxs("section",{children:[u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:v("Billing info & receipts")}),u.jsx(s,{defaultCardLast4:p})]}),u.jsx("button",{className:"gh-portal-btn gh-portal-btn-list",onClick:b=>a(),"data-test-button":"manage-billing",children:j})]})},c=Ft({member:e}),m=Qn({member:e}),f=rn({member:e});if(c||m){const{price:p,default_payment_card_last4:y}=c||{};let k=v("Plan");return jl({site:t})&&Lw({member:e})&&(k=Lw({member:e})),u.jsxs(u.Fragment,{children:[u.jsxs("section",{children:[u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:k}),u.jsx(r,{price:p,isComplimentary:m,subscription:c})]}),u.jsx(o,{isPaid:f})]}),u.jsx(l,{isComplimentary:m,defaultCardLast4:y})]})}return null};function j5({subscription:e}){if(np({sub:e})){const t=En(e.trial_end_at);return u.jsx("p",{className:"gh-portal-account-discountcontainer",children:u.jsx("div",{children:u.jsx("span",{children:v("Free Trial – Ends {trialEnd}",{trialEnd:t})})})})}return null}function T5({nextPayment:e}){if(!e)return"";const t=e.discount;if(!t)return"";let n="";t.duration==="forever"?n=v("Forever"):t.duration==="once"?n=v("Next payment"):t.duration==="repeating"&&t.end&&(n=v("Ends {offerEndDate}",{offerEndDate:En(t.end)}));const a=Intl.NumberFormat("en",{currency:e.currency,style:"currency"}).format(e.amount/100);let i="";return t.duration==="once"?i=a:i=`${a}/${e.interval}`,`${i}${n?` — ${n}`:""}`}function P5(){const{member:e,site:t,doAction:n}=S.useContext(H);let{newsletters:a}=e;const i=!!(a!=null&&a.length);let r=v(i?"Subscribed":"Unsubscribed");const o=s=>{var m;s.preventDefault();const l=za({site:t}),c=(m=e==null?void 0:e.newsletters)!=null&&m.length?[]:l;n("updateNewsletterPreference",{newsletters:c})};return u.jsxs("section",{children:[u.jsxs("div",{className:"gh-portal-list-detail email-newsletter",children:[u.jsx("h3",{children:v("Email newsletter")}),u.jsxs("p",{children:[r," ",ap({member:e})&&i&&u.jsx("button",{className:"gh-portal-btn-text gh-email-faq-page-button",onClick:()=>n("switchPage",{page:"emailReceivingFAQ",lastPage:"accountHome"}),children:v("Not receiving emails?")})]})]}),u.jsx("div",{children:u.jsx(Dl,{dataTestId:"default-newsletter-toggle",id:"default-newsletter-toggle",onToggle:s=>{o(s)},checked:i})})]})}const Yx=e=>S.createElement("svg",{fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",...e},S.createElement("path",{d:"m12.79 12.376 4.08 4.079m-4.08 0 4.08-4.08",stroke:"red",strokeWidth:1.35,strokeLinecap:"round",strokeLinejoin:"round"}),S.createElement("path",{d:"m10.439 17.994-2.664-2.652-2.86 1.478.111-4.239m0 0L1.677 9.232a1.344 1.344 0 0 1-.366-1.222 1.369 1.369 0 0 1 .904-1.05l13.111-4.374a1.369 1.369 0 0 1 1.76 1.758L15 10m-9.974 2.581 11.67-9.727",stroke:"#A3A3A3",strokeWidth:1.35,strokeLinecap:"round",strokeLinejoin:"round"}));function z5(){return u.jsxs("p",{className:"gh-portal-email-notice",children:[u.jsx(Yx,{className:"gh-portal-email-notice-icon"}),u.jsx("span",{className:"gh-mobile-only",children:v("You're not receiving emails")}),u.jsx("span",{className:"gh-desktop-only",children:v("You're currently not receiving emails")})]})}function A5(){const{doAction:e,member:t,site:n}=S.useContext(H),a=Vw({member:t}),i=oo({site:n}),r=Tl({site:n}),o=a?"emailSuppressed":"accountEmail",s=!i&&!r,l=()=>a||s?u.jsx(z5,{}):u.jsx("p",{children:v("Update your preferences")});return u.jsxs("section",{children:[u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:v("Emails")}),l()]}),u.jsx("button",{className:"gh-portal-btn gh-portal-btn-list",onClick:()=>{e("switchPage",{page:o,lastPage:"accountHome"})},"data-test-button":"manage-newsletters",children:v("Manage")})]})}const N5=()=>{var o;const{member:e,site:t}=S.useContext(H),n=!!((o=t.labs)!=null&&o.transistor),a=e==null?void 0:e.uuid,[i,r]=S.useState(!1);return S.useEffect(()=>{if(!n||!a){r(!1);return}r(!1);const s=new AbortController;return(async()=>{try{const c=await fetch(`https://partner.transistor.fm/ghost/member/${a}`,{signal:s.signal});if(c.ok){const m=await c.json();s.signal.aborted||r((m==null?void 0:m.member)===!0)}}catch(c){if(s.signal.aborted)return;console.warn("Error in Transistor request",c)}})(),()=>s.abort()},[n,a]),{transistor:{enabled:n,hasPodcasts:i,memberUuid:a}}},I5=(e,t)=>lo({site:e})&&oo({site:e})||Tl({site:e})||Vw({member:t}),M5=e=>!lo({site:e})&&oo({site:e})&&!Tl({site:e}),F5=()=>{const{member:e,doAction:t,site:n}=S.useContext(H),{name:a,email:i}=e,{transistor:r}=N5(),o=()=>{t("switchPage",{page:"accountProfile",lastPage:"accountHome"})},s=I5(n,e),l=M5(n);return u.jsx("div",{children:u.jsxs("div",{className:"gh-portal-list",children:[u.jsxs("section",{children:[u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:a||v("Account")}),u.jsx("p",{children:i})]}),u.jsx("button",{"data-test-button":"edit-profile",className:"gh-portal-btn gh-portal-btn-list",onClick:c=>o(),children:v("Edit")})]}),u.jsx($5,{}),s&&u.jsx(A5,{}),l&&u.jsx(P5,{}),u.jsx(f5,{hasPodcasts:r.hasPodcasts,memberUuid:r.memberUuid})]})})},D5=()=>u.jsxs("div",{className:"gh-portal-content gh-portal-account-main",children:[u.jsx(Oe,{}),u.jsx(w5,{}),u.jsxs("section",{className:"gh-portal-account-data",children:[u.jsx(E5,{}),u.jsx(S5,{}),u.jsx(F5,{})]})]}),ah=class ah extends re.Component{componentDidMount(){const{member:t,site:n}=this.context;ea({site:n})||this.context.doAction("signout"),t||this.context.doAction("switchPage",{page:"signin",pageData:{redirect:window.location.href}})}handleSignout(t){t.preventDefault(),this.context.doAction("signout")}render(){const{member:t,site:n}=this.context,a=uo({site:n});return!t||!ea({site:n})?null:u.jsxs("div",{className:"gh-portal-account-wrapper",children:[u.jsx(D5,{}),u.jsx(v5,{onClose:()=>this.context.doAction("closePopup"),handleSignout:i=>this.handleSignout(i),supportAddress:a})]})}};ah.contextType=H;let Rp=ah;const ih=class ih extends re.Component{constructor(t,n){super(t,n);const{name:a="",email:i=""}=n.member||{};this.state={name:a,email:i}}componentDidMount(){const{member:t}=this.context;t||this.context.doAction("switchPage",{page:"signin"})}handleSignout(t){t.preventDefault(),this.context.doAction("signout")}onBack(){this.context.doAction("back")}onProfileSave(t){t.preventDefault(),this.setState(n=>({errors:Ul({fields:this.getInputFields({state:n})})}),()=>{const{email:n,name:a,errors:i}=this.state;i&&Object.values(i).filter(o=>!!o).length>0||(this.context.doAction("clearPopupNotification"),this.context.doAction("updateProfile",{email:n,name:a}))})}renderSaveButton(){const t=this.context.action==="updateProfile:running";let n=v("Save");this.context.action==="updateProfile:failed"&&(n=v("Retry"));const a=!!t;return u.jsx(ze,{dataTestId:"save-button",isRunning:t,onClick:i=>this.onProfileSave(i),disabled:a,brandColor:this.context.brandColor,label:n,style:{width:"100%"}})}renderDeleteAccountButton(){return u.jsx("div",{style:{cursor:"pointer",color:"red"},role:"button",children:v("Delete account")})}renderAccountFooter(){return u.jsx("footer",{className:"gh-portal-action-footer",children:this.renderSaveButton()})}renderHeader(){return u.jsxs("header",{className:"gh-portal-detail-header",children:[u.jsx(Mi,{brandColor:this.context.brandColor,hidden:!this.context.lastPage,onClick:t=>this.onBack(t)}),u.jsx("h3",{className:"gh-portal-main-title",children:v("Account settings")})]})}renderUserAvatar(){const t=this.context.member&&this.context.member.avatar_image,n={position:"relative",display:"flex",width:"64px",height:"64px",marginBottom:"6px",borderRadius:"100%",boxShadow:"0 0 0 3px #fff",border:"1px solid gray",overflow:"hidden",justifyContent:"center",alignItems:"center"};return u.jsx("div",{style:n,children:u.jsx(Jm,{gravatar:t,style:{userIcon:{color:"black",width:"56px",height:"56px"}}})})}handleInputChange(t,n){const a=n.name;this.setState({[a]:t.target.value})}getInputFields({state:t,fieldNames:n}){const a=t.errors||{},i=[{type:"text",value:t.name,placeholder:v("Jamie Larson"),label:v("Name"),name:"name",required:!1,errorMessage:a.name||""},{type:"email",value:t.email,placeholder:v("jamie@example.com"),label:v("Email"),name:"email",required:!0,errorMessage:a.email||""}];return n&&n.length>0?i.filter(r=>n.includes(r.name)):i}onKeyDown(t){t.keyCode===13&&this.onProfileSave(t)}renderProfileData(){return u.jsx("div",{className:"gh-portal-section",children:u.jsx(Rl,{fields:this.getInputFields({state:this.state}),onChange:(t,n)=>this.handleInputChange(t,n),onKeyDown:(t,n)=>this.onKeyDown(t,n)})})}render(){const{member:t}=this.context;return t?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"gh-portal-content with-footer",children:[u.jsx(Oe,{}),this.renderHeader(),u.jsx("div",{className:"gh-portal-section",children:this.renderProfileData()})]}),this.renderAccountFooter()]}):null}};ih.contextType=H;let Up=ih;function O5(){const{brandColor:e,lastPage:t,doAction:n}=S.useContext(H);return u.jsxs("header",{className:"gh-portal-detail-header",children:[u.jsx(Mi,{brandColor:e,hidden:!t,onClick:()=>{n("back")}}),u.jsx("h3",{className:"gh-portal-main-title",children:v("Email preferences")})]})}function _5({newsletter:e,subscribedNewsletters:t,setSubscribedNewsletters:n}){const a=t.some(i=>i.id===(e==null?void 0:e.id));return u.jsxs("section",{className:"gh-portal-list-toggle-wrapper","data-testid":"toggle-wrapper",children:[u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:e.name}),u.jsx("p",{children:e==null?void 0:e.description})]}),u.jsx("div",{style:{display:"flex",alignItems:"center"},children:u.jsx(Dl,{id:e.id,onToggle:(i,r)=>{let o=[];r?o=t.filter(s=>s.id!==e.id).concat(e):o=t.filter(s=>s.id!==e.id),n(o)},checked:a,dataTestId:"switch-input"})})]})}function R5({updateCommentNotifications:e,isCommentsEnabled:t,enableCommentNotifications:n}){const{doAction:a}=S.useContext(H),i=!!n;if(!t)return null;const r=async(o,s)=>{await e(s),a("showPopupNotification",{action:"updated:success",message:v("Comment preferences updated.")})};return u.jsxs("section",{className:"gh-portal-list-toggle-wrapper","data-testid":"toggle-wrapper",children:[u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:v("Comments")}),u.jsx("p",{children:v("Get notified when someone replies to your comment")})]}),u.jsx("div",{style:{display:"flex",alignItems:"center"},children:u.jsx(Dl,{id:"comments",onToggle:r,checked:i,dataTestId:"switch-input"})})]})}function U5({subscribedNewsletters:e,setSubscribedNewsletters:t,hasNewslettersEnabled:n}){const{site:a}=S.useContext(H),i=za({site:a});return n?i.map(r=>u.jsx(_5,{newsletter:r,subscribedNewsletters:e,setSubscribedNewsletters:t},r==null?void 0:r.id)):null}function L5({site:e,isPaid:t}){return t?u.jsx("p",{style:{textAlign:"center",marginTop:"12px",marginBottom:"0",color:"var(--grey6)"},children:v("Unsubscribing from emails will not cancel your paid subscription to {title}",{title:e==null?void 0:e.title})}):null}function Bx({hasNewslettersEnabled:e,notification:t,subscribedNewsletters:n,updateSubscribedNewsletters:a,updateCommentNotifications:i,unsubscribeAll:r,isPaidMember:o,isCommentsEnabled:s,enableCommentNotifications:l}){const{brandColor:c,doAction:m,member:f,site:p}=S.useContext(H),y=!(n!=null&&n.length)&&(s&&!l||!s),j=t||(()=>null);return u.jsxs("div",{className:"gh-portal-content with-footer",children:[u.jsx(Oe,{}),u.jsx(O5,{}),u.jsx(j,{}),u.jsx("div",{className:"gh-portal-section flex",children:u.jsxs("div",{className:"gh-portal-list",children:[u.jsx(U5,{hasNewslettersEnabled:e,subscribedNewsletters:n,setSubscribedNewsletters:b=>{let w=b.map(E=>({id:E.id}));a(w)}}),u.jsx(R5,{isCommentsEnabled:s,enableCommentNotifications:l,updateCommentNotifications:i})]})}),u.jsx("div",{className:"gh-portal-btn-product gh-portal-btn-unsubscribe",style:{marginTop:"-48px",marginBottom:0},children:u.jsx(ze,{isRunning:!1,onClick:()=>{r()},disabled:y,brandColor:c,isPrimary:!1,label:v("Unsubscribe from all emails"),isDestructive:!0,style:{width:"100%",zIndex:900},dataTestId:"unsubscribe-from-all-emails"})}),u.jsxs("footer",{className:"gh-portal-action-footer"+(ap({member:f})?" gh-feature-suppressions":""),children:[u.jsx("div",{style:{width:"100%"},children:u.jsx(L5,{isPaid:o,site:p,subscribedNewsletters:n})}),ap({member:f})&&!y&&u.jsxs("div",{className:"gh-portal-footer-secondary",children:[u.jsx("span",{className:"gh-portal-footer-secondary-light",children:v("Not receiving emails?")}),u.jsxs("button",{className:"gh-portal-btn-text gh-email-faq-page-button",onClick:()=>m("switchPage",{page:"emailReceivingFAQ",pageData:{direct:!1}}),children:[v("Get help")," ",u.jsx("span",{className:"right-arrow",children:"→"})]})]})]})]})}function Y5(){const{member:e,doAction:t,site:n,pageData:a}=S.useContext(H);let i,r;a&&(i=a.newsletterUuid,r=a.action);const[o,s]=S.useState(!0),l=za({site:n}),c=oo({site:n});S.useEffect(()=>{e||t("switchPage",{page:"signin"})},[e,t]),S.useEffect(()=>{if(i&&r==="unsubscribe"){const b=e==null?void 0:e.newsletters.filter(w=>w.uuid!==i);y(b),s(!1),t("updateNewsletterPreference",{newsletters:b})}},[]);const m=()=>{if(a.comments&&k){const E=o?"gh-portal-hide":"";return u.jsx(u.Fragment,{children:u.jsx("p",{className:`gh-portal-text-center gh-portal-header-message ${E}`,children:u.jsx(ut,{string:v("{memberEmail} will no longer receive emails when someone replies to your comments."),mapping:{memberEmail:u.jsx("strong",{children:e==null?void 0:e.email})}})})})}const b=l==null?void 0:l.find(E=>E.uuid===a.newsletterUuid);if(!b)return null;const w=o?"gh-portal-hide":"";return u.jsx(u.Fragment,{children:u.jsx("p",{className:`gh-portal-text-center gh-portal-header-message ${w}`,children:u.jsx(ut,{string:v("{memberEmail} will no longer receive {newsletterName} newsletter."),mapping:{memberEmail:u.jsx("strong",{children:e==null?void 0:e.email}),newsletterName:u.jsx("strong",{children:b==null?void 0:b.name})}})})})},f=[...(e==null?void 0:e.newsletters)||[]],[p,y]=S.useState(f),{comments_enabled:k}=n,{enable_comment_notifications:j}=e||{};return S.useEffect(()=>{y((e==null?void 0:e.newsletters)||[])},[e==null?void 0:e.newsletters]),u.jsx(Bx,{hasNewslettersEnabled:c,notification:i?m:null,subscribedNewsletters:p,updateSubscribedNewsletters:b=>{y(b),t("updateNewsletterPreference",{newsletters:b}),t("showPopupNotification",{action:"updated:success",message:v("Email preferences updated.")})},updateCommentNotifications:async b=>{t("updateNewsletterPreference",{enableCommentNotifications:b})},unsubscribeAll:()=>{y([]),t("showPopupNotification",{action:"updated:success",message:v("Unsubscribed from all emails.")});const b={newsletters:[]};k&&(b.enableCommentNotifications=!1),t("updateNewsletterPreference",b)},isPaidMember:rn({member:e}),isCommentsEnabled:k!=="off",enableCommentNotifications:j})}function B5(){const{site:e}=S.useContext(H),t=e.icon;return t?u.jsx("img",{className:"gh-portal-unsubscribe-logo",src:t,alt:e.title}):null}function V5(){const{site:e}=S.useContext(H),t=e.title||"";return u.jsxs("header",{className:"gh-portal-header",children:[u.jsx(B5,{}),u.jsx("h2",{className:"gh-portal-publication-title",children:t})]})}async function Vx({api:e,memberUuid:t,key:n,newsletters:a,enableCommentNotifications:i}){try{return await e.member.updateNewsletters({uuid:t,key:n,newsletters:a,enableCommentNotifications:i})}catch{}}function H5(){const{site:e,api:t,pageData:n,member:a,doAction:i}=S.useContext(H),[r,o]=S.useState(),[s,l]=S.useState(!0),c=za({site:e}),m=c.filter(_=>_.subscribe_on_signup),[f,p]=S.useState(!1),[y,k]=S.useState(m),[j,b]=S.useState(!1),{comments_enabled:w}=e,{enable_comment_notifications:E=!1}=r||{},P=oo({site:e}),$=async _=>{a?i("updateNewsletterPreference",{newsletters:_}):await Vx({api:t,memberUuid:n.uuid,key:n.key,newsletters:_}),k(_);const D={action:"updated:success",message:v("Email preferences updated.")};i("showPopupNotification",D)},F=async _=>{let D;a?(await i("updateNewsletterPreference",{enableCommentNotifications:_}),D={...a,enable_comment_notifications:_}):D=await Vx({api:t,memberUuid:n.uuid,key:n.key,enableCommentNotifications:_}),o(D),i("showPopupNotification",{action:"updated:success",message:v("Comment preferences updated.")})},z=async()=>{let _;a?(await i("updateNewsletterPreference",{newsletters:[],enableCommentNotifications:!1}),_={...a},_.newsletters=[],_.enable_comment_notifications=!1):_=await t.member.updateNewsletters({uuid:n.uuid,key:n.key,newsletters:[],enableCommentNotifications:!1}),k([]),o(_),i("showPopupNotification",{action:"updated:success",message:v("Unsubscribed from all emails.")})};if(S.useEffect(()=>{(async()=>{let _;try{_=await t.member.newsletters({uuid:n.uuid,key:n.key}),o(_??null),l(!1)}catch(X){console.error("[PORTAL] Error fetching member newsletters",X),o(null),l(!1);return}if(_===null)return;const D=(_==null?void 0:_.newsletters)||[];k(D),(c==null?void 0:c.length)===1&&!w&&!n.newsletterUuid?await $([]):n.newsletterUuid?await $(D==null?void 0:D.filter(X=>X.uuid!==n.newsletterUuid)):n.comments&&w&&await F(!1)})()},[w,n.uuid,n.newsletterUuid,n.comments,e.url,c==null?void 0:c.length]),s)return u.jsx(ko,{});if(!r)return u.jsxs("div",{className:"gh-portal-content gh-portal-feedback with-footer",children:[u.jsx(Oe,{}),u.jsx("div",{className:"gh-feedback-icon gh-feedback-icon-error",children:u.jsx(cp,{})}),u.jsx("h1",{className:"gh-portal-main-title",children:v("That didn't go to plan")}),u.jsx("div",{children:u.jsx("p",{className:"gh-portal-text-center",children:v("We couldn't unsubscribe you as the email address was not found. Please contact the site owner.")})}),u.jsx(ze,{style:{width:"100%"},retry:!1,onClick:()=>i("closePopup"),disabled:!1,brandColor:"#000000",label:v("Close"),isRunning:!1,tabIndex:3,classes:"sticky bottom"})]});if((c==null?void 0:c.length)===1&&!w&&!j)return u.jsxs("div",{className:"gh-portal-content gh-portal-unsubscribe with-footer",children:[u.jsx(Oe,{}),u.jsx(V5,{}),u.jsx("h1",{className:"gh-portal-main-title",children:v("Successfully unsubscribed")}),u.jsxs("div",{children:[u.jsx("p",{className:"gh-portal-text-center",children:u.jsx(ut,{string:v("{memberEmail} will no longer receive this newsletter."),mapping:{memberEmail:u.jsx("strong",{children:r==null?void 0:r.email})}})}),u.jsx("p",{className:"gh-portal-text-center",children:u.jsx(ut,{string:v("Didn't mean to do this? Manage your preferences <button>here</button>."),mapping:{button:u.jsx("button",{className:"gh-portal-btn-link gh-portal-btn-branded gh-portal-btn-inline",onClick:()=>{b(!0)}})}})})]})]});const R=()=>{if(n.comments&&w){const X=f?"gh-portal-hide":"";return u.jsx(u.Fragment,{children:u.jsx("p",{className:`gh-portal-text-center gh-portal-header-message ${X}`,children:u.jsx(ut,{string:v("{memberEmail} will no longer receive emails when someone replies to your comments."),mapping:{memberEmail:u.jsx("strong",{children:r==null?void 0:r.email})}})})})}const _=c==null?void 0:c.find(X=>X.uuid===n.newsletterUuid);if(!_)return null;const D=f?"gh-portal-hide":"";return u.jsx(u.Fragment,{children:u.jsx("p",{className:`gh-portal-text-center gh-portal-header-message ${D}`,children:u.jsx(ut,{string:v("{memberEmail} will no longer receive {newsletterName} newsletter."),mapping:{memberEmail:u.jsx("strong",{children:r==null?void 0:r.email}),newsletterName:u.jsx("strong",{children:_==null?void 0:_.name})}})})})};return u.jsx(Bx,{hasNewslettersEnabled:P,notification:R,subscribedNewsletters:y,updateSubscribedNewsletters:async _=>{await $(_),p(!0)},updateCommentNotifications:F,unsubscribeAll:async()=>{await z(),p(!0)},isPaidMember:(r==null?void 0:r.status)!=="free",isCommentsEnabled:w!=="off",enableCommentNotifications:E})}function W5(){const{brandColor:e,lastPage:t,doAction:n,action:a,site:i}=S.useContext(H);S.useEffect(()=>{["removeEmailFromSuppressionList:success"].includes(a)&&n("refreshMemberData"),["removeEmailFromSuppressionList:failed","refreshMemberData:failed"].includes(a)&&n("back"),["refreshMemberData:success"].includes(a)&&(lo({site:i})||Tl({site:i})?(n("switchPage",{page:"accountEmail",lastPage:"accountHome"}),n("showPopupNotification",{message:v("You have been successfully resubscribed")})):n("back"))},[a,n,i,v]);const r=["removeEmailFromSuppressionList:running","refreshMemberData:running"].includes(a),o=()=>{n("removeEmailFromSuppressionList")};return u.jsxs("div",{className:"gh-email-suppressed-page",children:[u.jsxs("header",{className:"gh-portal-detail-header",children:[u.jsx(Mi,{brandColor:e,hidden:!t,onClick:()=>{n("back")}}),u.jsx(Oe,{})]}),u.jsx(Yx,{className:"gh-email-suppressed-page-icon"}),u.jsxs("div",{className:"gh-email-suppressed-page-text",children:[u.jsx("h3",{className:"gh-portal-main-title gh-email-suppressed-page-title",children:v("Emails disabled")}),u.jsx("p",{children:v("You're not receiving emails because you either marked a recent message as spam, or because messages could not be delivered to your provided email address.")})]}),u.jsx(ze,{dataTestId:"resubscribe-email",classes:"gh-portal-confirm-button",onClick:o,disabled:r,brandColor:e,label:v("Re-enable emails"),isRunning:r})]})}function G5(){const{brandColor:e,doAction:t,site:n,pageData:a}=S.useContext(H),i=`mailto:${uo({site:n})}`,r=a&&a.direct||!1;return u.jsxs("div",{className:"gh-email-suppression-faq",children:[!r&&u.jsxs("header",{className:"gh-portal-detail-header",children:[u.jsx(Mi,{brandColor:e,onClick:()=>{t("switchPage",{page:"emailSuppressed",lastPage:"accountHome"})}}),u.jsx(Oe,{})]}),u.jsxs("div",{className:"gh-longform",children:[u.jsx("h3",{children:v("Why has my email been disabled?")}),u.jsx("p",{children:v("Newsletters can be disabled on your account for two reasons: A previous email was marked as spam, or attempting to send an email resulted in a permanent failure (bounce).")}),u.jsx("h4",{children:v("Spam complaints")}),u.jsx("p",{children:v("If a newsletter is flagged as spam, emails are automatically disabled for that address to make sure you no longer receive any unwanted messages.")}),u.jsx("p",{children:v("If the spam complaint was accidental, or you would like to begin receiving emails again, you can resubscribe to emails by clicking the button on the previous screen.")}),u.jsx("p",{children:v("Once resubscribed, if you still don't see emails in your inbox, check your spam folder. Some inbox providers keep a record of previous spam complaints and will continue to flag emails. If this happens, mark the latest newsletter as 'Not spam' to move it back to your primary inbox.")}),u.jsx("h4",{children:v("Permanent failure (bounce)")}),u.jsx("p",{children:v("When an inbox fails to accept an email it is commonly called a bounce. In many cases, this can be temporary. However, in some cases, a bounced email can be returned as a permanent failure when an email address is invalid or non-existent.")}),u.jsx("p",{children:v("In the event a permanent failure is received when attempting to send a newsletter, emails will be disabled on the account.")}),u.jsx("p",{children:v("If you would like to start receiving emails again, the best next steps are to check your email address on file for any issues and then click resubscribe on the previous screen.")}),u.jsx("p",{children:u.jsx("a",{className:"gh-portal-btn gh-portal-btn-branded no-margin-right",href:i,onClick:()=>{i&&window.open(i)},children:v("Need more help? Contact support")})})]})]})}function K5(){const{brandColor:e,doAction:t,site:n,lastPage:a,member:i,pageData:r}=S.useContext(H),o=uo({site:n}),s=`mailto:${o}`,l=YU({site:n}),c=r&&r.direct||!1;return u.jsxs("div",{className:"gh-email-receiving-faq",children:[u.jsxs("header",{className:"gh-portal-detail-header",children:[!c&&u.jsx(Mi,{brandColor:e,onClick:()=>{a?t("switchPage",{page:"accountHome"}):t("switchPage",{page:"accountEmail",lastPage:"accountHome"})}}),u.jsx(Oe,{})]}),u.jsxs("div",{className:"gh-longform",children:[u.jsx("h3",{children:v("Help! I'm not receiving emails")}),u.jsx("p",{children:v("If you're not receiving the email newsletter you've subscribed to, here are a few things to check.")}),u.jsx("h4",{children:v("Verify your email address is correct")}),u.jsx("p",{children:u.jsx(ut,{string:v("The email address we have for you is {memberEmail} — if that's not correct, you can update it in your <button>account settings area</button>."),mapping:{memberEmail:u.jsx("strong",{children:i.email}),button:u.jsx("button",{className:"gh-portal-btn-text",onClick:()=>t("switchPage",{lastPage:"emailReceivingFAQ",page:"accountProfile"})})}})}),u.jsx("h4",{children:v("Check spam & promotions folders")}),u.jsx("p",{children:v(`Make sure emails aren't accidentally ending up in the Spam or Promotions folders of your inbox. If they are, click on "Mark as not spam" and/or "Move to inbox".`)}),u.jsx("h4",{children:v("Create a new contact")}),u.jsx("p",{children:u.jsx(ut,{string:v("In your email client add {senderEmail} to your contacts list. This signals to your mail provider that emails sent from this address should be trusted."),mapping:{senderEmail:u.jsx("strong",{children:l})}})}),u.jsx("h4",{children:v("Send an email and say hi!")}),u.jsx("p",{children:u.jsx(ut,{string:v("Send an email to {senderEmail} and say hello. This can also help signal to your mail provider that emails to and from this address should be trusted."),mapping:{senderEmail:u.jsx("strong",{children:l})}})}),u.jsx("h4",{children:v("Check with your mail provider")}),u.jsx("p",{children:u.jsx(ut,{string:v("If you have a corporate or government email account, reach out to your IT department and ask them to allow emails to be received from {senderEmail}"),mapping:{senderEmail:u.jsx("strong",{children:l})}})}),u.jsx("h4",{children:v("Get in touch for help")}),u.jsx("p",{children:u.jsx(ut,{string:v("If you've completed all these checks and you're still not receiving emails, you can reach out to get support by contacting {supportAddress}."),mapping:{supportAddress:u.jsx("a",{href:s,onClick:()=>{s&&window.open(s)},children:o})}})})]})]})}const Lp={signin:_p,signup:Ip,accountHome:Rp,accountPlan:wp,accountProfile:Up,accountEmail:Y5,signupNewsletter:Ep,unsubscribe:H5,magiclink:Mp,loading:ko,offer:Dp,feedback:Q6,emailSuppressed:W5,emailSuppressionFAQ:G5,emailReceivingFAQ:K5,support:()=>{const[e,t]=S.useState(!0),[n,a]=S.useState(null),[i,r]=S.useState(null),{member:o,site:s}=S.useContext(H);return S.useEffect(()=>{async function l(){const c=s.url,m=window.location.origin+window.location.pathname,f=o?`${m}?action=support&success=true`:`${m}#/portal/support/success`,p=m,y=Hl({siteUrl:c});try{const k=await y.member.checkoutDonation({successUrl:f,cancelUrl:p,personalNote:v("Add a personal note")});k.url&&window.location.replace(k.url)}catch(k){k.type&&k.type==="DisabledFeatureError"?r(v("This site is not accepting payments at the moment.")):a(v("Something went wrong, please try again later.")),t(!1)}}s&&s.donations_enabled===!1?(r(v("This site is not accepting donations at the moment.")),t(!1)):l()},[]),e?u.jsx("div",{children:u.jsx(ko,{})}):n?u.jsx(Op,{error:n}):i?u.jsx(Op,{error:i}):null},supportSuccess:r5,supportError:Op,recommendations:p5},Yp=function({page:e}){return Object.keys(Lp).includes(e)?e:"signup"},q5=function({page:e}){return e.includes("account")},J5=function({page:e}){return e.includes("offer")},Z5=e=>S.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},S.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12ZM11.8326 2.33879C6.37785 2.95189 3.95901 5.20797 3.41126 9.74699C3.34896 10.2632 3.22642 10.7805 3.10443 11.2954C2.93277 12.02 2.76221 12.74 2.76221 13.4458C2.76221 17.9885 6.5856 21.556 11.1283 21.556C12.8959 21.556 14.4433 20.8144 15.8756 20.048C19.0536 18.3478 22.0328 16.2597 22.0328 12.5411C22.0328 9.91512 20.1051 7.56932 18.466 5.5747C18.3834 5.47416 18.3015 5.37451 18.2206 5.27577C17.3866 4.25742 14.4333 2.04643 11.8326 2.33879Z",fill:"#15171A"})),rh=class rh extends re.Component{render(){return u.jsxs("a",{href:"https://ghost.org",target:"_blank",rel:"noopener noreferrer",onClick:()=>{window.open("https://ghost.org","_blank")},children:[u.jsx(Z5,{}),"Powered by Ghost"]})}};rh.contextType=H;let Wl=rh;const Hx=()=>({modalContainer:{zIndex:"3999999",position:"fixed",left:"0",top:"0",width:"100%",height:"100%",overflow:"hidden"},frame:{common:{margin:"auto",position:"relative",padding:"0",outline:"0",width:"100%",opacity:"1",overflow:"hidden",height:"100%"}},page:{links:{width:"600px"}}});function X5({message:e}){return Ai()?u.jsx("div",{className:"gh-portal-cookiebanner",children:e}):null}const oh=class oh extends re.Component{componentDidMount(){this.node&&!$e(["preview"])&&!this.props.isMobile&&(this.node.focus(),this.keyUphandler=t=>{t.key==="Escape"&&this.dismissPopup(t)},this.node.ownerDocument.removeEventListener("keyup",this.keyUphandler),this.node.ownerDocument.addEventListener("keyup",this.keyUphandler)),this.sendContainerHeightChangeEvent()}dismissPopup(t){var i;const n=t.target&&t.target.tagName;(n!=="INPUT"||n==="INPUT"&&!((i=t==null?void 0:t.target)!=null&&i.value))&&this.context.doAction("closePopup")}sendContainerHeightChangeEvent(){var t,n;this.node&&$e(["preview"])&&((t=this.node)==null?void 0:t.clientHeight)!==this.lastContainerHeight&&(this.lastContainerHeight=(n=this.node)==null?void 0:n.clientHeight,window.document.body.style.overflow="hidden",window.document.body.style["scrollbar-width"]="none",window.parent.postMessage({type:"portal-preview-updated",payload:{height:this.lastContainerHeight}},"*"))}componentDidUpdate(){this.sendContainerHeightChangeEvent()}componentWillUnmount(){this.node&&this.node.ownerDocument.removeEventListener("keyup",this.keyUphandler)}handlePopupClose(t){const{page:n,otcRef:a}=this.context;$e(["preview"])||a&&n==="magiclink"||t.target===t.currentTarget&&this.context.doAction("closePopup")}renderActivePage(){const{page:t}=this.context;Yp({page:t});const n=Lp[t];return u.jsx(n,{})}renderPopupNotification(){const{popupNotification:t}=this.context;return!t||!t.type?null:u.jsx(Fp,{})}sendPortalPreviewReadyEvent(){window.self!==window.parent&&window.parent.postMessage({type:"portal-preview-ready",payload:{}},"*")}render(){const{page:t,pageQuery:n,site:a,customSiteUrl:i}=this.context,o=Al({site:a,pageQuery:n}).length;Yp({page:t});const l={...Hx().page[t]};let c="",m="regular",f="",p=t;switch(t){case"signup":f="Cookies must be enabled in your browser to sign up.";break;case"signin":f="Cookies must be enabled in your browser to sign in.";break;case"accountHome":p="account-home";break;case"accountProfile":p="account-profile";break;case"accountPlan":p="account-plan";break;default:f="Cookies must be enabled in your browser.",p=t;break}o>1&&!Vt({site:a})&&Sn({site:a,pageQuery:n})&&t==="signup"&&(p+=" full-size",m="full");const y=so({site:a});(y&&o>2||!y&&o>1)&&t==="accountPlan"&&(p+=" full-size",m="full"),(t==="emailSuppressionFAQ"||t==="emailReceivingFAQ")&&(p+=" large-size");let k="gh-portal-popup-container";$e(["preview"])&&(p+=" preview"),$e(["preview"],{customSiteUrl:i})&&!a.disableBackground&&(k+=" preview"),$e(["dev"])&&(k+=" dev");const j=`${k} ${c} ${p}`;return this.sendPortalPreviewReadyEvent(),u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"gh-portal-popup-wrapper "+p,onClick:b=>this.handlePopupClose(b),children:[this.renderPopupNotification(),u.jsxs("div",{className:j,style:l,ref:b=>this.node=b,tabIndex:-1,children:[u.jsx(X5,{message:f}),this.renderActivePage(),m==="full"?u.jsx("div",{className:"gh-portal-powered inside "+($e(["preview"])?"hidden ":"")+p,children:u.jsx(Wl,{})}):""]})]}),u.jsx("div",{className:"gh-portal-powered outside "+($e(["preview"])?"hidden ":"")+p,children:u.jsx(Wl,{})})]})}};oh.contextType=H;let Bp=oh;const sh=class sh extends re.Component{constructor(t){super(t),this.state={height:null}}renderCurrentPage(t){const n=Lp[t];return u.jsx(n,{})}onHeightChange(t){this.setState({height:t})}handlePopupClose(t){t.preventDefault(),t.target===t.currentTarget&&this.context.doAction("closePopup")}renderFrameStyles(){const{site:t,brandColor:n}=this.context,a=k5({site:t}),i=n?`:root { --brandcolor: ${n} }`+a:a;return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:i}}),u.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"})]})}renderFrameContainer(){const{member:t,site:n,customSiteUrl:a}=this.context,i=Hx(),r=window.innerWidth<480,o={...i.frame.common};let s="gh-portal-popup-background";return $e(["preview"])&&(i.modalContainer.zIndex="3999997"),$e(["preview"],{customSiteUrl:a})&&!n.disableBackground&&(s+=" preview"),$e(["dev"])&&(s+=" dev"),u.jsx("div",{style:i.modalContainer,children:u.jsxs(Km,{style:o,title:"portal-popup",head:this.renderFrameStyles(),dataTestId:"portal-popup-frame",dataDir:this.context.dir,children:[u.jsx("div",{className:s,onClick:l=>this.handlePopupClose(l)}),u.jsx(Bp,{isMobile:r})]})})}render(){const{showPopup:t}=this.context;return t?this.renderFrameContainer():null}};sh.contextType=H;let Vp=sh;Gl({products:Hp({numOfProducts:1})});function at(){return(new Date().getTime()/1e3|0).toString(16)+"xxxxxxxxxxxxxxxx".replace(/[x]/g,function(){return(Math.random()*16|0).toString(16)}).toLowerCase()}function Q5(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function Gl({title:e="The Blueprint",description:t="Thoughts, stories and ideas.",logo:n="https://static.ghost.org/v4.0.0/images/ghost-orb-1.png",icon:a="https://static.ghost.org/v4.0.0/images/ghost-orb-1.png",url:i="https://portal.localhost",plans:r={monthly:5e3,yearly:15e4,currency:"USD"},products:o=Hp({numOfProducts:1}),portalProducts:s=o.map(X=>X.id),accentColor:l="#45C32E",portalPlans:c=["free","monthly","yearly"],membersSignupAccess:m="all",freePriceName:f="Free",freePriceDescription:p="Free preview",isStripeConfigured:y=!0,portalButton:k=!0,portalName:j=!0,portalButtonIcon:b="icon-1",portalButtonSignupText:w="Subscribe now",portalButtonStyle:E="icon-and-text",membersSupportAddress:P="support@example.com",editorDefaultEmailRecipients:$="visibility",newsletters:F=[],posts:z=e8(),commentsEnabled:R,recommendations:_=[],recommendationsEnabled:D}={}){return{title:e,description:t,logo:n,icon:a,accent_color:l,url:i,plans:r,products:o,portal_products:s,members_signup_access:m,free_price_name:f,free_price_description:p,is_stripe_configured:y,portal_button:k,portal_name:j,portal_plans:c,portal_button_icon:b,portal_button_signup_text:w,portal_button_style:E,members_support_address:P,comments_enabled:R!=="off",newsletters:F,recommendations:_,recommendations_enabled:!!D,editor_default_email_recipients:$,posts:z}}function Wx({name:e="Black Friday",code:t="black-friday",displayTitle:n="Black Friday Sale!",displayDescription:a="Special deal for Black Friday. Subscribe now for only $15 per month and get additional benefits like accessing our podcast.",type:i="percent",cadence:r="month",amount:o=50,duration:s="repeating",durationInMonths:l=null,currencyRestriction:c=!1,currency:m=null,status:f="active",tierId:p="",tierName:y="Basic",redemptionType:k="signup"}={}){return{id:`offer_${at()}`,name:e,code:t,display_title:n,display_description:a,type:i,cadence:r,amount:o,duration:s,duration_in_months:l,currency_restriction:c,currency:m,status:f,tier:{id:`${p}`,name:y},redemption_type:k}}function Wt({name:e="Jamie Larson",email:t="jamie@example.com",firstname:n="Jamie",subscriptions:a=[],paid:i=!1,avatarImage:r="",subscribed:o=!0,email_suppression:s={suppressed:!1,info:null},newsletters:l=[]}={}){return{uuid:Q5(),email:t,name:e,firstname:n,paid:i,subscribed:o,avatar_image:r,subscriptions:a,email_suppression:s,newsletters:l}}function e8({numOfPosts:e=3}={}){const t=[];for(let n=0;n<e;n++)t.push(t8({title:`Post ${n+1}`,slug:`post-${n+1}`}));return t.slice(0,e)}function t8({id:e=`post_${at()}`,title:t="Post",excerpt:n="Post excerpt",slug:a="post",featured:i=!1}={}){return{id:e,title:t,excerpt:n,slug:a,featured:i}}function Hp({numOfProducts:e=3}={}){const n=[Oi({name:"Bronze",description:"Access to all members articles",monthlyPrice:Ot({interval:"month",amount:700}),yearlyPrice:Ot({interval:"year",amount:7e3}),numOfBenefits:2}),Oi({name:"Silver",description:"Access to all members articles and weekly podcast",monthlyPrice:Ot({interval:"month",amount:1200}),yearlyPrice:Ot({interval:"year",amount:12e3}),numOfBenefits:3}),Oi({name:"Friends of the Blueprint",description:"Get access to everything and lock in early adopter pricing for life + listen to my podcast",monthlyPrice:Ot({interval:"month",amount:18e3}),yearlyPrice:Ot({interval:"year",amount:17e3}),numOfBenefits:4})].slice(0,e),a=Gx({});return[...n,a]}function Oi({type:e="paid",name:t="Basic",description:n="",id:a=`product_${at()}`,monthlyPrice:i=Ot(),yearlyPrice:r=Ot({interval:"year"}),numOfBenefits:o=2,trialDays:s=null}){return{id:a,name:t,description:n,monthlyPrice:e==="free"?null:i,yearlyPrice:e==="free"?null:r,type:e,benefits:Kx({numOfBenefits:o}),trial_days:s}}function Gx({name:e="Free tier",description:t="Free tier description",id:n=`product_${at()}`,numOfBenefits:a=2}){return{id:n,name:e,type:"free",description:t,benefits:Kx({numOfBenefits:a})}}function Kx({numOfBenefits:e}){const t=at();return[Kl({name:`Limited early adopter pricing #${t.substring(0,6)}`}),Kl({name:`Latest gear reviews #${t.substring(6,12)}`}),Kl({name:`Weekly email newsletter #${t.substring(12,18)}`}),Kl({name:`Listen to my podcast #${t.substring(18)}`})].slice(0,e)}function Kl({id:e=`benefit_${at()}`,name:t="Benefit"}){return{id:e,name:t}}function Ot({interval:e="month",amount:t=e==="month"?500:5e3,nickname:n=e==="month"?"Monthly":"Yearly",description:a=null,currency:i="usd",active:r=!0,id:o=`price_${at()}`}={}){return{id:o,active:r,nickname:n,currency:i,amount:t,interval:e,description:a,stripe_price_id:`price_${at()}`,stripe_product_id:`prod_${at()}`,type:"recurring"}}function Na({id:e=`sub_${at()}`,status:t="active",currency:n="USD",interval:a="year",amount:i=a==="month"?500:5e3,nickname:r=a==="month"?"Monthly":"Yearly",cardLast4:o="4242",offer:s=a8,priceId:l=`price_${at()}`,startDate:c="2021-10-05T03:18:30.000Z",currentPeriodEnd:m="2022-10-05T03:18:30.000Z",cancelAtPeriodEnd:f=!1,trialEndAt:p=null,nextPayment:y=null,tier:k=null}={}){return{id:e,customer:{id:`cus_${at()}`,name:"Jamie",email:"jamie@example.com"},plan:{id:`price_${at()}`,nickname:r,amount:i,interval:a,currency:n},offer:s,status:t,start_date:c,default_payment_card_last4:o,cancel_at_period_end:f,cancellation_reason:null,current_period_end:m,trial_end_at:p,next_payment:y,tier:k,price:{id:`stripe_price_${at()}`,price_id:l,nickname:r,amount:i,interval:a,type:"recurring",currency:n,product:{id:`stripe_prod_${at()}`,product_id:`prod_${at()}`}}}}function qx(){const e=Hp({numOfProducts:1}),t=e.map(a=>a.id);return Gl({products:e,portalPlans:["free","monthly","yearly"],portalProducts:t})}qx();const n8=Gl({products:[Oi({numOfBenefits:2,type:"free"})]}),a8=Wx({tierId:(eE=n8.products[0])==null?void 0:eE.id});Wt(),Wt({paid:!0,subscriptions:[Na()]}),Wt({paid:!0,subscriptions:[]}),Wt({paid:!0,subscriptions:[Na({amount:0})]}),Wt({paid:!0,subscriptions:[Na({amount:1500,startDate:"2019-05-01T11:42:40.000Z",currentPeriodEnd:"2021-06-05T11:42:40.000Z"})]}),qx();const ql=[Gx({name:"Free",description:"Free tier description which is actually a pretty long description",numOfBenefits:2}),Oi({name:"The Blueprint",description:"",monthlyPrice:Ot({interval:"month",amount:500}),yearlyPrice:Ot({interval:"year",amount:5e3}),numOfBenefits:3}),Oi({name:"Friends of the Blueprint Silver",description:"Access to all members articles and weekly podcast",monthlyPrice:Ot({interval:"month",amount:1200}),yearlyPrice:Ot({interval:"year",amount:11e3}),numOfBenefits:4})],_i=Gl({title:"The Blueprint",description:"Thoughts, stories and ideas.",logo:"https://static.ghost.org/v4.0.0/images/ghost-orb-1.png",icon:"https://static.ghost.org/v4.0.0/images/ghost-orb-1.png",accentColor:"#45C32E",url:"https://portal.localhost",plans:{monthly:5e3,yearly:15e4,currency:"USD"},products:ql,portalProducts:ql.map(e=>e.id),membersSignupAccess:"all",freePriceName:"Free",freePriceDescription:"Free preview",isStripeConfigured:!0,portalButton:!0,portalName:!0,portalPlans:["free","monthly","yearly"],portalButtonIcon:"icon-1",portalButtonSignupText:"Subscribe now",portalButtonStyle:"icon-and-text",membersSupportAddress:"support@example.com",commentsEnabled:!0,newsletters:[{id:"weekly",name:"Weekly Rundown",description:"Best of last week",subscribe_on_signup:!0,paid:!0},{id:"daily",name:"Daily Brief",description:"One email every day",subscribe_on_signup:!1,paid:!1}],posts:[{id:"post_66aacfe061c94e10eb6e4fc1",title:"Post 1",excerpt:"Post excerpt",slug:"post-1",featured:!1},{id:"post_66aacfe04f14b8dbb56c5721",title:"Post 2",excerpt:"Post excerpt",slug:"post-2",featured:!1},{id:"post_66aacfe03d609460819af18c",title:"Post 3",excerpt:"Post excerpt",slug:"post-3",featured:!1}]}),Jx=Wx({tierId:(tE=_i.products[1])==null?void 0:tE.id}),Jl={free:Wt({name:"Jamie Larson",email:"jamie@example.com",firstname:"Jamie",subscriptions:[],paid:!1,avatarImage:"",subscribed:!0}),paid:Wt({paid:!0,subscriptions:[Na({status:"active",currency:"USD",interval:"year",amount:5e3,cardLast4:"4242",startDate:"2021-10-05T03:18:30.000Z",currentPeriodEnd:"2022-10-05T03:18:30.000Z",cancelAtPeriodEnd:!1})]}),complimentary:Wt({paid:!0,subscriptions:[]}),complimentaryWithSubscription:Wt({paid:!0,subscriptions:[Na({amount:0})]}),preview:Wt({paid:!0,subscriptions:[Na({amount:1500,startDate:"2019-05-01T11:42:40.000Z",currentPeriodEnd:"2021-06-05T11:42:40.000Z"})]})};function i8(){var n;if(!ql||!ql[1])return null;let e=(n=_i==null?void 0:_i.products)==null?void 0:n[1].monthlyPrice,t=Wt({paid:!0,subscriptions:[Na({offer:null,priceId:e==null?void 0:e.id,status:"active",currency:e==null?void 0:e.currency,interval:e==null?void 0:e.interval,amount:e==null?void 0:e.amount,cardLast4:"4242",startDate:"2021-10-05T03:18:30.000Z",currentPeriodEnd:"2022-10-05T03:18:30.000Z",cancelAtPeriodEnd:!1})]});return{site:_i,member:t}}function r8(e){const t=e.getAttribute("href"),n=new URL(t,window.location.origin);!n.hash||!n.hash.startsWith("#/portal")||t.startsWith("#/portal")||n.origin===window.location.origin&&e.setAttribute("href",n.hash)}function o8({data:e,state:t}){return{page:e.page,popupNotification:null,lastPage:e.lastPage||null,pageData:e.pageData||t.pageData}}function s8({state:e}){return{showPopup:!e.showPopup}}function l8({data:e}){return{showPopup:!0,page:e.page,...e.pageQuery?{pageQuery:e.pageQuery}:{},...e.pageData?{pageData:e.pageData}:{}}}function u8({state:e}){return e.lastPage?{page:e.lastPage}:Zx({state:e})}function Zx({state:e}){return Xm(),{showPopup:!1,lastPage:null,pageQuery:"",popupNotification:null,page:e.page==="magiclink"?"":e.page}}function c8({data:e}){return{showNotification:!0,...e}}function d8(){return{showNotification:!1}}async function m8({api:e,state:t}){try{return await e.member.signout(),{action:"signout:success"}}catch{return{action:"signout:failed",popupNotification:Ee({type:"signout:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:v("Failed to log out, please try again")})}}}async function p8({data:e,api:t,state:n}){try{const a=await t.member.getIntegrityToken(),i={...e,emailType:"signin",integrityToken:a,includeOTC:!0},{otc_ref:r,inboxLinks:o}=await t.member.sendMagicLink(i);return{page:"magiclink",lastPage:"signin",...r?{otcRef:r}:{},inboxLinks:o,pageData:{...n.pageData||{},email:((e==null?void 0:e.email)||"").trim()}}}catch(a){return{action:"signin:failed",popupNotification:Ee({type:"signin:failed",autoHide:!1,closeable:!0,state:n,status:"error",message:xn(a,v("Failed to log in, please try again"))})}}}function h8({data:e,state:t}){const n=((e==null?void 0:e.email)||"").trim(),a=e==null?void 0:e.otcRef,i=e==null?void 0:e.inboxLinks;return a?{showPopup:!0,page:"magiclink",lastPage:"signin",otcRef:a,inboxLinks:i,pageData:{...t.pageData||{},email:n},popupNotification:null}:{}}async function f8({data:e,api:t}){var a;const n=v("Failed to verify code, please try again");try{const i=await t.member.getIntegrityToken(),r=await t.member.verifyOTC({...e,integrityToken:i});return r.redirectUrl?window.location.assign(r.redirectUrl):{action:"verifyOTC:failed",actionErrorMessage:xn((a=r.errors)==null?void 0:a[0],n)}}catch(i){return{action:"verifyOTC:failed",actionErrorMessage:xn(i,n)}}}async function g8({data:e,state:t,api:n}){try{let{plan:a,tierId:i,cadence:r,email:o,name:s,newsletters:l,offerId:c}=e;s=s==null?void 0:s.trim();let m;if(a.toLowerCase()==="free"){const f=await n.member.getIntegrityToken();({inboxLinks:m}=await n.member.sendMagicLink({emailType:"signup",integrityToken:f,...e,name:s}))}else return i&&r?await n.member.checkoutPlan({plan:a,tierId:i,cadence:r,email:o,name:s,newsletters:l,offerId:c}):({tierId:i,cadence:r}=Aa({site:t==null?void 0:t.site,priceId:a}),await n.member.checkoutPlan({plan:a,tierId:i,cadence:r,email:o,name:s,newsletters:l,offerId:c})),{page:"loading"};return{page:"magiclink",lastPage:"signup",inboxLinks:m,pageData:{...t.pageData||{},email:(o||"").trim()}}}catch(a){const i=xn(a,v("Failed to sign up, please try again"));return{action:"signup:failed",popupNotification:Ee({type:"signup:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:i})}}}async function y8({data:e,state:t,api:n}){try{let{plan:a,offerId:i,tierId:r,cadence:o}=e;(!r||!o)&&({tierId:r,cadence:o}=Aa({site:t==null?void 0:t.site,priceId:a})),await n.member.checkoutPlan({plan:a,tierId:r,cadence:o,offerId:i,metadata:{checkoutType:"upgrade"}})}catch{return{action:"checkoutPlan:failed",popupNotification:Ee({type:"checkoutPlan:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:v("Failed to process checkout, please try again")})}}}async function b8({data:e,state:t,api:n}){try{const{plan:a,planId:i,subscriptionId:r,cancelAtPeriodEnd:o}=e,{tierId:s,cadence:l}=Aa({site:t==null?void 0:t.site,priceId:i});await n.member.updateSubscription({planName:a,tierId:s,cadence:l,subscriptionId:r,cancelAtPeriodEnd:o,planId:i});const c=await n.member.sessionData(),m="updateSubscription:success";return{action:m,popupNotification:Ee({type:m,autoHide:!0,closeable:!0,state:t,status:"success",message:v("Subscription plan updated successfully")}),page:"accountHome",member:c}}catch{return{action:"updateSubscription:failed",popupNotification:Ee({type:"updateSubscription:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:v("Failed to update subscription, please try again")})}}}async function k8({data:e,state:t,api:n}){try{const{subscriptionId:a,cancellationReason:i}=e;return await n.member.updateSubscription({subscriptionId:a,smartCancel:!0,cancellationReason:i}),{action:"cancelSubscription:success",page:"accountHome",member:await n.member.sessionData()}}catch{return{action:"cancelSubscription:failed",popupNotification:Ee({type:"cancelSubscription:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:v("Failed to cancel subscription, please try again")})}}}async function v8({data:e,state:t,api:n}){try{const{subscriptionId:a}=e;return await n.member.updateSubscription({subscriptionId:a,cancelAtPeriodEnd:!1}),{action:"continueSubscription:success",page:"accountHome",member:await n.member.sessionData()}}catch{return{action:"continueSubscription:failed",popupNotification:Ee({type:"continueSubscription:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:v("Failed to cancel subscription, please try again")})}}}async function w8({data:e,state:t,api:n}){try{const{offerId:a,subscriptionId:i}=e;return await n.member.applyOffer({offerId:a,subscriptionId:i}),{action:"applyOffer:success",page:"accountHome",member:await n.member.sessionData(),offers:[],popupNotification:Ee({type:"applyOffer:success",autoHide:!0,closeable:!0,state:t,status:"success",message:"Offer applied successfully!"})}}catch{return{action:"applyOffer:failed",popupNotification:Ee({type:"applyOffer:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:"Failed to apply offer, please try again"})}}}async function x8({data:e,state:t,api:n}){try{await n.member.editBilling(e)}catch{return{action:"editBilling:failed",popupNotification:Ee({type:"editBilling:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:v("Failed to update billing information, please try again")})}}}async function E8({data:e,state:t,api:n}){try{await n.member.manageBilling(e)}catch{return{action:"manageBilling:failed",popupNotification:Ee({type:"manageBilling:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:v("Failed to open billing portal, please try again")})}}}async function S8(){return{popupNotification:null}}async function C8({data:e,state:t}){let{action:n,message:a=""}=e;return n=n||"showPopupNotification:success",{popupNotification:Ee({type:n,autoHide:!0,closeable:!0,state:t,status:"success",message:a})}}async function $8({data:e,state:t,api:n}){try{const{newsletters:a,enableCommentNotifications:i}=e;if(!a&&i===void 0)return{};const r={};return a&&(r.newsletters=a),i!==void 0&&(r.enableCommentNotifications=i),{action:"updateNewsletterPref:success",member:await n.member.update(r)}}catch{return{action:"updateNewsletterPref:failed",popupNotification:Ee({type:"updateNewsletter:failed",autoHide:!0,closeable:!0,state:t,status:"error",message:v("Failed to update newsletter settings")})}}}async function j8({state:e,api:t}){try{return await t.member.deleteSuppression(),{action:"removeEmailFromSuppressionList:success",popupNotification:Ee({type:"removeEmailFromSuppressionList:success",autoHide:!0,closeable:!0,state:e,status:"success",message:v("You have been successfully resubscribed")})}}catch{return{action:"removeEmailFromSuppressionList:failed",popupNotification:Ee({type:"removeEmailFromSuppressionList:failed",autoHide:!0,closeable:!0,state:e,status:"error",message:v("Your email has failed to resubscribe, please try again")})}}}async function T8({data:e,state:t,api:n}){try{const{subscribed:a}=e,i=await n.member.update({subscribed:a});if(!i)throw new Error("Failed to update newsletter");const r="updateNewsletter:success";return{action:r,member:i,popupNotification:Ee({type:r,autoHide:!0,closeable:!0,state:t,status:"success",message:v("Email newsletter settings updated")})}}catch{return{action:"updateNewsletter:failed",popupNotification:Ee({type:"updateNewsletter:failed",autoHide:!0,closeable:!0,state:t,status:"error",message:v("Failed to update newsletter settings")})}}}async function P8({data:e,state:t,api:n}){const{email:a}=e,i=RU({member:t.member});if(a!==i)try{return await n.member.updateEmailAddress({email:a}),{success:!0}}catch(r){return{success:!1,error:r}}return null}async function z8({data:e,state:t,api:n}){var r;const a=(r=e==null?void 0:e.name)==null?void 0:r.trim();if(LU({member:t.member})!==a)try{const o=await n.member.update({name:a});if(!o)throw new Error("Failed to update member");return{member:o,success:!0}}catch(o){return{success:!1,error:o}}return null}async function A8({state:e,api:t}){if(e.member)try{const n=await t.member.sessionData();return n?{member:n,success:!0,action:"refreshMemberData:success"}:null}catch(n){return{success:!1,error:n,action:"refreshMemberData:failed"}}return null}async function N8({data:e,state:t,api:n}){const[a,i]=await Promise.all([z8({data:e,state:t,api:n}),P8({data:e,state:t,api:n})]);if(a&&i){if(i.success)return{action:"updateProfile:success",...a.success?{member:a.member}:{},page:"accountHome",popupNotification:Ee({type:"updateProfile:success",autoHide:!0,closeable:!0,status:"success",state:t,message:v("Check your inbox to verify email update")})};const r=a.success?v("Failed to send verification email"):v("Failed to update account data");return{action:"updateProfile:failed",...a.success?{member:a.member}:{},popupNotification:Ee({type:"updateProfile:failed",autoHide:!0,closeable:!0,status:"error",message:r,state:t})}}else if(a){const r=a.success?"updateProfile:success":"updateProfile:failed",o=a.success?"success":"error",s=a.success?v("Account details updated successfully"):v("Failed to update account details");return{action:r,...a.success?{member:a.member}:{},...a.success?{page:"accountHome"}:{},popupNotification:Ee({type:r,autoHide:a.success,closeable:!0,status:o,state:t,message:s})}}else if(i){const r=i.success?"updateProfile:success":"updateProfile:failed",o=i.success?"success":"error";let s="";return i.error?s=xn(i.error,v("Failed to send verification email")):s=v("Check your inbox to verify email update"),{action:r,...i.success?{page:"accountHome"}:{},popupNotification:Ee({type:r,autoHide:i.success,closeable:!0,status:o,state:t,message:s})}}return{action:"updateProfile:success",page:"accountHome",popupNotification:Ee({type:"updateProfile:success",autoHide:!0,closeable:!0,status:"success",state:t,message:v("Account details updated successfully")})}}async function I8({data:{siteUrl:e},state:t}){const n=Hl({siteUrl:e,apiUrl:"not-defined"}),{member:a}=t,i=window.location.href,r=Yw(),o=await n.member.getIntegrityToken();return await n.member.sendMagicLink({emailType:"signup",name:a.name,email:a.email,autoRedirect:!1,integrityToken:o,customUrlHistory:t.site.outbound_link_tagging?[{time:Date.now(),referrerSource:r,referrerMedium:"Ghost Recommendations",referrerUrl:i}]:[]}),{}}function M8({data:{recommendationId:e},api:t}){try{const n=localStorage.getItem("ghost-recommendations-clicked"),a=n?JSON.parse(n):[];if(a.includes(e))return;a.push(e),localStorage.setItem("ghost-recommendations-clicked",JSON.stringify(a))}catch{}return t.recommendations.trackClicked({recommendationId:e}),{}}async function F8({data:{recommendationId:e},api:t}){return t.recommendations.trackSubscribed({recommendationId:e}),{}}const D8={togglePopup:s8,openPopup:l8,closePopup:Zx,switchPage:o8,openNotification:c8,closeNotification:d8,back:u8,signout:m8,signin:p8,startSigninOTCFromCustomForm:h8,verifyOTC:f8,signup:g8,updateSubscription:b8,cancelSubscription:k8,continueSubscription:v8,applyOffer:w8,updateNewsletter:T8,updateProfile:N8,refreshMemberData:A8,clearPopupNotification:S8,editBilling:x8,manageBilling:E8,checkoutPlan:y8,updateNewsletterPreference:$8,showPopupNotification:C8,removeEmailFromSuppressionList:j8,oneClickSubscribe:I8,trackRecommendationClicked:M8,trackRecommendationSubscribed:F8};async function O8({action:e,data:t,state:n,api:a}){const i=D8[e];return i?await i({data:t,state:n,api:a})||{}:{}}function Xx(e,t){e&&(e.innerText=t)}function _8(e,t,n){t.classList.add("error");const a=v("There was an error sending the email, please try again");Xx(n,xn(e,a))}async function R8({event:e,form:t,errorEl:n,siteUrl:a,submitHandler:i,doAction:r,captureException:o}){var $,F;t.removeEventListener("submit",i),e.preventDefault(),n&&(n.innerText=""),t.classList.remove("success","invalid","error");let s=e.target.querySelector("input[data-members-email]"),l=e.target.querySelector("input[data-members-name]"),c=(($=t==null?void 0:t.dataset)==null?void 0:$.membersAutoredirect)||"true",m=s==null?void 0:s.value,f=((l==null?void 0:l.value)||"").trim()||void 0,p,y=[],k=[],j=e.target.querySelectorAll("input[data-members-label]")||[];for(let z=0;z<j.length;++z)y.push(j[z].value);let b=e.target.querySelectorAll("input[type=hidden][data-members-newsletter], input[type=checkbox][data-members-newsletter]:checked, input[type=radio][data-members-newsletter]:checked")||[];for(let z=0;z<b.length;++z)k.push({name:b[z].value});t.dataset.membersForm&&(p=t.dataset.membersForm);const w=p==="signin"&&((F=t==null?void 0:t.dataset)==null?void 0:F.membersOtc)==="true";t.classList.add("loading");const E=co(),P={email:m,emailType:p,labels:y,name:f,autoRedirect:c==="true"};w&&(P.includeOTC=!0),E&&(P.urlHistory=E),b.length>0?P.newsletters=k:(e.target.querySelectorAll("input[type=checkbox][data-members-newsletter]")||[]).length>0&&(P.newsletters=[]);try{const R=await(await fetch(`${a}/members/api/integrity-token/`,{method:"GET"})).text(),_=await fetch(`${a}/members/api/send-magic-link/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...P,integrityToken:R})});if(t.addEventListener("submit",i),t.classList.remove("loading"),_.ok){t.classList.add("success");let D;if(w)try{D=await _.clone().json()}catch{D=void 0}const X=D==null?void 0:D.otc_ref;if(X&&typeof r=="function")try{r("startSigninOTCFromCustomForm",{email:(m||"").trim(),otcRef:X,inboxLinks:D==null?void 0:D.inboxLinks})}catch(ne){console.error(ne),o==null||o(ne)}}else{const D=await wn.fromApiResponse(_),X=xn(D,v("Failed to send magic link email"));Xx(n,X),t.classList.add("error")}}catch(z){_8(z,t,n)}}function U8({event:e,el:t,errorEl:n,siteUrl:a,site:i,member:r,clickHandler:o}){t.removeEventListener("click",o),e.preventDefault();let s=t.dataset.membersPlan,l=TU(i,s.toLowerCase()),c=t.dataset.membersSuccess,m=t.dataset.membersCancel,f,p;c&&(f=new URL(c,window.location.href).href),m&&(p=new URL(m,window.location.href).href),n&&(n.innerText=""),t.classList.add("loading");const y=r?{checkoutType:"upgrade"}:{},k=co();return k&&(y.urlHistory=k),fetch(`${a}/members/api/session`,{credentials:"same-origin"}).then(function(j){return j.ok?j.text():null}).then(function(j){return fetch(`${a}/members/api/create-stripe-checkout-session/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...l,identity:j,successUrl:f,cancelUrl:p,metadata:y})}).then(function(b){if(!b.ok)throw new Error(v("Could not create stripe checkout session"));return b.json()})}).then(function(j){return j.url?window.location.assign(j.url):window.Stripe(j.publicKey).redirectToCheckout({sessionId:j.sessionId}).then(function(w){if(w.error)throw new Error(w.error.message)})}).catch(function(j){console.error(j),t.addEventListener("click",o),t.classList.remove("loading"),n&&(n.innerText=j.message),t.classList.add("error")})}function L8({siteUrl:e,site:t={},member:n,doAction:a,captureException:i}={}){e&&(e=e.replace(/\/$/,""),Array.prototype.forEach.call(document.querySelectorAll("form[data-members-form]"),function(r){let o=r.querySelector("[data-members-error]");function s(l){R8({event:l,errorEl:o,form:r,siteUrl:e,submitHandler:s,doAction:a,captureException:i})}r.addEventListener("submit",s)}),Array.prototype.forEach.call(document.querySelectorAll("[data-members-plan]"),function(r){let o=r.querySelector("[data-members-error]");function s(l){U8({el:r,event:l,errorEl:o,member:n,site:t,siteUrl:e,clickHandler:s})}r.addEventListener("click",s)}),Array.prototype.forEach.call(document.querySelectorAll("[data-members-edit-billing]"),function(r){let o=r.querySelector("[data-members-error]"),s=r.dataset.membersSuccess,l=r.dataset.membersCancel,c,m;s&&(c=new URL(s,window.location.href).href),l&&(m=new URL(l,window.location.href).href);function f(p){r.removeEventListener("click",f),p.preventDefault(),o&&(o.innerText=""),r.classList.add("loading"),fetch(`${e}/members/api/session`,{credentials:"same-origin"}).then(function(y){return y.ok?y.text():null}).then(function(y){return fetch(`${e}/members/api/create-stripe-update-session/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:y,successUrl:c,cancelUrl:m})}).then(function(k){if(!k.ok)throw new Error(v("Could not create stripe checkout session"));return k.json()})}).then(function(y){return window.Stripe(y.publicKey).redirectToCheckout({sessionId:y.sessionId})}).then(function(y){if(y.error)throw new Error(v(y.error.message))}).catch(function(y){console.error(y),r.addEventListener("click",f),r.classList.remove("loading"),o&&(o.innerText=y.message),r.classList.add("error")})}r.addEventListener("click",f)}),Array.prototype.forEach.call(document.querySelectorAll("[data-members-manage-billing]"),function(r){let o=r.querySelector("[data-members-error]"),s=r.dataset.membersReturn,l;s&&(l=new URL(s,window.location.href).href);function c(m){r.removeEventListener("click",c),m.preventDefault(),o&&(o.innerText=""),r.classList.add("loading"),fetch(`${e}/members/api/session`,{credentials:"same-origin"}).then(function(f){return f.ok?f.text():null}).then(function(f){return fetch(`${e}/members/api/create-stripe-billing-portal-session/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:f,returnUrl:l})}).then(function(p){if(!p.ok)throw new Error(v("Could not create Stripe billing portal session"));return p.json()})}).then(function(f){return window.location.assign(f.url)}).catch(function(f){console.error(f),r.addEventListener("click",c),r.classList.remove("loading"),o&&(o.innerText=f.message),r.classList.add("error")})}r.addEventListener("click",c)}),Array.prototype.forEach.call(document.querySelectorAll("[data-members-signout]"),function(r){function o(s){r.removeEventListener("click",o),s.preventDefault(),r.classList.remove("error"),r.classList.add("loading"),fetch(`${e}/members/api/session`,{method:"DELETE"}).then(function(l){l.ok?window.location.replace(e):(r.addEventListener("click",o),r.classList.remove("loading"),r.classList.add("error"))})}r.addEventListener("click",o)}),Array.prototype.forEach.call(document.querySelectorAll("[data-members-cancel-subscription]"),function(r){let o=r.parentElement.querySelector("[data-members-error]");function s(l){r.removeEventListener("click",s),l.preventDefault(),r.classList.remove("error"),r.classList.add("loading");let c=r.dataset.membersCancelSubscription;return o&&(o.innerText=""),fetch(`${e}/members/api/session`,{credentials:"same-origin"}).then(function(m){return m.ok?m.text():null}).then(function(m){return fetch(`${e}/members/api/subscriptions/${c}/`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:m,smart_cancel:!0})})}).then(function(m){m.ok?window.location.reload():(r.addEventListener("click",s),r.classList.remove("loading"),r.classList.add("error"),o&&(o.innerText=v("There was an error cancelling your subscription, please try again.")))})}r.addEventListener("click",s)}),Array.prototype.forEach.call(document.querySelectorAll("[data-members-continue-subscription]"),function(r){let o=r.parentElement.querySelector("[data-members-error]");function s(l){r.removeEventListener("click",s),l.preventDefault(),r.classList.remove("error"),r.classList.add("loading");let c=r.dataset.membersContinueSubscription;return o&&(o.innerText=""),fetch(`${e}/members/api/session`,{credentials:"same-origin"}).then(function(m){return m.ok?m.text():null}).then(function(m){return fetch(`${e}/members/api/subscriptions/${c}/`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:m,cancel_at_period_end:!1})})}).then(function(m){m.ok?window.location.reload():(r.addEventListener("click",s),r.classList.remove("loading"),r.classList.add("error"),o&&(o.innerText=v("There was an error continuing your subscription, please try again.")))})}r.addEventListener("click",s)}))}const Y8={showPopup:!0,site:_i,member:Jl.free,page:"accountEmail",...i8(),pageData:Jx};function B8({site:e,children:t}){const{portal_sentry:n}=e||{};return n&&n.dsn?u.jsx(Yd,{children:t}):u.jsx(u.Fragment,{children:t})}class V8 extends re.Component{constructor(t){super(t),this.setupCustomTriggerButton(),this.state={site:null,member:null,offers:[],page:"loading",showPopup:!1,action:"init:running",actionErrorMessage:null,initStatus:"running",lastPage:null,customSiteUrl:t.customSiteUrl,locale:t.locale,scrollbarWidth:0}}componentDidMount(){const t=this.getScrollbarWidth();this.setState({scrollbarWidth:t}),this.initSetup()}componentDidUpdate(t,n){var a,i,r;if(n.showPopup!==this.state.showPopup){this.handleCustomTriggerClassUpdate();try{this.state.showPopup?(this.bodyScroll=(r=(i=(a=window.document)==null?void 0:a.body)==null?void 0:i.style)==null?void 0:r.overflow,this.bodyMargin=window.getComputedStyle(document.body).getPropertyValue("margin-right"),window.document.body.style.overflow="hidden",this.state.scrollbarWidth&&(window.document.body.style.marginRight=`calc(${this.bodyMargin} + ${this.state.scrollbarWidth}px)`)):(window.document.body.style.overflow=this.bodyScroll||"",!this.bodyMargin||this.bodyMargin==="0px"?window.document.body.style.marginRight="":window.document.body.style.marginRight=this.bodyMargin)}catch{}}if(this.state.initStatus==="success"&&n.initStatus!==this.state.initStatus){const{siteUrl:o}=this.props,s=this.getContextFromState();this.sendPortalReadyEvent(),L8({siteUrl:o,site:s.site,member:s.member,doAction:s.doAction,captureException:Vs})}}componentWillUnmount(){clearTimeout(this.timeoutId),this.customTriggerButtons&&this.customTriggerButtons.forEach(t=>{t.removeEventListener("click",this.clickHandler)}),window.removeEventListener("hashchange",this.hashHandler,!1)}sendPortalReadyEvent(){window.self!==window.parent&&window.parent.postMessage({type:"portal-ready",payload:{}},"*")}getScrollbarWidth(){const t=document.createElement("div");t.style.visibility="hidden",t.style.overflow="scroll",document.body.appendChild(t),document.body.appendChild(t);const n=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),n}setupCustomTriggerButton(){this.clickHandler=a=>{a.preventDefault();const i=a.currentTarget,r=i&&i.dataset.portal,{page:o,pageQuery:s,pageData:l}=this.getPageFromLinkPath(r)||{};this.state.initStatus==="success"&&(s&&s!=="free"?this.handleSignupQuery({site:this.state.site,pageQuery:s}):this.dispatchAction("openPopup",{page:o,pageQuery:s,pageData:l}))};const t="[data-portal]",n="gh-portal-close";this.customTriggerButtons=document.querySelectorAll(t)||[],this.customTriggerButtons.forEach(a=>{a.classList.add(n),a.removeEventListener("click",this.clickHandler),a.addEventListener("click",this.clickHandler)})}handleCustomTriggerClassUpdate(){var a;const t="gh-portal-open",n="gh-portal-close";(a=this.customTriggerButtons)==null||a.forEach(i=>{const r=this.state.showPopup?t:n,o=this.state.showPopup?n:t;i.classList.add(r),i.classList.remove(o)})}async initSetup(){try{const{site:t,member:n,offers:a,page:i,showPopup:r,popupNotification:o,lastPage:s,pageQuery:l,pageData:c}=await this.fetchData(),m=this.props.siteI18nEnabled&&(this.props.locale||t.locale)||"en";Sl.changeLanguage(m);const f={site:t,member:n,offers:a,page:i,lastPage:s,pageQuery:l,showPopup:r,pageData:c,popupNotification:o,dir:Sl.dir()||"ltr",action:"init:success",initStatus:"success",locale:m};if(this.handleSignupQuery({site:t,pageQuery:l,member:n}),this.setState(f),this.hashHandler=()=>{this.updateStateForPreviewLinks()},window.addEventListener("hashchange",this.hashHandler,!1),!n){const p=document.querySelectorAll("[data-lexical-signup-form]");p.length>0&&p.forEach(y=>{y.style.display=""})}this.setupRecommendationButtons(),this.transformPortalLinksToRelative()}catch(t){console.error("[Portal] Failed to initialize:",t),this.setState({action:"init:failed",initStatus:"failed"})}}async fetchData(){const{site:t,member:n,offers:a}=await this.fetchApiData(),{site:i,...r}=this.fetchDevData(),{site:o,...s}=this.fetchLinkData(t,n),{site:l,...c}=this.fetchPreviewData(),{site:m,...f}=this.fetchNotificationData();return{member:n,offers:a,page:"",site:{...t,...o,...l,...m,...i,plans:{...(i||{}).plans,...(t||{}).plans,...(l||{}).plans}},...r,...s,...f,...c}}fetchDevData(){return $e(["dev"])&&!this.state.customSiteUrl?Y8:$e(["test"])?{showPopup:this.props.showPopup!==void 0?this.props.showPopup:!0}:{}}fetchOfferQueryStrData(t=""){const n=new URLSearchParams(t),a={};for(let i of n.entries()){const r=i[0],o=decodeURIComponent(i[1]);r==="name"?a.name=o||"":r==="code"?a.code=o||"":r==="display_title"?a.display_title=o||"":r==="display_description"?a.display_description=o||"":r==="type"?a.type=o||"":r==="cadence"?a.cadence=o||"":r==="duration"?a.duration=o||"":r==="duration_in_months"&&!isNaN(Number(o))?a.duration_in_months=Number(o):r==="amount"&&!isNaN(Number(o))?a.amount=Number(o):r==="currency"?a.currency=o||"":r==="status"?a.status=o||"":r==="tier_id"&&(a.tier={id:o||Jx.tier.id})}return{page:"offer",pageData:a}}fetchQueryStrData(t=""){const n=new URLSearchParams(t),a={site:{plans:{}}},i=[];let r,o=null,s,l,c;for(let m of n.entries()){const f=m[0],p=decodeURIComponent(m[1]);if(f==="button")a.site.portal_button=JSON.parse(p);else if(f==="name")a.site.portal_name=JSON.parse(p);else if(f==="isFree"&&JSON.parse(p))i.push("free");else if(f==="isMonthly"&&JSON.parse(p))i.push("monthly");else if(f==="isYearly"&&JSON.parse(p))i.push("yearly");else if(f==="portalPrices")r=p?p.split(","):[];else if(f==="portalProducts")o=p?p.split(","):[];else if(f==="page"&&p)a.page=p;else if(f==="accentColor"&&(p===""||p))a.site.accent_color=p;else if(f==="buttonIcon"&&p)a.site.portal_button_icon=p;else if(f==="signupButtonText")a.site.portal_button_signup_text=p||"";else if(f==="signupTermsHtml")a.site.portal_signup_terms_html=p||"";else if(f==="signupCheckboxRequired")a.site.portal_signup_checkbox_required=JSON.parse(p);else if(f==="buttonStyle"&&p)a.site.portal_button_style=p;else if(f==="monthlyPrice"&&!isNaN(Number(p)))a.site.plans.monthly=Number(p),s=Number(p);else if(f==="yearlyPrice"&&!isNaN(Number(p)))a.site.plans.yearly=Number(p),l=Number(p);else if(f==="currency"&&p){const y=p.toUpperCase();a.site.plans.currency=y,a.site.plans.currency_symbol=De(y),c=y}else f==="disableBackground"?a.site.disableBackground=JSON.parse(p):f==="membersSignupAccess"&&p?a.site.members_signup_access=p:f==="portalDefaultPlan"&&p&&(a.site.portal_default_plan=p)}return a.site.portal_plans=i,a.site.portal_products=o,r?a.site.portal_plans=r:s&&l&&c&&(a.site.prices=[{id:"monthly",stripe_price_id:"dummy_stripe_monthly",stripe_product_id:"dummy_stripe_product",active:1,nickname:"Monthly",currency:c,amount:s,type:"recurring",interval:"month"},{id:"yearly",stripe_price_id:"dummy_stripe_yearly",stripe_product_id:"dummy_stripe_product",active:1,nickname:"Yearly",currency:c,amount:l,type:"recurring",interval:"year"}]),a}fetchNotificationData(){const{type:t,status:n,duration:a,autoHide:i,closeable:r}=Qw({billingOnly:!0})||{};return["stripe:billing-update"].includes(t)?n==="success"?{showPopup:!0,popupNotification:Ee({type:t,status:n,duration:a,closeable:r,autoHide:i,state:this.state,message:n==="success"?"Billing info updated successfully":""})}:{showPopup:!0}:{}}fetchLinkData(t,n){const a=new URLSearchParams(window.location.search);if(a.get("action")==="unsubscribe")return a.get("key")&&a.get("uuid")?{showPopup:!0,page:"unsubscribe",pageData:{uuid:a.get("uuid"),key:a.get("key"),newsletterUuid:a.get("newsletter"),comments:a.get("comments")}}:{showPopup:!0,page:"accountEmail",pageData:{newsletterUuid:a.get("newsletter"),action:"unsubscribe",redirect:t.url+"#/portal/account/newsletters"}};if(AU({site:t})&&a.get("action")==="signup"&&a.get("success")==="true")return{showPopup:!0,page:"recommendations",pageData:{signup:!0}};const[i,r]=window.location.hash.substr(1).split("?"),o=new URLSearchParams(r??""),s=/^(?:(\w+?))?\/monthly$/,l=/^(?:(\w+?))?\/yearly$/,c=/^offers\/(\w+?)\/?$/,m=/^\/portal\/?(?:\/(\w+(?:\/\w+)*))?\/?$/,f=/^\/feedback\/(\w+?)\/(\w+?)\/?$/;if(i&&f.test(i)){const[,p,y]=i.match(f),k=parseInt(y);if(k===1||k===0)return n||o.get("uuid")&&o.get("key")?{showPopup:!0,page:"feedback",pageData:{uuid:n?null:o.get("uuid"),key:n?null:o.get("key"),postId:p,score:k}}:{showPopup:!0,page:"signin",pageData:{redirect:t.url+`#/feedback/${p}/${k}/`}}}if(i&&m.test(i)){const[,p]=i.match(m),{page:y,pageQuery:k,pageData:j}=this.getPageFromLinkPath(p,t)||{},b=["accountPlan","accountProfile"].includes(y)?"accountHome":null;return{showPopup:!(["monthly","yearly"].includes(k)||s.test(k)||l.test(k)||c.test(k)),...y?{page:y}:{},...k?{pageQuery:k}:{},...j?{pageData:j}:{},...b?{lastPage:b}:{}}}return{}}fetchPreviewData(){const[,t]=window.location.hash.substr(1).split("?");if($e(["preview"])){let n={};return $e(["offerPreview"])?n=this.fetchOfferQueryStrData(t):n=this.fetchQueryStrData(t),{...n,showPopup:!0}}return{}}getColorOverride(){const t=document.querySelector("script[data-ghost]");return t&&t.dataset.accentColor?t.dataset.accentColor:!1}async fetchApiData(){const{siteUrl:t,customSiteUrl:n,apiUrl:a,apiKey:i}=this.props;try{this.GhostApi=this.props.api||Hl({siteUrl:t,apiUrl:a,apiKey:i});const{site:r,member:o,offers:s}=await this.GhostApi.init(),l=this.getColorOverride();return l&&(r.accent_color=l),this.setupFirstPromoter({site:r,member:o}),this.setupSentry({site:r}),{site:r,member:o,offers:s}}catch(r){if($e(["dev","test"],{customSiteUrl:n}))return{};throw r}}setupSentry({site:t}){if($e(["test"]))return null;const{portal_sentry:n,portal_version:a,version:i}=t,o=`portal@2.62.2|ghost@${i}`;n&&n.dsn&&hT({dsn:n.dsn,environment:n.env||"development",release:o,beforeSend:s=>xU({event:s})?s:null,allowUrls:[/https?:\/\/((www)\.)?unpkg\.com\/@tryghost\/portal/]})}setupFirstPromoter({site:t,member:n}){if($e(["test"]))return null;const a=UU({site:t});let i=ip({site:t});if(i=i==null?void 0:i.replace(/^(\S*\.)?(\S*\.\S*)$/i,".$2"),a&&i){const r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src="https://cdn.firstpromoter.com/fprom.js",r.onload=r.onreadystatechange=function(){let s=this.readyState;if(!s||s==="complete"||s==="loaded")try{if(window.$FPROM.init(a,i),JU({member:n})){const l=n.email,c=n.uuid;if(window.$FPROM)window.$FPROM.trackSignup({email:l,uid:c});else{const m=window._fprom||[];window._fprom=m,m.push(["event","signup"]),m.push(["email",l]),m.push(["uid",c])}}}catch{}};const o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(r,o)}}async dispatchAction(t,n){clearTimeout(this.timeoutId),this.setState({action:`${t}:running`,actionErrorMessage:null});try{const a=await O8({action:t,data:n,state:this.state,api:this.GhostApi});this.setState(a),a&&a.action&&!a.action.includes(":failed")&&(this.timeoutId=setTimeout(()=>{this.setState({action:""})},2e3))}catch(a){if(console.error(`[Portal] Failed to dispatch action: ${t}`,a),n&&n.throwErrors)throw a;const i=Ee({type:`${t}:failed`,autoHide:!0,closeable:!0,status:"error",state:this.state,meta:{error:a}});this.setState({action:`${t}:failed`,actionErrorMessage:xn(a,v("An unexpected error occured. Please try again or <a>contact support</a> if the error persists.")),popupNotification:i})}}updateStateForPreviewLinks(){const{site:t,...n}=this.fetchPreviewData(),{site:a,...i}=this.fetchLinkData(),r={site:{...this.state.site,...a||{},...t||{},plans:{...this.state.site&&this.state.site.plans,...(a||{}).plans,...(t||{}).plans}},...i,...n};this.handleSignupQuery({site:r.site,pageQuery:r.pageQuery}),this.setState(r)}async handleOfferQuery({site:t,offerId:n,member:a=this.state.member}){const{portal_button:i}=t;if(Xm(),!rn({member:a})||Qn({member:a}))try{const r=await this.GhostApi.site.offer({offerId:n}),o=r==null?void 0:r.offers[0];if(!o||!o.tier||Kw({offer:o})||!HU({site:t,offer:o}))return;if(i)this.dispatchAction("openPopup",{page:"offer",pageData:r==null?void 0:r.offers[0]});else{const s=Pa({site:t,productId:o.tier.id}),l=o.cadence==="month"?s.monthlyPrice:s.yearlyPrice;if(this.dispatchAction("openPopup",{page:"loading"}),a){const{tierId:c,cadence:m}=Aa({site:t,priceId:l.id});this.dispatchAction("checkoutPlan",{plan:l.id,offerId:n,tierId:c,cadence:m})}else{const{tierId:c,cadence:m}=Aa({site:t,priceId:l.id});this.dispatchAction("signup",{plan:l.id,offerId:n,tierId:c,cadence:m})}}}catch{}}handleSignupQuery({site:t,pageQuery:n,member:a}){const i=/^offers\/(\w+?)\/?$/;let r=n;if(i.test(n||"")){const[,s]=n.match(i);this.handleOfferQuery({site:t,offerId:s,member:a});return}Gw({site:t,pageQuery:n})&&(r=Gw({site:t,pageQuery:n}));const o=PU({site:t,priceId:r});if(n&&n!=="free"){Xm();const s=(o==null?void 0:o.id)||r;s!=="free"&&this.dispatchAction("openPopup",{page:"loading"});const{tierId:l,cadence:c}=Aa({site:t,priceId:s});this.dispatchAction("signup",{plan:s,tierId:l,cadence:c})}}getPageFromLinkPath(t){const n=/^signup\/?(?:\/(\w+?))?\/?$/,a=/^signup\/?(?:\/(\w+?))\/monthly\/?$/,i=/^signup\/?(?:\/(\w+?))\/yearly\/?$/,r=/^offers\/(\w+?)\/?$/;if(t===void 0||t==="")return{page:"default"};if(r.test(t))return{pageQuery:t};if(t==="signup")return{page:"signup"};if(a.test(t)){const[,o]=t.match(a);return{page:"signup",pageQuery:`${o}/monthly`}}else if(i.test(t)){const[,o]=t.match(i);return{page:"signup",pageQuery:`${o}/yearly`}}else if(n.test(t)){const[,o]=t.match(n);return{page:"signup",pageQuery:o}}else{if(t==="signup/free")return{page:"signup",pageQuery:"free"};if(t==="signup/monthly")return{page:"signup",pageQuery:"monthly"};if(t==="signup/yearly")return{page:"signup",pageQuery:"yearly"};if(t==="signin")return{page:"signin"};if(t==="account")return{page:"accountHome"};if(t==="account/plans")return{page:"accountPlan"};if(t==="account/profile")return{page:"accountProfile"};if(t==="account/newsletters")return{page:"accountEmail"};if(t==="support")return{page:"support"};if(t==="support/success")return{page:"supportSuccess"};if(t==="support/error")return{page:"supportError"};if(t==="recommendations")return{page:"recommendations",pageData:{signup:!1}};if(t==="account/newsletters/help")return{page:"emailReceivingFAQ",pageData:{direct:!0}};if(t==="account/newsletters/disabled")return{page:"emailSuppressionFAQ",pageData:{direct:!0}}}return{page:"default"}}getAccentColor(){const{accent_color:t}=this.state.site||{};return P6(t)}getContextPage({site:t,page:n,member:a}){if(!n||n==="default"){const i=Vt({site:t})||!Sn({site:t})?"signin":"signup";n=a?"accountHome":i}return Yp({page:n})}getContextMember({page:t,member:n,customSiteUrl:a}){return $e(["dev","preview"],{customSiteUrl:a})?q5({page:t})||J5({page:t})?$e(["dev"],{customSiteUrl:a})?n||Jl.free:$e(["preview"])?Jl.preview:Jl.paid:null:n}getContextFromState(){const{site:t,member:n,offers:a,action:i,actionErrorMessage:r,page:o,lastPage:s,showPopup:l,pageQuery:c,pageData:m,popupNotification:f,customSiteUrl:p,dir:y,scrollbarWidth:k,otcRef:j,inboxLinks:b}=this.state,w=this.getContextPage({site:t,page:o,member:n}),E=this.getContextMember({page:w,member:n,customSiteUrl:p});return{api:this.GhostApi,site:t,offers:a,action:i,actionErrorMessage:r,brandColor:this.getAccentColor(),page:w,pageQuery:c,pageData:m,member:E,lastPage:s,showPopup:l,popupNotification:f,customSiteUrl:p,dir:y,scrollbarWidth:k,otcRef:j,inboxLinks:b,doAction:(P,$)=>this.dispatchAction(P,$)}}getRecommendationButtons(){return document.querySelectorAll("[data-recommendation]")||[]}setupRecommendationButtons(){const t=a=>{const i=a.currentTarget.dataset.recommendation;i?this.dispatchAction("trackRecommendationClicked",{recommendationId:i}).catch(console.error):console.warn("[Portal] Invalid usage of data-recommendation attribute")},n=this.getRecommendationButtons();for(const a of n)a.addEventListener("click",t,{passive:!0})}transformPortalLinksToRelative(){document.querySelectorAll('a[href*="#/portal"]').forEach(r8)}render(){return this.state.initStatus==="success"?u.jsx(B8,{site:this.state.site,children:u.jsxs(H.Provider,{value:this.getContextFromState(),children:[u.jsx(Vp,{}),u.jsx(sp,{}),u.jsx(pp,{})]})}):null}}const Qx="ghost-portal-root";function H8(){const e=document.createElement("div");e.id=Qx,e.setAttribute("data-testid","portal-root"),document.body.appendChild(e)}function W8(){const e=document.querySelector("script[data-ghost]");if(e){const t=e.dataset.i18n==="true",n=e.dataset.ghost,a=e.dataset.key,i=e.dataset.api,r=e.dataset.locale;return{siteUrl:n,apiKey:a,apiUrl:i,siteI18nEnabled:t,locale:r}}return{}}function G8(){const e=new URL(window.location.href);e.searchParams.get("token")&&(e.searchParams.delete("token"),window.history.replaceState({},document.title,e.href))}function K8(){const{siteUrl:e,apiKey:t,apiUrl:n,siteI18nEnabled:a,locale:i}=W8(),r=e||window.location.origin;H8(),G8(),EC.render(u.jsx(re.StrictMode,{children:u.jsx(V8,{siteUrl:r,customSiteUrl:e,apiKey:t,apiUrl:n,siteI18nEnabled:a,locale:i})}),document.getElementById(Qx))}K8()});
|
|
7536
|
+
`;function k5({site:e}){return Zm+g5+uL+LL+XL+TL()+lL+iL+sL+Ow+L6+z6+H6()+lp+Y6+y5+b5+G6+e5+t5+n5+i5+s5+c5+h5}const nh=class nh extends re.Component{constructor(t){super(t),this.state={email:"",token:void 0}}componentDidMount(){const{member:t}=this.context;t&&this.context.doAction("switchPage",{page:"accountHome"})}handleSignin(t){t.preventDefault(),this.doSignin()}doSignin(){this.setState(t=>({errors:Ul({fields:this.getInputFields({state:t})})}),async()=>{const{email:t,phonenumber:n,errors:a,token:i}=this.state,{redirect:r}=this.context.pageData??{};a&&Object.values(a).filter(s=>!!s).length>0||this.context.doAction("signin",{email:t,phonenumber:n,redirect:r,token:i})})}handleInputChange(t,n){const a=n.name;this.setState({[a]:t.target.value})}onKeyDown(t){t.keyCode===13&&this.handleSignin(t)}getInputFields({state:t}){const n=t.errors||{};return[{type:"email",value:t.email,placeholder:v("jamie@example.com"),label:v("Email"),name:"email",required:!0,errorMessage:n.email||"",autoFocus:!0},{type:"text",value:t.phonenumber,placeholder:"+1 (123) 456-7890",label:"Phone number",name:"phonenumber",required:!1,tabIndex:-1,autoComplete:"off",hidden:!0}]}renderSubmitButton(){const{action:t}=this.context;let n=!1;const a=t==="signin:running";let i=v(a?"Sending login link...":"Continue");const r=!!a;return t==="signin:failed"&&(i=v("Retry"),n=!0),u.jsx(ze,{dataTestId:"signin",retry:n,style:{width:"100%"},onClick:o=>this.handleSignin(o),disabled:r,brandColor:this.context.brandColor,label:i,isRunning:a})}renderSignupMessage(){const{brandColor:t}=this.context;return u.jsxs("div",{className:"gh-portal-signup-message",children:[u.jsx("div",{children:v("Don't have an account?")}),u.jsx("button",{"data-test-button":"signup-switch",className:"gh-portal-btn gh-portal-btn-link",style:{color:t},onClick:()=>this.context.doAction("switchPage",{page:"signup"}),children:u.jsx("span",{children:v("Sign up")})})]})}renderForm(){const{site:t}=this.context,n=$l({site:t})&&Sn({site:t});return ea({site:t})?u.jsxs("section",{children:[u.jsx("div",{className:"gh-portal-section",children:u.jsx(Rl,{fields:this.getInputFields({state:this.state}),onChange:(a,i)=>this.handleInputChange(a,i),onKeyDown:(a,i)=>this.onKeyDown(a,i)})}),u.jsxs("footer",{className:"gh-portal-signin-footer",children:[this.renderSubmitButton(),n&&this.renderSignupMessage()]})]}):u.jsx("section",{children:u.jsx("div",{className:"gh-portal-section",children:u.jsx("p",{className:"gh-portal-members-disabled-notification","data-testid":"members-disabled-notification-text",children:v("Memberships unavailable, contact the owner for access.")})})})}renderSiteIcon(){const{site:t}=this.context,n=t.icon;return n?u.jsx("img",{className:"gh-portal-signup-logo",src:n,alt:this.context.site.title}):ea({site:t})?null:u.jsx(vx,{className:"gh-portal-icon gh-portal-icon-invitation"})}renderSiteTitle(){const{site:t}=this.context,n=t.title;return ea({site:t})?u.jsx("h1",{className:"gh-portal-main-title",children:v("Sign in")}):u.jsx("h1",{className:"gh-portal-main-title",children:n})}renderFormHeader(){return u.jsxs("header",{className:"gh-portal-signin-header",children:[this.renderSiteIcon(),this.renderSiteTitle()]})}render(){return u.jsxs(u.Fragment,{children:[u.jsx(Oe,{}),u.jsx("div",{className:"gh-portal-logged-out-form-container",children:u.jsxs("div",{className:"gh-portal-content signin",children:[this.renderFormHeader(),this.renderForm()]})})]})}};nh.contextType=H;let _p=nh;const v5=({handleSignout:e,supportAddress:t=""})=>{const n=`mailto:${t}`;return u.jsxs("footer",{className:"gh-portal-account-footer",children:[u.jsx("ul",{className:"gh-portal-account-footermenu",children:u.jsx("li",{children:u.jsx("button",{"data-test-button":"footer-signout",className:"gh-portal-btn",name:"logout","aria-label":"logout",onClick:a=>e(a),children:v("Sign out")})})}),u.jsx("div",{className:"gh-portal-account-footerright",children:u.jsx("ul",{className:"gh-portal-account-footermenu",children:u.jsx("li",{children:u.jsx("a",{"data-test-link":"footer-support",className:"gh-portal-btn gh-portal-btn-branded",href:n,onClick:()=>{n&&window.open(n)},children:v("Contact support")})})})})]})},w5=()=>{const{member:e,brandColor:t}=C.useContext(H),n=e.avatar_image;return u.jsxs("header",{className:"gh-portal-account-header",children:[u.jsx(Jm,{gravatar:n,style:{userIcon:{color:t,width:"56px",height:"56px",padding:"2px"}}}),u.jsx("h2",{className:"gh-portal-main-title",children:v("Your account")})]})},x5=()=>{const{site:e,action:t,brandColor:n,doAction:a}=C.useContext(H);if(!$l({site:e})||!Sn({site:e}))return null;const i=["checkoutPlan:running"].includes(t),r=()=>{a("switchPage",{page:"accountPlan",lastPage:"accountHome"})};return u.jsx(ze,{dataTestId:"view-plans",isRunning:i,label:v("View plans"),onClick:()=>r(),brandColor:n,style:{width:"100%"}})},E5=()=>{const{member:e,site:t}=C.useContext(H),{is_stripe_configured:n}=t;if(!n||Ni({site:t}))return null;const a=Ft({member:e}),i=Qn({member:e});if(i&&!a)return null;if(a){const r=a==null?void 0:a.current_period_end;if(i&&Qm({member:e})){const o=Qm({member:e}),s=En(o);return u.jsx("div",{className:"gh-portal-section",children:u.jsx("p",{className:"gh-portal-text-center gh-portal-free-ctatext",children:v("Your subscription will expire on {expiryDate}",{expiryDate:s})})})}if(a!=null&&a.cancel_at_period_end||i)return null;if(np({sub:a})){const o=En(a.trial_end_at);return u.jsx("div",{className:"gh-portal-section",children:u.jsx("p",{className:"gh-portal-text-center gh-portal-free-ctatext",children:v("Your subscription will start on {subscriptionStart}",{subscriptionStart:o})})})}return u.jsx("div",{className:"gh-portal-section",children:u.jsx("p",{className:"gh-portal-text-center gh-portal-free-ctatext",children:v("Your subscription will renew on {renewalDate}",{renewalDate:En(r)})})})}return u.jsxs("div",{className:"gh-portal-section",children:[u.jsx("p",{className:"gh-portal-text-center gh-portal-free-ctatext",children:v("You currently have a free membership, upgrade to a paid subscription for full access.")}),u.jsx(x5,{})]})},S5=()=>{const{member:e,doAction:t,action:n,brandColor:a}=C.useContext(H),i=Ft({member:e});if(!i||!i.cancel_at_period_end)return null;const r=i.cancel_at_period_end?v("Continue subscription"):v("Cancel subscription"),o=["cancelSubscription:running"].includes(n),s=!!o,l=!!i.cancel_at_period_end,c=()=>{if(!i.cancel_at_period_end)return null;const m=i.current_period_end;return u.jsx("p",{className:"gh-portal-text-center gh-portal-free-ctatext",children:v("Your subscription will expire on {expiryDate}",{expiryDate:En(m)})})};return u.jsxs("div",{className:"gh-portal-cancelcontinue-container",children:[u.jsx(c,{}),u.jsx(ze,{onClick:()=>{t("continueSubscription",{subscriptionId:i.id})},isRunning:o,disabled:s,isPrimary:l,brandColor:a,label:r,style:{width:"100%"}})]})},C5=e=>C.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},C.createElement("defs",null,C.createElement("style",null,".a{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px;}")),C.createElement("path",{d:"M22.939 2.56V8.817C22.9391 9.61244 22.6232 10.3754 22.061 10.938L10.5 22.5C10.2187 22.7812 9.83721 22.9392 9.43946 22.9392C9.04172 22.9392 8.66026 22.7812 8.37896 22.5L1.49997 15.62C1.21876 15.3387 1.06079 14.9572 1.06079 14.5595C1.06079 14.1618 1.21876 13.7803 1.49997 13.499L13.061 1.938C13.6236 1.37572 14.3865 1.0599 15.182 1.06H21.439C21.8368 1.06 22.2183 1.21803 22.4996 1.49934C22.7809 1.78064 22.939 2.16217 22.939 2.56V2.56Z",className:"a"}),C.createElement("path",{d:"M17.689 7.81C16.8605 7.81 16.189 7.13842 16.189 6.31C16.189 5.48157 16.8605 4.81 17.689 4.81C18.5174 4.81 19.189 5.48157 19.189 6.31C19.189 7.13842 18.5174 7.81 17.689 7.81Z",className:"a"})),$5=()=>{const{member:e,site:t,doAction:n}=C.useContext(H),a=()=>{const p=Ft({member:e});n("manageBilling",{subscriptionId:p.id})},i=()=>{const{is_stripe_configured:p}=t;p&&n("switchPage",{page:"accountPlan",lastPage:"accountHome"})},r=({price:p,isComplimentary:y,subscription:k})=>{const{next_payment:S}=k||{};let b="";if(p){const{amount:z=0,currency:R,interval:_}=p;b=`${Intl.NumberFormat("en",{currency:R,style:"currency"}).format(z/100)}/${v(_)}`}const w=Qm({member:e});y&&(w?b=`${v("Complimentary")} - ${v("Expires {expiryDate}",{expiryDate:w})}`:b=b?`${v("Complimentary")} (${b})`:v("Complimentary"));let E="";const P=np({sub:k});if(P&&(E="gh-portal-account-old-price"),P)return u.jsxs(u.Fragment,{children:[u.jsx("p",{className:E,children:b}),u.jsx(j5,{subscription:k})]});let j=T5({nextPayment:S});j&&(E="gh-portal-account-old-price");const F=()=>j?u.jsxs("p",{className:"gh-portal-account-discountcontainer","data-testid":"offer-label",children:[u.jsx(C5,{className:"gh-portal-account-tagicon"}),u.jsx("span",{children:j})]}):null;return u.jsxs(u.Fragment,{children:[u.jsx("p",{className:E,children:b}),u.jsx(F,{})]})},o=({isPaid:p})=>Ni({site:t})&&!p?null:u.jsx("button",{className:"gh-portal-btn gh-portal-btn-list",onClick:y=>i(),"data-test-button":"change-plan",children:v("Change")}),s=({defaultCardLast4:p})=>{if(p){const y=`**** **** **** ${p}`;return u.jsx("p",{children:y})}return null},l=({defaultCardLast4:p,isComplimentary:y})=>{const{action:k}=C.useContext(H),S=k==="manageBilling:running"?u.jsx(Ii,{className:"gh-portal-billing-button-loader"}):v("Update");return y?null:u.jsxs("section",{children:[u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:v("Billing info & receipts")}),u.jsx(s,{defaultCardLast4:p})]}),u.jsx("button",{className:"gh-portal-btn gh-portal-btn-list",onClick:b=>a(),"data-test-button":"manage-billing",children:S})]})},c=Ft({member:e}),m=Qn({member:e}),f=rn({member:e});if(c||m){const{price:p,default_payment_card_last4:y}=c||{};let k=v("Plan");return jl({site:t})&&Lw({member:e})&&(k=Lw({member:e})),u.jsxs(u.Fragment,{children:[u.jsxs("section",{children:[u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:k}),u.jsx(r,{price:p,isComplimentary:m,subscription:c})]}),u.jsx(o,{isPaid:f})]}),u.jsx(l,{isComplimentary:m,defaultCardLast4:y})]})}return null};function j5({subscription:e}){if(np({sub:e})){const t=En(e.trial_end_at);return u.jsx("p",{className:"gh-portal-account-discountcontainer",children:u.jsx("div",{children:u.jsx("span",{children:v("Free Trial – Ends {trialEnd}",{trialEnd:t})})})})}return null}function T5({nextPayment:e}){if(!e)return"";const t=e.discount;if(!t)return"";let n="";t.duration==="forever"?n=v("Forever"):t.duration==="once"?n=v("Next payment"):t.duration==="repeating"&&t.end&&(n=v("Ends {offerEndDate}",{offerEndDate:En(t.end)}));const a=Intl.NumberFormat("en",{currency:e.currency,style:"currency"}).format(e.amount/100);let i="";return t.duration==="once"?i=a:i=`${a}/${e.interval}`,`${i}${n?` — ${n}`:""}`}function P5(){const{member:e,site:t,doAction:n}=C.useContext(H);let{newsletters:a}=e;const i=!!(a!=null&&a.length);let r=v(i?"Subscribed":"Unsubscribed");const o=s=>{var m;s.preventDefault();const l=za({site:t}),c=(m=e==null?void 0:e.newsletters)!=null&&m.length?[]:l;n("updateNewsletterPreference",{newsletters:c})};return u.jsxs("section",{children:[u.jsxs("div",{className:"gh-portal-list-detail email-newsletter",children:[u.jsx("h3",{children:v("Email newsletter")}),u.jsxs("p",{children:[r," ",ap({member:e})&&i&&u.jsx("button",{className:"gh-portal-btn-text gh-email-faq-page-button",onClick:()=>n("switchPage",{page:"emailReceivingFAQ",lastPage:"accountHome"}),children:v("Not receiving emails?")})]})]}),u.jsx("div",{children:u.jsx(Dl,{dataTestId:"default-newsletter-toggle",id:"default-newsletter-toggle",onToggle:s=>{o(s)},checked:i})})]})}const Yx=e=>C.createElement("svg",{fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",...e},C.createElement("path",{d:"m12.79 12.376 4.08 4.079m-4.08 0 4.08-4.08",stroke:"red",strokeWidth:1.35,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"m10.439 17.994-2.664-2.652-2.86 1.478.111-4.239m0 0L1.677 9.232a1.344 1.344 0 0 1-.366-1.222 1.369 1.369 0 0 1 .904-1.05l13.111-4.374a1.369 1.369 0 0 1 1.76 1.758L15 10m-9.974 2.581 11.67-9.727",stroke:"#A3A3A3",strokeWidth:1.35,strokeLinecap:"round",strokeLinejoin:"round"}));function z5(){return u.jsxs("p",{className:"gh-portal-email-notice",children:[u.jsx(Yx,{className:"gh-portal-email-notice-icon"}),u.jsx("span",{className:"gh-mobile-only",children:v("You're not receiving emails")}),u.jsx("span",{className:"gh-desktop-only",children:v("You're currently not receiving emails")})]})}function A5(){const{doAction:e,member:t,site:n}=C.useContext(H),a=Vw({member:t}),i=oo({site:n}),r=Tl({site:n}),o=a?"emailSuppressed":"accountEmail",s=!i&&!r,l=()=>a||s?u.jsx(z5,{}):u.jsx("p",{children:v("Update your preferences")});return u.jsxs("section",{children:[u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:v("Emails")}),l()]}),u.jsx("button",{className:"gh-portal-btn gh-portal-btn-list",onClick:()=>{e("switchPage",{page:o,lastPage:"accountHome"})},"data-test-button":"manage-newsletters",children:v("Manage")})]})}const N5=()=>{var o;const{member:e,site:t}=C.useContext(H),n=!!((o=t.labs)!=null&&o.transistor),a=e==null?void 0:e.uuid,[i,r]=C.useState(!1);return C.useEffect(()=>{if(!n||!a){r(!1);return}r(!1);const s=new AbortController;return(async()=>{try{const c=await fetch(`https://partner.transistor.fm/ghost/member/${a}`,{signal:s.signal});if(c.ok){const m=await c.json();s.signal.aborted||r((m==null?void 0:m.member)===!0)}}catch(c){if(s.signal.aborted)return;console.warn("Error in Transistor request",c)}})(),()=>s.abort()},[n,a]),{transistor:{enabled:n,hasPodcasts:i,memberUuid:a}}},I5=(e,t)=>lo({site:e})&&oo({site:e})||Tl({site:e})||Vw({member:t}),M5=e=>!lo({site:e})&&oo({site:e})&&!Tl({site:e}),F5=()=>{const{member:e,doAction:t,site:n}=C.useContext(H),{name:a,email:i}=e,{transistor:r}=N5(),o=()=>{t("switchPage",{page:"accountProfile",lastPage:"accountHome"})},s=I5(n,e),l=M5(n);return u.jsx("div",{children:u.jsxs("div",{className:"gh-portal-list",children:[u.jsxs("section",{children:[u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:a||v("Account")}),u.jsx("p",{children:i})]}),u.jsx("button",{"data-test-button":"edit-profile",className:"gh-portal-btn gh-portal-btn-list",onClick:c=>o(),children:v("Edit")})]}),u.jsx($5,{}),s&&u.jsx(A5,{}),l&&u.jsx(P5,{}),u.jsx(f5,{hasPodcasts:r.hasPodcasts,memberUuid:r.memberUuid})]})})},D5=()=>u.jsxs("div",{className:"gh-portal-content gh-portal-account-main",children:[u.jsx(Oe,{}),u.jsx(w5,{}),u.jsxs("section",{className:"gh-portal-account-data",children:[u.jsx(E5,{}),u.jsx(S5,{}),u.jsx(F5,{})]})]}),ah=class ah extends re.Component{componentDidMount(){const{member:t,site:n}=this.context;ea({site:n})||this.context.doAction("signout"),t||this.context.doAction("switchPage",{page:"signin",pageData:{redirect:window.location.href}})}handleSignout(t){t.preventDefault(),this.context.doAction("signout")}render(){const{member:t,site:n}=this.context,a=uo({site:n});return!t||!ea({site:n})?null:u.jsxs("div",{className:"gh-portal-account-wrapper",children:[u.jsx(D5,{}),u.jsx(v5,{onClose:()=>this.context.doAction("closePopup"),handleSignout:i=>this.handleSignout(i),supportAddress:a})]})}};ah.contextType=H;let Rp=ah;const ih=class ih extends re.Component{constructor(t,n){super(t,n);const{name:a="",email:i=""}=n.member||{};this.state={name:a,email:i}}componentDidMount(){const{member:t}=this.context;t||this.context.doAction("switchPage",{page:"signin"})}handleSignout(t){t.preventDefault(),this.context.doAction("signout")}onBack(){this.context.doAction("back")}onProfileSave(t){t.preventDefault(),this.setState(n=>({errors:Ul({fields:this.getInputFields({state:n})})}),()=>{const{email:n,name:a,errors:i}=this.state;i&&Object.values(i).filter(o=>!!o).length>0||(this.context.doAction("clearPopupNotification"),this.context.doAction("updateProfile",{email:n,name:a}))})}renderSaveButton(){const t=this.context.action==="updateProfile:running";let n=v("Save");this.context.action==="updateProfile:failed"&&(n=v("Retry"));const a=!!t;return u.jsx(ze,{dataTestId:"save-button",isRunning:t,onClick:i=>this.onProfileSave(i),disabled:a,brandColor:this.context.brandColor,label:n,style:{width:"100%"}})}renderDeleteAccountButton(){return u.jsx("div",{style:{cursor:"pointer",color:"red"},role:"button",children:v("Delete account")})}renderAccountFooter(){return u.jsx("footer",{className:"gh-portal-action-footer",children:this.renderSaveButton()})}renderHeader(){return u.jsxs("header",{className:"gh-portal-detail-header",children:[u.jsx(Mi,{brandColor:this.context.brandColor,hidden:!this.context.lastPage,onClick:t=>this.onBack(t)}),u.jsx("h3",{className:"gh-portal-main-title",children:v("Account settings")})]})}renderUserAvatar(){const t=this.context.member&&this.context.member.avatar_image,n={position:"relative",display:"flex",width:"64px",height:"64px",marginBottom:"6px",borderRadius:"100%",boxShadow:"0 0 0 3px #fff",border:"1px solid gray",overflow:"hidden",justifyContent:"center",alignItems:"center"};return u.jsx("div",{style:n,children:u.jsx(Jm,{gravatar:t,style:{userIcon:{color:"black",width:"56px",height:"56px"}}})})}handleInputChange(t,n){const a=n.name;this.setState({[a]:t.target.value})}getInputFields({state:t,fieldNames:n}){const a=t.errors||{},i=[{type:"text",value:t.name,placeholder:v("Jamie Larson"),label:v("Name"),name:"name",required:!1,errorMessage:a.name||""},{type:"email",value:t.email,placeholder:v("jamie@example.com"),label:v("Email"),name:"email",required:!0,errorMessage:a.email||""}];return n&&n.length>0?i.filter(r=>n.includes(r.name)):i}onKeyDown(t){t.keyCode===13&&this.onProfileSave(t)}renderProfileData(){return u.jsx("div",{className:"gh-portal-section",children:u.jsx(Rl,{fields:this.getInputFields({state:this.state}),onChange:(t,n)=>this.handleInputChange(t,n),onKeyDown:(t,n)=>this.onKeyDown(t,n)})})}render(){const{member:t}=this.context;return t?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"gh-portal-content with-footer",children:[u.jsx(Oe,{}),this.renderHeader(),u.jsx("div",{className:"gh-portal-section",children:this.renderProfileData()})]}),this.renderAccountFooter()]}):null}};ih.contextType=H;let Up=ih;function O5(){const{brandColor:e,lastPage:t,doAction:n}=C.useContext(H);return u.jsxs("header",{className:"gh-portal-detail-header",children:[u.jsx(Mi,{brandColor:e,hidden:!t,onClick:()=>{n("back")}}),u.jsx("h3",{className:"gh-portal-main-title",children:v("Email preferences")})]})}function _5({newsletter:e,subscribedNewsletters:t,setSubscribedNewsletters:n}){const a=t.some(i=>i.id===(e==null?void 0:e.id));return u.jsxs("section",{className:"gh-portal-list-toggle-wrapper","data-testid":"toggle-wrapper",children:[u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:e.name}),u.jsx("p",{children:e==null?void 0:e.description})]}),u.jsx("div",{style:{display:"flex",alignItems:"center"},children:u.jsx(Dl,{id:e.id,onToggle:(i,r)=>{let o=[];r?o=t.filter(s=>s.id!==e.id).concat(e):o=t.filter(s=>s.id!==e.id),n(o)},checked:a,dataTestId:"switch-input"})})]})}function R5({updateCommentNotifications:e,isCommentsEnabled:t,enableCommentNotifications:n}){const{doAction:a}=C.useContext(H),i=!!n;if(!t)return null;const r=async(o,s)=>{await e(s),a("showPopupNotification",{action:"updated:success",message:v("Comment preferences updated.")})};return u.jsxs("section",{className:"gh-portal-list-toggle-wrapper","data-testid":"toggle-wrapper",children:[u.jsxs("div",{className:"gh-portal-list-detail",children:[u.jsx("h3",{children:v("Comments")}),u.jsx("p",{children:v("Get notified when someone replies to your comment")})]}),u.jsx("div",{style:{display:"flex",alignItems:"center"},children:u.jsx(Dl,{id:"comments",onToggle:r,checked:i,dataTestId:"switch-input"})})]})}function U5({subscribedNewsletters:e,setSubscribedNewsletters:t,hasNewslettersEnabled:n}){const{site:a}=C.useContext(H),i=za({site:a});return n?i.map(r=>u.jsx(_5,{newsletter:r,subscribedNewsletters:e,setSubscribedNewsletters:t},r==null?void 0:r.id)):null}function L5({site:e,isPaid:t}){return t?u.jsx("p",{style:{textAlign:"center",marginTop:"12px",marginBottom:"0",color:"var(--grey6)"},children:v("Unsubscribing from emails will not cancel your paid subscription to {title}",{title:e==null?void 0:e.title})}):null}function Bx({hasNewslettersEnabled:e,notification:t,subscribedNewsletters:n,updateSubscribedNewsletters:a,updateCommentNotifications:i,unsubscribeAll:r,isPaidMember:o,isCommentsEnabled:s,enableCommentNotifications:l}){const{brandColor:c,doAction:m,member:f,site:p}=C.useContext(H),y=!(n!=null&&n.length)&&(s&&!l||!s),S=t||(()=>null);return u.jsxs("div",{className:"gh-portal-content with-footer",children:[u.jsx(Oe,{}),u.jsx(O5,{}),u.jsx(S,{}),u.jsx("div",{className:"gh-portal-section flex",children:u.jsxs("div",{className:"gh-portal-list",children:[u.jsx(U5,{hasNewslettersEnabled:e,subscribedNewsletters:n,setSubscribedNewsletters:b=>{let w=b.map(E=>({id:E.id}));a(w)}}),u.jsx(R5,{isCommentsEnabled:s,enableCommentNotifications:l,updateCommentNotifications:i})]})}),u.jsx("div",{className:"gh-portal-btn-product gh-portal-btn-unsubscribe",style:{marginTop:"-48px",marginBottom:0},children:u.jsx(ze,{isRunning:!1,onClick:()=>{r()},disabled:y,brandColor:c,isPrimary:!1,label:v("Unsubscribe from all emails"),isDestructive:!0,style:{width:"100%",zIndex:900},dataTestId:"unsubscribe-from-all-emails"})}),u.jsxs("footer",{className:"gh-portal-action-footer"+(ap({member:f})?" gh-feature-suppressions":""),children:[u.jsx("div",{style:{width:"100%"},children:u.jsx(L5,{isPaid:o,site:p,subscribedNewsletters:n})}),ap({member:f})&&!y&&u.jsxs("div",{className:"gh-portal-footer-secondary",children:[u.jsx("span",{className:"gh-portal-footer-secondary-light",children:v("Not receiving emails?")}),u.jsxs("button",{className:"gh-portal-btn-text gh-email-faq-page-button",onClick:()=>m("switchPage",{page:"emailReceivingFAQ",pageData:{direct:!1}}),children:[v("Get help")," ",u.jsx("span",{className:"right-arrow",children:"→"})]})]})]})]})}function Y5(){const{member:e,doAction:t,site:n,pageData:a}=C.useContext(H);let i,r;a&&(i=a.newsletterUuid,r=a.action);const[o,s]=C.useState(!0),l=za({site:n}),c=oo({site:n});C.useEffect(()=>{e||t("switchPage",{page:"signin"})},[e,t]),C.useEffect(()=>{if(i&&r==="unsubscribe"){const b=e==null?void 0:e.newsletters.filter(w=>w.uuid!==i);y(b),s(!1),t("updateNewsletterPreference",{newsletters:b})}},[]);const m=()=>{if(a.comments&&k){const E=o?"gh-portal-hide":"";return u.jsx(u.Fragment,{children:u.jsx("p",{className:`gh-portal-text-center gh-portal-header-message ${E}`,children:u.jsx(ut,{string:v("{memberEmail} will no longer receive emails when someone replies to your comments."),mapping:{memberEmail:u.jsx("strong",{children:e==null?void 0:e.email})}})})})}const b=l==null?void 0:l.find(E=>E.uuid===a.newsletterUuid);if(!b)return null;const w=o?"gh-portal-hide":"";return u.jsx(u.Fragment,{children:u.jsx("p",{className:`gh-portal-text-center gh-portal-header-message ${w}`,children:u.jsx(ut,{string:v("{memberEmail} will no longer receive {newsletterName} newsletter."),mapping:{memberEmail:u.jsx("strong",{children:e==null?void 0:e.email}),newsletterName:u.jsx("strong",{children:b==null?void 0:b.name})}})})})},f=[...(e==null?void 0:e.newsletters)||[]],[p,y]=C.useState(f),{comments_enabled:k}=n,{enable_comment_notifications:S}=e||{};return C.useEffect(()=>{y((e==null?void 0:e.newsletters)||[])},[e==null?void 0:e.newsletters]),u.jsx(Bx,{hasNewslettersEnabled:c,notification:i?m:null,subscribedNewsletters:p,updateSubscribedNewsletters:b=>{y(b),t("updateNewsletterPreference",{newsletters:b}),t("showPopupNotification",{action:"updated:success",message:v("Email preferences updated.")})},updateCommentNotifications:async b=>{t("updateNewsletterPreference",{enableCommentNotifications:b})},unsubscribeAll:()=>{y([]),t("showPopupNotification",{action:"updated:success",message:v("Unsubscribed from all emails.")});const b={newsletters:[]};k&&(b.enableCommentNotifications=!1),t("updateNewsletterPreference",b)},isPaidMember:rn({member:e}),isCommentsEnabled:k!=="off",enableCommentNotifications:S})}function B5(){const{site:e}=C.useContext(H),t=e.icon;return t?u.jsx("img",{className:"gh-portal-unsubscribe-logo",src:t,alt:e.title}):null}function V5(){const{site:e}=C.useContext(H),t=e.title||"";return u.jsxs("header",{className:"gh-portal-header",children:[u.jsx(B5,{}),u.jsx("h2",{className:"gh-portal-publication-title",children:t})]})}async function Vx({api:e,memberUuid:t,key:n,newsletters:a,enableCommentNotifications:i}){try{return await e.member.updateNewsletters({uuid:t,key:n,newsletters:a,enableCommentNotifications:i})}catch{}}function H5(){const{site:e,api:t,pageData:n,member:a,doAction:i}=C.useContext(H),[r,o]=C.useState(),[s,l]=C.useState(!0),c=za({site:e}),m=c.filter(_=>_.subscribe_on_signup),[f,p]=C.useState(!1),[y,k]=C.useState(m),[S,b]=C.useState(!1),{comments_enabled:w}=e,{enable_comment_notifications:E=!1}=r||{},P=oo({site:e}),j=async _=>{a?i("updateNewsletterPreference",{newsletters:_}):await Vx({api:t,memberUuid:n.uuid,key:n.key,newsletters:_}),k(_);const D={action:"updated:success",message:v("Email preferences updated.")};i("showPopupNotification",D)},F=async _=>{let D;a?(await i("updateNewsletterPreference",{enableCommentNotifications:_}),D={...a,enable_comment_notifications:_}):D=await Vx({api:t,memberUuid:n.uuid,key:n.key,enableCommentNotifications:_}),o(D),i("showPopupNotification",{action:"updated:success",message:v("Comment preferences updated.")})},z=async()=>{let _;a?(await i("updateNewsletterPreference",{newsletters:[],enableCommentNotifications:!1}),_={...a},_.newsletters=[],_.enable_comment_notifications=!1):_=await t.member.updateNewsletters({uuid:n.uuid,key:n.key,newsletters:[],enableCommentNotifications:!1}),k([]),o(_),i("showPopupNotification",{action:"updated:success",message:v("Unsubscribed from all emails.")})};if(C.useEffect(()=>{(async()=>{let _;try{_=await t.member.newsletters({uuid:n.uuid,key:n.key}),o(_??null),l(!1)}catch(X){console.error("[PORTAL] Error fetching member newsletters",X),o(null),l(!1);return}if(_===null)return;const D=(_==null?void 0:_.newsletters)||[];k(D),(c==null?void 0:c.length)===1&&!w&&!n.newsletterUuid?await j([]):n.newsletterUuid?await j(D==null?void 0:D.filter(X=>X.uuid!==n.newsletterUuid)):n.comments&&w&&await F(!1)})()},[w,n.uuid,n.newsletterUuid,n.comments,e.url,c==null?void 0:c.length]),s)return u.jsx(ko,{});if(!r)return u.jsxs("div",{className:"gh-portal-content gh-portal-feedback with-footer",children:[u.jsx(Oe,{}),u.jsx("div",{className:"gh-feedback-icon gh-feedback-icon-error",children:u.jsx(cp,{})}),u.jsx("h1",{className:"gh-portal-main-title",children:v("That didn't go to plan")}),u.jsx("div",{children:u.jsx("p",{className:"gh-portal-text-center",children:v("We couldn't unsubscribe you as the email address was not found. Please contact the site owner.")})}),u.jsx(ze,{style:{width:"100%"},retry:!1,onClick:()=>i("closePopup"),disabled:!1,brandColor:"#000000",label:v("Close"),isRunning:!1,tabIndex:3,classes:"sticky bottom"})]});if((c==null?void 0:c.length)===1&&!w&&!S)return u.jsxs("div",{className:"gh-portal-content gh-portal-unsubscribe with-footer",children:[u.jsx(Oe,{}),u.jsx(V5,{}),u.jsx("h1",{className:"gh-portal-main-title",children:v("Successfully unsubscribed")}),u.jsxs("div",{children:[u.jsx("p",{className:"gh-portal-text-center",children:u.jsx(ut,{string:v("{memberEmail} will no longer receive this newsletter."),mapping:{memberEmail:u.jsx("strong",{children:r==null?void 0:r.email})}})}),u.jsx("p",{className:"gh-portal-text-center",children:u.jsx(ut,{string:v("Didn't mean to do this? Manage your preferences <button>here</button>."),mapping:{button:u.jsx("button",{className:"gh-portal-btn-link gh-portal-btn-branded gh-portal-btn-inline",onClick:()=>{b(!0)}})}})})]})]});const R=()=>{if(n.comments&&w){const X=f?"gh-portal-hide":"";return u.jsx(u.Fragment,{children:u.jsx("p",{className:`gh-portal-text-center gh-portal-header-message ${X}`,children:u.jsx(ut,{string:v("{memberEmail} will no longer receive emails when someone replies to your comments."),mapping:{memberEmail:u.jsx("strong",{children:r==null?void 0:r.email})}})})})}const _=c==null?void 0:c.find(X=>X.uuid===n.newsletterUuid);if(!_)return null;const D=f?"gh-portal-hide":"";return u.jsx(u.Fragment,{children:u.jsx("p",{className:`gh-portal-text-center gh-portal-header-message ${D}`,children:u.jsx(ut,{string:v("{memberEmail} will no longer receive {newsletterName} newsletter."),mapping:{memberEmail:u.jsx("strong",{children:r==null?void 0:r.email}),newsletterName:u.jsx("strong",{children:_==null?void 0:_.name})}})})})};return u.jsx(Bx,{hasNewslettersEnabled:P,notification:R,subscribedNewsletters:y,updateSubscribedNewsletters:async _=>{await j(_),p(!0)},updateCommentNotifications:F,unsubscribeAll:async()=>{await z(),p(!0)},isPaidMember:(r==null?void 0:r.status)!=="free",isCommentsEnabled:w!=="off",enableCommentNotifications:E})}function W5(){const{brandColor:e,lastPage:t,doAction:n,action:a,site:i}=C.useContext(H);C.useEffect(()=>{["removeEmailFromSuppressionList:success"].includes(a)&&n("refreshMemberData"),["removeEmailFromSuppressionList:failed","refreshMemberData:failed"].includes(a)&&n("back"),["refreshMemberData:success"].includes(a)&&(lo({site:i})||Tl({site:i})?(n("switchPage",{page:"accountEmail",lastPage:"accountHome"}),n("showPopupNotification",{message:v("You have been successfully resubscribed")})):n("back"))},[a,n,i,v]);const r=["removeEmailFromSuppressionList:running","refreshMemberData:running"].includes(a),o=()=>{n("removeEmailFromSuppressionList")};return u.jsxs("div",{className:"gh-email-suppressed-page",children:[u.jsxs("header",{className:"gh-portal-detail-header",children:[u.jsx(Mi,{brandColor:e,hidden:!t,onClick:()=>{n("back")}}),u.jsx(Oe,{})]}),u.jsx(Yx,{className:"gh-email-suppressed-page-icon"}),u.jsxs("div",{className:"gh-email-suppressed-page-text",children:[u.jsx("h3",{className:"gh-portal-main-title gh-email-suppressed-page-title",children:v("Emails disabled")}),u.jsx("p",{children:v("You're not receiving emails because you either marked a recent message as spam, or because messages could not be delivered to your provided email address.")})]}),u.jsx(ze,{dataTestId:"resubscribe-email",classes:"gh-portal-confirm-button",onClick:o,disabled:r,brandColor:e,label:v("Re-enable emails"),isRunning:r})]})}function G5(){const{brandColor:e,doAction:t,site:n,pageData:a}=C.useContext(H),i=`mailto:${uo({site:n})}`,r=a&&a.direct||!1;return u.jsxs("div",{className:"gh-email-suppression-faq",children:[!r&&u.jsxs("header",{className:"gh-portal-detail-header",children:[u.jsx(Mi,{brandColor:e,onClick:()=>{t("switchPage",{page:"emailSuppressed",lastPage:"accountHome"})}}),u.jsx(Oe,{})]}),u.jsxs("div",{className:"gh-longform",children:[u.jsx("h3",{children:v("Why has my email been disabled?")}),u.jsx("p",{children:v("Newsletters can be disabled on your account for two reasons: A previous email was marked as spam, or attempting to send an email resulted in a permanent failure (bounce).")}),u.jsx("h4",{children:v("Spam complaints")}),u.jsx("p",{children:v("If a newsletter is flagged as spam, emails are automatically disabled for that address to make sure you no longer receive any unwanted messages.")}),u.jsx("p",{children:v("If the spam complaint was accidental, or you would like to begin receiving emails again, you can resubscribe to emails by clicking the button on the previous screen.")}),u.jsx("p",{children:v("Once resubscribed, if you still don't see emails in your inbox, check your spam folder. Some inbox providers keep a record of previous spam complaints and will continue to flag emails. If this happens, mark the latest newsletter as 'Not spam' to move it back to your primary inbox.")}),u.jsx("h4",{children:v("Permanent failure (bounce)")}),u.jsx("p",{children:v("When an inbox fails to accept an email it is commonly called a bounce. In many cases, this can be temporary. However, in some cases, a bounced email can be returned as a permanent failure when an email address is invalid or non-existent.")}),u.jsx("p",{children:v("In the event a permanent failure is received when attempting to send a newsletter, emails will be disabled on the account.")}),u.jsx("p",{children:v("If you would like to start receiving emails again, the best next steps are to check your email address on file for any issues and then click resubscribe on the previous screen.")}),u.jsx("p",{children:u.jsx("a",{className:"gh-portal-btn gh-portal-btn-branded no-margin-right",href:i,onClick:()=>{i&&window.open(i)},children:v("Need more help? Contact support")})})]})]})}function K5(){const{brandColor:e,doAction:t,site:n,lastPage:a,member:i,pageData:r}=C.useContext(H),o=uo({site:n}),s=`mailto:${o}`,l=YU({site:n}),c=r&&r.direct||!1;return u.jsxs("div",{className:"gh-email-receiving-faq",children:[u.jsxs("header",{className:"gh-portal-detail-header",children:[!c&&u.jsx(Mi,{brandColor:e,onClick:()=>{a?t("switchPage",{page:"accountHome"}):t("switchPage",{page:"accountEmail",lastPage:"accountHome"})}}),u.jsx(Oe,{})]}),u.jsxs("div",{className:"gh-longform",children:[u.jsx("h3",{children:v("Help! I'm not receiving emails")}),u.jsx("p",{children:v("If you're not receiving the email newsletter you've subscribed to, here are a few things to check.")}),u.jsx("h4",{children:v("Verify your email address is correct")}),u.jsx("p",{children:u.jsx(ut,{string:v("The email address we have for you is {memberEmail} — if that's not correct, you can update it in your <button>account settings area</button>."),mapping:{memberEmail:u.jsx("strong",{children:i.email}),button:u.jsx("button",{className:"gh-portal-btn-text",onClick:()=>t("switchPage",{lastPage:"emailReceivingFAQ",page:"accountProfile"})})}})}),u.jsx("h4",{children:v("Check spam & promotions folders")}),u.jsx("p",{children:v(`Make sure emails aren't accidentally ending up in the Spam or Promotions folders of your inbox. If they are, click on "Mark as not spam" and/or "Move to inbox".`)}),u.jsx("h4",{children:v("Create a new contact")}),u.jsx("p",{children:u.jsx(ut,{string:v("In your email client add {senderEmail} to your contacts list. This signals to your mail provider that emails sent from this address should be trusted."),mapping:{senderEmail:u.jsx("strong",{children:l})}})}),u.jsx("h4",{children:v("Send an email and say hi!")}),u.jsx("p",{children:u.jsx(ut,{string:v("Send an email to {senderEmail} and say hello. This can also help signal to your mail provider that emails to and from this address should be trusted."),mapping:{senderEmail:u.jsx("strong",{children:l})}})}),u.jsx("h4",{children:v("Check with your mail provider")}),u.jsx("p",{children:u.jsx(ut,{string:v("If you have a corporate or government email account, reach out to your IT department and ask them to allow emails to be received from {senderEmail}"),mapping:{senderEmail:u.jsx("strong",{children:l})}})}),u.jsx("h4",{children:v("Get in touch for help")}),u.jsx("p",{children:u.jsx(ut,{string:v("If you've completed all these checks and you're still not receiving emails, you can reach out to get support by contacting {supportAddress}."),mapping:{supportAddress:u.jsx("a",{href:s,onClick:()=>{s&&window.open(s)},children:o})}})})]})]})}const Lp={signin:_p,signup:Ip,accountHome:Rp,accountPlan:wp,accountProfile:Up,accountEmail:Y5,signupNewsletter:Ep,unsubscribe:H5,magiclink:Mp,loading:ko,offer:Dp,feedback:Q6,emailSuppressed:W5,emailSuppressionFAQ:G5,emailReceivingFAQ:K5,support:()=>{const[e,t]=C.useState(!0),[n,a]=C.useState(null),[i,r]=C.useState(null),{member:o,site:s}=C.useContext(H);return C.useEffect(()=>{async function l(){const c=s.url,m=window.location.origin+window.location.pathname,f=o?`${m}?action=support&success=true`:`${m}#/portal/support/success`,p=m,y=Hl({siteUrl:c});try{const k=await y.member.checkoutDonation({successUrl:f,cancelUrl:p,personalNote:v("Add a personal note")});k.url&&window.location.replace(k.url)}catch(k){k.type&&k.type==="DisabledFeatureError"?r(v("This site is not accepting payments at the moment.")):a(v("Something went wrong, please try again later.")),t(!1)}}s&&s.donations_enabled===!1?(r(v("This site is not accepting donations at the moment.")),t(!1)):l()},[]),e?u.jsx("div",{children:u.jsx(ko,{})}):n?u.jsx(Op,{error:n}):i?u.jsx(Op,{error:i}):null},supportSuccess:r5,supportError:Op,recommendations:p5},Yp=function({page:e}){return Object.keys(Lp).includes(e)?e:"signup"},q5=function({page:e}){return e.includes("account")},J5=function({page:e}){return e.includes("offer")},Z5=e=>C.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12ZM11.8326 2.33879C6.37785 2.95189 3.95901 5.20797 3.41126 9.74699C3.34896 10.2632 3.22642 10.7805 3.10443 11.2954C2.93277 12.02 2.76221 12.74 2.76221 13.4458C2.76221 17.9885 6.5856 21.556 11.1283 21.556C12.8959 21.556 14.4433 20.8144 15.8756 20.048C19.0536 18.3478 22.0328 16.2597 22.0328 12.5411C22.0328 9.91512 20.1051 7.56932 18.466 5.5747C18.3834 5.47416 18.3015 5.37451 18.2206 5.27577C17.3866 4.25742 14.4333 2.04643 11.8326 2.33879Z",fill:"#15171A"})),rh=class rh extends re.Component{render(){return u.jsxs("a",{href:"https://ghost.org",target:"_blank",rel:"noopener noreferrer",onClick:()=>{window.open("https://ghost.org","_blank")},children:[u.jsx(Z5,{}),"Powered by Ghost"]})}};rh.contextType=H;let Wl=rh;const Hx=()=>({modalContainer:{zIndex:"3999999",position:"fixed",left:"0",top:"0",width:"100%",height:"100%",overflow:"hidden"},frame:{common:{margin:"auto",position:"relative",padding:"0",outline:"0",width:"100%",opacity:"1",overflow:"hidden",height:"100%"}},page:{links:{width:"600px"}}});function X5({message:e}){return Ai()?u.jsx("div",{className:"gh-portal-cookiebanner",children:e}):null}const oh=class oh extends re.Component{componentDidMount(){this.node&&!$e(["preview"])&&!this.props.isMobile&&(this.node.focus(),this.keyUphandler=t=>{t.key==="Escape"&&this.dismissPopup(t)},this.node.ownerDocument.removeEventListener("keyup",this.keyUphandler),this.node.ownerDocument.addEventListener("keyup",this.keyUphandler)),this.sendContainerHeightChangeEvent()}dismissPopup(t){var i;const n=t.target&&t.target.tagName;(n!=="INPUT"||n==="INPUT"&&!((i=t==null?void 0:t.target)!=null&&i.value))&&this.context.doAction("closePopup")}sendContainerHeightChangeEvent(){var t,n;this.node&&$e(["preview"])&&((t=this.node)==null?void 0:t.clientHeight)!==this.lastContainerHeight&&(this.lastContainerHeight=(n=this.node)==null?void 0:n.clientHeight,window.document.body.style.overflow="hidden",window.document.body.style["scrollbar-width"]="none",window.parent.postMessage({type:"portal-preview-updated",payload:{height:this.lastContainerHeight}},"*"))}componentDidUpdate(){this.sendContainerHeightChangeEvent()}componentWillUnmount(){this.node&&this.node.ownerDocument.removeEventListener("keyup",this.keyUphandler)}handlePopupClose(t){const{page:n,otcRef:a}=this.context;$e(["preview"])||a&&n==="magiclink"||t.target===t.currentTarget&&this.context.doAction("closePopup")}renderActivePage(){const{page:t}=this.context;Yp({page:t});const n=Lp[t];return u.jsx(n,{})}renderPopupNotification(){const{popupNotification:t}=this.context;return!t||!t.type?null:u.jsx(Fp,{})}sendPortalPreviewReadyEvent(){window.self!==window.parent&&window.parent.postMessage({type:"portal-preview-ready",payload:{}},"*")}render(){const{page:t,pageQuery:n,site:a,customSiteUrl:i}=this.context,o=Al({site:a,pageQuery:n}).length;Yp({page:t});const l={...Hx().page[t]};let c="",m="regular",f="",p=t;switch(t){case"signup":f="Cookies must be enabled in your browser to sign up.";break;case"signin":f="Cookies must be enabled in your browser to sign in.";break;case"accountHome":p="account-home";break;case"accountProfile":p="account-profile";break;case"accountPlan":p="account-plan";break;default:f="Cookies must be enabled in your browser.",p=t;break}o>1&&!Vt({site:a})&&Sn({site:a,pageQuery:n})&&t==="signup"&&(p+=" full-size",m="full");const y=so({site:a});(y&&o>2||!y&&o>1)&&t==="accountPlan"&&(p+=" full-size",m="full"),(t==="emailSuppressionFAQ"||t==="emailReceivingFAQ")&&(p+=" large-size");let k="gh-portal-popup-container";$e(["preview"])&&(p+=" preview"),$e(["preview"],{customSiteUrl:i})&&!a.disableBackground&&(k+=" preview"),$e(["dev"])&&(k+=" dev");const S=`${k} ${c} ${p}`;return this.sendPortalPreviewReadyEvent(),u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"gh-portal-popup-wrapper "+p,onClick:b=>this.handlePopupClose(b),children:[this.renderPopupNotification(),u.jsxs("div",{className:S,style:l,ref:b=>this.node=b,tabIndex:-1,children:[u.jsx(X5,{message:f}),this.renderActivePage(),m==="full"?u.jsx("div",{className:"gh-portal-powered inside "+($e(["preview"])?"hidden ":"")+p,children:u.jsx(Wl,{})}):""]})]}),u.jsx("div",{className:"gh-portal-powered outside "+($e(["preview"])?"hidden ":"")+p,children:u.jsx(Wl,{})})]})}};oh.contextType=H;let Bp=oh;const sh=class sh extends re.Component{constructor(t){super(t),this.state={height:null}}renderCurrentPage(t){const n=Lp[t];return u.jsx(n,{})}onHeightChange(t){this.setState({height:t})}handlePopupClose(t){t.preventDefault(),t.target===t.currentTarget&&this.context.doAction("closePopup")}renderFrameStyles(){const{site:t,brandColor:n}=this.context,a=k5({site:t}),i=n?`:root { --brandcolor: ${n} }`+a:a;return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:i}}),u.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"})]})}renderFrameContainer(){const{member:t,site:n,customSiteUrl:a}=this.context,i=Hx(),r=window.innerWidth<480,o={...i.frame.common};let s="gh-portal-popup-background";return $e(["preview"])&&(i.modalContainer.zIndex="3999997"),$e(["preview"],{customSiteUrl:a})&&!n.disableBackground&&(s+=" preview"),$e(["dev"])&&(s+=" dev"),u.jsx("div",{style:i.modalContainer,children:u.jsxs(Km,{style:o,title:"portal-popup",head:this.renderFrameStyles(),dataTestId:"portal-popup-frame",dataDir:this.context.dir,children:[u.jsx("div",{className:s,onClick:l=>this.handlePopupClose(l)}),u.jsx(Bp,{isMobile:r})]})})}render(){const{showPopup:t}=this.context;return t?this.renderFrameContainer():null}};sh.contextType=H;let Vp=sh;Gl({products:Hp({numOfProducts:1})});function at(){return(new Date().getTime()/1e3|0).toString(16)+"xxxxxxxxxxxxxxxx".replace(/[x]/g,function(){return(Math.random()*16|0).toString(16)}).toLowerCase()}function Q5(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function Gl({title:e="The Blueprint",description:t="Thoughts, stories and ideas.",logo:n="https://static.ghost.org/v4.0.0/images/ghost-orb-1.png",icon:a="https://static.ghost.org/v4.0.0/images/ghost-orb-1.png",url:i="https://portal.localhost",plans:r={monthly:5e3,yearly:15e4,currency:"USD"},products:o=Hp({numOfProducts:1}),portalProducts:s=o.map(X=>X.id),accentColor:l="#45C32E",portalPlans:c=["free","monthly","yearly"],membersSignupAccess:m="all",freePriceName:f="Free",freePriceDescription:p="Free preview",isStripeConfigured:y=!0,portalButton:k=!0,portalName:S=!0,portalButtonIcon:b="icon-1",portalButtonSignupText:w="Subscribe now",portalButtonStyle:E="icon-and-text",membersSupportAddress:P="support@example.com",editorDefaultEmailRecipients:j="visibility",newsletters:F=[],posts:z=e8(),commentsEnabled:R,recommendations:_=[],recommendationsEnabled:D}={}){return{title:e,description:t,logo:n,icon:a,accent_color:l,url:i,plans:r,products:o,portal_products:s,members_signup_access:m,free_price_name:f,free_price_description:p,is_stripe_configured:y,portal_button:k,portal_name:S,portal_plans:c,portal_button_icon:b,portal_button_signup_text:w,portal_button_style:E,members_support_address:P,comments_enabled:R!=="off",newsletters:F,recommendations:_,recommendations_enabled:!!D,editor_default_email_recipients:j,posts:z}}function Wx({name:e="Black Friday",code:t="black-friday",displayTitle:n="Black Friday Sale!",displayDescription:a="Special deal for Black Friday. Subscribe now for only $15 per month and get additional benefits like accessing our podcast.",type:i="percent",cadence:r="month",amount:o=50,duration:s="repeating",durationInMonths:l=null,currencyRestriction:c=!1,currency:m=null,status:f="active",tierId:p="",tierName:y="Basic",redemptionType:k="signup"}={}){return{id:`offer_${at()}`,name:e,code:t,display_title:n,display_description:a,type:i,cadence:r,amount:o,duration:s,duration_in_months:l,currency_restriction:c,currency:m,status:f,tier:{id:`${p}`,name:y},redemption_type:k}}function Wt({name:e="Jamie Larson",email:t="jamie@example.com",firstname:n="Jamie",subscriptions:a=[],paid:i=!1,avatarImage:r="",subscribed:o=!0,email_suppression:s={suppressed:!1,info:null},newsletters:l=[]}={}){return{uuid:Q5(),email:t,name:e,firstname:n,paid:i,subscribed:o,avatar_image:r,subscriptions:a,email_suppression:s,newsletters:l}}function e8({numOfPosts:e=3}={}){const t=[];for(let n=0;n<e;n++)t.push(t8({title:`Post ${n+1}`,slug:`post-${n+1}`}));return t.slice(0,e)}function t8({id:e=`post_${at()}`,title:t="Post",excerpt:n="Post excerpt",slug:a="post",featured:i=!1}={}){return{id:e,title:t,excerpt:n,slug:a,featured:i}}function Hp({numOfProducts:e=3}={}){const n=[Oi({name:"Bronze",description:"Access to all members articles",monthlyPrice:Ot({interval:"month",amount:700}),yearlyPrice:Ot({interval:"year",amount:7e3}),numOfBenefits:2}),Oi({name:"Silver",description:"Access to all members articles and weekly podcast",monthlyPrice:Ot({interval:"month",amount:1200}),yearlyPrice:Ot({interval:"year",amount:12e3}),numOfBenefits:3}),Oi({name:"Friends of the Blueprint",description:"Get access to everything and lock in early adopter pricing for life + listen to my podcast",monthlyPrice:Ot({interval:"month",amount:18e3}),yearlyPrice:Ot({interval:"year",amount:17e3}),numOfBenefits:4})].slice(0,e),a=Gx({});return[...n,a]}function Oi({type:e="paid",name:t="Basic",description:n="",id:a=`product_${at()}`,monthlyPrice:i=Ot(),yearlyPrice:r=Ot({interval:"year"}),numOfBenefits:o=2,trialDays:s=null}){return{id:a,name:t,description:n,monthlyPrice:e==="free"?null:i,yearlyPrice:e==="free"?null:r,type:e,benefits:Kx({numOfBenefits:o}),trial_days:s}}function Gx({name:e="Free tier",description:t="Free tier description",id:n=`product_${at()}`,numOfBenefits:a=2}){return{id:n,name:e,type:"free",description:t,benefits:Kx({numOfBenefits:a})}}function Kx({numOfBenefits:e}){const t=at();return[Kl({name:`Limited early adopter pricing #${t.substring(0,6)}`}),Kl({name:`Latest gear reviews #${t.substring(6,12)}`}),Kl({name:`Weekly email newsletter #${t.substring(12,18)}`}),Kl({name:`Listen to my podcast #${t.substring(18)}`})].slice(0,e)}function Kl({id:e=`benefit_${at()}`,name:t="Benefit"}){return{id:e,name:t}}function Ot({interval:e="month",amount:t=e==="month"?500:5e3,nickname:n=e==="month"?"Monthly":"Yearly",description:a=null,currency:i="usd",active:r=!0,id:o=`price_${at()}`}={}){return{id:o,active:r,nickname:n,currency:i,amount:t,interval:e,description:a,stripe_price_id:`price_${at()}`,stripe_product_id:`prod_${at()}`,type:"recurring"}}function Na({id:e=`sub_${at()}`,status:t="active",currency:n="USD",interval:a="year",amount:i=a==="month"?500:5e3,nickname:r=a==="month"?"Monthly":"Yearly",cardLast4:o="4242",offer:s=a8,priceId:l=`price_${at()}`,startDate:c="2021-10-05T03:18:30.000Z",currentPeriodEnd:m="2022-10-05T03:18:30.000Z",cancelAtPeriodEnd:f=!1,trialEndAt:p=null,nextPayment:y=null,tier:k=null}={}){return{id:e,customer:{id:`cus_${at()}`,name:"Jamie",email:"jamie@example.com"},plan:{id:`price_${at()}`,nickname:r,amount:i,interval:a,currency:n},offer:s,status:t,start_date:c,default_payment_card_last4:o,cancel_at_period_end:f,cancellation_reason:null,current_period_end:m,trial_end_at:p,next_payment:y,tier:k,price:{id:`stripe_price_${at()}`,price_id:l,nickname:r,amount:i,interval:a,type:"recurring",currency:n,product:{id:`stripe_prod_${at()}`,product_id:`prod_${at()}`}}}}function qx(){const e=Hp({numOfProducts:1}),t=e.map(a=>a.id);return Gl({products:e,portalPlans:["free","monthly","yearly"],portalProducts:t})}qx();const n8=Gl({products:[Oi({numOfBenefits:2,type:"free"})]}),a8=Wx({tierId:(eE=n8.products[0])==null?void 0:eE.id});Wt(),Wt({paid:!0,subscriptions:[Na()]}),Wt({paid:!0,subscriptions:[]}),Wt({paid:!0,subscriptions:[Na({amount:0})]}),Wt({paid:!0,subscriptions:[Na({amount:1500,startDate:"2019-05-01T11:42:40.000Z",currentPeriodEnd:"2021-06-05T11:42:40.000Z"})]}),qx();const ql=[Gx({name:"Free",description:"Free tier description which is actually a pretty long description",numOfBenefits:2}),Oi({name:"The Blueprint",description:"",monthlyPrice:Ot({interval:"month",amount:500}),yearlyPrice:Ot({interval:"year",amount:5e3}),numOfBenefits:3}),Oi({name:"Friends of the Blueprint Silver",description:"Access to all members articles and weekly podcast",monthlyPrice:Ot({interval:"month",amount:1200}),yearlyPrice:Ot({interval:"year",amount:11e3}),numOfBenefits:4})],_i=Gl({title:"The Blueprint",description:"Thoughts, stories and ideas.",logo:"https://static.ghost.org/v4.0.0/images/ghost-orb-1.png",icon:"https://static.ghost.org/v4.0.0/images/ghost-orb-1.png",accentColor:"#45C32E",url:"https://portal.localhost",plans:{monthly:5e3,yearly:15e4,currency:"USD"},products:ql,portalProducts:ql.map(e=>e.id),membersSignupAccess:"all",freePriceName:"Free",freePriceDescription:"Free preview",isStripeConfigured:!0,portalButton:!0,portalName:!0,portalPlans:["free","monthly","yearly"],portalButtonIcon:"icon-1",portalButtonSignupText:"Subscribe now",portalButtonStyle:"icon-and-text",membersSupportAddress:"support@example.com",commentsEnabled:!0,newsletters:[{id:"weekly",name:"Weekly Rundown",description:"Best of last week",subscribe_on_signup:!0,paid:!0},{id:"daily",name:"Daily Brief",description:"One email every day",subscribe_on_signup:!1,paid:!1}],posts:[{id:"post_66aacfe061c94e10eb6e4fc1",title:"Post 1",excerpt:"Post excerpt",slug:"post-1",featured:!1},{id:"post_66aacfe04f14b8dbb56c5721",title:"Post 2",excerpt:"Post excerpt",slug:"post-2",featured:!1},{id:"post_66aacfe03d609460819af18c",title:"Post 3",excerpt:"Post excerpt",slug:"post-3",featured:!1}]}),Jx=Wx({tierId:(tE=_i.products[1])==null?void 0:tE.id}),Jl={free:Wt({name:"Jamie Larson",email:"jamie@example.com",firstname:"Jamie",subscriptions:[],paid:!1,avatarImage:"",subscribed:!0}),paid:Wt({paid:!0,subscriptions:[Na({status:"active",currency:"USD",interval:"year",amount:5e3,cardLast4:"4242",startDate:"2021-10-05T03:18:30.000Z",currentPeriodEnd:"2022-10-05T03:18:30.000Z",cancelAtPeriodEnd:!1})]}),complimentary:Wt({paid:!0,subscriptions:[]}),complimentaryWithSubscription:Wt({paid:!0,subscriptions:[Na({amount:0})]}),preview:Wt({paid:!0,subscriptions:[Na({amount:1500,startDate:"2019-05-01T11:42:40.000Z",currentPeriodEnd:"2021-06-05T11:42:40.000Z"})]})};function i8(){var n;if(!ql||!ql[1])return null;let e=(n=_i==null?void 0:_i.products)==null?void 0:n[1].monthlyPrice,t=Wt({paid:!0,subscriptions:[Na({offer:null,priceId:e==null?void 0:e.id,status:"active",currency:e==null?void 0:e.currency,interval:e==null?void 0:e.interval,amount:e==null?void 0:e.amount,cardLast4:"4242",startDate:"2021-10-05T03:18:30.000Z",currentPeriodEnd:"2022-10-05T03:18:30.000Z",cancelAtPeriodEnd:!1})]});return{site:_i,member:t}}function r8(e){const t=e.getAttribute("href"),n=new URL(t,window.location.origin);!n.hash||!n.hash.startsWith("#/portal")||t.startsWith("#/portal")||n.origin===window.location.origin&&e.setAttribute("href",n.hash)}function o8({data:e,state:t}){return{page:e.page,popupNotification:null,lastPage:e.lastPage||null,pageData:e.pageData||t.pageData}}function s8({state:e}){return{showPopup:!e.showPopup}}function l8({data:e}){return{showPopup:!0,page:e.page,...e.pageQuery?{pageQuery:e.pageQuery}:{},...e.pageData?{pageData:e.pageData}:{}}}function u8({state:e}){return e.lastPage?{page:e.lastPage}:Zx({state:e})}function Zx({state:e}){return Xm(),{showPopup:!1,lastPage:null,pageQuery:"",popupNotification:null,page:e.page==="magiclink"?"":e.page}}function c8({data:e}){return{showNotification:!0,...e}}function d8(){return{showNotification:!1}}async function m8({api:e,state:t}){try{return await e.member.signout(),{action:"signout:success"}}catch{return{action:"signout:failed",popupNotification:Ee({type:"signout:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:v("Failed to log out, please try again")})}}}async function p8({data:e,api:t,state:n}){try{const a=await t.member.getIntegrityToken(),i={...e,emailType:"signin",integrityToken:a,includeOTC:!0},{otc_ref:r,inboxLinks:o}=await t.member.sendMagicLink(i);return{page:"magiclink",lastPage:"signin",...r?{otcRef:r}:{},inboxLinks:o,pageData:{...n.pageData||{},email:((e==null?void 0:e.email)||"").trim()}}}catch(a){return{action:"signin:failed",popupNotification:Ee({type:"signin:failed",autoHide:!1,closeable:!0,state:n,status:"error",message:xn(a,v("Failed to log in, please try again"))})}}}function h8({data:e,state:t}){const n=((e==null?void 0:e.email)||"").trim(),a=e==null?void 0:e.otcRef,i=e==null?void 0:e.inboxLinks;return a?{showPopup:!0,page:"magiclink",lastPage:"signin",otcRef:a,inboxLinks:i,pageData:{...t.pageData||{},email:n},popupNotification:null}:{}}async function f8({data:e,api:t}){var a;const n=v("Failed to verify code, please try again");try{const i=await t.member.getIntegrityToken(),r=await t.member.verifyOTC({...e,integrityToken:i});return r.redirectUrl?window.location.assign(r.redirectUrl):{action:"verifyOTC:failed",actionErrorMessage:xn((a=r.errors)==null?void 0:a[0],n)}}catch(i){return{action:"verifyOTC:failed",actionErrorMessage:xn(i,n)}}}async function g8({data:e,state:t,api:n}){try{let{plan:a,tierId:i,cadence:r,email:o,name:s,newsletters:l,offerId:c}=e;s=s==null?void 0:s.trim();let m;if(a.toLowerCase()==="free"){const f=await n.member.getIntegrityToken();({inboxLinks:m}=await n.member.sendMagicLink({emailType:"signup",integrityToken:f,...e,name:s}))}else return i&&r?await n.member.checkoutPlan({plan:a,tierId:i,cadence:r,email:o,name:s,newsletters:l,offerId:c}):({tierId:i,cadence:r}=Aa({site:t==null?void 0:t.site,priceId:a}),await n.member.checkoutPlan({plan:a,tierId:i,cadence:r,email:o,name:s,newsletters:l,offerId:c})),{page:"loading"};return{page:"magiclink",lastPage:"signup",inboxLinks:m,pageData:{...t.pageData||{},email:(o||"").trim()}}}catch(a){const i=xn(a,v("Failed to sign up, please try again"));return{action:"signup:failed",popupNotification:Ee({type:"signup:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:i})}}}async function y8({data:e,state:t,api:n}){try{let{plan:a,offerId:i,tierId:r,cadence:o}=e;(!r||!o)&&({tierId:r,cadence:o}=Aa({site:t==null?void 0:t.site,priceId:a})),await n.member.checkoutPlan({plan:a,tierId:r,cadence:o,offerId:i,metadata:{checkoutType:"upgrade"}})}catch{return{action:"checkoutPlan:failed",popupNotification:Ee({type:"checkoutPlan:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:v("Failed to process checkout, please try again")})}}}async function b8({data:e,state:t,api:n}){try{const{plan:a,planId:i,subscriptionId:r,cancelAtPeriodEnd:o}=e,{tierId:s,cadence:l}=Aa({site:t==null?void 0:t.site,priceId:i});await n.member.updateSubscription({planName:a,tierId:s,cadence:l,subscriptionId:r,cancelAtPeriodEnd:o,planId:i});const c=await n.member.sessionData(),m="updateSubscription:success";return{action:m,popupNotification:Ee({type:m,autoHide:!0,closeable:!0,state:t,status:"success",message:v("Subscription plan updated successfully")}),page:"accountHome",member:c}}catch{return{action:"updateSubscription:failed",popupNotification:Ee({type:"updateSubscription:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:v("Failed to update subscription, please try again")})}}}async function k8({data:e,state:t,api:n}){try{const{subscriptionId:a,cancellationReason:i}=e;return await n.member.updateSubscription({subscriptionId:a,smartCancel:!0,cancellationReason:i}),{action:"cancelSubscription:success",page:"accountHome",member:await n.member.sessionData()}}catch{return{action:"cancelSubscription:failed",popupNotification:Ee({type:"cancelSubscription:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:v("Failed to cancel subscription, please try again")})}}}async function v8({data:e,state:t,api:n}){try{const{subscriptionId:a}=e;return await n.member.updateSubscription({subscriptionId:a,cancelAtPeriodEnd:!1}),{action:"continueSubscription:success",page:"accountHome",member:await n.member.sessionData()}}catch{return{action:"continueSubscription:failed",popupNotification:Ee({type:"continueSubscription:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:v("Failed to cancel subscription, please try again")})}}}async function w8({data:e,state:t,api:n}){try{const{offerId:a,subscriptionId:i}=e;return await n.member.applyOffer({offerId:a,subscriptionId:i}),{action:"applyOffer:success",page:"accountHome",member:await n.member.sessionData(),offers:[],popupNotification:Ee({type:"applyOffer:success",autoHide:!0,closeable:!0,state:t,status:"success",message:"Offer applied successfully!"})}}catch{return{action:"applyOffer:failed",popupNotification:Ee({type:"applyOffer:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:"Failed to apply offer, please try again"})}}}async function x8({data:e,state:t,api:n}){try{await n.member.editBilling(e)}catch{return{action:"editBilling:failed",popupNotification:Ee({type:"editBilling:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:v("Failed to update billing information, please try again")})}}}async function E8({data:e,state:t,api:n}){try{await n.member.manageBilling(e)}catch{return{action:"manageBilling:failed",popupNotification:Ee({type:"manageBilling:failed",autoHide:!1,closeable:!0,state:t,status:"error",message:v("Failed to open billing portal, please try again")})}}}async function S8(){return{popupNotification:null}}async function C8({data:e,state:t}){let{action:n,message:a=""}=e;return n=n||"showPopupNotification:success",{popupNotification:Ee({type:n,autoHide:!0,closeable:!0,state:t,status:"success",message:a})}}async function $8({data:e,state:t,api:n}){try{const{newsletters:a,enableCommentNotifications:i}=e;if(!a&&i===void 0)return{};const r={};return a&&(r.newsletters=a),i!==void 0&&(r.enableCommentNotifications=i),{action:"updateNewsletterPref:success",member:await n.member.update(r)}}catch{return{action:"updateNewsletterPref:failed",popupNotification:Ee({type:"updateNewsletter:failed",autoHide:!0,closeable:!0,state:t,status:"error",message:v("Failed to update newsletter settings")})}}}async function j8({state:e,api:t}){try{return await t.member.deleteSuppression(),{action:"removeEmailFromSuppressionList:success",popupNotification:Ee({type:"removeEmailFromSuppressionList:success",autoHide:!0,closeable:!0,state:e,status:"success",message:v("You have been successfully resubscribed")})}}catch{return{action:"removeEmailFromSuppressionList:failed",popupNotification:Ee({type:"removeEmailFromSuppressionList:failed",autoHide:!0,closeable:!0,state:e,status:"error",message:v("Your email has failed to resubscribe, please try again")})}}}async function T8({data:e,state:t,api:n}){try{const{subscribed:a}=e,i=await n.member.update({subscribed:a});if(!i)throw new Error("Failed to update newsletter");const r="updateNewsletter:success";return{action:r,member:i,popupNotification:Ee({type:r,autoHide:!0,closeable:!0,state:t,status:"success",message:v("Email newsletter settings updated")})}}catch{return{action:"updateNewsletter:failed",popupNotification:Ee({type:"updateNewsletter:failed",autoHide:!0,closeable:!0,state:t,status:"error",message:v("Failed to update newsletter settings")})}}}async function P8({data:e,state:t,api:n}){const{email:a}=e,i=RU({member:t.member});if(a!==i)try{return await n.member.updateEmailAddress({email:a}),{success:!0}}catch(r){return{success:!1,error:r}}return null}async function z8({data:e,state:t,api:n}){var r;const a=(r=e==null?void 0:e.name)==null?void 0:r.trim();if(LU({member:t.member})!==a)try{const o=await n.member.update({name:a});if(!o)throw new Error("Failed to update member");return{member:o,success:!0}}catch(o){return{success:!1,error:o}}return null}async function A8({state:e,api:t}){if(e.member)try{const n=await t.member.sessionData();return n?{member:n,success:!0,action:"refreshMemberData:success"}:null}catch(n){return{success:!1,error:n,action:"refreshMemberData:failed"}}return null}async function N8({data:e,state:t,api:n}){const[a,i]=await Promise.all([z8({data:e,state:t,api:n}),P8({data:e,state:t,api:n})]);if(a&&i){if(i.success)return{action:"updateProfile:success",...a.success?{member:a.member}:{},page:"accountHome",popupNotification:Ee({type:"updateProfile:success",autoHide:!0,closeable:!0,status:"success",state:t,message:v("Check your inbox to verify email update")})};const r=a.success?v("Failed to send verification email"):v("Failed to update account data");return{action:"updateProfile:failed",...a.success?{member:a.member}:{},popupNotification:Ee({type:"updateProfile:failed",autoHide:!0,closeable:!0,status:"error",message:r,state:t})}}else if(a){const r=a.success?"updateProfile:success":"updateProfile:failed",o=a.success?"success":"error",s=a.success?v("Account details updated successfully"):v("Failed to update account details");return{action:r,...a.success?{member:a.member}:{},...a.success?{page:"accountHome"}:{},popupNotification:Ee({type:r,autoHide:a.success,closeable:!0,status:o,state:t,message:s})}}else if(i){const r=i.success?"updateProfile:success":"updateProfile:failed",o=i.success?"success":"error";let s="";return i.error?s=xn(i.error,v("Failed to send verification email")):s=v("Check your inbox to verify email update"),{action:r,...i.success?{page:"accountHome"}:{},popupNotification:Ee({type:r,autoHide:i.success,closeable:!0,status:o,state:t,message:s})}}return{action:"updateProfile:success",page:"accountHome",popupNotification:Ee({type:"updateProfile:success",autoHide:!0,closeable:!0,status:"success",state:t,message:v("Account details updated successfully")})}}async function I8({data:{siteUrl:e},state:t}){const n=Hl({siteUrl:e,apiUrl:"not-defined"}),{member:a}=t,i=window.location.href,r=Yw(),o=await n.member.getIntegrityToken();return await n.member.sendMagicLink({emailType:"signup",name:a.name,email:a.email,autoRedirect:!1,integrityToken:o,customUrlHistory:t.site.outbound_link_tagging?[{time:Date.now(),referrerSource:r,referrerMedium:"Ghost Recommendations",referrerUrl:i}]:[]}),{}}function M8({data:{recommendationId:e},api:t}){try{const n=localStorage.getItem("ghost-recommendations-clicked"),a=n?JSON.parse(n):[];if(a.includes(e))return;a.push(e),localStorage.setItem("ghost-recommendations-clicked",JSON.stringify(a))}catch{}return t.recommendations.trackClicked({recommendationId:e}),{}}async function F8({data:{recommendationId:e},api:t}){return t.recommendations.trackSubscribed({recommendationId:e}),{}}const D8={togglePopup:s8,openPopup:l8,closePopup:Zx,switchPage:o8,openNotification:c8,closeNotification:d8,back:u8,signout:m8,signin:p8,startSigninOTCFromCustomForm:h8,verifyOTC:f8,signup:g8,updateSubscription:b8,cancelSubscription:k8,continueSubscription:v8,applyOffer:w8,updateNewsletter:T8,updateProfile:N8,refreshMemberData:A8,clearPopupNotification:S8,editBilling:x8,manageBilling:E8,checkoutPlan:y8,updateNewsletterPreference:$8,showPopupNotification:C8,removeEmailFromSuppressionList:j8,oneClickSubscribe:I8,trackRecommendationClicked:M8,trackRecommendationSubscribed:F8};async function O8({action:e,data:t,state:n,api:a}){const i=D8[e];return i?await i({data:t,state:n,api:a})||{}:{}}function Xx(e,t){e&&(e.innerText=t)}function _8(e,t,n){t.classList.add("error");const a=v("There was an error sending the email, please try again");Xx(n,xn(e,a))}async function R8({event:e,form:t,errorEl:n,siteUrl:a,submitHandler:i,doAction:r,captureException:o}){var j,F;t.removeEventListener("submit",i),e.preventDefault(),n&&(n.innerText=""),t.classList.remove("success","invalid","error");let s=e.target.querySelector("input[data-members-email]"),l=e.target.querySelector("input[data-members-name]"),c=((j=t==null?void 0:t.dataset)==null?void 0:j.membersAutoredirect)||"true",m=s==null?void 0:s.value,f=((l==null?void 0:l.value)||"").trim()||void 0,p,y=[],k=[],S=e.target.querySelectorAll("input[data-members-label]")||[];for(let z=0;z<S.length;++z)y.push(S[z].value);let b=e.target.querySelectorAll("input[type=hidden][data-members-newsletter], input[type=checkbox][data-members-newsletter]:checked, input[type=radio][data-members-newsletter]:checked")||[];for(let z=0;z<b.length;++z)k.push({name:b[z].value});t.dataset.membersForm&&(p=t.dataset.membersForm);const w=p==="signin"&&((F=t==null?void 0:t.dataset)==null?void 0:F.membersOtc)==="true";t.classList.add("loading");const E=co(),P={email:m,emailType:p,labels:y,name:f,autoRedirect:c==="true"};w&&(P.includeOTC=!0),E&&(P.urlHistory=E),b.length>0?P.newsletters=k:(e.target.querySelectorAll("input[type=checkbox][data-members-newsletter]")||[]).length>0&&(P.newsletters=[]);try{const R=await(await fetch(`${a}/members/api/integrity-token/`,{method:"GET"})).text(),_=await fetch(`${a}/members/api/send-magic-link/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...P,integrityToken:R})});if(t.addEventListener("submit",i),t.classList.remove("loading"),_.ok){t.classList.add("success");let D;if(w)try{D=await _.clone().json()}catch{D=void 0}const X=D==null?void 0:D.otc_ref;if(X&&typeof r=="function")try{r("startSigninOTCFromCustomForm",{email:(m||"").trim(),otcRef:X,inboxLinks:D==null?void 0:D.inboxLinks})}catch(ne){console.error(ne),o==null||o(ne)}}else{const D=await wn.fromApiResponse(_),X=xn(D,v("Failed to send magic link email"));Xx(n,X),t.classList.add("error")}}catch(z){_8(z,t,n)}}function U8({event:e,el:t,errorEl:n,siteUrl:a,site:i,member:r,clickHandler:o}){t.removeEventListener("click",o),e.preventDefault();let s=t.dataset.membersPlan,l=TU(i,s.toLowerCase()),c=t.dataset.membersSuccess,m=t.dataset.membersCancel,f,p;c&&(f=new URL(c,window.location.href).href),m&&(p=new URL(m,window.location.href).href),n&&(n.innerText=""),t.classList.add("loading");const y=r?{checkoutType:"upgrade"}:{},k=co();return k&&(y.urlHistory=k),fetch(`${a}/members/api/session`,{credentials:"same-origin"}).then(function(S){return S.ok?S.text():null}).then(function(S){return fetch(`${a}/members/api/create-stripe-checkout-session/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...l,identity:S,successUrl:f,cancelUrl:p,metadata:y})}).then(function(b){if(!b.ok)throw new Error(v("Could not create stripe checkout session"));return b.json()})}).then(function(S){return S.url?window.location.assign(S.url):window.Stripe(S.publicKey).redirectToCheckout({sessionId:S.sessionId}).then(function(w){if(w.error)throw new Error(w.error.message)})}).catch(function(S){console.error(S),t.addEventListener("click",o),t.classList.remove("loading"),n&&(n.innerText=S.message),t.classList.add("error")})}function L8({siteUrl:e,site:t={},member:n,offers:a=[],doAction:i,captureException:r}={}){if(!e)return;e=e.replace(/\/$/,""),Array.prototype.forEach.call(document.querySelectorAll("form[data-members-form]"),function(s){let l=s.querySelector("[data-members-error]");function c(m){R8({event:m,errorEl:l,form:s,siteUrl:e,submitHandler:c,doAction:i,captureException:r})}s.addEventListener("submit",c)}),Array.prototype.forEach.call(document.querySelectorAll("[data-members-plan]"),function(s){let l=s.querySelector("[data-members-error]");function c(m){U8({el:s,event:m,errorEl:l,member:n,site:t,siteUrl:e,clickHandler:c})}s.addEventListener("click",c)}),Array.prototype.forEach.call(document.querySelectorAll("[data-members-edit-billing]"),function(s){let l=s.querySelector("[data-members-error]"),c=s.dataset.membersSuccess,m=s.dataset.membersCancel,f,p;c&&(f=new URL(c,window.location.href).href),m&&(p=new URL(m,window.location.href).href);function y(k){s.removeEventListener("click",y),k.preventDefault(),l&&(l.innerText=""),s.classList.add("loading"),fetch(`${e}/members/api/session`,{credentials:"same-origin"}).then(function(S){return S.ok?S.text():null}).then(function(S){return fetch(`${e}/members/api/create-stripe-update-session/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:S,successUrl:f,cancelUrl:p})}).then(function(b){if(!b.ok)throw new Error(v("Could not create stripe checkout session"));return b.json()})}).then(function(S){return window.Stripe(S.publicKey).redirectToCheckout({sessionId:S.sessionId})}).then(function(S){if(S.error)throw new Error(v(S.error.message))}).catch(function(S){console.error(S),s.addEventListener("click",y),s.classList.remove("loading"),l&&(l.innerText=S.message),s.classList.add("error")})}s.addEventListener("click",y)}),Array.prototype.forEach.call(document.querySelectorAll("[data-members-manage-billing]"),function(s){let l=s.querySelector("[data-members-error]"),c=s.dataset.membersReturn,m;c&&(m=new URL(c,window.location.href).href);function f(p){s.removeEventListener("click",f),p.preventDefault(),l&&(l.innerText=""),s.classList.add("loading"),fetch(`${e}/members/api/session`,{credentials:"same-origin"}).then(function(y){return y.ok?y.text():null}).then(function(y){return fetch(`${e}/members/api/create-stripe-billing-portal-session/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:y,returnUrl:m})}).then(function(k){if(!k.ok)throw new Error(v("Could not create Stripe billing portal session"));return k.json()})}).then(function(y){return window.location.assign(y.url)}).catch(function(y){console.error(y),s.addEventListener("click",f),s.classList.remove("loading"),l&&(l.innerText=y.message),s.classList.add("error")})}s.addEventListener("click",f)}),Array.prototype.forEach.call(document.querySelectorAll("[data-members-signout]"),function(s){function l(c){s.removeEventListener("click",l),c.preventDefault(),s.classList.remove("error"),s.classList.add("loading"),fetch(`${e}/members/api/session`,{method:"DELETE"}).then(function(m){m.ok?window.location.replace(e):(s.addEventListener("click",l),s.classList.remove("loading"),s.classList.add("error"))})}s.addEventListener("click",l)});const o=(a||[]).some(s=>s.redemption_type==="retention");Array.prototype.forEach.call(document.querySelectorAll("[data-members-cancel-subscription]"),function(s){let l=s.parentElement.querySelector("[data-members-error]");function c(m){m.preventDefault();let f=s.dataset.membersCancelSubscription;if(o){i("openPopup",{page:"accountPlan",pageData:{subscriptionId:f,action:"cancel"}});return}return s.removeEventListener("click",c),s.classList.remove("error"),s.classList.add("loading"),l&&(l.innerText=""),fetch(`${e}/members/api/session`,{credentials:"same-origin"}).then(function(p){return p.ok?p.text():null}).then(function(p){return fetch(`${e}/members/api/subscriptions/${f}/`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:p,smart_cancel:!0})})}).then(function(p){p.ok?window.location.reload():(s.addEventListener("click",c),s.classList.remove("loading"),s.classList.add("error"),l&&(l.innerText=v("There was an error cancelling your subscription, please try again.")))})}s.addEventListener("click",c)}),Array.prototype.forEach.call(document.querySelectorAll("[data-members-continue-subscription]"),function(s){let l=s.parentElement.querySelector("[data-members-error]");function c(m){s.removeEventListener("click",c),m.preventDefault(),s.classList.remove("error"),s.classList.add("loading");let f=s.dataset.membersContinueSubscription;return l&&(l.innerText=""),fetch(`${e}/members/api/session`,{credentials:"same-origin"}).then(function(p){return p.ok?p.text():null}).then(function(p){return fetch(`${e}/members/api/subscriptions/${f}/`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({identity:p,cancel_at_period_end:!1})})}).then(function(p){p.ok?window.location.reload():(s.addEventListener("click",c),s.classList.remove("loading"),s.classList.add("error"),l&&(l.innerText=v("There was an error continuing your subscription, please try again.")))})}s.addEventListener("click",c)})}const Y8={showPopup:!0,site:_i,member:Jl.free,page:"accountEmail",...i8(),pageData:Jx};function B8({site:e,children:t}){const{portal_sentry:n}=e||{};return n&&n.dsn?u.jsx(Yd,{children:t}):u.jsx(u.Fragment,{children:t})}class V8 extends re.Component{constructor(t){super(t),this.setupCustomTriggerButton(),this.state={site:null,member:null,offers:[],page:"loading",showPopup:!1,action:"init:running",actionErrorMessage:null,initStatus:"running",lastPage:null,customSiteUrl:t.customSiteUrl,locale:t.locale,scrollbarWidth:0}}componentDidMount(){const t=this.getScrollbarWidth();this.setState({scrollbarWidth:t}),this.initSetup()}componentDidUpdate(t,n){var a,i,r;if(n.showPopup!==this.state.showPopup){this.handleCustomTriggerClassUpdate();try{this.state.showPopup?(this.bodyScroll=(r=(i=(a=window.document)==null?void 0:a.body)==null?void 0:i.style)==null?void 0:r.overflow,this.bodyMargin=window.getComputedStyle(document.body).getPropertyValue("margin-right"),window.document.body.style.overflow="hidden",this.state.scrollbarWidth&&(window.document.body.style.marginRight=`calc(${this.bodyMargin} + ${this.state.scrollbarWidth}px)`)):(window.document.body.style.overflow=this.bodyScroll||"",!this.bodyMargin||this.bodyMargin==="0px"?window.document.body.style.marginRight="":window.document.body.style.marginRight=this.bodyMargin)}catch{}}if(this.state.initStatus==="success"&&n.initStatus!==this.state.initStatus){const{siteUrl:o}=this.props,s=this.getContextFromState();this.sendPortalReadyEvent(),L8({siteUrl:o,site:s.site,member:s.member,offers:s.offers,doAction:s.doAction,captureException:Vs})}}componentWillUnmount(){clearTimeout(this.timeoutId),this.customTriggerButtons&&this.customTriggerButtons.forEach(t=>{t.removeEventListener("click",this.clickHandler)}),window.removeEventListener("hashchange",this.hashHandler,!1)}sendPortalReadyEvent(){window.self!==window.parent&&window.parent.postMessage({type:"portal-ready",payload:{}},"*")}getScrollbarWidth(){const t=document.createElement("div");t.style.visibility="hidden",t.style.overflow="scroll",document.body.appendChild(t),document.body.appendChild(t);const n=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),n}setupCustomTriggerButton(){this.clickHandler=a=>{a.preventDefault();const i=a.currentTarget,r=i&&i.dataset.portal,{page:o,pageQuery:s,pageData:l}=this.getPageFromLinkPath(r)||{};this.state.initStatus==="success"&&(s&&s!=="free"?this.handleSignupQuery({site:this.state.site,pageQuery:s}):this.dispatchAction("openPopup",{page:o,pageQuery:s,pageData:l}))};const t="[data-portal]",n="gh-portal-close";this.customTriggerButtons=document.querySelectorAll(t)||[],this.customTriggerButtons.forEach(a=>{a.classList.add(n),a.removeEventListener("click",this.clickHandler),a.addEventListener("click",this.clickHandler)})}handleCustomTriggerClassUpdate(){var a;const t="gh-portal-open",n="gh-portal-close";(a=this.customTriggerButtons)==null||a.forEach(i=>{const r=this.state.showPopup?t:n,o=this.state.showPopup?n:t;i.classList.add(r),i.classList.remove(o)})}async initSetup(){try{const{site:t,member:n,offers:a,page:i,showPopup:r,popupNotification:o,lastPage:s,pageQuery:l,pageData:c}=await this.fetchData(),m=this.props.siteI18nEnabled&&(this.props.locale||t.locale)||"en";Sl.changeLanguage(m);const f={site:t,member:n,offers:a,page:i,lastPage:s,pageQuery:l,showPopup:r,pageData:c,popupNotification:o,dir:Sl.dir()||"ltr",action:"init:success",initStatus:"success",locale:m};if(this.handleSignupQuery({site:t,pageQuery:l,member:n}),this.setState(f),this.hashHandler=()=>{this.updateStateForPreviewLinks()},window.addEventListener("hashchange",this.hashHandler,!1),!n){const p=document.querySelectorAll("[data-lexical-signup-form]");p.length>0&&p.forEach(y=>{y.style.display=""})}this.setupRecommendationButtons(),this.transformPortalLinksToRelative()}catch(t){console.error("[Portal] Failed to initialize:",t),this.setState({action:"init:failed",initStatus:"failed"})}}async fetchData(){const{site:t,member:n,offers:a}=await this.fetchApiData(),{site:i,...r}=this.fetchDevData(),{site:o,...s}=this.fetchLinkData(t,n),{site:l,...c}=this.fetchPreviewData(),{site:m,...f}=this.fetchNotificationData();return{member:n,offers:a,page:"",site:{...t,...o,...l,...m,...i,plans:{...(i||{}).plans,...(t||{}).plans,...(l||{}).plans}},...r,...s,...f,...c}}fetchDevData(){return $e(["dev"])&&!this.state.customSiteUrl?Y8:$e(["test"])?{showPopup:this.props.showPopup!==void 0?this.props.showPopup:!0}:{}}fetchOfferQueryStrData(t=""){const n=new URLSearchParams(t),a={};for(let i of n.entries()){const r=i[0],o=decodeURIComponent(i[1]);r==="name"?a.name=o||"":r==="code"?a.code=o||"":r==="display_title"?a.display_title=o||"":r==="display_description"?a.display_description=o||"":r==="type"?a.type=o||"":r==="cadence"?a.cadence=o||"":r==="duration"?a.duration=o||"":r==="duration_in_months"&&!isNaN(Number(o))?a.duration_in_months=Number(o):r==="amount"&&!isNaN(Number(o))?a.amount=Number(o):r==="currency"?a.currency=o||"":r==="status"?a.status=o||"":r==="tier_id"&&(a.tier={id:o||Jx.tier.id})}return{page:"offer",pageData:a}}fetchQueryStrData(t=""){const n=new URLSearchParams(t),a={site:{plans:{}}},i=[];let r,o=null,s,l,c;for(let m of n.entries()){const f=m[0],p=decodeURIComponent(m[1]);if(f==="button")a.site.portal_button=JSON.parse(p);else if(f==="name")a.site.portal_name=JSON.parse(p);else if(f==="isFree"&&JSON.parse(p))i.push("free");else if(f==="isMonthly"&&JSON.parse(p))i.push("monthly");else if(f==="isYearly"&&JSON.parse(p))i.push("yearly");else if(f==="portalPrices")r=p?p.split(","):[];else if(f==="portalProducts")o=p?p.split(","):[];else if(f==="page"&&p)a.page=p;else if(f==="accentColor"&&(p===""||p))a.site.accent_color=p;else if(f==="buttonIcon"&&p)a.site.portal_button_icon=p;else if(f==="signupButtonText")a.site.portal_button_signup_text=p||"";else if(f==="signupTermsHtml")a.site.portal_signup_terms_html=p||"";else if(f==="signupCheckboxRequired")a.site.portal_signup_checkbox_required=JSON.parse(p);else if(f==="buttonStyle"&&p)a.site.portal_button_style=p;else if(f==="monthlyPrice"&&!isNaN(Number(p)))a.site.plans.monthly=Number(p),s=Number(p);else if(f==="yearlyPrice"&&!isNaN(Number(p)))a.site.plans.yearly=Number(p),l=Number(p);else if(f==="currency"&&p){const y=p.toUpperCase();a.site.plans.currency=y,a.site.plans.currency_symbol=De(y),c=y}else f==="disableBackground"?a.site.disableBackground=JSON.parse(p):f==="membersSignupAccess"&&p?a.site.members_signup_access=p:f==="portalDefaultPlan"&&p&&(a.site.portal_default_plan=p)}return a.site.portal_plans=i,a.site.portal_products=o,r?a.site.portal_plans=r:s&&l&&c&&(a.site.prices=[{id:"monthly",stripe_price_id:"dummy_stripe_monthly",stripe_product_id:"dummy_stripe_product",active:1,nickname:"Monthly",currency:c,amount:s,type:"recurring",interval:"month"},{id:"yearly",stripe_price_id:"dummy_stripe_yearly",stripe_product_id:"dummy_stripe_product",active:1,nickname:"Yearly",currency:c,amount:l,type:"recurring",interval:"year"}]),a}fetchNotificationData(){const{type:t,status:n,duration:a,autoHide:i,closeable:r}=Qw({billingOnly:!0})||{};return["stripe:billing-update"].includes(t)?n==="success"?{showPopup:!0,popupNotification:Ee({type:t,status:n,duration:a,closeable:r,autoHide:i,state:this.state,message:n==="success"?"Billing info updated successfully":""})}:{showPopup:!0}:{}}fetchLinkData(t,n){const a=new URLSearchParams(window.location.search);if(a.get("action")==="unsubscribe")return a.get("key")&&a.get("uuid")?{showPopup:!0,page:"unsubscribe",pageData:{uuid:a.get("uuid"),key:a.get("key"),newsletterUuid:a.get("newsletter"),comments:a.get("comments")}}:{showPopup:!0,page:"accountEmail",pageData:{newsletterUuid:a.get("newsletter"),action:"unsubscribe",redirect:t.url+"#/portal/account/newsletters"}};if(AU({site:t})&&a.get("action")==="signup"&&a.get("success")==="true")return{showPopup:!0,page:"recommendations",pageData:{signup:!0}};const[i,r]=window.location.hash.substr(1).split("?"),o=new URLSearchParams(r??""),s=/^(?:(\w+?))?\/monthly$/,l=/^(?:(\w+?))?\/yearly$/,c=/^offers\/(\w+?)\/?$/,m=/^\/portal\/?(?:\/(\w+(?:\/\w+)*))?\/?$/,f=/^\/feedback\/(\w+?)\/(\w+?)\/?$/;if(i&&f.test(i)){const[,p,y]=i.match(f),k=parseInt(y);if(k===1||k===0)return n||o.get("uuid")&&o.get("key")?{showPopup:!0,page:"feedback",pageData:{uuid:n?null:o.get("uuid"),key:n?null:o.get("key"),postId:p,score:k}}:{showPopup:!0,page:"signin",pageData:{redirect:t.url+`#/feedback/${p}/${k}/`}}}if(i&&m.test(i)){const[,p]=i.match(m),{page:y,pageQuery:k,pageData:S}=this.getPageFromLinkPath(p,t)||{},b=["accountPlan","accountProfile"].includes(y)?"accountHome":null;return{showPopup:!(["monthly","yearly"].includes(k)||s.test(k)||l.test(k)||c.test(k)),...y?{page:y}:{},...k?{pageQuery:k}:{},...S?{pageData:S}:{},...b?{lastPage:b}:{}}}return{}}fetchPreviewData(){const[,t]=window.location.hash.substr(1).split("?");if($e(["preview"])){let n={};return $e(["offerPreview"])?n=this.fetchOfferQueryStrData(t):n=this.fetchQueryStrData(t),{...n,showPopup:!0}}return{}}getColorOverride(){const t=document.querySelector("script[data-ghost]");return t&&t.dataset.accentColor?t.dataset.accentColor:!1}async fetchApiData(){const{siteUrl:t,customSiteUrl:n,apiUrl:a,apiKey:i}=this.props;try{this.GhostApi=this.props.api||Hl({siteUrl:t,apiUrl:a,apiKey:i});const{site:r,member:o,offers:s}=await this.GhostApi.init(),l=this.getColorOverride();return l&&(r.accent_color=l),this.setupFirstPromoter({site:r,member:o}),this.setupSentry({site:r}),{site:r,member:o,offers:s}}catch(r){if($e(["dev","test"],{customSiteUrl:n}))return{};throw r}}setupSentry({site:t}){if($e(["test"]))return null;const{portal_sentry:n,portal_version:a,version:i}=t,o=`portal@2.62.3|ghost@${i}`;n&&n.dsn&&hT({dsn:n.dsn,environment:n.env||"development",release:o,beforeSend:s=>xU({event:s})?s:null,allowUrls:[/https?:\/\/((www)\.)?unpkg\.com\/@tryghost\/portal/]})}setupFirstPromoter({site:t,member:n}){if($e(["test"]))return null;const a=UU({site:t});let i=ip({site:t});if(i=i==null?void 0:i.replace(/^(\S*\.)?(\S*\.\S*)$/i,".$2"),a&&i){const r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src="https://cdn.firstpromoter.com/fprom.js",r.onload=r.onreadystatechange=function(){let s=this.readyState;if(!s||s==="complete"||s==="loaded")try{if(window.$FPROM.init(a,i),JU({member:n})){const l=n.email,c=n.uuid;if(window.$FPROM)window.$FPROM.trackSignup({email:l,uid:c});else{const m=window._fprom||[];window._fprom=m,m.push(["event","signup"]),m.push(["email",l]),m.push(["uid",c])}}}catch{}};const o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(r,o)}}async dispatchAction(t,n){clearTimeout(this.timeoutId),this.setState({action:`${t}:running`,actionErrorMessage:null});try{const a=await O8({action:t,data:n,state:this.state,api:this.GhostApi});this.setState(a),a&&a.action&&!a.action.includes(":failed")&&(this.timeoutId=setTimeout(()=>{this.setState({action:""})},2e3))}catch(a){if(console.error(`[Portal] Failed to dispatch action: ${t}`,a),n&&n.throwErrors)throw a;const i=Ee({type:`${t}:failed`,autoHide:!0,closeable:!0,status:"error",state:this.state,meta:{error:a}});this.setState({action:`${t}:failed`,actionErrorMessage:xn(a,v("An unexpected error occured. Please try again or <a>contact support</a> if the error persists.")),popupNotification:i})}}updateStateForPreviewLinks(){const{site:t,...n}=this.fetchPreviewData(),{site:a,...i}=this.fetchLinkData(),r={site:{...this.state.site,...a||{},...t||{},plans:{...this.state.site&&this.state.site.plans,...(a||{}).plans,...(t||{}).plans}},...i,...n};this.handleSignupQuery({site:r.site,pageQuery:r.pageQuery}),this.setState(r)}async handleOfferQuery({site:t,offerId:n,member:a=this.state.member}){const{portal_button:i}=t;if(Xm(),!rn({member:a})||Qn({member:a}))try{const r=await this.GhostApi.site.offer({offerId:n}),o=r==null?void 0:r.offers[0];if(!o||!o.tier||Kw({offer:o})||!HU({site:t,offer:o}))return;if(i)this.dispatchAction("openPopup",{page:"offer",pageData:r==null?void 0:r.offers[0]});else{const s=Pa({site:t,productId:o.tier.id}),l=o.cadence==="month"?s.monthlyPrice:s.yearlyPrice;if(this.dispatchAction("openPopup",{page:"loading"}),a){const{tierId:c,cadence:m}=Aa({site:t,priceId:l.id});this.dispatchAction("checkoutPlan",{plan:l.id,offerId:n,tierId:c,cadence:m})}else{const{tierId:c,cadence:m}=Aa({site:t,priceId:l.id});this.dispatchAction("signup",{plan:l.id,offerId:n,tierId:c,cadence:m})}}}catch{}}handleSignupQuery({site:t,pageQuery:n,member:a}){const i=/^offers\/(\w+?)\/?$/;let r=n;if(i.test(n||"")){const[,s]=n.match(i);this.handleOfferQuery({site:t,offerId:s,member:a});return}Gw({site:t,pageQuery:n})&&(r=Gw({site:t,pageQuery:n}));const o=PU({site:t,priceId:r});if(n&&n!=="free"){Xm();const s=(o==null?void 0:o.id)||r;s!=="free"&&this.dispatchAction("openPopup",{page:"loading"});const{tierId:l,cadence:c}=Aa({site:t,priceId:s});this.dispatchAction("signup",{plan:s,tierId:l,cadence:c})}}getPageFromLinkPath(t){const n=/^signup\/?(?:\/(\w+?))?\/?$/,a=/^signup\/?(?:\/(\w+?))\/monthly\/?$/,i=/^signup\/?(?:\/(\w+?))\/yearly\/?$/,r=/^offers\/(\w+?)\/?$/;if(t===void 0||t==="")return{page:"default"};if(r.test(t))return{pageQuery:t};if(t==="signup")return{page:"signup"};if(a.test(t)){const[,o]=t.match(a);return{page:"signup",pageQuery:`${o}/monthly`}}else if(i.test(t)){const[,o]=t.match(i);return{page:"signup",pageQuery:`${o}/yearly`}}else if(n.test(t)){const[,o]=t.match(n);return{page:"signup",pageQuery:o}}else{if(t==="signup/free")return{page:"signup",pageQuery:"free"};if(t==="signup/monthly")return{page:"signup",pageQuery:"monthly"};if(t==="signup/yearly")return{page:"signup",pageQuery:"yearly"};if(t==="signin")return{page:"signin"};if(t==="account")return{page:"accountHome"};if(t==="account/plans")return{page:"accountPlan"};if(t==="account/profile")return{page:"accountProfile"};if(t==="account/newsletters")return{page:"accountEmail"};if(t==="support")return{page:"support"};if(t==="support/success")return{page:"supportSuccess"};if(t==="support/error")return{page:"supportError"};if(t==="recommendations")return{page:"recommendations",pageData:{signup:!1}};if(t==="account/newsletters/help")return{page:"emailReceivingFAQ",pageData:{direct:!0}};if(t==="account/newsletters/disabled")return{page:"emailSuppressionFAQ",pageData:{direct:!0}}}return{page:"default"}}getAccentColor(){const{accent_color:t}=this.state.site||{};return P6(t)}getContextPage({site:t,page:n,member:a}){if(!n||n==="default"){const i=Vt({site:t})||!Sn({site:t})?"signin":"signup";n=a?"accountHome":i}return Yp({page:n})}getContextMember({page:t,member:n,customSiteUrl:a}){return $e(["dev","preview"],{customSiteUrl:a})?q5({page:t})||J5({page:t})?$e(["dev"],{customSiteUrl:a})?n||Jl.free:$e(["preview"])?Jl.preview:Jl.paid:null:n}getContextFromState(){const{site:t,member:n,offers:a,action:i,actionErrorMessage:r,page:o,lastPage:s,showPopup:l,pageQuery:c,pageData:m,popupNotification:f,customSiteUrl:p,dir:y,scrollbarWidth:k,otcRef:S,inboxLinks:b}=this.state,w=this.getContextPage({site:t,page:o,member:n}),E=this.getContextMember({page:w,member:n,customSiteUrl:p});return{api:this.GhostApi,site:t,offers:a,action:i,actionErrorMessage:r,brandColor:this.getAccentColor(),page:w,pageQuery:c,pageData:m,member:E,lastPage:s,showPopup:l,popupNotification:f,customSiteUrl:p,dir:y,scrollbarWidth:k,otcRef:S,inboxLinks:b,doAction:(P,j)=>this.dispatchAction(P,j)}}getRecommendationButtons(){return document.querySelectorAll("[data-recommendation]")||[]}setupRecommendationButtons(){const t=a=>{const i=a.currentTarget.dataset.recommendation;i?this.dispatchAction("trackRecommendationClicked",{recommendationId:i}).catch(console.error):console.warn("[Portal] Invalid usage of data-recommendation attribute")},n=this.getRecommendationButtons();for(const a of n)a.addEventListener("click",t,{passive:!0})}transformPortalLinksToRelative(){document.querySelectorAll('a[href*="#/portal"]').forEach(r8)}render(){return this.state.initStatus==="success"?u.jsx(B8,{site:this.state.site,children:u.jsxs(H.Provider,{value:this.getContextFromState(),children:[u.jsx(Vp,{}),u.jsx(sp,{}),u.jsx(pp,{})]})}):null}}const Qx="ghost-portal-root";function H8(){const e=document.createElement("div");e.id=Qx,e.setAttribute("data-testid","portal-root"),document.body.appendChild(e)}function W8(){const e=document.querySelector("script[data-ghost]");if(e){const t=e.dataset.i18n==="true",n=e.dataset.ghost,a=e.dataset.key,i=e.dataset.api,r=e.dataset.locale;return{siteUrl:n,apiKey:a,apiUrl:i,siteI18nEnabled:t,locale:r}}return{}}function G8(){const e=new URL(window.location.href);e.searchParams.get("token")&&(e.searchParams.delete("token"),window.history.replaceState({},document.title,e.href))}function K8(){const{siteUrl:e,apiKey:t,apiUrl:n,siteI18nEnabled:a,locale:i}=W8(),r=e||window.location.origin;H8(),G8(),EC.render(u.jsx(re.StrictMode,{children:u.jsx(V8,{siteUrl:r,customSiteUrl:e,apiKey:t,apiUrl:n,siteI18nEnabled:a,locale:i})}),document.getElementById(Qx))}K8()});
|
|
7537
7537
|
//# sourceMappingURL=portal.min.js.map
|