/*! For license information please see main.bundle.js.LICENSE.txt */
(()=>{"use strict";var e={418:e=>{var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function l(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,a){for(var o,i,u=l(e),s=1;s{var r=n(294),l=n(418),a=n(840);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nt}return!1}(t,n,l,r)&&(n=null),r||null===l?function(e){return!!p.call(m,e)||!p.call(h,e)&&(d.test(e)?m[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):l.mustUseProperty?e[l.propertyName]=null===n?3!==l.type&&"":n:(t=l.attributeName,r=l.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(l=l.type)||4===l&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"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(y,b);v[t]=new g(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(y,b);v[t]=new g(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(y,b);v[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){v[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),v.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){v[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var _=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=60103,S=60106,x=60107,E=60108,C=60114,P=60109,L=60110,T=60112,N=60113,z=60120,M=60115,O=60116,I=60121,R=60128,D=60129,F=60130,U=60131;if("function"==typeof Symbol&&Symbol.for){var q=Symbol.for;w=q("react.element"),S=q("react.portal"),x=q("react.fragment"),E=q("react.strict_mode"),C=q("react.profiler"),P=q("react.provider"),L=q("react.context"),T=q("react.forward_ref"),N=q("react.suspense"),z=q("react.suspense_list"),M=q("react.memo"),O=q("react.lazy"),I=q("react.block"),q("react.scope"),R=q("react.opaque.id"),D=q("react.debug_trace_mode"),F=q("react.offscreen"),U=q("react.legacy_hidden")}var A,$="function"==typeof Symbol&&Symbol.iterator;function j(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=$&&e[$]||e["@@iterator"])?e:null}function H(e){if(void 0===A)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);A=t&&t[1]||""}return"\n"+A+e}var V=!1;function B(e,t){if(!e||V)return"";V=!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()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(e){if(e&&r&&"string"==typeof e.stack){for(var l=e.stack.split("\n"),a=r.stack.split("\n"),o=l.length-1,i=a.length-1;1<=o&&0<=i&&l[o]!==a[i];)i--;for(;1<=o&&0<=i;o--,i--)if(l[o]!==a[i]){if(1!==o||1!==i)do{if(o--,0>--i||l[o]!==a[i])return"\n"+l[o].replace(" at new "," at ")}while(1<=o&&0<=i);break}}}finally{V=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?H(e):""}function W(e){switch(e.tag){case 5:return H(e.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return B(e.type,!1);case 11:return B(e.type.render,!1);case 22:return B(e.type._render,!1);case 1:return B(e.type,!0);default:return""}}function Q(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case x:return"Fragment";case S:return"Portal";case C:return"Profiler";case E:return"StrictMode";case N:return"Suspense";case z:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case L:return(e.displayName||"Context")+".Consumer";case P:return(e._context.displayName||"Context")+".Provider";case T:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case M:return Q(e.type);case I:return Q(e._render);case O:t=e._payload,e=e._init;try{return Q(e(t))}catch(e){}}return null}function K(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Y(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function X(e){e._valueTracker||(e._valueTracker=function(e){var t=Y(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var l=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function G(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Y(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Z(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function J(e,t){var n=t.checked;return l({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=K(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&k(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=K(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?le(e,t.type,n):t.hasOwnProperty("defaultValue")&&le(e,t.type,K(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function le(e,t,n){"number"===t&&Z(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ae(e,t){return e=l({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function oe(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l=n.length))throw Error(o(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:K(n)}}function se(e,t){var n=K(t.value),r=K(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ce(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var fe="http://www.w3.org/1999/xhtml";function de(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 pe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?de(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var he,me,ge=(me=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((he=he||document.createElement("div")).innerHTML="",t=he.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return me(e,t)}))}:me);function ve(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var ye={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},be=["Webkit","ms","Moz","O"];function ke(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ye.hasOwnProperty(e)&&ye[e]?(""+t).trim():t+"px"}function _e(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),l=ke(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}Object.keys(ye).forEach((function(e){be.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ye[t]=ye[e]}))}));var we=l({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 Se(e,t){if(t){if(we[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(o(62))}}function xe(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;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 Ee(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ce=null,Pe=null,Le=null;function Te(e){if(e=nl(e)){if("function"!=typeof Ce)throw Error(o(280));var t=e.stateNode;t&&(t=ll(t),Ce(e.stateNode,e.type,t))}}function Ne(e){Pe?Le?Le.push(e):Le=[e]:Pe=e}function ze(){if(Pe){var e=Pe,t=Le;if(Le=Pe=null,Te(e),t)for(e=0;e(r=31-Ht(r))?0:1<n;n++)t.push(e);return t}function jt(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Ht(t)]=n}var Ht=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Vt(e)/Bt|0)|0},Vt=Math.log,Bt=Math.LN2,Wt=a.unstable_UserBlockingPriority,Qt=a.unstable_runWithPriority,Kt=!0;function Yt(e,t,n,r){De||Ie();var l=Gt,a=De;De=!0;try{Oe(l,e,t,n,r)}finally{(De=a)||Ue()}}function Xt(e,t,n,r){Qt(Wt,Gt.bind(null,e,t,n,r))}function Gt(e,t,n,r){var l;if(Kt)if((l=0==(4&t))&&0=Fn),An=String.fromCharCode(32),$n=!1;function jn(e,t){switch(e){case"keyup":return-1!==Rn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Vn=!1,Bn={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 Wn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Bn[e.type]:"textarea"===t}function Qn(e,t,n,r){Ne(r),0<(t=Dr(t,"onChange")).length&&(n=new dn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Kn=null,Yn=null;function Xn(e){Lr(e,0)}function Gn(e){if(G(rl(e)))return e}function Zn(e,t){if("change"===e)return t}var Jn=!1;if(f){var er;if(f){var tr="oninput"in document;if(!tr){var nr=document.createElement("div");nr.setAttribute("oninput","return;"),tr="function"==typeof nr.oninput}er=tr}else er=!1;Jn=er&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=dr(r)}}function hr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?hr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function mr(){for(var e=window,t=Z();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=Z((e=t.contentWindow).document)}return t}function gr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var vr=f&&"documentMode"in document&&11>=document.documentMode,yr=null,br=null,kr=null,_r=!1;function wr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;_r||null==yr||yr!==Z(r)||(r="selectionStart"in(r=yr)&&gr(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},kr&&fr(kr,r)||(kr=r,0<(r=Dr(br,"onSelect")).length&&(t=new dn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=yr)))}It("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),It("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),It(Ot,2);for(var Sr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),xr=0;xril||(e.current=ol[il],ol[il]=null,il--)}function cl(e,t){il++,ol[il]=e.current,e.current=t}var fl={},dl=ul(fl),pl=ul(!1),hl=fl;function ml(e,t){var n=e.type.contextTypes;if(!n)return fl;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l,a={};for(l in n)a[l]=t[l];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function gl(e){return null!=e.childContextTypes}function vl(){sl(pl),sl(dl)}function yl(e,t,n){if(dl.current!==fl)throw Error(o(168));cl(dl,t),cl(pl,n)}function bl(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var a in r=r.getChildContext())if(!(a in e))throw Error(o(108,Q(t)||"Unknown",a));return l({},n,r)}function kl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||fl,hl=dl.current,cl(dl,e),cl(pl,pl.current),!0}function _l(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=bl(e,t,hl),r.__reactInternalMemoizedMergedChildContext=e,sl(pl),sl(dl),cl(dl,e)):sl(pl),cl(pl,n)}var wl=null,Sl=null,xl=a.unstable_runWithPriority,El=a.unstable_scheduleCallback,Cl=a.unstable_cancelCallback,Pl=a.unstable_shouldYield,Ll=a.unstable_requestPaint,Tl=a.unstable_now,Nl=a.unstable_getCurrentPriorityLevel,zl=a.unstable_ImmediatePriority,Ml=a.unstable_UserBlockingPriority,Ol=a.unstable_NormalPriority,Il=a.unstable_LowPriority,Rl=a.unstable_IdlePriority,Dl={},Fl=void 0!==Ll?Ll:function(){},Ul=null,ql=null,Al=!1,$l=Tl(),jl=1e4>$l?Tl:function(){return Tl()-$l};function Hl(){switch(Nl()){case zl:return 99;case Ml:return 98;case Ol:return 97;case Il:return 96;case Rl:return 95;default:throw Error(o(332))}}function Vl(e){switch(e){case 99:return zl;case 98:return Ml;case 97:return Ol;case 96:return Il;case 95:return Rl;default:throw Error(o(332))}}function Bl(e,t){return e=Vl(e),xl(e,t)}function Wl(e,t,n){return e=Vl(e),El(e,t,n)}function Ql(){if(null!==ql){var e=ql;ql=null,Cl(e)}Kl()}function Kl(){if(!Al&&null!==Ul){Al=!0;var e=0;try{var t=Ul;Bl(99,(function(){for(;em?(g=f,f=null):g=f.sibling;var v=p(l,f,i[m],u);if(null===v){null===f&&(f=g);break}e&&f&&null===v.alternate&&t(l,f),o=a(v,o,m),null===c?s=v:c.sibling=v,c=v,f=g}if(m===i.length)return n(l,f),s;if(null===f){for(;mg?(v=m,m=null):v=m.sibling;var b=p(l,m,y.value,s);if(null===b){null===m&&(m=v);break}e&&m&&null===b.alternate&&t(l,m),i=a(b,i,g),null===f?c=b:f.sibling=b,f=b,m=v}if(y.done)return n(l,m),c;if(null===m){for(;!y.done;g++,y=u.next())null!==(y=d(l,y.value,s))&&(i=a(y,i,g),null===f?c=y:f.sibling=y,f=y);return c}for(m=r(l,m);!y.done;g++,y=u.next())null!==(y=h(m,l,g,y.value,s))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),i=a(y,i,g),null===f?c=y:f.sibling=y,f=y);return e&&m.forEach((function(e){return t(l,e)})),c}return function(e,r,a,u){var s="object"==typeof a&&null!==a&&a.type===x&&null===a.key;s&&(a=a.props.children);var c="object"==typeof a&&null!==a;if(c)switch(a.$$typeof){case w:e:{for(c=a.key,s=r;null!==s;){if(s.key===c){if(7===s.tag){if(a.type===x){n(e,s.sibling),(r=l(s,a.props.children)).return=e,e=r;break e}}else if(s.elementType===a.type){n(e,s.sibling),(r=l(s,a.props)).ref=wa(e,s,a),r.return=e,e=r;break e}n(e,s);break}t(e,s),s=s.sibling}a.type===x?((r=Bu(a.props.children,e.mode,u,a.key)).return=e,e=r):((u=Vu(a.type,a.key,a.props,null,e.mode,u)).ref=wa(e,r,a),u.return=e,e=u)}return i(e);case S:e:{for(s=a.key;null!==r;){if(r.key===s){if(4===r.tag&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),(r=l(r,a.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Ku(a,e.mode,u)).return=e,e=r}return i(e)}if("string"==typeof a||"number"==typeof a)return a=""+a,null!==r&&6===r.tag?(n(e,r.sibling),(r=l(r,a)).return=e,e=r):(n(e,r),(r=Qu(a,e.mode,u)).return=e,e=r),i(e);if(_a(a))return m(e,r,a,u);if(j(a))return g(e,r,a,u);if(c&&Sa(e,a),void 0===a&&!s)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(o(152,Q(e.type)||"Component"))}return n(e,r)}}var Ea=xa(!0),Ca=xa(!1),Pa={},La=ul(Pa),Ta=ul(Pa),Na=ul(Pa);function za(e){if(e===Pa)throw Error(o(174));return e}function Ma(e,t){switch(cl(Na,t),cl(Ta,e),cl(La,Pa),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:pe(null,"");break;default:t=pe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}sl(La),cl(La,t)}function Oa(){sl(La),sl(Ta),sl(Na)}function Ia(e){za(Na.current);var t=za(La.current),n=pe(t,e.type);t!==n&&(cl(Ta,e),cl(La,n))}function Ra(e){Ta.current===e&&(sl(La),sl(Ta))}var Da=ul(0);function Fa(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ua=null,qa=null,Aa=!1;function $a(e,t){var n=$u(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function ja(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Ha(e){if(Aa){var t=qa;if(t){var n=t;if(!ja(e,t)){if(!(t=Qr(n.nextSibling))||!ja(e,t))return e.flags=-1025&e.flags|2,Aa=!1,void(Ua=e);$a(Ua,n)}Ua=e,qa=Qr(t.firstChild)}else e.flags=-1025&e.flags|2,Aa=!1,Ua=e}}function Va(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Ua=e}function Ba(e){if(e!==Ua)return!1;if(!Aa)return Va(e),Aa=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Hr(t,e.memoizedProps))for(t=qa;t;)$a(e,t),t=Qr(t.nextSibling);if(Va(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){qa=Qr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}qa=null}}else qa=Ua?Qr(e.stateNode.nextSibling):null;return!0}function Wa(){qa=Ua=null,Aa=!1}var Qa=[];function Ka(){for(var e=0;ea))throw Error(o(301));a+=1,eo=Ja=null,t.updateQueue=null,Ya.current=Io,e=n(r,l)}while(no)}if(Ya.current=zo,t=null!==Ja&&null!==Ja.next,Ga=0,eo=Ja=Za=null,to=!1,t)throw Error(o(300));return e}function oo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===eo?Za.memoizedState=eo=e:eo=eo.next=e,eo}function io(){if(null===Ja){var e=Za.alternate;e=null!==e?e.memoizedState:null}else e=Ja.next;var t=null===eo?Za.memoizedState:eo.next;if(null!==t)eo=t,Ja=e;else{if(null===e)throw Error(o(310));e={memoizedState:(Ja=e).memoizedState,baseState:Ja.baseState,baseQueue:Ja.baseQueue,queue:Ja.queue,next:null},null===eo?Za.memoizedState=eo=e:eo=eo.next=e}return eo}function uo(e,t){return"function"==typeof t?t(e):t}function so(e){var t=io(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=Ja,l=r.baseQueue,a=n.pending;if(null!==a){if(null!==l){var i=l.next;l.next=a.next,a.next=i}r.baseQueue=l=a,n.pending=null}if(null!==l){l=l.next,r=r.baseState;var u=i=a=null,s=l;do{var c=s.lane;if((Ga&c)===c)null!==u&&(u=u.next={lane:0,action:s.action,eagerReducer:s.eagerReducer,eagerState:s.eagerState,next:null}),r=s.eagerReducer===e?s.eagerState:e(r,s.action);else{var f={lane:c,action:s.action,eagerReducer:s.eagerReducer,eagerState:s.eagerState,next:null};null===u?(i=u=f,a=r):u=u.next=f,Za.lanes|=c,Ui|=c}s=s.next}while(null!==s&&s!==l);null===u?a=r:u.next=i,sr(r,t.memoizedState)||(Do=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=u,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function co(e){var t=io(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,l=n.pending,a=t.memoizedState;if(null!==l){n.pending=null;var i=l=l.next;do{a=e(a,i.action),i=i.next}while(i!==l);sr(a,t.memoizedState)||(Do=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function fo(e,t,n){var r=t._getVersion;r=r(t._source);var l=t._workInProgressVersionPrimary;if(null!==l?e=l===r:(e=e.mutableReadLanes,(e=(Ga&e)===e)&&(t._workInProgressVersionPrimary=r,Qa.push(t))),e)return n(t._source);throw Qa.push(t),Error(o(350))}function po(e,t,n,r){var l=Ni;if(null===l)throw Error(o(349));var a=t._getVersion,i=a(t._source),u=Ya.current,s=u.useState((function(){return fo(l,t,n)})),c=s[1],f=s[0];s=eo;var d=e.memoizedState,p=d.refs,h=p.getSnapshot,m=d.source;d=d.subscribe;var g=Za;return e.memoizedState={refs:p,source:t,subscribe:r},u.useEffect((function(){p.getSnapshot=n,p.setSnapshot=c;var e=a(t._source);if(!sr(i,e)){e=n(t._source),sr(f,e)||(c(e),e=cu(g),l.mutableReadLanes|=e&l.pendingLanes),e=l.mutableReadLanes,l.entangledLanes|=e;for(var r=l.entanglements,o=e;0n?98:n,(function(){e(!0)})),Bl(97<\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),"select"===n&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Gr]=t,e[Zr]=r,Qo(e,t),t.stateNode=e,s=xe(n,r),n){case"dialog":Tr("cancel",e),Tr("close",e),a=r;break;case"iframe":case"object":case"embed":Tr("load",e),a=r;break;case"video":case"audio":for(a=0;aHi&&(t.flags|=64,i=!0,ri(r,!1),t.lanes=33554432)}else{if(!i)if(null!==(e=Fa(s))){if(t.flags|=64,i=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),ri(r,!0),null===r.tail&&"hidden"===r.tailMode&&!s.alternate&&!Aa)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*jl()-r.renderingStartTime>Hi&&1073741824!==n&&(t.flags|=64,i=!0,ri(r,!1),t.lanes=33554432);r.isBackwards?(s.sibling=t.child,t.child=s):(null!==(n=r.last)?n.sibling=s:t.child=s,r.last=s)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=jl(),n.sibling=null,t=Da.current,cl(Da,i?1&t|2:1&t),n):null;case 23:case 24:return ku(),null!==e&&null!==e.memoizedState!=(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(o(156,t.tag))}function ai(e){switch(e.tag){case 1:gl(e.type)&&vl();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Oa(),sl(pl),sl(dl),Ka(),0!=(64&(t=e.flags)))throw Error(o(285));return e.flags=-4097&t|64,e;case 5:return Ra(e),null;case 13:return sl(Da),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return sl(Da),null;case 4:return Oa(),null;case 10:return na(e),null;case 23:case 24:return ku(),null;default:return null}}function oi(e,t){try{var n="",r=t;do{n+=W(r),r=r.return}while(r);var l=n}catch(e){l="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:l}}function ii(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}Qo=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ko=function(e,t,n,r){var a=e.memoizedProps;if(a!==r){e=t.stateNode,za(La.current);var o,i=null;switch(n){case"input":a=J(e,a),r=J(e,r),i=[];break;case"option":a=ae(e,a),r=ae(e,r),i=[];break;case"select":a=l({},a,{value:void 0}),r=l({},r,{value:void 0}),i=[];break;case"textarea":a=ie(e,a),r=ie(e,r),i=[];break;default:"function"!=typeof a.onClick&&"function"==typeof r.onClick&&(e.onclick=qr)}for(f in Se(n,r),n=null,a)if(!r.hasOwnProperty(f)&&a.hasOwnProperty(f)&&null!=a[f])if("style"===f){var s=a[f];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==f&&"children"!==f&&"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(u.hasOwnProperty(f)?i||(i=[]):(i=i||[]).push(f,null));for(f in r){var c=r[f];if(s=null!=a?a[f]:void 0,r.hasOwnProperty(f)&&c!==s&&(null!=c||null!=s))if("style"===f)if(s){for(o in s)!s.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&s[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(i||(i=[]),i.push(f,n)),n=c;else"dangerouslySetInnerHTML"===f?(c=c?c.__html:void 0,s=s?s.__html:void 0,null!=c&&s!==c&&(i=i||[]).push(f,c)):"children"===f?"string"!=typeof c&&"number"!=typeof c||(i=i||[]).push(f,""+c):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&(u.hasOwnProperty(f)?(null!=c&&"onScroll"===f&&Tr("scroll",e),i||s===c||(i=[])):"object"==typeof c&&null!==c&&c.$$typeof===R?c.toString():(i=i||[]).push(f,c))}n&&(i=i||[]).push("style",n);var f=i;(t.updateQueue=f)&&(t.flags|=4)}},Yo=function(e,t,n,r){n!==r&&(t.flags|=4)};var ui="function"==typeof WeakMap?WeakMap:Map;function si(e,t,n){(n=sa(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Qi||(Qi=!0,Ki=r),ii(0,t)},n}function ci(e,t,n){(n=sa(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var l=t.value;n.payload=function(){return ii(0,t),r(l)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===Yi?Yi=new Set([this]):Yi.add(this),ii(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var fi="function"==typeof WeakSet?WeakSet:Set;function di(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Fu(e,t)}else t.current=null}function pi(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Xl(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Wr(t.stateNode.containerInfo))}throw Error(o(163))}function hi(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3==(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var l=e;r=l.next,0!=(4&(l=l.tag))&&0!=(1&l)&&(Iu(n,e),Ou(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Xl(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&pa(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}pa(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&jr(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&_t(n)))))}throw Error(o(163))}function mi(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"==typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var l=n.memoizedProps.style;l=null!=l&&l.hasOwnProperty("display")?l.display:null,r.style.display=ke("display",l)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function gi(e,t){if(Sl&&"function"==typeof Sl.onCommitFiberUnmount)try{Sl.onCommitFiberUnmount(wl,t)}catch(e){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,l=r.destroy;if(r=r.tag,void 0!==l)if(0!=(4&r))Iu(t,n);else{r=t;try{l()}catch(e){Fu(r,e)}}n=n.next}while(n!==e)}break;case 1:if(di(t),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){Fu(t,e)}break;case 5:di(t);break;case 4:wi(e,t)}}function vi(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 yi(e){return 5===e.tag||3===e.tag||4===e.tag}function bi(e){e:{for(var t=e.return;null!==t;){if(yi(t))break e;t=t.return}throw Error(o(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(o(161))}16&n.flags&&(ve(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||yi(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?ki(e,n,t):_i(e,n,t)}function ki(e,t,n){var r=e.tag,l=5===r||6===r;if(l)e=l?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=qr));else if(4!==r&&null!==(e=e.child))for(ki(e,t,n),e=e.sibling;null!==e;)ki(e,t,n),e=e.sibling}function _i(e,t,n){var r=e.tag,l=5===r||6===r;if(l)e=l?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(_i(e,t,n),e=e.sibling;null!==e;)_i(e,t,n),e=e.sibling}function wi(e,t){for(var n,r,l=t,a=!1;;){if(!a){a=l.return;e:for(;;){if(null===a)throw Error(o(160));switch(n=a.stateNode,a.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}a=a.return}a=!0}if(5===l.tag||6===l.tag){e:for(var i=e,u=l,s=u;;)if(gi(i,s),null!==s.child&&4!==s.tag)s.child.return=s,s=s.child;else{if(s===u)break e;for(;null===s.sibling;){if(null===s.return||s.return===u)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}r?(i=n,u=l.stateNode,8===i.nodeType?i.parentNode.removeChild(u):i.removeChild(u)):n.removeChild(l.stateNode)}else if(4===l.tag){if(null!==l.child){n=l.stateNode.containerInfo,r=!0,l.child.return=l,l=l.child;continue}}else if(gi(e,l),null!==l.child){l.child.return=l,l=l.child;continue}if(l===t)break;for(;null===l.sibling;){if(null===l.return||l.return===t)return;4===(l=l.return).tag&&(a=!1)}l.sibling.return=l.return,l=l.sibling}}function Si(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3==(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:case 12:case 17:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var l=null!==e?e.memoizedProps:r;e=t.type;var a=t.updateQueue;if(t.updateQueue=null,null!==a){for(n[Zr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),xe(e,l),t=xe(e,r),l=0;ll&&(l=i),n&=~a}if(n=l,10<(n=(120>(n=jl()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Ci(n/1960))-n)){e.timeoutHandle=Vr(Tu.bind(null,e),n);break}Tu(e);break;default:throw Error(o(329))}}return pu(e,jl()),e.callbackNode===t?hu.bind(null,e):null}function mu(e,t){for(t&=~Ai,t&=~qi,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0 component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Ri&&(Ri=2),u=oi(u,i),d=o;do{switch(d.tag){case 3:a=u,d.flags|=4096,t&=-t,d.lanes|=t,fa(d,si(0,a,t));break e;case 1:a=u;var _=d.type,w=d.stateNode;if(0==(64&d.flags)&&("function"==typeof _.getDerivedStateFromError||null!==w&&"function"==typeof w.componentDidCatch&&(null===Yi||!Yi.has(w)))){d.flags|=4096,t&=-t,d.lanes|=t,fa(d,ci(d,a,t));break e}}d=d.return}while(null!==d)}Lu(n)}catch(e){t=e,zi===n&&null!==n&&(zi=n=n.return);continue}break}}function Su(){var e=Pi.current;return Pi.current=zo,null===e?zo:e}function xu(e,t){var n=Ti;Ti|=16;var r=Su();for(Ni===e&&Mi===t||_u(e,t);;)try{Eu();break}catch(t){wu(e,t)}if(ta(),Ti=n,Pi.current=r,null!==zi)throw Error(o(261));return Ni=null,Mi=0,Ri}function Eu(){for(;null!==zi;)Pu(zi)}function Cu(){for(;null!==zi&&!Pl();)Pu(zi)}function Pu(e){var t=Bi(e.alternate,e,Oi);e.memoizedProps=e.pendingProps,null===t?Lu(e):zi=t,Li.current=null}function Lu(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(2048&t.flags)){if(null!==(n=li(n,t,Oi)))return void(zi=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!=(1073741824&Oi)||0==(4&n.mode)){for(var r=0,l=n.child;null!==l;)r|=l.lanes|l.childLanes,l=l.sibling;n.childLanes=r}null!==e&&0==(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1i&&(u=i,i=w,w=u),u=pr(b,w),a=pr(b,i),u&&a&&(1!==_.rangeCount||_.anchorNode!==u.node||_.anchorOffset!==u.offset||_.focusNode!==a.node||_.focusOffset!==a.offset)&&((k=k.createRange()).setStart(u.node,u.offset),_.removeAllRanges(),w>i?(_.addRange(k),_.extend(a.node,a.offset)):(k.setEnd(a.node,a.offset),_.addRange(k))))),k=[];for(_=b;_=_.parentNode;)1===_.nodeType&&k.push({element:_,left:_.scrollLeft,top:_.scrollTop});for("function"==typeof b.focus&&b.focus(),b=0;bjl()-ji?_u(e,0):Ai|=n),pu(e,t)}function qu(e,t){var n=e.stateNode;null!==n&&n.delete(t),0==(t=0)&&(0==(2&(t=e.mode))?t=1:0==(4&t)?t=99===Hl()?1:2:(0===au&&(au=Fi),0===(t=At(62914560&~au))&&(t=4194304))),n=su(),null!==(e=du(e,t))&&(jt(e,t,n),pu(e,n))}function Au(e,t,n,r){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=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function $u(e,t,n,r){return new Au(e,t,n,r)}function ju(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Hu(e,t){var n=e.alternate;return null===n?((n=$u(e.tag,t,e.key,e.mode)).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=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Vu(e,t,n,r,l,a){var i=2;if(r=e,"function"==typeof e)ju(e)&&(i=1);else if("string"==typeof e)i=5;else e:switch(e){case x:return Bu(n.children,l,a,t);case D:i=8,l|=16;break;case E:i=8,l|=1;break;case C:return(e=$u(12,n,t,8|l)).elementType=C,e.type=C,e.lanes=a,e;case N:return(e=$u(13,n,t,l)).type=N,e.elementType=N,e.lanes=a,e;case z:return(e=$u(19,n,t,l)).elementType=z,e.lanes=a,e;case F:return Wu(n,l,a,t);case U:return(e=$u(24,n,t,l)).elementType=U,e.lanes=a,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case P:i=10;break e;case L:i=9;break e;case T:i=11;break e;case M:i=14;break e;case O:i=16,r=null;break e;case I:i=22;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=$u(i,n,t,l)).elementType=e,t.type=r,t.lanes=a,t}function Bu(e,t,n,r){return(e=$u(7,e,r,t)).lanes=n,e}function Wu(e,t,n,r){return(e=$u(23,e,r,t)).elementType=F,e.lanes=n,e}function Qu(e,t,n){return(e=$u(6,e,null,t)).lanes=n,e}function Ku(e,t,n){return(t=$u(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Yu(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=$t(0),this.expirationTimes=$t(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$t(0),this.mutableSourceEagerHydrationData=null}function Xu(e,t,n){var r=3{!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(448)},408:(e,t,n)=>{var r=n(418),l=60103,a=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var o=60109,i=60110,u=60112;t.Suspense=60113;var s=60115,c=60116;if("function"==typeof Symbol&&Symbol.for){var f=Symbol.for;l=f("react.element"),a=f("react.portal"),t.Fragment=f("react.fragment"),t.StrictMode=f("react.strict_mode"),t.Profiler=f("react.profiler"),o=f("react.provider"),i=f("react.context"),u=f("react.forward_ref"),t.Suspense=f("react.suspense"),s=f("react.memo"),c=f("react.lazy")}var d="function"==typeof Symbol&&Symbol.iterator;function p(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n{e.exports=n(408)},53:(e,t)=>{var n,r,l,a;if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var i=Date,u=i.now();t.unstable_now=function(){return i.now()-u}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var s=null,c=null,f=function(){if(null!==s)try{var e=t.unstable_now();s(!0,e),s=null}catch(e){throw setTimeout(f,0),e}};n=function(e){null!==s?setTimeout(n,0,e):(s=e,setTimeout(f,0))},r=function(e,t){c=setTimeout(e,t)},l=function(){clearTimeout(c)},t.unstable_shouldYield=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var d=window.setTimeout,p=window.clearTimeout;if("undefined"!=typeof console){var h=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof h&&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 m=!1,g=null,v=-1,y=5,b=0;t.unstable_shouldYield=function(){return t.unstable_now()>=b},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125>>1,l=e[r];if(!(void 0!==l&&0E(o,n))void 0!==u&&0>E(u,o)?(e[r]=u,e[i]=n,r=i):(e[r]=o,e[a]=n,r=a);else{if(!(void 0!==u&&0>E(u,n)))break e;e[r]=u,e[i]=n,r=i}}}return t}return null}function E(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var C=[],P=[],L=1,T=null,N=3,z=!1,M=!1,O=!1;function I(e){for(var t=S(P);null!==t;){if(null===t.callback)x(P);else{if(!(t.startTime<=e))break;x(P),t.sortIndex=t.expirationTime,w(C,t)}t=S(P)}}function R(e){if(O=!1,I(e),!M)if(null!==S(C))M=!0,n(D);else{var t=S(P);null!==t&&r(R,t.startTime-e)}}function D(e,n){M=!1,O&&(O=!1,l()),z=!0;var a=N;try{for(I(n),T=S(C);null!==T&&(!(T.expirationTime>n)||e&&!t.unstable_shouldYield());){var o=T.callback;if("function"==typeof o){T.callback=null,N=T.priorityLevel;var i=o(T.expirationTime<=n);n=t.unstable_now(),"function"==typeof i?T.callback=i:T===S(C)&&x(C),I(n)}else x(C);T=S(C)}if(null!==T)var u=!0;else{var s=S(P);null!==s&&r(R,s.startTime-n),u=!1}return u}finally{T=null,N=a,z=!1}}var F=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){M||z||(M=!0,n(D))},t.unstable_getCurrentPriorityLevel=function(){return N},t.unstable_getFirstCallbackNode=function(){return S(C)},t.unstable_next=function(e){switch(N){case 1:case 2:case 3:var t=3;break;default:t=N}var n=N;N=t;try{return e()}finally{N=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=F,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=N;N=e;try{return t()}finally{N=n}},t.unstable_scheduleCallback=function(e,a,o){var i=t.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0i?(e.sortIndex=o,w(P,e),null===S(C)&&e===S(P)&&(O?l():O=!0,r(R,o-i))):(e.sortIndex=u,w(C,e),M||z||(M=!0,n(D))),e},t.unstable_wrapCallback=function(e){var t=N;return function(){var n=N;N=t;try{return e.apply(this,arguments)}finally{N=n}}}},840:(e,t,n)=>{e.exports=n(53)}},t={};function n(r){var l=t[r];if(void 0!==l)return l.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}(()=>{var e=n(294),t=n(935);const r=function(t){return e.createElement(e.Fragment,null,e.createElement("h3",{"data-l10n-id":"pocket-panel-home-explore-popular-topics"}),e.createElement("ul",null,t.topics.map((n=>e.createElement("li",{key:`item-${n.topic}`},e.createElement("a",{className:"pkt_ext_topic",href:`https://${t.pockethost}/explore/${n.topic}?utm_source=${t.utmsource}`},n.title,e.createElement("span",{className:"pkt_ext_chevron_right"})))))),e.createElement("a",{className:"pkt_ext_discover",href:`https://${t.pockethost}/explore?utm_source=${t.utmsource}`,"data-l10n-id":"pocket-panel-home-discover-more"}))},l={removeMessageListener(e,t){RPMRemoveMessageListener(e,t)},addMessageListener(e,t=(()=>{})){RPMAddMessageListener(e,t)},sendMessage(e,t={},n){if(n){const t=`${e}_response`;var r=e=>{n(e),this.removeMessageListener(t,r)};this.addMessageListener(t,r)}RPMSendAsyncMessage(e,t)},clickHelper(e,{source:t="",position:n}){e?.addEventListener("click",(e=>{e.preventDefault(),this.sendMessage("PKT_openTabWithUrl",{url:e.currentTarget.getAttribute("href"),activate:!0,source:t,position:n})}))},log(){RPMSendAsyncMessage("PKT_log",arguments)}};var a=function(e){this.inited=!1,this.active=!1,this.pockethost="getpocket.com",this.parseHTML=function(e){return(new DOMParser).parseFromString(e,"text/html").documentElement},this.setupClickEvents=function(){l.clickHelper(document.querySelector(".pkt_ext_mylist"),{source:"home_view_list"}),l.clickHelper(document.querySelector(".pkt_ext_discover"),{source:"home_discover"}),document.querySelectorAll(".pkt_ext_topic").forEach(((e,t)=>{l.clickHelper(e,{source:"home_topic",position:t})}))}};a.prototype={create(){var n=window.location.href.match(/pockethost=([\w|\.]*)&?/);n&&n.length>1&&(this.pockethost=n[1]);var a=window.location.href.match(/locale=([\w|\.]*)&?/);if(a&&a.length>1&&(this.locale=a[1].toLowerCase()),this.active)return;this.active=!0;const o={pockethost:this.pockethost,utmsource:"firefox-button"};this.locale&&document.querySelector("body").classList.add(`pkt_ext_home_${this.locale}`),document.querySelector("body").append(this.parseHTML(Handlebars.templates.home_shell(o))),this.locale.startsWith("en")&&t.render(e.createElement(r,{pockethost:o.pockethost,utmsource:o.utmsource,topics:[{title:"Self Improvement",topic:"self-improvement"},{title:"Food",topic:"food"},{title:"Entertainment",topic:"entertainment"},{title:"Science",topic:"science"}]}),document.querySelector(".pkt_ext_more")),this.setupClickEvents(),l.sendMessage("PKT_show_home")}};const o=a,i=function(e){this.inited=!1,this.active=!1,this.setupClickEvents=function(){l.clickHelper(document.querySelector(".pkt_ext_learnmore"),{source:"learn_more"}),l.clickHelper(document.querySelector(".signup-btn-firefox"),{source:"sign_up_1"}),l.clickHelper(document.querySelector(".signup-btn-email"),{source:"sign_up_2"}),l.clickHelper(document.querySelector(".pkt_ext_login"),{source:"log_in"})},this.create=function(){const e=new DOMParser;let t=document.querySelector("body"),n=new URL(window.location.href).searchParams,r=n.get("pockethost")||"getpocket.com",a=n.get("utmCampaign")||"firefox_door_hanger_menu",o=n.get("utmSource")||"control",i=n.get("locale")?.split("-")[0].toLowerCase();if(this.active)return;this.active=!0;const u={pockethost:r,utmCampaign:a,utmSource:o};i&&t.classList.add(`pkt_ext_signup_${i}`),t.append(e.parseFromString(Handlebars.templates.signup_shell(u),"text/html").documentElement),this.setupClickEvents(),l.sendMessage("PKT_show_signup")}};var u=function(e){var t=this;this.inited=!1,this.active=!1,this.pockethost="getpocket.com",this.savedItemId=0,this.savedUrl="",this.premiumStatus=!1,this.userTags=[],this.tagsDropdownOpen=!1,this.fxasignedin=!1,this.parseHTML=function(e){return(new DOMParser).parseFromString(e,"text/html").documentElement},this.fillTagContainer=function(e,t,n){for(;t.firstChild;)t.firstChild.remove();for(let r=0;r${e[r]}`);t.append(l)}},this.fillUserTags=function(){l.sendMessage("PKT_getTags",{},(function(e){const{data:n}=e;"object"==typeof n&&"object"==typeof n.tags&&(t.userTags=n.tags)}))},this.fillSuggestedTags=function(){document.querySelector(".pkt_ext_suggestedtag_detail")?(document.querySelector(".pkt_ext_subshell").style.display="block",l.sendMessage("PKT_getSuggestedTags",{url:t.savedUrl},(function(e){const{data:n}=e;if(document.querySelector(".pkt_ext_suggestedtag_detail").classList.remove("pkt_ext_suggestedtag_detail_loading"),"success"==n.status){var r=[];for(let e=0;e${n.error.message}
`);document.querySelector(".pkt_ext_suggestedtag_detail").append(e),this.suggestedTagsLoaded=!0}}))):t.suggestedTagsLoaded=!0},this.closePopup=function(){l.sendMessage("PKT_close")},this.checkValidTagSubmit=function(){let e=document.querySelector(".pkt_ext_tag_input_wrapper .token-input-input-token input").value.trim().length;document.querySelector(".pkt_ext_containersaved .token-input-token")||e>0&&e<26?document.querySelector(".pkt_ext_containersaved .pkt_ext_btn").classList.remove("pkt_ext_btn_disabled"):document.querySelector(".pkt_ext_containersaved .pkt_ext_btn").classList.add("pkt_ext_btn_disabled"),t.updateSlidingTagList()},this.updateSlidingTagList=function(){let e="ltr"===document.dir?"left":"right",t="ltr"===document.dir?"offsetLeft":"offsetRight",n=document.querySelector(".token-input-list"),r=document.querySelector(".token-input-input-token input")[t],l=n[t],a=l-parseInt(getComputedStyle(n)[e]),o=document.querySelector(".pkt_ext_tag_input_wrapper").offsetWidth;n.style[e]=r+l+20>o?`${Math.min(-1*(r+a-o+20),0)}px`:0},this.checkPlaceholderStatus=function(){if(document.querySelector(".pkt_ext_containersaved .pkt_ext_tag_input_wrapper .token-input-token"))document.querySelector(".pkt_ext_containersaved .token-input-input-token input").setAttribute("placeholder","");else{let e=document.querySelector(".pkt_ext_containersaved .token-input-input-token input");e.setAttribute("placeholder",document.querySelector(".pkt_ext_tag_input").getAttribute("placeholder")),e.style.width="200px"}},this.initTagInput=function(){var e=$(".pkt_ext_tag_input_wrapper");e.find(".pkt_ext_tag_input").tokenInput([],{searchDelay:200,minChars:1,animateDropdown:!1,noResultsHideDropdown:!0,scrollKeyboard:!0,emptyInputLength:200,search_function(n,r){var l=[];if(n.length)for(var a=15,o=new RegExp("^"+n),i=0;i0&&(l.push({name:t.userTags[i]}),a--);$(".token-input-dropdown-tag").data("init")||($(".token-input-dropdown-tag").css("width",e.outerWidth()).data("init"),e.append($(".token-input-dropdown-tag"))),r(l)},validateItem(e){const n=e.name;return $.trim(n).length>25||!$.trim(n).length?(n.length>25&&(t.showTagsLocalizedError("pocket-panel-saved-error-tag-length"),this.changestamp=Date.now(),setTimeout((function(){$(".token-input-input-token input").val(n).focus()}),10)),!1):(t.hideTagsError(),!0)},textToData:e=>({name:t.sanitizeText(e.toLowerCase())}),onReady(){$(".token-input-dropdown").addClass("token-input-dropdown-tag"),e.find(".token-input-input-token input").attr("data-l10n-id",e.find(".pkt_ext_tag_input").attr("data-l10n-id")).css("width","200px"),$(".pkt_ext_suggestedtag_detail").length&&$(".pkt_ext_containersaved").find(".pkt_ext_suggestedtag_detail").on("click",".token_tag",(function(t){t.preventDefault();var n=$(t.target);$(this).parents(".pkt_ext_suggestedtag_detail_disabled").length||(e.find(".pkt_ext_tag_input").tokenInput("add",{id:e.find(".token-input-token").length,name:n.text()}),n.addClass("token-suggestedtag-inactive"),$(".token-input-input-token input").focus())})),$(".token-input-list").on("keydown","input",(function(e){37==e.which&&t.updateSlidingTagList(),9===e.which&&$("a.pkt_ext_learn_more").focus()})).on("keypress","input",(function(e){13==e.which&&(void 0===this.changestamp||Date.now()-this.changestamp>250)&&(e.preventDefault(),document.querySelector(".pkt_ext_containersaved .pkt_ext_btn").click())})).on("keyup","input",(function(e){t.checkValidTagSubmit()})),t.checkPlaceholderStatus()},onAdd(){t.checkValidTagSubmit(),this.changestamp=Date.now(),t.hideInactiveTags(),t.checkPlaceholderStatus()},onDelete(){t.checkValidTagSubmit(),this.changestamp=Date.now(),t.showActiveTags(),t.checkPlaceholderStatus()},onShowDropdown(){t.tagsDropdownOpen=!0},onHideDropdown(){t.tagsDropdownOpen=!1}}),$("body").on("keydown",(function(t){if(8==(t.keyCode||t.which)){var n=$(".token-input-selected-token");n.length&&(t.preventDefault(),t.stopImmediatePropagation(),e.find(".pkt_ext_tag_input").tokenInput("remove",{name:n.find("p").text()}))}else $(t.target).parent().hasClass("token-input-input-token")&&t.stopImmediatePropagation()}))},this.disableInput=function(){document.querySelector(".pkt_ext_containersaved .pkt_ext_item_actions").classList.add("pkt_ext_item_actions_disabled"),document.querySelector(".pkt_ext_containersaved .pkt_ext_btn").classList.add("pkt_ext_btn_disabled"),document.querySelector(".pkt_ext_containersaved .pkt_ext_tag_input_wrapper").classList.add("pkt_ext_tag_input_wrapper_disabled"),document.querySelector(".pkt_ext_containersaved .pkt_ext_suggestedtag_detail")&&document.querySelector(".pkt_ext_containersaved .pkt_ext_suggestedtag_detail").classList.add("pkt_ext_suggestedtag_detail_disabled")},this.enableInput=function(){document.querySelector(".pkt_ext_containersaved .pkt_ext_item_actions").classList.remove("pkt_ext_item_actions_disabled"),this.checkValidTagSubmit(),document.querySelector(".pkt_ext_containersaved .pkt_ext_tag_input_wrapper").classList.remove("pkt_ext_tag_input_wrapper_disabled"),document.querySelector(".pkt_ext_containersaved .pkt_ext_suggestedtag_detail")&&document.querySelector(".pkt_ext_containersaved .pkt_ext_suggestedtag_detail").classList.remove("pkt_ext_suggestedtag_detail_disabled")},this.initAddTagInput=function(){document.querySelector(".pkt_ext_btn").addEventListener("click",(e=>{if(e.preventDefault(),e.target.classList.contains("pkt_ext_btn_disabled")||document.querySelector(".pkt_ext_edit_msg_active.pkt_ext_edit_msg_error"))return;t.disableInput(),document.l10n.setAttributes(document.querySelector(".pkt_ext_containersaved .pkt_ext_detail h2"),"pocket-panel-saved-processing-tags");let n=[];document.querySelectorAll(".token-input-token p").forEach((e=>{let t=e.textContent.trim();t.length&&n.push(t)})),l.sendMessage("PKT_addTags",{url:t.savedUrl,tags:n},(function(e){const{data:n}=e;if("success"==n.status)t.showStateFinalLocalizedMsg("pocket-panel-saved-tags-saved");else if("error"==n.status){let e=document.querySelector(".pkt_ext_edit_msg");e.classList.add("pkt_ext_edit_msg_error","pkt_ext_edit_msg_active"),e.textContent=n.error.message}}))}))},this.initRemovePageInput=function(){document.querySelector(".pkt_ext_removeitem").addEventListener("click",(e=>{document.querySelector(".pkt_ext_subshell").style.display="none",e.target.closest(".pkt_ext_item_actions_disabled")?e.preventDefault():e.target.classList.contains("pkt_ext_removeitem")&&(e.preventDefault(),t.disableInput(),document.l10n.setAttributes(document.querySelector(".pkt_ext_containersaved .pkt_ext_detail h2"),"pocket-panel-saved-processing-remove"),l.sendMessage("PKT_deleteItem",{itemId:t.savedItemId},(function(e){const{data:n}=e;if("success"==n.status)t.showStateFinalLocalizedMsg("pocket-panel-saved-page-removed");else if("error"==n.status){let e=document.querySelector(".pkt_ext_edit_msg");e.classList.add("pkt_ext_edit_msg_error","pkt_ext_edit_msg_active"),e.textContent=n.error.message}})))}))},this.initOpenListInput=function(){l.clickHelper(document.querySelector(".pkt_ext_openpocket"),{source:"view_list"})},this.showTagsLocalizedError=function(e){document.querySelector(".pkt_ext_edit_msg")?.classList.add("pkt_ext_edit_msg_error","pkt_ext_edit_msg_active"),document.l10n.setAttributes(document.querySelector(".pkt_ext_edit_msg"),e),document.querySelector(".pkt_ext_tag_detail")?.classList.add("pkt_ext_tag_error")},this.hideTagsError=function(){document.querySelector(".pkt_ext_edit_msg")?.classList.remove("pkt_ext_edit_msg_error","pkt_ext_edit_msg_active"),document.querySelector(".pkt_ext_edit_msg").textContent="",document.querySelector("pkt_ext_tag_detail")?.classList.remove("pkt_ext_tag_error")},this.showActiveTags=function(){if(!document.querySelector(".pkt_ext_suggestedtag_detail"))return;let e=[];document.querySelectorAll(".token-input-token p").forEach((t=>{e.push(t.textContent)})),document.querySelectorAll(".pkt_ext_suggestedtag_detail .token_tag_inactive").forEach((t=>{e.includes(t.textContent)||t.classList.remove("token_tag_inactive")}))},this.hideInactiveTags=function(){if(!document.querySelector(".pkt_ext_suggestedtag_detail"))return;let e=[];document.querySelectorAll(".token-input-token p").forEach((t=>{e.push(t.textContent)})),document.querySelectorAll(".token_tag:not(.token_tag_inactive)").forEach((t=>{e.includes(t.textContent)&&t.classList.add("token_tag_inactive")}))},this.showStateSaved=function(e){document.l10n.setAttributes(document.querySelector(".pkt_ext_detail h2"),"pocket-panel-saved-page-saved"),document.querySelector(".pkt_ext_btn").classList.add("pkt_ext_btn_disabled"),"object"==typeof e.item&&(this.savedItemId=e.item.item_id,this.savedUrl=e.item.given_url),document.querySelector(".pkt_ext_containersaved").classList.add("pkt_ext_container_detailactive"),document.querySelector(".pkt_ext_containersaved").classList.remove("pkt_ext_container_finalstate"),t.fillUserTags(),t.suggestedTagsLoaded||t.fillSuggestedTags()},this.renderItemRecs=function(e){if(e?.recommendations?.length){e.recommendations=e.recommendations.map((e=>{let t=e?.item?.top_image_url||e?.item?.images[1]?.src;return e?.item?.resolved_url&&!e.item.resolved_url.match(/\?/)&&(e.item.resolved_url=`${e.item.resolved_url}?utm_source=pocket-ff-recs`),e.item.encodedThumbURL=t?encodeURIComponent(t):null,e}));const n=e.recommendations[0].experiment,r=Handlebars.templates.item_recs(e);document.querySelector("body").classList.add("recs_enabled"),document.querySelector(".pkt_ext_subshell").style.display="block",document.querySelector(".pkt_ext_item_recs").append(t.parseHTML(r)),l.clickHelper(document.querySelector(".pkt_ext_learn_more"),{source:"recs_learn_more"}),document.querySelectorAll(".pkt_ext_item_recs_link").forEach(((e,t)=>{e.addEventListener("click",(r=>{r.preventDefault(),l.sendMessage("PKT_openTabWithPocketUrl",{url:e.getAttribute("href"),model:n,position:t})}))}))}},this.sanitizeText=function(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'"};return"string"!=typeof e?"":String(e).replace(/[&<>"']/g,(function(e){return t[e]}))},this.showStateFinalLocalizedMsg=function(e){document.querySelector(".pkt_ext_containersaved .pkt_ext_tag_detail").addEventListener("transitionend",(()=>{document.l10n.setAttributes(document.querySelector(".pkt_ext_containersaved .pkt_ext_detail h2"),e)}),{once:!0}),document.querySelector(".pkt_ext_containersaved").classList.add("pkt_ext_container_finalstate")},this.showStateLocalizedError=function(e,t){document.l10n.setAttributes(document.querySelector(".pkt_ext_containersaved .pkt_ext_detail h2"),e),document.l10n.setAttributes(document.querySelector(".pkt_ext_containersaved .pkt_ext_detail h3"),t),document.querySelector(".pkt_ext_containersaved").classList.add("pkt_ext_container_detailactive","pkt_ext_container_finalstate","pkt_ext_container_finalerrorstate")}};u.prototype={create(){if(this.active)return;this.active=!0;var e=this,t=window.location.href.match(/premiumStatus=([\w|\d|\.]*)&?/);t&&t.length>1&&(this.premiumStatus="1"==t[1]);var n=window.location.href.match(/fxasignedin=([\w|\d|\.]*)&?/);n&&n.length>1&&(this.fxasignedin="1"==n[1]);var r=window.location.href.match(/pockethost=([\w|\.]*)&?/);r&&r.length>1&&(this.pockethost=r[1]);var a=window.location.href.match(/locale=([\w|\.]*)&?/);a&&a.length>1&&(this.locale=a[1].toLowerCase());const o={pockethost:this.pockethost};this.locale&&document.querySelector("body").classList.add(`pkt_ext_saved_${this.locale}`);const i=new DOMParser;if(document.querySelector("body").append(...i.parseFromString(Handlebars.templates.saved_shell(o),"text/html").body.childNodes),this.premiumStatus&&!document.querySelector(".pkt_ext_suggestedtag_detail")){let e=document.querySelector("body .pkt_ext_subshell"),t=i.parseFromString(Handlebars.templates.saved_premiumshell(o),"text/html").body.childNodes;t=[].slice.call(t).reverse(),t.forEach((t=>{e.insertBefore(t,e.firstChild)}))}this.initTagInput(),this.initAddTagInput(),this.initRemovePageInput(),this.initOpenListInput(),l.addMessageListener("PKT_saveLink",(function(t){const{data:n}=t;if("error"!=n.status)e.showStateSaved(n);else{let t=n?.error?.localizedKey||"pocket-panel-saved-error-generic";e.showStateLocalizedError("pocket-panel-saved-error-not-saved",t)}})),l.addMessageListener("PKT_renderItemRecs",(function(t){const{data:n}=t;e.renderItemRecs(n)})),l.sendMessage("PKT_show_saved")}};const s=u;var c=function(){};c.prototype={initHome(){this.overlay=new o,this.init()},initSignup(){this.overlay=new i,this.init()},initSaved(){this.overlay=new s,this.init()},setupObservers(){this.setupMutationObserver(),this.setupIntersectionObserver()},init(){this.inited||(this.setupObservers(),this.inited=!0)},resizeParent(){let e=document.body.clientHeight;this.overlay.tagsDropdownOpen&&(e=Math.max(e,252)),e&&l.sendMessage("PKT_resizePanel",{width:document.body.clientWidth,height:e})},setupIntersectionObserver(){const e=new IntersectionObserver((t=>{t.find((e=>e.isIntersecting))&&(this.resizeParent(),e.unobserve(document.body))}));e.observe(document.body)},setupMutationObserver(){const e=document.body;new MutationObserver(((e,t)=>{e.forEach((e=>{"childList"===e.type&&this.resizeParent()}))})).observe(e,{attributes:!1,childList:!0,subtree:!0})},create(){this.overlay.create()}},window.PKT_PANEL=c,window.pktPanelMessaging=l})()})();