@sesamy/sesamy-js 1.37.9 → 1.37.10
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/dist/sesamy-js.cjs +7 -7
- package/dist/sesamy-js.iife.js +7 -7
- package/dist/sesamy-js.mjs +2229 -2181
- package/package.json +3 -3
package/dist/sesamy-js.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var As=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},js={},jn,Us;function xe(){return Us||(Us=1,jn=function(e){try{return!!e()}catch{return!0}}),jn}var Un,Ls;function an(){if(Ls)return Un;Ls=1;var e=xe();return Un=!e(function(){var r=(function(){}).bind();return typeof r!="function"||r.hasOwnProperty("prototype")}),Un}var Ln,qs;function Se(){if(qs)return Ln;qs=1;var e=an(),r=Function.prototype,t=r.call,n=e&&r.bind.bind(t,t);return Ln=e?n:function(a){return function(){return t.apply(a,arguments)}},Ln}var qn,xs;function on(){if(xs)return qn;xs=1;var e=Se(),r=e({}.toString),t=e("".slice);return qn=function(n){return t(r(n),8,-1)},qn}var xn,Ns;function Pd(){if(Ns)return xn;Ns=1;var e=Se(),r=xe(),t=on(),n=Object,a=e("".split);return xn=r(function(){return!n("z").propertyIsEnumerable(0)})?function(i){return t(i)==="String"?a(i,""):n(i)}:n,xn}var Nn,Ds;function sn(){return Ds||(Ds=1,Nn=function(e){return e==null}),Nn}var Dn,$s;function un(){if($s)return Dn;$s=1;var e=sn(),r=TypeError;return Dn=function(t){if(e(t))throw new r("Can't call method on "+t);return t},Dn}var $n,Ms;function Tt(){if(Ms)return $n;Ms=1;var e=Pd(),r=un();return $n=function(t){return e(r(t))},$n}var mt,Fs;function Ie(){if(Fs)return mt;Fs=1;var e=function(r){return r&&r.Math===Math&&r};return mt=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof As=="object"&&As)||e(typeof mt=="object"&&mt)||function(){return this}()||Function("return this")(),mt}var Mn={exports:{}},Fn,Bs;function gr(){return Bs||(Bs=1,Fn=!1),Fn}var Bn,zs;function zo(){if(zs)return Bn;zs=1;var e=Ie(),r=Object.defineProperty;return Bn=function(t,n){try{r(e,t,{value:n,configurable:!0,writable:!0})}catch{e[t]=n}return n},Bn}var Hs;function Ho(){if(Hs)return Mn.exports;Hs=1;var e=gr(),r=Ie(),t=zo(),n="__core-js_shared__",a=Mn.exports=r[n]||t(n,{});return(a.versions||(a.versions=[])).push({version:"3.39.0",mode:e?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Mn.exports}var zn,Gs;function Ed(){if(Gs)return zn;Gs=1;var e=Ho();return zn=function(r,t){return e[r]||(e[r]=t||{})},zn}var Hn,Ks;function cn(){if(Ks)return Hn;Ks=1;var e=un(),r=Object;return Hn=function(t){return r(e(t))},Hn}var Gn,Ws;function tr(){if(Ws)return Gn;Ws=1;var e=Se(),r=cn(),t=e({}.hasOwnProperty);return Gn=Object.hasOwn||function(a,i){return t(r(a),i)},Gn}var Kn,Vs;function Rd(){if(Vs)return Kn;Vs=1;var e=Se(),r=0,t=Math.random(),n=e(1 .toString);return Kn=function(a){return"Symbol("+(a===void 0?"":a)+")_"+n(++r+t,36)},Kn}var Wn,Js;function Ot(){if(Js)return Wn;Js=1;var e=Ie(),r=e.navigator,t=r&&r.userAgent;return Wn=t?String(t):"",Wn}var Vn,Zs;function _d(){if(Zs)return Vn;Zs=1;var e=Ie(),r=Ot(),t=e.process,n=e.Deno,a=t&&t.versions||n&&n.version,i=a&&a.v8,o,s;return i&&(o=i.split("."),s=o[0]>0&&o[0]<4?1:+(o[0]+o[1])),!s&&r&&(o=r.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=r.match(/Chrome\/(\d+)/),o&&(s=+o[1]))),Vn=s,Vn}var Jn,Ys;function Td(){if(Ys)return Jn;Ys=1;var e=_d(),r=xe(),t=Ie(),n=t.String;return Jn=!!Object.getOwnPropertySymbols&&!r(function(){var a=Symbol("symbol detection");return!n(a)||!(Object(a)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Jn}var Zn,Xs;function Od(){if(Xs)return Zn;Xs=1;var e=Td();return Zn=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Zn}var Yn,Qs;function Ne(){if(Qs)return Yn;Qs=1;var e=Ie(),r=Ed(),t=tr(),n=Rd(),a=Td(),i=Od(),o=e.Symbol,s=r("wks"),c=i?o.for||o:o&&o.withoutSetter||n;return Yn=function(l){return t(s,l)||(s[l]=a&&t(o,l)?o[l]:c("Symbol."+l)),s[l]},Yn}var Xn,eu;function Re(){if(eu)return Xn;eu=1;var e=typeof document=="object"&&document.all;return Xn=typeof e>"u"&&e!==void 0?function(r){return typeof r=="function"||r===e}:function(r){return typeof r=="function"},Xn}var Qn,ru;function nr(){if(ru)return Qn;ru=1;var e=Re();return Qn=function(r){return typeof r=="object"?r!==null:e(r)},Qn}var ea,tu;function ur(){if(tu)return ea;tu=1;var e=nr(),r=String,t=TypeError;return ea=function(n){if(e(n))return n;throw new t(r(n)+" is not an object")},ea}var ra={},ta,nu;function De(){if(nu)return ta;nu=1;var e=xe();return ta=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),ta}var na,au;function kd(){if(au)return na;au=1;var e=De(),r=xe();return na=e&&r(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),na}var aa={},ia,iu;function ln(){if(iu)return ia;iu=1;var e=Ie(),r=nr(),t=e.document,n=r(t)&&r(t.createElement);return ia=function(a){return n?t.createElement(a):{}},ia}var oa,ou;function Cd(){if(ou)return oa;ou=1;var e=De(),r=xe(),t=ln();return oa=!e&&!r(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),oa}var sa,su;function Me(){if(su)return sa;su=1;var e=an(),r=Function.prototype.call;return sa=e?r.bind(r):function(){return r.apply(r,arguments)},sa}var ua,uu;function ar(){if(uu)return ua;uu=1;var e=Ie(),r=Re(),t=function(n){return r(n)?n:void 0};return ua=function(n,a){return arguments.length<2?t(e[n]):e[n]&&e[n][a]},ua}var ca,cu;function fn(){if(cu)return ca;cu=1;var e=Se();return ca=e({}.isPrototypeOf),ca}var la,lu;function Ad(){if(lu)return la;lu=1;var e=ar(),r=Re(),t=fn(),n=Od(),a=Object;return la=n?function(i){return typeof i=="symbol"}:function(i){var o=e("Symbol");return r(o)&&t(o.prototype,a(i))},la}var fa,fu;function dn(){if(fu)return fa;fu=1;var e=String;return fa=function(r){try{return e(r)}catch{return"Object"}},fa}var da,du;function cr(){if(du)return da;du=1;var e=Re(),r=dn(),t=TypeError;return da=function(n){if(e(n))return n;throw new t(r(n)+" is not a function")},da}var ha,hu;function Go(){if(hu)return ha;hu=1;var e=cr(),r=sn();return ha=function(t,n){var a=t[n];return r(a)?void 0:e(a)},ha}var va,vu;function gv(){if(vu)return va;vu=1;var e=Me(),r=Re(),t=nr(),n=TypeError;return va=function(a,i){var o,s;if(i==="string"&&r(o=a.toString)&&!t(s=e(o,a))||r(o=a.valueOf)&&!t(s=e(o,a))||i!=="string"&&r(o=a.toString)&&!t(s=e(o,a)))return s;throw new n("Can't convert object to primitive value")},va}var pa,pu;function yv(){if(pu)return pa;pu=1;var e=Me(),r=nr(),t=Ad(),n=Go(),a=gv(),i=Ne(),o=TypeError,s=i("toPrimitive");return pa=function(c,l){if(!r(c)||t(c))return c;var u=n(c,s),f;if(u){if(l===void 0&&(l="default"),f=e(u,c,l),!r(f)||t(f))return f;throw new o("Can't convert object to primitive value")}return l===void 0&&(l="number"),a(c,l)},pa}var ma,mu;function jd(){if(mu)return ma;mu=1;var e=yv(),r=Ad();return ma=function(t){var n=e(t,"string");return r(n)?n:n+""},ma}var gu;function Pr(){if(gu)return aa;gu=1;var e=De(),r=Cd(),t=kd(),n=ur(),a=jd(),i=TypeError,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c="enumerable",l="configurable",u="writable";return aa.f=e?t?function(h,d,v){if(n(h),d=a(d),n(v),typeof h=="function"&&d==="prototype"&&"value"in v&&u in v&&!v[u]){var m=s(h,d);m&&m[u]&&(h[d]=v.value,v={configurable:l in v?v[l]:m[l],enumerable:c in v?v[c]:m[c],writable:!1})}return o(h,d,v)}:o:function(h,d,v){if(n(h),d=a(d),n(v),r)try{return o(h,d,v)}catch{}if("get"in v||"set"in v)throw new i("Accessors not supported");return"value"in v&&(h[d]=v.value),h},aa}var ga,yu;function wv(){if(yu)return ga;yu=1;var e=Math.ceil,r=Math.floor;return ga=Math.trunc||function(n){var a=+n;return(a>0?r:e)(a)},ga}var ya,wu;function Ko(){if(wu)return ya;wu=1;var e=wv();return ya=function(r){var t=+r;return t!==t||t===0?0:e(t)},ya}var wa,bu;function Ud(){if(bu)return wa;bu=1;var e=Ko(),r=Math.max,t=Math.min;return wa=function(n,a){var i=e(n);return i<0?r(i+a,0):t(i,a)},wa}var ba,Su;function bv(){if(Su)return ba;Su=1;var e=Ko(),r=Math.min;return ba=function(t){var n=e(t);return n>0?r(n,9007199254740991):0},ba}var Sa,Iu;function Wo(){if(Iu)return Sa;Iu=1;var e=bv();return Sa=function(r){return e(r.length)},Sa}var Ia,Pu;function Sv(){if(Pu)return Ia;Pu=1;var e=Tt(),r=Ud(),t=Wo(),n=function(a){return function(i,o,s){var c=e(i),l=t(c);if(l===0)return!a&&-1;var u=r(s,l),f;if(a&&o!==o){for(;l>u;)if(f=c[u++],f!==f)return!0}else for(;l>u;u++)if((a||u in c)&&c[u]===o)return a||u||0;return!a&&-1}};return Ia={includes:n(!0),indexOf:n(!1)},Ia}var Pa,Eu;function Vo(){return Eu||(Eu=1,Pa={}),Pa}var Ea,Ru;function Ld(){if(Ru)return Ea;Ru=1;var e=Se(),r=tr(),t=Tt(),n=Sv().indexOf,a=Vo(),i=e([].push);return Ea=function(o,s){var c=t(o),l=0,u=[],f;for(f in c)!r(a,f)&&r(c,f)&&i(u,f);for(;s.length>l;)r(c,f=s[l++])&&(~n(u,f)||i(u,f));return u},Ea}var Ra,_u;function Jo(){return _u||(_u=1,Ra=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Ra}var _a,Tu;function qd(){if(Tu)return _a;Tu=1;var e=Ld(),r=Jo();return _a=Object.keys||function(n){return e(n,r)},_a}var Ou;function Iv(){if(Ou)return ra;Ou=1;var e=De(),r=kd(),t=Pr(),n=ur(),a=Tt(),i=qd();return ra.f=e&&!r?Object.defineProperties:function(s,c){n(s);for(var l=a(c),u=i(c),f=u.length,h=0,d;f>h;)t.f(s,d=u[h++],l[d]);return s},ra}var Ta,ku;function xd(){if(ku)return Ta;ku=1;var e=ar();return Ta=e("document","documentElement"),Ta}var Oa,Cu;function Zo(){if(Cu)return Oa;Cu=1;var e=Ed(),r=Rd(),t=e("keys");return Oa=function(n){return t[n]||(t[n]=r(n))},Oa}var ka,Au;function kt(){if(Au)return ka;Au=1;var e=ur(),r=Iv(),t=Jo(),n=Vo(),a=xd(),i=ln(),o=Zo(),s=">",c="<",l="prototype",u="script",f=o("IE_PROTO"),h=function(){},d=function(b){return c+u+s+b+c+"/"+u+s},v=function(b){b.write(d("")),b.close();var g=b.parentWindow.Object;return b=null,g},m=function(){var b=i("iframe"),g="java"+u+":",p;return b.style.display="none",a.appendChild(b),b.src=String(g),p=b.contentWindow.document,p.open(),p.write(d("document.F=Object")),p.close(),p.F},w,E=function(){try{w=new ActiveXObject("htmlfile")}catch{}E=typeof document<"u"?document.domain&&w?v(w):m():v(w);for(var b=t.length;b--;)delete E[l][t[b]];return E()};return n[f]=!0,ka=Object.create||function(g,p){var y;return g!==null?(h[l]=e(g),y=new h,h[l]=null,y[f]=g):y=E(),p===void 0?y:r.f(y,p)},ka}var Ca,ju;function Pv(){if(ju)return Ca;ju=1;var e=Ne(),r=kt(),t=Pr().f,n=e("unscopables"),a=Array.prototype;return a[n]===void 0&&t(a,n,{configurable:!0,value:r(null)}),Ca=function(i){a[n][i]=!0},Ca}var Aa,Uu;function Ct(){return Uu||(Uu=1,Aa={}),Aa}var ja,Lu;function Ev(){if(Lu)return ja;Lu=1;var e=Ie(),r=Re(),t=e.WeakMap;return ja=r(t)&&/native code/.test(String(t)),ja}var Ua,qu;function Fr(){return qu||(qu=1,Ua=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}),Ua}var La,xu;function Br(){if(xu)return La;xu=1;var e=De(),r=Pr(),t=Fr();return La=e?function(n,a,i){return r.f(n,a,t(1,i))}:function(n,a,i){return n[a]=i,n},La}var qa,Nu;function ut(){if(Nu)return qa;Nu=1;var e=Ev(),r=Ie(),t=nr(),n=Br(),a=tr(),i=Ho(),o=Zo(),s=Vo(),c="Object already initialized",l=r.TypeError,u=r.WeakMap,f,h,d,v=function(b){return d(b)?h(b):f(b,{})},m=function(b){return function(g){var p;if(!t(g)||(p=h(g)).type!==b)throw new l("Incompatible receiver, "+b+" required");return p}};if(e||i.state){var w=i.state||(i.state=new u);w.get=w.get,w.has=w.has,w.set=w.set,f=function(b,g){if(w.has(b))throw new l(c);return g.facade=b,w.set(b,g),g},h=function(b){return w.get(b)||{}},d=function(b){return w.has(b)}}else{var E=o("state");s[E]=!0,f=function(b,g){if(a(b,E))throw new l(c);return g.facade=b,n(b,E,g),g},h=function(b){return a(b,E)?b[E]:{}},d=function(b){return a(b,E)}}return qa={set:f,get:h,has:d,enforce:v,getterFor:m},qa}var xa={},Na={},Du;function Nd(){if(Du)return Na;Du=1;var e={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,t=r&&!e.call({1:2},1);return Na.f=t?function(a){var i=r(this,a);return!!i&&i.enumerable}:e,Na}var $u;function Dd(){if($u)return xa;$u=1;var e=De(),r=Me(),t=Nd(),n=Fr(),a=Tt(),i=jd(),o=tr(),s=Cd(),c=Object.getOwnPropertyDescriptor;return xa.f=e?c:function(u,f){if(u=a(u),f=i(f),s)try{return c(u,f)}catch{}if(o(u,f))return n(!r(t.f,u,f),u[f])},xa}var Da={exports:{}},$a,Mu;function $d(){if(Mu)return $a;Mu=1;var e=De(),r=tr(),t=Function.prototype,n=e&&Object.getOwnPropertyDescriptor,a=r(t,"name"),i=a&&(function(){}).name==="something",o=a&&(!e||e&&n(t,"name").configurable);return $a={EXISTS:a,PROPER:i,CONFIGURABLE:o},$a}var Ma,Fu;function Yo(){if(Fu)return Ma;Fu=1;var e=Se(),r=Re(),t=Ho(),n=e(Function.toString);return r(t.inspectSource)||(t.inspectSource=function(a){return n(a)}),Ma=t.inspectSource,Ma}var Bu;function Md(){if(Bu)return Da.exports;Bu=1;var e=Se(),r=xe(),t=Re(),n=tr(),a=De(),i=$d().CONFIGURABLE,o=Yo(),s=ut(),c=s.enforce,l=s.get,u=String,f=Object.defineProperty,h=e("".slice),d=e("".replace),v=e([].join),m=a&&!r(function(){return f(function(){},"length",{value:8}).length!==8}),w=String(String).split("String"),E=Da.exports=function(b,g,p){h(u(g),0,7)==="Symbol("&&(g="["+d(u(g),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),p&&p.getter&&(g="get "+g),p&&p.setter&&(g="set "+g),(!n(b,"name")||i&&b.name!==g)&&(a?f(b,"name",{value:g,configurable:!0}):b.name=g),m&&p&&n(p,"arity")&&b.length!==p.arity&&f(b,"length",{value:p.arity});try{p&&n(p,"constructor")&&p.constructor?a&&f(b,"prototype",{writable:!1}):b.prototype&&(b.prototype=void 0)}catch{}var y=c(b);return n(y,"source")||(y.source=v(w,typeof g=="string"?g:"")),b};return Function.prototype.toString=E(function(){return t(this)&&l(this).source||o(this)},"toString"),Da.exports}var Fa,zu;function ir(){if(zu)return Fa;zu=1;var e=Re(),r=Pr(),t=Md(),n=zo();return Fa=function(a,i,o,s){s||(s={});var c=s.enumerable,l=s.name!==void 0?s.name:i;if(e(o)&&t(o,l,s),s.global)c?a[i]=o:n(i,o);else{try{s.unsafe?a[i]&&(c=!0):delete a[i]}catch{}c?a[i]=o:r.f(a,i,{value:o,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return a},Fa}var Ba={},Hu;function Rv(){if(Hu)return Ba;Hu=1;var e=Ld(),r=Jo(),t=r.concat("length","prototype");return Ba.f=Object.getOwnPropertyNames||function(a){return e(a,t)},Ba}var za={},Gu;function Fd(){return Gu||(Gu=1,za.f=Object.getOwnPropertySymbols),za}var Ha,Ku;function _v(){if(Ku)return Ha;Ku=1;var e=ar(),r=Se(),t=Rv(),n=Fd(),a=ur(),i=r([].concat);return Ha=e("Reflect","ownKeys")||function(s){var c=t.f(a(s)),l=n.f;return l?i(c,l(s)):c},Ha}var Ga,Wu;function Bd(){if(Wu)return Ga;Wu=1;var e=tr(),r=_v(),t=Dd(),n=Pr();return Ga=function(a,i,o){for(var s=r(i),c=n.f,l=t.f,u=0;u<s.length;u++){var f=s[u];!e(a,f)&&!(o&&e(o,f))&&c(a,f,l(i,f))}},Ga}var Ka,Vu;function zd(){if(Vu)return Ka;Vu=1;var e=xe(),r=Re(),t=/#|\.prototype\./,n=function(c,l){var u=i[a(c)];return u===s?!0:u===o?!1:r(l)?e(l):!!l},a=n.normalize=function(c){return String(c).replace(t,".").toLowerCase()},i=n.data={},o=n.NATIVE="N",s=n.POLYFILL="P";return Ka=n,Ka}var Wa,Ju;function ke(){if(Ju)return Wa;Ju=1;var e=Ie(),r=Dd().f,t=Br(),n=ir(),a=zo(),i=Bd(),o=zd();return Wa=function(s,c){var l=s.target,u=s.global,f=s.stat,h,d,v,m,w,E;if(u?d=e:f?d=e[l]||a(l,{}):d=e[l]&&e[l].prototype,d)for(v in c){if(w=c[v],s.dontCallGetSet?(E=r(d,v),m=E&&E.value):m=d[v],h=o(u?v:l+(f?".":"#")+v,s.forced),!h&&m!==void 0){if(typeof w==typeof m)continue;i(w,m)}(s.sham||m&&m.sham)&&t(w,"sham",!0),n(d,v,w,s)}},Wa}var Va,Zu;function Tv(){if(Zu)return Va;Zu=1;var e=xe();return Va=!e(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}),Va}var Ja,Yu;function Xo(){if(Yu)return Ja;Yu=1;var e=tr(),r=Re(),t=cn(),n=Zo(),a=Tv(),i=n("IE_PROTO"),o=Object,s=o.prototype;return Ja=a?o.getPrototypeOf:function(c){var l=t(c);if(e(l,i))return l[i];var u=l.constructor;return r(u)&&l instanceof u?u.prototype:l instanceof o?s:null},Ja}var Za,Xu;function Hd(){if(Xu)return Za;Xu=1;var e=xe(),r=Re(),t=nr(),n=kt(),a=Xo(),i=ir(),o=Ne(),s=gr(),c=o("iterator"),l=!1,u,f,h;[].keys&&(h=[].keys(),"next"in h?(f=a(a(h)),f!==Object.prototype&&(u=f)):l=!0);var d=!t(u)||e(function(){var v={};return u[c].call(v)!==v});return d?u={}:s&&(u=n(u)),r(u[c])||i(u,c,function(){return this}),Za={IteratorPrototype:u,BUGGY_SAFARI_ITERATORS:l},Za}var Ya,Qu;function ct(){if(Qu)return Ya;Qu=1;var e=Pr().f,r=tr(),t=Ne(),n=t("toStringTag");return Ya=function(a,i,o){a&&!o&&(a=a.prototype),a&&!r(a,n)&&e(a,n,{configurable:!0,value:i})},Ya}var Xa,ec;function Gd(){if(ec)return Xa;ec=1;var e=Hd().IteratorPrototype,r=kt(),t=Fr(),n=ct(),a=Ct(),i=function(){return this};return Xa=function(o,s,c,l){var u=s+" Iterator";return o.prototype=r(e,{next:t(+!l,c)}),n(o,u,!1,!0),a[u]=i,o},Xa}var Qa,rc;function Ov(){if(rc)return Qa;rc=1;var e=Se(),r=cr();return Qa=function(t,n,a){try{return e(r(Object.getOwnPropertyDescriptor(t,n)[a]))}catch{}},Qa}var ei,tc;function kv(){if(tc)return ei;tc=1;var e=nr();return ei=function(r){return e(r)||r===null},ei}var ri,nc;function Cv(){if(nc)return ri;nc=1;var e=kv(),r=String,t=TypeError;return ri=function(n){if(e(n))return n;throw new t("Can't set "+r(n)+" as a prototype")},ri}var ti,ac;function Qo(){if(ac)return ti;ac=1;var e=Ov(),r=nr(),t=un(),n=Cv();return ti=Object.setPrototypeOf||("__proto__"in{}?function(){var a=!1,i={},o;try{o=e(Object.prototype,"__proto__","set"),o(i,[]),a=i instanceof Array}catch{}return function(c,l){return t(c),n(l),r(c)&&(a?o(c,l):c.__proto__=l),c}}():void 0),ti}var ni,ic;function Kd(){if(ic)return ni;ic=1;var e=ke(),r=Me(),t=gr(),n=$d(),a=Re(),i=Gd(),o=Xo(),s=Qo(),c=ct(),l=Br(),u=ir(),f=Ne(),h=Ct(),d=Hd(),v=n.PROPER,m=n.CONFIGURABLE,w=d.IteratorPrototype,E=d.BUGGY_SAFARI_ITERATORS,b=f("iterator"),g="keys",p="values",y="entries",k=function(){return this};return ni=function(A,j,z,H,ee,x,N){i(z,j,H);var q=function(Z){if(Z===ee&&S)return S;if(!E&&Z&&Z in re)return re[Z];switch(Z){case g:return function(){return new z(this,Z)};case p:return function(){return new z(this,Z)};case y:return function(){return new z(this,Z)}}return function(){return new z(this)}},O=j+" Iterator",X=!1,re=A.prototype,Q=re[b]||re["@@iterator"]||ee&&re[ee],S=!E&&Q||q(ee),_=j==="Array"&&re.entries||Q,D,B,K;if(_&&(D=o(_.call(new A)),D!==Object.prototype&&D.next&&(!t&&o(D)!==w&&(s?s(D,w):a(D[b])||u(D,b,k)),c(D,O,!0,!0),t&&(h[O]=k))),v&&ee===p&&Q&&Q.name!==p&&(!t&&m?l(re,"name",p):(X=!0,S=function(){return r(Q,this)})),ee)if(B={values:q(p),keys:x?S:q(g),entries:q(y)},N)for(K in B)(E||X||!(K in re))&&u(re,K,B[K]);else e({target:j,proto:!0,forced:E||X},B);return(!t||N)&&re[b]!==S&&u(re,b,S,{name:ee}),h[j]=S,B},ni}var ai,oc;function es(){return oc||(oc=1,ai=function(e,r){return{value:e,done:r}}),ai}var ii,sc;function rs(){if(sc)return ii;sc=1;var e=Tt(),r=Pv(),t=Ct(),n=ut(),a=Pr().f,i=Kd(),o=es(),s=gr(),c=De(),l="Array Iterator",u=n.set,f=n.getterFor(l);ii=i(Array,"Array",function(d,v){u(this,{type:l,target:e(d),index:0,kind:v})},function(){var d=f(this),v=d.target,m=d.index++;if(!v||m>=v.length)return d.target=null,o(void 0,!0);switch(d.kind){case"keys":return o(m,!1);case"values":return o(v[m],!1)}return o([m,v[m]],!1)},"values");var h=t.Arguments=t.Array;if(r("keys"),r("values"),r("entries"),!s&&c&&h.name!=="values")try{a(h,"name",{value:"values"})}catch{}return ii}var uc={},cc;function Av(){if(cc)return uc;cc=1;var e=ke(),r=Se(),t=Ud(),n=RangeError,a=String.fromCharCode,i=String.fromCodePoint,o=r([].join),s=!!i&&i.length!==1;return e({target:"String",stat:!0,arity:1,forced:s},{fromCodePoint:function(l){for(var u=[],f=arguments.length,h=0,d;f>h;){if(d=+arguments[h++],t(d,1114111)!==d)throw new n(d+" is not a valid code point");u[h]=d<65536?a(d):a(((d-=65536)>>10)+55296,d%1024+56320)}return o(u,"")}}),uc}var oi,lc;function Wd(){if(lc)return oi;lc=1;var e=Ie(),r=De(),t=Object.getOwnPropertyDescriptor;return oi=function(n){if(!r)return e[n];var a=t(e,n);return a&&a.value},oi}var si,fc;function hn(){if(fc)return si;fc=1;var e=xe(),r=Ne(),t=De(),n=gr(),a=r("iterator");return si=!e(function(){var i=new URL("b?a=1&b=2&c=3","https://a"),o=i.searchParams,s=new URLSearchParams("a=1&a=2&b=3"),c="";return i.pathname="c%20d",o.forEach(function(l,u){o.delete("b"),c+=u+l}),s.delete("a",2),s.delete("b",void 0),n&&(!i.toJSON||!s.has("a",1)||s.has("a",2)||!s.has("a",void 0)||s.has("b"))||!o.size&&(n||!t)||!o.sort||i.href!=="https://a/c%20d?a=1&c=3"||o.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!o[a]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://тест").host!=="xn--e1aybc"||new URL("https://a#б").hash!=="#%D0%B1"||c!=="a1c3"||new URL("https://x",void 0).host!=="x"}),si}var ui,dc;function vn(){if(dc)return ui;dc=1;var e=Md(),r=Pr();return ui=function(t,n,a){return a.get&&e(a.get,n,{getter:!0}),a.set&&e(a.set,n,{setter:!0}),r.f(t,n,a)},ui}var ci,hc;function jv(){if(hc)return ci;hc=1;var e=ir();return ci=function(r,t,n){for(var a in t)e(r,a,t[a],n);return r},ci}var li,vc;function ts(){if(vc)return li;vc=1;var e=fn(),r=TypeError;return li=function(t,n){if(e(n,t))return t;throw new r("Incorrect invocation")},li}var fi,pc;function Uv(){if(pc)return fi;pc=1;var e=on(),r=Se();return fi=function(t){if(e(t)==="Function")return r(t)},fi}var di,mc;function lt(){if(mc)return di;mc=1;var e=Uv(),r=cr(),t=an(),n=e(e.bind);return di=function(a,i){return r(a),i===void 0?a:t?n(a,i):function(){return a.apply(i,arguments)}},di}var hi,gc;function ns(){if(gc)return hi;gc=1;var e=Ne(),r=e("toStringTag"),t={};return t[r]="z",hi=String(t)==="[object z]",hi}var vi,yc;function At(){if(yc)return vi;yc=1;var e=ns(),r=Re(),t=on(),n=Ne(),a=n("toStringTag"),i=Object,o=t(function(){return arguments}())==="Arguments",s=function(c,l){try{return c[l]}catch{}};return vi=e?t:function(c){var l,u,f;return c===void 0?"Undefined":c===null?"Null":typeof(u=s(l=i(c),a))=="string"?u:o?t(l):(f=t(l))==="Object"&&r(l.callee)?"Arguments":f},vi}var pi,wc;function Er(){if(wc)return pi;wc=1;var e=At(),r=String;return pi=function(t){if(e(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return r(t)},pi}var mi,bc;function pn(){if(bc)return mi;bc=1;var e=At(),r=Go(),t=sn(),n=Ct(),a=Ne(),i=a("iterator");return mi=function(o){if(!t(o))return r(o,i)||r(o,"@@iterator")||n[e(o)]},mi}var gi,Sc;function as(){if(Sc)return gi;Sc=1;var e=Me(),r=cr(),t=ur(),n=dn(),a=pn(),i=TypeError;return gi=function(o,s){var c=arguments.length<2?a(o):s;if(r(c))return t(e(c,o));throw new i(n(o)+" is not iterable")},gi}var yi,Ic;function zr(){if(Ic)return yi;Ic=1;var e=TypeError;return yi=function(r,t){if(r<t)throw new e("Not enough arguments");return r},yi}var wi,Pc;function mn(){if(Pc)return wi;Pc=1;var e=Se();return wi=e([].slice),wi}var bi,Ec;function Lv(){if(Ec)return bi;Ec=1;var e=mn(),r=Math.floor,t=function(n,a){var i=n.length;if(i<8)for(var o=1,s,c;o<i;){for(c=o,s=n[o];c&&a(n[c-1],s)>0;)n[c]=n[--c];c!==o++&&(n[c]=s)}else for(var l=r(i/2),u=t(e(n,0,l),a),f=t(e(n,l),a),h=u.length,d=f.length,v=0,m=0;v<h||m<d;)n[v+m]=v<h&&m<d?a(u[v],f[m])<=0?u[v++]:f[m++]:v<h?u[v++]:f[m++];return n};return bi=t,bi}var Si,Rc;function Vd(){if(Rc)return Si;Rc=1,rs(),Av();var e=ke(),r=Ie(),t=Wd(),n=ar(),a=Me(),i=Se(),o=De(),s=hn(),c=ir(),l=vn(),u=jv(),f=ct(),h=Gd(),d=ut(),v=ts(),m=Re(),w=tr(),E=lt(),b=At(),g=ur(),p=nr(),y=Er(),k=kt(),A=Fr(),j=as(),z=pn(),H=es(),ee=zr(),x=Ne(),N=Lv(),q=x("iterator"),O="URLSearchParams",X=O+"Iterator",re=d.set,Q=d.getterFor(O),S=d.getterFor(X),_=t("fetch"),D=t("Request"),B=t("Headers"),K=D&&D.prototype,Z=B&&B.prototype,de=r.TypeError,ae=r.encodeURIComponent,ue=String.fromCharCode,se=n("String","fromCodePoint"),Pe=parseInt,je=i("".charAt),Fe=i([].join),Ce=i([].push),Ve=i("".replace),lr=i([].shift),fr=i([].splice),T=i("".split),F=i("".slice),J=i(/./.exec),pe=/\+/g,ve="�",me=/^[0-9a-f]+$/i,Be=function($,W){var V=F($,W,W+2);return J(me,V)?Pe(V,16):NaN},M=function($){for(var W=0,V=128;V>0&&($&V)!==0;V>>=1)W++;return W},ie=function($){var W=null;switch($.length){case 1:W=$[0];break;case 2:W=($[0]&31)<<6|$[1]&63;break;case 3:W=($[0]&15)<<12|($[1]&63)<<6|$[2]&63;break;case 4:W=($[0]&7)<<18|($[1]&63)<<12|($[2]&63)<<6|$[3]&63;break}return W>1114111?null:W},le=function($){$=Ve($,pe," ");for(var W=$.length,V="",Y=0;Y<W;){var ce=je($,Y);if(ce==="%"){if(je($,Y+1)==="%"||Y+3>W){V+="%",Y++;continue}var he=Be($,Y+1);if(he!==he){V+=ce,Y++;continue}Y+=2;var we=M(he);if(we===0)ce=ue(he);else{if(we===1||we>4){V+=ve,Y++;continue}for(var be=[he],_e=1;_e<we&&(Y++,!(Y+3>W||je($,Y)!=="%"));){var $e=Be($,Y+1);if($e!==$e){Y+=3;break}if($e>191||$e<128)break;Ce(be,$e),Y+=2,_e++}if(be.length!==we){V+=ve;continue}var dr=ie(be);dr===null?V+=ve:ce=se(dr)}}V+=ce,Y++}return V},fe=/[!'()~]|%20/g,ge={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},or=function($){return ge[$]},sr=function($){return Ve(ae($),fe,or)},Te=h(function(W,V){re(this,{type:X,target:Q(W).entries,index:0,kind:V})},O,function(){var W=S(this),V=W.target,Y=W.index++;if(!V||Y>=V.length)return W.target=null,H(void 0,!0);var ce=V[Y];switch(W.kind){case"keys":return H(ce.key,!1);case"values":return H(ce.value,!1)}return H([ce.key,ce.value],!1)},!0),He=function($){this.entries=[],this.url=null,$!==void 0&&(p($)?this.parseObject($):this.parseQuery(typeof $=="string"?je($,0)==="?"?F($,1):$:y($)))};He.prototype={type:O,bindURL:function($){this.url=$,this.update()},parseObject:function($){var W=this.entries,V=z($),Y,ce,he,we,be,_e,$e;if(V)for(Y=j($,V),ce=Y.next;!(he=a(ce,Y)).done;){if(we=j(g(he.value)),be=we.next,(_e=a(be,we)).done||($e=a(be,we)).done||!a(be,we).done)throw new de("Expected sequence with length 2");Ce(W,{key:y(_e.value),value:y($e.value)})}else for(var dr in $)w($,dr)&&Ce(W,{key:dr,value:y($[dr])})},parseQuery:function($){if($)for(var W=this.entries,V=T($,"&"),Y=0,ce,he;Y<V.length;)ce=V[Y++],ce.length&&(he=T(ce,"="),Ce(W,{key:le(lr(he)),value:le(Fe(he,"="))}))},serialize:function(){for(var $=this.entries,W=[],V=0,Y;V<$.length;)Y=$[V++],Ce(W,sr(Y.key)+"="+sr(Y.value));return Fe(W,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Je=function(){v(this,Xe);var W=arguments.length>0?arguments[0]:void 0,V=re(this,new He(W));o||(this.size=V.entries.length)},Xe=Je.prototype;if(u(Xe,{append:function(W,V){var Y=Q(this);ee(arguments.length,2),Ce(Y.entries,{key:y(W),value:y(V)}),o||this.length++,Y.updateURL()},delete:function($){for(var W=Q(this),V=ee(arguments.length,1),Y=W.entries,ce=y($),he=V<2?void 0:arguments[1],we=he===void 0?he:y(he),be=0;be<Y.length;){var _e=Y[be];if(_e.key===ce&&(we===void 0||_e.value===we)){if(fr(Y,be,1),we!==void 0)break}else be++}o||(this.size=Y.length),W.updateURL()},get:function(W){var V=Q(this).entries;ee(arguments.length,1);for(var Y=y(W),ce=0;ce<V.length;ce++)if(V[ce].key===Y)return V[ce].value;return null},getAll:function(W){var V=Q(this).entries;ee(arguments.length,1);for(var Y=y(W),ce=[],he=0;he<V.length;he++)V[he].key===Y&&Ce(ce,V[he].value);return ce},has:function(W){for(var V=Q(this).entries,Y=ee(arguments.length,1),ce=y(W),he=Y<2?void 0:arguments[1],we=he===void 0?he:y(he),be=0;be<V.length;){var _e=V[be++];if(_e.key===ce&&(we===void 0||_e.value===we))return!0}return!1},set:function(W,V){var Y=Q(this);ee(arguments.length,1);for(var ce=Y.entries,he=!1,we=y(W),be=y(V),_e=0,$e;_e<ce.length;_e++)$e=ce[_e],$e.key===we&&(he?fr(ce,_e--,1):(he=!0,$e.value=be));he||Ce(ce,{key:we,value:be}),o||(this.size=ce.length),Y.updateURL()},sort:function(){var W=Q(this);N(W.entries,function(V,Y){return V.key>Y.key?1:-1}),W.updateURL()},forEach:function(W){for(var V=Q(this).entries,Y=E(W,arguments.length>1?arguments[1]:void 0),ce=0,he;ce<V.length;)he=V[ce++],Y(he.value,he.key,this)},keys:function(){return new Te(this,"keys")},values:function(){return new Te(this,"values")},entries:function(){return new Te(this,"entries")}},{enumerable:!0}),c(Xe,q,Xe.entries,{name:"entries"}),c(Xe,"toString",function(){return Q(this).serialize()},{enumerable:!0}),o&&l(Xe,"size",{get:function(){return Q(this).entries.length},configurable:!0,enumerable:!0}),f(Je,O),e({global:!0,constructor:!0,forced:!s},{URLSearchParams:Je}),!s&&m(B)){var pt=i(Z.has),_n=i(Z.set),Hr=function($){if(p($)){var W=$.body,V;if(b(W)===O)return V=$.headers?new B($.headers):new B,pt(V,"content-type")||_n(V,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),k($,{body:A(0,y(W)),headers:A(0,V)})}return $};if(m(_)&&e({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(W){return _(W,arguments.length>1?Hr(arguments[1]):{})}}),m(D)){var Gr=function(W){return v(this,K),new D(W,arguments.length>1?Hr(arguments[1]):{})};K.constructor=Gr,Gr.prototype=K,e({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Gr})}}return Si={URLSearchParams:Je,getState:Q},Si}var _c;function qv(){return _c||(_c=1,Vd()),js}var Tc={},Oc;function xv(){if(Oc)return Tc;Oc=1;var e=ir(),r=Se(),t=Er(),n=zr(),a=URLSearchParams,i=a.prototype,o=r(i.append),s=r(i.delete),c=r(i.forEach),l=r([].push),u=new a("a=1&a=2&b=3");return u.delete("a",1),u.delete("b",void 0),u+""!="a=2"&&e(i,"delete",function(f){var h=arguments.length,d=h<2?void 0:arguments[1];if(h&&d===void 0)return s(this,f);var v=[];c(this,function(k,A){l(v,{key:A,value:k})}),n(h,1);for(var m=t(f),w=t(d),E=0,b=0,g=!1,p=v.length,y;E<p;)y=v[E++],g||y.key===m?(g=!0,s(this,y.key)):b++;for(;b<p;)y=v[b++],y.key===m&&y.value===w||o(this,y.key,y.value)},{enumerable:!0,unsafe:!0}),Tc}var kc={},Cc;function Nv(){if(Cc)return kc;Cc=1;var e=ir(),r=Se(),t=Er(),n=zr(),a=URLSearchParams,i=a.prototype,o=r(i.getAll),s=r(i.has),c=new a("a=1");return(c.has("a",2)||!c.has("a",void 0))&&e(i,"has",function(u){var f=arguments.length,h=f<2?void 0:arguments[1];if(f&&h===void 0)return s(this,u);var d=o(this,u);n(f,1);for(var v=t(h),m=0;m<d.length;)if(d[m++]===v)return!0;return!1},{enumerable:!0,unsafe:!0}),kc}var Ac={},jc;function Dv(){if(jc)return Ac;jc=1;var e=De(),r=Se(),t=vn(),n=URLSearchParams.prototype,a=r(n.forEach);return e&&!("size"in n)&&t(n,"size",{get:function(){var o=0;return a(this,function(){o++}),o},configurable:!0,enumerable:!0}),Ac}var Ii,Uc;function is(){if(Uc)return Ii;Uc=1;var e=Ie();return Ii=e,Ii}var Pi,Lc;function Jd(){if(Lc)return Pi;Lc=1,qv(),xv(),Nv(),Dv();var e=is();return Pi=e.URLSearchParams,Pi}var qc={},xc={},Nc={},Ei,Dc;function Zd(){if(Dc)return Ei;Dc=1;var e=Se(),r=Ko(),t=Er(),n=un(),a=e("".charAt),i=e("".charCodeAt),o=e("".slice),s=function(c){return function(l,u){var f=t(n(l)),h=r(u),d=f.length,v,m;return h<0||h>=d?c?"":void 0:(v=i(f,h),v<55296||v>56319||h+1===d||(m=i(f,h+1))<56320||m>57343?c?a(f,h):v:c?o(f,h,h+2):(v-55296<<10)+(m-56320)+65536)}};return Ei={codeAt:s(!1),charAt:s(!0)},Ei}var $c;function Yd(){if($c)return Nc;$c=1;var e=Zd().charAt,r=Er(),t=ut(),n=Kd(),a=es(),i="String Iterator",o=t.set,s=t.getterFor(i);return n(String,"String",function(c){o(this,{type:i,string:r(c),index:0})},function(){var l=s(this),u=l.string,f=l.index,h;return f>=u.length?a(void 0,!0):(h=e(u,f),l.index+=h.length,a(h,!1))}),Nc}var Ri,Mc;function $v(){if(Mc)return Ri;Mc=1;var e=De(),r=Se(),t=Me(),n=xe(),a=qd(),i=Fd(),o=Nd(),s=cn(),c=Pd(),l=Object.assign,u=Object.defineProperty,f=r([].concat);return Ri=!l||n(function(){if(e&&l({b:1},l(u({},"a",{enumerable:!0,get:function(){u(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var h={},d={},v=Symbol("assign detection"),m="abcdefghijklmnopqrst";return h[v]=7,m.split("").forEach(function(w){d[w]=w}),l({},h)[v]!==7||a(l({},d)).join("")!==m})?function(d,v){for(var m=s(d),w=arguments.length,E=1,b=i.f,g=o.f;w>E;)for(var p=c(arguments[E++]),y=b?f(a(p),b(p)):a(p),k=y.length,A=0,j;k>A;)j=y[A++],(!e||t(g,p,j))&&(m[j]=p[j]);return m}:l,Ri}var _i,Fc;function Xd(){if(Fc)return _i;Fc=1;var e=Me(),r=ur(),t=Go();return _i=function(n,a,i){var o,s;r(n);try{if(o=t(n,"return"),!o){if(a==="throw")throw i;return i}o=e(o,n)}catch(c){s=!0,o=c}if(a==="throw")throw i;if(s)throw o;return r(o),i},_i}var Ti,Bc;function Mv(){if(Bc)return Ti;Bc=1;var e=ur(),r=Xd();return Ti=function(t,n,a,i){try{return i?n(e(a)[0],a[1]):n(a)}catch(o){r(t,"throw",o)}},Ti}var Oi,zc;function Qd(){if(zc)return Oi;zc=1;var e=Ne(),r=Ct(),t=e("iterator"),n=Array.prototype;return Oi=function(a){return a!==void 0&&(r.Array===a||n[t]===a)},Oi}var ki,Hc;function eh(){if(Hc)return ki;Hc=1;var e=Se(),r=xe(),t=Re(),n=At(),a=ar(),i=Yo(),o=function(){},s=a("Reflect","construct"),c=/^\s*(?:class|function)\b/,l=e(c.exec),u=!c.test(o),f=function(v){if(!t(v))return!1;try{return s(o,[],v),!0}catch{return!1}},h=function(v){if(!t(v))return!1;switch(n(v)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return u||!!l(c,i(v))}catch{return!0}};return h.sham=!0,ki=!s||r(function(){var d;return f(f.call)||!f(Object)||!f(function(){d=!0})||d})?h:f,ki}var Ci,Gc;function Fv(){if(Gc)return Ci;Gc=1;var e=De(),r=Pr(),t=Fr();return Ci=function(n,a,i){e?r.f(n,a,t(0,i)):n[a]=i},Ci}var Ai,Kc;function Bv(){if(Kc)return Ai;Kc=1;var e=lt(),r=Me(),t=cn(),n=Mv(),a=Qd(),i=eh(),o=Wo(),s=Fv(),c=as(),l=pn(),u=Array;return Ai=function(h){var d=t(h),v=i(this),m=arguments.length,w=m>1?arguments[1]:void 0,E=w!==void 0;E&&(w=e(w,m>2?arguments[2]:void 0));var b=l(d),g=0,p,y,k,A,j,z;if(b&&!(this===u&&a(b)))for(y=v?new this:[],A=c(d,b),j=A.next;!(k=r(j,A)).done;g++)z=E?n(A,w,[k.value,g],!0):k.value,s(y,g,z);else for(p=o(d),y=v?new this(p):u(p);p>g;g++)z=E?w(d[g],g):d[g],s(y,g,z);return y.length=g,y},Ai}var ji,Wc;function zv(){if(Wc)return ji;Wc=1;var e=Se(),r=2147483647,t=36,n=1,a=26,i=38,o=700,s=72,c=128,l="-",u=/[^\0-\u007E]/,f=/[.\u3002\uFF0E\uFF61]/g,h="Overflow: input needs wider integers to process",d=t-n,v=RangeError,m=e(f.exec),w=Math.floor,E=String.fromCharCode,b=e("".charCodeAt),g=e([].join),p=e([].push),y=e("".replace),k=e("".split),A=e("".toLowerCase),j=function(x){for(var N=[],q=0,O=x.length;q<O;){var X=b(x,q++);if(X>=55296&&X<=56319&&q<O){var re=b(x,q++);(re&64512)===56320?p(N,((X&1023)<<10)+(re&1023)+65536):(p(N,X),q--)}else p(N,X)}return N},z=function(x){return x+22+75*(x<26)},H=function(x,N,q){var O=0;for(x=q?w(x/o):x>>1,x+=w(x/N);x>d*a>>1;)x=w(x/d),O+=t;return w(O+(d+1)*x/(x+i))},ee=function(x){var N=[];x=j(x);var q=x.length,O=c,X=0,re=s,Q,S;for(Q=0;Q<x.length;Q++)S=x[Q],S<128&&p(N,E(S));var _=N.length,D=_;for(_&&p(N,l);D<q;){var B=r;for(Q=0;Q<x.length;Q++)S=x[Q],S>=O&&S<B&&(B=S);var K=D+1;if(B-O>w((r-X)/K))throw new v(h);for(X+=(B-O)*K,O=B,Q=0;Q<x.length;Q++){if(S=x[Q],S<O&&++X>r)throw new v(h);if(S===O){for(var Z=X,de=t;;){var ae=de<=re?n:de>=re+a?a:de-re;if(Z<ae)break;var ue=Z-ae,se=t-ae;p(N,E(z(ae+ue%se))),Z=w(ue/se),de+=t}p(N,E(z(Z))),re=H(X,K,D===_),X=0,D++}}X++,O++}return g(N,"")};return ji=function(x){var N=[],q=k(y(A(x),f,"."),"."),O,X;for(O=0;O<q.length;O++)X=q[O],p(N,m(u,X)?"xn--"+ee(X):X);return g(N,".")},ji}var Vc;function Hv(){if(Vc)return xc;Vc=1,Yd();var e=ke(),r=De(),t=hn(),n=Ie(),a=lt(),i=Se(),o=ir(),s=vn(),c=ts(),l=tr(),u=$v(),f=Bv(),h=mn(),d=Zd().codeAt,v=zv(),m=Er(),w=ct(),E=zr(),b=Vd(),g=ut(),p=g.set,y=g.getterFor("URL"),k=b.URLSearchParams,A=b.getState,j=n.URL,z=n.TypeError,H=n.parseInt,ee=Math.floor,x=Math.pow,N=i("".charAt),q=i(/./.exec),O=i([].join),X=i(1 .toString),re=i([].pop),Q=i([].push),S=i("".replace),_=i([].shift),D=i("".split),B=i("".slice),K=i("".toLowerCase),Z=i([].unshift),de="Invalid authority",ae="Invalid scheme",ue="Invalid host",se="Invalid port",Pe=/[a-z]/i,je=/[\d+-.a-z]/i,Fe=/\d/,Ce=/^0x/i,Ve=/^[0-7]+$/,lr=/^\d+$/,fr=/^[\da-f]+$/i,T=/[\0\t\n\r #%/:<>?@[\\\]^|]/,F=/[\0\t\n\r #/:<>?@[\\\]^|]/,J=/^[\u0000-\u0020]+/,pe=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,ve=/[\t\n\r]/g,me,Be=function(P){var L=D(P,"."),R,I,C,oe,G,Ee,Oe;if(L.length&&L[L.length-1]===""&&L.length--,R=L.length,R>4)return P;for(I=[],C=0;C<R;C++){if(oe=L[C],oe==="")return P;if(G=10,oe.length>1&&N(oe,0)==="0"&&(G=q(Ce,oe)?16:8,oe=B(oe,G===8?1:2)),oe==="")Ee=0;else{if(!q(G===10?lr:G===8?Ve:fr,oe))return P;Ee=H(oe,G)}Q(I,Ee)}for(C=0;C<R;C++)if(Ee=I[C],C===R-1){if(Ee>=x(256,5-R))return null}else if(Ee>255)return null;for(Oe=re(I),C=0;C<I.length;C++)Oe+=I[C]*x(256,3-C);return Oe},M=function(P){var L=[0,0,0,0,0,0,0,0],R=0,I=null,C=0,oe,G,Ee,Oe,Ue,er,U,Ae=function(){return N(P,C)};if(Ae()===":"){if(N(P,1)!==":")return;C+=2,R++,I=R}for(;Ae();){if(R===8)return;if(Ae()===":"){if(I!==null)return;C++,R++,I=R;continue}for(oe=G=0;G<4&&q(fr,Ae());)oe=oe*16+H(Ae(),16),C++,G++;if(Ae()==="."){if(G===0||(C-=G,R>6))return;for(Ee=0;Ae();){if(Oe=null,Ee>0)if(Ae()==="."&&Ee<4)C++;else return;if(!q(Fe,Ae()))return;for(;q(Fe,Ae());){if(Ue=H(Ae(),10),Oe===null)Oe=Ue;else{if(Oe===0)return;Oe=Oe*10+Ue}if(Oe>255)return;C++}L[R]=L[R]*256+Oe,Ee++,(Ee===2||Ee===4)&&R++}if(Ee!==4)return;break}else if(Ae()===":"){if(C++,!Ae())return}else if(Ae())return;L[R++]=oe}if(I!==null)for(er=R-I,R=7;R!==0&&er>0;)U=L[R],L[R--]=L[I+er-1],L[I+--er]=U;else if(R!==8)return;return L},ie=function(P){for(var L=null,R=1,I=null,C=0,oe=0;oe<8;oe++)P[oe]!==0?(C>R&&(L=I,R=C),I=null,C=0):(I===null&&(I=oe),++C);return C>R?I:L},le=function(P){var L,R,I,C;if(typeof P=="number"){for(L=[],R=0;R<4;R++)Z(L,P%256),P=ee(P/256);return O(L,".")}if(typeof P=="object"){for(L="",I=ie(P),R=0;R<8;R++)C&&P[R]===0||(C&&(C=!1),I===R?(L+=R?":":"::",C=!0):(L+=X(P[R],16),R<7&&(L+=":")));return"["+L+"]"}return P},fe={},ge=u({},fe,{" ":1,'"':1,"<":1,">":1,"`":1}),or=u({},ge,{"#":1,"?":1,"{":1,"}":1}),sr=u({},or,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Te=function(P,L){var R=d(P,0);return R>32&&R<127&&!l(L,P)?P:encodeURIComponent(P)},He={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Je=function(P,L){var R;return P.length===2&&q(Pe,N(P,0))&&((R=N(P,1))===":"||!L&&R==="|")},Xe=function(P){var L;return P.length>1&&Je(B(P,0,2))&&(P.length===2||(L=N(P,2))==="/"||L==="\\"||L==="?"||L==="#")},pt=function(P){return P==="."||K(P)==="%2e"},_n=function(P){return P=K(P),P===".."||P==="%2e."||P===".%2e"||P==="%2e%2e"},Hr={},Gr={},$={},W={},V={},Y={},ce={},he={},we={},be={},_e={},$e={},dr={},Tn={},Rs={},On={},Kr={},hr={},_s={},Cr={},yr={},kn=function(P,L,R){var I=m(P),C,oe,G;if(L){if(oe=this.parse(I),oe)throw new z(oe);this.searchParams=null}else{if(R!==void 0&&(C=new kn(R,!0)),oe=this.parse(I,null,C),oe)throw new z(oe);G=A(new k),G.bindURL(this),this.searchParams=G}};kn.prototype={type:"URL",parse:function(P,L,R){var I=this,C=L||Hr,oe=0,G="",Ee=!1,Oe=!1,Ue=!1,er,U,Ae,wr;for(P=m(P),L||(I.scheme="",I.username="",I.password="",I.host=null,I.port=null,I.path=[],I.query=null,I.fragment=null,I.cannotBeABaseURL=!1,P=S(P,J,""),P=S(P,pe,"$1")),P=S(P,ve,""),er=f(P);oe<=er.length;){switch(U=er[oe],C){case Hr:if(U&&q(Pe,U))G+=K(U),C=Gr;else{if(L)return ae;C=$;continue}break;case Gr:if(U&&(q(je,U)||U==="+"||U==="-"||U==="."))G+=K(U);else if(U===":"){if(L&&(I.isSpecial()!==l(He,G)||G==="file"&&(I.includesCredentials()||I.port!==null)||I.scheme==="file"&&!I.host))return;if(I.scheme=G,L){I.isSpecial()&&He[I.scheme]===I.port&&(I.port=null);return}G="",I.scheme==="file"?C=Tn:I.isSpecial()&&R&&R.scheme===I.scheme?C=W:I.isSpecial()?C=he:er[oe+1]==="/"?(C=V,oe++):(I.cannotBeABaseURL=!0,Q(I.path,""),C=_s)}else{if(L)return ae;G="",C=$,oe=0;continue}break;case $:if(!R||R.cannotBeABaseURL&&U!=="#")return ae;if(R.cannotBeABaseURL&&U==="#"){I.scheme=R.scheme,I.path=h(R.path),I.query=R.query,I.fragment="",I.cannotBeABaseURL=!0,C=yr;break}C=R.scheme==="file"?Tn:Y;continue;case W:if(U==="/"&&er[oe+1]==="/")C=we,oe++;else{C=Y;continue}break;case V:if(U==="/"){C=be;break}else{C=hr;continue}case Y:if(I.scheme=R.scheme,U===me)I.username=R.username,I.password=R.password,I.host=R.host,I.port=R.port,I.path=h(R.path),I.query=R.query;else if(U==="/"||U==="\\"&&I.isSpecial())C=ce;else if(U==="?")I.username=R.username,I.password=R.password,I.host=R.host,I.port=R.port,I.path=h(R.path),I.query="",C=Cr;else if(U==="#")I.username=R.username,I.password=R.password,I.host=R.host,I.port=R.port,I.path=h(R.path),I.query=R.query,I.fragment="",C=yr;else{I.username=R.username,I.password=R.password,I.host=R.host,I.port=R.port,I.path=h(R.path),I.path.length--,C=hr;continue}break;case ce:if(I.isSpecial()&&(U==="/"||U==="\\"))C=we;else if(U==="/")C=be;else{I.username=R.username,I.password=R.password,I.host=R.host,I.port=R.port,C=hr;continue}break;case he:if(C=we,U!=="/"||N(G,oe+1)!=="/")continue;oe++;break;case we:if(U!=="/"&&U!=="\\"){C=be;continue}break;case be:if(U==="@"){Ee&&(G="%40"+G),Ee=!0,Ae=f(G);for(var Cn=0;Cn<Ae.length;Cn++){var ks=Ae[Cn];if(ks===":"&&!Ue){Ue=!0;continue}var Cs=Te(ks,sr);Ue?I.password+=Cs:I.username+=Cs}G=""}else if(U===me||U==="/"||U==="?"||U==="#"||U==="\\"&&I.isSpecial()){if(Ee&&G==="")return de;oe-=f(G).length+1,G="",C=_e}else G+=U;break;case _e:case $e:if(L&&I.scheme==="file"){C=On;continue}else if(U===":"&&!Oe){if(G==="")return ue;if(wr=I.parseHost(G),wr)return wr;if(G="",C=dr,L===$e)return}else if(U===me||U==="/"||U==="?"||U==="#"||U==="\\"&&I.isSpecial()){if(I.isSpecial()&&G==="")return ue;if(L&&G===""&&(I.includesCredentials()||I.port!==null))return;if(wr=I.parseHost(G),wr)return wr;if(G="",C=Kr,L)return;continue}else U==="["?Oe=!0:U==="]"&&(Oe=!1),G+=U;break;case dr:if(q(Fe,U))G+=U;else if(U===me||U==="/"||U==="?"||U==="#"||U==="\\"&&I.isSpecial()||L){if(G!==""){var An=H(G,10);if(An>65535)return se;I.port=I.isSpecial()&&An===He[I.scheme]?null:An,G=""}if(L)return;C=Kr;continue}else return se;break;case Tn:if(I.scheme="file",U==="/"||U==="\\")C=Rs;else if(R&&R.scheme==="file")switch(U){case me:I.host=R.host,I.path=h(R.path),I.query=R.query;break;case"?":I.host=R.host,I.path=h(R.path),I.query="",C=Cr;break;case"#":I.host=R.host,I.path=h(R.path),I.query=R.query,I.fragment="",C=yr;break;default:Xe(O(h(er,oe),""))||(I.host=R.host,I.path=h(R.path),I.shortenPath()),C=hr;continue}else{C=hr;continue}break;case Rs:if(U==="/"||U==="\\"){C=On;break}R&&R.scheme==="file"&&!Xe(O(h(er,oe),""))&&(Je(R.path[0],!0)?Q(I.path,R.path[0]):I.host=R.host),C=hr;continue;case On:if(U===me||U==="/"||U==="\\"||U==="?"||U==="#"){if(!L&&Je(G))C=hr;else if(G===""){if(I.host="",L)return;C=Kr}else{if(wr=I.parseHost(G),wr)return wr;if(I.host==="localhost"&&(I.host=""),L)return;G="",C=Kr}continue}else G+=U;break;case Kr:if(I.isSpecial()){if(C=hr,U!=="/"&&U!=="\\")continue}else if(!L&&U==="?")I.query="",C=Cr;else if(!L&&U==="#")I.fragment="",C=yr;else if(U!==me&&(C=hr,U!=="/"))continue;break;case hr:if(U===me||U==="/"||U==="\\"&&I.isSpecial()||!L&&(U==="?"||U==="#")){if(_n(G)?(I.shortenPath(),U!=="/"&&!(U==="\\"&&I.isSpecial())&&Q(I.path,"")):pt(G)?U!=="/"&&!(U==="\\"&&I.isSpecial())&&Q(I.path,""):(I.scheme==="file"&&!I.path.length&&Je(G)&&(I.host&&(I.host=""),G=N(G,0)+":"),Q(I.path,G)),G="",I.scheme==="file"&&(U===me||U==="?"||U==="#"))for(;I.path.length>1&&I.path[0]==="";)_(I.path);U==="?"?(I.query="",C=Cr):U==="#"&&(I.fragment="",C=yr)}else G+=Te(U,or);break;case _s:U==="?"?(I.query="",C=Cr):U==="#"?(I.fragment="",C=yr):U!==me&&(I.path[0]+=Te(U,fe));break;case Cr:!L&&U==="#"?(I.fragment="",C=yr):U!==me&&(U==="'"&&I.isSpecial()?I.query+="%27":U==="#"?I.query+="%23":I.query+=Te(U,fe));break;case yr:U!==me&&(I.fragment+=Te(U,ge));break}oe++}},parseHost:function(P){var L,R,I;if(N(P,0)==="["){if(N(P,P.length-1)!=="]"||(L=M(B(P,1,-1)),!L))return ue;this.host=L}else if(this.isSpecial()){if(P=v(P),q(T,P)||(L=Be(P),L===null))return ue;this.host=L}else{if(q(F,P))return ue;for(L="",R=f(P),I=0;I<R.length;I++)L+=Te(R[I],fe);this.host=L}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return l(He,this.scheme)},shortenPath:function(){var P=this.path,L=P.length;L&&(this.scheme!=="file"||L!==1||!Je(P[0],!0))&&P.length--},serialize:function(){var P=this,L=P.scheme,R=P.username,I=P.password,C=P.host,oe=P.port,G=P.path,Ee=P.query,Oe=P.fragment,Ue=L+":";return C!==null?(Ue+="//",P.includesCredentials()&&(Ue+=R+(I?":"+I:"")+"@"),Ue+=le(C),oe!==null&&(Ue+=":"+oe)):L==="file"&&(Ue+="//"),Ue+=P.cannotBeABaseURL?G[0]:G.length?"/"+O(G,"/"):"",Ee!==null&&(Ue+="?"+Ee),Oe!==null&&(Ue+="#"+Oe),Ue},setHref:function(P){var L=this.parse(P);if(L)throw new z(L);this.searchParams.update()},getOrigin:function(){var P=this.scheme,L=this.port;if(P==="blob")try{return new Wr(P.path[0]).origin}catch{return"null"}return P==="file"||!this.isSpecial()?"null":P+"://"+le(this.host)+(L!==null?":"+L:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(P){this.parse(m(P)+":",Hr)},getUsername:function(){return this.username},setUsername:function(P){var L=f(m(P));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var R=0;R<L.length;R++)this.username+=Te(L[R],sr)}},getPassword:function(){return this.password},setPassword:function(P){var L=f(m(P));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var R=0;R<L.length;R++)this.password+=Te(L[R],sr)}},getHost:function(){var P=this.host,L=this.port;return P===null?"":L===null?le(P):le(P)+":"+L},setHost:function(P){this.cannotBeABaseURL||this.parse(P,_e)},getHostname:function(){var P=this.host;return P===null?"":le(P)},setHostname:function(P){this.cannotBeABaseURL||this.parse(P,$e)},getPort:function(){var P=this.port;return P===null?"":m(P)},setPort:function(P){this.cannotHaveUsernamePasswordPort()||(P=m(P),P===""?this.port=null:this.parse(P,dr))},getPathname:function(){var P=this.path;return this.cannotBeABaseURL?P[0]:P.length?"/"+O(P,"/"):""},setPathname:function(P){this.cannotBeABaseURL||(this.path=[],this.parse(P,Kr))},getSearch:function(){var P=this.query;return P?"?"+P:""},setSearch:function(P){P=m(P),P===""?this.query=null:(N(P,0)==="?"&&(P=B(P,1)),this.query="",this.parse(P,Cr)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var P=this.fragment;return P?"#"+P:""},setHash:function(P){if(P=m(P),P===""){this.fragment=null;return}N(P,0)==="#"&&(P=B(P,1)),this.fragment="",this.parse(P,yr)},update:function(){this.query=this.searchParams.serialize()||null}};var Wr=function(L){var R=c(this,ze),I=E(arguments.length,1)>1?arguments[1]:void 0,C=p(R,new kn(L,!1,I));r||(R.href=C.serialize(),R.origin=C.getOrigin(),R.protocol=C.getProtocol(),R.username=C.getUsername(),R.password=C.getPassword(),R.host=C.getHost(),R.hostname=C.getHostname(),R.port=C.getPort(),R.pathname=C.getPathname(),R.search=C.getSearch(),R.searchParams=C.getSearchParams(),R.hash=C.getHash())},ze=Wr.prototype,Qe=function(P,L){return{get:function(){return y(this)[P]()},set:L&&function(R){return y(this)[L](R)},configurable:!0,enumerable:!0}};if(r&&(s(ze,"href",Qe("serialize","setHref")),s(ze,"origin",Qe("getOrigin")),s(ze,"protocol",Qe("getProtocol","setProtocol")),s(ze,"username",Qe("getUsername","setUsername")),s(ze,"password",Qe("getPassword","setPassword")),s(ze,"host",Qe("getHost","setHost")),s(ze,"hostname",Qe("getHostname","setHostname")),s(ze,"port",Qe("getPort","setPort")),s(ze,"pathname",Qe("getPathname","setPathname")),s(ze,"search",Qe("getSearch","setSearch")),s(ze,"searchParams",Qe("getSearchParams")),s(ze,"hash",Qe("getHash","setHash"))),o(ze,"toJSON",function(){return y(this).serialize()},{enumerable:!0}),o(ze,"toString",function(){return y(this).serialize()},{enumerable:!0}),j){var Ts=j.createObjectURL,Os=j.revokeObjectURL;Ts&&o(Wr,"createObjectURL",a(Ts,j)),Os&&o(Wr,"revokeObjectURL",a(Os,j))}return w(Wr,"URL"),e({global:!0,constructor:!0,forced:!t,sham:!r},{URL:Wr}),xc}var Jc;function Gv(){return Jc||(Jc=1,Hv()),qc}var Zc={},Yc;function Kv(){if(Yc)return Zc;Yc=1;var e=ke(),r=ar(),t=xe(),n=zr(),a=Er(),i=hn(),o=r("URL"),s=i&&t(function(){o.canParse()}),c=t(function(){return o.canParse.length!==1});return e({target:"URL",stat:!0,forced:!s||c},{canParse:function(u){var f=n(arguments.length,1),h=a(u),d=f<2||arguments[1]===void 0?void 0:a(arguments[1]);try{return!!new o(h,d)}catch{return!1}}}),Zc}var Xc={},Qc;function Wv(){if(Qc)return Xc;Qc=1;var e=ke(),r=ar(),t=zr(),n=Er(),a=hn(),i=r("URL");return e({target:"URL",stat:!0,forced:!a},{parse:function(s){var c=t(arguments.length,1),l=n(s),u=c<2||arguments[1]===void 0?void 0:n(arguments[1]);try{return new i(l,u)}catch{return null}}}),Xc}var el={},rl;function Vv(){if(rl)return el;rl=1;var e=ke(),r=Me();return e({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return r(URL.prototype.toString,this)}}),el}var Ui,tl;function Jv(){if(tl)return Ui;tl=1,Jd(),Gv(),Kv(),Wv(),Vv();var e=is();return Ui=e.URL,Ui}var Li,nl;function Zv(){if(nl)return Li;nl=1;var e=Jv();return Li=e,Li}var qi,al;function Yv(){if(al)return qi;al=1;var e=Zv();return qi=e,qi}Yv();var il={},xi,ol;function Xv(){return ol||(ol=1,xi={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),xi}var Ni,sl;function Qv(){if(sl)return Ni;sl=1;var e=ln(),r=e("span").classList,t=r&&r.constructor&&r.constructor.prototype;return Ni=t===Object.prototype?void 0:t,Ni}var ul;function rh(){if(ul)return il;ul=1;var e=Ie(),r=Xv(),t=Qv(),n=rs(),a=Br(),i=ct(),o=Ne(),s=o("iterator"),c=n.values,l=function(f,h){if(f){if(f[s]!==c)try{a(f,s,c)}catch{f[s]=c}if(i(f,h,!0),r[h]){for(var d in n)if(f[d]!==n[d])try{a(f,d,n[d])}catch{f[d]=n[d]}}}};for(var u in r)l(e[u]&&e[u].prototype,u);return l(t,"DOMTokenList"),il}var Di,cl;function ep(){if(cl)return Di;cl=1;var e=Jd();return rh(),Di=e,Di}var $i,ll;function rp(){if(ll)return $i;ll=1;var e=ep();return $i=e,$i}rp();var fl={},dl={},Mi,hl;function tp(){if(hl)return Mi;hl=1;var e=nr(),r=Br();return Mi=function(t,n){e(n)&&"cause"in n&&r(t,"cause",n.cause)},Mi}var Fi,vl;function np(){if(vl)return Fi;vl=1;var e=Se(),r=Error,t=e("".replace),n=function(o){return String(new r(o).stack)}("zxcasd"),a=/\n\s*at [^:]*:[^\n]*/,i=a.test(n);return Fi=function(o,s){if(i&&typeof o=="string"&&!r.prepareStackTrace)for(;s--;)o=t(o,a,"");return o},Fi}var Bi,pl;function ap(){if(pl)return Bi;pl=1;var e=xe(),r=Fr();return Bi=!e(function(){var t=new Error("a");return"stack"in t?(Object.defineProperty(t,"stack",r(1,7)),t.stack!==7):!0}),Bi}var zi,ml;function ip(){if(ml)return zi;ml=1;var e=Br(),r=np(),t=ap(),n=Error.captureStackTrace;return zi=function(a,i,o,s){t&&(n?n(a,i):e(a,"stack",r(o,s)))},zi}var Hi,gl;function jt(){if(gl)return Hi;gl=1;var e=lt(),r=Me(),t=ur(),n=dn(),a=Qd(),i=Wo(),o=fn(),s=as(),c=pn(),l=Xd(),u=TypeError,f=function(d,v){this.stopped=d,this.result=v},h=f.prototype;return Hi=function(d,v,m){var w=m&&m.that,E=!!(m&&m.AS_ENTRIES),b=!!(m&&m.IS_RECORD),g=!!(m&&m.IS_ITERATOR),p=!!(m&&m.INTERRUPTED),y=e(v,w),k,A,j,z,H,ee,x,N=function(O){return k&&l(k,"normal",O),new f(!0,O)},q=function(O){return E?(t(O),p?y(O[0],O[1],N):y(O[0],O[1])):p?y(O,N):y(O)};if(b)k=d.iterator;else if(g)k=d;else{if(A=c(d),!A)throw new u(n(d)+" is not iterable");if(a(A)){for(j=0,z=i(d);z>j;j++)if(H=q(d[j]),H&&o(h,H))return H;return new f(!1)}k=s(d,A)}for(ee=b?d.next:k.next;!(x=r(ee,k)).done;){try{H=q(x.value)}catch(O){l(k,"throw",O)}if(typeof H=="object"&&H&&o(h,H))return H}return new f(!1)},Hi}var Gi,yl;function op(){if(yl)return Gi;yl=1;var e=Er();return Gi=function(r,t){return r===void 0?arguments.length<2?"":t:e(r)},Gi}var wl;function sp(){if(wl)return dl;wl=1;var e=ke(),r=fn(),t=Xo(),n=Qo(),a=Bd(),i=kt(),o=Br(),s=Fr(),c=tp(),l=ip(),u=jt(),f=op(),h=Ne(),d=h("toStringTag"),v=Error,m=[].push,w=function(g,p){var y=r(E,this),k;n?k=n(new v,y?t(this):E):(k=y?this:i(E),o(k,d,"Error")),p!==void 0&&o(k,"message",f(p)),l(k,w,k.stack,1),arguments.length>2&&c(k,arguments[2]);var A=[];return u(g,m,{that:A}),o(k,"errors",A),k};n?n(w,v):a(w,v,{name:!0});var E=w.prototype=i(v.prototype,{constructor:s(1,w),message:s(1,""),name:s(1,"AggregateError")});return e({global:!0,constructor:!0,arity:2},{AggregateError:w}),dl}var bl;function up(){return bl||(bl=1,sp()),fl}var Sl={},Ki,Il;function cp(){if(Il)return Ki;Il=1;var e=ns(),r=At();return Ki=e?{}.toString:function(){return"[object "+r(this)+"]"},Ki}var Pl;function lp(){if(Pl)return Sl;Pl=1;var e=ns(),r=ir(),t=cp();return e||r(Object.prototype,"toString",t,{unsafe:!0}),Sl}var El={},Rl={},Wi,_l;function th(){if(_l)return Wi;_l=1;var e=Ie(),r=Ot(),t=on(),n=function(a){return r.slice(0,a.length)===a};return Wi=function(){return n("Bun/")?"BUN":n("Cloudflare-Workers")?"CLOUDFLARE":n("Deno/")?"DENO":n("Node.js/")?"NODE":e.Bun&&typeof Bun.version=="string"?"BUN":e.Deno&&typeof Deno.version=="object"?"DENO":t(e.process)==="process"?"NODE":e.window&&e.document?"BROWSER":"REST"}(),Wi}var Vi,Tl;function os(){if(Tl)return Vi;Tl=1;var e=th();return Vi=e==="NODE",Vi}var Ji,Ol;function fp(){if(Ol)return Ji;Ol=1;var e=ar(),r=vn(),t=Ne(),n=De(),a=t("species");return Ji=function(i){var o=e(i);n&&o&&!o[a]&&r(o,a,{configurable:!0,get:function(){return this}})},Ji}var Zi,kl;function dp(){if(kl)return Zi;kl=1;var e=eh(),r=dn(),t=TypeError;return Zi=function(n){if(e(n))return n;throw new t(r(n)+" is not a constructor")},Zi}var Yi,Cl;function nh(){if(Cl)return Yi;Cl=1;var e=ur(),r=dp(),t=sn(),n=Ne(),a=n("species");return Yi=function(i,o){var s=e(i).constructor,c;return s===void 0||t(c=e(s)[a])?o:r(c)},Yi}var Xi,Al;function ah(){if(Al)return Xi;Al=1;var e=an(),r=Function.prototype,t=r.apply,n=r.call;return Xi=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(t):function(){return n.apply(t,arguments)}),Xi}var Qi,jl;function ih(){if(jl)return Qi;jl=1;var e=Ot();return Qi=/(?:ipad|iphone|ipod).*applewebkit/i.test(e),Qi}var eo,Ul;function oh(){if(Ul)return eo;Ul=1;var e=Ie(),r=ah(),t=lt(),n=Re(),a=tr(),i=xe(),o=xd(),s=mn(),c=ln(),l=zr(),u=ih(),f=os(),h=e.setImmediate,d=e.clearImmediate,v=e.process,m=e.Dispatch,w=e.Function,E=e.MessageChannel,b=e.String,g=0,p={},y="onreadystatechange",k,A,j,z;i(function(){k=e.location});var H=function(q){if(a(p,q)){var O=p[q];delete p[q],O()}},ee=function(q){return function(){H(q)}},x=function(q){H(q.data)},N=function(q){e.postMessage(b(q),k.protocol+"//"+k.host)};return(!h||!d)&&(h=function(O){l(arguments.length,1);var X=n(O)?O:w(O),re=s(arguments,1);return p[++g]=function(){r(X,void 0,re)},A(g),g},d=function(O){delete p[O]},f?A=function(q){v.nextTick(ee(q))}:m&&m.now?A=function(q){m.now(ee(q))}:E&&!u?(j=new E,z=j.port2,j.port1.onmessage=x,A=t(z.postMessage,z)):e.addEventListener&&n(e.postMessage)&&!e.importScripts&&k&&k.protocol!=="file:"&&!i(N)?(A=N,e.addEventListener("message",x,!1)):y in c("script")?A=function(q){o.appendChild(c("script"))[y]=function(){o.removeChild(this),H(q)}}:A=function(q){setTimeout(ee(q),0)}),eo={set:h,clear:d},eo}var ro,Ll;function sh(){if(Ll)return ro;Ll=1;var e=function(){this.head=null,this.tail=null};return e.prototype={add:function(r){var t={item:r,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var r=this.head;if(r){var t=this.head=r.next;return t===null&&(this.tail=null),r.item}}},ro=e,ro}var to,ql;function hp(){if(ql)return to;ql=1;var e=Ot();return to=/ipad|iphone|ipod/i.test(e)&&typeof Pebble<"u",to}var no,xl;function vp(){if(xl)return no;xl=1;var e=Ot();return no=/web0s(?!.*chrome)/i.test(e),no}var ao,Nl;function pp(){if(Nl)return ao;Nl=1;var e=Ie(),r=Wd(),t=lt(),n=oh().set,a=sh(),i=ih(),o=hp(),s=vp(),c=os(),l=e.MutationObserver||e.WebKitMutationObserver,u=e.document,f=e.process,h=e.Promise,d=r("queueMicrotask"),v,m,w,E,b;if(!d){var g=new a,p=function(){var y,k;for(c&&(y=f.domain)&&y.exit();k=g.get();)try{k()}catch(A){throw g.head&&v(),A}y&&y.enter()};!i&&!c&&!s&&l&&u?(m=!0,w=u.createTextNode(""),new l(p).observe(w,{characterData:!0}),v=function(){w.data=m=!m}):!o&&h&&h.resolve?(E=h.resolve(void 0),E.constructor=h,b=t(E.then,E),v=function(){b(p)}):c?v=function(){f.nextTick(p)}:(n=t(n,e),v=function(){n(p)}),d=function(y){g.head||v(),g.add(y)}}return ao=d,ao}var io,Dl;function mp(){return Dl||(Dl=1,io=function(e,r){try{arguments.length===1?console.error(e):console.error(e,r)}catch{}}),io}var oo,$l;function ft(){return $l||($l=1,oo=function(e){try{return{error:!1,value:e()}}catch(r){return{error:!0,value:r}}}),oo}var so,Ml;function dt(){if(Ml)return so;Ml=1;var e=Ie();return so=e.Promise,so}var uo,Fl;function Ut(){if(Fl)return uo;Fl=1;var e=Ie(),r=dt(),t=Re(),n=zd(),a=Yo(),i=Ne(),o=th(),s=gr(),c=_d(),l=r&&r.prototype,u=i("species"),f=!1,h=t(e.PromiseRejectionEvent),d=n("Promise",function(){var v=a(r),m=v!==String(r);if(!m&&c===66||s&&!(l.catch&&l.finally))return!0;if(!c||c<51||!/native code/.test(v)){var w=new r(function(g){g(1)}),E=function(g){g(function(){},function(){})},b=w.constructor={};if(b[u]=E,f=w.then(function(){})instanceof E,!f)return!0}return!m&&(o==="BROWSER"||o==="DENO")&&!h});return uo={CONSTRUCTOR:d,REJECTION_EVENT:h,SUBCLASSING:f},uo}var co={},Bl;function Rr(){if(Bl)return co;Bl=1;var e=cr(),r=TypeError,t=function(n){var a,i;this.promise=new n(function(o,s){if(a!==void 0||i!==void 0)throw new r("Bad Promise constructor");a=o,i=s}),this.resolve=e(a),this.reject=e(i)};return co.f=function(n){return new t(n)},co}var zl;function gp(){if(zl)return Rl;zl=1;var e=ke(),r=gr(),t=os(),n=Ie(),a=Me(),i=ir(),o=Qo(),s=ct(),c=fp(),l=cr(),u=Re(),f=nr(),h=ts(),d=nh(),v=oh().set,m=pp(),w=mp(),E=ft(),b=sh(),g=ut(),p=dt(),y=Ut(),k=Rr(),A="Promise",j=y.CONSTRUCTOR,z=y.REJECTION_EVENT,H=y.SUBCLASSING,ee=g.getterFor(A),x=g.set,N=p&&p.prototype,q=p,O=N,X=n.TypeError,re=n.document,Q=n.process,S=k.f,_=S,D=!!(re&&re.createEvent&&n.dispatchEvent),B="unhandledrejection",K="rejectionhandled",Z=0,de=1,ae=2,ue=1,se=2,Pe,je,Fe,Ce,Ve=function(M){var ie;return f(M)&&u(ie=M.then)?ie:!1},lr=function(M,ie){var le=ie.value,fe=ie.state===de,ge=fe?M.ok:M.fail,or=M.resolve,sr=M.reject,Te=M.domain,He,Je,Xe;try{ge?(fe||(ie.rejection===se&&pe(ie),ie.rejection=ue),ge===!0?He=le:(Te&&Te.enter(),He=ge(le),Te&&(Te.exit(),Xe=!0)),He===M.promise?sr(new X("Promise-chain cycle")):(Je=Ve(He))?a(Je,He,or,sr):or(He)):sr(le)}catch(pt){Te&&!Xe&&Te.exit(),sr(pt)}},fr=function(M,ie){M.notified||(M.notified=!0,m(function(){for(var le=M.reactions,fe;fe=le.get();)lr(fe,M);M.notified=!1,ie&&!M.rejection&&F(M)}))},T=function(M,ie,le){var fe,ge;D?(fe=re.createEvent("Event"),fe.promise=ie,fe.reason=le,fe.initEvent(M,!1,!0),n.dispatchEvent(fe)):fe={promise:ie,reason:le},!z&&(ge=n["on"+M])?ge(fe):M===B&&w("Unhandled promise rejection",le)},F=function(M){a(v,n,function(){var ie=M.facade,le=M.value,fe=J(M),ge;if(fe&&(ge=E(function(){t?Q.emit("unhandledRejection",le,ie):T(B,ie,le)}),M.rejection=t||J(M)?se:ue,ge.error))throw ge.value})},J=function(M){return M.rejection!==ue&&!M.parent},pe=function(M){a(v,n,function(){var ie=M.facade;t?Q.emit("rejectionHandled",ie):T(K,ie,M.value)})},ve=function(M,ie,le){return function(fe){M(ie,fe,le)}},me=function(M,ie,le){M.done||(M.done=!0,le&&(M=le),M.value=ie,M.state=ae,fr(M,!0))},Be=function(M,ie,le){if(!M.done){M.done=!0,le&&(M=le);try{if(M.facade===ie)throw new X("Promise can't be resolved itself");var fe=Ve(ie);fe?m(function(){var ge={done:!1};try{a(fe,ie,ve(Be,ge,M),ve(me,ge,M))}catch(or){me(ge,or,M)}}):(M.value=ie,M.state=de,fr(M,!1))}catch(ge){me({done:!1},ge,M)}}};if(j&&(q=function(ie){h(this,O),l(ie),a(Pe,this);var le=ee(this);try{ie(ve(Be,le),ve(me,le))}catch(fe){me(le,fe)}},O=q.prototype,Pe=function(ie){x(this,{type:A,done:!1,notified:!1,parent:!1,reactions:new b,rejection:!1,state:Z,value:null})},Pe.prototype=i(O,"then",function(ie,le){var fe=ee(this),ge=S(d(this,q));return fe.parent=!0,ge.ok=u(ie)?ie:!0,ge.fail=u(le)&&le,ge.domain=t?Q.domain:void 0,fe.state===Z?fe.reactions.add(ge):m(function(){lr(ge,fe)}),ge.promise}),je=function(){var M=new Pe,ie=ee(M);this.promise=M,this.resolve=ve(Be,ie),this.reject=ve(me,ie)},k.f=S=function(M){return M===q||M===Fe?new je(M):_(M)},!r&&u(p)&&N!==Object.prototype)){Ce=N.then,H||i(N,"then",function(ie,le){var fe=this;return new q(function(ge,or){a(Ce,fe,ge,or)}).then(ie,le)},{unsafe:!0});try{delete N.constructor}catch{}o&&o(N,O)}return e({global:!0,constructor:!0,wrap:!0,forced:j},{Promise:q}),s(q,A,!1,!0),c(A),Rl}var Hl={},lo,Gl;function yp(){if(Gl)return lo;Gl=1;var e=Ne(),r=e("iterator"),t=!1;try{var n=0,a={next:function(){return{done:!!n++}},return:function(){t=!0}};a[r]=function(){return this},Array.from(a,function(){throw 2})}catch{}return lo=function(i,o){try{if(!o&&!t)return!1}catch{return!1}var s=!1;try{var c={};c[r]=function(){return{next:function(){return{done:s=!0}}}},i(c)}catch{}return s},lo}var fo,Kl;function gn(){if(Kl)return fo;Kl=1;var e=dt(),r=yp(),t=Ut().CONSTRUCTOR;return fo=t||!r(function(n){e.all(n).then(void 0,function(){})}),fo}var Wl;function wp(){if(Wl)return Hl;Wl=1;var e=ke(),r=Me(),t=cr(),n=Rr(),a=ft(),i=jt(),o=gn();return e({target:"Promise",stat:!0,forced:o},{all:function(c){var l=this,u=n.f(l),f=u.resolve,h=u.reject,d=a(function(){var v=t(l.resolve),m=[],w=0,E=1;i(c,function(b){var g=w++,p=!1;E++,r(v,l,b).then(function(y){p||(p=!0,m[g]=y,--E||f(m))},h)}),--E||f(m)});return d.error&&h(d.value),u.promise}}),Hl}var Vl={},Jl;function bp(){if(Jl)return Vl;Jl=1;var e=ke(),r=gr(),t=Ut().CONSTRUCTOR,n=dt(),a=ar(),i=Re(),o=ir(),s=n&&n.prototype;if(e({target:"Promise",proto:!0,forced:t,real:!0},{catch:function(l){return this.then(void 0,l)}}),!r&&i(n)){var c=a("Promise").prototype.catch;s.catch!==c&&o(s,"catch",c,{unsafe:!0})}return Vl}var Zl={},Yl;function Sp(){if(Yl)return Zl;Yl=1;var e=ke(),r=Me(),t=cr(),n=Rr(),a=ft(),i=jt(),o=gn();return e({target:"Promise",stat:!0,forced:o},{race:function(c){var l=this,u=n.f(l),f=u.reject,h=a(function(){var d=t(l.resolve);i(c,function(v){r(d,l,v).then(u.resolve,f)})});return h.error&&f(h.value),u.promise}}),Zl}var Xl={},Ql;function Ip(){if(Ql)return Xl;Ql=1;var e=ke(),r=Rr(),t=Ut().CONSTRUCTOR;return e({target:"Promise",stat:!0,forced:t},{reject:function(a){var i=r.f(this),o=i.reject;return o(a),i.promise}}),Xl}var ef={},ho,rf;function uh(){if(rf)return ho;rf=1;var e=ur(),r=nr(),t=Rr();return ho=function(n,a){if(e(n),r(a)&&a.constructor===n)return a;var i=t.f(n),o=i.resolve;return o(a),i.promise},ho}var tf;function Pp(){if(tf)return ef;tf=1;var e=ke(),r=ar(),t=gr(),n=dt(),a=Ut().CONSTRUCTOR,i=uh(),o=r("Promise"),s=t&&!a;return e({target:"Promise",stat:!0,forced:t||a},{resolve:function(l){return i(s&&this===o?n:this,l)}}),ef}var nf;function Ep(){return nf||(nf=1,gp(),wp(),bp(),Sp(),Ip(),Pp()),El}var af={},of;function Rp(){if(of)return af;of=1;var e=ke(),r=Me(),t=cr(),n=Rr(),a=ft(),i=jt(),o=gn();return e({target:"Promise",stat:!0,forced:o},{allSettled:function(c){var l=this,u=n.f(l),f=u.resolve,h=u.reject,d=a(function(){var v=t(l.resolve),m=[],w=0,E=1;i(c,function(b){var g=w++,p=!1;E++,r(v,l,b).then(function(y){p||(p=!0,m[g]={status:"fulfilled",value:y},--E||f(m))},function(y){p||(p=!0,m[g]={status:"rejected",reason:y},--E||f(m))})}),--E||f(m)});return d.error&&h(d.value),u.promise}}),af}var sf={},uf;function _p(){if(uf)return sf;uf=1;var e=ke(),r=Me(),t=cr(),n=ar(),a=Rr(),i=ft(),o=jt(),s=gn(),c="No one promise resolved";return e({target:"Promise",stat:!0,forced:s},{any:function(u){var f=this,h=n("AggregateError"),d=a.f(f),v=d.resolve,m=d.reject,w=i(function(){var E=t(f.resolve),b=[],g=0,p=1,y=!1;o(u,function(k){var A=g++,j=!1;p++,r(E,f,k).then(function(z){j||y||(y=!0,v(z))},function(z){j||y||(j=!0,b[A]=z,--p||m(new h(b,c)))})}),--p||m(new h(b,c))});return w.error&&m(w.value),d.promise}}),sf}var cf={},lf;function ch(){if(lf)return cf;lf=1;var e=ke(),r=Ie(),t=ah(),n=mn(),a=Rr(),i=cr(),o=ft(),s=r.Promise,c=!1,l=!s||!s.try||o(function(){s.try(function(u){c=u===8},8)}).error||!c;return e({target:"Promise",stat:!0,forced:l},{try:function(u){var f=arguments.length>1?n(arguments,1):[],h=a.f(this),d=o(function(){return t(i(u),void 0,f)});return(d.error?h.reject:h.resolve)(d.value),h.promise}}),cf}var ff={},df;function lh(){if(df)return ff;df=1;var e=ke(),r=Rr();return e({target:"Promise",stat:!0},{withResolvers:function(){var n=r.f(this);return{promise:n.promise,resolve:n.resolve,reject:n.reject}}}),ff}var hf={},vf;function Tp(){if(vf)return hf;vf=1;var e=ke(),r=gr(),t=dt(),n=xe(),a=ar(),i=Re(),o=nh(),s=uh(),c=ir(),l=t&&t.prototype,u=!!t&&n(function(){l.finally.call({then:function(){}},function(){})});if(e({target:"Promise",proto:!0,real:!0,forced:u},{finally:function(h){var d=o(this,a("Promise")),v=i(h);return this.then(v?function(m){return s(d,h()).then(function(){return m})}:h,v?function(m){return s(d,h()).then(function(){throw m})}:h)}}),!r&&i(t)){var f=a("Promise").prototype.finally;l.finally!==f&&c(l,"finally",f,{unsafe:!0})}return hf}var vo,pf;function Op(){if(pf)return vo;pf=1,up(),rs(),lp(),Ep(),Rp(),_p(),ch(),lh(),Tp(),Yd();var e=is();return vo=e.Promise,vo}var po,mf;function kp(){if(mf)return po;mf=1;var e=Op();return rh(),po=e,po}var gf={},yf;function Cp(){return yf||(yf=1,ch()),gf}var wf={},bf;function Ap(){return bf||(bf=1,lh()),wf}var mo,Sf;function jp(){if(Sf)return mo;Sf=1;var e=kp();return Cp(),Ap(),mo=e,mo}jp();const fh="sesamy-debug";function Up(e,r,t){const n=new Date;n.setTime(n.getTime()+t*60*60*1e3);const a="expires="+n.toUTCString();document.cookie=`${e}=${r}; ${a}; path=/`}function Lp(e){if(typeof document>"u")return null;const r=e+"=",t=document.cookie.split(";");for(let n=0;n<t.length;n++){let a=t[n];for(;a.charAt(0)===" ";)a=a.substring(1);if(a.indexOf(r)===0)return a.substring(r.length,a.length)}return null}function qp(e){Up(fh,e.toString(),1)}function xp(){return Lp(fh)==="true"}function ye(e){xp()&&console.log(e)}function Ir(e,r){if(typeof window>"u")return;const t=new CustomEvent(e,{detail:r,bubbles:!0,composed:!0});ye(`Triggering event: ${e}`),dispatchEvent(t)}function pr(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)r.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(t[n[a]]=e[n[a]])}return t}var jr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ss(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function us(e,r){return e(r={exports:{}},r.exports),r.exports}var Ar=us(function(e,r){Object.defineProperty(r,"__esModule",{value:!0});var t=function(){function n(){var a=this;this.locked=new Map,this.addToLocked=function(i,o){var s=a.locked.get(i);s===void 0?o===void 0?a.locked.set(i,[]):a.locked.set(i,[o]):o!==void 0&&(s.unshift(o),a.locked.set(i,s))},this.isLocked=function(i){return a.locked.has(i)},this.lock=function(i){return new Promise(function(o,s){a.isLocked(i)?a.addToLocked(i,o):(a.addToLocked(i),o())})},this.unlock=function(i){var o=a.locked.get(i);if(o!==void 0&&o.length!==0){var s=o.pop();a.locked.set(i,o),s!==void 0&&setTimeout(s,0)}else a.locked.delete(i)}}return n.getInstance=function(){return n.instance===void 0&&(n.instance=new n),n.instance},n}();r.default=function(){return t.getInstance()}});ss(Ar);var Np=ss(us(function(e,r){var t=jr&&jr.__awaiter||function(u,f,h,d){return new(h||(h=Promise))(function(v,m){function w(g){try{b(d.next(g))}catch(p){m(p)}}function E(g){try{b(d.throw(g))}catch(p){m(p)}}function b(g){g.done?v(g.value):new h(function(p){p(g.value)}).then(w,E)}b((d=d.apply(u,f||[])).next())})},n=jr&&jr.__generator||function(u,f){var h,d,v,m,w={label:0,sent:function(){if(1&v[0])throw v[1];return v[1]},trys:[],ops:[]};return m={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function E(b){return function(g){return function(p){if(h)throw new TypeError("Generator is already executing.");for(;w;)try{if(h=1,d&&(v=2&p[0]?d.return:p[0]?d.throw||((v=d.return)&&v.call(d),0):d.next)&&!(v=v.call(d,p[1])).done)return v;switch(d=0,v&&(p=[2&p[0],v.value]),p[0]){case 0:case 1:v=p;break;case 4:return w.label++,{value:p[1],done:!1};case 5:w.label++,d=p[1],p=[0];continue;case 7:p=w.ops.pop(),w.trys.pop();continue;default:if(v=w.trys,!((v=v.length>0&&v[v.length-1])||p[0]!==6&&p[0]!==2)){w=0;continue}if(p[0]===3&&(!v||p[1]>v[0]&&p[1]<v[3])){w.label=p[1];break}if(p[0]===6&&w.label<v[1]){w.label=v[1],v=p;break}if(v&&w.label<v[2]){w.label=v[2],w.ops.push(p);break}v[2]&&w.ops.pop(),w.trys.pop();continue}p=f.call(u,w)}catch(y){p=[6,y],d=0}finally{h=v=0}if(5&p[0])throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}([b,g])}}},a=jr;Object.defineProperty(r,"__esModule",{value:!0});var i="browser-tabs-lock-key",o={key:function(u){return t(a,void 0,void 0,function(){return n(this,function(f){throw new Error("Unsupported")})})},getItem:function(u){return t(a,void 0,void 0,function(){return n(this,function(f){throw new Error("Unsupported")})})},clear:function(){return t(a,void 0,void 0,function(){return n(this,function(u){return[2,window.localStorage.clear()]})})},removeItem:function(u){return t(a,void 0,void 0,function(){return n(this,function(f){throw new Error("Unsupported")})})},setItem:function(u,f){return t(a,void 0,void 0,function(){return n(this,function(h){throw new Error("Unsupported")})})},keySync:function(u){return window.localStorage.key(u)},getItemSync:function(u){return window.localStorage.getItem(u)},clearSync:function(){return window.localStorage.clear()},removeItemSync:function(u){return window.localStorage.removeItem(u)},setItemSync:function(u,f){return window.localStorage.setItem(u,f)}};function s(u){return new Promise(function(f){return setTimeout(f,u)})}function c(u){for(var f="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",h="",d=0;d<u;d++)h+=f[Math.floor(Math.random()*f.length)];return h}var l=function(){function u(f){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+c(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),this.storageHandler=f,u.waiters===void 0&&(u.waiters=[])}return u.prototype.acquireLock=function(f,h){return h===void 0&&(h=5e3),t(this,void 0,void 0,function(){var d,v,m,w,E,b,g;return n(this,function(p){switch(p.label){case 0:d=Date.now()+c(4),v=Date.now()+h,m=i+"-"+f,w=this.storageHandler===void 0?o:this.storageHandler,p.label=1;case 1:return Date.now()<v?[4,s(30)]:[3,8];case 2:return p.sent(),w.getItemSync(m)!==null?[3,5]:(E=this.id+"-"+f+"-"+d,[4,s(Math.floor(25*Math.random()))]);case 3:return p.sent(),w.setItemSync(m,JSON.stringify({id:this.id,iat:d,timeoutKey:E,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,s(30)];case 4:return p.sent(),(b=w.getItemSync(m))!==null&&(g=JSON.parse(b)).id===this.id&&g.iat===d?(this.acquiredIatSet.add(d),this.refreshLockWhileAcquired(m,d),[2,!0]):[3,7];case 5:return u.lockCorrector(this.storageHandler===void 0?o:this.storageHandler),[4,this.waitForSomethingToChange(v)];case 6:p.sent(),p.label=7;case 7:return d=Date.now()+c(4),[3,1];case 8:return[2,!1]}})})},u.prototype.refreshLockWhileAcquired=function(f,h){return t(this,void 0,void 0,function(){var d=this;return n(this,function(v){return setTimeout(function(){return t(d,void 0,void 0,function(){var m,w,E;return n(this,function(b){switch(b.label){case 0:return[4,Ar.default().lock(h)];case 1:return b.sent(),this.acquiredIatSet.has(h)?(m=this.storageHandler===void 0?o:this.storageHandler,(w=m.getItemSync(f))===null?(Ar.default().unlock(h),[2]):((E=JSON.parse(w)).timeRefreshed=Date.now(),m.setItemSync(f,JSON.stringify(E)),Ar.default().unlock(h),this.refreshLockWhileAcquired(f,h),[2])):(Ar.default().unlock(h),[2])}})})},1e3),[2]})})},u.prototype.waitForSomethingToChange=function(f){return t(this,void 0,void 0,function(){return n(this,function(h){switch(h.label){case 0:return[4,new Promise(function(d){var v=!1,m=Date.now(),w=!1;function E(){if(w||(window.removeEventListener("storage",E),u.removeFromWaiting(E),clearTimeout(b),w=!0),!v){v=!0;var g=50-(Date.now()-m);g>0?setTimeout(d,g):d(null)}}window.addEventListener("storage",E),u.addToWaiting(E);var b=setTimeout(E,Math.max(0,f-Date.now()))})];case 1:return h.sent(),[2]}})})},u.addToWaiting=function(f){this.removeFromWaiting(f),u.waiters!==void 0&&u.waiters.push(f)},u.removeFromWaiting=function(f){u.waiters!==void 0&&(u.waiters=u.waiters.filter(function(h){return h!==f}))},u.notifyWaiters=function(){u.waiters!==void 0&&u.waiters.slice().forEach(function(f){return f()})},u.prototype.releaseLock=function(f){return t(this,void 0,void 0,function(){return n(this,function(h){switch(h.label){case 0:return[4,this.releaseLock__private__(f)];case 1:return[2,h.sent()]}})})},u.prototype.releaseLock__private__=function(f){return t(this,void 0,void 0,function(){var h,d,v,m;return n(this,function(w){switch(w.label){case 0:return h=this.storageHandler===void 0?o:this.storageHandler,d=i+"-"+f,(v=h.getItemSync(d))===null?[2]:(m=JSON.parse(v)).id!==this.id?[3,2]:[4,Ar.default().lock(m.iat)];case 1:w.sent(),this.acquiredIatSet.delete(m.iat),h.removeItemSync(d),Ar.default().unlock(m.iat),u.notifyWaiters(),w.label=2;case 2:return[2]}})})},u.lockCorrector=function(f){for(var h=Date.now()-5e3,d=f,v=[],m=0;;){var w=d.keySync(m);if(w===null)break;v.push(w),m++}for(var E=!1,b=0;b<v.length;b++){var g=v[b];if(g.includes(i)){var p=d.getItemSync(g);if(p!==null){var y=JSON.parse(p);(y.timeRefreshed===void 0&&y.timeAcquired<h||y.timeRefreshed!==void 0&&y.timeRefreshed<h)&&(d.removeItemSync(g),E=!0)}}}E&&u.notifyWaiters()},u.waiters=void 0,u}();r.default=l}));const Dp={timeoutInSeconds:60},dh={name:"auth0-spa-js",version:"2.1.3"},hh=()=>Date.now();let Ye=class Oo extends Error{constructor(r,t){super(t),this.error=r,this.error_description=t,Object.setPrototypeOf(this,Oo.prototype)}static fromPayload({error:r,error_description:t}){return new Oo(r,t)}},$p=class vh extends Ye{constructor(r,t,n,a=null){super(r,t),this.state=n,this.appState=a,Object.setPrototypeOf(this,vh.prototype)}},ko=class ph extends Ye{constructor(){super("timeout","Timeout"),Object.setPrototypeOf(this,ph.prototype)}},Mp=class mh extends ko{constructor(r){super(),this.popup=r,Object.setPrototypeOf(this,mh.prototype)}},Fp=class gh extends Ye{constructor(r){super("cancelled","Popup closed"),this.popup=r,Object.setPrototypeOf(this,gh.prototype)}},Bp=class yh extends Ye{constructor(r,t,n){super(r,t),this.mfa_token=n,Object.setPrototypeOf(this,yh.prototype)}},wh=class bh extends Ye{constructor(r,t){super("missing_refresh_token",`Missing Refresh Token (audience: '${If(r,["default"])}', scope: '${If(t)}')`),this.audience=r,this.scope=t,Object.setPrototypeOf(this,bh.prototype)}};function If(e,r=[]){return e&&!r.includes(e)?e:""}const Kt=()=>window.crypto,go=()=>{const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.";let r="";return Array.from(Kt().getRandomValues(new Uint8Array(43))).forEach(t=>r+=e[t%e.length]),r},Pf=e=>btoa(e),Co=e=>{var{clientId:r}=e,t=pr(e,["clientId"]);return new URLSearchParams((n=>Object.keys(n).filter(a=>n[a]!==void 0).reduce((a,i)=>Object.assign(Object.assign({},a),{[i]:n[i]}),{}))(Object.assign({client_id:r},t))).toString()},Ef=e=>(r=>decodeURIComponent(atob(r).split("").map(t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)).join("")))(e.replace(/_/g,"/").replace(/-/g,"+")),zp=async(e,r)=>{const t=await fetch(e,r);return{ok:t.ok,json:await t.json()}},Hp=async(e,r,t)=>{const n=new AbortController;let a;return r.signal=n.signal,Promise.race([zp(e,r),new Promise((i,o)=>{a=setTimeout(()=>{n.abort(),o(new Error("Timeout when executing 'fetch'"))},t)})]).finally(()=>{clearTimeout(a)})},Gp=async(e,r,t,n,a,i,o)=>{return s={auth:{audience:r,scope:t},timeout:a,fetchUrl:e,fetchOptions:n,useFormData:o},c=i,new Promise(function(l,u){const f=new MessageChannel;f.port1.onmessage=function(h){h.data.error?u(new Error(h.data.error)):l(h.data),f.port1.close()},c.postMessage(s,[f.port2])});var s,c},Kp=async(e,r,t,n,a,i,o=1e4)=>a?Gp(e,r,t,n,o,a,i):Hp(e,n,o);async function Wp(e,r){var{baseUrl:t,timeout:n,audience:a,scope:i,auth0Client:o,useFormData:s}=e,c=pr(e,["baseUrl","timeout","audience","scope","auth0Client","useFormData"]);const l=s?Co(c):JSON.stringify(c);return await async function(u,f,h,d,v,m,w){let E,b=null;for(let j=0;j<3;j++)try{E=await Kp(u,h,d,v,m,w,f),b=null;break}catch(z){b=z}if(b)throw b;const g=E.json,{error:p,error_description:y}=g,k=pr(g,["error","error_description"]),{ok:A}=E;if(!A){const j=y||`HTTP error. Unable to fetch ${u}`;throw p==="mfa_required"?new Bp(p,j,k.mfa_token):p==="missing_refresh_token"?new wh(h,d):new Ye(p||"request_error",j)}return k}(`${t}/oauth/token`,n,a||"default",i,{method:"POST",body:l,headers:{"Content-Type":s?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(o||dh))}},r,s)}const qt=(...e)=>{return(r=e.filter(Boolean).join(" ").trim().split(/\s+/),Array.from(new Set(r))).join(" ");var r};let Lr=class Ao{constructor(r,t="@@auth0spajs@@",n){this.prefix=t,this.suffix=n,this.clientId=r.clientId,this.scope=r.scope,this.audience=r.audience}toKey(){return[this.prefix,this.clientId,this.audience,this.scope,this.suffix].filter(Boolean).join("::")}static fromKey(r){const[t,n,a,i]=r.split("::");return new Ao({clientId:n,scope:i,audience:a},t)}static fromCacheEntry(r){const{scope:t,audience:n,client_id:a}=r;return new Ao({scope:t,audience:n,clientId:a})}},Vp=class{set(r,t){localStorage.setItem(r,JSON.stringify(t))}get(r){const t=window.localStorage.getItem(r);if(t)try{return JSON.parse(t)}catch{return}}remove(r){localStorage.removeItem(r)}allKeys(){return Object.keys(window.localStorage).filter(r=>r.startsWith("@@auth0spajs@@"))}},Sh=class{constructor(){this.enclosedCache=function(){let r={};return{set(t,n){r[t]=n},get(t){const n=r[t];if(n)return n},remove(t){delete r[t]},allKeys:()=>Object.keys(r)}}()}},Jp=class{constructor(r,t,n){this.cache=r,this.keyManifest=t,this.nowProvider=n||hh}async setIdToken(r,t,n){var a;const i=this.getIdTokenCacheKey(r);await this.cache.set(i,{id_token:t,decodedToken:n}),await((a=this.keyManifest)===null||a===void 0?void 0:a.add(i))}async getIdToken(r){const t=await this.cache.get(this.getIdTokenCacheKey(r.clientId));if(!t&&r.scope&&r.audience){const n=await this.get(r);return!n||!n.id_token||!n.decodedToken?void 0:{id_token:n.id_token,decodedToken:n.decodedToken}}if(t)return{id_token:t.id_token,decodedToken:t.decodedToken}}async get(r,t=0){var n;let a=await this.cache.get(r.toKey());if(!a){const s=await this.getCacheKeys();if(!s)return;const c=this.matchExistingCacheKey(r,s);c&&(a=await this.cache.get(c))}if(!a)return;const i=await this.nowProvider(),o=Math.floor(i/1e3);return a.expiresAt-t<o?a.body.refresh_token?(a.body={refresh_token:a.body.refresh_token},await this.cache.set(r.toKey(),a),a.body):(await this.cache.remove(r.toKey()),void await((n=this.keyManifest)===null||n===void 0?void 0:n.remove(r.toKey()))):a.body}async set(r){var t;const n=new Lr({clientId:r.client_id,scope:r.scope,audience:r.audience}),a=await this.wrapCacheEntry(r);await this.cache.set(n.toKey(),a),await((t=this.keyManifest)===null||t===void 0?void 0:t.add(n.toKey()))}async clear(r){var t;const n=await this.getCacheKeys();n&&(await n.filter(a=>!r||a.includes(r)).reduce(async(a,i)=>{await a,await this.cache.remove(i)},Promise.resolve()),await((t=this.keyManifest)===null||t===void 0?void 0:t.clear()))}async wrapCacheEntry(r){const t=await this.nowProvider();return{body:r,expiresAt:Math.floor(t/1e3)+r.expires_in}}async getCacheKeys(){var r;return this.keyManifest?(r=await this.keyManifest.get())===null||r===void 0?void 0:r.keys:this.cache.allKeys?this.cache.allKeys():void 0}getIdTokenCacheKey(r){return new Lr({clientId:r},"@@auth0spajs@@","@@user@@").toKey()}matchExistingCacheKey(r,t){return t.filter(n=>{var a;const i=Lr.fromKey(n),o=new Set(i.scope&&i.scope.split(" ")),s=((a=r.scope)===null||a===void 0?void 0:a.split(" "))||[],c=i.scope&&s.reduce((l,u)=>l&&o.has(u),!0);return i.prefix==="@@auth0spajs@@"&&i.clientId===r.clientId&&i.audience===r.audience&&c})[0]}},Zp=class{constructor(r,t,n){this.storage=r,this.clientId=t,this.cookieDomain=n,this.storageKey=`a0.spajs.txs.${this.clientId}`}create(r){this.storage.save(this.storageKey,r,{daysUntilExpire:1,cookieDomain:this.cookieDomain})}get(){return this.storage.get(this.storageKey)}remove(){this.storage.remove(this.storageKey,{cookieDomain:this.cookieDomain})}};const gt=e=>typeof e=="number",Yp=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"],Xp=e=>{if(!e.id_token)throw new Error("ID token is required but missing");const r=(i=>{const o=i.split("."),[s,c,l]=o;if(o.length!==3||!s||!c||!l)throw new Error("ID token could not be decoded");const u=JSON.parse(Ef(c)),f={__raw:i},h={};return Object.keys(u).forEach(d=>{f[d]=u[d],Yp.includes(d)||(h[d]=u[d])}),{encoded:{header:s,payload:c,signature:l},header:JSON.parse(Ef(s)),claims:f,user:h}})(e.id_token);if(!r.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(r.claims.iss!==e.iss)throw new Error(`Issuer (iss) claim mismatch in the ID token; expected "${e.iss}", found "${r.claims.iss}"`);if(!r.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if(r.header.alg!=="RS256")throw new Error(`Signature algorithm of "${r.header.alg}" is not supported. Expected the ID token to be signed with "RS256".`);if(!r.claims.aud||typeof r.claims.aud!="string"&&!Array.isArray(r.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(r.claims.aud)){if(!r.claims.aud.includes(e.aud))throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${e.aud}" but was not one of "${r.claims.aud.join(", ")}"`);if(r.claims.aud.length>1){if(!r.claims.azp)throw new Error("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values");if(r.claims.azp!==e.aud)throw new Error(`Authorized Party (azp) claim mismatch in the ID token; expected "${e.aud}", found "${r.claims.azp}"`)}}else if(r.claims.aud!==e.aud)throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${e.aud}" but found "${r.claims.aud}"`);if(e.nonce){if(!r.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(r.claims.nonce!==e.nonce)throw new Error(`Nonce (nonce) claim mismatch in the ID token; expected "${e.nonce}", found "${r.claims.nonce}"`)}if(e.max_age&&!gt(r.claims.auth_time))throw new Error("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified");if(r.claims.exp==null||!gt(r.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!gt(r.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");const t=e.leeway||60,n=new Date(e.now||Date.now()),a=new Date(0);if(a.setUTCSeconds(r.claims.exp+t),n>a)throw new Error(`Expiration Time (exp) claim error in the ID token; current time (${n}) is after expiration time (${a})`);if(r.claims.nbf!=null&>(r.claims.nbf)){const i=new Date(0);if(i.setUTCSeconds(r.claims.nbf-t),n<i)throw new Error(`Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Current time (${n}) is before ${i}`)}if(r.claims.auth_time!=null&>(r.claims.auth_time)){const i=new Date(0);if(i.setUTCSeconds(parseInt(r.claims.auth_time)+e.max_age+t),n>i)throw new Error(`Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time (${n}) is after last auth at ${i}`)}if(e.organization){const i=e.organization.trim();if(i.startsWith("org_")){const o=i;if(!r.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(o!==r.claims.org_id)throw new Error(`Organization ID (org_id) claim mismatch in the ID token; expected "${o}", found "${r.claims.org_id}"`)}else{const o=i.toLowerCase();if(!r.claims.org_name)throw new Error("Organization Name (org_name) claim must be a string present in the ID token");if(o!==r.claims.org_name)throw new Error(`Organization Name (org_name) claim mismatch in the ID token; expected "${o}", found "${r.claims.org_name}"`)}}return r};var qr=us(function(e,r){var t=jr&&jr.__assign||function(){return t=Object.assign||function(c){for(var l,u=1,f=arguments.length;u<f;u++)for(var h in l=arguments[u])Object.prototype.hasOwnProperty.call(l,h)&&(c[h]=l[h]);return c},t.apply(this,arguments)};function n(c,l){if(!l)return"";var u="; "+c;return l===!0?u:u+"="+l}function a(c,l,u){return encodeURIComponent(c).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(l).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(f){if(typeof f.expires=="number"){var h=new Date;h.setMilliseconds(h.getMilliseconds()+864e5*f.expires),f.expires=h}return n("Expires",f.expires?f.expires.toUTCString():"")+n("Domain",f.domain)+n("Path",f.path)+n("Secure",f.secure)+n("SameSite",f.sameSite)}(u)}function i(c){for(var l={},u=c?c.split("; "):[],f=/(%[\dA-F]{2})+/gi,h=0;h<u.length;h++){var d=u[h].split("="),v=d.slice(1).join("=");v.charAt(0)==='"'&&(v=v.slice(1,-1));try{l[d[0].replace(f,decodeURIComponent)]=v.replace(f,decodeURIComponent)}catch{}}return l}function o(){return i(document.cookie)}function s(c,l,u){document.cookie=a(c,l,t({path:"/"},u))}r.__esModule=!0,r.encode=a,r.parse=i,r.getAll=o,r.get=function(c){return o()[c]},r.set=s,r.remove=function(c,l){s(c,"",t(t({},l),{expires:-1}))}});ss(qr),qr.encode,qr.parse,qr.getAll;var Qp=qr.get,Ih=qr.set,Ph=qr.remove;const Jr={get(e){const r=Qp(e);if(r!==void 0)return JSON.parse(r)},save(e,r,t){let n={};window.location.protocol==="https:"&&(n={secure:!0,sameSite:"none"}),t?.daysUntilExpire&&(n.expires=t.daysUntilExpire),t?.cookieDomain&&(n.domain=t.cookieDomain),Ih(e,JSON.stringify(r),n)},remove(e,r){let t={};r?.cookieDomain&&(t.domain=r.cookieDomain),Ph(e,t)}},em={get(e){return Jr.get(e)||Jr.get(`_legacy_${e}`)},save(e,r,t){let n={};window.location.protocol==="https:"&&(n={secure:!0}),t?.daysUntilExpire&&(n.expires=t.daysUntilExpire),t?.cookieDomain&&(n.domain=t.cookieDomain),Ih(`_legacy_${e}`,JSON.stringify(r),n),Jr.save(e,r,t)},remove(e,r){let t={};r?.cookieDomain&&(t.domain=r.cookieDomain),Ph(e,t),Jr.remove(e,r),Jr.remove(`_legacy_${e}`,r)}},rm={get(e){if(typeof sessionStorage>"u")return;const r=sessionStorage.getItem(e);return r!=null?JSON.parse(r):void 0},save(e,r){sessionStorage.setItem(e,JSON.stringify(r))},remove(e){sessionStorage.removeItem(e)}};function tm(e,r,t){var n=r===void 0?null:r,a=function(c,l){var u=atob(c);if(l){for(var f=new Uint8Array(u.length),h=0,d=u.length;h<d;++h)f[h]=u.charCodeAt(h);return String.fromCharCode.apply(null,new Uint16Array(f.buffer))}return u}(e,t!==void 0&&t),i=a.indexOf(`
|
|
2
|
-
`,10)+1,o=a.substring(i)+(n?"//# sourceMappingURL="+n:""),s=new Blob([o],{type:"application/javascript"});return URL.createObjectURL(s)}var
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Ls=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},qs={},qn,xs;function xe(){return xs||(xs=1,qn=function(e){try{return!!e()}catch{return!0}}),qn}var xn,Ns;function un(){if(Ns)return xn;Ns=1;var e=xe();return xn=!e(function(){var r=(function(){}).bind();return typeof r!="function"||r.hasOwnProperty("prototype")}),xn}var Nn,$s;function Se(){if($s)return Nn;$s=1;var e=un(),r=Function.prototype,t=r.call,n=e&&r.bind.bind(t,t);return Nn=e?n:function(a){return function(){return t.apply(a,arguments)}},Nn}var $n,Ds;function cn(){if(Ds)return $n;Ds=1;var e=Se(),r=e({}.toString),t=e("".slice);return $n=function(n){return t(r(n),8,-1)},$n}var Dn,Ms;function Od(){if(Ms)return Dn;Ms=1;var e=Se(),r=xe(),t=cn(),n=Object,a=e("".split);return Dn=r(function(){return!n("z").propertyIsEnumerable(0)})?function(i){return t(i)==="String"?a(i,""):n(i)}:n,Dn}var Mn,Fs;function ln(){return Fs||(Fs=1,Mn=function(e){return e==null}),Mn}var Fn,Bs;function fn(){if(Bs)return Fn;Bs=1;var e=ln(),r=TypeError;return Fn=function(t){if(e(t))throw new r("Can't call method on "+t);return t},Fn}var Bn,zs;function kt(){if(zs)return Bn;zs=1;var e=Od(),r=fn();return Bn=function(t){return e(r(t))},Bn}var yt,Hs;function Ie(){if(Hs)return yt;Hs=1;var e=function(r){return r&&r.Math===Math&&r};return yt=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof Ls=="object"&&Ls)||e(typeof yt=="object"&&yt)||function(){return this}()||Function("return this")(),yt}var zn={exports:{}},Hn,Ks;function gr(){return Ks||(Ks=1,Hn=!1),Hn}var Kn,Gs;function Go(){if(Gs)return Kn;Gs=1;var e=Ie(),r=Object.defineProperty;return Kn=function(t,n){try{r(e,t,{value:n,configurable:!0,writable:!0})}catch{e[t]=n}return n},Kn}var Ws;function Wo(){if(Ws)return zn.exports;Ws=1;var e=gr(),r=Ie(),t=Go(),n="__core-js_shared__",a=zn.exports=r[n]||t(n,{});return(a.versions||(a.versions=[])).push({version:"3.39.0",mode:e?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE",source:"https://github.com/zloirock/core-js"}),zn.exports}var Gn,Vs;function kd(){if(Vs)return Gn;Vs=1;var e=Wo();return Gn=function(r,t){return e[r]||(e[r]=t||{})},Gn}var Wn,Js;function dn(){if(Js)return Wn;Js=1;var e=fn(),r=Object;return Wn=function(t){return r(e(t))},Wn}var Vn,Zs;function tr(){if(Zs)return Vn;Zs=1;var e=Se(),r=dn(),t=e({}.hasOwnProperty);return Vn=Object.hasOwn||function(a,i){return t(r(a),i)},Vn}var Jn,Ys;function Cd(){if(Ys)return Jn;Ys=1;var e=Se(),r=0,t=Math.random(),n=e(1 .toString);return Jn=function(a){return"Symbol("+(a===void 0?"":a)+")_"+n(++r+t,36)},Jn}var Zn,Xs;function Ct(){if(Xs)return Zn;Xs=1;var e=Ie(),r=e.navigator,t=r&&r.userAgent;return Zn=t?String(t):"",Zn}var Yn,Qs;function Ad(){if(Qs)return Yn;Qs=1;var e=Ie(),r=Ct(),t=e.process,n=e.Deno,a=t&&t.versions||n&&n.version,i=a&&a.v8,o,s;return i&&(o=i.split("."),s=o[0]>0&&o[0]<4?1:+(o[0]+o[1])),!s&&r&&(o=r.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=r.match(/Chrome\/(\d+)/),o&&(s=+o[1]))),Yn=s,Yn}var Xn,eu;function jd(){if(eu)return Xn;eu=1;var e=Ad(),r=xe(),t=Ie(),n=t.String;return Xn=!!Object.getOwnPropertySymbols&&!r(function(){var a=Symbol("symbol detection");return!n(a)||!(Object(a)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Xn}var Qn,ru;function Ud(){if(ru)return Qn;ru=1;var e=jd();return Qn=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Qn}var ea,tu;function Ne(){if(tu)return ea;tu=1;var e=Ie(),r=kd(),t=tr(),n=Cd(),a=jd(),i=Ud(),o=e.Symbol,s=r("wks"),c=i?o.for||o:o&&o.withoutSetter||n;return ea=function(l){return t(s,l)||(s[l]=a&&t(o,l)?o[l]:c("Symbol."+l)),s[l]},ea}var ra,nu;function Re(){if(nu)return ra;nu=1;var e=typeof document=="object"&&document.all;return ra=typeof e>"u"&&e!==void 0?function(r){return typeof r=="function"||r===e}:function(r){return typeof r=="function"},ra}var ta,au;function nr(){if(au)return ta;au=1;var e=Re();return ta=function(r){return typeof r=="object"?r!==null:e(r)},ta}var na,iu;function ur(){if(iu)return na;iu=1;var e=nr(),r=String,t=TypeError;return na=function(n){if(e(n))return n;throw new t(r(n)+" is not an object")},na}var aa={},ia,ou;function $e(){if(ou)return ia;ou=1;var e=xe();return ia=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),ia}var oa,su;function Ld(){if(su)return oa;su=1;var e=$e(),r=xe();return oa=e&&r(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),oa}var sa={},ua,uu;function hn(){if(uu)return ua;uu=1;var e=Ie(),r=nr(),t=e.document,n=r(t)&&r(t.createElement);return ua=function(a){return n?t.createElement(a):{}},ua}var ca,cu;function qd(){if(cu)return ca;cu=1;var e=$e(),r=xe(),t=hn();return ca=!e&&!r(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),ca}var la,lu;function Me(){if(lu)return la;lu=1;var e=un(),r=Function.prototype.call;return la=e?r.bind(r):function(){return r.apply(r,arguments)},la}var fa,fu;function ar(){if(fu)return fa;fu=1;var e=Ie(),r=Re(),t=function(n){return r(n)?n:void 0};return fa=function(n,a){return arguments.length<2?t(e[n]):e[n]&&e[n][a]},fa}var da,du;function vn(){if(du)return da;du=1;var e=Se();return da=e({}.isPrototypeOf),da}var ha,hu;function xd(){if(hu)return ha;hu=1;var e=ar(),r=Re(),t=vn(),n=Ud(),a=Object;return ha=n?function(i){return typeof i=="symbol"}:function(i){var o=e("Symbol");return r(o)&&t(o.prototype,a(i))},ha}var va,vu;function pn(){if(vu)return va;vu=1;var e=String;return va=function(r){try{return e(r)}catch{return"Object"}},va}var pa,pu;function cr(){if(pu)return pa;pu=1;var e=Re(),r=pn(),t=TypeError;return pa=function(n){if(e(n))return n;throw new t(r(n)+" is not a function")},pa}var ma,mu;function Vo(){if(mu)return ma;mu=1;var e=cr(),r=ln();return ma=function(t,n){var a=t[n];return r(a)?void 0:e(a)},ma}var ga,gu;function Iv(){if(gu)return ga;gu=1;var e=Me(),r=Re(),t=nr(),n=TypeError;return ga=function(a,i){var o,s;if(i==="string"&&r(o=a.toString)&&!t(s=e(o,a))||r(o=a.valueOf)&&!t(s=e(o,a))||i!=="string"&&r(o=a.toString)&&!t(s=e(o,a)))return s;throw new n("Can't convert object to primitive value")},ga}var ya,yu;function Pv(){if(yu)return ya;yu=1;var e=Me(),r=nr(),t=xd(),n=Vo(),a=Iv(),i=Ne(),o=TypeError,s=i("toPrimitive");return ya=function(c,l){if(!r(c)||t(c))return c;var u=n(c,s),f;if(u){if(l===void 0&&(l="default"),f=e(u,c,l),!r(f)||t(f))return f;throw new o("Can't convert object to primitive value")}return l===void 0&&(l="number"),a(c,l)},ya}var wa,wu;function Nd(){if(wu)return wa;wu=1;var e=Pv(),r=xd();return wa=function(t){var n=e(t,"string");return r(n)?n:n+""},wa}var bu;function Pr(){if(bu)return sa;bu=1;var e=$e(),r=qd(),t=Ld(),n=ur(),a=Nd(),i=TypeError,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c="enumerable",l="configurable",u="writable";return sa.f=e?t?function(h,d,v){if(n(h),d=a(d),n(v),typeof h=="function"&&d==="prototype"&&"value"in v&&u in v&&!v[u]){var m=s(h,d);m&&m[u]&&(h[d]=v.value,v={configurable:l in v?v[l]:m[l],enumerable:c in v?v[c]:m[c],writable:!1})}return o(h,d,v)}:o:function(h,d,v){if(n(h),d=a(d),n(v),r)try{return o(h,d,v)}catch{}if("get"in v||"set"in v)throw new i("Accessors not supported");return"value"in v&&(h[d]=v.value),h},sa}var ba,Su;function Ev(){if(Su)return ba;Su=1;var e=Math.ceil,r=Math.floor;return ba=Math.trunc||function(n){var a=+n;return(a>0?r:e)(a)},ba}var Sa,Iu;function Jo(){if(Iu)return Sa;Iu=1;var e=Ev();return Sa=function(r){var t=+r;return t!==t||t===0?0:e(t)},Sa}var Ia,Pu;function $d(){if(Pu)return Ia;Pu=1;var e=Jo(),r=Math.max,t=Math.min;return Ia=function(n,a){var i=e(n);return i<0?r(i+a,0):t(i,a)},Ia}var Pa,Eu;function Rv(){if(Eu)return Pa;Eu=1;var e=Jo(),r=Math.min;return Pa=function(t){var n=e(t);return n>0?r(n,9007199254740991):0},Pa}var Ea,Ru;function Zo(){if(Ru)return Ea;Ru=1;var e=Rv();return Ea=function(r){return e(r.length)},Ea}var Ra,_u;function _v(){if(_u)return Ra;_u=1;var e=kt(),r=$d(),t=Zo(),n=function(a){return function(i,o,s){var c=e(i),l=t(c);if(l===0)return!a&&-1;var u=r(s,l),f;if(a&&o!==o){for(;l>u;)if(f=c[u++],f!==f)return!0}else for(;l>u;u++)if((a||u in c)&&c[u]===o)return a||u||0;return!a&&-1}};return Ra={includes:n(!0),indexOf:n(!1)},Ra}var _a,Tu;function Yo(){return Tu||(Tu=1,_a={}),_a}var Ta,Ou;function Dd(){if(Ou)return Ta;Ou=1;var e=Se(),r=tr(),t=kt(),n=_v().indexOf,a=Yo(),i=e([].push);return Ta=function(o,s){var c=t(o),l=0,u=[],f;for(f in c)!r(a,f)&&r(c,f)&&i(u,f);for(;s.length>l;)r(c,f=s[l++])&&(~n(u,f)||i(u,f));return u},Ta}var Oa,ku;function Xo(){return ku||(ku=1,Oa=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Oa}var ka,Cu;function Md(){if(Cu)return ka;Cu=1;var e=Dd(),r=Xo();return ka=Object.keys||function(n){return e(n,r)},ka}var Au;function Tv(){if(Au)return aa;Au=1;var e=$e(),r=Ld(),t=Pr(),n=ur(),a=kt(),i=Md();return aa.f=e&&!r?Object.defineProperties:function(s,c){n(s);for(var l=a(c),u=i(c),f=u.length,h=0,d;f>h;)t.f(s,d=u[h++],l[d]);return s},aa}var Ca,ju;function Fd(){if(ju)return Ca;ju=1;var e=ar();return Ca=e("document","documentElement"),Ca}var Aa,Uu;function Qo(){if(Uu)return Aa;Uu=1;var e=kd(),r=Cd(),t=e("keys");return Aa=function(n){return t[n]||(t[n]=r(n))},Aa}var ja,Lu;function At(){if(Lu)return ja;Lu=1;var e=ur(),r=Tv(),t=Xo(),n=Yo(),a=Fd(),i=hn(),o=Qo(),s=">",c="<",l="prototype",u="script",f=o("IE_PROTO"),h=function(){},d=function(b){return c+u+s+b+c+"/"+u+s},v=function(b){b.write(d("")),b.close();var g=b.parentWindow.Object;return b=null,g},m=function(){var b=i("iframe"),g="java"+u+":",p;return b.style.display="none",a.appendChild(b),b.src=String(g),p=b.contentWindow.document,p.open(),p.write(d("document.F=Object")),p.close(),p.F},w,E=function(){try{w=new ActiveXObject("htmlfile")}catch{}E=typeof document<"u"?document.domain&&w?v(w):m():v(w);for(var b=t.length;b--;)delete E[l][t[b]];return E()};return n[f]=!0,ja=Object.create||function(g,p){var y;return g!==null?(h[l]=e(g),y=new h,h[l]=null,y[f]=g):y=E(),p===void 0?y:r.f(y,p)},ja}var Ua,qu;function Ov(){if(qu)return Ua;qu=1;var e=Ne(),r=At(),t=Pr().f,n=e("unscopables"),a=Array.prototype;return a[n]===void 0&&t(a,n,{configurable:!0,value:r(null)}),Ua=function(i){a[n][i]=!0},Ua}var La,xu;function jt(){return xu||(xu=1,La={}),La}var qa,Nu;function kv(){if(Nu)return qa;Nu=1;var e=Ie(),r=Re(),t=e.WeakMap;return qa=r(t)&&/native code/.test(String(t)),qa}var xa,$u;function zr(){return $u||($u=1,xa=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}),xa}var Na,Du;function Hr(){if(Du)return Na;Du=1;var e=$e(),r=Pr(),t=zr();return Na=e?function(n,a,i){return r.f(n,a,t(1,i))}:function(n,a,i){return n[a]=i,n},Na}var $a,Mu;function lt(){if(Mu)return $a;Mu=1;var e=kv(),r=Ie(),t=nr(),n=Hr(),a=tr(),i=Wo(),o=Qo(),s=Yo(),c="Object already initialized",l=r.TypeError,u=r.WeakMap,f,h,d,v=function(b){return d(b)?h(b):f(b,{})},m=function(b){return function(g){var p;if(!t(g)||(p=h(g)).type!==b)throw new l("Incompatible receiver, "+b+" required");return p}};if(e||i.state){var w=i.state||(i.state=new u);w.get=w.get,w.has=w.has,w.set=w.set,f=function(b,g){if(w.has(b))throw new l(c);return g.facade=b,w.set(b,g),g},h=function(b){return w.get(b)||{}},d=function(b){return w.has(b)}}else{var E=o("state");s[E]=!0,f=function(b,g){if(a(b,E))throw new l(c);return g.facade=b,n(b,E,g),g},h=function(b){return a(b,E)?b[E]:{}},d=function(b){return a(b,E)}}return $a={set:f,get:h,has:d,enforce:v,getterFor:m},$a}var Da={},Ma={},Fu;function Bd(){if(Fu)return Ma;Fu=1;var e={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,t=r&&!e.call({1:2},1);return Ma.f=t?function(a){var i=r(this,a);return!!i&&i.enumerable}:e,Ma}var Bu;function zd(){if(Bu)return Da;Bu=1;var e=$e(),r=Me(),t=Bd(),n=zr(),a=kt(),i=Nd(),o=tr(),s=qd(),c=Object.getOwnPropertyDescriptor;return Da.f=e?c:function(u,f){if(u=a(u),f=i(f),s)try{return c(u,f)}catch{}if(o(u,f))return n(!r(t.f,u,f),u[f])},Da}var Fa={exports:{}},Ba,zu;function Hd(){if(zu)return Ba;zu=1;var e=$e(),r=tr(),t=Function.prototype,n=e&&Object.getOwnPropertyDescriptor,a=r(t,"name"),i=a&&(function(){}).name==="something",o=a&&(!e||e&&n(t,"name").configurable);return Ba={EXISTS:a,PROPER:i,CONFIGURABLE:o},Ba}var za,Hu;function es(){if(Hu)return za;Hu=1;var e=Se(),r=Re(),t=Wo(),n=e(Function.toString);return r(t.inspectSource)||(t.inspectSource=function(a){return n(a)}),za=t.inspectSource,za}var Ku;function Kd(){if(Ku)return Fa.exports;Ku=1;var e=Se(),r=xe(),t=Re(),n=tr(),a=$e(),i=Hd().CONFIGURABLE,o=es(),s=lt(),c=s.enforce,l=s.get,u=String,f=Object.defineProperty,h=e("".slice),d=e("".replace),v=e([].join),m=a&&!r(function(){return f(function(){},"length",{value:8}).length!==8}),w=String(String).split("String"),E=Fa.exports=function(b,g,p){h(u(g),0,7)==="Symbol("&&(g="["+d(u(g),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),p&&p.getter&&(g="get "+g),p&&p.setter&&(g="set "+g),(!n(b,"name")||i&&b.name!==g)&&(a?f(b,"name",{value:g,configurable:!0}):b.name=g),m&&p&&n(p,"arity")&&b.length!==p.arity&&f(b,"length",{value:p.arity});try{p&&n(p,"constructor")&&p.constructor?a&&f(b,"prototype",{writable:!1}):b.prototype&&(b.prototype=void 0)}catch{}var y=c(b);return n(y,"source")||(y.source=v(w,typeof g=="string"?g:"")),b};return Function.prototype.toString=E(function(){return t(this)&&l(this).source||o(this)},"toString"),Fa.exports}var Ha,Gu;function ir(){if(Gu)return Ha;Gu=1;var e=Re(),r=Pr(),t=Kd(),n=Go();return Ha=function(a,i,o,s){s||(s={});var c=s.enumerable,l=s.name!==void 0?s.name:i;if(e(o)&&t(o,l,s),s.global)c?a[i]=o:n(i,o);else{try{s.unsafe?a[i]&&(c=!0):delete a[i]}catch{}c?a[i]=o:r.f(a,i,{value:o,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return a},Ha}var Ka={},Wu;function Cv(){if(Wu)return Ka;Wu=1;var e=Dd(),r=Xo(),t=r.concat("length","prototype");return Ka.f=Object.getOwnPropertyNames||function(a){return e(a,t)},Ka}var Ga={},Vu;function Gd(){return Vu||(Vu=1,Ga.f=Object.getOwnPropertySymbols),Ga}var Wa,Ju;function Av(){if(Ju)return Wa;Ju=1;var e=ar(),r=Se(),t=Cv(),n=Gd(),a=ur(),i=r([].concat);return Wa=e("Reflect","ownKeys")||function(s){var c=t.f(a(s)),l=n.f;return l?i(c,l(s)):c},Wa}var Va,Zu;function Wd(){if(Zu)return Va;Zu=1;var e=tr(),r=Av(),t=zd(),n=Pr();return Va=function(a,i,o){for(var s=r(i),c=n.f,l=t.f,u=0;u<s.length;u++){var f=s[u];!e(a,f)&&!(o&&e(o,f))&&c(a,f,l(i,f))}},Va}var Ja,Yu;function Vd(){if(Yu)return Ja;Yu=1;var e=xe(),r=Re(),t=/#|\.prototype\./,n=function(c,l){var u=i[a(c)];return u===s?!0:u===o?!1:r(l)?e(l):!!l},a=n.normalize=function(c){return String(c).replace(t,".").toLowerCase()},i=n.data={},o=n.NATIVE="N",s=n.POLYFILL="P";return Ja=n,Ja}var Za,Xu;function ke(){if(Xu)return Za;Xu=1;var e=Ie(),r=zd().f,t=Hr(),n=ir(),a=Go(),i=Wd(),o=Vd();return Za=function(s,c){var l=s.target,u=s.global,f=s.stat,h,d,v,m,w,E;if(u?d=e:f?d=e[l]||a(l,{}):d=e[l]&&e[l].prototype,d)for(v in c){if(w=c[v],s.dontCallGetSet?(E=r(d,v),m=E&&E.value):m=d[v],h=o(u?v:l+(f?".":"#")+v,s.forced),!h&&m!==void 0){if(typeof w==typeof m)continue;i(w,m)}(s.sham||m&&m.sham)&&t(w,"sham",!0),n(d,v,w,s)}},Za}var Ya,Qu;function jv(){if(Qu)return Ya;Qu=1;var e=xe();return Ya=!e(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}),Ya}var Xa,ec;function rs(){if(ec)return Xa;ec=1;var e=tr(),r=Re(),t=dn(),n=Qo(),a=jv(),i=n("IE_PROTO"),o=Object,s=o.prototype;return Xa=a?o.getPrototypeOf:function(c){var l=t(c);if(e(l,i))return l[i];var u=l.constructor;return r(u)&&l instanceof u?u.prototype:l instanceof o?s:null},Xa}var Qa,rc;function Jd(){if(rc)return Qa;rc=1;var e=xe(),r=Re(),t=nr(),n=At(),a=rs(),i=ir(),o=Ne(),s=gr(),c=o("iterator"),l=!1,u,f,h;[].keys&&(h=[].keys(),"next"in h?(f=a(a(h)),f!==Object.prototype&&(u=f)):l=!0);var d=!t(u)||e(function(){var v={};return u[c].call(v)!==v});return d?u={}:s&&(u=n(u)),r(u[c])||i(u,c,function(){return this}),Qa={IteratorPrototype:u,BUGGY_SAFARI_ITERATORS:l},Qa}var ei,tc;function ft(){if(tc)return ei;tc=1;var e=Pr().f,r=tr(),t=Ne(),n=t("toStringTag");return ei=function(a,i,o){a&&!o&&(a=a.prototype),a&&!r(a,n)&&e(a,n,{configurable:!0,value:i})},ei}var ri,nc;function Zd(){if(nc)return ri;nc=1;var e=Jd().IteratorPrototype,r=At(),t=zr(),n=ft(),a=jt(),i=function(){return this};return ri=function(o,s,c,l){var u=s+" Iterator";return o.prototype=r(e,{next:t(+!l,c)}),n(o,u,!1,!0),a[u]=i,o},ri}var ti,ac;function Uv(){if(ac)return ti;ac=1;var e=Se(),r=cr();return ti=function(t,n,a){try{return e(r(Object.getOwnPropertyDescriptor(t,n)[a]))}catch{}},ti}var ni,ic;function Lv(){if(ic)return ni;ic=1;var e=nr();return ni=function(r){return e(r)||r===null},ni}var ai,oc;function qv(){if(oc)return ai;oc=1;var e=Lv(),r=String,t=TypeError;return ai=function(n){if(e(n))return n;throw new t("Can't set "+r(n)+" as a prototype")},ai}var ii,sc;function ts(){if(sc)return ii;sc=1;var e=Uv(),r=nr(),t=fn(),n=qv();return ii=Object.setPrototypeOf||("__proto__"in{}?function(){var a=!1,i={},o;try{o=e(Object.prototype,"__proto__","set"),o(i,[]),a=i instanceof Array}catch{}return function(c,l){return t(c),n(l),r(c)&&(a?o(c,l):c.__proto__=l),c}}():void 0),ii}var oi,uc;function Yd(){if(uc)return oi;uc=1;var e=ke(),r=Me(),t=gr(),n=Hd(),a=Re(),i=Zd(),o=rs(),s=ts(),c=ft(),l=Hr(),u=ir(),f=Ne(),h=jt(),d=Jd(),v=n.PROPER,m=n.CONFIGURABLE,w=d.IteratorPrototype,E=d.BUGGY_SAFARI_ITERATORS,b=f("iterator"),g="keys",p="values",y="entries",k=function(){return this};return oi=function(A,j,z,H,ee,x,N){i(z,j,H);var q=function(Z){if(Z===ee&&S)return S;if(!E&&Z&&Z in re)return re[Z];switch(Z){case g:return function(){return new z(this,Z)};case p:return function(){return new z(this,Z)};case y:return function(){return new z(this,Z)}}return function(){return new z(this)}},O=j+" Iterator",X=!1,re=A.prototype,Q=re[b]||re["@@iterator"]||ee&&re[ee],S=!E&&Q||q(ee),_=j==="Array"&&re.entries||Q,$,B,G;if(_&&($=o(_.call(new A)),$!==Object.prototype&&$.next&&(!t&&o($)!==w&&(s?s($,w):a($[b])||u($,b,k)),c($,O,!0,!0),t&&(h[O]=k))),v&&ee===p&&Q&&Q.name!==p&&(!t&&m?l(re,"name",p):(X=!0,S=function(){return r(Q,this)})),ee)if(B={values:q(p),keys:x?S:q(g),entries:q(y)},N)for(G in B)(E||X||!(G in re))&&u(re,G,B[G]);else e({target:j,proto:!0,forced:E||X},B);return(!t||N)&&re[b]!==S&&u(re,b,S,{name:ee}),h[j]=S,B},oi}var si,cc;function ns(){return cc||(cc=1,si=function(e,r){return{value:e,done:r}}),si}var ui,lc;function as(){if(lc)return ui;lc=1;var e=kt(),r=Ov(),t=jt(),n=lt(),a=Pr().f,i=Yd(),o=ns(),s=gr(),c=$e(),l="Array Iterator",u=n.set,f=n.getterFor(l);ui=i(Array,"Array",function(d,v){u(this,{type:l,target:e(d),index:0,kind:v})},function(){var d=f(this),v=d.target,m=d.index++;if(!v||m>=v.length)return d.target=null,o(void 0,!0);switch(d.kind){case"keys":return o(m,!1);case"values":return o(v[m],!1)}return o([m,v[m]],!1)},"values");var h=t.Arguments=t.Array;if(r("keys"),r("values"),r("entries"),!s&&c&&h.name!=="values")try{a(h,"name",{value:"values"})}catch{}return ui}var fc={},dc;function xv(){if(dc)return fc;dc=1;var e=ke(),r=Se(),t=$d(),n=RangeError,a=String.fromCharCode,i=String.fromCodePoint,o=r([].join),s=!!i&&i.length!==1;return e({target:"String",stat:!0,arity:1,forced:s},{fromCodePoint:function(l){for(var u=[],f=arguments.length,h=0,d;f>h;){if(d=+arguments[h++],t(d,1114111)!==d)throw new n(d+" is not a valid code point");u[h]=d<65536?a(d):a(((d-=65536)>>10)+55296,d%1024+56320)}return o(u,"")}}),fc}var ci,hc;function Xd(){if(hc)return ci;hc=1;var e=Ie(),r=$e(),t=Object.getOwnPropertyDescriptor;return ci=function(n){if(!r)return e[n];var a=t(e,n);return a&&a.value},ci}var li,vc;function mn(){if(vc)return li;vc=1;var e=xe(),r=Ne(),t=$e(),n=gr(),a=r("iterator");return li=!e(function(){var i=new URL("b?a=1&b=2&c=3","https://a"),o=i.searchParams,s=new URLSearchParams("a=1&a=2&b=3"),c="";return i.pathname="c%20d",o.forEach(function(l,u){o.delete("b"),c+=u+l}),s.delete("a",2),s.delete("b",void 0),n&&(!i.toJSON||!s.has("a",1)||s.has("a",2)||!s.has("a",void 0)||s.has("b"))||!o.size&&(n||!t)||!o.sort||i.href!=="https://a/c%20d?a=1&c=3"||o.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!o[a]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://тест").host!=="xn--e1aybc"||new URL("https://a#б").hash!=="#%D0%B1"||c!=="a1c3"||new URL("https://x",void 0).host!=="x"}),li}var fi,pc;function gn(){if(pc)return fi;pc=1;var e=Kd(),r=Pr();return fi=function(t,n,a){return a.get&&e(a.get,n,{getter:!0}),a.set&&e(a.set,n,{setter:!0}),r.f(t,n,a)},fi}var di,mc;function Nv(){if(mc)return di;mc=1;var e=ir();return di=function(r,t,n){for(var a in t)e(r,a,t[a],n);return r},di}var hi,gc;function is(){if(gc)return hi;gc=1;var e=vn(),r=TypeError;return hi=function(t,n){if(e(n,t))return t;throw new r("Incorrect invocation")},hi}var vi,yc;function $v(){if(yc)return vi;yc=1;var e=cn(),r=Se();return vi=function(t){if(e(t)==="Function")return r(t)},vi}var pi,wc;function dt(){if(wc)return pi;wc=1;var e=$v(),r=cr(),t=un(),n=e(e.bind);return pi=function(a,i){return r(a),i===void 0?a:t?n(a,i):function(){return a.apply(i,arguments)}},pi}var mi,bc;function os(){if(bc)return mi;bc=1;var e=Ne(),r=e("toStringTag"),t={};return t[r]="z",mi=String(t)==="[object z]",mi}var gi,Sc;function Ut(){if(Sc)return gi;Sc=1;var e=os(),r=Re(),t=cn(),n=Ne(),a=n("toStringTag"),i=Object,o=t(function(){return arguments}())==="Arguments",s=function(c,l){try{return c[l]}catch{}};return gi=e?t:function(c){var l,u,f;return c===void 0?"Undefined":c===null?"Null":typeof(u=s(l=i(c),a))=="string"?u:o?t(l):(f=t(l))==="Object"&&r(l.callee)?"Arguments":f},gi}var yi,Ic;function Er(){if(Ic)return yi;Ic=1;var e=Ut(),r=String;return yi=function(t){if(e(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return r(t)},yi}var wi,Pc;function yn(){if(Pc)return wi;Pc=1;var e=Ut(),r=Vo(),t=ln(),n=jt(),a=Ne(),i=a("iterator");return wi=function(o){if(!t(o))return r(o,i)||r(o,"@@iterator")||n[e(o)]},wi}var bi,Ec;function ss(){if(Ec)return bi;Ec=1;var e=Me(),r=cr(),t=ur(),n=pn(),a=yn(),i=TypeError;return bi=function(o,s){var c=arguments.length<2?a(o):s;if(r(c))return t(e(c,o));throw new i(n(o)+" is not iterable")},bi}var Si,Rc;function Kr(){if(Rc)return Si;Rc=1;var e=TypeError;return Si=function(r,t){if(r<t)throw new e("Not enough arguments");return r},Si}var Ii,_c;function wn(){if(_c)return Ii;_c=1;var e=Se();return Ii=e([].slice),Ii}var Pi,Tc;function Dv(){if(Tc)return Pi;Tc=1;var e=wn(),r=Math.floor,t=function(n,a){var i=n.length;if(i<8)for(var o=1,s,c;o<i;){for(c=o,s=n[o];c&&a(n[c-1],s)>0;)n[c]=n[--c];c!==o++&&(n[c]=s)}else for(var l=r(i/2),u=t(e(n,0,l),a),f=t(e(n,l),a),h=u.length,d=f.length,v=0,m=0;v<h||m<d;)n[v+m]=v<h&&m<d?a(u[v],f[m])<=0?u[v++]:f[m++]:v<h?u[v++]:f[m++];return n};return Pi=t,Pi}var Ei,Oc;function Qd(){if(Oc)return Ei;Oc=1,as(),xv();var e=ke(),r=Ie(),t=Xd(),n=ar(),a=Me(),i=Se(),o=$e(),s=mn(),c=ir(),l=gn(),u=Nv(),f=ft(),h=Zd(),d=lt(),v=is(),m=Re(),w=tr(),E=dt(),b=Ut(),g=ur(),p=nr(),y=Er(),k=At(),A=zr(),j=ss(),z=yn(),H=ns(),ee=Kr(),x=Ne(),N=Dv(),q=x("iterator"),O="URLSearchParams",X=O+"Iterator",re=d.set,Q=d.getterFor(O),S=d.getterFor(X),_=t("fetch"),$=t("Request"),B=t("Headers"),G=$&&$.prototype,Z=B&&B.prototype,de=r.TypeError,ae=r.encodeURIComponent,ue=String.fromCharCode,se=n("String","fromCodePoint"),Pe=parseInt,je=i("".charAt),Fe=i([].join),Ce=i([].push),Ve=i("".replace),lr=i([].shift),fr=i([].splice),T=i("".split),F=i("".slice),J=i(/./.exec),pe=/\+/g,ve="�",me=/^[0-9a-f]+$/i,Be=function(D,W){var V=F(D,W,W+2);return J(me,V)?Pe(V,16):NaN},M=function(D){for(var W=0,V=128;V>0&&(D&V)!==0;V>>=1)W++;return W},ie=function(D){var W=null;switch(D.length){case 1:W=D[0];break;case 2:W=(D[0]&31)<<6|D[1]&63;break;case 3:W=(D[0]&15)<<12|(D[1]&63)<<6|D[2]&63;break;case 4:W=(D[0]&7)<<18|(D[1]&63)<<12|(D[2]&63)<<6|D[3]&63;break}return W>1114111?null:W},le=function(D){D=Ve(D,pe," ");for(var W=D.length,V="",Y=0;Y<W;){var ce=je(D,Y);if(ce==="%"){if(je(D,Y+1)==="%"||Y+3>W){V+="%",Y++;continue}var he=Be(D,Y+1);if(he!==he){V+=ce,Y++;continue}Y+=2;var we=M(he);if(we===0)ce=ue(he);else{if(we===1||we>4){V+=ve,Y++;continue}for(var be=[he],_e=1;_e<we&&(Y++,!(Y+3>W||je(D,Y)!=="%"));){var De=Be(D,Y+1);if(De!==De){Y+=3;break}if(De>191||De<128)break;Ce(be,De),Y+=2,_e++}if(be.length!==we){V+=ve;continue}var dr=ie(be);dr===null?V+=ve:ce=se(dr)}}V+=ce,Y++}return V},fe=/[!'()~]|%20/g,ge={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},or=function(D){return ge[D]},sr=function(D){return Ve(ae(D),fe,or)},Te=h(function(W,V){re(this,{type:X,target:Q(W).entries,index:0,kind:V})},O,function(){var W=S(this),V=W.target,Y=W.index++;if(!V||Y>=V.length)return W.target=null,H(void 0,!0);var ce=V[Y];switch(W.kind){case"keys":return H(ce.key,!1);case"values":return H(ce.value,!1)}return H([ce.key,ce.value],!1)},!0),He=function(D){this.entries=[],this.url=null,D!==void 0&&(p(D)?this.parseObject(D):this.parseQuery(typeof D=="string"?je(D,0)==="?"?F(D,1):D:y(D)))};He.prototype={type:O,bindURL:function(D){this.url=D,this.update()},parseObject:function(D){var W=this.entries,V=z(D),Y,ce,he,we,be,_e,De;if(V)for(Y=j(D,V),ce=Y.next;!(he=a(ce,Y)).done;){if(we=j(g(he.value)),be=we.next,(_e=a(be,we)).done||(De=a(be,we)).done||!a(be,we).done)throw new de("Expected sequence with length 2");Ce(W,{key:y(_e.value),value:y(De.value)})}else for(var dr in D)w(D,dr)&&Ce(W,{key:dr,value:y(D[dr])})},parseQuery:function(D){if(D)for(var W=this.entries,V=T(D,"&"),Y=0,ce,he;Y<V.length;)ce=V[Y++],ce.length&&(he=T(ce,"="),Ce(W,{key:le(lr(he)),value:le(Fe(he,"="))}))},serialize:function(){for(var D=this.entries,W=[],V=0,Y;V<D.length;)Y=D[V++],Ce(W,sr(Y.key)+"="+sr(Y.value));return Fe(W,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Je=function(){v(this,Xe);var W=arguments.length>0?arguments[0]:void 0,V=re(this,new He(W));o||(this.size=V.entries.length)},Xe=Je.prototype;if(u(Xe,{append:function(W,V){var Y=Q(this);ee(arguments.length,2),Ce(Y.entries,{key:y(W),value:y(V)}),o||this.length++,Y.updateURL()},delete:function(D){for(var W=Q(this),V=ee(arguments.length,1),Y=W.entries,ce=y(D),he=V<2?void 0:arguments[1],we=he===void 0?he:y(he),be=0;be<Y.length;){var _e=Y[be];if(_e.key===ce&&(we===void 0||_e.value===we)){if(fr(Y,be,1),we!==void 0)break}else be++}o||(this.size=Y.length),W.updateURL()},get:function(W){var V=Q(this).entries;ee(arguments.length,1);for(var Y=y(W),ce=0;ce<V.length;ce++)if(V[ce].key===Y)return V[ce].value;return null},getAll:function(W){var V=Q(this).entries;ee(arguments.length,1);for(var Y=y(W),ce=[],he=0;he<V.length;he++)V[he].key===Y&&Ce(ce,V[he].value);return ce},has:function(W){for(var V=Q(this).entries,Y=ee(arguments.length,1),ce=y(W),he=Y<2?void 0:arguments[1],we=he===void 0?he:y(he),be=0;be<V.length;){var _e=V[be++];if(_e.key===ce&&(we===void 0||_e.value===we))return!0}return!1},set:function(W,V){var Y=Q(this);ee(arguments.length,1);for(var ce=Y.entries,he=!1,we=y(W),be=y(V),_e=0,De;_e<ce.length;_e++)De=ce[_e],De.key===we&&(he?fr(ce,_e--,1):(he=!0,De.value=be));he||Ce(ce,{key:we,value:be}),o||(this.size=ce.length),Y.updateURL()},sort:function(){var W=Q(this);N(W.entries,function(V,Y){return V.key>Y.key?1:-1}),W.updateURL()},forEach:function(W){for(var V=Q(this).entries,Y=E(W,arguments.length>1?arguments[1]:void 0),ce=0,he;ce<V.length;)he=V[ce++],Y(he.value,he.key,this)},keys:function(){return new Te(this,"keys")},values:function(){return new Te(this,"values")},entries:function(){return new Te(this,"entries")}},{enumerable:!0}),c(Xe,q,Xe.entries,{name:"entries"}),c(Xe,"toString",function(){return Q(this).serialize()},{enumerable:!0}),o&&l(Xe,"size",{get:function(){return Q(this).entries.length},configurable:!0,enumerable:!0}),f(Je,O),e({global:!0,constructor:!0,forced:!s},{URLSearchParams:Je}),!s&&m(B)){var gt=i(Z.has),kn=i(Z.set),Gr=function(D){if(p(D)){var W=D.body,V;if(b(W)===O)return V=D.headers?new B(D.headers):new B,gt(V,"content-type")||kn(V,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),k(D,{body:A(0,y(W)),headers:A(0,V)})}return D};if(m(_)&&e({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(W){return _(W,arguments.length>1?Gr(arguments[1]):{})}}),m($)){var Wr=function(W){return v(this,G),new $(W,arguments.length>1?Gr(arguments[1]):{})};G.constructor=Wr,Wr.prototype=G,e({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Wr})}}return Ei={URLSearchParams:Je,getState:Q},Ei}var kc;function Mv(){return kc||(kc=1,Qd()),qs}var Cc={},Ac;function Fv(){if(Ac)return Cc;Ac=1;var e=ir(),r=Se(),t=Er(),n=Kr(),a=URLSearchParams,i=a.prototype,o=r(i.append),s=r(i.delete),c=r(i.forEach),l=r([].push),u=new a("a=1&a=2&b=3");return u.delete("a",1),u.delete("b",void 0),u+""!="a=2"&&e(i,"delete",function(f){var h=arguments.length,d=h<2?void 0:arguments[1];if(h&&d===void 0)return s(this,f);var v=[];c(this,function(k,A){l(v,{key:A,value:k})}),n(h,1);for(var m=t(f),w=t(d),E=0,b=0,g=!1,p=v.length,y;E<p;)y=v[E++],g||y.key===m?(g=!0,s(this,y.key)):b++;for(;b<p;)y=v[b++],y.key===m&&y.value===w||o(this,y.key,y.value)},{enumerable:!0,unsafe:!0}),Cc}var jc={},Uc;function Bv(){if(Uc)return jc;Uc=1;var e=ir(),r=Se(),t=Er(),n=Kr(),a=URLSearchParams,i=a.prototype,o=r(i.getAll),s=r(i.has),c=new a("a=1");return(c.has("a",2)||!c.has("a",void 0))&&e(i,"has",function(u){var f=arguments.length,h=f<2?void 0:arguments[1];if(f&&h===void 0)return s(this,u);var d=o(this,u);n(f,1);for(var v=t(h),m=0;m<d.length;)if(d[m++]===v)return!0;return!1},{enumerable:!0,unsafe:!0}),jc}var Lc={},qc;function zv(){if(qc)return Lc;qc=1;var e=$e(),r=Se(),t=gn(),n=URLSearchParams.prototype,a=r(n.forEach);return e&&!("size"in n)&&t(n,"size",{get:function(){var o=0;return a(this,function(){o++}),o},configurable:!0,enumerable:!0}),Lc}var Ri,xc;function us(){if(xc)return Ri;xc=1;var e=Ie();return Ri=e,Ri}var _i,Nc;function eh(){if(Nc)return _i;Nc=1,Mv(),Fv(),Bv(),zv();var e=us();return _i=e.URLSearchParams,_i}var $c={},Dc={},Mc={},Ti,Fc;function rh(){if(Fc)return Ti;Fc=1;var e=Se(),r=Jo(),t=Er(),n=fn(),a=e("".charAt),i=e("".charCodeAt),o=e("".slice),s=function(c){return function(l,u){var f=t(n(l)),h=r(u),d=f.length,v,m;return h<0||h>=d?c?"":void 0:(v=i(f,h),v<55296||v>56319||h+1===d||(m=i(f,h+1))<56320||m>57343?c?a(f,h):v:c?o(f,h,h+2):(v-55296<<10)+(m-56320)+65536)}};return Ti={codeAt:s(!1),charAt:s(!0)},Ti}var Bc;function th(){if(Bc)return Mc;Bc=1;var e=rh().charAt,r=Er(),t=lt(),n=Yd(),a=ns(),i="String Iterator",o=t.set,s=t.getterFor(i);return n(String,"String",function(c){o(this,{type:i,string:r(c),index:0})},function(){var l=s(this),u=l.string,f=l.index,h;return f>=u.length?a(void 0,!0):(h=e(u,f),l.index+=h.length,a(h,!1))}),Mc}var Oi,zc;function Hv(){if(zc)return Oi;zc=1;var e=$e(),r=Se(),t=Me(),n=xe(),a=Md(),i=Gd(),o=Bd(),s=dn(),c=Od(),l=Object.assign,u=Object.defineProperty,f=r([].concat);return Oi=!l||n(function(){if(e&&l({b:1},l(u({},"a",{enumerable:!0,get:function(){u(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var h={},d={},v=Symbol("assign detection"),m="abcdefghijklmnopqrst";return h[v]=7,m.split("").forEach(function(w){d[w]=w}),l({},h)[v]!==7||a(l({},d)).join("")!==m})?function(d,v){for(var m=s(d),w=arguments.length,E=1,b=i.f,g=o.f;w>E;)for(var p=c(arguments[E++]),y=b?f(a(p),b(p)):a(p),k=y.length,A=0,j;k>A;)j=y[A++],(!e||t(g,p,j))&&(m[j]=p[j]);return m}:l,Oi}var ki,Hc;function nh(){if(Hc)return ki;Hc=1;var e=Me(),r=ur(),t=Vo();return ki=function(n,a,i){var o,s;r(n);try{if(o=t(n,"return"),!o){if(a==="throw")throw i;return i}o=e(o,n)}catch(c){s=!0,o=c}if(a==="throw")throw i;if(s)throw o;return r(o),i},ki}var Ci,Kc;function Kv(){if(Kc)return Ci;Kc=1;var e=ur(),r=nh();return Ci=function(t,n,a,i){try{return i?n(e(a)[0],a[1]):n(a)}catch(o){r(t,"throw",o)}},Ci}var Ai,Gc;function ah(){if(Gc)return Ai;Gc=1;var e=Ne(),r=jt(),t=e("iterator"),n=Array.prototype;return Ai=function(a){return a!==void 0&&(r.Array===a||n[t]===a)},Ai}var ji,Wc;function ih(){if(Wc)return ji;Wc=1;var e=Se(),r=xe(),t=Re(),n=Ut(),a=ar(),i=es(),o=function(){},s=a("Reflect","construct"),c=/^\s*(?:class|function)\b/,l=e(c.exec),u=!c.test(o),f=function(v){if(!t(v))return!1;try{return s(o,[],v),!0}catch{return!1}},h=function(v){if(!t(v))return!1;switch(n(v)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return u||!!l(c,i(v))}catch{return!0}};return h.sham=!0,ji=!s||r(function(){var d;return f(f.call)||!f(Object)||!f(function(){d=!0})||d})?h:f,ji}var Ui,Vc;function Gv(){if(Vc)return Ui;Vc=1;var e=$e(),r=Pr(),t=zr();return Ui=function(n,a,i){e?r.f(n,a,t(0,i)):n[a]=i},Ui}var Li,Jc;function Wv(){if(Jc)return Li;Jc=1;var e=dt(),r=Me(),t=dn(),n=Kv(),a=ah(),i=ih(),o=Zo(),s=Gv(),c=ss(),l=yn(),u=Array;return Li=function(h){var d=t(h),v=i(this),m=arguments.length,w=m>1?arguments[1]:void 0,E=w!==void 0;E&&(w=e(w,m>2?arguments[2]:void 0));var b=l(d),g=0,p,y,k,A,j,z;if(b&&!(this===u&&a(b)))for(y=v?new this:[],A=c(d,b),j=A.next;!(k=r(j,A)).done;g++)z=E?n(A,w,[k.value,g],!0):k.value,s(y,g,z);else for(p=o(d),y=v?new this(p):u(p);p>g;g++)z=E?w(d[g],g):d[g],s(y,g,z);return y.length=g,y},Li}var qi,Zc;function Vv(){if(Zc)return qi;Zc=1;var e=Se(),r=2147483647,t=36,n=1,a=26,i=38,o=700,s=72,c=128,l="-",u=/[^\0-\u007E]/,f=/[.\u3002\uFF0E\uFF61]/g,h="Overflow: input needs wider integers to process",d=t-n,v=RangeError,m=e(f.exec),w=Math.floor,E=String.fromCharCode,b=e("".charCodeAt),g=e([].join),p=e([].push),y=e("".replace),k=e("".split),A=e("".toLowerCase),j=function(x){for(var N=[],q=0,O=x.length;q<O;){var X=b(x,q++);if(X>=55296&&X<=56319&&q<O){var re=b(x,q++);(re&64512)===56320?p(N,((X&1023)<<10)+(re&1023)+65536):(p(N,X),q--)}else p(N,X)}return N},z=function(x){return x+22+75*(x<26)},H=function(x,N,q){var O=0;for(x=q?w(x/o):x>>1,x+=w(x/N);x>d*a>>1;)x=w(x/d),O+=t;return w(O+(d+1)*x/(x+i))},ee=function(x){var N=[];x=j(x);var q=x.length,O=c,X=0,re=s,Q,S;for(Q=0;Q<x.length;Q++)S=x[Q],S<128&&p(N,E(S));var _=N.length,$=_;for(_&&p(N,l);$<q;){var B=r;for(Q=0;Q<x.length;Q++)S=x[Q],S>=O&&S<B&&(B=S);var G=$+1;if(B-O>w((r-X)/G))throw new v(h);for(X+=(B-O)*G,O=B,Q=0;Q<x.length;Q++){if(S=x[Q],S<O&&++X>r)throw new v(h);if(S===O){for(var Z=X,de=t;;){var ae=de<=re?n:de>=re+a?a:de-re;if(Z<ae)break;var ue=Z-ae,se=t-ae;p(N,E(z(ae+ue%se))),Z=w(ue/se),de+=t}p(N,E(z(Z))),re=H(X,G,$===_),X=0,$++}}X++,O++}return g(N,"")};return qi=function(x){var N=[],q=k(y(A(x),f,"."),"."),O,X;for(O=0;O<q.length;O++)X=q[O],p(N,m(u,X)?"xn--"+ee(X):X);return g(N,".")},qi}var Yc;function Jv(){if(Yc)return Dc;Yc=1,th();var e=ke(),r=$e(),t=mn(),n=Ie(),a=dt(),i=Se(),o=ir(),s=gn(),c=is(),l=tr(),u=Hv(),f=Wv(),h=wn(),d=rh().codeAt,v=Vv(),m=Er(),w=ft(),E=Kr(),b=Qd(),g=lt(),p=g.set,y=g.getterFor("URL"),k=b.URLSearchParams,A=b.getState,j=n.URL,z=n.TypeError,H=n.parseInt,ee=Math.floor,x=Math.pow,N=i("".charAt),q=i(/./.exec),O=i([].join),X=i(1 .toString),re=i([].pop),Q=i([].push),S=i("".replace),_=i([].shift),$=i("".split),B=i("".slice),G=i("".toLowerCase),Z=i([].unshift),de="Invalid authority",ae="Invalid scheme",ue="Invalid host",se="Invalid port",Pe=/[a-z]/i,je=/[\d+-.a-z]/i,Fe=/\d/,Ce=/^0x/i,Ve=/^[0-7]+$/,lr=/^\d+$/,fr=/^[\da-f]+$/i,T=/[\0\t\n\r #%/:<>?@[\\\]^|]/,F=/[\0\t\n\r #/:<>?@[\\\]^|]/,J=/^[\u0000-\u0020]+/,pe=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,ve=/[\t\n\r]/g,me,Be=function(P){var L=$(P,"."),R,I,C,oe,K,Ee,Oe;if(L.length&&L[L.length-1]===""&&L.length--,R=L.length,R>4)return P;for(I=[],C=0;C<R;C++){if(oe=L[C],oe==="")return P;if(K=10,oe.length>1&&N(oe,0)==="0"&&(K=q(Ce,oe)?16:8,oe=B(oe,K===8?1:2)),oe==="")Ee=0;else{if(!q(K===10?lr:K===8?Ve:fr,oe))return P;Ee=H(oe,K)}Q(I,Ee)}for(C=0;C<R;C++)if(Ee=I[C],C===R-1){if(Ee>=x(256,5-R))return null}else if(Ee>255)return null;for(Oe=re(I),C=0;C<I.length;C++)Oe+=I[C]*x(256,3-C);return Oe},M=function(P){var L=[0,0,0,0,0,0,0,0],R=0,I=null,C=0,oe,K,Ee,Oe,Ue,er,U,Ae=function(){return N(P,C)};if(Ae()===":"){if(N(P,1)!==":")return;C+=2,R++,I=R}for(;Ae();){if(R===8)return;if(Ae()===":"){if(I!==null)return;C++,R++,I=R;continue}for(oe=K=0;K<4&&q(fr,Ae());)oe=oe*16+H(Ae(),16),C++,K++;if(Ae()==="."){if(K===0||(C-=K,R>6))return;for(Ee=0;Ae();){if(Oe=null,Ee>0)if(Ae()==="."&&Ee<4)C++;else return;if(!q(Fe,Ae()))return;for(;q(Fe,Ae());){if(Ue=H(Ae(),10),Oe===null)Oe=Ue;else{if(Oe===0)return;Oe=Oe*10+Ue}if(Oe>255)return;C++}L[R]=L[R]*256+Oe,Ee++,(Ee===2||Ee===4)&&R++}if(Ee!==4)return;break}else if(Ae()===":"){if(C++,!Ae())return}else if(Ae())return;L[R++]=oe}if(I!==null)for(er=R-I,R=7;R!==0&&er>0;)U=L[R],L[R--]=L[I+er-1],L[I+--er]=U;else if(R!==8)return;return L},ie=function(P){for(var L=null,R=1,I=null,C=0,oe=0;oe<8;oe++)P[oe]!==0?(C>R&&(L=I,R=C),I=null,C=0):(I===null&&(I=oe),++C);return C>R?I:L},le=function(P){var L,R,I,C;if(typeof P=="number"){for(L=[],R=0;R<4;R++)Z(L,P%256),P=ee(P/256);return O(L,".")}if(typeof P=="object"){for(L="",I=ie(P),R=0;R<8;R++)C&&P[R]===0||(C&&(C=!1),I===R?(L+=R?":":"::",C=!0):(L+=X(P[R],16),R<7&&(L+=":")));return"["+L+"]"}return P},fe={},ge=u({},fe,{" ":1,'"':1,"<":1,">":1,"`":1}),or=u({},ge,{"#":1,"?":1,"{":1,"}":1}),sr=u({},or,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Te=function(P,L){var R=d(P,0);return R>32&&R<127&&!l(L,P)?P:encodeURIComponent(P)},He={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Je=function(P,L){var R;return P.length===2&&q(Pe,N(P,0))&&((R=N(P,1))===":"||!L&&R==="|")},Xe=function(P){var L;return P.length>1&&Je(B(P,0,2))&&(P.length===2||(L=N(P,2))==="/"||L==="\\"||L==="?"||L==="#")},gt=function(P){return P==="."||G(P)==="%2e"},kn=function(P){return P=G(P),P===".."||P==="%2e."||P===".%2e"||P==="%2e%2e"},Gr={},Wr={},D={},W={},V={},Y={},ce={},he={},we={},be={},_e={},De={},dr={},Cn={},Os={},An={},Vr={},hr={},ks={},Ar={},yr={},jn=function(P,L,R){var I=m(P),C,oe,K;if(L){if(oe=this.parse(I),oe)throw new z(oe);this.searchParams=null}else{if(R!==void 0&&(C=new jn(R,!0)),oe=this.parse(I,null,C),oe)throw new z(oe);K=A(new k),K.bindURL(this),this.searchParams=K}};jn.prototype={type:"URL",parse:function(P,L,R){var I=this,C=L||Gr,oe=0,K="",Ee=!1,Oe=!1,Ue=!1,er,U,Ae,wr;for(P=m(P),L||(I.scheme="",I.username="",I.password="",I.host=null,I.port=null,I.path=[],I.query=null,I.fragment=null,I.cannotBeABaseURL=!1,P=S(P,J,""),P=S(P,pe,"$1")),P=S(P,ve,""),er=f(P);oe<=er.length;){switch(U=er[oe],C){case Gr:if(U&&q(Pe,U))K+=G(U),C=Wr;else{if(L)return ae;C=D;continue}break;case Wr:if(U&&(q(je,U)||U==="+"||U==="-"||U==="."))K+=G(U);else if(U===":"){if(L&&(I.isSpecial()!==l(He,K)||K==="file"&&(I.includesCredentials()||I.port!==null)||I.scheme==="file"&&!I.host))return;if(I.scheme=K,L){I.isSpecial()&&He[I.scheme]===I.port&&(I.port=null);return}K="",I.scheme==="file"?C=Cn:I.isSpecial()&&R&&R.scheme===I.scheme?C=W:I.isSpecial()?C=he:er[oe+1]==="/"?(C=V,oe++):(I.cannotBeABaseURL=!0,Q(I.path,""),C=ks)}else{if(L)return ae;K="",C=D,oe=0;continue}break;case D:if(!R||R.cannotBeABaseURL&&U!=="#")return ae;if(R.cannotBeABaseURL&&U==="#"){I.scheme=R.scheme,I.path=h(R.path),I.query=R.query,I.fragment="",I.cannotBeABaseURL=!0,C=yr;break}C=R.scheme==="file"?Cn:Y;continue;case W:if(U==="/"&&er[oe+1]==="/")C=we,oe++;else{C=Y;continue}break;case V:if(U==="/"){C=be;break}else{C=hr;continue}case Y:if(I.scheme=R.scheme,U===me)I.username=R.username,I.password=R.password,I.host=R.host,I.port=R.port,I.path=h(R.path),I.query=R.query;else if(U==="/"||U==="\\"&&I.isSpecial())C=ce;else if(U==="?")I.username=R.username,I.password=R.password,I.host=R.host,I.port=R.port,I.path=h(R.path),I.query="",C=Ar;else if(U==="#")I.username=R.username,I.password=R.password,I.host=R.host,I.port=R.port,I.path=h(R.path),I.query=R.query,I.fragment="",C=yr;else{I.username=R.username,I.password=R.password,I.host=R.host,I.port=R.port,I.path=h(R.path),I.path.length--,C=hr;continue}break;case ce:if(I.isSpecial()&&(U==="/"||U==="\\"))C=we;else if(U==="/")C=be;else{I.username=R.username,I.password=R.password,I.host=R.host,I.port=R.port,C=hr;continue}break;case he:if(C=we,U!=="/"||N(K,oe+1)!=="/")continue;oe++;break;case we:if(U!=="/"&&U!=="\\"){C=be;continue}break;case be:if(U==="@"){Ee&&(K="%40"+K),Ee=!0,Ae=f(K);for(var Un=0;Un<Ae.length;Un++){var js=Ae[Un];if(js===":"&&!Ue){Ue=!0;continue}var Us=Te(js,sr);Ue?I.password+=Us:I.username+=Us}K=""}else if(U===me||U==="/"||U==="?"||U==="#"||U==="\\"&&I.isSpecial()){if(Ee&&K==="")return de;oe-=f(K).length+1,K="",C=_e}else K+=U;break;case _e:case De:if(L&&I.scheme==="file"){C=An;continue}else if(U===":"&&!Oe){if(K==="")return ue;if(wr=I.parseHost(K),wr)return wr;if(K="",C=dr,L===De)return}else if(U===me||U==="/"||U==="?"||U==="#"||U==="\\"&&I.isSpecial()){if(I.isSpecial()&&K==="")return ue;if(L&&K===""&&(I.includesCredentials()||I.port!==null))return;if(wr=I.parseHost(K),wr)return wr;if(K="",C=Vr,L)return;continue}else U==="["?Oe=!0:U==="]"&&(Oe=!1),K+=U;break;case dr:if(q(Fe,U))K+=U;else if(U===me||U==="/"||U==="?"||U==="#"||U==="\\"&&I.isSpecial()||L){if(K!==""){var Ln=H(K,10);if(Ln>65535)return se;I.port=I.isSpecial()&&Ln===He[I.scheme]?null:Ln,K=""}if(L)return;C=Vr;continue}else return se;break;case Cn:if(I.scheme="file",U==="/"||U==="\\")C=Os;else if(R&&R.scheme==="file")switch(U){case me:I.host=R.host,I.path=h(R.path),I.query=R.query;break;case"?":I.host=R.host,I.path=h(R.path),I.query="",C=Ar;break;case"#":I.host=R.host,I.path=h(R.path),I.query=R.query,I.fragment="",C=yr;break;default:Xe(O(h(er,oe),""))||(I.host=R.host,I.path=h(R.path),I.shortenPath()),C=hr;continue}else{C=hr;continue}break;case Os:if(U==="/"||U==="\\"){C=An;break}R&&R.scheme==="file"&&!Xe(O(h(er,oe),""))&&(Je(R.path[0],!0)?Q(I.path,R.path[0]):I.host=R.host),C=hr;continue;case An:if(U===me||U==="/"||U==="\\"||U==="?"||U==="#"){if(!L&&Je(K))C=hr;else if(K===""){if(I.host="",L)return;C=Vr}else{if(wr=I.parseHost(K),wr)return wr;if(I.host==="localhost"&&(I.host=""),L)return;K="",C=Vr}continue}else K+=U;break;case Vr:if(I.isSpecial()){if(C=hr,U!=="/"&&U!=="\\")continue}else if(!L&&U==="?")I.query="",C=Ar;else if(!L&&U==="#")I.fragment="",C=yr;else if(U!==me&&(C=hr,U!=="/"))continue;break;case hr:if(U===me||U==="/"||U==="\\"&&I.isSpecial()||!L&&(U==="?"||U==="#")){if(kn(K)?(I.shortenPath(),U!=="/"&&!(U==="\\"&&I.isSpecial())&&Q(I.path,"")):gt(K)?U!=="/"&&!(U==="\\"&&I.isSpecial())&&Q(I.path,""):(I.scheme==="file"&&!I.path.length&&Je(K)&&(I.host&&(I.host=""),K=N(K,0)+":"),Q(I.path,K)),K="",I.scheme==="file"&&(U===me||U==="?"||U==="#"))for(;I.path.length>1&&I.path[0]==="";)_(I.path);U==="?"?(I.query="",C=Ar):U==="#"&&(I.fragment="",C=yr)}else K+=Te(U,or);break;case ks:U==="?"?(I.query="",C=Ar):U==="#"?(I.fragment="",C=yr):U!==me&&(I.path[0]+=Te(U,fe));break;case Ar:!L&&U==="#"?(I.fragment="",C=yr):U!==me&&(U==="'"&&I.isSpecial()?I.query+="%27":U==="#"?I.query+="%23":I.query+=Te(U,fe));break;case yr:U!==me&&(I.fragment+=Te(U,ge));break}oe++}},parseHost:function(P){var L,R,I;if(N(P,0)==="["){if(N(P,P.length-1)!=="]"||(L=M(B(P,1,-1)),!L))return ue;this.host=L}else if(this.isSpecial()){if(P=v(P),q(T,P)||(L=Be(P),L===null))return ue;this.host=L}else{if(q(F,P))return ue;for(L="",R=f(P),I=0;I<R.length;I++)L+=Te(R[I],fe);this.host=L}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return l(He,this.scheme)},shortenPath:function(){var P=this.path,L=P.length;L&&(this.scheme!=="file"||L!==1||!Je(P[0],!0))&&P.length--},serialize:function(){var P=this,L=P.scheme,R=P.username,I=P.password,C=P.host,oe=P.port,K=P.path,Ee=P.query,Oe=P.fragment,Ue=L+":";return C!==null?(Ue+="//",P.includesCredentials()&&(Ue+=R+(I?":"+I:"")+"@"),Ue+=le(C),oe!==null&&(Ue+=":"+oe)):L==="file"&&(Ue+="//"),Ue+=P.cannotBeABaseURL?K[0]:K.length?"/"+O(K,"/"):"",Ee!==null&&(Ue+="?"+Ee),Oe!==null&&(Ue+="#"+Oe),Ue},setHref:function(P){var L=this.parse(P);if(L)throw new z(L);this.searchParams.update()},getOrigin:function(){var P=this.scheme,L=this.port;if(P==="blob")try{return new Jr(P.path[0]).origin}catch{return"null"}return P==="file"||!this.isSpecial()?"null":P+"://"+le(this.host)+(L!==null?":"+L:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(P){this.parse(m(P)+":",Gr)},getUsername:function(){return this.username},setUsername:function(P){var L=f(m(P));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var R=0;R<L.length;R++)this.username+=Te(L[R],sr)}},getPassword:function(){return this.password},setPassword:function(P){var L=f(m(P));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var R=0;R<L.length;R++)this.password+=Te(L[R],sr)}},getHost:function(){var P=this.host,L=this.port;return P===null?"":L===null?le(P):le(P)+":"+L},setHost:function(P){this.cannotBeABaseURL||this.parse(P,_e)},getHostname:function(){var P=this.host;return P===null?"":le(P)},setHostname:function(P){this.cannotBeABaseURL||this.parse(P,De)},getPort:function(){var P=this.port;return P===null?"":m(P)},setPort:function(P){this.cannotHaveUsernamePasswordPort()||(P=m(P),P===""?this.port=null:this.parse(P,dr))},getPathname:function(){var P=this.path;return this.cannotBeABaseURL?P[0]:P.length?"/"+O(P,"/"):""},setPathname:function(P){this.cannotBeABaseURL||(this.path=[],this.parse(P,Vr))},getSearch:function(){var P=this.query;return P?"?"+P:""},setSearch:function(P){P=m(P),P===""?this.query=null:(N(P,0)==="?"&&(P=B(P,1)),this.query="",this.parse(P,Ar)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var P=this.fragment;return P?"#"+P:""},setHash:function(P){if(P=m(P),P===""){this.fragment=null;return}N(P,0)==="#"&&(P=B(P,1)),this.fragment="",this.parse(P,yr)},update:function(){this.query=this.searchParams.serialize()||null}};var Jr=function(L){var R=c(this,ze),I=E(arguments.length,1)>1?arguments[1]:void 0,C=p(R,new jn(L,!1,I));r||(R.href=C.serialize(),R.origin=C.getOrigin(),R.protocol=C.getProtocol(),R.username=C.getUsername(),R.password=C.getPassword(),R.host=C.getHost(),R.hostname=C.getHostname(),R.port=C.getPort(),R.pathname=C.getPathname(),R.search=C.getSearch(),R.searchParams=C.getSearchParams(),R.hash=C.getHash())},ze=Jr.prototype,Qe=function(P,L){return{get:function(){return y(this)[P]()},set:L&&function(R){return y(this)[L](R)},configurable:!0,enumerable:!0}};if(r&&(s(ze,"href",Qe("serialize","setHref")),s(ze,"origin",Qe("getOrigin")),s(ze,"protocol",Qe("getProtocol","setProtocol")),s(ze,"username",Qe("getUsername","setUsername")),s(ze,"password",Qe("getPassword","setPassword")),s(ze,"host",Qe("getHost","setHost")),s(ze,"hostname",Qe("getHostname","setHostname")),s(ze,"port",Qe("getPort","setPort")),s(ze,"pathname",Qe("getPathname","setPathname")),s(ze,"search",Qe("getSearch","setSearch")),s(ze,"searchParams",Qe("getSearchParams")),s(ze,"hash",Qe("getHash","setHash"))),o(ze,"toJSON",function(){return y(this).serialize()},{enumerable:!0}),o(ze,"toString",function(){return y(this).serialize()},{enumerable:!0}),j){var Cs=j.createObjectURL,As=j.revokeObjectURL;Cs&&o(Jr,"createObjectURL",a(Cs,j)),As&&o(Jr,"revokeObjectURL",a(As,j))}return w(Jr,"URL"),e({global:!0,constructor:!0,forced:!t,sham:!r},{URL:Jr}),Dc}var Xc;function Zv(){return Xc||(Xc=1,Jv()),$c}var Qc={},el;function Yv(){if(el)return Qc;el=1;var e=ke(),r=ar(),t=xe(),n=Kr(),a=Er(),i=mn(),o=r("URL"),s=i&&t(function(){o.canParse()}),c=t(function(){return o.canParse.length!==1});return e({target:"URL",stat:!0,forced:!s||c},{canParse:function(u){var f=n(arguments.length,1),h=a(u),d=f<2||arguments[1]===void 0?void 0:a(arguments[1]);try{return!!new o(h,d)}catch{return!1}}}),Qc}var rl={},tl;function Xv(){if(tl)return rl;tl=1;var e=ke(),r=ar(),t=Kr(),n=Er(),a=mn(),i=r("URL");return e({target:"URL",stat:!0,forced:!a},{parse:function(s){var c=t(arguments.length,1),l=n(s),u=c<2||arguments[1]===void 0?void 0:n(arguments[1]);try{return new i(l,u)}catch{return null}}}),rl}var nl={},al;function Qv(){if(al)return nl;al=1;var e=ke(),r=Me();return e({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return r(URL.prototype.toString,this)}}),nl}var xi,il;function ep(){if(il)return xi;il=1,eh(),Zv(),Yv(),Xv(),Qv();var e=us();return xi=e.URL,xi}var Ni,ol;function rp(){if(ol)return Ni;ol=1;var e=ep();return Ni=e,Ni}var $i,sl;function tp(){if(sl)return $i;sl=1;var e=rp();return $i=e,$i}tp();var ul={},Di,cl;function np(){return cl||(cl=1,Di={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),Di}var Mi,ll;function ap(){if(ll)return Mi;ll=1;var e=hn(),r=e("span").classList,t=r&&r.constructor&&r.constructor.prototype;return Mi=t===Object.prototype?void 0:t,Mi}var fl;function oh(){if(fl)return ul;fl=1;var e=Ie(),r=np(),t=ap(),n=as(),a=Hr(),i=ft(),o=Ne(),s=o("iterator"),c=n.values,l=function(f,h){if(f){if(f[s]!==c)try{a(f,s,c)}catch{f[s]=c}if(i(f,h,!0),r[h]){for(var d in n)if(f[d]!==n[d])try{a(f,d,n[d])}catch{f[d]=n[d]}}}};for(var u in r)l(e[u]&&e[u].prototype,u);return l(t,"DOMTokenList"),ul}var Fi,dl;function ip(){if(dl)return Fi;dl=1;var e=eh();return oh(),Fi=e,Fi}var Bi,hl;function op(){if(hl)return Bi;hl=1;var e=ip();return Bi=e,Bi}op();var vl={},pl={},zi,ml;function sp(){if(ml)return zi;ml=1;var e=nr(),r=Hr();return zi=function(t,n){e(n)&&"cause"in n&&r(t,"cause",n.cause)},zi}var Hi,gl;function up(){if(gl)return Hi;gl=1;var e=Se(),r=Error,t=e("".replace),n=function(o){return String(new r(o).stack)}("zxcasd"),a=/\n\s*at [^:]*:[^\n]*/,i=a.test(n);return Hi=function(o,s){if(i&&typeof o=="string"&&!r.prepareStackTrace)for(;s--;)o=t(o,a,"");return o},Hi}var Ki,yl;function cp(){if(yl)return Ki;yl=1;var e=xe(),r=zr();return Ki=!e(function(){var t=new Error("a");return"stack"in t?(Object.defineProperty(t,"stack",r(1,7)),t.stack!==7):!0}),Ki}var Gi,wl;function lp(){if(wl)return Gi;wl=1;var e=Hr(),r=up(),t=cp(),n=Error.captureStackTrace;return Gi=function(a,i,o,s){t&&(n?n(a,i):e(a,"stack",r(o,s)))},Gi}var Wi,bl;function Lt(){if(bl)return Wi;bl=1;var e=dt(),r=Me(),t=ur(),n=pn(),a=ah(),i=Zo(),o=vn(),s=ss(),c=yn(),l=nh(),u=TypeError,f=function(d,v){this.stopped=d,this.result=v},h=f.prototype;return Wi=function(d,v,m){var w=m&&m.that,E=!!(m&&m.AS_ENTRIES),b=!!(m&&m.IS_RECORD),g=!!(m&&m.IS_ITERATOR),p=!!(m&&m.INTERRUPTED),y=e(v,w),k,A,j,z,H,ee,x,N=function(O){return k&&l(k,"normal",O),new f(!0,O)},q=function(O){return E?(t(O),p?y(O[0],O[1],N):y(O[0],O[1])):p?y(O,N):y(O)};if(b)k=d.iterator;else if(g)k=d;else{if(A=c(d),!A)throw new u(n(d)+" is not iterable");if(a(A)){for(j=0,z=i(d);z>j;j++)if(H=q(d[j]),H&&o(h,H))return H;return new f(!1)}k=s(d,A)}for(ee=b?d.next:k.next;!(x=r(ee,k)).done;){try{H=q(x.value)}catch(O){l(k,"throw",O)}if(typeof H=="object"&&H&&o(h,H))return H}return new f(!1)},Wi}var Vi,Sl;function fp(){if(Sl)return Vi;Sl=1;var e=Er();return Vi=function(r,t){return r===void 0?arguments.length<2?"":t:e(r)},Vi}var Il;function dp(){if(Il)return pl;Il=1;var e=ke(),r=vn(),t=rs(),n=ts(),a=Wd(),i=At(),o=Hr(),s=zr(),c=sp(),l=lp(),u=Lt(),f=fp(),h=Ne(),d=h("toStringTag"),v=Error,m=[].push,w=function(g,p){var y=r(E,this),k;n?k=n(new v,y?t(this):E):(k=y?this:i(E),o(k,d,"Error")),p!==void 0&&o(k,"message",f(p)),l(k,w,k.stack,1),arguments.length>2&&c(k,arguments[2]);var A=[];return u(g,m,{that:A}),o(k,"errors",A),k};n?n(w,v):a(w,v,{name:!0});var E=w.prototype=i(v.prototype,{constructor:s(1,w),message:s(1,""),name:s(1,"AggregateError")});return e({global:!0,constructor:!0,arity:2},{AggregateError:w}),pl}var Pl;function hp(){return Pl||(Pl=1,dp()),vl}var El={},Ji,Rl;function vp(){if(Rl)return Ji;Rl=1;var e=os(),r=Ut();return Ji=e?{}.toString:function(){return"[object "+r(this)+"]"},Ji}var _l;function pp(){if(_l)return El;_l=1;var e=os(),r=ir(),t=vp();return e||r(Object.prototype,"toString",t,{unsafe:!0}),El}var Tl={},Ol={},Zi,kl;function sh(){if(kl)return Zi;kl=1;var e=Ie(),r=Ct(),t=cn(),n=function(a){return r.slice(0,a.length)===a};return Zi=function(){return n("Bun/")?"BUN":n("Cloudflare-Workers")?"CLOUDFLARE":n("Deno/")?"DENO":n("Node.js/")?"NODE":e.Bun&&typeof Bun.version=="string"?"BUN":e.Deno&&typeof Deno.version=="object"?"DENO":t(e.process)==="process"?"NODE":e.window&&e.document?"BROWSER":"REST"}(),Zi}var Yi,Cl;function cs(){if(Cl)return Yi;Cl=1;var e=sh();return Yi=e==="NODE",Yi}var Xi,Al;function mp(){if(Al)return Xi;Al=1;var e=ar(),r=gn(),t=Ne(),n=$e(),a=t("species");return Xi=function(i){var o=e(i);n&&o&&!o[a]&&r(o,a,{configurable:!0,get:function(){return this}})},Xi}var Qi,jl;function gp(){if(jl)return Qi;jl=1;var e=ih(),r=pn(),t=TypeError;return Qi=function(n){if(e(n))return n;throw new t(r(n)+" is not a constructor")},Qi}var eo,Ul;function uh(){if(Ul)return eo;Ul=1;var e=ur(),r=gp(),t=ln(),n=Ne(),a=n("species");return eo=function(i,o){var s=e(i).constructor,c;return s===void 0||t(c=e(s)[a])?o:r(c)},eo}var ro,Ll;function ch(){if(Ll)return ro;Ll=1;var e=un(),r=Function.prototype,t=r.apply,n=r.call;return ro=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(t):function(){return n.apply(t,arguments)}),ro}var to,ql;function lh(){if(ql)return to;ql=1;var e=Ct();return to=/(?:ipad|iphone|ipod).*applewebkit/i.test(e),to}var no,xl;function fh(){if(xl)return no;xl=1;var e=Ie(),r=ch(),t=dt(),n=Re(),a=tr(),i=xe(),o=Fd(),s=wn(),c=hn(),l=Kr(),u=lh(),f=cs(),h=e.setImmediate,d=e.clearImmediate,v=e.process,m=e.Dispatch,w=e.Function,E=e.MessageChannel,b=e.String,g=0,p={},y="onreadystatechange",k,A,j,z;i(function(){k=e.location});var H=function(q){if(a(p,q)){var O=p[q];delete p[q],O()}},ee=function(q){return function(){H(q)}},x=function(q){H(q.data)},N=function(q){e.postMessage(b(q),k.protocol+"//"+k.host)};return(!h||!d)&&(h=function(O){l(arguments.length,1);var X=n(O)?O:w(O),re=s(arguments,1);return p[++g]=function(){r(X,void 0,re)},A(g),g},d=function(O){delete p[O]},f?A=function(q){v.nextTick(ee(q))}:m&&m.now?A=function(q){m.now(ee(q))}:E&&!u?(j=new E,z=j.port2,j.port1.onmessage=x,A=t(z.postMessage,z)):e.addEventListener&&n(e.postMessage)&&!e.importScripts&&k&&k.protocol!=="file:"&&!i(N)?(A=N,e.addEventListener("message",x,!1)):y in c("script")?A=function(q){o.appendChild(c("script"))[y]=function(){o.removeChild(this),H(q)}}:A=function(q){setTimeout(ee(q),0)}),no={set:h,clear:d},no}var ao,Nl;function dh(){if(Nl)return ao;Nl=1;var e=function(){this.head=null,this.tail=null};return e.prototype={add:function(r){var t={item:r,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var r=this.head;if(r){var t=this.head=r.next;return t===null&&(this.tail=null),r.item}}},ao=e,ao}var io,$l;function yp(){if($l)return io;$l=1;var e=Ct();return io=/ipad|iphone|ipod/i.test(e)&&typeof Pebble<"u",io}var oo,Dl;function wp(){if(Dl)return oo;Dl=1;var e=Ct();return oo=/web0s(?!.*chrome)/i.test(e),oo}var so,Ml;function bp(){if(Ml)return so;Ml=1;var e=Ie(),r=Xd(),t=dt(),n=fh().set,a=dh(),i=lh(),o=yp(),s=wp(),c=cs(),l=e.MutationObserver||e.WebKitMutationObserver,u=e.document,f=e.process,h=e.Promise,d=r("queueMicrotask"),v,m,w,E,b;if(!d){var g=new a,p=function(){var y,k;for(c&&(y=f.domain)&&y.exit();k=g.get();)try{k()}catch(A){throw g.head&&v(),A}y&&y.enter()};!i&&!c&&!s&&l&&u?(m=!0,w=u.createTextNode(""),new l(p).observe(w,{characterData:!0}),v=function(){w.data=m=!m}):!o&&h&&h.resolve?(E=h.resolve(void 0),E.constructor=h,b=t(E.then,E),v=function(){b(p)}):c?v=function(){f.nextTick(p)}:(n=t(n,e),v=function(){n(p)}),d=function(y){g.head||v(),g.add(y)}}return so=d,so}var uo,Fl;function Sp(){return Fl||(Fl=1,uo=function(e,r){try{arguments.length===1?console.error(e):console.error(e,r)}catch{}}),uo}var co,Bl;function ht(){return Bl||(Bl=1,co=function(e){try{return{error:!1,value:e()}}catch(r){return{error:!0,value:r}}}),co}var lo,zl;function vt(){if(zl)return lo;zl=1;var e=Ie();return lo=e.Promise,lo}var fo,Hl;function qt(){if(Hl)return fo;Hl=1;var e=Ie(),r=vt(),t=Re(),n=Vd(),a=es(),i=Ne(),o=sh(),s=gr(),c=Ad(),l=r&&r.prototype,u=i("species"),f=!1,h=t(e.PromiseRejectionEvent),d=n("Promise",function(){var v=a(r),m=v!==String(r);if(!m&&c===66||s&&!(l.catch&&l.finally))return!0;if(!c||c<51||!/native code/.test(v)){var w=new r(function(g){g(1)}),E=function(g){g(function(){},function(){})},b=w.constructor={};if(b[u]=E,f=w.then(function(){})instanceof E,!f)return!0}return!m&&(o==="BROWSER"||o==="DENO")&&!h});return fo={CONSTRUCTOR:d,REJECTION_EVENT:h,SUBCLASSING:f},fo}var ho={},Kl;function Rr(){if(Kl)return ho;Kl=1;var e=cr(),r=TypeError,t=function(n){var a,i;this.promise=new n(function(o,s){if(a!==void 0||i!==void 0)throw new r("Bad Promise constructor");a=o,i=s}),this.resolve=e(a),this.reject=e(i)};return ho.f=function(n){return new t(n)},ho}var Gl;function Ip(){if(Gl)return Ol;Gl=1;var e=ke(),r=gr(),t=cs(),n=Ie(),a=Me(),i=ir(),o=ts(),s=ft(),c=mp(),l=cr(),u=Re(),f=nr(),h=is(),d=uh(),v=fh().set,m=bp(),w=Sp(),E=ht(),b=dh(),g=lt(),p=vt(),y=qt(),k=Rr(),A="Promise",j=y.CONSTRUCTOR,z=y.REJECTION_EVENT,H=y.SUBCLASSING,ee=g.getterFor(A),x=g.set,N=p&&p.prototype,q=p,O=N,X=n.TypeError,re=n.document,Q=n.process,S=k.f,_=S,$=!!(re&&re.createEvent&&n.dispatchEvent),B="unhandledrejection",G="rejectionhandled",Z=0,de=1,ae=2,ue=1,se=2,Pe,je,Fe,Ce,Ve=function(M){var ie;return f(M)&&u(ie=M.then)?ie:!1},lr=function(M,ie){var le=ie.value,fe=ie.state===de,ge=fe?M.ok:M.fail,or=M.resolve,sr=M.reject,Te=M.domain,He,Je,Xe;try{ge?(fe||(ie.rejection===se&&pe(ie),ie.rejection=ue),ge===!0?He=le:(Te&&Te.enter(),He=ge(le),Te&&(Te.exit(),Xe=!0)),He===M.promise?sr(new X("Promise-chain cycle")):(Je=Ve(He))?a(Je,He,or,sr):or(He)):sr(le)}catch(gt){Te&&!Xe&&Te.exit(),sr(gt)}},fr=function(M,ie){M.notified||(M.notified=!0,m(function(){for(var le=M.reactions,fe;fe=le.get();)lr(fe,M);M.notified=!1,ie&&!M.rejection&&F(M)}))},T=function(M,ie,le){var fe,ge;$?(fe=re.createEvent("Event"),fe.promise=ie,fe.reason=le,fe.initEvent(M,!1,!0),n.dispatchEvent(fe)):fe={promise:ie,reason:le},!z&&(ge=n["on"+M])?ge(fe):M===B&&w("Unhandled promise rejection",le)},F=function(M){a(v,n,function(){var ie=M.facade,le=M.value,fe=J(M),ge;if(fe&&(ge=E(function(){t?Q.emit("unhandledRejection",le,ie):T(B,ie,le)}),M.rejection=t||J(M)?se:ue,ge.error))throw ge.value})},J=function(M){return M.rejection!==ue&&!M.parent},pe=function(M){a(v,n,function(){var ie=M.facade;t?Q.emit("rejectionHandled",ie):T(G,ie,M.value)})},ve=function(M,ie,le){return function(fe){M(ie,fe,le)}},me=function(M,ie,le){M.done||(M.done=!0,le&&(M=le),M.value=ie,M.state=ae,fr(M,!0))},Be=function(M,ie,le){if(!M.done){M.done=!0,le&&(M=le);try{if(M.facade===ie)throw new X("Promise can't be resolved itself");var fe=Ve(ie);fe?m(function(){var ge={done:!1};try{a(fe,ie,ve(Be,ge,M),ve(me,ge,M))}catch(or){me(ge,or,M)}}):(M.value=ie,M.state=de,fr(M,!1))}catch(ge){me({done:!1},ge,M)}}};if(j&&(q=function(ie){h(this,O),l(ie),a(Pe,this);var le=ee(this);try{ie(ve(Be,le),ve(me,le))}catch(fe){me(le,fe)}},O=q.prototype,Pe=function(ie){x(this,{type:A,done:!1,notified:!1,parent:!1,reactions:new b,rejection:!1,state:Z,value:null})},Pe.prototype=i(O,"then",function(ie,le){var fe=ee(this),ge=S(d(this,q));return fe.parent=!0,ge.ok=u(ie)?ie:!0,ge.fail=u(le)&&le,ge.domain=t?Q.domain:void 0,fe.state===Z?fe.reactions.add(ge):m(function(){lr(ge,fe)}),ge.promise}),je=function(){var M=new Pe,ie=ee(M);this.promise=M,this.resolve=ve(Be,ie),this.reject=ve(me,ie)},k.f=S=function(M){return M===q||M===Fe?new je(M):_(M)},!r&&u(p)&&N!==Object.prototype)){Ce=N.then,H||i(N,"then",function(ie,le){var fe=this;return new q(function(ge,or){a(Ce,fe,ge,or)}).then(ie,le)},{unsafe:!0});try{delete N.constructor}catch{}o&&o(N,O)}return e({global:!0,constructor:!0,wrap:!0,forced:j},{Promise:q}),s(q,A,!1,!0),c(A),Ol}var Wl={},vo,Vl;function Pp(){if(Vl)return vo;Vl=1;var e=Ne(),r=e("iterator"),t=!1;try{var n=0,a={next:function(){return{done:!!n++}},return:function(){t=!0}};a[r]=function(){return this},Array.from(a,function(){throw 2})}catch{}return vo=function(i,o){try{if(!o&&!t)return!1}catch{return!1}var s=!1;try{var c={};c[r]=function(){return{next:function(){return{done:s=!0}}}},i(c)}catch{}return s},vo}var po,Jl;function bn(){if(Jl)return po;Jl=1;var e=vt(),r=Pp(),t=qt().CONSTRUCTOR;return po=t||!r(function(n){e.all(n).then(void 0,function(){})}),po}var Zl;function Ep(){if(Zl)return Wl;Zl=1;var e=ke(),r=Me(),t=cr(),n=Rr(),a=ht(),i=Lt(),o=bn();return e({target:"Promise",stat:!0,forced:o},{all:function(c){var l=this,u=n.f(l),f=u.resolve,h=u.reject,d=a(function(){var v=t(l.resolve),m=[],w=0,E=1;i(c,function(b){var g=w++,p=!1;E++,r(v,l,b).then(function(y){p||(p=!0,m[g]=y,--E||f(m))},h)}),--E||f(m)});return d.error&&h(d.value),u.promise}}),Wl}var Yl={},Xl;function Rp(){if(Xl)return Yl;Xl=1;var e=ke(),r=gr(),t=qt().CONSTRUCTOR,n=vt(),a=ar(),i=Re(),o=ir(),s=n&&n.prototype;if(e({target:"Promise",proto:!0,forced:t,real:!0},{catch:function(l){return this.then(void 0,l)}}),!r&&i(n)){var c=a("Promise").prototype.catch;s.catch!==c&&o(s,"catch",c,{unsafe:!0})}return Yl}var Ql={},ef;function _p(){if(ef)return Ql;ef=1;var e=ke(),r=Me(),t=cr(),n=Rr(),a=ht(),i=Lt(),o=bn();return e({target:"Promise",stat:!0,forced:o},{race:function(c){var l=this,u=n.f(l),f=u.reject,h=a(function(){var d=t(l.resolve);i(c,function(v){r(d,l,v).then(u.resolve,f)})});return h.error&&f(h.value),u.promise}}),Ql}var rf={},tf;function Tp(){if(tf)return rf;tf=1;var e=ke(),r=Rr(),t=qt().CONSTRUCTOR;return e({target:"Promise",stat:!0,forced:t},{reject:function(a){var i=r.f(this),o=i.reject;return o(a),i.promise}}),rf}var nf={},mo,af;function hh(){if(af)return mo;af=1;var e=ur(),r=nr(),t=Rr();return mo=function(n,a){if(e(n),r(a)&&a.constructor===n)return a;var i=t.f(n),o=i.resolve;return o(a),i.promise},mo}var of;function Op(){if(of)return nf;of=1;var e=ke(),r=ar(),t=gr(),n=vt(),a=qt().CONSTRUCTOR,i=hh(),o=r("Promise"),s=t&&!a;return e({target:"Promise",stat:!0,forced:t||a},{resolve:function(l){return i(s&&this===o?n:this,l)}}),nf}var sf;function kp(){return sf||(sf=1,Ip(),Ep(),Rp(),_p(),Tp(),Op()),Tl}var uf={},cf;function Cp(){if(cf)return uf;cf=1;var e=ke(),r=Me(),t=cr(),n=Rr(),a=ht(),i=Lt(),o=bn();return e({target:"Promise",stat:!0,forced:o},{allSettled:function(c){var l=this,u=n.f(l),f=u.resolve,h=u.reject,d=a(function(){var v=t(l.resolve),m=[],w=0,E=1;i(c,function(b){var g=w++,p=!1;E++,r(v,l,b).then(function(y){p||(p=!0,m[g]={status:"fulfilled",value:y},--E||f(m))},function(y){p||(p=!0,m[g]={status:"rejected",reason:y},--E||f(m))})}),--E||f(m)});return d.error&&h(d.value),u.promise}}),uf}var lf={},ff;function Ap(){if(ff)return lf;ff=1;var e=ke(),r=Me(),t=cr(),n=ar(),a=Rr(),i=ht(),o=Lt(),s=bn(),c="No one promise resolved";return e({target:"Promise",stat:!0,forced:s},{any:function(u){var f=this,h=n("AggregateError"),d=a.f(f),v=d.resolve,m=d.reject,w=i(function(){var E=t(f.resolve),b=[],g=0,p=1,y=!1;o(u,function(k){var A=g++,j=!1;p++,r(E,f,k).then(function(z){j||y||(y=!0,v(z))},function(z){j||y||(j=!0,b[A]=z,--p||m(new h(b,c)))})}),--p||m(new h(b,c))});return w.error&&m(w.value),d.promise}}),lf}var df={},hf;function vh(){if(hf)return df;hf=1;var e=ke(),r=Ie(),t=ch(),n=wn(),a=Rr(),i=cr(),o=ht(),s=r.Promise,c=!1,l=!s||!s.try||o(function(){s.try(function(u){c=u===8},8)}).error||!c;return e({target:"Promise",stat:!0,forced:l},{try:function(u){var f=arguments.length>1?n(arguments,1):[],h=a.f(this),d=o(function(){return t(i(u),void 0,f)});return(d.error?h.reject:h.resolve)(d.value),h.promise}}),df}var vf={},pf;function ph(){if(pf)return vf;pf=1;var e=ke(),r=Rr();return e({target:"Promise",stat:!0},{withResolvers:function(){var n=r.f(this);return{promise:n.promise,resolve:n.resolve,reject:n.reject}}}),vf}var mf={},gf;function jp(){if(gf)return mf;gf=1;var e=ke(),r=gr(),t=vt(),n=xe(),a=ar(),i=Re(),o=uh(),s=hh(),c=ir(),l=t&&t.prototype,u=!!t&&n(function(){l.finally.call({then:function(){}},function(){})});if(e({target:"Promise",proto:!0,real:!0,forced:u},{finally:function(h){var d=o(this,a("Promise")),v=i(h);return this.then(v?function(m){return s(d,h()).then(function(){return m})}:h,v?function(m){return s(d,h()).then(function(){throw m})}:h)}}),!r&&i(t)){var f=a("Promise").prototype.finally;l.finally!==f&&c(l,"finally",f,{unsafe:!0})}return mf}var go,yf;function Up(){if(yf)return go;yf=1,hp(),as(),pp(),kp(),Cp(),Ap(),vh(),ph(),jp(),th();var e=us();return go=e.Promise,go}var yo,wf;function Lp(){if(wf)return yo;wf=1;var e=Up();return oh(),yo=e,yo}var bf={},Sf;function qp(){return Sf||(Sf=1,vh()),bf}var If={},Pf;function xp(){return Pf||(Pf=1,ph()),If}var wo,Ef;function Np(){if(Ef)return wo;Ef=1;var e=Lp();return qp(),xp(),wo=e,wo}Np();const mh="sesamy-debug";function $p(e,r,t){const n=new Date;n.setTime(n.getTime()+t*60*60*1e3);const a="expires="+n.toUTCString();document.cookie=`${e}=${r}; ${a}; path=/`}function Dp(e){if(typeof document>"u")return null;const r=e+"=",t=document.cookie.split(";");for(let n=0;n<t.length;n++){let a=t[n];for(;a.charAt(0)===" ";)a=a.substring(1);if(a.indexOf(r)===0)return a.substring(r.length,a.length)}return null}function Mp(e){$p(mh,e.toString(),1)}function Fp(){return Dp(mh)==="true"}function ye(e){Fp()&&console.log(e)}function Ir(e,r){if(typeof window>"u")return;const t=new CustomEvent(e,{detail:r,bubbles:!0,composed:!0});ye(`Triggering event: ${e}`),dispatchEvent(t)}function pr(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)r.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(t[n[a]]=e[n[a]])}return t}var Ur=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ls(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function fs(e,r){return e(r={exports:{}},r.exports),r.exports}var jr=fs(function(e,r){Object.defineProperty(r,"__esModule",{value:!0});var t=function(){function n(){var a=this;this.locked=new Map,this.addToLocked=function(i,o){var s=a.locked.get(i);s===void 0?o===void 0?a.locked.set(i,[]):a.locked.set(i,[o]):o!==void 0&&(s.unshift(o),a.locked.set(i,s))},this.isLocked=function(i){return a.locked.has(i)},this.lock=function(i){return new Promise(function(o,s){a.isLocked(i)?a.addToLocked(i,o):(a.addToLocked(i),o())})},this.unlock=function(i){var o=a.locked.get(i);if(o!==void 0&&o.length!==0){var s=o.pop();a.locked.set(i,o),s!==void 0&&setTimeout(s,0)}else a.locked.delete(i)}}return n.getInstance=function(){return n.instance===void 0&&(n.instance=new n),n.instance},n}();r.default=function(){return t.getInstance()}});ls(jr);var Bp=ls(fs(function(e,r){var t=Ur&&Ur.__awaiter||function(u,f,h,d){return new(h||(h=Promise))(function(v,m){function w(g){try{b(d.next(g))}catch(p){m(p)}}function E(g){try{b(d.throw(g))}catch(p){m(p)}}function b(g){g.done?v(g.value):new h(function(p){p(g.value)}).then(w,E)}b((d=d.apply(u,f||[])).next())})},n=Ur&&Ur.__generator||function(u,f){var h,d,v,m,w={label:0,sent:function(){if(1&v[0])throw v[1];return v[1]},trys:[],ops:[]};return m={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function E(b){return function(g){return function(p){if(h)throw new TypeError("Generator is already executing.");for(;w;)try{if(h=1,d&&(v=2&p[0]?d.return:p[0]?d.throw||((v=d.return)&&v.call(d),0):d.next)&&!(v=v.call(d,p[1])).done)return v;switch(d=0,v&&(p=[2&p[0],v.value]),p[0]){case 0:case 1:v=p;break;case 4:return w.label++,{value:p[1],done:!1};case 5:w.label++,d=p[1],p=[0];continue;case 7:p=w.ops.pop(),w.trys.pop();continue;default:if(v=w.trys,!((v=v.length>0&&v[v.length-1])||p[0]!==6&&p[0]!==2)){w=0;continue}if(p[0]===3&&(!v||p[1]>v[0]&&p[1]<v[3])){w.label=p[1];break}if(p[0]===6&&w.label<v[1]){w.label=v[1],v=p;break}if(v&&w.label<v[2]){w.label=v[2],w.ops.push(p);break}v[2]&&w.ops.pop(),w.trys.pop();continue}p=f.call(u,w)}catch(y){p=[6,y],d=0}finally{h=v=0}if(5&p[0])throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}([b,g])}}},a=Ur;Object.defineProperty(r,"__esModule",{value:!0});var i="browser-tabs-lock-key",o={key:function(u){return t(a,void 0,void 0,function(){return n(this,function(f){throw new Error("Unsupported")})})},getItem:function(u){return t(a,void 0,void 0,function(){return n(this,function(f){throw new Error("Unsupported")})})},clear:function(){return t(a,void 0,void 0,function(){return n(this,function(u){return[2,window.localStorage.clear()]})})},removeItem:function(u){return t(a,void 0,void 0,function(){return n(this,function(f){throw new Error("Unsupported")})})},setItem:function(u,f){return t(a,void 0,void 0,function(){return n(this,function(h){throw new Error("Unsupported")})})},keySync:function(u){return window.localStorage.key(u)},getItemSync:function(u){return window.localStorage.getItem(u)},clearSync:function(){return window.localStorage.clear()},removeItemSync:function(u){return window.localStorage.removeItem(u)},setItemSync:function(u,f){return window.localStorage.setItem(u,f)}};function s(u){return new Promise(function(f){return setTimeout(f,u)})}function c(u){for(var f="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",h="",d=0;d<u;d++)h+=f[Math.floor(Math.random()*f.length)];return h}var l=function(){function u(f){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+c(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),this.storageHandler=f,u.waiters===void 0&&(u.waiters=[])}return u.prototype.acquireLock=function(f,h){return h===void 0&&(h=5e3),t(this,void 0,void 0,function(){var d,v,m,w,E,b,g;return n(this,function(p){switch(p.label){case 0:d=Date.now()+c(4),v=Date.now()+h,m=i+"-"+f,w=this.storageHandler===void 0?o:this.storageHandler,p.label=1;case 1:return Date.now()<v?[4,s(30)]:[3,8];case 2:return p.sent(),w.getItemSync(m)!==null?[3,5]:(E=this.id+"-"+f+"-"+d,[4,s(Math.floor(25*Math.random()))]);case 3:return p.sent(),w.setItemSync(m,JSON.stringify({id:this.id,iat:d,timeoutKey:E,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,s(30)];case 4:return p.sent(),(b=w.getItemSync(m))!==null&&(g=JSON.parse(b)).id===this.id&&g.iat===d?(this.acquiredIatSet.add(d),this.refreshLockWhileAcquired(m,d),[2,!0]):[3,7];case 5:return u.lockCorrector(this.storageHandler===void 0?o:this.storageHandler),[4,this.waitForSomethingToChange(v)];case 6:p.sent(),p.label=7;case 7:return d=Date.now()+c(4),[3,1];case 8:return[2,!1]}})})},u.prototype.refreshLockWhileAcquired=function(f,h){return t(this,void 0,void 0,function(){var d=this;return n(this,function(v){return setTimeout(function(){return t(d,void 0,void 0,function(){var m,w,E;return n(this,function(b){switch(b.label){case 0:return[4,jr.default().lock(h)];case 1:return b.sent(),this.acquiredIatSet.has(h)?(m=this.storageHandler===void 0?o:this.storageHandler,(w=m.getItemSync(f))===null?(jr.default().unlock(h),[2]):((E=JSON.parse(w)).timeRefreshed=Date.now(),m.setItemSync(f,JSON.stringify(E)),jr.default().unlock(h),this.refreshLockWhileAcquired(f,h),[2])):(jr.default().unlock(h),[2])}})})},1e3),[2]})})},u.prototype.waitForSomethingToChange=function(f){return t(this,void 0,void 0,function(){return n(this,function(h){switch(h.label){case 0:return[4,new Promise(function(d){var v=!1,m=Date.now(),w=!1;function E(){if(w||(window.removeEventListener("storage",E),u.removeFromWaiting(E),clearTimeout(b),w=!0),!v){v=!0;var g=50-(Date.now()-m);g>0?setTimeout(d,g):d(null)}}window.addEventListener("storage",E),u.addToWaiting(E);var b=setTimeout(E,Math.max(0,f-Date.now()))})];case 1:return h.sent(),[2]}})})},u.addToWaiting=function(f){this.removeFromWaiting(f),u.waiters!==void 0&&u.waiters.push(f)},u.removeFromWaiting=function(f){u.waiters!==void 0&&(u.waiters=u.waiters.filter(function(h){return h!==f}))},u.notifyWaiters=function(){u.waiters!==void 0&&u.waiters.slice().forEach(function(f){return f()})},u.prototype.releaseLock=function(f){return t(this,void 0,void 0,function(){return n(this,function(h){switch(h.label){case 0:return[4,this.releaseLock__private__(f)];case 1:return[2,h.sent()]}})})},u.prototype.releaseLock__private__=function(f){return t(this,void 0,void 0,function(){var h,d,v,m;return n(this,function(w){switch(w.label){case 0:return h=this.storageHandler===void 0?o:this.storageHandler,d=i+"-"+f,(v=h.getItemSync(d))===null?[2]:(m=JSON.parse(v)).id!==this.id?[3,2]:[4,jr.default().lock(m.iat)];case 1:w.sent(),this.acquiredIatSet.delete(m.iat),h.removeItemSync(d),jr.default().unlock(m.iat),u.notifyWaiters(),w.label=2;case 2:return[2]}})})},u.lockCorrector=function(f){for(var h=Date.now()-5e3,d=f,v=[],m=0;;){var w=d.keySync(m);if(w===null)break;v.push(w),m++}for(var E=!1,b=0;b<v.length;b++){var g=v[b];if(g.includes(i)){var p=d.getItemSync(g);if(p!==null){var y=JSON.parse(p);(y.timeRefreshed===void 0&&y.timeAcquired<h||y.timeRefreshed!==void 0&&y.timeRefreshed<h)&&(d.removeItemSync(g),E=!0)}}}E&&u.notifyWaiters()},u.waiters=void 0,u}();r.default=l}));const zp={timeoutInSeconds:60},gh={name:"auth0-spa-js",version:"2.1.3"},yh=()=>Date.now();let Ye=class Ao extends Error{constructor(r,t){super(t),this.error=r,this.error_description=t,Object.setPrototypeOf(this,Ao.prototype)}static fromPayload({error:r,error_description:t}){return new Ao(r,t)}},Hp=class wh extends Ye{constructor(r,t,n,a=null){super(r,t),this.state=n,this.appState=a,Object.setPrototypeOf(this,wh.prototype)}},jo=class bh extends Ye{constructor(){super("timeout","Timeout"),Object.setPrototypeOf(this,bh.prototype)}},Kp=class Sh extends jo{constructor(r){super(),this.popup=r,Object.setPrototypeOf(this,Sh.prototype)}},Gp=class Ih extends Ye{constructor(r){super("cancelled","Popup closed"),this.popup=r,Object.setPrototypeOf(this,Ih.prototype)}},Wp=class Ph extends Ye{constructor(r,t,n){super(r,t),this.mfa_token=n,Object.setPrototypeOf(this,Ph.prototype)}},Eh=class Rh extends Ye{constructor(r,t){super("missing_refresh_token",`Missing Refresh Token (audience: '${Rf(r,["default"])}', scope: '${Rf(t)}')`),this.audience=r,this.scope=t,Object.setPrototypeOf(this,Rh.prototype)}};function Rf(e,r=[]){return e&&!r.includes(e)?e:""}const Vt=()=>window.crypto,bo=()=>{const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.";let r="";return Array.from(Vt().getRandomValues(new Uint8Array(43))).forEach(t=>r+=e[t%e.length]),r},_f=e=>btoa(e),Uo=e=>{var{clientId:r}=e,t=pr(e,["clientId"]);return new URLSearchParams((n=>Object.keys(n).filter(a=>n[a]!==void 0).reduce((a,i)=>Object.assign(Object.assign({},a),{[i]:n[i]}),{}))(Object.assign({client_id:r},t))).toString()},Tf=e=>(r=>decodeURIComponent(atob(r).split("").map(t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)).join("")))(e.replace(/_/g,"/").replace(/-/g,"+")),Vp=async(e,r)=>{const t=await fetch(e,r);return{ok:t.ok,json:await t.json()}},Jp=async(e,r,t)=>{const n=new AbortController;let a;return r.signal=n.signal,Promise.race([Vp(e,r),new Promise((i,o)=>{a=setTimeout(()=>{n.abort(),o(new Error("Timeout when executing 'fetch'"))},t)})]).finally(()=>{clearTimeout(a)})},Zp=async(e,r,t,n,a,i,o)=>{return s={auth:{audience:r,scope:t},timeout:a,fetchUrl:e,fetchOptions:n,useFormData:o},c=i,new Promise(function(l,u){const f=new MessageChannel;f.port1.onmessage=function(h){h.data.error?u(new Error(h.data.error)):l(h.data),f.port1.close()},c.postMessage(s,[f.port2])});var s,c},Yp=async(e,r,t,n,a,i,o=1e4)=>a?Zp(e,r,t,n,o,a,i):Jp(e,n,o);async function Xp(e,r){var{baseUrl:t,timeout:n,audience:a,scope:i,auth0Client:o,useFormData:s}=e,c=pr(e,["baseUrl","timeout","audience","scope","auth0Client","useFormData"]);const l=s?Uo(c):JSON.stringify(c);return await async function(u,f,h,d,v,m,w){let E,b=null;for(let j=0;j<3;j++)try{E=await Yp(u,h,d,v,m,w,f),b=null;break}catch(z){b=z}if(b)throw b;const g=E.json,{error:p,error_description:y}=g,k=pr(g,["error","error_description"]),{ok:A}=E;if(!A){const j=y||`HTTP error. Unable to fetch ${u}`;throw p==="mfa_required"?new Wp(p,j,k.mfa_token):p==="missing_refresh_token"?new Eh(h,d):new Ye(p||"request_error",j)}return k}(`${t}/oauth/token`,n,a||"default",i,{method:"POST",body:l,headers:{"Content-Type":s?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(o||gh))}},r,s)}const Nt=(...e)=>{return(r=e.filter(Boolean).join(" ").trim().split(/\s+/),Array.from(new Set(r))).join(" ");var r};let qr=class Lo{constructor(r,t="@@auth0spajs@@",n){this.prefix=t,this.suffix=n,this.clientId=r.clientId,this.scope=r.scope,this.audience=r.audience}toKey(){return[this.prefix,this.clientId,this.audience,this.scope,this.suffix].filter(Boolean).join("::")}static fromKey(r){const[t,n,a,i]=r.split("::");return new Lo({clientId:n,scope:i,audience:a},t)}static fromCacheEntry(r){const{scope:t,audience:n,client_id:a}=r;return new Lo({scope:t,audience:n,clientId:a})}},Qp=class{set(r,t){localStorage.setItem(r,JSON.stringify(t))}get(r){const t=window.localStorage.getItem(r);if(t)try{return JSON.parse(t)}catch{return}}remove(r){localStorage.removeItem(r)}allKeys(){return Object.keys(window.localStorage).filter(r=>r.startsWith("@@auth0spajs@@"))}},_h=class{constructor(){this.enclosedCache=function(){let r={};return{set(t,n){r[t]=n},get(t){const n=r[t];if(n)return n},remove(t){delete r[t]},allKeys:()=>Object.keys(r)}}()}},em=class{constructor(r,t,n){this.cache=r,this.keyManifest=t,this.nowProvider=n||yh}async setIdToken(r,t,n){var a;const i=this.getIdTokenCacheKey(r);await this.cache.set(i,{id_token:t,decodedToken:n}),await((a=this.keyManifest)===null||a===void 0?void 0:a.add(i))}async getIdToken(r){const t=await this.cache.get(this.getIdTokenCacheKey(r.clientId));if(!t&&r.scope&&r.audience){const n=await this.get(r);return!n||!n.id_token||!n.decodedToken?void 0:{id_token:n.id_token,decodedToken:n.decodedToken}}if(t)return{id_token:t.id_token,decodedToken:t.decodedToken}}async get(r,t=0){var n;let a=await this.cache.get(r.toKey());if(!a){const s=await this.getCacheKeys();if(!s)return;const c=this.matchExistingCacheKey(r,s);c&&(a=await this.cache.get(c))}if(!a)return;const i=await this.nowProvider(),o=Math.floor(i/1e3);return a.expiresAt-t<o?a.body.refresh_token?(a.body={refresh_token:a.body.refresh_token},await this.cache.set(r.toKey(),a),a.body):(await this.cache.remove(r.toKey()),void await((n=this.keyManifest)===null||n===void 0?void 0:n.remove(r.toKey()))):a.body}async set(r){var t;const n=new qr({clientId:r.client_id,scope:r.scope,audience:r.audience}),a=await this.wrapCacheEntry(r);await this.cache.set(n.toKey(),a),await((t=this.keyManifest)===null||t===void 0?void 0:t.add(n.toKey()))}async clear(r){var t;const n=await this.getCacheKeys();n&&(await n.filter(a=>!r||a.includes(r)).reduce(async(a,i)=>{await a,await this.cache.remove(i)},Promise.resolve()),await((t=this.keyManifest)===null||t===void 0?void 0:t.clear()))}async wrapCacheEntry(r){const t=await this.nowProvider();return{body:r,expiresAt:Math.floor(t/1e3)+r.expires_in}}async getCacheKeys(){var r;return this.keyManifest?(r=await this.keyManifest.get())===null||r===void 0?void 0:r.keys:this.cache.allKeys?this.cache.allKeys():void 0}getIdTokenCacheKey(r){return new qr({clientId:r},"@@auth0spajs@@","@@user@@").toKey()}matchExistingCacheKey(r,t){return t.filter(n=>{var a;const i=qr.fromKey(n),o=new Set(i.scope&&i.scope.split(" ")),s=((a=r.scope)===null||a===void 0?void 0:a.split(" "))||[],c=i.scope&&s.reduce((l,u)=>l&&o.has(u),!0);return i.prefix==="@@auth0spajs@@"&&i.clientId===r.clientId&&i.audience===r.audience&&c})[0]}},rm=class{constructor(r,t,n){this.storage=r,this.clientId=t,this.cookieDomain=n,this.storageKey=`a0.spajs.txs.${this.clientId}`}create(r){this.storage.save(this.storageKey,r,{daysUntilExpire:1,cookieDomain:this.cookieDomain})}get(){return this.storage.get(this.storageKey)}remove(){this.storage.remove(this.storageKey,{cookieDomain:this.cookieDomain})}};const wt=e=>typeof e=="number",tm=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"],nm=e=>{if(!e.id_token)throw new Error("ID token is required but missing");const r=(i=>{const o=i.split("."),[s,c,l]=o;if(o.length!==3||!s||!c||!l)throw new Error("ID token could not be decoded");const u=JSON.parse(Tf(c)),f={__raw:i},h={};return Object.keys(u).forEach(d=>{f[d]=u[d],tm.includes(d)||(h[d]=u[d])}),{encoded:{header:s,payload:c,signature:l},header:JSON.parse(Tf(s)),claims:f,user:h}})(e.id_token);if(!r.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(r.claims.iss!==e.iss)throw new Error(`Issuer (iss) claim mismatch in the ID token; expected "${e.iss}", found "${r.claims.iss}"`);if(!r.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if(r.header.alg!=="RS256")throw new Error(`Signature algorithm of "${r.header.alg}" is not supported. Expected the ID token to be signed with "RS256".`);if(!r.claims.aud||typeof r.claims.aud!="string"&&!Array.isArray(r.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(r.claims.aud)){if(!r.claims.aud.includes(e.aud))throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${e.aud}" but was not one of "${r.claims.aud.join(", ")}"`);if(r.claims.aud.length>1){if(!r.claims.azp)throw new Error("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values");if(r.claims.azp!==e.aud)throw new Error(`Authorized Party (azp) claim mismatch in the ID token; expected "${e.aud}", found "${r.claims.azp}"`)}}else if(r.claims.aud!==e.aud)throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${e.aud}" but found "${r.claims.aud}"`);if(e.nonce){if(!r.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(r.claims.nonce!==e.nonce)throw new Error(`Nonce (nonce) claim mismatch in the ID token; expected "${e.nonce}", found "${r.claims.nonce}"`)}if(e.max_age&&!wt(r.claims.auth_time))throw new Error("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified");if(r.claims.exp==null||!wt(r.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!wt(r.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");const t=e.leeway||60,n=new Date(e.now||Date.now()),a=new Date(0);if(a.setUTCSeconds(r.claims.exp+t),n>a)throw new Error(`Expiration Time (exp) claim error in the ID token; current time (${n}) is after expiration time (${a})`);if(r.claims.nbf!=null&&wt(r.claims.nbf)){const i=new Date(0);if(i.setUTCSeconds(r.claims.nbf-t),n<i)throw new Error(`Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Current time (${n}) is before ${i}`)}if(r.claims.auth_time!=null&&wt(r.claims.auth_time)){const i=new Date(0);if(i.setUTCSeconds(parseInt(r.claims.auth_time)+e.max_age+t),n>i)throw new Error(`Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time (${n}) is after last auth at ${i}`)}if(e.organization){const i=e.organization.trim();if(i.startsWith("org_")){const o=i;if(!r.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(o!==r.claims.org_id)throw new Error(`Organization ID (org_id) claim mismatch in the ID token; expected "${o}", found "${r.claims.org_id}"`)}else{const o=i.toLowerCase();if(!r.claims.org_name)throw new Error("Organization Name (org_name) claim must be a string present in the ID token");if(o!==r.claims.org_name)throw new Error(`Organization Name (org_name) claim mismatch in the ID token; expected "${o}", found "${r.claims.org_name}"`)}}return r};var xr=fs(function(e,r){var t=Ur&&Ur.__assign||function(){return t=Object.assign||function(c){for(var l,u=1,f=arguments.length;u<f;u++)for(var h in l=arguments[u])Object.prototype.hasOwnProperty.call(l,h)&&(c[h]=l[h]);return c},t.apply(this,arguments)};function n(c,l){if(!l)return"";var u="; "+c;return l===!0?u:u+"="+l}function a(c,l,u){return encodeURIComponent(c).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(l).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(f){if(typeof f.expires=="number"){var h=new Date;h.setMilliseconds(h.getMilliseconds()+864e5*f.expires),f.expires=h}return n("Expires",f.expires?f.expires.toUTCString():"")+n("Domain",f.domain)+n("Path",f.path)+n("Secure",f.secure)+n("SameSite",f.sameSite)}(u)}function i(c){for(var l={},u=c?c.split("; "):[],f=/(%[\dA-F]{2})+/gi,h=0;h<u.length;h++){var d=u[h].split("="),v=d.slice(1).join("=");v.charAt(0)==='"'&&(v=v.slice(1,-1));try{l[d[0].replace(f,decodeURIComponent)]=v.replace(f,decodeURIComponent)}catch{}}return l}function o(){return i(document.cookie)}function s(c,l,u){document.cookie=a(c,l,t({path:"/"},u))}r.__esModule=!0,r.encode=a,r.parse=i,r.getAll=o,r.get=function(c){return o()[c]},r.set=s,r.remove=function(c,l){s(c,"",t(t({},l),{expires:-1}))}});ls(xr),xr.encode,xr.parse,xr.getAll;var am=xr.get,Th=xr.set,Oh=xr.remove;const Yr={get(e){const r=am(e);if(r!==void 0)return JSON.parse(r)},save(e,r,t){let n={};window.location.protocol==="https:"&&(n={secure:!0,sameSite:"none"}),t?.daysUntilExpire&&(n.expires=t.daysUntilExpire),t?.cookieDomain&&(n.domain=t.cookieDomain),Th(e,JSON.stringify(r),n)},remove(e,r){let t={};r?.cookieDomain&&(t.domain=r.cookieDomain),Oh(e,t)}},im={get(e){return Yr.get(e)||Yr.get(`_legacy_${e}`)},save(e,r,t){let n={};window.location.protocol==="https:"&&(n={secure:!0}),t?.daysUntilExpire&&(n.expires=t.daysUntilExpire),t?.cookieDomain&&(n.domain=t.cookieDomain),Th(`_legacy_${e}`,JSON.stringify(r),n),Yr.save(e,r,t)},remove(e,r){let t={};r?.cookieDomain&&(t.domain=r.cookieDomain),Oh(e,t),Yr.remove(e,r),Yr.remove(`_legacy_${e}`,r)}},om={get(e){if(typeof sessionStorage>"u")return;const r=sessionStorage.getItem(e);return r!=null?JSON.parse(r):void 0},save(e,r){sessionStorage.setItem(e,JSON.stringify(r))},remove(e){sessionStorage.removeItem(e)}};function sm(e,r,t){var n=r===void 0?null:r,a=function(c,l){var u=atob(c);if(l){for(var f=new Uint8Array(u.length),h=0,d=u.length;h<d;++h)f[h]=u.charCodeAt(h);return String.fromCharCode.apply(null,new Uint16Array(f.buffer))}return u}(e,t!==void 0&&t),i=a.indexOf(`
|
|
2
|
+
`,10)+1,o=a.substring(i)+(n?"//# sourceMappingURL="+n:""),s=new Blob([o],{type:"application/javascript"});return URL.createObjectURL(s)}var Of,kf,Cf,So,um=(Of="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+YCR7ZX18JHt0fWA7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jKHtkYXRhOnt0aW1lb3V0OmUsYXV0aDpyLGZldGNoVXJsOmksZmV0Y2hPcHRpb25zOmMsdXNlRm9ybURhdGE6YX0scG9ydHM6W3BdfSk9PntsZXQgZjtjb25zdHthdWRpZW5jZTp1LHNjb3BlOmx9PXJ8fHt9O3RyeXtjb25zdCByPWE/KGU9Pntjb25zdCB0PW5ldyBVUkxTZWFyY2hQYXJhbXMoZSkscj17fTtyZXR1cm4gdC5mb3JFYWNoKCgoZSx0KT0+e3JbdF09ZX0pKSxyfSkoYy5ib2R5KTpKU09OLnBhcnNlKGMuYm9keSk7aWYoIXIucmVmcmVzaF90b2tlbiYmInJlZnJlc2hfdG9rZW4iPT09ci5ncmFudF90eXBlKXtjb25zdCBlPSgoZSx0KT0+b1tuKGUsdCldKSh1LGwpO2lmKCFlKXRocm93IG5ldyB0KHUsbCk7Yy5ib2R5PWE/cyhPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKTpKU09OLnN0cmluZ2lmeShPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKX1sZXQgaCxnOyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihoPW5ldyBBYm9ydENvbnRyb2xsZXIsYy5zaWduYWw9aC5zaWduYWwpO3RyeXtnPWF3YWl0IFByb21pc2UucmFjZShbKGQ9ZSxuZXcgUHJvbWlzZSgoZT0+c2V0VGltZW91dChlLGQpKSkpLGZldGNoKGksT2JqZWN0LmFzc2lnbih7fSxjKSldKX1jYXRjaChlKXtyZXR1cm4gdm9pZCBwLnBvc3RNZXNzYWdlKHtlcnJvcjplLm1lc3NhZ2V9KX1pZighZylyZXR1cm4gaCYmaC5hYm9ydCgpLHZvaWQgcC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KTtmPWF3YWl0IGcuanNvbigpLGYucmVmcmVzaF90b2tlbj8oKChlLHQscik9PntvW24odCxyKV09ZX0pKGYucmVmcmVzaF90b2tlbix1LGwpLGRlbGV0ZSBmLnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBvW24oZSx0KV19KSh1LGwpLHAucG9zdE1lc3NhZ2Uoe29rOmcub2ssanNvbjpmfSl9Y2F0Y2goZSl7cC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ZS5lcnJvcixlcnJvcl9kZXNjcmlwdGlvbjplLm1lc3NhZ2V9fSl9dmFyIGR9KSl9KCk7Cgo=",kf=null,Cf=!1,function(e){return So=So||sm(Of,kf,Cf),new Worker(So,e)});const Io={};let cm=class{constructor(r,t){this.cache=r,this.clientId=t,this.manifestKey=this.createManifestKeyFrom(this.clientId)}async add(r){var t;const n=new Set(((t=await this.cache.get(this.manifestKey))===null||t===void 0?void 0:t.keys)||[]);n.add(r),await this.cache.set(this.manifestKey,{keys:[...n]})}async remove(r){const t=await this.cache.get(this.manifestKey);if(t){const n=new Set(t.keys);return n.delete(r),n.size>0?await this.cache.set(this.manifestKey,{keys:[...n]}):await this.cache.remove(this.manifestKey)}}get(){return this.cache.get(this.manifestKey)}clear(){return this.cache.remove(this.manifestKey)}createManifestKeyFrom(r){return`@@auth0spajs@@::${r}`}};const lm={memory:()=>new _h().enclosedCache,localstorage:()=>new Qp},Af=e=>lm[e],jf=e=>{const{openUrl:r,onRedirect:t}=e,n=pr(e,["openUrl","onRedirect"]);return Object.assign(Object.assign({},n),{openUrl:r===!1||r?r:t})},Po=new Bp;let fm=class{constructor(r){let t,n;if(this.userCache=new _h().enclosedCache,this.defaultOptions={authorizationParams:{scope:"openid profile email"},useRefreshTokensFallback:!1,useFormData:!0},this._releaseLockOnPageHide=async()=>{await Po.releaseLock("auth0.lock.getTokenSilently"),window.removeEventListener("pagehide",this._releaseLockOnPageHide)},this.options=Object.assign(Object.assign(Object.assign({},this.defaultOptions),r),{authorizationParams:Object.assign(Object.assign({},this.defaultOptions.authorizationParams),r.authorizationParams)}),typeof window<"u"&&(()=>{if(!Vt())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(Vt().subtle===void 0)throw new Error(`
|
|
3
3
|
auth0-spa-js must run on a secure origin. See https://github.com/auth0/auth0-spa-js/blob/main/FAQ.md#why-do-i-get-auth0-spa-js-must-run-on-a-secure-origin for more information.
|
|
4
|
-
`)})(),r.cache&&r.cacheLocation&&console.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`."),r.cache)n=r.cache;else{if(t=r.cacheLocation||"memory",!Of(t))throw new Error(`Invalid cache location "${t}"`);n=Of(t)()}this.httpTimeoutMs=r.httpTimeoutInSeconds?1e3*r.httpTimeoutInSeconds:1e4,this.cookieStorage=r.legacySameSiteCookie===!1?Jr:em,this.orgHintCookieName=`auth0.${this.options.clientId}.organization_hint`,this.isAuthenticatedCookieName=(o=>`auth0.${o}.is.authenticated`)(this.options.clientId),this.sessionCheckExpiryDays=r.sessionCheckExpiryDays||1;const a=r.useCookiesForTransactions?this.cookieStorage:rm;var i;this.scope=qt("openid",this.options.authorizationParams.scope,this.options.useRefreshTokens?"offline_access":""),this.transactionManager=new Zp(a,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||hh,this.cacheManager=new Jp(n,n.allKeys?void 0:new am(n,this.options.clientId),this.nowProvider),this.domainUrl=(i=this.options.domain,/^https?:\/\//.test(i)?i:`https://${i}`),this.tokenIssuer=((o,s)=>o?o.startsWith("https://")?o:`https://${o}/`:`${s}/`)(this.options.issuer,this.domainUrl),typeof window<"u"&&window.Worker&&this.options.useRefreshTokens&&t==="memory"&&(this.options.workerUrl?this.worker=new Worker(this.options.workerUrl):this.worker=new nm)}_url(r){const t=encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client||dh)));return`${this.domainUrl}${r}&auth0Client=${t}`}_authorizeUrl(r){return this._url(`/authorize?${Co(r)}`)}async _verifyIdToken(r,t,n){const a=await this.nowProvider();return Xp({iss:this.tokenIssuer,aud:this.options.clientId,id_token:r,nonce:t,organization:n,leeway:this.options.leeway,max_age:(i=this.options.authorizationParams.max_age,typeof i!="string"?i:parseInt(i,10)||void 0),now:a});var i}_processOrgHint(r){r?this.cookieStorage.save(this.orgHintCookieName,r,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain})}async _prepareAuthorizeUrl(r,t,n){const a=Pf(go()),i=Pf(go()),o=go(),s=(u=>{const f=new Uint8Array(u);return(h=>{const d={"+":"-","/":"_","=":""};return h.replace(/[+/=]/g,v=>d[v])})(window.btoa(String.fromCharCode(...Array.from(f))))})(await(async u=>await Kt().subtle.digest({name:"SHA-256"},new TextEncoder().encode(u)))(o)),c=((u,f,h,d,v,m,w,E)=>Object.assign(Object.assign(Object.assign({client_id:u.clientId},u.authorizationParams),h),{scope:qt(f,h.scope),response_type:"code",response_mode:E||"query",state:d,nonce:v,redirect_uri:w||u.authorizationParams.redirect_uri,code_challenge:m,code_challenge_method:"S256"}))(this.options,this.scope,r,a,i,s,r.redirect_uri||this.options.authorizationParams.redirect_uri||n,t?.response_mode),l=this._authorizeUrl(c);return{nonce:i,code_verifier:o,scope:c.scope,audience:c.audience||"default",redirect_uri:c.redirect_uri,state:a,url:l}}async loginWithPopup(r,t){var n;if(r=r||{},!(t=t||{}).popup&&(t.popup=(s=>{const c=window.screenX+(window.innerWidth-400)/2,l=window.screenY+(window.innerHeight-600)/2;return window.open(s,"auth0:authorize:popup",`left=${c},top=${l},width=400,height=600,resizable,scrollbars=yes,status=1`)})(""),!t.popup))throw new Error("Unable to open a popup for loginWithPopup - window.open returned `null`");const a=await this._prepareAuthorizeUrl(r.authorizationParams||{},{response_mode:"web_message"},window.location.origin);t.popup.location.href=a.url;const i=await(s=>new Promise((c,l)=>{let u;const f=setInterval(()=>{s.popup&&s.popup.closed&&(clearInterval(f),clearTimeout(h),window.removeEventListener("message",u,!1),l(new Fp(s.popup)))},1e3),h=setTimeout(()=>{clearInterval(f),l(new Mp(s.popup)),window.removeEventListener("message",u,!1)},1e3*(s.timeoutInSeconds||60));u=function(d){if(d.data&&d.data.type==="authorization_response"){if(clearTimeout(h),clearInterval(f),window.removeEventListener("message",u,!1),s.popup.close(),d.data.response.error)return l(Ye.fromPayload(d.data.response));c(d.data.response)}},window.addEventListener("message",u)}))(Object.assign(Object.assign({},t),{timeoutInSeconds:t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}));if(a.state!==i.state)throw new Ye("state_mismatch","Invalid state");const o=((n=r.authorizationParams)===null||n===void 0?void 0:n.organization)||this.options.authorizationParams.organization;await this._requestToken({audience:a.audience,scope:a.scope,code_verifier:a.code_verifier,grant_type:"authorization_code",code:i.code,redirect_uri:a.redirect_uri},{nonceIn:a.nonce,organization:o})}async getUser(){var r;const t=await this._getIdTokenFromCache();return(r=t?.decodedToken)===null||r===void 0?void 0:r.user}async getIdTokenClaims(){var r;const t=await this._getIdTokenFromCache();return(r=t?.decodedToken)===null||r===void 0?void 0:r.claims}async loginWithRedirect(r={}){var t;const n=kf(r),{openUrl:a,fragment:i,appState:o}=n,s=pr(n,["openUrl","fragment","appState"]),c=((t=s.authorizationParams)===null||t===void 0?void 0:t.organization)||this.options.authorizationParams.organization,l=await this._prepareAuthorizeUrl(s.authorizationParams||{}),{url:u}=l,f=pr(l,["url"]);this.transactionManager.create(Object.assign(Object.assign(Object.assign({},f),{appState:o}),c&&{organization:c}));const h=i?`${u}#${i}`:u;a?await a(h):window.location.assign(h)}async handleRedirectCallback(r=window.location.href){const t=r.split("?").slice(1);if(t.length===0)throw new Error("There are no query params available for parsing.");const{state:n,code:a,error:i,error_description:o}=(f=>{f.indexOf("#")>-1&&(f=f.substring(0,f.indexOf("#")));const h=new URLSearchParams(f);return{state:h.get("state"),code:h.get("code")||void 0,error:h.get("error")||void 0,error_description:h.get("error_description")||void 0}})(t.join("")),s=this.transactionManager.get();if(!s)throw new Ye("missing_transaction","Invalid state");if(this.transactionManager.remove(),i)throw new $p(i,o||i,n,s.appState);if(!s.code_verifier||s.state&&s.state!==n)throw new Ye("state_mismatch","Invalid state");const c=s.organization,l=s.nonce,u=s.redirect_uri;return await this._requestToken(Object.assign({audience:s.audience,scope:s.scope,code_verifier:s.code_verifier,grant_type:"authorization_code",code:a},u?{redirect_uri:u}:{}),{nonceIn:l,organization:c}),{appState:s.appState}}async checkSession(r){if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get("auth0.is.authenticated"))return;this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove("auth0.is.authenticated")}try{await this.getTokenSilently(r)}catch{}}async getTokenSilently(r={}){var t;const n=Object.assign(Object.assign({cacheMode:"on"},r),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),r.authorizationParams),{scope:qt(this.scope,(t=r.authorizationParams)===null||t===void 0?void 0:t.scope)})}),a=await((i,o)=>{let s=wo[o];return s||(s=i().finally(()=>{delete wo[o],s=null}),wo[o]=s),s})(()=>this._getTokenSilently(n),`${this.options.clientId}::${n.authorizationParams.audience}::${n.authorizationParams.scope}`);return r.detailedResponse?a:a?.access_token}async _getTokenSilently(r){const{cacheMode:t}=r,n=pr(r,["cacheMode"]);if(t!=="off"){const a=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId});if(a)return a}if(t!=="cache-only"){if(!await(async(a,i=3)=>{for(let o=0;o<i;o++)if(await a())return!0;return!1})(()=>bo.acquireLock("auth0.lock.getTokenSilently",5e3),10))throw new ko;try{if(window.addEventListener("pagehide",this._releaseLockOnPageHide),t!=="off"){const l=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId});if(l)return l}const a=this.options.useRefreshTokens?await this._getTokenUsingRefreshToken(n):await this._getTokenFromIFrame(n),{id_token:i,access_token:o,oauthTokenScope:s,expires_in:c}=a;return Object.assign(Object.assign({id_token:i,access_token:o},s?{scope:s}:null),{expires_in:c})}finally{await bo.releaseLock("auth0.lock.getTokenSilently"),window.removeEventListener("pagehide",this._releaseLockOnPageHide)}}}async getTokenWithPopup(r={},t={}){var n;const a=Object.assign(Object.assign({},r),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),r.authorizationParams),{scope:qt(this.scope,(n=r.authorizationParams)===null||n===void 0?void 0:n.scope)})});return t=Object.assign(Object.assign({},Dp),t),await this.loginWithPopup(a,t),(await this.cacheManager.get(new Lr({scope:a.authorizationParams.scope,audience:a.authorizationParams.audience||"default",clientId:this.options.clientId}))).access_token}async isAuthenticated(){return!!await this.getUser()}_buildLogoutUrl(r){r.clientId!==null?r.clientId=r.clientId||this.options.clientId:delete r.clientId;const t=r.logoutParams||{},{federated:n}=t,a=pr(t,["federated"]),i=n?"&federated":"";return this._url(`/v2/logout?${Co(Object.assign({clientId:r.clientId},a))}`)+i}async logout(r={}){const t=kf(r),{openUrl:n}=t,a=pr(t,["openUrl"]);r.clientId===null?await this.cacheManager.clear():await this.cacheManager.clear(r.clientId||this.options.clientId),this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(this.isAuthenticatedCookieName,{cookieDomain:this.options.cookieDomain}),this.userCache.remove("@@user@@");const i=this._buildLogoutUrl(a);n?await n(i):n!==!1&&window.location.assign(i)}async _getTokenFromIFrame(r){const t=Object.assign(Object.assign({},r.authorizationParams),{prompt:"none"}),n=this.cookieStorage.get(this.orgHintCookieName);n&&!t.organization&&(t.organization=n);const{url:a,state:i,nonce:o,code_verifier:s,redirect_uri:c,scope:l,audience:u}=await this._prepareAuthorizeUrl(t,{response_mode:"web_message"},window.location.origin);try{if(window.crossOriginIsolated)throw new Ye("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");const f=r.timeoutInSeconds||this.options.authorizeTimeoutInSeconds,h=await((v,m,w=60)=>new Promise((E,b)=>{const g=window.document.createElement("iframe");g.setAttribute("width","0"),g.setAttribute("height","0"),g.style.display="none";const p=()=>{window.document.body.contains(g)&&(window.document.body.removeChild(g),window.removeEventListener("message",y,!1))};let y;const k=setTimeout(()=>{b(new ko),p()},1e3*w);y=function(A){if(A.origin!=m||!A.data||A.data.type!=="authorization_response")return;const j=A.source;j&&j.close(),A.data.response.error?b(Ye.fromPayload(A.data.response)):E(A.data.response),clearTimeout(k),window.removeEventListener("message",y,!1),setTimeout(p,2e3)},window.addEventListener("message",y,!1),window.document.body.appendChild(g),g.setAttribute("src",v)}))(a,this.domainUrl,f);if(i!==h.state)throw new Ye("state_mismatch","Invalid state");const d=await this._requestToken(Object.assign(Object.assign({},r.authorizationParams),{code_verifier:s,code:h.code,grant_type:"authorization_code",redirect_uri:c,timeout:r.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:o,organization:t.organization});return Object.assign(Object.assign({},d),{scope:l,oauthTokenScope:d.scope,audience:u})}catch(f){throw f.error==="login_required"&&this.logout({openUrl:!1}),f}}async _getTokenUsingRefreshToken(r){const t=await this.cacheManager.get(new Lr({scope:r.authorizationParams.scope,audience:r.authorizationParams.audience||"default",clientId:this.options.clientId}));if(!(t&&t.refresh_token||this.worker)){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(r);throw new wh(r.authorizationParams.audience||"default",r.authorizationParams.scope)}const n=r.authorizationParams.redirect_uri||this.options.authorizationParams.redirect_uri||window.location.origin,a=typeof r.timeoutInSeconds=="number"?1e3*r.timeoutInSeconds:null;try{const i=await this._requestToken(Object.assign(Object.assign(Object.assign({},r.authorizationParams),{grant_type:"refresh_token",refresh_token:t&&t.refresh_token,redirect_uri:n}),a&&{timeout:a}));return Object.assign(Object.assign({},i),{scope:r.authorizationParams.scope,oauthTokenScope:i.scope,audience:r.authorizationParams.audience||"default"})}catch(i){if((i.message.indexOf("Missing Refresh Token")>-1||i.message&&i.message.indexOf("invalid refresh token")>-1)&&this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(r);throw i}}async _saveEntryInCache(r){const{id_token:t,decodedToken:n}=r,a=pr(r,["id_token","decodedToken"]);this.userCache.set("@@user@@",{id_token:t,decodedToken:n}),await this.cacheManager.setIdToken(this.options.clientId,r.id_token,r.decodedToken),await this.cacheManager.set(a)}async _getIdTokenFromCache(){const r=this.options.authorizationParams.audience||"default",t=await this.cacheManager.getIdToken(new Lr({clientId:this.options.clientId,audience:r,scope:this.scope})),n=this.userCache.get("@@user@@");return t&&t.id_token===n?.id_token?n:(this.userCache.set("@@user@@",t),t)}async _getEntryFromCache({scope:r,audience:t,clientId:n}){const a=await this.cacheManager.get(new Lr({scope:r,audience:t,clientId:n}),60);if(a&&a.access_token){const{access_token:i,oauthTokenScope:o,expires_in:s}=a,c=await this._getIdTokenFromCache();return c&&Object.assign(Object.assign({id_token:c.id_token,access_token:i},o?{scope:o}:null),{expires_in:s})}}async _requestToken(r,t){const{nonceIn:n,organization:a}=t||{},i=await Wp(Object.assign({baseUrl:this.domainUrl,client_id:this.options.clientId,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs},r),this.worker),o=await this._verifyIdToken(i.id_token,n,a);return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({},i),{decodedToken:o,scope:r.scope,audience:r.audience||"default"}),i.scope?{oauthTokenScope:i.scope}:null),{client_id:this.options.clientId})),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgHint(a||o.claims.org_id),Object.assign(Object.assign({},i),{decodedToken:o})}};async function sm(e){const r=new om(e);return await r.checkSession(),r}var We=(e=>(e.AUTH_INITIALIZED="sesamyJsAuthInitialized",e.READY="sesamyJsReady",e.AUTHENTICATED="sesamyJsAuthenticated",e.LOGOUT="sesamyJsLogout",e.CLEAR_CACHE="sesamyJsClearCache",e.USER_ATTRIBUTE_CHANGED="sesamyUserAttributeChanged",e.PURCHASE="sesamyJsPurchase",e))(We||{});const um="sesamy.com",cm="sesamy.dev",lm="https://sesa.my",jo="sesamyCacheTimestamp",Cf="sesamyContentReloaded";function Eh(e,r){return`${e}.${r==="dev"?cm:um}`}function vr(e,r){return`https://${Eh(e,r)}`}function Xt(){return(document.documentElement.getAttribute("lang")??navigator.language??"en").split("-")[0]?.toLocaleLowerCase()}/*!
|
|
4
|
+
`)})(),r.cache&&r.cacheLocation&&console.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`."),r.cache)n=r.cache;else{if(t=r.cacheLocation||"memory",!Af(t))throw new Error(`Invalid cache location "${t}"`);n=Af(t)()}this.httpTimeoutMs=r.httpTimeoutInSeconds?1e3*r.httpTimeoutInSeconds:1e4,this.cookieStorage=r.legacySameSiteCookie===!1?Yr:im,this.orgHintCookieName=`auth0.${this.options.clientId}.organization_hint`,this.isAuthenticatedCookieName=(o=>`auth0.${o}.is.authenticated`)(this.options.clientId),this.sessionCheckExpiryDays=r.sessionCheckExpiryDays||1;const a=r.useCookiesForTransactions?this.cookieStorage:om;var i;this.scope=Nt("openid",this.options.authorizationParams.scope,this.options.useRefreshTokens?"offline_access":""),this.transactionManager=new rm(a,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||yh,this.cacheManager=new em(n,n.allKeys?void 0:new cm(n,this.options.clientId),this.nowProvider),this.domainUrl=(i=this.options.domain,/^https?:\/\//.test(i)?i:`https://${i}`),this.tokenIssuer=((o,s)=>o?o.startsWith("https://")?o:`https://${o}/`:`${s}/`)(this.options.issuer,this.domainUrl),typeof window<"u"&&window.Worker&&this.options.useRefreshTokens&&t==="memory"&&(this.options.workerUrl?this.worker=new Worker(this.options.workerUrl):this.worker=new um)}_url(r){const t=encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client||gh)));return`${this.domainUrl}${r}&auth0Client=${t}`}_authorizeUrl(r){return this._url(`/authorize?${Uo(r)}`)}async _verifyIdToken(r,t,n){const a=await this.nowProvider();return nm({iss:this.tokenIssuer,aud:this.options.clientId,id_token:r,nonce:t,organization:n,leeway:this.options.leeway,max_age:(i=this.options.authorizationParams.max_age,typeof i!="string"?i:parseInt(i,10)||void 0),now:a});var i}_processOrgHint(r){r?this.cookieStorage.save(this.orgHintCookieName,r,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain})}async _prepareAuthorizeUrl(r,t,n){const a=_f(bo()),i=_f(bo()),o=bo(),s=(u=>{const f=new Uint8Array(u);return(h=>{const d={"+":"-","/":"_","=":""};return h.replace(/[+/=]/g,v=>d[v])})(window.btoa(String.fromCharCode(...Array.from(f))))})(await(async u=>await Vt().subtle.digest({name:"SHA-256"},new TextEncoder().encode(u)))(o)),c=((u,f,h,d,v,m,w,E)=>Object.assign(Object.assign(Object.assign({client_id:u.clientId},u.authorizationParams),h),{scope:Nt(f,h.scope),response_type:"code",response_mode:E||"query",state:d,nonce:v,redirect_uri:w||u.authorizationParams.redirect_uri,code_challenge:m,code_challenge_method:"S256"}))(this.options,this.scope,r,a,i,s,r.redirect_uri||this.options.authorizationParams.redirect_uri||n,t?.response_mode),l=this._authorizeUrl(c);return{nonce:i,code_verifier:o,scope:c.scope,audience:c.audience||"default",redirect_uri:c.redirect_uri,state:a,url:l}}async loginWithPopup(r,t){var n;if(r=r||{},!(t=t||{}).popup&&(t.popup=(s=>{const c=window.screenX+(window.innerWidth-400)/2,l=window.screenY+(window.innerHeight-600)/2;return window.open(s,"auth0:authorize:popup",`left=${c},top=${l},width=400,height=600,resizable,scrollbars=yes,status=1`)})(""),!t.popup))throw new Error("Unable to open a popup for loginWithPopup - window.open returned `null`");const a=await this._prepareAuthorizeUrl(r.authorizationParams||{},{response_mode:"web_message"},window.location.origin);t.popup.location.href=a.url;const i=await(s=>new Promise((c,l)=>{let u;const f=setInterval(()=>{s.popup&&s.popup.closed&&(clearInterval(f),clearTimeout(h),window.removeEventListener("message",u,!1),l(new Gp(s.popup)))},1e3),h=setTimeout(()=>{clearInterval(f),l(new Kp(s.popup)),window.removeEventListener("message",u,!1)},1e3*(s.timeoutInSeconds||60));u=function(d){if(d.data&&d.data.type==="authorization_response"){if(clearTimeout(h),clearInterval(f),window.removeEventListener("message",u,!1),s.popup.close(),d.data.response.error)return l(Ye.fromPayload(d.data.response));c(d.data.response)}},window.addEventListener("message",u)}))(Object.assign(Object.assign({},t),{timeoutInSeconds:t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}));if(a.state!==i.state)throw new Ye("state_mismatch","Invalid state");const o=((n=r.authorizationParams)===null||n===void 0?void 0:n.organization)||this.options.authorizationParams.organization;await this._requestToken({audience:a.audience,scope:a.scope,code_verifier:a.code_verifier,grant_type:"authorization_code",code:i.code,redirect_uri:a.redirect_uri},{nonceIn:a.nonce,organization:o})}async getUser(){var r;const t=await this._getIdTokenFromCache();return(r=t?.decodedToken)===null||r===void 0?void 0:r.user}async getIdTokenClaims(){var r;const t=await this._getIdTokenFromCache();return(r=t?.decodedToken)===null||r===void 0?void 0:r.claims}async loginWithRedirect(r={}){var t;const n=jf(r),{openUrl:a,fragment:i,appState:o}=n,s=pr(n,["openUrl","fragment","appState"]),c=((t=s.authorizationParams)===null||t===void 0?void 0:t.organization)||this.options.authorizationParams.organization,l=await this._prepareAuthorizeUrl(s.authorizationParams||{}),{url:u}=l,f=pr(l,["url"]);this.transactionManager.create(Object.assign(Object.assign(Object.assign({},f),{appState:o}),c&&{organization:c}));const h=i?`${u}#${i}`:u;a?await a(h):window.location.assign(h)}async handleRedirectCallback(r=window.location.href){const t=r.split("?").slice(1);if(t.length===0)throw new Error("There are no query params available for parsing.");const{state:n,code:a,error:i,error_description:o}=(f=>{f.indexOf("#")>-1&&(f=f.substring(0,f.indexOf("#")));const h=new URLSearchParams(f);return{state:h.get("state"),code:h.get("code")||void 0,error:h.get("error")||void 0,error_description:h.get("error_description")||void 0}})(t.join("")),s=this.transactionManager.get();if(!s)throw new Ye("missing_transaction","Invalid state");if(this.transactionManager.remove(),i)throw new Hp(i,o||i,n,s.appState);if(!s.code_verifier||s.state&&s.state!==n)throw new Ye("state_mismatch","Invalid state");const c=s.organization,l=s.nonce,u=s.redirect_uri;return await this._requestToken(Object.assign({audience:s.audience,scope:s.scope,code_verifier:s.code_verifier,grant_type:"authorization_code",code:a},u?{redirect_uri:u}:{}),{nonceIn:l,organization:c}),{appState:s.appState}}async checkSession(r){if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get("auth0.is.authenticated"))return;this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove("auth0.is.authenticated")}try{await this.getTokenSilently(r)}catch{}}async getTokenSilently(r={}){var t;const n=Object.assign(Object.assign({cacheMode:"on"},r),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),r.authorizationParams),{scope:Nt(this.scope,(t=r.authorizationParams)===null||t===void 0?void 0:t.scope)})}),a=await((i,o)=>{let s=Io[o];return s||(s=i().finally(()=>{delete Io[o],s=null}),Io[o]=s),s})(()=>this._getTokenSilently(n),`${this.options.clientId}::${n.authorizationParams.audience}::${n.authorizationParams.scope}`);return r.detailedResponse?a:a?.access_token}async _getTokenSilently(r){const{cacheMode:t}=r,n=pr(r,["cacheMode"]);if(t!=="off"){const a=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId});if(a)return a}if(t!=="cache-only"){if(!await(async(a,i=3)=>{for(let o=0;o<i;o++)if(await a())return!0;return!1})(()=>Po.acquireLock("auth0.lock.getTokenSilently",5e3),10))throw new jo;try{if(window.addEventListener("pagehide",this._releaseLockOnPageHide),t!=="off"){const l=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId});if(l)return l}const a=this.options.useRefreshTokens?await this._getTokenUsingRefreshToken(n):await this._getTokenFromIFrame(n),{id_token:i,access_token:o,oauthTokenScope:s,expires_in:c}=a;return Object.assign(Object.assign({id_token:i,access_token:o},s?{scope:s}:null),{expires_in:c})}finally{await Po.releaseLock("auth0.lock.getTokenSilently"),window.removeEventListener("pagehide",this._releaseLockOnPageHide)}}}async getTokenWithPopup(r={},t={}){var n;const a=Object.assign(Object.assign({},r),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),r.authorizationParams),{scope:Nt(this.scope,(n=r.authorizationParams)===null||n===void 0?void 0:n.scope)})});return t=Object.assign(Object.assign({},zp),t),await this.loginWithPopup(a,t),(await this.cacheManager.get(new qr({scope:a.authorizationParams.scope,audience:a.authorizationParams.audience||"default",clientId:this.options.clientId}))).access_token}async isAuthenticated(){return!!await this.getUser()}_buildLogoutUrl(r){r.clientId!==null?r.clientId=r.clientId||this.options.clientId:delete r.clientId;const t=r.logoutParams||{},{federated:n}=t,a=pr(t,["federated"]),i=n?"&federated":"";return this._url(`/v2/logout?${Uo(Object.assign({clientId:r.clientId},a))}`)+i}async logout(r={}){const t=jf(r),{openUrl:n}=t,a=pr(t,["openUrl"]);r.clientId===null?await this.cacheManager.clear():await this.cacheManager.clear(r.clientId||this.options.clientId),this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(this.isAuthenticatedCookieName,{cookieDomain:this.options.cookieDomain}),this.userCache.remove("@@user@@");const i=this._buildLogoutUrl(a);n?await n(i):n!==!1&&window.location.assign(i)}async _getTokenFromIFrame(r){const t=Object.assign(Object.assign({},r.authorizationParams),{prompt:"none"}),n=this.cookieStorage.get(this.orgHintCookieName);n&&!t.organization&&(t.organization=n);const{url:a,state:i,nonce:o,code_verifier:s,redirect_uri:c,scope:l,audience:u}=await this._prepareAuthorizeUrl(t,{response_mode:"web_message"},window.location.origin);try{if(window.crossOriginIsolated)throw new Ye("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");const f=r.timeoutInSeconds||this.options.authorizeTimeoutInSeconds,h=await((v,m,w=60)=>new Promise((E,b)=>{const g=window.document.createElement("iframe");g.setAttribute("width","0"),g.setAttribute("height","0"),g.style.display="none";const p=()=>{window.document.body.contains(g)&&(window.document.body.removeChild(g),window.removeEventListener("message",y,!1))};let y;const k=setTimeout(()=>{b(new jo),p()},1e3*w);y=function(A){if(A.origin!=m||!A.data||A.data.type!=="authorization_response")return;const j=A.source;j&&j.close(),A.data.response.error?b(Ye.fromPayload(A.data.response)):E(A.data.response),clearTimeout(k),window.removeEventListener("message",y,!1),setTimeout(p,2e3)},window.addEventListener("message",y,!1),window.document.body.appendChild(g),g.setAttribute("src",v)}))(a,this.domainUrl,f);if(i!==h.state)throw new Ye("state_mismatch","Invalid state");const d=await this._requestToken(Object.assign(Object.assign({},r.authorizationParams),{code_verifier:s,code:h.code,grant_type:"authorization_code",redirect_uri:c,timeout:r.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:o,organization:t.organization});return Object.assign(Object.assign({},d),{scope:l,oauthTokenScope:d.scope,audience:u})}catch(f){throw f.error==="login_required"&&this.logout({openUrl:!1}),f}}async _getTokenUsingRefreshToken(r){const t=await this.cacheManager.get(new qr({scope:r.authorizationParams.scope,audience:r.authorizationParams.audience||"default",clientId:this.options.clientId}));if(!(t&&t.refresh_token||this.worker)){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(r);throw new Eh(r.authorizationParams.audience||"default",r.authorizationParams.scope)}const n=r.authorizationParams.redirect_uri||this.options.authorizationParams.redirect_uri||window.location.origin,a=typeof r.timeoutInSeconds=="number"?1e3*r.timeoutInSeconds:null;try{const i=await this._requestToken(Object.assign(Object.assign(Object.assign({},r.authorizationParams),{grant_type:"refresh_token",refresh_token:t&&t.refresh_token,redirect_uri:n}),a&&{timeout:a}));return Object.assign(Object.assign({},i),{scope:r.authorizationParams.scope,oauthTokenScope:i.scope,audience:r.authorizationParams.audience||"default"})}catch(i){if((i.message.indexOf("Missing Refresh Token")>-1||i.message&&i.message.indexOf("invalid refresh token")>-1)&&this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(r);throw i}}async _saveEntryInCache(r){const{id_token:t,decodedToken:n}=r,a=pr(r,["id_token","decodedToken"]);this.userCache.set("@@user@@",{id_token:t,decodedToken:n}),await this.cacheManager.setIdToken(this.options.clientId,r.id_token,r.decodedToken),await this.cacheManager.set(a)}async _getIdTokenFromCache(){const r=this.options.authorizationParams.audience||"default",t=await this.cacheManager.getIdToken(new qr({clientId:this.options.clientId,audience:r,scope:this.scope})),n=this.userCache.get("@@user@@");return t&&t.id_token===n?.id_token?n:(this.userCache.set("@@user@@",t),t)}async _getEntryFromCache({scope:r,audience:t,clientId:n}){const a=await this.cacheManager.get(new qr({scope:r,audience:t,clientId:n}),60);if(a&&a.access_token){const{access_token:i,oauthTokenScope:o,expires_in:s}=a,c=await this._getIdTokenFromCache();return c&&Object.assign(Object.assign({id_token:c.id_token,access_token:i},o?{scope:o}:null),{expires_in:s})}}async _requestToken(r,t){const{nonceIn:n,organization:a}=t||{},i=await Xp(Object.assign({baseUrl:this.domainUrl,client_id:this.options.clientId,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs},r),this.worker),o=await this._verifyIdToken(i.id_token,n,a);return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({},i),{decodedToken:o,scope:r.scope,audience:r.audience||"default"}),i.scope?{oauthTokenScope:i.scope}:null),{client_id:this.options.clientId})),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgHint(a||o.claims.org_id),Object.assign(Object.assign({},i),{decodedToken:o})}};async function dm(e){const r=new fm(e);return await r.checkSession(),r}var We=(e=>(e.AUTH_INITIALIZED="sesamyJsAuthInitialized",e.READY="sesamyJsReady",e.AUTHENTICATED="sesamyJsAuthenticated",e.LOGOUT="sesamyJsLogout",e.CLEAR_CACHE="sesamyJsClearCache",e.USER_ATTRIBUTE_CHANGED="sesamyUserAttributeChanged",e.PURCHASE="sesamyJsPurchase",e))(We||{});const hm=typeof process<"u"&&process.env?.VITE_BASE_URL_DOMAIN||void 0,vm=typeof process<"u"&&process.env?.VITE_DEV_BASE_URL_DOMAIN||void 0,pm=typeof process<"u"&&process.env?.VITE_SHORTLINK_URL||void 0,qo="sesamyCacheTimestamp",Uf="sesamyContentReloaded";function kh(e,r){return`${e}.${r==="dev"?vm:hm}`}function vr(e,r){return`https://${kh(e,r)}`}function en(){return(document.documentElement.getAttribute("lang")??navigator.language??"en").split("-")[0]?.toLocaleLowerCase()}/*!
|
|
5
5
|
*
|
|
6
6
|
* detectIncognito v1.5.0
|
|
7
7
|
*
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
*
|
|
32
32
|
* Please keep this comment intact in order to properly abide by the MIT License.
|
|
33
33
|
*
|
|
34
|
-
**/var Uo={d:(e,r)=>{for(var t in r)Uo.o(r,t)&&!Uo.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r)},cs={};Uo.d(cs,{A:()=>fm,k:()=>ls});var xt=function(e,r,t,n){return new(t||(t=Promise))(function(a,i){function o(l){try{c(n.next(l))}catch(u){i(u)}}function s(l){try{c(n.throw(l))}catch(u){i(u)}}function c(l){var u;l.done?a(l.value):(u=l.value,u instanceof t?u:new t(function(f){f(u)})).then(o,s)}c((n=n.apply(e,[])).next())})},Nt=function(e,r){var t,n,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(c){return function(l){return function(u){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(o=0)),o;)try{if(t=1,n&&(a=2&u[0]?n.return:u[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;switch(n=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,n=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!((a=a.length>0&&a[a.length-1])||u[0]!==6&&u[0]!==2)){o=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(u[0]===6&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=r.call(e,o)}catch(f){u=[6,f],n=0}finally{t=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([c,l])}}};function ls(){return xt(this,void 0,Promise,function(){return Nt(this,function(e){switch(e.label){case 0:return[4,new Promise(function(r,t){var n="Unknown",a=!1;function i(h){a||(a=!0,r({isPrivate:h,browserName:n}))}function o(){var h=0,d=parseInt("-1");try{d.toFixed(d)}catch(v){h=v.message.length}return h}function s(){return navigator.msSaveBlob!==void 0&&function(h){try{return h===eval.toString().length}catch{return!1}}(39)}function c(){var h;return xt(this,void 0,void 0,function(){var d,v;return Nt(this,function(m){switch(m.label){case 0:return m.trys.push([0,2,,3]),[4,navigator.storage.getDirectory()];case 1:return m.sent(),i(!1),[3,3];case 2:return d=m.sent(),v=d,d instanceof Error&&(v=(h=d.message)!==null&&h!==void 0?h:d),typeof v!="string"?(i(!1),[2]):(i(!!v.includes("unknown transient reason")),[3,3]);case 3:return[2]}})})}function l(){var h;return xt(this,void 0,Promise,function(){return Nt(this,function(d){switch(d.label){case 0:return((h=navigator.storage)===null||h===void 0?void 0:h.getDirectory)===void 0?[3,2]:[4,c()];case 1:return d.sent(),[3,3];case 2:navigator.maxTouchPoints!==void 0?function(){var v=String(Math.random());try{var m=indexedDB.open(v,1);m.onupgradeneeded=function(w){var E=w.target.result,b=function(g){i(g)};try{E.createObjectStore("t",{autoIncrement:!0}).put(new Blob),b(!1)}catch(g){(g.message||"").includes("are not yet supported")?b(!0):b(!1)}finally{E.close(),indexedDB.deleteDatabase(v)}},m.onerror=function(){return i(!1)}}catch{i(!1)}}():function(){var v=window.openDatabase,m=window.localStorage;try{v(null,null,null,null)}catch{return void i(!0)}try{m.setItem("test","1"),m.removeItem("test")}catch{return void i(!0)}i(!1)}(),d.label=3;case 3:return[2]}})})}function u(){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(h,d){var v;i(Math.round(d/1048576)<2*Math.round(((v=window).performance!==void 0&&v.performance.memory!==void 0&&v.performance.memory.jsHeapSizeLimit!==void 0?performance.memory.jsHeapSizeLimit:1073741824)/1048576))},function(h){t(new Error("detectIncognito somehow failed to query storage quota: "+h.message))})}function f(){self.Promise!==void 0&&self.Promise.allSettled!==void 0?u():(0,window.webkitRequestFileSystem)(0,1,function(){i(!1)},function(){i(!0)})}(function(){return xt(this,void 0,Promise,function(){return Nt(this,function(h){switch(h.label){case 0:return o()!==44?[3,2]:(n="Safari",[4,l()]);case 1:return h.sent(),[3,3];case 2:o()===51?(d=navigator.userAgent,n=d.match(/Chrome/)?navigator.brave!==void 0?"Brave":d.match(/Edg/)?"Edge":d.match(/OPR/)?"Opera":"Chrome":"Chromium",f()):o()===25?(n="Firefox",i(navigator.serviceWorker===void 0)):s()?(n="Internet Explorer",i(window.indexedDB===void 0)):t(new Error("detectIncognito cannot determine the browser")),h.label=3;case 3:return[2]}var d})})})().catch(t)})];case 1:return[2,e.sent()]}})})}typeof window<"u"&&(window.detectIncognito=ls);const fm=ls;cs.A;const dm=cs.k,Wt="sesamy_incognito_mode";function fs(){try{const e=sessionStorage.getItem(Wt);return e===null?void 0:e==="true"}catch{return}}async function hm(){try{const e=sessionStorage.getItem(Wt);if(e!==null)return e==="true";const{isPrivate:r}=await dm();return sessionStorage.setItem(Wt,r.toString()),r}catch{try{sessionStorage.setItem(Wt,"false")}catch{}return!1}}function Et(){return typeof window<"u"}function Af(e,r,t,n,a){for(r=r.split?r.split("."):r,n=0;n<r.length;n++)e=e?e[r[n]]:a;return e===a?t:e}var Dt="undefined",jf="object",Lo=function(){},Rh="any",_h="*",Dr="__",Qt=typeof process<"u"?process:{};Qt.env&&Qt.env.NODE_ENV;var qe=typeof document<"u";Qt.versions!=null&&Qt.versions.node!=null;typeof Deno<"u"&&Deno.core;qe&&window.name==="nodejs"||typeof navigator<"u"&&navigator.userAgent!==void 0&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));function Th(e,r){return r.charAt(0)[e]()+r.slice(1)}var vm=Th.bind(null,"toUpperCase"),pm=Th.bind(null,"toLowerCase");function mm(e){return Oh(e)?vm("null"):typeof e=="object"?bm(e):Object.prototype.toString.call(e).slice(8,-1)}function en(e,r){r===void 0&&(r=!0);var t=mm(e);return r?pm(t):t}function Lt(e,r){return typeof r===e}var Ke=Lt.bind(null,"function"),Or=Lt.bind(null,"string"),Yr=Lt.bind(null,"undefined"),gm=Lt.bind(null,"boolean");Lt.bind(null,"symbol");function Oh(e){return e===null}function ym(e){return en(e)==="number"&&!isNaN(e)}function kh(e){return en(e)==="array"}function Ge(e){if(!wm(e))return!1;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}function wm(e){return e&&(typeof e=="object"||e!==null)}function bm(e){return Ke(e.constructor)?e.constructor.name:null}function Sm(e){return e instanceof Error||Or(e.message)&&e.constructor&&ym(e.constructor.stackTraceLimit)}function Ch(e,r){if(typeof r!="object"||Oh(r))return!1;if(r instanceof e)return!0;var t=en(new e(""));if(Sm(r))for(;r;){if(en(r)===t)return!0;r=Object.getPrototypeOf(r)}return!1}Ch.bind(null,TypeError);Ch.bind(null,SyntaxError);function yn(e,r){var t=e instanceof Element||e instanceof HTMLDocument;return t&&r?Im(e,r):t}function Im(e,r){return r===void 0&&(r=""),e&&e.nodeName===r.toUpperCase()}function wn(e){var r=[].slice.call(arguments,1);return function(){return e.apply(void 0,[].slice.call(arguments).concat(r))}}wn(yn,"form");wn(yn,"button");wn(yn,"input");wn(yn,"select");function Pm(e){return e?kh(e)?e:[e]:[]}function Uf(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function Em(){if(qe){var e=navigator,r=e.languages;return e.userLanguage||(r&&r.length?r[0]:e.language)}}function Rm(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function _m(e){return function(r){for(var t,n=Object.create(null),a=/([^&=]+)=?([^&]*)/g;t=a.exec(r);){var i=Uf(t[1]),o=Uf(t[2]);i.substring(i.length-2)==="[]"?(n[i=i.substring(0,i.length-2)]||(n[i]=[])).push(o):n[i]=o===""||o}for(var s in n){var c=s.split("[");c.length>1&&(Tm(n,c.map(function(l){return l.replace(/[?[\]\\ ]/g,"")}),n[s]),delete n[s])}return n}(function(r){return qe&&window.location.search.substring(1)}())}function Tm(e,r,t){for(var n=r.length-1,a=0;a<n;++a){var i=r[a];if(i==="__proto__"||i==="constructor")break;i in e||(e[i]={}),e=e[i]}e[r[n]]=t}function bn(){for(var e="",r=0,t=4294967295*Math.random()|0;r++<36;){var n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"[r-1],a=15&t;e+=n=="-"||n=="4"?n:(n=="x"?a:3&a|8).toString(16),t=r%8==0?4294967295*Math.random()|0:t>>4}return e}function Om(e,r){var t,n,a,i=null,o=0,s=function(){o=new Date,i=null,a=e.apply(t,n)};return function(){var c=new Date;o||(o=c);var l=r-(c-o);return t=this,n=arguments,l<=0?(clearTimeout(i),i=null,o=c,a=e.apply(t,n)):i||(i=setTimeout(s,l)),a}}var bt="global",nt=Dr+"global"+Dr,at=typeof self===jf&&self.self===self&&self||typeof global===jf&&global.global===global&&global||void 0;function $r(e){return at[nt][e]}function Mr(e,r){return at[nt][e]=r}function ht(e){delete at[nt][e]}function vt(e,r,t){var n;try{if(ds(e)){var a=window[e];n=a[r].bind(a)}}catch{}return n||t}at[nt]||(at[nt]={});var $t={};function ds(e){if(typeof $t[e]!==Dt)return $t[e];try{var r=window[e];r.setItem(Dt,Dt),r.removeItem(Dt)}catch{return $t[e]=!1}return $t[e]=!0}function ne(){return ne=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},ne.apply(this,arguments)}var Tr="function",Sr="undefined",km="@@redux/"+Math.random().toString(36),Lf=function(){return typeof Symbol===Tr&&Symbol.observable||"@@observable"}(),Mt=" != "+Tr;function Ah(e,r,t){var n;if(typeof r===Tr&&typeof t===Sr&&(t=r,r=void 0),typeof t!==Sr){if(typeof t!==Tr)throw new Error("enhancer"+Mt);return t(Ah)(e,r)}if(typeof e!==Tr)throw new Error("reducer"+Mt);var a=e,i=r,o=[],s=o,c=!1;function l(){s===o&&(s=o.slice())}function u(){return i}function f(d){if(typeof d!==Tr)throw new Error("Listener"+Mt);var v=!0;return l(),s.push(d),function(){if(v){v=!1,l();var m=s.indexOf(d);s.splice(m,1)}}}function h(d){if(!Ge(d))throw new Error("Act != obj");if(typeof d.type===Sr)throw new Error("ActType "+Sr);if(c)throw new Error("Dispatch in reducer");try{c=!0,i=a(i,d)}finally{c=!1}for(var v=o=s,m=0;m<v.length;m++)(0,v[m])();return d}return h({type:"@@redux/INIT"}),(n={dispatch:h,subscribe:f,getState:u,replaceReducer:function(d){if(typeof d!==Tr)throw new Error("next reducer"+Mt);a=d,h({type:"@@redux/INIT"})}})[Lf]=function(){var d,v=f;return(d={subscribe:function(m){if(typeof m!="object")throw new TypeError("Observer != obj");function w(){m.next&&m.next(u())}return w(),{unsubscribe:v(w)}}})[Lf]=function(){return this},d},n}function Cm(e,r){var t=r&&r.type;return"action "+(t&&t.toString()||"?")+"reducer "+e+" returns "+Sr}function it(){var e=[].slice.call(arguments);return e.length===0?function(r){return r}:e.length===1?e[0]:e.reduce(function(r,t){return function(){return r(t.apply(void 0,[].slice.call(arguments)))}})}function Am(){var e=arguments;return function(r){return function(t,n,a){var i,o=r(t,n,a),s=o.dispatch,c={getState:o.getState,dispatch:function(l){return s(l)}};return i=[].slice.call(e).map(function(l){return l(c)}),ne({},o,{dispatch:s=it.apply(void 0,i)(o.dispatch)})}}}var kr=Dr+"anon_id",xr=Dr+"user_id",Qr=Dr+"user_traits",_r="userId",Xr="anonymousId",Vt=["bootstrap","params","campaign","initializeStart","initialize","initializeEnd","ready","resetStart","reset","resetEnd","pageStart","page","pageEnd","pageAborted","trackStart","track","trackEnd","trackAborted","identifyStart","identify","identifyEnd","identifyAborted","userIdChanged","registerPlugins","enablePlugin","disablePlugin","online","offline","setItemStart","setItem","setItemEnd","setItemAborted","removeItemStart","removeItem","removeItemEnd","removeItemAborted"],qo=["name","EVENTS","config","loaded"],te=Vt.reduce(function(e,r){return e[r]=r,e},{registerPluginType:function(e){return"registerPlugin:"+e},pluginReadyType:function(e){return"ready:"+e}}),qf=/^utm_/,xf=/^an_prop_/,Nf=/^an_trait_/;function jm(e){var r=e.storage.setItem;return function(t){return function(n){return function(a){if(a.type===te.bootstrap){var i=a.params,o=a.user,s=a.persistedUser,c=a.initialUser,l=s.userId===o.userId;s.anonymousId!==o.anonymousId&&r(kr,o.anonymousId),l||r(xr,o.userId),c.traits&&r(Qr,ne({},l&&s.traits?s.traits:{},c.traits));var u=Object.keys(a.params);if(u.length){var f=i.an_uid,h=i.an_event,d=u.reduce(function(v,m){if(m.match(qf)||m.match(/^(d|g)clid/)){var w=m.replace(qf,"");v.campaign[w==="campaign"?"name":w]=i[m]}return m.match(xf)&&(v.props[m.replace(xf,"")]=i[m]),m.match(Nf)&&(v.traits[m.replace(Nf,"")]=i[m]),v},{campaign:{},props:{},traits:{}});t.dispatch(ne({type:te.params,raw:i},d,f?{userId:f}:{})),f&&setTimeout(function(){return e.identify(f,d.traits)},0),h&&setTimeout(function(){return e.track(h,d.props)},0),Object.keys(d.campaign).length&&t.dispatch({type:te.campaign,campaign:d.campaign})}}return n(a)}}}}function Um(e){return function(r,t){if(r===void 0&&(r={}),t===void 0&&(t={}),t.type===te.setItemEnd){if(t.key===kr)return ne({},r,{anonymousId:t.value});if(t.key===xr)return ne({},r,{userId:t.value})}switch(t.type){case te.identify:return Object.assign({},r,{userId:t.userId,traits:ne({},r.traits,t.traits)});case te.reset:return[xr,kr,Qr].forEach(function(n){e.removeItem(n)}),Object.assign({},r,{userId:null,anonymousId:null,traits:{}});default:return r}}}function Df(e){return{userId:e.getItem(xr),anonymousId:e.getItem(kr),traits:e.getItem(Qr)}}var xo=function(e){return Dr+"TEMP"+Dr+e};function Lm(e){var r=e.storage,t=r.setItem,n=r.removeItem,a=r.getItem;return function(i){return function(o){return function(s){var c=s.userId,l=s.traits,u=s.options;if(s.type===te.reset&&([xr,Qr,kr].forEach(function(d){n(d)}),[_r,Xr,"traits"].forEach(function(d){ht(xo(d))})),s.type===te.identify){a(kr)||t(kr,bn());var f=a(xr),h=a(Qr)||{};f&&f!==c&&i.dispatch({type:te.userIdChanged,old:{userId:f,traits:h},new:{userId:c,traits:l},options:u}),c&&t(xr,c),l&&t(Qr,ne({},h,l))}return o(s)}}}}var wt={};function $f(e,r){wt[e]&&Ke(wt[e])&&(wt[e](r),delete wt[e])}function jh(e,r,t){return new Promise(function(n,a){return r()?n(e):t<1?a(ne({},e,{queue:!0})):new Promise(function(i){return setTimeout(i,10)}).then(function(i){return jh(e,r,t-10).then(n,a)})})}function qm(e){return{abort:e}}function Uh(e,r,t){var n={},a=r(),i=e.getState(),o=i.plugins,s=i.queue,c=i.user;if(!i.context.offline&&s&&s.actions&&s.actions.length){var l=s.actions.reduce(function(f,h,d){return o[h.plugin].loaded?(f.process.push(h),f.processIndex.push(d)):(f.requeue.push(h),f.requeueIndex.push(d)),f},{processIndex:[],process:[],requeue:[],requeueIndex:[]});if(l.processIndex&&l.processIndex.length){l.processIndex.forEach(function(f){var h=s.actions[f],d=h.plugin,v=h.payload.type,m=a[d][v];if(m&&Ke(m)){var w,E=function(p,y){return p===void 0&&(p={}),y===void 0&&(y={}),[_r,Xr].reduce(function(k,A){return p.hasOwnProperty(A)&&y[A]&&y[A]!==p[A]&&(k[A]=y[A]),k},p)}(h.payload,c),b=n[E.meta.rid];if(!b&&(w=m({payload:E,config:o[d].config,instance:t,abort:qm}))&&Ge(w)&&w.abort)return void(n[E.meta.rid]=!0);if(!b){var g=v+":"+d;e.dispatch(ne({},E,{type:g,_:{called:g,from:"queueDrain"}}))}}});var u=s.actions.filter(function(f,h){return!~l.processIndex.indexOf(h)});s.actions=u}}}var So=function(e){var r=e.data,t=e.action,n=e.instance,a=e.state,i=e.allPlugins,o=e.allMatches,s=e.store,c=e.EVENTS;try{var l=a.plugins,u=a.context,f=t.type,h=f.match(et),d=r.exact.map(function(w){return w.pluginName});h&&(d=o.during.map(function(w){return w.pluginName}));var v=function(w,E){return function(b,g,p){var y=g.config,k=g.name,A=k+"."+b.type;p&&(A=p.event);var j=b.type.match(et)?function(z,H,ee,x,N){return function(q,O){var X=x?x.name:z,re=O&&Rt(O)?O:ee;if(x&&(!(re=O&&Rt(O)?O:[z]).includes(z)||re.length!==1))throw new Error("Method "+H+" can only abort "+z+" plugin. "+JSON.stringify(re)+" input valid");return ne({},N,{abort:{reason:q,plugins:re,caller:H,_:X}})}}(k,A,E,p,b):function(z,H){return function(){throw new Error(z.type+" action not cancellable. Remove abort in "+H)}}(b,A);return{payload:xm(b),instance:w,config:y||{},abort:j}}}(n,d),m=r.exact.reduce(function(w,E){var b=E.pluginName,g=E.methodName,p=!1;return g.match(/^initialize/)||g.match(/^reset/)||(p=!l[b].loaded),u.offline&&g.match(/^(page|track|identify)/)&&(p=!0),w[""+b]=p,w},{});return Promise.resolve(r.exact.reduce(function(w,E,b){try{var g=E.pluginName;return Promise.resolve(w).then(function(p){function y(){return Promise.resolve(p)}var k=function(){if(r.namespaced&&r.namespaced[g])return Promise.resolve(r.namespaced[g].reduce(function(A,j,z){try{return Promise.resolve(A).then(function(H){return j.method&&Ke(j.method)?(function(q,O){var X=Kf(q);if(X&&X.name===O){var re=Kf(X.method);throw new Error([O+" plugin is calling method "+q,"Plugins cant call self","Use "+X.method+" "+(re?"or "+re.method:"")+" in "+O+" plugin insteadof "+q].join(`
|
|
35
|
-
`))}}(j.methodName,j.pluginName),Promise.resolve(j.method({payload:H,instance:n,abort:(ee=H,x=g,N=j.pluginName,function(q,O){return ne({},ee,{abort:{reason:q,plugins:O||[x],caller:f,from:N||x}})}),config:Bf(j.pluginName,l,i),plugins:l})).then(function(q){var O=Ge(q)?q:{};return Promise.resolve(ne({},H,O))})):H;var ee,x,N})}catch(H){return Promise.reject(H)}},Promise.resolve(t))).then(function(A){p[g]=A});p[g]=t}();return k&&k.then?k.then(y):y()})}catch(p){return Promise.reject(p)}},Promise.resolve({}))).then(function(w){return Promise.resolve(r.exact.reduce(function(E,b,g){try{var p=r.exact.length===g+1,y=b.pluginName,k=i[y];return Promise.resolve(E).then(function(A){var j=w[y]?w[y]:{};if(h&&(j=A),Po(j,y))return Io({data:j,method:f,instance:n,pluginName:y,store:s}),Promise.resolve(A);if(Po(A,y))return p&&Io({data:A,method:f,instance:n,store:s}),Promise.resolve(A);if(m.hasOwnProperty(y)&&m[y]===!0)return s.dispatch({type:"queue",plugin:y,payload:j,_:{called:"queue",from:"queueMechanism"}}),Promise.resolve(A);var z=v(w[y],i[y]);return Promise.resolve(k[f]({abort:z.abort,payload:j,instance:n,config:Bf(y,l,i),plugins:l})).then(function(H){var ee=Ge(H)?H:{},x=ne({},A,ee),N=w[y];if(Po(N,y))Io({data:N,method:f,instance:n,pluginName:y,store:s});else{var q=f+":"+y;(q.match(/:/g)||[]).length<2&&!f.match(Mf)&&!f.match(Ff)&&n.dispatch(ne({},h?x:j,{type:q,_:{called:q,from:"submethod"}}))}return Promise.resolve(x)})})}catch(A){return Promise.reject(A)}},Promise.resolve(t))).then(function(E){if(!(f.match(et)||f.match(/^registerPlugin/)||f.match(Ff)||f.match(Mf)||f.match(/^params/)||f.match(/^userIdChanged/))){if(c.plugins.includes(f),E._&&E._.originalAction===f)return E;var b=ne({},E,{_:{originalAction:E.type,called:E.type,from:"engineEnd"}});Lh(E,r.exact.length)&&!f.match(/End$/)&&(b=ne({},b,{type:E.type+"Aborted"})),s.dispatch(b)}return E})})}catch(w){return Promise.reject(w)}},et=/Start$/,Mf=/^bootstrap/,Ff=/^ready/;function Io(e){var r=e.pluginName,t=e.method+"Aborted"+(r?":"+r:"");e.store.dispatch(ne({},e.data,{type:t,_:{called:t,from:"abort"}}))}function Bf(e,r,t){var n=r[e]||t[e];return n&&n.config?n.config:{}}function zf(e,r){return r.reduce(function(t,n){return n[e]?t.concat({methodName:e,pluginName:n.name,method:n[e]}):t},[])}function Hf(e,r){var t=e.replace(et,""),n=r?":"+r:"";return[""+e+n,""+t+n,t+"End"+n]}function Po(e,r){var t=e.abort;return!!t&&(t===!0||Gf(t,r)||t&&Gf(t.plugins,r))}function Lh(e,r){var t=e.abort;if(!t)return!1;if(t===!0||Or(t))return!0;var n=t.plugins;return Rt(t)&&t.length===r||Rt(n)&&n.length===r}function Rt(e){return Array.isArray(e)}function Gf(e,r){return!(!e||!Rt(e))&&e.includes(r)}function Kf(e){var r=e.match(/(.*):(.*)/);return!!r&&{method:r[1],name:r[2]}}function xm(e){return Object.keys(e).reduce(function(r,t){return t==="type"||(r[t]=Ge(e[t])?Object.assign({},e[t]):e[t]),r},{})}function Nm(e,r,t){var n={};return function(a){return function(i){return function(o){try{var s,c=function(p){return s?p:i(f)},l=o.type,u=o.plugins,f=o;if(o.abort)return Promise.resolve(i(o));if(l===te.enablePlugin&&a.dispatch({type:te.initializeStart,plugins:u,disabled:[],fromEnable:!0,meta:o.meta}),l===te.disablePlugin&&setTimeout(function(){return $f(o.meta.rid,{payload:o})},0),l===te.initializeEnd){var h=r(),d=Object.keys(h),v=d.filter(function(p){return u.includes(p)}).map(function(p){return h[p]}),m=[],w=[],E=o.disabled,b=v.map(function(p){var y=p.loaded,k=p.name,A=p.config;return jh(p,function(){return y({config:A})},1e4).then(function(j){return n[k]||(a.dispatch({type:te.pluginReadyType(k),name:k,events:Object.keys(p).filter(function(z){return!qo.includes(z)})}),n[k]=!0),m=m.concat(k),p}).catch(function(j){if(j instanceof Error)throw new Error(j);return w=w.concat(j.name),j})});Promise.all(b).then(function(p){var y={plugins:m,failed:w,disabled:E};setTimeout(function(){d.length===b.length+E.length&&a.dispatch(ne({},{type:te.ready},y))},0)})}var g=function(){if(l!==te.bootstrap)return/^ready:([^:]*)$/.test(l)&&setTimeout(function(){return Uh(a,r,e)},0),Promise.resolve(function(p,y,k,A,j){try{var z=Ke(y)?y():y,H=p.type,ee=H.replace(et,"");if(p._&&p._.called)return Promise.resolve(p);var x=k.getState(),N=(X=z,(re=x.plugins)===void 0&&(re={}),(Q=p.options)===void 0&&(Q={}),Object.keys(X).filter(function(S){var _=Q.plugins||{};return gm(_[S])?_[S]:_.all!==!1&&(!re[S]||re[S].enabled!==!1)}).map(function(S){return X[S]}));H===te.initializeStart&&p.fromEnable&&(N=Object.keys(x.plugins).filter(function(S){var _=x.plugins[S];return p.plugins.includes(S)&&!_.initialized}).map(function(S){return z[S]}));var q=N.map(function(S){return S.name}),O=function(S,_,D){var B=Hf(S).map(function(K){return zf(K,_)});return _.reduce(function(K,Z){var de=Z.name,ae=Hf(S,de).map(function(je){return zf(je,_)}),ue=ae[0],se=ae[1],Pe=ae[2];return ue.length&&(K.beforeNS[de]=ue),se.length&&(K.duringNS[de]=se),Pe.length&&(K.afterNS[de]=Pe),K},{before:B[0],beforeNS:{},during:B[1],duringNS:{},after:B[2],afterNS:{}})}(H,N);return Promise.resolve(So({action:p,data:{exact:O.before,namespaced:O.beforeNS},state:x,allPlugins:z,allMatches:O,instance:k,store:A,EVENTS:j})).then(function(S){function _(){var K=function(){if(H.match(et))return Promise.resolve(So({action:ne({},D,{type:ee+"End"}),data:{exact:O.after,namespaced:O.afterNS},state:x,allPlugins:z,allMatches:O,instance:k,store:A,EVENTS:j})).then(function(Z){Z.meta&&Z.meta.hasCallback&&$f(Z.meta.rid,{payload:Z})})}();return K&&K.then?K.then(function(){return S}):S}if(Lh(S,q.length))return S;var D,B=function(){if(H!==ee)return Promise.resolve(So({action:ne({},S,{type:ee}),data:{exact:O.during,namespaced:O.duringNS},state:x,allPlugins:z,allMatches:O,instance:k,store:A,EVENTS:j})).then(function(K){D=K});D=S}();return B&&B.then?B.then(_):_()})}catch(S){return Promise.reject(S)}var X,re,Q}(o,r,e,a,t)).then(function(p){return s=1,i(p)})}();return Promise.resolve(g&&g.then?g.then(c):c(g))}catch(p){return Promise.reject(p)}}}}}function Dm(e){return function(r){return function(t){return function(n){var a=n.type,i=n.key,o=n.value,s=n.options;if(a===te.setItem||a===te.removeItem){if(n.abort)return t(n);a===te.setItem?e.setItem(i,o,s):e.removeItem(i,s)}return t(n)}}}}var $m=function(){var e=this;this.before=[],this.after=[],this.addMiddleware=function(r,t){e[t]=e[t].concat(r)},this.removeMiddleware=function(r,t){var n=e[t].findIndex(function(a){return a===r});n!==-1&&(e[t]=[].concat(e[t].slice(0,n),e[t].slice(n+1)))},this.dynamicMiddlewares=function(r){return function(t){return function(n){return function(a){var i={getState:t.getState,dispatch:function(s){return t.dispatch(s)}},o=e[r].map(function(s){return s(i)});return it.apply(void 0,o)(n)(a)}}}}};function Mm(e){return function(r,t){r===void 0&&(r={});var n={};if(t.type==="initialize:aborted")return r;if(/^registerPlugin:([^:]*)$/.test(t.type)){var a=Wf(t.type,"registerPlugin"),i=e()[a];if(!i||!a)return r;var o=t.enabled,s=i.config;return n[a]={enabled:o,initialized:!!o&&!i.initialize,loaded:!!o&&!!i.loaded({config:s}),config:s},ne({},r,n)}if(/^initialize:([^:]*)$/.test(t.type)){var c=Wf(t.type,te.initialize),l=e()[c];return l&&c?(n[c]=ne({},r[c],{initialized:!0,loaded:!!l.loaded({config:l.config})}),ne({},r,n)):r}if(/^ready:([^:]*)$/.test(t.type))return n[t.name]=ne({},r[t.name],{loaded:!0}),ne({},r,n);switch(t.type){case te.disablePlugin:return ne({},r,Vf(t.plugins,!1,r));case te.enablePlugin:return ne({},r,Vf(t.plugins,!0,r));default:return r}}}function Wf(e,r){return e.substring(r.length+1,e.length)}function Vf(e,r,t){return e.reduce(function(n,a){return n[a]=ne({},t[a],{enabled:r}),n},t)}function qh(e){try{return JSON.parse(JSON.stringify(e))}catch{}return e}var Fm={last:{},history:[]};function Bm(e,r){e===void 0&&(e=Fm);var t=r.options,n=r.meta;if(r.type===te.track){var a=qh(ne({event:r.event,properties:r.properties},Object.keys(t).length&&{options:t},{meta:n}));return ne({},e,{last:a,history:e.history.concat(a)})}return e}var zm={actions:[]};function Hm(e,r){e===void 0&&(e=zm);var t=r.payload;switch(r.type){case"queue":var n;return n=t&&t.type&&t.type===te.identify?[r].concat(e.actions):e.actions.concat(r),ne({},e,{actions:n});case"dequeue":return[];default:return e}}var xh=/#.*$/;function Gm(e){var r=/(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(e);return"/"+(r&&r[3]?r[3].split("?")[0].replace(xh,""):"")}var Nh,Dh,$h,Mh,Km=function(e){if(e===void 0&&(e={}),!qe)return e;var r=document,t=r.title,n=r.referrer,a=window,i=a.location,o=a.innerWidth,s=a.innerHeight,c=i.hash,l=i.search,u=function(h){var d=function(){if(qe){for(var v,m=document.getElementsByTagName("link"),w=0;v=m[w];w++)if(v.getAttribute("rel")==="canonical")return v.getAttribute("href")}}();return d?d.match(/\?/)?d:d+h:window.location.href.replace(xh,"")}(l),f={title:t,url:u,path:Gm(u),hash:c,search:l,width:o,height:s};return n&&n!==""&&(f.referrer=n),ne({},f,e)},Wm={last:{},history:[]};function Vm(e,r){e===void 0&&(e=Wm);var t=r.options;if(r.type===te.page){var n=qh(ne({properties:r.properties,meta:r.meta},Object.keys(t).length&&{options:t}));return ne({},e,{last:n,history:e.history.concat(n)})}return e}Nh=function(){if(!qe)return!1;var e=navigator.appVersion;return~e.indexOf("Win")?"Windows":~e.indexOf("Mac")?"MacOS":~e.indexOf("X11")?"UNIX":~e.indexOf("Linux")?"Linux":"Unknown OS"}(),Dh=qe?document.referrer:null,$h=Em(),Mh=Rm();var Jf={initialized:!1,sessionId:bn(),app:null,version:null,debug:!1,offline:!!qe&&!navigator.onLine,os:{name:Nh},userAgent:qe?navigator.userAgent:"node",library:{name:"analytics",version:"0.12.13"},timezone:Mh,locale:$h,campaign:{},referrer:Dh};function Jm(e,r){e===void 0&&(e=Jf);var t=e.initialized,n=r.campaign;switch(r.type){case te.campaign:return ne({},e,{campaign:n});case te.offline:return ne({},e,{offline:!0});case te.online:return ne({},e,{offline:!1});default:return t?e:ne({},Jf,e,{initialized:!0})}}var Zm=["plugins","reducers","storage"];function Ym(e,r,t){if(qe){var n=window[(t?"add":"remove")+"EventListener"];e.split(" ").forEach(function(a){n(a,r)})}}function Xm(e){var r=Ym.bind(null,"online offline",function(t){return Promise.resolve(!navigator.onLine).then(e)});return r(!0),function(t){return r(!1)}}function Fh(){return Mr("analytics",[]),function(e){return function(r,t,n){var a=e(r,t,n),i=a.dispatch;return Object.assign(a,{dispatch:function(o){return at[nt].analytics.push(o.action||o),i(o)}})}}}function Zf(e){return function(){return it(it.apply(null,arguments),Fh())}}function Eo(e){return e?kh(e)?e:[e]:[]}function Yf(e,r,t){e===void 0&&(e={});var n,a,i=bn();return r&&(wt[i]=(n=r,a=function(o){for(var s,c=o||Array.prototype.slice.call(arguments),l=0;l<c.length;l++)if(Ke(c[l])){s=c[l];break}return s}(t),function(o){a&&a(o),n(o)})),ne({},e,{rid:i,ts:new Date().getTime()},r?{hasCallback:!0}:{})}function Qm(e){e===void 0&&(e={});var r=e.reducers||{},t=e.initialUser||{},n=(e.plugins||[]).reduce(function(S,_){if(Ke(_))return S.middlewares=S.middlewares.concat(_),S;if(_.NAMESPACE&&(_.name=_.NAMESPACE),!_.name)throw new Error("https://lytics.dev/errors/1");_.config||(_.config={});var D=_.EVENTS?Object.keys(_.EVENTS).map(function(Z){return _.EVENTS[Z]}):[];S.pluginEnabled[_.name]=!(_.enabled===!1||_.config.enabled===!1),delete _.enabled,_.methods&&(S.methods[_.name]=Object.keys(_.methods).reduce(function(Z,de){var ae;return Z[de]=(ae=_.methods[de],function(){for(var ue=Array.prototype.slice.call(arguments),se=new Array(ae.length),Pe=0;Pe<ue.length;Pe++)se[Pe]=ue[Pe];return se[se.length]=y,ae.apply({instance:y},se)}),Z},{}),delete _.methods);var B=Object.keys(_).concat(D),K=new Set(S.events.concat(B));if(S.events=Array.from(K),S.pluginsArray=S.pluginsArray.concat(_),S.plugins[_.name])throw new Error(_.name+"AlreadyLoaded");return S.plugins[_.name]=_,S.plugins[_.name].loaded||(S.plugins[_.name].loaded=function(){return!0}),S},{plugins:{},pluginEnabled:{},methods:{},pluginsArray:[],middlewares:[],events:[]}),a=e.storage?e.storage:{getItem:$r,setItem:Mr,removeItem:ht},i=function(S){return function(_,D,B){return D.getState("user")[_]||(B&&Ge(B)&&B[_]?B[_]:Df(S)[_]||$r(xo(_))||null)}}(a),o=n.plugins,s=n.events.filter(function(S){return!qo.includes(S)}).sort(),c=new Set(s.concat(Vt).filter(function(S){return!qo.includes(S)})),l=Array.from(c).sort(),u=function(){return o},f=new $m,h=f.addMiddleware,d=f.removeMiddleware,v=f.dynamicMiddlewares,m=function(){throw new Error("Abort disabled inListener")},w=_m(),E=Df(a),b=ne({},E,t,w.an_uid?{userId:w.an_uid}:{},w.an_aid?{anonymousId:w.an_aid}:{});b.anonymousId||(b.anonymousId=bn());var g=ne({enable:function(S,_){return new Promise(function(D){O.dispatch({type:te.enablePlugin,plugins:Eo(S),_:{originalAction:te.enablePlugin}},D,[_])})},disable:function(S,_){return new Promise(function(D){O.dispatch({type:te.disablePlugin,plugins:Eo(S),_:{originalAction:te.disablePlugin}},D,[_])})}},n.methods),p=!1,y={identify:function(S,_,D,B){try{var K=Or(S)?S:null,Z=Ge(S)?S:_,de=D||{},ae=y.user();Mr(xo(_r),K);var ue=K||Z.userId||i(_r,y,Z);return Promise.resolve(new Promise(function(se){O.dispatch(ne({type:te.identifyStart,userId:ue,traits:Z||{},options:de,anonymousId:ae.anonymousId},ae.id&&ae.id!==K&&{previousId:ae.id}),se,[_,D,B])}))}catch(se){return Promise.reject(se)}},track:function(S,_,D,B){try{var K=Ge(S)?S.event:S;if(!K||!Or(K))throw new Error("EventMissing");var Z=Ge(S)?S:_||{},de=Ge(D)?D:{};return Promise.resolve(new Promise(function(ae){O.dispatch({type:te.trackStart,event:K,properties:Z,options:de,userId:i(_r,y,_),anonymousId:i(Xr,y,_)},ae,[_,D,B])}))}catch(ae){return Promise.reject(ae)}},page:function(S,_,D){try{var B=Ge(S)?S:{},K=Ge(_)?_:{};return Promise.resolve(new Promise(function(Z){O.dispatch({type:te.pageStart,properties:Km(B),options:K,userId:i(_r,y,B),anonymousId:i(Xr,y,B)},Z,[S,_,D])}))}catch(Z){return Promise.reject(Z)}},user:function(S){if(S===_r||S==="id")return i(_r,y);if(S===Xr||S==="anonId")return i(Xr,y);var _=y.getState("user");return S?Af(_,S):_},reset:function(S){return new Promise(function(_){O.dispatch({type:te.resetStart},_,S)})},ready:function(S){return p&&S({plugins:g,instance:y}),y.on(te.ready,function(_){S(_),p=!0})},on:function(S,_){if(!S||!Ke(_))return!1;if(S===te.bootstrap)throw new Error(".on disabled for "+S);var D=/Start$|Start:/;if(S==="*"){var B=function(ae){return function(ue){return function(se){return se.type.match(D)&&_({payload:se,instance:y,plugins:o}),ue(se)}}},K=function(ae){return function(ue){return function(se){return se.type.match(D)||_({payload:se,instance:y,plugins:o}),ue(se)}}};return h(B,Ft),h(K,Bt),function(){d(B,Ft),d(K,Bt)}}var Z=S.match(D)?Ft:Bt,de=function(ae){return function(ue){return function(se){return se.type===S&&_({payload:se,instance:y,plugins:o,abort:m}),ue(se)}}};return h(de,Z),function(){return d(de,Z)}},once:function(S,_){if(!S||!Ke(_))return!1;if(S===te.bootstrap)throw new Error(".once disabled for "+S);var D=y.on(S,function(B){_({payload:B.payload,instance:y,plugins:o,abort:m}),D()});return D},getState:function(S){var _=O.getState();return S?Af(_,S):Object.assign({},_)},dispatch:function(S){var _=Or(S)?{type:S}:S;if(Vt.includes(_.type))throw new Error("reserved action "+_.type);var D=ne({},_,{_:ne({originalAction:_.type},S._||{})});O.dispatch(D)},enablePlugin:g.enable,disablePlugin:g.disable,plugins:g,storage:{getItem:a.getItem,setItem:function(S,_,D){O.dispatch({type:te.setItemStart,key:S,value:_,options:D})},removeItem:function(S,_){O.dispatch({type:te.removeItemStart,key:S,options:_})}},setAnonymousId:function(S,_){y.storage.setItem(kr,S,_)},events:{core:Vt,plugins:s}},k=n.middlewares.concat([function(S){return function(_){return function(D){return D.meta||(D.meta=Yf()),_(D)}}},v(Ft),Nm(y,u,{all:l,plugins:s}),Dm(a),jm(y),Lm(y),v(Bt)]),A={context:Jm,user:Um(a),page:Vm,track:Bm,plugins:Mm(u),queue:Hm},j=it,z=it;if(qe&&e.debug){var H=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;H&&(j=H({trace:!0,traceLimit:25})),z=function(){return arguments.length===0?Fh():Ge(typeof arguments[0])?Zf():Zf().apply(null,arguments)}}var ee,x=function(S){return Object.keys(S).reduce(function(_,D){return Zm.includes(D)||(_[D]=S[D]),_},{})}(e),N=n.pluginsArray.reduce(function(S,_){var D=_.name,B=_.config,K=_.loaded,Z=n.pluginEnabled[D];return S[D]={enabled:Z,initialized:!!Z&&!_.initialize,loaded:!!K({config:B}),config:B},S},{}),q={context:x,user:b,plugins:N},O=Ah(function(S){for(var _=Object.keys(S),D={},B=0;B<_.length;B++){var K=_[B];typeof S[K]===Tr&&(D[K]=S[K])}var Z,de=Object.keys(D);try{(function(ae){Object.keys(ae).forEach(function(ue){var se=ae[ue];if(typeof se(void 0,{type:"@@redux/INIT"})===Sr||typeof se(void 0,{type:km})===Sr)throw new Error("reducer "+ue+" "+Sr)})})(D)}catch(ae){Z=ae}return function(ae,ue){if(ae===void 0&&(ae={}),Z)throw Z;for(var se=!1,Pe={},je=0;je<de.length;je++){var Fe=de[je],Ce=ae[Fe],Ve=(0,D[Fe])(Ce,ue);if(typeof Ve===Sr){var lr=Cm(Fe,ue);throw new Error(lr)}Pe[Fe]=Ve,se=se||Ve!==Ce}return se?Pe:ae}}(ne({},A,r)),q,z(j(Am.apply(void 0,k))));O.dispatch=(ee=O.dispatch,function(S,_,D){var B=ne({},S,{meta:Yf(S.meta,_,Eo(D))});return ee.apply(null,[B])});var X=Object.keys(o);O.dispatch({type:te.bootstrap,plugins:X,config:x,params:w,user:b,initialUser:t,persistedUser:E});var re=X.filter(function(S){return n.pluginEnabled[S]}),Q=X.filter(function(S){return!n.pluginEnabled[S]});return O.dispatch({type:te.registerPlugins,plugins:X,enabled:n.pluginEnabled}),n.pluginsArray.map(function(S,_){var D=S.bootstrap,B=S.config,K=S.name;D&&Ke(D)&&D({instance:y,config:B,payload:S}),O.dispatch({type:te.registerPluginType(K),name:K,enabled:n.pluginEnabled[K],plugin:S}),n.pluginsArray.length===_+1&&O.dispatch({type:te.initializeStart,plugins:re,disabled:Q})}),Xm(function(S){O.dispatch({type:S?te.offline:te.online})}),function(S,_,D){setInterval(function(){return Uh(S,_,D)},3e3)}(O,u,y),y}var Ft="before",Bt="after",St="cookie",Ur=Hh(),Bh=Sn,eg=Sn;function zh(e){return Ur?Sn(e,"",-1):ht(e)}function Hh(){if(Ur!==void 0)return Ur;var e="cookiecookie";try{Sn(e,e),Ur=document.cookie.indexOf(e)!==-1,zh(e)}catch{Ur=!1}return Ur}function Sn(e,r,t,n,a,i){if(typeof window<"u"){var o=arguments.length>1;return Ur===!1&&(o?Mr(e,r):$r(e)),o?document.cookie=e+"="+encodeURIComponent(r)+(t?"; expires="+new Date(+new Date+1e3*t).toUTCString()+(n?"; path="+n:"")+(a?"; domain="+a:"")+(i?"; secure":""):""):decodeURIComponent((("; "+document.cookie).split("; "+e+"=")[1]||"").split(";")[0])}}var It="localStorage",rg=ds.bind(null,"localStorage");vt("localStorage","getItem",$r);vt("localStorage","setItem",Mr);vt("localStorage","removeItem",ht);var Pt="sessionStorage",tg=ds.bind(null,"sessionStorage");vt("sessionStorage","getItem",$r);vt("sessionStorage","setItem",Mr);vt("sessionStorage","removeItem",ht);function rt(e){var r=e;try{if((r=JSON.parse(e))==="true")return!0;if(r==="false")return!1;if(Ge(r))return r;parseFloat(r)===r&&(r=parseFloat(r))}catch{}if(r!==null&&r!=="")return r}var ng=rg(),ag=tg(),ig=Hh();function Gh(e,r){if(e){var t=hs(r),n=!gs(t),a=vs(t)?rt(localStorage.getItem(e)):void 0;if(n&&!Yr(a))return a;var i=ps(t)?rt(Bh(e)):void 0;if(n&&i)return i;var o=ms(t)?rt(sessionStorage.getItem(e)):void 0;if(n&&o)return o;var s=$r(e);return n?s:{localStorage:a,sessionStorage:o,cookie:i,global:s}}}function og(e,r,t){if(e&&!Yr(r)){var n={},a=hs(t),i=JSON.stringify(r),o=!gs(a);return vs(a)&&(n[It]=zt(It,r,rt(localStorage.getItem(e))),localStorage.setItem(e,i),o)?n[It]:ps(a)&&(n[St]=zt(St,r,rt(Bh(e))),eg(e,i),o)?n[St]:ms(a)&&(n[Pt]=zt(Pt,r,rt(sessionStorage.getItem(e))),sessionStorage.setItem(e,i),o)?n[Pt]:(n[bt]=zt(bt,r,$r(e)),Mr(e,r),o?n[bt]:n)}}function sg(e,r){if(e){var t=hs(r),n=Gh(e,_h),a={};return!Yr(n.localStorage)&&vs(t)&&(localStorage.removeItem(e),a[It]=n.localStorage),!Yr(n.cookie)&&ps(t)&&(zh(e),a[St]=n.cookie),!Yr(n.sessionStorage)&&ms(t)&&(sessionStorage.removeItem(e),a[Pt]=n.sessionStorage),!Yr(n.global)&&In(t,bt)&&(ht(e),a[bt]=n.global),a}}function hs(e){return e?Or(e)?e:e.storage:Rh}function vs(e){return ng&&In(e,It)}function ps(e){return ig&&In(e,St)}function ms(e){return ag&&In(e,Pt)}function gs(e){return e===_h||e==="all"}function In(e,r){return e===Rh||e===r||gs(e)}function zt(e,r,t){return{location:e,current:r,previous:t}}var ug={setItem:og,getItem:Gh,removeItem:sg};function cg(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Xf(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function Qf(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Xf(Object(t),!0).forEach(function(n){cg(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Xf(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function lg(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r={storage:ug};return Qm(Qf(Qf({},r),e))}const Kh="@sesamy/sesamy-js",ys="1.37.9";function fg(e){if(typeof window>"u")return;const{addEventListener:r,history:t,location:n}=window;let a=n.pathname;r("popstate",()=>e(n.pathname)),["push","replace"].map(i=>{const o=`${i}State`;if(o!=="pushState"&&o!=="replaceState")return;const s=t[o];t[o]=function(...c){const l=c[2]?.toString()||"",u=hg(l);return a!==u&&(a=u,setTimeout(()=>e(l),0)),s.apply(t,c)}})}function dg(e,r){const t=e.indexOf(r);return t>-1?e.slice(0,t):e}function hg(e){return["#","?"].forEach(r=>e=dg(e,r)),e}function vg(){fg(()=>{br.page()})}function pg(e){if(e===void 0&&(e={}),!qe)return Lo;var r=rd(),t=No(),n=ed(),a=Ht(n,r),i=Ht(t,r),o=[],s=[],c=[],l=n,u=a,f=i,h=Object.keys(e);if(!h.length)return Lo;var d=h.map(function(m){return Number(m)}),v=Om(function(){var m=rd(),w=function(x,N){return N.map(function(q){return q===100?x-5:x*(q/100)})}(m,d),E=No(),b=ed(),g=Ht(b,m),p=Ht(E,m);if(u=g>u?g:u,f=p<f?p:f,!(o.length>=d.length)){var y=l===b,k="up";y?k="initial":l<=b&&(k="down");var A=w,j=d;(k==="up"||y)&&(A=w.slice().reverse(),j=d.slice().reverse());var z=j.reduce(function(x,N,q){var O=A[q];return c.includes(N)&&b<=O&&(c=c.filter(function(X){return X!==N}),x.singleFunction=N),k==="down"&&!o.includes(N)&&b>=O&&N>i?(s.push(N),x.callbacks=x.callbacks.concat(N),x):k==="up"&&!o.includes(N)&&b<=O&&N<=g?(x.foundFunc=[N],x):(y&&b>=O&&x.foundFunc.length===0&&(x.foundFunc=[N]),!s.includes(N)&&b>=O&&(s.push(N),x.singleFunction?c.push(N):x.singleFunction=N),x)},{foundFunc:[],singleFunction:null,callbacks:[],direction:k});if(l=b,k==="down"&&z.callbacks&&z.callbacks.forEach(function(x){Ke(e[x])&&(e[x]({trigger:x,direction:k,scrollMin:f,scrollMax:u,range:[f,u]}),o.push(x))}),z.singleFunction){var H=z.singleFunction,ee=z.direction;Ke(e[H])&&e[H]({trigger:H,direction:ee,scrollMin:f,scrollMax:u,range:[f,u]}),o.push(H)}}},500);return window.addEventListener("scroll",v),function(){return window.removeEventListener("scroll",v)}}function No(){return qe?document.body.scrollTop||document.documentElement.scrollTop:0}function mg(){return qe?window.innerHeight||document.documentElement.clientHeight:0}function ed(){return Math.round(No()+mg())}function rd(){if(!qe)return 0;var e=document.body,r=document.documentElement;return Math.max(e.scrollHeight,e.offsetHeight,r.clientHeight,r.scrollHeight,r.offsetHeight)}function Ht(e,r){return Math.round(e/r*100)}var td="EventListener";function gg(e){return function(r,t,n,a){var i=n||Lo,o=a||!1;if(!qe)return i;var s=rn(t),c=rn(r,!0);if(!c.length)throw new Error("noElements");if(!s.length)throw new Error("noEvent");var l=[];return function u(f){f&&(l=[]);for(var h=f?"add"+td:"remove"+td,d=0;d<c.length;d++){var v=c[d];l[d]=f?o&&o.once?yg(i):i:l[d]||i;for(var m=0;m<s.length;m++)v[h]?v["on"+s[m]]=f?l[d]:null:v[h](s[m],l[d],o)}return u.bind(null,!f)}(e)}}function rn(e,r){if(Or(e))return r?rn(document.querySelectorAll(e)):(t=e).split(t.indexOf(",")>-1?",":" ").map(function(o){return o.trim()});var t;if(NodeList.prototype.isPrototypeOf(e)){for(var n=[],a=e.length>>>0;a--;)n[a]=e[a];return n}var i=Pm(e);return r?i.map(function(o){return Or(o)?rn(o,!0):o}).flat():i}function yg(e,r){var t;return function(){return e&&(t=e.apply(this,arguments),e=null),t}}var Ro=gg("Event");function Wh(e,r){return qe&&Ke(window[e])?(t=window[e],n=r,(a=window)===void 0&&(a=null),Ke(t)?function(){t.apply(a,arguments),n.apply(a,arguments)}:n):window[e]=r;var t,n,a}Wh.bind(null,"onerror");Wh.bind(null,"onload");var Vh=typeof window>"u",nd="hidden";function wg(e){if(Vh)return!1;var r=bg(),t="".concat(r.replace(/[H|h]idden/,""),"visibilitychange"),n=function(){return e(!!document[r])},a=function(){return document.addEventListener(t,n)};return a(),function(){return document.removeEventListener(t,n),a}}function bg(){var e=["webkit","moz","ms","o"];return Vh||nd in document?nd:e.reduce(function(r,t){var n=t+"Hidden";return!r&&n in document?n:r},null)}var Sg=["mousemove","mousedown","touchmove","touchstart","touchend","keydown"];function Ig(e,r){r===void 0&&(r={});var t=function(o,s){var c=this,l=!1;return function(u){l||(o.call(c,u),l=!0,setTimeout(function(){return l=!1},s))}}(e,r.throttle||1e4),n=[];function a(){var o=wg(function(s){s||t({type:"tabVisible"})});return n=[o].concat(Sg.map(function(s){return Ro(document,s,t)})).concat(Ro(window,"load",t)).concat(Ro(window,"scroll",t,{capture:!0,passive:!0})),i}function i(){n.map(function(o){return o()})}return a(),function(){return i(),a}}function Pg(e){var r,t,n=e.onIdle,a=e.onWakeUp,i=e.onHeartbeat,o=e.timeout,s=o,c=e.throttle,l=c===void 0?2e3:c,u=!1,f=!1,h=new Date,d=function(){return clearTimeout(r)};function v(w){d(),i&&!u&&i(yt(h),w),a&&u&&(u=!1,a(yt(t),w),h=new Date),r=setTimeout(function(){u=!0,n&&(t=new Date,n(yt(h),w))},s)}var m=Ig(v,{throttle:l});return{disable:function(){f=!0,u=!1,d();var w=m();return function(){return f=!1,h=new Date,v({type:"load"}),w()}},getStatus:function(){return{isIdle:u,isDisabled:f,active:u?0:yt(h,f),idle:u?yt(t,f):0}}}}function yt(e,r){return r?0:Math.round((new Date-e)/1e3)}const ad=5e3;class Eg{element;isInViewport=!1;isAwake=!1;isFlushing;observer;lastEventAt=Date.now();registeredView=!1;viewCallback;activeDurationCallback;idleDurationCallback;scrollCallback;constructor(r){this.element=r.element,this.viewCallback=r.viewCallback,this.activeDurationCallback=r.activeDurationCallback,this.idleDurationCallback=r.idleDurationCallback,this.scrollCallback=r.scrollCallback,this.observer=new IntersectionObserver(t=>{t.forEach(n=>{this.handleInViewPort(n.isIntersecting)})},{threshold:0}),this.observer.observe(this.element),Pg({onIdle:t=>this.handleAwake(!1,t),onWakeUp:t=>this.handleAwake(!0,t),timeout:ad}),pg({25:this.handleScroll.bind(this),50:this.handleScroll.bind(this),75:this.handleScroll.bind(this),90:this.handleScroll.bind(this),100:this.handleScroll.bind(this)})}flush(){this.isFlushing=!0,this.handleAwake(!this.isAwake)}handleInViewPort(r){r?(this.isAwake=!0,this.trackInViewport()):this.handleAwake(!1),this.isInViewport=r}handleAwake(r,t=Math.round((Date.now()-this.lastEventAt)/1e3)){this.isAwake=r,this.lastEventAt=r?Date.now()-t*ad:Date.now(),this.isInViewport&&this.trackAwake(r,t)}handleScroll(r){this.scrollCallback&&this.scrollCallback(r)}handleVisibilityChange(){this.isAwake=!1;const r=Math.round((Date.now()-this.lastEventAt)/1e3);r>1&&(this.lastEventAt=Date.now(),this.trackAwake(!1,r))}trackAwake(r,t){!r&&this.activeDurationCallback&&this.activeDurationCallback(t,this.isFlushing,this.lastEventAt),r&&this.idleDurationCallback&&this.idleDurationCallback(t,this.isFlushing,this.lastEventAt)}trackInViewport(){this.registeredView||(this.registeredView=!0,this.viewCallback&&this.viewCallback())}}function Jh(e){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e):e()}function Rg(e,r){r=r||{};var t,n,a=[],i=r.max||1/0;function o(){clearInterval(t),e(a.splice(0,i)),s()}function s(){t=setInterval(o,r.interval||1e4)}return s(),{flush:o,push:function(c){return n=a.push(c),n>=i&&o(),n},size:function(){return a.length},end:function(c){c&&o(),clearInterval(t)}}}const id="sesamy_session_id";function _g(){let e=sessionStorage.getItem(id);return e||(e=Math.random().toString(36).slice(2,9),sessionStorage.setItem(id,e)),e}function Zh(e){function r(n){return n.id?`#${n.id}`:n.classList.length>0?Array.from(n.classList).map(i=>`.${i}`).join(""):null}function t(n){const a=[];let i=n;for(;i&&i!==document.body&&i!==document.documentElement;){const o=r(i);if(o){a.unshift(o);break}if(i.parentElement){const s=Array.from(i.parentElement.children),c=s.indexOf(i)+1,l=i.tagName.toLowerCase();s.filter(f=>f.tagName.toLowerCase()===l).length>1?a.unshift(`${l}:nth-child(${c})`):a.unshift(l)}i=i.parentElement}return a.join(" > ")}return t(e)}let Ze={article:{selector:"sesamy-article"},image:{selector:"img",attribute:"src"},title:{selector:"h1",attribute:"textContent"},excerpt:{selector:"p",attribute:"textContent"},price:{selector:"sesamy-article",attribute:"price"},currency:{selector:"sesamy-article",attribute:"currency"},url:{selector:"sesamy-article",attribute:"item-src"},accessLevel:{selector:"sesamy-article",attribute:"access-level"},id:{selector:"sesamy-article",attribute:"publisher-content-id"},pass:{selector:"sesamy-article",attribute:"pass"}},Jt;function Tg(e,r){Ze={...Ze,...e.content?.article},Jt=r}function Og(e,r){const{selector:t}=r;return t===Ze.article.selector?e:e.querySelector(t)}function Yh(e,r){if(e)return r.attribute?r.attribute==="textContent"?e.textContent??void 0:e.getAttribute(r.attribute)??Yh(e.parentElement,r):e.textContent??void 0}function tt(e){const r=document.head.querySelectorAll(`[property~='${e}'][content]`);for(let n=0;n<r.length;n+=1)if(r[n].content)return r[n].content;const t=document.head.querySelectorAll(`[name~='${e}'][content]`);for(let n=0;n<t.length;n+=1)if(t[n].content)return t[n].content}function Xh({publisherContentId:e,key:r,defaultValue:t=""}){return(e?document.body.querySelector(`sesamy-content-data[id='${e}']`):null)?.getAttribute(r)||tt(`sesamy:${r}`)||tt(`og:${r}`)||tt(r)||t}function kg(){const e=document.querySelectorAll(Ze.article.selector);return Array.from(e).map(ws).filter(r=>r!==null)}function ws(e){const r=typeof e=="string"?document.querySelector(e):e;if(!r)return null;const t={element:r,selector:typeof e=="string"?e:Zh(r)},n=(a,i,o,s)=>{const c=Og(r,i);if(c){const l=Yh(c,i)||Xh({publisherContentId:o,key:a});l!==void 0&&(t[a]=s?s(l):l)}};return n("id",Ze.id),n("title",Ze.title,t.id),n("excerpt",Ze.excerpt,t.id),n("image",Ze.image,t.id),n("price",Ze.price,t.id,a=>parseFloat(a)),n("currency",Ze.currency,t.id),n("url",Ze.url,t.id),n("pass",Ze.pass,t.id),n("accessLevel",Ze.accessLevel,t.id,a=>a||"entitlement"),t}async function Cg(e,r){const t=typeof e=="string"?document.querySelector(e):e;if(!t)throw new Error("Could not find element");const n=ws(t);if(!n?.url)throw new Error("Could not find content for element");const a=await Jt.entitlements.hasAccess(n.url||"",n.pass?.split(",")||[]);if(!a)throw new Error("User does not have access to the content");const i=await Jt.entitlements.access(a.id);if(!i.token)throw new Error("Could not get access token");const o=r||Zh(t.parentElement||t);return Jt.proxy.getContent(i.token,n.url,o)}let Do;function Qh(e){return JSON.stringify(e.map(r=>({...r,clientId:Do,requestId:Math.random().toString(36).slice(2,9),sessionId:_g(),timestamp:new Date().toISOString(),version:ys,event:r.event,context:{...r.context,page:{url:window.location.href,title:document.title,referrer:document.referrer,itemSrc:tt("sesamy:item-src"),publisherContentId:tt("sesamy:publisher-content-id")},locale:navigator.language,library:Kh,userAgent:navigator.userAgent,clientId:Do}})))}function Ag(e){Do=e}let ev=!1,Zt,tn;const rv=Rg(async e=>{if(e.length>0){const r=Qh(e);ev?navigator.sendBeacon(tn,r):(await fetch(tn,{method:"POST",body:r,headers:{"Content-Type":"text/plain"}})).ok}},{max:10,interval:3e3});function _o(e){if(e.anonymousId)if(e.properties?.flushing){const r={...e};delete r.properties.flushing,navigator.sendBeacon(tn,Qh([r]))}else rv.push(e)}function jg(){return ev=!0,rv.flush()}function Ug(e,r,t){Zt=r,tn=`${vr("logs",t)}/events`,Ag(e)}const Lg={name:"custom-analytics-plugin",page:({payload:e})=>{if(!Zt)return;const{properties:r,anonymousId:t,userId:n,event:a}=e;_o({anonymousId:t,userId:n,properties:r,event:a,type:"page"})},track:({payload:e})=>{if(!Zt)return;const{properties:r,anonymousId:t,userId:n,event:a}=e;_o({anonymousId:t,userId:n,properties:r,event:a,type:"track"})},identify:({payload:e})=>{if(!Zt)return;const{properties:r,anonymousId:t,userId:n}=e;_o({anonymousId:t,userId:n,properties:r,type:"identify"})}},od=new Map,sd=new Map;function qg({clientId:e,enabled:r=!0,environment:t}){Ug(e,r,t),r&&(window.addEventListener("beforeunload",()=>{sd.forEach((n,a)=>{n.bind(a)()}),jg()}),window.addEventListener("visibilitychange",()=>{document.visibilityState!=="visible"&&od.forEach((n,a)=>{n.bind(a)()})}),vg(),Jh(()=>{const n=new Eg({element:document.body,viewCallback:()=>{br.page()},activeDurationCallback:(a,i,o)=>{br.track("activeDuration",{duration:a,durationStart:o,flushing:i})},idleDurationCallback:(a,i,o)=>{br.track("idleDuration",{duration:a,durationStart:o,flushing:i})},scrollCallback:a=>{br.track("scroll",{scroll:a.scrollMax})}});sd.set(document.body,()=>{n.flush()}),od.set(document.body,()=>{n.handleVisibilityChange()})}),window.addEventListener(We.AUTHENTICATED,async n=>{const a=n;await br.identify(a.detail.sub)}),window.addEventListener(We.LOGOUT,async()=>{await br.track("logout",{}),await br.reset()}))}const br=lg({app:Kh,version:ys,plugins:[Lg]});function tv(e,r){br.track(e,r)}function nv(e,r,t=!1){const n={name:e,data:r},a=new CustomEvent(e,{detail:n,cancelable:t,bubbles:!0});tv(`event:${e}`,{...r,timestamp:new Date().toISOString()});const i=window.dispatchEvent(a);return t&&!i?{canceled:!0,message:n.cancellationMessage}:{canceled:!1}}function xg(e,r){e.cancelable&&(e.detail.cancellationMessage=r,e.preventDefault())}function Ng(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}let Le,av,$o=!1,Yt=!1;Et()&&window.addEventListener("pageshow",()=>{Yt=!1});let iv=!1;const ot="sesamyAccessToken",To="sesamyRefreshToken";async function Pn(){return $o?!0:new Promise((e,r)=>{const t=setTimeout(()=>{$o?e(!0):r(new Error("Initialization failed: Timeout"))},2e3);window.addEventListener(We.AUTH_INITIALIZED,()=>{clearTimeout(t),e(!0)})})}async function Dg(e){if(!e)return null;const r=localStorage.getItem(To);if(!r)return ye("No refresh token found in localstorage"),null;const t=new URLSearchParams;t.set("client_id",e.iss),t.set("refresh_token",r),t.set("grant_type","refresh_token");const n=new URL(e.iss);n.pathname="/oauth/token",n.searchParams.set("user_id",e.sub);try{const a=await fetch(n.href,{body:t.toString(),method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"}});if(!a.ok)throw localStorage.removeItem(To),new Error("Renew token failed");const i=await a.json();return localStorage.setItem(To,i.refresh_token),localStorage.setItem(ot,i.access_token),i.access_token}catch{Ss()}}async function bs(){const e=localStorage.getItem(ot);if(!e)return null;const r=Is(e);if(!r||!r.exp||r.exp<new Date().getTime()/1e3){const t=await Dg(r);if(t)return t;localStorage.removeItem(ot)}return e}let Gt=null;function $g(){try{if(Gt!==null)return Gt;const r=Object.keys(localStorage).filter(t=>t.startsWith("@@auth0spajs@@"));for(const t of r){const n=JSON.parse(localStorage.getItem(t)||"{}");if(typeof n=="object"&&"refresh_token"in n)return Gt=!0,!0}}catch(e){ye(`Error checking for existing auth0 tokens: ${e.message}`)}return Gt=!1,!1}function ud(e){try{const r=new URL(e).hostname,t=r.split(".");return t.length>1?t.slice(-2).join("."):r}catch{return null}}async function Mg(e){if(e.enabled===!1)return;e.usePopupForSafari&&(iv=!0),av=e.organization;const r=e.domain&&!$g()?e.domain:Eh("token",e.environment),t={domain:r,clientId:e.clientId,useCookiesForTransactions:!0};t.cacheLocation="localstorage",ud(window.location.href)!==ud(`https://${r}`)&&(t.useRefreshTokens=!0),ye(`Initializing auth0 client: ${JSON.stringify(t)}`),Le=await sm(t);const n=new URLSearchParams(window.location.search),a=n.get("code"),i=n.get("state");if(a)if(window.opener)ye("Code found in URL, posting to opener"),window.opener.postMessage({type:"authorization_response",response:{code:a,state:i}},window.location.origin);else{ye("Code found in URL, handling redirect");try{const c=await Le.handleRedirectCallback();ye(`Login result: ${JSON.stringify(c)}`);const l=await Le.getUser();if(!l)throw ye("No user found"),new Error("No user found");ye(`User found ${JSON.stringify(l)}`),Ir(We.AUTHENTICATED,l),ye("Rewrite url")}catch(c){alert("There was an error logging in"),console.error(c)}const o=new URL(location.href),s=o.searchParams;s.delete("code"),s.delete("state"),o.search=s.toString(),window.history.replaceState({},document.title,o.toString())}$o=!0,Ir(We.AUTH_INITIALIZED,{})}async function _t(){return await Pn(),await bs()?!0:Le?Le.isAuthenticated():!1}async function Fg(){return await Pn(),await bs()?(ye("Using local user"),{sub:"local",name:"Local User"}):Le?Le.getUser():null}function ov(e){if(Yt)return ye("Login already in progress"),null;if(Yt=!0,setTimeout(()=>{Yt=!1},3e3),localStorage.removeItem(ot),!Le)throw new Error("Auth0 client not initialized");const r=e?.authorizationParams||{};return{...e,authorizationParams:{organization:av,redirect_uri:window.location.href,ui_locales:Xt(),incognito:fs(),...r}}}async function En(e){const r=ov(e);if(r)return Le.loginWithRedirect(r)}async function sv(e){const r=ov(e);if(!r)return;await Le.loginWithPopup(r),nv(We.AUTHENTICATED,await Le.getUser()).canceled||window.location.reload()}async function Bg(e){return Ng()&&(fs()||iv)?sv(e):En(e)}async function Zr(e=!0,r=!1){await Pn();const t=await bs();if(t)return t;try{if(!Le)return ye("Auth client not initialized"),null;let n=await Le.getTokenSilently();const a=Is(n);return r&&a?.exp&&a.exp+3600<new Date().getTime()/1e3&&(n=await Le.getTokenSilently({cacheMode:r?"off":"on"})),n}catch(n){const a=n;if(ye(`Failed to get token silently: ${a.message}`),await Le.isAuthenticated()&&(a.message==="Invalid refresh token"||a.message.includes("Missing Refresh Token"))&&await Ss(),e)throw n;return null}}async function Ss(e={}){if(await Pn(),localStorage.removeItem(ot),Ir(We.LOGOUT,{}),!!Le)return ye(`Logout with options: ${JSON.stringify(e)}`),Le.logout({...e,logoutParams:{returnTo:window.location.href,...e.logoutParams}})}function Is(e){const r=e.split(".");if(r.length!==3)return null;const n=r[1].replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(atob(n).split("").map(function(i){return"%"+("00"+i.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(a)}async function Mo(e){const r=Is(e);if(!r||!r.exp||r.exp<new Date().getTime()/1e3)throw new Error("Invalid token");ye("Set token"),localStorage.setItem(ot,e),Ir(We.AUTHENTICATED,r)}const zg=(e,r)=>r.skipDedupe||r.method!=="GET",Hg=(e,r)=>r.method+"@"+e,Gg=e=>e.clone(),cd=({skip:e=zg,key:r=Hg,resolver:t=Gg}={})=>{const n=new Map;return a=>(i,o)=>{if(e(i,o))return a(i,o);const s=r(i,o);if(!n.has(s))n.set(s,[]);else return new Promise((c,l)=>{n.get(s).push([c,l])});try{return a(i,o).then(c=>(n.get(s).forEach(([l])=>l(t(c))),n.delete(s),c)).catch(c=>{throw n.get(s).forEach(([,l])=>l(c)),n.delete(s),c})}catch(c){return n.delete(s),Promise.reject(c)}}},Kg=(e,r)=>e*r,Wg=e=>e&&e.ok,ld=({delayTimer:e=500,delayRamp:r=Kg,maxAttempts:t=10,until:n=Wg,onRetry:a=null,retryOnNetworkError:i=!1,resolveWithLatestResponse:o=!1,skip:s}={})=>c=>(l,u)=>{let f=0;if(s&&s(l,u))return c(l,u);const h=(d,v)=>Promise.resolve(n(d,v)).then(m=>m?d&&o?d:v?Promise.reject(v):d:(f++,!t||f<=t?new Promise(w=>{const E=r(e,f);setTimeout(()=>{typeof a=="function"?Promise.resolve(a({response:d,error:v,url:l,options:u})).then((b={})=>{var g,p;w(c((g=b&&b.url)!==null&&g!==void 0?g:l,(p=b&&b.options)!==null&&p!==void 0?p:u))}):w(c(l,u))},E)}).then(h).catch(w=>{if(!i)throw w;return h(null,w)}):d&&o?d:Promise.reject(v||new Error("Number of attempts exceeded."))));return c(l,u).then(h).catch(d=>{if(!i)throw d;return h(null,d)})},Vg="application/json",uv="Content-Type",Vr=Symbol(),cv=Symbol();function fd(e={}){var r;return(r=Object.entries(e).find(([t])=>t.toLowerCase()===uv.toLowerCase()))===null||r===void 0?void 0:r[1]}function dd(e){return/^application\/.*json.*/.test(e)}const Nr=function(e,r,t=!1){return Object.entries(r).reduce((n,[a,i])=>{const o=e[a];return Array.isArray(o)&&Array.isArray(i)?n[a]=t?[...o,...i]:i:typeof o=="object"&&typeof i=="object"?n[a]=Nr(o,i,t):n[a]=i,n},{...e})},st={options:{},errorType:"text",polyfills:{},polyfill(e,r=!0,t=!1,...n){const a=this.polyfills[e]||(typeof self<"u"?self[e]:null)||(typeof global<"u"?global[e]:null);if(r&&!a)throw new Error(e+" is not defined");return t&&a?new a(...n):a}};function Jg(e,r=!1){st.options=r?e:Nr(st.options,e)}function Zg(e,r=!1){st.polyfills=r?e:Nr(st.polyfills,e)}function Yg(e){st.errorType=e}const Xg=e=>r=>e.reduceRight((t,n)=>n(t),r)||r;class lv extends Error{}const Qg=e=>{const r=Object.create(null);e=e._addons.reduce((g,p)=>p.beforeRequest&&p.beforeRequest(g,e._options,r)||g,e);const{_url:t,_options:n,_config:a,_catchers:i,_resolvers:o,_middlewares:s,_addons:c}=e,l=new Map(i),u=Nr(a.options,n);let f=t;const h=Xg(s)((g,p)=>(f=g,a.polyfill("fetch")(g,p)))(t,u),d=new Error,v=h.catch(g=>{throw{[Vr]:g}}).then(g=>{var p;if(!g.ok){const y=new lv;if(y.cause=d,y.stack=y.stack+`
|
|
36
|
-
CAUSE: `+d.stack,y.response=g,y.status=g.status,y.url=f,g.type==="opaque")throw y;const k=a.errorType==="json"||((p=g.headers.get("Content-Type"))===null||p===void 0?void 0:p.split(";")[0])==="application/json";return(a.errorType?k?g.text():g[a.errorType]():Promise.resolve(g.body)).then(j=>{throw y.message=typeof j=="string"?j:g.statusText,j&&(k&&typeof j=="string"?(y.text=j,y.json=JSON.parse(j)):y[a.errorType]=j),y})}return g}),m=g=>g.catch(p=>{const y=Object.prototype.hasOwnProperty.call(p,Vr),k=y?p[Vr]:p,A=k?.status&&l.get(k.status)||l.get(k?.name)||y&&l.has(Vr)&&l.get(Vr);if(A)return A(k,e);const j=l.get(cv);if(j)return j(k,e);throw k}),w=g=>p=>m(g?v.then(y=>y&&y[g]()).then(y=>p?p(y):y):v.then(y=>p?p(y):y)),E={_wretchReq:e,_fetchReq:h,_sharedState:r,res:w(null),json:w("json"),blob:w("blob"),formData:w("formData"),arrayBuffer:w("arrayBuffer"),text:w("text"),error(g,p){return l.set(g,p),this},badRequest(g){return this.error(400,g)},unauthorized(g){return this.error(401,g)},forbidden(g){return this.error(403,g)},notFound(g){return this.error(404,g)},timeout(g){return this.error(408,g)},internalError(g){return this.error(500,g)},fetchError(g){return this.error(Vr,g)}},b=c.reduce((g,p)=>({...g,...typeof p.resolver=="function"?p.resolver(g):p.resolver}),E);return o.reduce((g,p)=>p(g,e),b)},ey={_url:"",_options:{},_config:st,_catchers:new Map,_resolvers:[],_deferred:[],_middlewares:[],_addons:[],addon(e){return{...this,_addons:[...this._addons,e],...e.wretch}},errorType(e){return{...this,_config:{...this._config,errorType:e}}},polyfills(e,r=!1){return{...this,_config:{...this._config,polyfills:r?e:Nr(this._config.polyfills,e)}}},url(e,r=!1){if(r)return{...this,_url:e};const t=this._url.split("?");return{...this,_url:t.length>1?t[0]+e+"?"+t[1]:this._url+e}},options(e,r=!1){return{...this,_options:r?e:Nr(this._options,e)}},headers(e){const r=e?Array.isArray(e)?Object.fromEntries(e):"entries"in e?Object.fromEntries(e.entries()):e:{};return{...this,_options:Nr(this._options,{headers:r})}},accept(e){return this.headers({Accept:e})},content(e){return this.headers({[uv]:e})},auth(e){return this.headers({Authorization:e})},catcher(e,r){const t=new Map(this._catchers);return t.set(e,r),{...this,_catchers:t}},catcherFallback(e){return this.catcher(cv,e)},resolve(e,r=!1){return{...this,_resolvers:r?[e]:[...this._resolvers,e]}},defer(e,r=!1){return{...this,_deferred:r?[e]:[...this._deferred,e]}},middlewares(e,r=!1){return{...this,_middlewares:r?e:[...this._middlewares,...e]}},fetch(e=this._options.method,r="",t=null){let n=this.url(r).options({method:e});const a=fd(n._options.headers),i=this._config.polyfill("FormData",!1),o=typeof t=="object"&&!(i&&t instanceof i)&&(!n._options.headers||!a||dd(a));return n=t?o?n.json(t,a):n.body(t):n,Qg(n._deferred.reduce((s,c)=>c(s,s._url,s._options),n))},get(e=""){return this.fetch("GET",e)},delete(e=""){return this.fetch("DELETE",e)},put(e,r=""){return this.fetch("PUT",r,e)},post(e,r=""){return this.fetch("POST",r,e)},patch(e,r=""){return this.fetch("PATCH",r,e)},head(e=""){return this.fetch("HEAD",e)},opts(e=""){return this.fetch("OPTIONS",e)},body(e){return{...this,_options:{...this._options,body:e}}},json(e,r){const t=fd(this._options.headers);return this.content(r||dd(t)&&t||Vg).body(JSON.stringify(e))}};function mr(e="",r={}){return{...ey,_url:e,_options:r}}mr.default=mr;mr.options=Jg;mr.errorType=Yg;mr.polyfills=Zg;mr.WretchError=lv;function rr(){return sessionStorage.removeItem(jo),ye("Cache cleared"),Ir(We.CLEAR_CACHE,{}),"Cache cleared"}function Fo(e){let r;try{r=new URL(e)}catch{return!1}return r.protocol==="http:"||r.protocol==="https:"}function fv(e,r){if(Fo(e))return{itemSrc:e};const[t,n,a]=e.split(":");return{sku:`${t}:${n}`,purchaseOption:r||a}}function hd(e){return e.endsWith("/")?e.slice(0,-1):e}function vd(e,r){if(!Fo(e)||!Fo(r))return!1;const t=new URL(e),n=new URL(r);return t.origin===n.origin&&hd(t.pathname)===hd(n.pathname)}function ry(e,r,t){const n=new URL(`${vr("checkout3",e.environment)}`);if(r.language&&n.searchParams.set("lang",r.language),r.sku)n.searchParams.set("sku",r.sku),r.purchaseOptionId&&n.searchParams.set("po-id",r.purchaseOptionId);else if(r.itemSrc){const{sku:s,purchaseOption:c,itemSrc:l}=fv(r.itemSrc,r.purchaseOptionId);l&&n.searchParams.set("url",l),s&&n.searchParams.set("sku",s),c&&n.searchParams.set("po-id",c)}r.email&&n.searchParams.set("email",r.email),r.business&&n.searchParams.set("business","true"),r.currency&&n.searchParams.set("currency",r.currency),r.price&&n.searchParams.set("price",r.price.toString()),r.discountCode&&n.searchParams.set("discount-code",r.discountCode),r.attributionItemSrc?n.searchParams.set("itemSrc",r.attributionItemSrc):t.itemSrc&&n.searchParams.set("itemSrc",t.itemSrc),r.attributionPublisherContentId?n.searchParams.set("publisherContentId",r.attributionPublisherContentId):t.publisherContentId&&n.searchParams.set("publisherContentId",t.publisherContentId),r.utmSource?n.searchParams.set("utm_source",r.utmSource):t.utmSource&&n.searchParams.set("utm_source",t.utmSource),r.utmMedium?n.searchParams.set("utm_medium",r.utmMedium):t.utmMedium&&n.searchParams.set("utm_medium",t.utmMedium),r.utmCampaign?n.searchParams.set("utm_campaign",r.utmCampaign):t.utmCampaign&&n.searchParams.set("utm_campaign",t.utmCampaign),r.utmTerm?n.searchParams.set("utm_term",r.utmTerm):t.utmTerm&&n.searchParams.set("utm_term",t.utmTerm),r.utmContent?n.searchParams.set("utm_content",r.utmContent):t.utmContent&&n.searchParams.set("utm_content",t.utmContent);const a=["_ga","_gid","_fbp","_fbc"];document.cookie.split(";").map(s=>{const[c,l]=s.trim().split("=");return{key:c,value:l}}).filter(s=>a.some(c=>c===s.key)).forEach(s=>{n.searchParams.append(s.key,s.value)});let o=new URL(window.location.href);if(r.redirectUrl)try{o=new URL(r.redirectUrl)}catch{console.warn("Invalid redirect URL provided, using current URL instead:",r.redirectUrl)}return o.searchParams.set("force-refetch-entitlements","true"),r.itemSrc&&o.searchParams.set("sesamy-purchase",r.itemSrc),n.searchParams.set("redirect-url",o.toString()),r.paymentMethodsFilter&&n.searchParams.set("paymentmethods-filter",r.paymentMethodsFilter.flatMap(({provider:s,methods:c})=>c?c.map(l=>`${s}|${l}`):s).join(",")),n}const dv="sesamySignedURLs";function Ps(){const e=sessionStorage.getItem(dv);return e?JSON.parse(e):[]}function ty(e){const r=Ps();r.push(e),ye(`Adding signed URL: ${e}`),sessionStorage.setItem(dv,JSON.stringify(r))}function ny(e){const r={};return Object.keys(e).forEach(t=>{const n=e[t];n!=null&&(r[t]=n.toString())}),r}const Bo="sesamyAttribution";function ay(e){const r=localStorage.getItem(e);if(!r)return null;try{return JSON.parse(r).value}catch{return console.error(`Failed to parse ${e}`),null}}function iy(e){return Object.keys(e).find(r=>r.startsWith("utm_"))?{utmSource:void 0,utmMedium:void 0,utmCampaign:void 0,...e}:e}function nn(){return ay(Bo)||{}}function hv(e){if(e===null)localStorage.removeItem(Bo);else{ye(`Setting attribution ${JSON.stringify(e)}`);const r=nn()??{},t=ny({...r,...iy(e)});localStorage.setItem(Bo,JSON.stringify({value:t}))}}function oy(e){const r=vr("api2",e.environment),t=T=>async(F,J)=>{let pe=sessionStorage.getItem(jo);pe||(pe=Date.now().toString(),sessionStorage.setItem(jo,pe));const ve={...J,headers:{...J.headers,"Cache-Timestamp":pe}};return T(F,ve)},n=(T=!0)=>F=>async(J,pe)=>{let ve=null;if(ve=await Zr(T),!ve){if(T)throw new Error("No access token available");return F(J,pe)}const me={...pe,headers:{...pe.headers,...ve?{Authorization:`Bearer ${ve}`}:{}}};return F(J,me)},a=T=>(F,J)=>{if(J.headers.Authorization)return T(F,J);const pe=localStorage.getItem("__anon_id"),ve=btoa(`${e.clientId}|${pe}:`),me={...J,headers:{...J.headers,Authorization:`Basic ${ve}`}};return T(F,me)},i=mr(r).headers({"Content-Type":"application/json"}).middlewares([t,n(),cd(),ld({delayTimer:1e3,delayRamp:(T,F)=>T*F,maxAttempts:3,until:T=>!!(T&&(T.ok||T.status>=400&&T.status<500)),retryOnNetworkError:!1})]),o=mr(r).headers({"Content-Type":"application/json"}).middlewares([t,n(!1),a,cd(),ld({delayTimer:1e3,delayRamp:(T,F)=>T*F,maxAttempts:3,until:T=>!!(T&&(T.ok||T.status>=400&&T.status<500)),retryOnNetworkError:!1})]);async function s(T={}){const{waitForEntitlementAfter:F,includeSignedLinks:J=!0}=T,pe=F?`?wait-for-entitlement-after=${F.toISOString()}`:"",ve=await _t()?await i.get(`/entitlements${pe}`).json():[];return J&&ve.push(...Ps()),ve}async function c(T,F=[]){return(await s())?.find(ve=>{const{sku:me,purchaseOption:Be}=fv(T);let M="sku"in ve&&me===ve.sku;M&&Be&&"purchaseOptionId"in ve&&(M=Be===ve.purchaseOptionId);const ie=vd(T,ve.url),le=F.some(fe=>vd(fe,ve.url));return M||ie||le})}async function l(T){return(await i.get("/entitlements").json())?.find(J=>J.id===T)}async function u(T){return i.get(`/entitlements/${encodeURIComponent(T)}/access`).json()}async function f(T,F,J){const pe=new URL(vr("api2",e.environment));return pe.pathname="/proxy",pe.searchParams.set("url",F),J&&pe.searchParams.set("selector",J),mr(pe.toString()).headers({Authorization:`Bearer ${T}`}).get().text()}async function h(T){if(!T)throw new Error("SKU is required to get fulfillments");return await _t()?await i.get(`/fulfillments?sku=${encodeURIComponent(T)}`).json():[]}async function d(T,F){if(!T||!F)throw new Error("SKU and itemId are required to request delivery");return(await i.post({sku:T},`/fulfillments/${encodeURIComponent(F)}/request-delivery?`).res()).ok}async function v(){return i.get("/contracts").json()}async function m(T){return(await i.get("/contracts").json())?.find(J=>J.id===T)}async function w(T){const F=await i.post({},`/contracts/${encodeURIComponent(T)}/cancel`).res();return rr(),F.ok}async function E(){return console.warn("getSubscriptions is deprecated, use getContracts instead"),i.get("/subscriptions").json()}async function b(){return i.get("/bills").json()}async function g(T){return(await i.get("/bills").json())?.find(J=>J.id===T)}async function p(){return i.get("/transactions").json()}async function y(T){return(await i.get("/transactions").json())?.find(J=>J.id===T)}async function k(T,F){const J=await i.url(`/user-metadata/${encodeURIComponent(T)}`).put(F).json();return Ir(We.USER_ATTRIBUTE_CHANGED,{}),rr(),J}async function A(T){const F=await i.url(`/user-metadata/${encodeURIComponent(T)}`).delete().res();return rr(),F.ok}async function j(){return await i.url("/user-metadata").get().json()}async function z(T){return(await j())[T]||null}async function H(){return await i.url("/tags").get().json()}async function ee(T){const F=await i.url(`/tags/${encodeURIComponent(T)}`).delete().res();return rr(),F.ok}async function x(T){const F=await i.url("/tags").post(encodeURIComponent(T)).res();return Ir(We.USER_ATTRIBUTE_CHANGED,{}),rr(),F.ok}async function N(T){return(await o.url("/tallies").get().json())[T]}async function q(){return await o.url("/tallies").get().json()}async function O(T){const F=await o.url(`/tallies/${T}`).delete().res();return rr(),F.ok}async function X(T,F){return await o.url(`/tallies/${encodeURIComponent(T)}/push`).post(F).json()}async function re(T){return await i.url(`/products/${encodeURIComponent(T)}`).get().json()}async function Q(){return await Zr(!1)?await i.url("/profile").get().json():null}async function S(T){const F=await i.url("/profile").patch(T).res();return rr(),F.ok}async function _(){return await i.url("/payment-issues").get().json()}async function D(){return(await i.url("/profile/spotify-link").get().json()).isSpotifyLinked}async function B(){return(await i.url("/profile/unlink-spotify").post().res()).ok}async function K(T){const F=await Zr(!1);if(!F)throw new Error("No access token available");const J=new URL(`${vr("access-sync",e.environment)}/spotify/sesamy-callback`);J.searchParams.set("access_token",F),J.searchParams.set("state",T),window.location.href=J.toString()}async function Z(T){const F=await i.url(`/products/${encodeURIComponent(T)}/auto-onboard`).post().json();return F.length&&rr(),F}async function de(T,F=3600){const{shortlink:J}=await mr(lm).post({url:T,ttl:F}).json();return J}async function ae(T){const F=await Zr(!1,!0);let J;const pe=T.language||Xt(),ve=nn();switch(T.target){case"account":J=new URL(`${vr("account",e.environment)}/${encodeURIComponent(T.language||pe)}/subscriptions/${encodeURIComponent(e.clientId)}${T.contractId?`/${encodeURIComponent(T.contractId)}`:""}`),J.searchParams.set("sesamy-redirect-url",T.redirectUrl||window.location.href);break;case"change-payment":J=new URL(`${vr("account",e.environment)}/${encodeURIComponent(T.language||pe)}/subscriptions/${encodeURIComponent(e.clientId)}/${encodeURIComponent(T.contractId)}/change-payment-method`),J.searchParams.set("sesamy-redirect-url",T.redirectUrl||window.location.href);break;case"change-plan":J=new URL(`${vr("account",e.environment)}/${encodeURIComponent(T.language||pe)}/subscriptions/${encodeURIComponent(e.clientId)}/${encodeURIComponent(T.contractId)}/edit-plan`),J.searchParams.set("sesamy-redirect-url",T.redirectUrl||window.location.href);break;case"consume":J=new URL(`${vr("consume",e.environment)}/${encodeURIComponent(T.language||pe)}/@${encodeURIComponent(e.clientId)}/${encodeURIComponent(T.sku)}`),T.episodeId?J.href+=`/${T.episodeId}`:J.href+="/listen",J.searchParams.set("sesamy-redirect-url",T.redirectUrl||window.location.href);break;case"checkout":J=ry(e,{language:pe,...T},ve);break;default:throw new Error("Invalid target")}return F&&(J.hash=`#access_token=${F}`),T.shorten?de(J.href,T.ttl):J.href}async function ue(T){const F=nn(),J=["_ga","_gid","_fbp","_fbc"];return document.cookie.split(";").forEach(ve=>{const me=F,[Be,M]=ve.trim().split("=");J.includes(Be)&&!me[Be]&&(me[Be]=M)}),(await o.url("/checkouts").post({language:Xt(),...T,attribution:{...F,...T.attribution},vendorId:e.clientId})).json()}async function se(T,F){return(await o.url(`/checkouts/${T}`).patch(F)).json()}async function Pe(T){return(await o.url(`/checkouts/${T}`).get()).json()}async function je(T){return(await o.url(`/paywalls/${T}`).get()).json()}async function Fe(){return(await o.url("/vendor").get()).json()}async function Ce(){return(await i.url("/vendors").get()).json()}async function Ve(T){return(await i.url(`/contracts/${encodeURIComponent(T.contractId)}/amendments`).post({amendmentType:T.amendmentType,discountCode:T.discountCode})).json()}async function lr(T){return await i.url(`/amendments/${encodeURIComponent(T)}/confirm`).post(),!0}async function fr(){const T=await Zr(!1),F=new URL(`${vr("account",e.environment)}/subscriptions/${e.clientId}`);T&&(F.hash=`#access_token=${T}`),window.location.href=F.toString()}return{autoOnboardProduct:Z,cancelContract:w,confirmAmendment:lr,createAmendment:Ve,createCheckout:ue,deleteTag:ee,deleteTally:O,deleteUserMetadata:A,generateLink:ae,getBill:g,getBills:b,getCheckout:Pe,getProxyContent:f,getContract:m,getContracts:v,getEntitlement:l,getEntitlementAccess:u,getEntitlements:s,getFulfillments:h,requestDelivery:d,getPaywall:je,getPaymentIssues:_,getProfile:Q,getProduct:re,getSubscriptions:E,getTally:N,getTallies:q,getTags:H,getTransaction:y,getTransactions:p,getUserMetadata:z,hasAccess:c,isSpotifyLinked:D,linkSpotify:K,listUserMetadata:j,openHostedAccountPage:fr,pushTally:X,setTag:x,setUserMetadata:k,unlinkSpotify:B,updateCheckout:se,updateProfile:S,getVendorSettings:Fe,listVendors:Ce}}const sy=["AdHeader","AdContainer","AD_Top","homead","ad-lead"];function uy(){return new Promise(e=>{const r=sy.map(t=>{const n=document.createElement("div");return n.innerHTML=" ",n.id=t,n.style.position="absolute",document.body.appendChild(n),n});window.setTimeout(()=>{const t=!r.every(n=>document.querySelector(`#${n.id}`)?.offsetParent);r.forEach(n=>n.remove()),e(t)},100)})}function cy(){const e=navigator.userAgent.toLowerCase(),r=[{name:"Facebook",regex:/fbav|fban/i},{name:"LinkedIn",regex:/linkedin/i},{name:"Instagram",regex:/instagram/i},{name:"Gmail",regex:/gmail/i},{name:"Twitter",regex:/twitter/i},{name:"WeChat",regex:/micromessenger/i},{name:"Line",regex:/line/i},{name:"Snapchat",regex:/snapchat/i},{name:"Pinterest",regex:/pinterest/i},{name:"Kakao",regex:/kakaotalk/i},{name:"Skype",regex:/skype/i},{name:"WhatsApp",regex:/whatsapp/i}];for(const t of r)if(t.regex.test(e))return{isInAppBrowser:!0,browserName:t.name};return/; wv\)/.test(e)?{isInAppBrowser:!0,browserName:"Unknown In-App Browser"}:{isInAppBrowser:!1,browserName:null}}const vv="sesamyFlags";async function pv(e){try{localStorage.setItem(vv,JSON.stringify(e))}catch{ye("Failed to save flags to localStorage")}}async function ly(e,r){const t=await Rn();t[e]=r,await pv(t)}async function fy(e){return(await Rn())[e]}async function dy(e){const r=await Rn();e in r&&(delete r[e],await pv(r))}async function Rn(){try{const e=localStorage.getItem(vv);return e?JSON.parse(e):{}}catch{return{}}}function hy(e){const{autoOnboardProduct:r,cancelContract:t,createCheckout:n,deleteTag:a,deleteTally:i,deleteUserMetadata:o,generateLink:s,getBill:c,getBills:l,getCheckout:u,getContract:f,getContracts:h,getEntitlement:d,getEntitlementAccess:v,getEntitlements:m,getFulfillments:w,getPaywall:E,getPaymentIssues:b,getProfile:g,getProduct:p,getProxyContent:y,getSubscriptions:k,getTags:A,getTally:j,getTallies:z,getTransaction:H,getTransactions:ee,getUserMetadata:x,getVendorSettings:N,listVendors:q,hasAccess:O,isSpotifyLinked:X,linkSpotify:re,listUserMetadata:Q,openHostedAccountPage:S,pushTally:_,requestDelivery:D,setTag:B,setUserMetadata:K,unlinkSpotify:Z,updateCheckout:de,updateProfile:ae}=oy(e),ue={analytics:{track:tv},attribution:{get:nn,set:hv},auth:{getUser:g,getTokenSilently:Zr,isAuthenticated:_t,loginWithRedirect:En,loginWithPopup:sv,login:Bg,logout:Ss,setToken:Mo},bills:{get:c,list:l},browser:{detectAdblock:uy,isInAppBrowser:cy,isIncognito:fs},checkouts:{create:n,get:u,update:de},clearCache:rr,content:{list:kg,get:ws,getLanguage:Xt,unlock:Cg,getPropertyFromHTML:Xh},contracts:{cancel:t,get:f,list:h},entitlements:{access:v,get:d,hasAccess:O,list:m,signedLinks:Ps},events:{emit:nv,cancel:xg},flags:{get:fy,set:ly,list:Rn,delete:dy},fulfillments:{list:w,requestDelivery:D},generateLink:s,getPaymentIssues:b,getVersion:vy,isReady:()=>exports.isInitialized,log:ye,paywalls:{get:E},products:{autoOnboard:r,get:p,linkSpotify:re},profile:{get:g,isSpotifyLinked:X,openHostedAccountPage:S,unlinkSpotify:Z,update:ae},proxy:{getContent:y},subscriptions:{list:k},tags:{delete:a,list:A,set:B},tallies:{delete:i,get:j,list:z,push:_},transactions:{get:H,list:ee},userMetadata:{delete:o,get:x,list:Q,set:K},vendors:{get:N,list:q},setToken:Mo};return e.namespace&&(window[e.namespace]=ue),ue}function vy(){return ys}function py(e,r){e.style.position="relative",e.style.height="200px",e.style.overflow="hidden";let n=0;const a=Array.from(e.children);for(const o of a){const s=o.offsetHeight;n+s>200?o.remove():n+=s}const i=document.createElement("style");i.innerHTML=`
|
|
34
|
+
**/var xo={d:(e,r)=>{for(var t in r)xo.o(r,t)&&!xo.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r)},ds={};xo.d(ds,{A:()=>mm,k:()=>hs});var $t=function(e,r,t,n){return new(t||(t=Promise))(function(a,i){function o(l){try{c(n.next(l))}catch(u){i(u)}}function s(l){try{c(n.throw(l))}catch(u){i(u)}}function c(l){var u;l.done?a(l.value):(u=l.value,u instanceof t?u:new t(function(f){f(u)})).then(o,s)}c((n=n.apply(e,[])).next())})},Dt=function(e,r){var t,n,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(c){return function(l){return function(u){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(o=0)),o;)try{if(t=1,n&&(a=2&u[0]?n.return:u[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;switch(n=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,n=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!((a=a.length>0&&a[a.length-1])||u[0]!==6&&u[0]!==2)){o=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(u[0]===6&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=r.call(e,o)}catch(f){u=[6,f],n=0}finally{t=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([c,l])}}};function hs(){return $t(this,void 0,Promise,function(){return Dt(this,function(e){switch(e.label){case 0:return[4,new Promise(function(r,t){var n="Unknown",a=!1;function i(h){a||(a=!0,r({isPrivate:h,browserName:n}))}function o(){var h=0,d=parseInt("-1");try{d.toFixed(d)}catch(v){h=v.message.length}return h}function s(){return navigator.msSaveBlob!==void 0&&function(h){try{return h===eval.toString().length}catch{return!1}}(39)}function c(){var h;return $t(this,void 0,void 0,function(){var d,v;return Dt(this,function(m){switch(m.label){case 0:return m.trys.push([0,2,,3]),[4,navigator.storage.getDirectory()];case 1:return m.sent(),i(!1),[3,3];case 2:return d=m.sent(),v=d,d instanceof Error&&(v=(h=d.message)!==null&&h!==void 0?h:d),typeof v!="string"?(i(!1),[2]):(i(!!v.includes("unknown transient reason")),[3,3]);case 3:return[2]}})})}function l(){var h;return $t(this,void 0,Promise,function(){return Dt(this,function(d){switch(d.label){case 0:return((h=navigator.storage)===null||h===void 0?void 0:h.getDirectory)===void 0?[3,2]:[4,c()];case 1:return d.sent(),[3,3];case 2:navigator.maxTouchPoints!==void 0?function(){var v=String(Math.random());try{var m=indexedDB.open(v,1);m.onupgradeneeded=function(w){var E=w.target.result,b=function(g){i(g)};try{E.createObjectStore("t",{autoIncrement:!0}).put(new Blob),b(!1)}catch(g){(g.message||"").includes("are not yet supported")?b(!0):b(!1)}finally{E.close(),indexedDB.deleteDatabase(v)}},m.onerror=function(){return i(!1)}}catch{i(!1)}}():function(){var v=window.openDatabase,m=window.localStorage;try{v(null,null,null,null)}catch{return void i(!0)}try{m.setItem("test","1"),m.removeItem("test")}catch{return void i(!0)}i(!1)}(),d.label=3;case 3:return[2]}})})}function u(){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(h,d){var v;i(Math.round(d/1048576)<2*Math.round(((v=window).performance!==void 0&&v.performance.memory!==void 0&&v.performance.memory.jsHeapSizeLimit!==void 0?performance.memory.jsHeapSizeLimit:1073741824)/1048576))},function(h){t(new Error("detectIncognito somehow failed to query storage quota: "+h.message))})}function f(){self.Promise!==void 0&&self.Promise.allSettled!==void 0?u():(0,window.webkitRequestFileSystem)(0,1,function(){i(!1)},function(){i(!0)})}(function(){return $t(this,void 0,Promise,function(){return Dt(this,function(h){switch(h.label){case 0:return o()!==44?[3,2]:(n="Safari",[4,l()]);case 1:return h.sent(),[3,3];case 2:o()===51?(d=navigator.userAgent,n=d.match(/Chrome/)?navigator.brave!==void 0?"Brave":d.match(/Edg/)?"Edge":d.match(/OPR/)?"Opera":"Chrome":"Chromium",f()):o()===25?(n="Firefox",i(navigator.serviceWorker===void 0)):s()?(n="Internet Explorer",i(window.indexedDB===void 0)):t(new Error("detectIncognito cannot determine the browser")),h.label=3;case 3:return[2]}var d})})})().catch(t)})];case 1:return[2,e.sent()]}})})}typeof window<"u"&&(window.detectIncognito=hs);const mm=hs;ds.A;const gm=ds.k,Jt="sesamy_incognito_mode";function vs(){try{const e=sessionStorage.getItem(Jt);return e===null?void 0:e==="true"}catch{return}}async function ym(){try{const e=sessionStorage.getItem(Jt);if(e!==null)return e==="true";const{isPrivate:r}=await gm();return sessionStorage.setItem(Jt,r.toString()),r}catch{try{sessionStorage.setItem(Jt,"false")}catch{}return!1}}function _t(){return typeof window<"u"}function Lf(e,r,t,n,a){for(r=r.split?r.split("."):r,n=0;n<r.length;n++)e=e?e[r[n]]:a;return e===a?t:e}var Mt="undefined",qf="object",No=function(){},Ch="any",Ah="*",Mr="__",rn=typeof process<"u"?process:{};rn.env&&rn.env.NODE_ENV;var qe=typeof document<"u";rn.versions!=null&&rn.versions.node!=null;typeof Deno<"u"&&Deno.core;qe&&window.name==="nodejs"||typeof navigator<"u"&&navigator.userAgent!==void 0&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));function jh(e,r){return r.charAt(0)[e]()+r.slice(1)}var wm=jh.bind(null,"toUpperCase"),bm=jh.bind(null,"toLowerCase");function Sm(e){return Uh(e)?wm("null"):typeof e=="object"?Rm(e):Object.prototype.toString.call(e).slice(8,-1)}function tn(e,r){r===void 0&&(r=!0);var t=Sm(e);return r?bm(t):t}function xt(e,r){return typeof r===e}var Ge=xt.bind(null,"function"),kr=xt.bind(null,"string"),Qr=xt.bind(null,"undefined"),Im=xt.bind(null,"boolean");xt.bind(null,"symbol");function Uh(e){return e===null}function Pm(e){return tn(e)==="number"&&!isNaN(e)}function Lh(e){return tn(e)==="array"}function Ke(e){if(!Em(e))return!1;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}function Em(e){return e&&(typeof e=="object"||e!==null)}function Rm(e){return Ge(e.constructor)?e.constructor.name:null}function _m(e){return e instanceof Error||kr(e.message)&&e.constructor&&Pm(e.constructor.stackTraceLimit)}function qh(e,r){if(typeof r!="object"||Uh(r))return!1;if(r instanceof e)return!0;var t=tn(new e(""));if(_m(r))for(;r;){if(tn(r)===t)return!0;r=Object.getPrototypeOf(r)}return!1}qh.bind(null,TypeError);qh.bind(null,SyntaxError);function Sn(e,r){var t=e instanceof Element||e instanceof HTMLDocument;return t&&r?Tm(e,r):t}function Tm(e,r){return r===void 0&&(r=""),e&&e.nodeName===r.toUpperCase()}function In(e){var r=[].slice.call(arguments,1);return function(){return e.apply(void 0,[].slice.call(arguments).concat(r))}}In(Sn,"form");In(Sn,"button");In(Sn,"input");In(Sn,"select");function Om(e){return e?Lh(e)?e:[e]:[]}function xf(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function km(){if(qe){var e=navigator,r=e.languages;return e.userLanguage||(r&&r.length?r[0]:e.language)}}function Cm(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function Am(e){return function(r){for(var t,n=Object.create(null),a=/([^&=]+)=?([^&]*)/g;t=a.exec(r);){var i=xf(t[1]),o=xf(t[2]);i.substring(i.length-2)==="[]"?(n[i=i.substring(0,i.length-2)]||(n[i]=[])).push(o):n[i]=o===""||o}for(var s in n){var c=s.split("[");c.length>1&&(jm(n,c.map(function(l){return l.replace(/[?[\]\\ ]/g,"")}),n[s]),delete n[s])}return n}(function(r){return qe&&window.location.search.substring(1)}())}function jm(e,r,t){for(var n=r.length-1,a=0;a<n;++a){var i=r[a];if(i==="__proto__"||i==="constructor")break;i in e||(e[i]={}),e=e[i]}e[r[n]]=t}function Pn(){for(var e="",r=0,t=4294967295*Math.random()|0;r++<36;){var n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"[r-1],a=15&t;e+=n=="-"||n=="4"?n:(n=="x"?a:3&a|8).toString(16),t=r%8==0?4294967295*Math.random()|0:t>>4}return e}function Um(e,r){var t,n,a,i=null,o=0,s=function(){o=new Date,i=null,a=e.apply(t,n)};return function(){var c=new Date;o||(o=c);var l=r-(c-o);return t=this,n=arguments,l<=0?(clearTimeout(i),i=null,o=c,a=e.apply(t,n)):i||(i=setTimeout(s,l)),a}}var It="global",it=Mr+"global"+Mr,ot=typeof self===qf&&self.self===self&&self||typeof global===qf&&global.global===global&&global||void 0;function Fr(e){return ot[it][e]}function Br(e,r){return ot[it][e]=r}function pt(e){delete ot[it][e]}function mt(e,r,t){var n;try{if(ps(e)){var a=window[e];n=a[r].bind(a)}}catch{}return n||t}ot[it]||(ot[it]={});var Ft={};function ps(e){if(typeof Ft[e]!==Mt)return Ft[e];try{var r=window[e];r.setItem(Mt,Mt),r.removeItem(Mt)}catch{return Ft[e]=!1}return Ft[e]=!0}function ne(){return ne=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},ne.apply(this,arguments)}var Tr="function",Sr="undefined",Lm="@@redux/"+Math.random().toString(36),Nf=function(){return typeof Symbol===Tr&&Symbol.observable||"@@observable"}(),Bt=" != "+Tr;function xh(e,r,t){var n;if(typeof r===Tr&&typeof t===Sr&&(t=r,r=void 0),typeof t!==Sr){if(typeof t!==Tr)throw new Error("enhancer"+Bt);return t(xh)(e,r)}if(typeof e!==Tr)throw new Error("reducer"+Bt);var a=e,i=r,o=[],s=o,c=!1;function l(){s===o&&(s=o.slice())}function u(){return i}function f(d){if(typeof d!==Tr)throw new Error("Listener"+Bt);var v=!0;return l(),s.push(d),function(){if(v){v=!1,l();var m=s.indexOf(d);s.splice(m,1)}}}function h(d){if(!Ke(d))throw new Error("Act != obj");if(typeof d.type===Sr)throw new Error("ActType "+Sr);if(c)throw new Error("Dispatch in reducer");try{c=!0,i=a(i,d)}finally{c=!1}for(var v=o=s,m=0;m<v.length;m++)(0,v[m])();return d}return h({type:"@@redux/INIT"}),(n={dispatch:h,subscribe:f,getState:u,replaceReducer:function(d){if(typeof d!==Tr)throw new Error("next reducer"+Bt);a=d,h({type:"@@redux/INIT"})}})[Nf]=function(){var d,v=f;return(d={subscribe:function(m){if(typeof m!="object")throw new TypeError("Observer != obj");function w(){m.next&&m.next(u())}return w(),{unsubscribe:v(w)}}})[Nf]=function(){return this},d},n}function qm(e,r){var t=r&&r.type;return"action "+(t&&t.toString()||"?")+"reducer "+e+" returns "+Sr}function st(){var e=[].slice.call(arguments);return e.length===0?function(r){return r}:e.length===1?e[0]:e.reduce(function(r,t){return function(){return r(t.apply(void 0,[].slice.call(arguments)))}})}function xm(){var e=arguments;return function(r){return function(t,n,a){var i,o=r(t,n,a),s=o.dispatch,c={getState:o.getState,dispatch:function(l){return s(l)}};return i=[].slice.call(e).map(function(l){return l(c)}),ne({},o,{dispatch:s=st.apply(void 0,i)(o.dispatch)})}}}var Cr=Mr+"anon_id",Nr=Mr+"user_id",rt=Mr+"user_traits",_r="userId",et="anonymousId",Zt=["bootstrap","params","campaign","initializeStart","initialize","initializeEnd","ready","resetStart","reset","resetEnd","pageStart","page","pageEnd","pageAborted","trackStart","track","trackEnd","trackAborted","identifyStart","identify","identifyEnd","identifyAborted","userIdChanged","registerPlugins","enablePlugin","disablePlugin","online","offline","setItemStart","setItem","setItemEnd","setItemAborted","removeItemStart","removeItem","removeItemEnd","removeItemAborted"],$o=["name","EVENTS","config","loaded"],te=Zt.reduce(function(e,r){return e[r]=r,e},{registerPluginType:function(e){return"registerPlugin:"+e},pluginReadyType:function(e){return"ready:"+e}}),$f=/^utm_/,Df=/^an_prop_/,Mf=/^an_trait_/;function Nm(e){var r=e.storage.setItem;return function(t){return function(n){return function(a){if(a.type===te.bootstrap){var i=a.params,o=a.user,s=a.persistedUser,c=a.initialUser,l=s.userId===o.userId;s.anonymousId!==o.anonymousId&&r(Cr,o.anonymousId),l||r(Nr,o.userId),c.traits&&r(rt,ne({},l&&s.traits?s.traits:{},c.traits));var u=Object.keys(a.params);if(u.length){var f=i.an_uid,h=i.an_event,d=u.reduce(function(v,m){if(m.match($f)||m.match(/^(d|g)clid/)){var w=m.replace($f,"");v.campaign[w==="campaign"?"name":w]=i[m]}return m.match(Df)&&(v.props[m.replace(Df,"")]=i[m]),m.match(Mf)&&(v.traits[m.replace(Mf,"")]=i[m]),v},{campaign:{},props:{},traits:{}});t.dispatch(ne({type:te.params,raw:i},d,f?{userId:f}:{})),f&&setTimeout(function(){return e.identify(f,d.traits)},0),h&&setTimeout(function(){return e.track(h,d.props)},0),Object.keys(d.campaign).length&&t.dispatch({type:te.campaign,campaign:d.campaign})}}return n(a)}}}}function $m(e){return function(r,t){if(r===void 0&&(r={}),t===void 0&&(t={}),t.type===te.setItemEnd){if(t.key===Cr)return ne({},r,{anonymousId:t.value});if(t.key===Nr)return ne({},r,{userId:t.value})}switch(t.type){case te.identify:return Object.assign({},r,{userId:t.userId,traits:ne({},r.traits,t.traits)});case te.reset:return[Nr,Cr,rt].forEach(function(n){e.removeItem(n)}),Object.assign({},r,{userId:null,anonymousId:null,traits:{}});default:return r}}}function Ff(e){return{userId:e.getItem(Nr),anonymousId:e.getItem(Cr),traits:e.getItem(rt)}}var Do=function(e){return Mr+"TEMP"+Mr+e};function Dm(e){var r=e.storage,t=r.setItem,n=r.removeItem,a=r.getItem;return function(i){return function(o){return function(s){var c=s.userId,l=s.traits,u=s.options;if(s.type===te.reset&&([Nr,rt,Cr].forEach(function(d){n(d)}),[_r,et,"traits"].forEach(function(d){pt(Do(d))})),s.type===te.identify){a(Cr)||t(Cr,Pn());var f=a(Nr),h=a(rt)||{};f&&f!==c&&i.dispatch({type:te.userIdChanged,old:{userId:f,traits:h},new:{userId:c,traits:l},options:u}),c&&t(Nr,c),l&&t(rt,ne({},h,l))}return o(s)}}}}var St={};function Bf(e,r){St[e]&&Ge(St[e])&&(St[e](r),delete St[e])}function Nh(e,r,t){return new Promise(function(n,a){return r()?n(e):t<1?a(ne({},e,{queue:!0})):new Promise(function(i){return setTimeout(i,10)}).then(function(i){return Nh(e,r,t-10).then(n,a)})})}function Mm(e){return{abort:e}}function $h(e,r,t){var n={},a=r(),i=e.getState(),o=i.plugins,s=i.queue,c=i.user;if(!i.context.offline&&s&&s.actions&&s.actions.length){var l=s.actions.reduce(function(f,h,d){return o[h.plugin].loaded?(f.process.push(h),f.processIndex.push(d)):(f.requeue.push(h),f.requeueIndex.push(d)),f},{processIndex:[],process:[],requeue:[],requeueIndex:[]});if(l.processIndex&&l.processIndex.length){l.processIndex.forEach(function(f){var h=s.actions[f],d=h.plugin,v=h.payload.type,m=a[d][v];if(m&&Ge(m)){var w,E=function(p,y){return p===void 0&&(p={}),y===void 0&&(y={}),[_r,et].reduce(function(k,A){return p.hasOwnProperty(A)&&y[A]&&y[A]!==p[A]&&(k[A]=y[A]),k},p)}(h.payload,c),b=n[E.meta.rid];if(!b&&(w=m({payload:E,config:o[d].config,instance:t,abort:Mm}))&&Ke(w)&&w.abort)return void(n[E.meta.rid]=!0);if(!b){var g=v+":"+d;e.dispatch(ne({},E,{type:g,_:{called:g,from:"queueDrain"}}))}}});var u=s.actions.filter(function(f,h){return!~l.processIndex.indexOf(h)});s.actions=u}}}var Eo=function(e){var r=e.data,t=e.action,n=e.instance,a=e.state,i=e.allPlugins,o=e.allMatches,s=e.store,c=e.EVENTS;try{var l=a.plugins,u=a.context,f=t.type,h=f.match(tt),d=r.exact.map(function(w){return w.pluginName});h&&(d=o.during.map(function(w){return w.pluginName}));var v=function(w,E){return function(b,g,p){var y=g.config,k=g.name,A=k+"."+b.type;p&&(A=p.event);var j=b.type.match(tt)?function(z,H,ee,x,N){return function(q,O){var X=x?x.name:z,re=O&&Tt(O)?O:ee;if(x&&(!(re=O&&Tt(O)?O:[z]).includes(z)||re.length!==1))throw new Error("Method "+H+" can only abort "+z+" plugin. "+JSON.stringify(re)+" input valid");return ne({},N,{abort:{reason:q,plugins:re,caller:H,_:X}})}}(k,A,E,p,b):function(z,H){return function(){throw new Error(z.type+" action not cancellable. Remove abort in "+H)}}(b,A);return{payload:Fm(b),instance:w,config:y||{},abort:j}}}(n,d),m=r.exact.reduce(function(w,E){var b=E.pluginName,g=E.methodName,p=!1;return g.match(/^initialize/)||g.match(/^reset/)||(p=!l[b].loaded),u.offline&&g.match(/^(page|track|identify)/)&&(p=!0),w[""+b]=p,w},{});return Promise.resolve(r.exact.reduce(function(w,E,b){try{var g=E.pluginName;return Promise.resolve(w).then(function(p){function y(){return Promise.resolve(p)}var k=function(){if(r.namespaced&&r.namespaced[g])return Promise.resolve(r.namespaced[g].reduce(function(A,j,z){try{return Promise.resolve(A).then(function(H){return j.method&&Ge(j.method)?(function(q,O){var X=Jf(q);if(X&&X.name===O){var re=Jf(X.method);throw new Error([O+" plugin is calling method "+q,"Plugins cant call self","Use "+X.method+" "+(re?"or "+re.method:"")+" in "+O+" plugin insteadof "+q].join(`
|
|
35
|
+
`))}}(j.methodName,j.pluginName),Promise.resolve(j.method({payload:H,instance:n,abort:(ee=H,x=g,N=j.pluginName,function(q,O){return ne({},ee,{abort:{reason:q,plugins:O||[x],caller:f,from:N||x}})}),config:Kf(j.pluginName,l,i),plugins:l})).then(function(q){var O=Ke(q)?q:{};return Promise.resolve(ne({},H,O))})):H;var ee,x,N})}catch(H){return Promise.reject(H)}},Promise.resolve(t))).then(function(A){p[g]=A});p[g]=t}();return k&&k.then?k.then(y):y()})}catch(p){return Promise.reject(p)}},Promise.resolve({}))).then(function(w){return Promise.resolve(r.exact.reduce(function(E,b,g){try{var p=r.exact.length===g+1,y=b.pluginName,k=i[y];return Promise.resolve(E).then(function(A){var j=w[y]?w[y]:{};if(h&&(j=A),_o(j,y))return Ro({data:j,method:f,instance:n,pluginName:y,store:s}),Promise.resolve(A);if(_o(A,y))return p&&Ro({data:A,method:f,instance:n,store:s}),Promise.resolve(A);if(m.hasOwnProperty(y)&&m[y]===!0)return s.dispatch({type:"queue",plugin:y,payload:j,_:{called:"queue",from:"queueMechanism"}}),Promise.resolve(A);var z=v(w[y],i[y]);return Promise.resolve(k[f]({abort:z.abort,payload:j,instance:n,config:Kf(y,l,i),plugins:l})).then(function(H){var ee=Ke(H)?H:{},x=ne({},A,ee),N=w[y];if(_o(N,y))Ro({data:N,method:f,instance:n,pluginName:y,store:s});else{var q=f+":"+y;(q.match(/:/g)||[]).length<2&&!f.match(zf)&&!f.match(Hf)&&n.dispatch(ne({},h?x:j,{type:q,_:{called:q,from:"submethod"}}))}return Promise.resolve(x)})})}catch(A){return Promise.reject(A)}},Promise.resolve(t))).then(function(E){if(!(f.match(tt)||f.match(/^registerPlugin/)||f.match(Hf)||f.match(zf)||f.match(/^params/)||f.match(/^userIdChanged/))){if(c.plugins.includes(f),E._&&E._.originalAction===f)return E;var b=ne({},E,{_:{originalAction:E.type,called:E.type,from:"engineEnd"}});Dh(E,r.exact.length)&&!f.match(/End$/)&&(b=ne({},b,{type:E.type+"Aborted"})),s.dispatch(b)}return E})})}catch(w){return Promise.reject(w)}},tt=/Start$/,zf=/^bootstrap/,Hf=/^ready/;function Ro(e){var r=e.pluginName,t=e.method+"Aborted"+(r?":"+r:"");e.store.dispatch(ne({},e.data,{type:t,_:{called:t,from:"abort"}}))}function Kf(e,r,t){var n=r[e]||t[e];return n&&n.config?n.config:{}}function Gf(e,r){return r.reduce(function(t,n){return n[e]?t.concat({methodName:e,pluginName:n.name,method:n[e]}):t},[])}function Wf(e,r){var t=e.replace(tt,""),n=r?":"+r:"";return[""+e+n,""+t+n,t+"End"+n]}function _o(e,r){var t=e.abort;return!!t&&(t===!0||Vf(t,r)||t&&Vf(t.plugins,r))}function Dh(e,r){var t=e.abort;if(!t)return!1;if(t===!0||kr(t))return!0;var n=t.plugins;return Tt(t)&&t.length===r||Tt(n)&&n.length===r}function Tt(e){return Array.isArray(e)}function Vf(e,r){return!(!e||!Tt(e))&&e.includes(r)}function Jf(e){var r=e.match(/(.*):(.*)/);return!!r&&{method:r[1],name:r[2]}}function Fm(e){return Object.keys(e).reduce(function(r,t){return t==="type"||(r[t]=Ke(e[t])?Object.assign({},e[t]):e[t]),r},{})}function Bm(e,r,t){var n={};return function(a){return function(i){return function(o){try{var s,c=function(p){return s?p:i(f)},l=o.type,u=o.plugins,f=o;if(o.abort)return Promise.resolve(i(o));if(l===te.enablePlugin&&a.dispatch({type:te.initializeStart,plugins:u,disabled:[],fromEnable:!0,meta:o.meta}),l===te.disablePlugin&&setTimeout(function(){return Bf(o.meta.rid,{payload:o})},0),l===te.initializeEnd){var h=r(),d=Object.keys(h),v=d.filter(function(p){return u.includes(p)}).map(function(p){return h[p]}),m=[],w=[],E=o.disabled,b=v.map(function(p){var y=p.loaded,k=p.name,A=p.config;return Nh(p,function(){return y({config:A})},1e4).then(function(j){return n[k]||(a.dispatch({type:te.pluginReadyType(k),name:k,events:Object.keys(p).filter(function(z){return!$o.includes(z)})}),n[k]=!0),m=m.concat(k),p}).catch(function(j){if(j instanceof Error)throw new Error(j);return w=w.concat(j.name),j})});Promise.all(b).then(function(p){var y={plugins:m,failed:w,disabled:E};setTimeout(function(){d.length===b.length+E.length&&a.dispatch(ne({},{type:te.ready},y))},0)})}var g=function(){if(l!==te.bootstrap)return/^ready:([^:]*)$/.test(l)&&setTimeout(function(){return $h(a,r,e)},0),Promise.resolve(function(p,y,k,A,j){try{var z=Ge(y)?y():y,H=p.type,ee=H.replace(tt,"");if(p._&&p._.called)return Promise.resolve(p);var x=k.getState(),N=(X=z,(re=x.plugins)===void 0&&(re={}),(Q=p.options)===void 0&&(Q={}),Object.keys(X).filter(function(S){var _=Q.plugins||{};return Im(_[S])?_[S]:_.all!==!1&&(!re[S]||re[S].enabled!==!1)}).map(function(S){return X[S]}));H===te.initializeStart&&p.fromEnable&&(N=Object.keys(x.plugins).filter(function(S){var _=x.plugins[S];return p.plugins.includes(S)&&!_.initialized}).map(function(S){return z[S]}));var q=N.map(function(S){return S.name}),O=function(S,_,$){var B=Wf(S).map(function(G){return Gf(G,_)});return _.reduce(function(G,Z){var de=Z.name,ae=Wf(S,de).map(function(je){return Gf(je,_)}),ue=ae[0],se=ae[1],Pe=ae[2];return ue.length&&(G.beforeNS[de]=ue),se.length&&(G.duringNS[de]=se),Pe.length&&(G.afterNS[de]=Pe),G},{before:B[0],beforeNS:{},during:B[1],duringNS:{},after:B[2],afterNS:{}})}(H,N);return Promise.resolve(Eo({action:p,data:{exact:O.before,namespaced:O.beforeNS},state:x,allPlugins:z,allMatches:O,instance:k,store:A,EVENTS:j})).then(function(S){function _(){var G=function(){if(H.match(tt))return Promise.resolve(Eo({action:ne({},$,{type:ee+"End"}),data:{exact:O.after,namespaced:O.afterNS},state:x,allPlugins:z,allMatches:O,instance:k,store:A,EVENTS:j})).then(function(Z){Z.meta&&Z.meta.hasCallback&&Bf(Z.meta.rid,{payload:Z})})}();return G&&G.then?G.then(function(){return S}):S}if(Dh(S,q.length))return S;var $,B=function(){if(H!==ee)return Promise.resolve(Eo({action:ne({},S,{type:ee}),data:{exact:O.during,namespaced:O.duringNS},state:x,allPlugins:z,allMatches:O,instance:k,store:A,EVENTS:j})).then(function(G){$=G});$=S}();return B&&B.then?B.then(_):_()})}catch(S){return Promise.reject(S)}var X,re,Q}(o,r,e,a,t)).then(function(p){return s=1,i(p)})}();return Promise.resolve(g&&g.then?g.then(c):c(g))}catch(p){return Promise.reject(p)}}}}}function zm(e){return function(r){return function(t){return function(n){var a=n.type,i=n.key,o=n.value,s=n.options;if(a===te.setItem||a===te.removeItem){if(n.abort)return t(n);a===te.setItem?e.setItem(i,o,s):e.removeItem(i,s)}return t(n)}}}}var Hm=function(){var e=this;this.before=[],this.after=[],this.addMiddleware=function(r,t){e[t]=e[t].concat(r)},this.removeMiddleware=function(r,t){var n=e[t].findIndex(function(a){return a===r});n!==-1&&(e[t]=[].concat(e[t].slice(0,n),e[t].slice(n+1)))},this.dynamicMiddlewares=function(r){return function(t){return function(n){return function(a){var i={getState:t.getState,dispatch:function(s){return t.dispatch(s)}},o=e[r].map(function(s){return s(i)});return st.apply(void 0,o)(n)(a)}}}}};function Km(e){return function(r,t){r===void 0&&(r={});var n={};if(t.type==="initialize:aborted")return r;if(/^registerPlugin:([^:]*)$/.test(t.type)){var a=Zf(t.type,"registerPlugin"),i=e()[a];if(!i||!a)return r;var o=t.enabled,s=i.config;return n[a]={enabled:o,initialized:!!o&&!i.initialize,loaded:!!o&&!!i.loaded({config:s}),config:s},ne({},r,n)}if(/^initialize:([^:]*)$/.test(t.type)){var c=Zf(t.type,te.initialize),l=e()[c];return l&&c?(n[c]=ne({},r[c],{initialized:!0,loaded:!!l.loaded({config:l.config})}),ne({},r,n)):r}if(/^ready:([^:]*)$/.test(t.type))return n[t.name]=ne({},r[t.name],{loaded:!0}),ne({},r,n);switch(t.type){case te.disablePlugin:return ne({},r,Yf(t.plugins,!1,r));case te.enablePlugin:return ne({},r,Yf(t.plugins,!0,r));default:return r}}}function Zf(e,r){return e.substring(r.length+1,e.length)}function Yf(e,r,t){return e.reduce(function(n,a){return n[a]=ne({},t[a],{enabled:r}),n},t)}function Mh(e){try{return JSON.parse(JSON.stringify(e))}catch{}return e}var Gm={last:{},history:[]};function Wm(e,r){e===void 0&&(e=Gm);var t=r.options,n=r.meta;if(r.type===te.track){var a=Mh(ne({event:r.event,properties:r.properties},Object.keys(t).length&&{options:t},{meta:n}));return ne({},e,{last:a,history:e.history.concat(a)})}return e}var Vm={actions:[]};function Jm(e,r){e===void 0&&(e=Vm);var t=r.payload;switch(r.type){case"queue":var n;return n=t&&t.type&&t.type===te.identify?[r].concat(e.actions):e.actions.concat(r),ne({},e,{actions:n});case"dequeue":return[];default:return e}}var Fh=/#.*$/;function Zm(e){var r=/(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(e);return"/"+(r&&r[3]?r[3].split("?")[0].replace(Fh,""):"")}var Bh,zh,Hh,Kh,Ym=function(e){if(e===void 0&&(e={}),!qe)return e;var r=document,t=r.title,n=r.referrer,a=window,i=a.location,o=a.innerWidth,s=a.innerHeight,c=i.hash,l=i.search,u=function(h){var d=function(){if(qe){for(var v,m=document.getElementsByTagName("link"),w=0;v=m[w];w++)if(v.getAttribute("rel")==="canonical")return v.getAttribute("href")}}();return d?d.match(/\?/)?d:d+h:window.location.href.replace(Fh,"")}(l),f={title:t,url:u,path:Zm(u),hash:c,search:l,width:o,height:s};return n&&n!==""&&(f.referrer=n),ne({},f,e)},Xm={last:{},history:[]};function Qm(e,r){e===void 0&&(e=Xm);var t=r.options;if(r.type===te.page){var n=Mh(ne({properties:r.properties,meta:r.meta},Object.keys(t).length&&{options:t}));return ne({},e,{last:n,history:e.history.concat(n)})}return e}Bh=function(){if(!qe)return!1;var e=navigator.appVersion;return~e.indexOf("Win")?"Windows":~e.indexOf("Mac")?"MacOS":~e.indexOf("X11")?"UNIX":~e.indexOf("Linux")?"Linux":"Unknown OS"}(),zh=qe?document.referrer:null,Hh=km(),Kh=Cm();var Xf={initialized:!1,sessionId:Pn(),app:null,version:null,debug:!1,offline:!!qe&&!navigator.onLine,os:{name:Bh},userAgent:qe?navigator.userAgent:"node",library:{name:"analytics",version:"0.12.13"},timezone:Kh,locale:Hh,campaign:{},referrer:zh};function eg(e,r){e===void 0&&(e=Xf);var t=e.initialized,n=r.campaign;switch(r.type){case te.campaign:return ne({},e,{campaign:n});case te.offline:return ne({},e,{offline:!0});case te.online:return ne({},e,{offline:!1});default:return t?e:ne({},Xf,e,{initialized:!0})}}var rg=["plugins","reducers","storage"];function tg(e,r,t){if(qe){var n=window[(t?"add":"remove")+"EventListener"];e.split(" ").forEach(function(a){n(a,r)})}}function ng(e){var r=tg.bind(null,"online offline",function(t){return Promise.resolve(!navigator.onLine).then(e)});return r(!0),function(t){return r(!1)}}function Gh(){return Br("analytics",[]),function(e){return function(r,t,n){var a=e(r,t,n),i=a.dispatch;return Object.assign(a,{dispatch:function(o){return ot[it].analytics.push(o.action||o),i(o)}})}}}function Qf(e){return function(){return st(st.apply(null,arguments),Gh())}}function To(e){return e?Lh(e)?e:[e]:[]}function ed(e,r,t){e===void 0&&(e={});var n,a,i=Pn();return r&&(St[i]=(n=r,a=function(o){for(var s,c=o||Array.prototype.slice.call(arguments),l=0;l<c.length;l++)if(Ge(c[l])){s=c[l];break}return s}(t),function(o){a&&a(o),n(o)})),ne({},e,{rid:i,ts:new Date().getTime()},r?{hasCallback:!0}:{})}function ag(e){e===void 0&&(e={});var r=e.reducers||{},t=e.initialUser||{},n=(e.plugins||[]).reduce(function(S,_){if(Ge(_))return S.middlewares=S.middlewares.concat(_),S;if(_.NAMESPACE&&(_.name=_.NAMESPACE),!_.name)throw new Error("https://lytics.dev/errors/1");_.config||(_.config={});var $=_.EVENTS?Object.keys(_.EVENTS).map(function(Z){return _.EVENTS[Z]}):[];S.pluginEnabled[_.name]=!(_.enabled===!1||_.config.enabled===!1),delete _.enabled,_.methods&&(S.methods[_.name]=Object.keys(_.methods).reduce(function(Z,de){var ae;return Z[de]=(ae=_.methods[de],function(){for(var ue=Array.prototype.slice.call(arguments),se=new Array(ae.length),Pe=0;Pe<ue.length;Pe++)se[Pe]=ue[Pe];return se[se.length]=y,ae.apply({instance:y},se)}),Z},{}),delete _.methods);var B=Object.keys(_).concat($),G=new Set(S.events.concat(B));if(S.events=Array.from(G),S.pluginsArray=S.pluginsArray.concat(_),S.plugins[_.name])throw new Error(_.name+"AlreadyLoaded");return S.plugins[_.name]=_,S.plugins[_.name].loaded||(S.plugins[_.name].loaded=function(){return!0}),S},{plugins:{},pluginEnabled:{},methods:{},pluginsArray:[],middlewares:[],events:[]}),a=e.storage?e.storage:{getItem:Fr,setItem:Br,removeItem:pt},i=function(S){return function(_,$,B){return $.getState("user")[_]||(B&&Ke(B)&&B[_]?B[_]:Ff(S)[_]||Fr(Do(_))||null)}}(a),o=n.plugins,s=n.events.filter(function(S){return!$o.includes(S)}).sort(),c=new Set(s.concat(Zt).filter(function(S){return!$o.includes(S)})),l=Array.from(c).sort(),u=function(){return o},f=new Hm,h=f.addMiddleware,d=f.removeMiddleware,v=f.dynamicMiddlewares,m=function(){throw new Error("Abort disabled inListener")},w=Am(),E=Ff(a),b=ne({},E,t,w.an_uid?{userId:w.an_uid}:{},w.an_aid?{anonymousId:w.an_aid}:{});b.anonymousId||(b.anonymousId=Pn());var g=ne({enable:function(S,_){return new Promise(function($){O.dispatch({type:te.enablePlugin,plugins:To(S),_:{originalAction:te.enablePlugin}},$,[_])})},disable:function(S,_){return new Promise(function($){O.dispatch({type:te.disablePlugin,plugins:To(S),_:{originalAction:te.disablePlugin}},$,[_])})}},n.methods),p=!1,y={identify:function(S,_,$,B){try{var G=kr(S)?S:null,Z=Ke(S)?S:_,de=$||{},ae=y.user();Br(Do(_r),G);var ue=G||Z.userId||i(_r,y,Z);return Promise.resolve(new Promise(function(se){O.dispatch(ne({type:te.identifyStart,userId:ue,traits:Z||{},options:de,anonymousId:ae.anonymousId},ae.id&&ae.id!==G&&{previousId:ae.id}),se,[_,$,B])}))}catch(se){return Promise.reject(se)}},track:function(S,_,$,B){try{var G=Ke(S)?S.event:S;if(!G||!kr(G))throw new Error("EventMissing");var Z=Ke(S)?S:_||{},de=Ke($)?$:{};return Promise.resolve(new Promise(function(ae){O.dispatch({type:te.trackStart,event:G,properties:Z,options:de,userId:i(_r,y,_),anonymousId:i(et,y,_)},ae,[_,$,B])}))}catch(ae){return Promise.reject(ae)}},page:function(S,_,$){try{var B=Ke(S)?S:{},G=Ke(_)?_:{};return Promise.resolve(new Promise(function(Z){O.dispatch({type:te.pageStart,properties:Ym(B),options:G,userId:i(_r,y,B),anonymousId:i(et,y,B)},Z,[S,_,$])}))}catch(Z){return Promise.reject(Z)}},user:function(S){if(S===_r||S==="id")return i(_r,y);if(S===et||S==="anonId")return i(et,y);var _=y.getState("user");return S?Lf(_,S):_},reset:function(S){return new Promise(function(_){O.dispatch({type:te.resetStart},_,S)})},ready:function(S){return p&&S({plugins:g,instance:y}),y.on(te.ready,function(_){S(_),p=!0})},on:function(S,_){if(!S||!Ge(_))return!1;if(S===te.bootstrap)throw new Error(".on disabled for "+S);var $=/Start$|Start:/;if(S==="*"){var B=function(ae){return function(ue){return function(se){return se.type.match($)&&_({payload:se,instance:y,plugins:o}),ue(se)}}},G=function(ae){return function(ue){return function(se){return se.type.match($)||_({payload:se,instance:y,plugins:o}),ue(se)}}};return h(B,zt),h(G,Ht),function(){d(B,zt),d(G,Ht)}}var Z=S.match($)?zt:Ht,de=function(ae){return function(ue){return function(se){return se.type===S&&_({payload:se,instance:y,plugins:o,abort:m}),ue(se)}}};return h(de,Z),function(){return d(de,Z)}},once:function(S,_){if(!S||!Ge(_))return!1;if(S===te.bootstrap)throw new Error(".once disabled for "+S);var $=y.on(S,function(B){_({payload:B.payload,instance:y,plugins:o,abort:m}),$()});return $},getState:function(S){var _=O.getState();return S?Lf(_,S):Object.assign({},_)},dispatch:function(S){var _=kr(S)?{type:S}:S;if(Zt.includes(_.type))throw new Error("reserved action "+_.type);var $=ne({},_,{_:ne({originalAction:_.type},S._||{})});O.dispatch($)},enablePlugin:g.enable,disablePlugin:g.disable,plugins:g,storage:{getItem:a.getItem,setItem:function(S,_,$){O.dispatch({type:te.setItemStart,key:S,value:_,options:$})},removeItem:function(S,_){O.dispatch({type:te.removeItemStart,key:S,options:_})}},setAnonymousId:function(S,_){y.storage.setItem(Cr,S,_)},events:{core:Zt,plugins:s}},k=n.middlewares.concat([function(S){return function(_){return function($){return $.meta||($.meta=ed()),_($)}}},v(zt),Bm(y,u,{all:l,plugins:s}),zm(a),Nm(y),Dm(y),v(Ht)]),A={context:eg,user:$m(a),page:Qm,track:Wm,plugins:Km(u),queue:Jm},j=st,z=st;if(qe&&e.debug){var H=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;H&&(j=H({trace:!0,traceLimit:25})),z=function(){return arguments.length===0?Gh():Ke(typeof arguments[0])?Qf():Qf().apply(null,arguments)}}var ee,x=function(S){return Object.keys(S).reduce(function(_,$){return rg.includes($)||(_[$]=S[$]),_},{})}(e),N=n.pluginsArray.reduce(function(S,_){var $=_.name,B=_.config,G=_.loaded,Z=n.pluginEnabled[$];return S[$]={enabled:Z,initialized:!!Z&&!_.initialize,loaded:!!G({config:B}),config:B},S},{}),q={context:x,user:b,plugins:N},O=xh(function(S){for(var _=Object.keys(S),$={},B=0;B<_.length;B++){var G=_[B];typeof S[G]===Tr&&($[G]=S[G])}var Z,de=Object.keys($);try{(function(ae){Object.keys(ae).forEach(function(ue){var se=ae[ue];if(typeof se(void 0,{type:"@@redux/INIT"})===Sr||typeof se(void 0,{type:Lm})===Sr)throw new Error("reducer "+ue+" "+Sr)})})($)}catch(ae){Z=ae}return function(ae,ue){if(ae===void 0&&(ae={}),Z)throw Z;for(var se=!1,Pe={},je=0;je<de.length;je++){var Fe=de[je],Ce=ae[Fe],Ve=(0,$[Fe])(Ce,ue);if(typeof Ve===Sr){var lr=qm(Fe,ue);throw new Error(lr)}Pe[Fe]=Ve,se=se||Ve!==Ce}return se?Pe:ae}}(ne({},A,r)),q,z(j(xm.apply(void 0,k))));O.dispatch=(ee=O.dispatch,function(S,_,$){var B=ne({},S,{meta:ed(S.meta,_,To($))});return ee.apply(null,[B])});var X=Object.keys(o);O.dispatch({type:te.bootstrap,plugins:X,config:x,params:w,user:b,initialUser:t,persistedUser:E});var re=X.filter(function(S){return n.pluginEnabled[S]}),Q=X.filter(function(S){return!n.pluginEnabled[S]});return O.dispatch({type:te.registerPlugins,plugins:X,enabled:n.pluginEnabled}),n.pluginsArray.map(function(S,_){var $=S.bootstrap,B=S.config,G=S.name;$&&Ge($)&&$({instance:y,config:B,payload:S}),O.dispatch({type:te.registerPluginType(G),name:G,enabled:n.pluginEnabled[G],plugin:S}),n.pluginsArray.length===_+1&&O.dispatch({type:te.initializeStart,plugins:re,disabled:Q})}),ng(function(S){O.dispatch({type:S?te.offline:te.online})}),function(S,_,$){setInterval(function(){return $h(S,_,$)},3e3)}(O,u,y),y}var zt="before",Ht="after",Pt="cookie",Lr=Jh(),Wh=En,ig=En;function Vh(e){return Lr?En(e,"",-1):pt(e)}function Jh(){if(Lr!==void 0)return Lr;var e="cookiecookie";try{En(e,e),Lr=document.cookie.indexOf(e)!==-1,Vh(e)}catch{Lr=!1}return Lr}function En(e,r,t,n,a,i){if(typeof window<"u"){var o=arguments.length>1;return Lr===!1&&(o?Br(e,r):Fr(e)),o?document.cookie=e+"="+encodeURIComponent(r)+(t?"; expires="+new Date(+new Date+1e3*t).toUTCString()+(n?"; path="+n:"")+(a?"; domain="+a:"")+(i?"; secure":""):""):decodeURIComponent((("; "+document.cookie).split("; "+e+"=")[1]||"").split(";")[0])}}var Et="localStorage",og=ps.bind(null,"localStorage");mt("localStorage","getItem",Fr);mt("localStorage","setItem",Br);mt("localStorage","removeItem",pt);var Rt="sessionStorage",sg=ps.bind(null,"sessionStorage");mt("sessionStorage","getItem",Fr);mt("sessionStorage","setItem",Br);mt("sessionStorage","removeItem",pt);function nt(e){var r=e;try{if((r=JSON.parse(e))==="true")return!0;if(r==="false")return!1;if(Ke(r))return r;parseFloat(r)===r&&(r=parseFloat(r))}catch{}if(r!==null&&r!=="")return r}var ug=og(),cg=sg(),lg=Jh();function $r(e,r){if(e){var t=ms(r),n=!bs(t),a=gs(t)?nt(localStorage.getItem(e)):void 0;if(n&&!Qr(a))return a;var i=ys(t)?nt(Wh(e)):void 0;if(n&&i)return i;var o=ws(t)?nt(sessionStorage.getItem(e)):void 0;if(n&&o)return o;var s=Fr(e);return n?s:{localStorage:a,sessionStorage:o,cookie:i,global:s}}}function nn(e,r,t){if(e&&!Qr(r)){var n={},a=ms(t),i=JSON.stringify(r),o=!bs(a);return gs(a)&&(n[Et]=Kt(Et,r,nt(localStorage.getItem(e))),localStorage.setItem(e,i),o)?n[Et]:ys(a)&&(n[Pt]=Kt(Pt,r,nt(Wh(e))),ig(e,i),o)?n[Pt]:ws(a)&&(n[Rt]=Kt(Rt,r,nt(sessionStorage.getItem(e))),sessionStorage.setItem(e,i),o)?n[Rt]:(n[It]=Kt(It,r,Fr(e)),Br(e,r),o?n[It]:n)}}function fg(e,r){if(e){var t=ms(r),n=$r(e,Ah),a={};return!Qr(n.localStorage)&&gs(t)&&(localStorage.removeItem(e),a[Et]=n.localStorage),!Qr(n.cookie)&&ys(t)&&(Vh(e),a[Pt]=n.cookie),!Qr(n.sessionStorage)&&ws(t)&&(sessionStorage.removeItem(e),a[Rt]=n.sessionStorage),!Qr(n.global)&&Rn(t,It)&&(pt(e),a[It]=n.global),a}}function ms(e){return e?kr(e)?e:e.storage:Ch}function gs(e){return ug&&Rn(e,Et)}function ys(e){return lg&&Rn(e,Pt)}function ws(e){return cg&&Rn(e,Rt)}function bs(e){return e===Ah||e==="all"}function Rn(e,r){return e===Ch||e===r||bs(e)}function Kt(e,r,t){return{location:e,current:r,previous:t}}var dg={setItem:nn,getItem:$r,removeItem:fg};function hg(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function rd(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function td(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?rd(Object(t),!0).forEach(function(n){hg(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):rd(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function vg(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r={storage:dg};return ag(td(td({},r),e))}const Zh="@sesamy/sesamy-js",Ss="1.37.10";function pg(e){if(typeof window>"u")return;const{addEventListener:r,history:t,location:n}=window;let a=n.pathname;r("popstate",()=>e(n.pathname)),["push","replace"].map(i=>{const o=`${i}State`;if(o!=="pushState"&&o!=="replaceState")return;const s=t[o];t[o]=function(...c){const l=c[2]?.toString()||"",u=gg(l);return a!==u&&(a=u,setTimeout(()=>e(l),0)),s.apply(t,c)}})}function mg(e,r){const t=e.indexOf(r);return t>-1?e.slice(0,t):e}function gg(e){return["#","?"].forEach(r=>e=mg(e,r)),e}function yg(){pg(()=>{br.page()})}function wg(e){if(e===void 0&&(e={}),!qe)return No;var r=ad(),t=Mo(),n=nd(),a=Gt(n,r),i=Gt(t,r),o=[],s=[],c=[],l=n,u=a,f=i,h=Object.keys(e);if(!h.length)return No;var d=h.map(function(m){return Number(m)}),v=Um(function(){var m=ad(),w=function(x,N){return N.map(function(q){return q===100?x-5:x*(q/100)})}(m,d),E=Mo(),b=nd(),g=Gt(b,m),p=Gt(E,m);if(u=g>u?g:u,f=p<f?p:f,!(o.length>=d.length)){var y=l===b,k="up";y?k="initial":l<=b&&(k="down");var A=w,j=d;(k==="up"||y)&&(A=w.slice().reverse(),j=d.slice().reverse());var z=j.reduce(function(x,N,q){var O=A[q];return c.includes(N)&&b<=O&&(c=c.filter(function(X){return X!==N}),x.singleFunction=N),k==="down"&&!o.includes(N)&&b>=O&&N>i?(s.push(N),x.callbacks=x.callbacks.concat(N),x):k==="up"&&!o.includes(N)&&b<=O&&N<=g?(x.foundFunc=[N],x):(y&&b>=O&&x.foundFunc.length===0&&(x.foundFunc=[N]),!s.includes(N)&&b>=O&&(s.push(N),x.singleFunction?c.push(N):x.singleFunction=N),x)},{foundFunc:[],singleFunction:null,callbacks:[],direction:k});if(l=b,k==="down"&&z.callbacks&&z.callbacks.forEach(function(x){Ge(e[x])&&(e[x]({trigger:x,direction:k,scrollMin:f,scrollMax:u,range:[f,u]}),o.push(x))}),z.singleFunction){var H=z.singleFunction,ee=z.direction;Ge(e[H])&&e[H]({trigger:H,direction:ee,scrollMin:f,scrollMax:u,range:[f,u]}),o.push(H)}}},500);return window.addEventListener("scroll",v),function(){return window.removeEventListener("scroll",v)}}function Mo(){return qe?document.body.scrollTop||document.documentElement.scrollTop:0}function bg(){return qe?window.innerHeight||document.documentElement.clientHeight:0}function nd(){return Math.round(Mo()+bg())}function ad(){if(!qe)return 0;var e=document.body,r=document.documentElement;return Math.max(e.scrollHeight,e.offsetHeight,r.clientHeight,r.scrollHeight,r.offsetHeight)}function Gt(e,r){return Math.round(e/r*100)}var id="EventListener";function Sg(e){return function(r,t,n,a){var i=n||No,o=a||!1;if(!qe)return i;var s=an(t),c=an(r,!0);if(!c.length)throw new Error("noElements");if(!s.length)throw new Error("noEvent");var l=[];return function u(f){f&&(l=[]);for(var h=f?"add"+id:"remove"+id,d=0;d<c.length;d++){var v=c[d];l[d]=f?o&&o.once?Ig(i):i:l[d]||i;for(var m=0;m<s.length;m++)v[h]?v["on"+s[m]]=f?l[d]:null:v[h](s[m],l[d],o)}return u.bind(null,!f)}(e)}}function an(e,r){if(kr(e))return r?an(document.querySelectorAll(e)):(t=e).split(t.indexOf(",")>-1?",":" ").map(function(o){return o.trim()});var t;if(NodeList.prototype.isPrototypeOf(e)){for(var n=[],a=e.length>>>0;a--;)n[a]=e[a];return n}var i=Om(e);return r?i.map(function(o){return kr(o)?an(o,!0):o}).flat():i}function Ig(e,r){var t;return function(){return e&&(t=e.apply(this,arguments),e=null),t}}var Oo=Sg("Event");function Yh(e,r){return qe&&Ge(window[e])?(t=window[e],n=r,(a=window)===void 0&&(a=null),Ge(t)?function(){t.apply(a,arguments),n.apply(a,arguments)}:n):window[e]=r;var t,n,a}Yh.bind(null,"onerror");Yh.bind(null,"onload");var Xh=typeof window>"u",od="hidden";function Pg(e){if(Xh)return!1;var r=Eg(),t="".concat(r.replace(/[H|h]idden/,""),"visibilitychange"),n=function(){return e(!!document[r])},a=function(){return document.addEventListener(t,n)};return a(),function(){return document.removeEventListener(t,n),a}}function Eg(){var e=["webkit","moz","ms","o"];return Xh||od in document?od:e.reduce(function(r,t){var n=t+"Hidden";return!r&&n in document?n:r},null)}var Rg=["mousemove","mousedown","touchmove","touchstart","touchend","keydown"];function _g(e,r){r===void 0&&(r={});var t=function(o,s){var c=this,l=!1;return function(u){l||(o.call(c,u),l=!0,setTimeout(function(){return l=!1},s))}}(e,r.throttle||1e4),n=[];function a(){var o=Pg(function(s){s||t({type:"tabVisible"})});return n=[o].concat(Rg.map(function(s){return Oo(document,s,t)})).concat(Oo(window,"load",t)).concat(Oo(window,"scroll",t,{capture:!0,passive:!0})),i}function i(){n.map(function(o){return o()})}return a(),function(){return i(),a}}function Tg(e){var r,t,n=e.onIdle,a=e.onWakeUp,i=e.onHeartbeat,o=e.timeout,s=o,c=e.throttle,l=c===void 0?2e3:c,u=!1,f=!1,h=new Date,d=function(){return clearTimeout(r)};function v(w){d(),i&&!u&&i(bt(h),w),a&&u&&(u=!1,a(bt(t),w),h=new Date),r=setTimeout(function(){u=!0,n&&(t=new Date,n(bt(h),w))},s)}var m=_g(v,{throttle:l});return{disable:function(){f=!0,u=!1,d();var w=m();return function(){return f=!1,h=new Date,v({type:"load"}),w()}},getStatus:function(){return{isIdle:u,isDisabled:f,active:u?0:bt(h,f),idle:u?bt(t,f):0}}}}function bt(e,r){return r?0:Math.round((new Date-e)/1e3)}const sd=5e3;class Og{element;isInViewport=!1;isAwake=!1;isFlushing;observer;lastEventAt=Date.now();registeredView=!1;viewCallback;activeDurationCallback;idleDurationCallback;scrollCallback;constructor(r){this.element=r.element,this.viewCallback=r.viewCallback,this.activeDurationCallback=r.activeDurationCallback,this.idleDurationCallback=r.idleDurationCallback,this.scrollCallback=r.scrollCallback,this.observer=new IntersectionObserver(t=>{t.forEach(n=>{this.handleInViewPort(n.isIntersecting)})},{threshold:0}),this.observer.observe(this.element),Tg({onIdle:t=>this.handleAwake(!1,t),onWakeUp:t=>this.handleAwake(!0,t),timeout:sd}),wg({25:this.handleScroll.bind(this),50:this.handleScroll.bind(this),75:this.handleScroll.bind(this),90:this.handleScroll.bind(this),100:this.handleScroll.bind(this)})}flush(){this.isFlushing=!0,this.handleAwake(!this.isAwake)}handleInViewPort(r){r?(this.isAwake=!0,this.trackInViewport()):this.handleAwake(!1),this.isInViewport=r}handleAwake(r,t=Math.round((Date.now()-this.lastEventAt)/1e3)){this.isAwake=r,this.lastEventAt=r?Date.now()-t*sd:Date.now(),this.isInViewport&&this.trackAwake(r,t)}handleScroll(r){this.scrollCallback&&this.scrollCallback(r)}handleVisibilityChange(){this.isAwake=!1;const r=Math.round((Date.now()-this.lastEventAt)/1e3);r>1&&(this.lastEventAt=Date.now(),this.trackAwake(!1,r))}trackAwake(r,t){!r&&this.activeDurationCallback&&this.activeDurationCallback(t,this.isFlushing,this.lastEventAt),r&&this.idleDurationCallback&&this.idleDurationCallback(t,this.isFlushing,this.lastEventAt)}trackInViewport(){this.registeredView||(this.registeredView=!0,this.viewCallback&&this.viewCallback())}}function Qh(e){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e):e()}function kg(e,r){r=r||{};var t,n,a=[],i=r.max||1/0;function o(){clearInterval(t),e(a.splice(0,i)),s()}function s(){t=setInterval(o,r.interval||1e4)}return s(),{flush:o,push:function(c){return n=a.push(c),n>=i&&o(),n},size:function(){return a.length},end:function(c){c&&o(),clearInterval(t)}}}const ud="sesamy_session_id";function Cg(){let e=sessionStorage.getItem(ud);return e||(e=Math.random().toString(36).slice(2,9),sessionStorage.setItem(ud,e)),e}function ev(e){function r(n){return n.id?`#${n.id}`:n.classList.length>0?Array.from(n.classList).map(i=>`.${i}`).join(""):null}function t(n){const a=[];let i=n;for(;i&&i!==document.body&&i!==document.documentElement;){const o=r(i);if(o){a.unshift(o);break}if(i.parentElement){const s=Array.from(i.parentElement.children),c=s.indexOf(i)+1,l=i.tagName.toLowerCase();s.filter(f=>f.tagName.toLowerCase()===l).length>1?a.unshift(`${l}:nth-child(${c})`):a.unshift(l)}i=i.parentElement}return a.join(" > ")}return t(e)}let Ze={article:{selector:"sesamy-article"},image:{selector:"img",attribute:"src"},title:{selector:"h1",attribute:"textContent"},excerpt:{selector:"p",attribute:"textContent"},price:{selector:"sesamy-article",attribute:"price"},currency:{selector:"sesamy-article",attribute:"currency"},url:{selector:"sesamy-article",attribute:"item-src"},accessLevel:{selector:"sesamy-article",attribute:"access-level"},id:{selector:"sesamy-article",attribute:"publisher-content-id"},pass:{selector:"sesamy-article",attribute:"pass"}},Yt;function Ag(e,r){Ze={...Ze,...e.content?.article},Yt=r}function jg(e,r){const{selector:t}=r;return t===Ze.article.selector?e:e.querySelector(t)}function rv(e,r){if(e)return r.attribute?r.attribute==="textContent"?e.textContent??void 0:e.getAttribute(r.attribute)??rv(e.parentElement,r):e.textContent??void 0}function at(e){const r=document.head.querySelectorAll(`[property~='${e}'][content]`);for(let n=0;n<r.length;n+=1)if(r[n].content)return r[n].content;const t=document.head.querySelectorAll(`[name~='${e}'][content]`);for(let n=0;n<t.length;n+=1)if(t[n].content)return t[n].content}function tv({publisherContentId:e,key:r,defaultValue:t=""}){return(e?document.body.querySelector(`sesamy-content-data[id='${e}']`):null)?.getAttribute(r)||at(`sesamy:${r}`)||at(`og:${r}`)||at(r)||t}function Ug(){const e=document.querySelectorAll(Ze.article.selector);return Array.from(e).map(Is).filter(r=>r!==null)}function Is(e){const r=typeof e=="string"?document.querySelector(e):e;if(!r)return null;const t={element:r,selector:typeof e=="string"?e:ev(r)},n=(a,i,o,s)=>{const c=jg(r,i);if(c){const l=rv(c,i)||tv({publisherContentId:o,key:a});l!==void 0&&(t[a]=s?s(l):l)}};return n("id",Ze.id),n("title",Ze.title,t.id),n("excerpt",Ze.excerpt,t.id),n("image",Ze.image,t.id),n("price",Ze.price,t.id,a=>parseFloat(a)),n("currency",Ze.currency,t.id),n("url",Ze.url,t.id),n("pass",Ze.pass,t.id),n("accessLevel",Ze.accessLevel,t.id,a=>a||"entitlement"),t}async function Lg(e,r){const t=typeof e=="string"?document.querySelector(e):e;if(!t)throw new Error("Could not find element");const n=Is(t);if(!n?.url)throw new Error("Could not find content for element");const a=await Yt.entitlements.hasAccess(n.url||"",n.pass?.split(",")||[]);if(!a)throw new Error("User does not have access to the content");const i=await Yt.entitlements.access(a.id);if(!i.token)throw new Error("Could not get access token");const o=r||ev(t.parentElement||t);return Yt.proxy.getContent(i.token,n.url,o)}let nv=!1,Xt,on,Fo;function av(e){return JSON.stringify(e.map(r=>{const{campaign:t,...n}=r.properties||{};return{anonymousId:r.anonymousId,userId:r.userId,type:r.type,properties:n,clientId:Fo,requestId:Math.random().toString(36).slice(2,9),sessionId:Cg(),timestamp:new Date().toISOString(),version:Ss,event:r.event,context:{...r.context,page:{url:window.location.href,title:document.title,referrer:document.referrer,itemSrc:at("sesamy:item-src"),publisherContentId:at("sesamy:publisher-content-id")},campaign:t,locale:navigator.language,library:Zh,userAgent:navigator.userAgent,clientId:Fo}}}))}const iv=kg(async e=>{if(e.length>0){const r=av(e);nv?navigator.sendBeacon(on,r):(await fetch(on,{method:"POST",body:r,headers:{"Content-Type":"text/plain"}})).ok}},{max:10,interval:3e3});function ko(e){if(e.anonymousId)if(e.properties?.flushing){const r={...e};delete r.properties.flushing,navigator.sendBeacon(on,av([r]))}else iv.push(e)}function qg(){return nv=!0,iv.flush()}function xg(e,r,t){Xt=r,on=`${vr("logs",t)}/events`,Fo=e}const Ng={name:"custom-analytics-plugin",page:({payload:e})=>{if(!Xt)return;const{properties:r,anonymousId:t,userId:n,event:a}=e;ko({anonymousId:t,userId:n,properties:r,event:a,type:"page"})},track:({payload:e})=>{if(!Xt)return;const{properties:r,anonymousId:t,userId:n,event:a}=e;ko({anonymousId:t,userId:n,properties:r,event:a,type:"track"})},identify:({payload:e})=>{if(!Xt)return;const{properties:r,anonymousId:t,userId:n}=e;ko({anonymousId:t,userId:n,properties:r,type:"identify"})}},cd=["source","medium","campaign","term","content"],Or="utm_",$g=30*60*1e3;function ov(e){return e?Date.now()-parseInt(e,10)>$g:!0}function ld(){const e=document.referrer||"";if(!e)return;const r=$r(`${Or}set_at`);(ov(r)||!$r(`${Or}referrer`))&&nn(`${Or}referrer`,e)}function Dg(){const e=()=>{const t={};for(const a of cd){const i=$r(`${Or}${a}`);i&&(t[`utm_${a}`]=i)}const n=$r(`${Or}referrer`);return n&&(t.utm_referrer=n),t};return{name:"attribution-tracking",initialize(){ld()},campaign({payload:t}){const n=t?.campaign||{},a=$r(`${Or}set_at`);if(Object.keys(n).length>0&&ov(a)){for(const o of cd){const s=n[o];s&&nn(`${Or}${o}`,s)}nn(`${Or}set_at`,String(Date.now()))}ld()},page({payload:t}){return t.properties.campaign=e(),t},track({payload:t}){return t.properties.campaign=e(),t},getStoredCampaignData:e}}const Mg=Dg(),fd=new Map,dd=new Map;function Fg({clientId:e,enabled:r=!0,environment:t}){xg(e,r,t),r&&(window.addEventListener("beforeunload",()=>{dd.forEach((n,a)=>{n.bind(a)()}),qg()}),window.addEventListener("visibilitychange",()=>{document.visibilityState!=="visible"&&fd.forEach((n,a)=>{n.bind(a)()})}),yg(),Qh(()=>{const n=new Og({element:document.body,viewCallback:()=>{br.page()},activeDurationCallback:(a,i,o)=>{br.track("activeDuration",{duration:a,durationStart:o,flushing:i})},idleDurationCallback:(a,i,o)=>{br.track("idleDuration",{duration:a,durationStart:o,flushing:i})},scrollCallback:a=>{br.track("scroll",{scroll:a.scrollMax})}});dd.set(document.body,()=>{n.flush()}),fd.set(document.body,()=>{n.handleVisibilityChange()})}),window.addEventListener(We.AUTHENTICATED,async n=>{const a=n;await br.identify(a.detail.sub)}),window.addEventListener(We.LOGOUT,async()=>{await br.track("logout",{}),await br.reset()}))}const br=vg({app:Zh,version:Ss,plugins:[Mg,Ng]});function sv(e,r){br.track(e,r)}function uv(e,r,t=!1){const n={name:e,data:r},a=new CustomEvent(e,{detail:n,cancelable:t,bubbles:!0});sv(`event:${e}`,{...r,timestamp:new Date().toISOString()});const i=window.dispatchEvent(a);return t&&!i?{canceled:!0,message:n.cancellationMessage}:{canceled:!1}}function Bg(e,r){e.cancelable&&(e.detail.cancellationMessage=r,e.preventDefault())}function zg(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}let Le,cv,Bo=!1,Qt=!1;_t()&&window.addEventListener("pageshow",()=>{Qt=!1});let lv=!1;const ut="sesamyAccessToken",Co="sesamyRefreshToken";async function _n(){return Bo?!0:new Promise((e,r)=>{const t=setTimeout(()=>{Bo?e(!0):r(new Error("Initialization failed: Timeout"))},2e3);window.addEventListener(We.AUTH_INITIALIZED,()=>{clearTimeout(t),e(!0)})})}async function Hg(e){if(!e)return null;const r=localStorage.getItem(Co);if(!r)return ye("No refresh token found in localstorage"),null;const t=new URLSearchParams;t.set("client_id",e.iss),t.set("refresh_token",r),t.set("grant_type","refresh_token");const n=new URL(e.iss);n.pathname="/oauth/token",n.searchParams.set("user_id",e.sub);try{const a=await fetch(n.href,{body:t.toString(),method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"}});if(!a.ok)throw localStorage.removeItem(Co),new Error("Renew token failed");const i=await a.json();return localStorage.setItem(Co,i.refresh_token),localStorage.setItem(ut,i.access_token),i.access_token}catch{Es()}}async function Ps(){const e=localStorage.getItem(ut);if(!e)return null;const r=Rs(e);if(!r||!r.exp||r.exp<new Date().getTime()/1e3){const t=await Hg(r);if(t)return t;localStorage.removeItem(ut)}return e}let Wt=null;function Kg(){try{if(Wt!==null)return Wt;const r=Object.keys(localStorage).filter(t=>t.startsWith("@@auth0spajs@@"));for(const t of r){const n=JSON.parse(localStorage.getItem(t)||"{}");if(typeof n=="object"&&"refresh_token"in n)return Wt=!0,!0}}catch(e){ye(`Error checking for existing auth0 tokens: ${e.message}`)}return Wt=!1,!1}function hd(e){try{const r=new URL(e).hostname,t=r.split(".");return t.length>1?t.slice(-2).join("."):r}catch{return null}}async function Gg(e){if(e.enabled===!1)return;e.usePopupForSafari&&(lv=!0),cv=e.organization;const r=e.domain&&!Kg()?e.domain:kh("token",e.environment),t={domain:r,clientId:e.clientId,useCookiesForTransactions:!0};t.cacheLocation="localstorage",hd(window.location.href)!==hd(`https://${r}`)&&(t.useRefreshTokens=!0),ye(`Initializing auth0 client: ${JSON.stringify(t)}`),Le=await dm(t);const n=new URLSearchParams(window.location.search),a=n.get("code"),i=n.get("state");if(a)if(window.opener)ye("Code found in URL, posting to opener"),window.opener.postMessage({type:"authorization_response",response:{code:a,state:i}},window.location.origin);else{ye("Code found in URL, handling redirect");try{const c=await Le.handleRedirectCallback();ye(`Login result: ${JSON.stringify(c)}`);const l=await Le.getUser();if(!l)throw ye("No user found"),new Error("No user found");ye(`User found ${JSON.stringify(l)}`),Ir(We.AUTHENTICATED,l),ye("Rewrite url")}catch(c){alert("There was an error logging in"),console.error(c)}const o=new URL(location.href),s=o.searchParams;s.delete("code"),s.delete("state"),o.search=s.toString(),window.history.replaceState({},document.title,o.toString())}Bo=!0,Ir(We.AUTH_INITIALIZED,{})}async function Ot(){return await _n(),await Ps()?!0:Le?Le.isAuthenticated():!1}async function Wg(){return await _n(),await Ps()?(ye("Using local user"),{sub:"local",name:"Local User"}):Le?Le.getUser():null}function fv(e){if(Qt)return ye("Login already in progress"),null;if(Qt=!0,setTimeout(()=>{Qt=!1},3e3),localStorage.removeItem(ut),!Le)throw new Error("Auth0 client not initialized");const r=e?.authorizationParams||{};return{...e,authorizationParams:{organization:cv,redirect_uri:window.location.href,ui_locales:en(),incognito:vs(),...r}}}async function Tn(e){const r=fv(e);if(r)return Le.loginWithRedirect(r)}async function dv(e){const r=fv(e);if(!r)return;await Le.loginWithPopup(r),uv(We.AUTHENTICATED,await Le.getUser()).canceled||window.location.reload()}async function Vg(e){return zg()&&(vs()||lv)?dv(e):Tn(e)}async function Xr(e=!0,r=!1){await _n();const t=await Ps();if(t)return t;try{if(!Le)return ye("Auth client not initialized"),null;let n=await Le.getTokenSilently();const a=Rs(n);return r&&a?.exp&&a.exp+3600<new Date().getTime()/1e3&&(n=await Le.getTokenSilently({cacheMode:r?"off":"on"})),n}catch(n){const a=n;if(ye(`Failed to get token silently: ${a.message}`),await Le.isAuthenticated()&&(a.message==="Invalid refresh token"||a.message.includes("Missing Refresh Token"))&&await Es(),e)throw n;return null}}async function Es(e={}){if(await _n(),localStorage.removeItem(ut),Ir(We.LOGOUT,{}),!!Le)return ye(`Logout with options: ${JSON.stringify(e)}`),Le.logout({...e,logoutParams:{returnTo:window.location.href,...e.logoutParams}})}function Rs(e){const r=e.split(".");if(r.length!==3)return null;const n=r[1].replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(atob(n).split("").map(function(i){return"%"+("00"+i.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(a)}async function zo(e){const r=Rs(e);if(!r||!r.exp||r.exp<new Date().getTime()/1e3)throw new Error("Invalid token");ye("Set token"),localStorage.setItem(ut,e),Ir(We.AUTHENTICATED,r)}const Jg=(e,r)=>r.skipDedupe||r.method!=="GET",Zg=(e,r)=>r.method+"@"+e,Yg=e=>e.clone(),vd=({skip:e=Jg,key:r=Zg,resolver:t=Yg}={})=>{const n=new Map;return a=>(i,o)=>{if(e(i,o))return a(i,o);const s=r(i,o);if(!n.has(s))n.set(s,[]);else return new Promise((c,l)=>{n.get(s).push([c,l])});try{return a(i,o).then(c=>(n.get(s).forEach(([l])=>l(t(c))),n.delete(s),c)).catch(c=>{throw n.get(s).forEach(([,l])=>l(c)),n.delete(s),c})}catch(c){return n.delete(s),Promise.reject(c)}}},Xg=(e,r)=>e*r,Qg=e=>e&&e.ok,pd=({delayTimer:e=500,delayRamp:r=Xg,maxAttempts:t=10,until:n=Qg,onRetry:a=null,retryOnNetworkError:i=!1,resolveWithLatestResponse:o=!1,skip:s}={})=>c=>(l,u)=>{let f=0;if(s&&s(l,u))return c(l,u);const h=(d,v)=>Promise.resolve(n(d,v)).then(m=>m?d&&o?d:v?Promise.reject(v):d:(f++,!t||f<=t?new Promise(w=>{const E=r(e,f);setTimeout(()=>{typeof a=="function"?Promise.resolve(a({response:d,error:v,url:l,options:u})).then((b={})=>{var g,p;w(c((g=b&&b.url)!==null&&g!==void 0?g:l,(p=b&&b.options)!==null&&p!==void 0?p:u))}):w(c(l,u))},E)}).then(h).catch(w=>{if(!i)throw w;return h(null,w)}):d&&o?d:Promise.reject(v||new Error("Number of attempts exceeded."))));return c(l,u).then(h).catch(d=>{if(!i)throw d;return h(null,d)})},ey="application/json",hv="Content-Type",Zr=Symbol(),vv=Symbol();function md(e={}){var r;return(r=Object.entries(e).find(([t])=>t.toLowerCase()===hv.toLowerCase()))===null||r===void 0?void 0:r[1]}function gd(e){return/^application\/.*json.*/.test(e)}const Dr=function(e,r,t=!1){return Object.entries(r).reduce((n,[a,i])=>{const o=e[a];return Array.isArray(o)&&Array.isArray(i)?n[a]=t?[...o,...i]:i:typeof o=="object"&&typeof i=="object"?n[a]=Dr(o,i,t):n[a]=i,n},{...e})},ct={options:{},errorType:"text",polyfills:{},polyfill(e,r=!0,t=!1,...n){const a=this.polyfills[e]||(typeof self<"u"?self[e]:null)||(typeof global<"u"?global[e]:null);if(r&&!a)throw new Error(e+" is not defined");return t&&a?new a(...n):a}};function ry(e,r=!1){ct.options=r?e:Dr(ct.options,e)}function ty(e,r=!1){ct.polyfills=r?e:Dr(ct.polyfills,e)}function ny(e){ct.errorType=e}const ay=e=>r=>e.reduceRight((t,n)=>n(t),r)||r;class pv extends Error{}const iy=e=>{const r=Object.create(null);e=e._addons.reduce((g,p)=>p.beforeRequest&&p.beforeRequest(g,e._options,r)||g,e);const{_url:t,_options:n,_config:a,_catchers:i,_resolvers:o,_middlewares:s,_addons:c}=e,l=new Map(i),u=Dr(a.options,n);let f=t;const h=ay(s)((g,p)=>(f=g,a.polyfill("fetch")(g,p)))(t,u),d=new Error,v=h.catch(g=>{throw{[Zr]:g}}).then(g=>{var p;if(!g.ok){const y=new pv;if(y.cause=d,y.stack=y.stack+`
|
|
36
|
+
CAUSE: `+d.stack,y.response=g,y.status=g.status,y.url=f,g.type==="opaque")throw y;const k=a.errorType==="json"||((p=g.headers.get("Content-Type"))===null||p===void 0?void 0:p.split(";")[0])==="application/json";return(a.errorType?k?g.text():g[a.errorType]():Promise.resolve(g.body)).then(j=>{throw y.message=typeof j=="string"?j:g.statusText,j&&(k&&typeof j=="string"?(y.text=j,y.json=JSON.parse(j)):y[a.errorType]=j),y})}return g}),m=g=>g.catch(p=>{const y=Object.prototype.hasOwnProperty.call(p,Zr),k=y?p[Zr]:p,A=k?.status&&l.get(k.status)||l.get(k?.name)||y&&l.has(Zr)&&l.get(Zr);if(A)return A(k,e);const j=l.get(vv);if(j)return j(k,e);throw k}),w=g=>p=>m(g?v.then(y=>y&&y[g]()).then(y=>p?p(y):y):v.then(y=>p?p(y):y)),E={_wretchReq:e,_fetchReq:h,_sharedState:r,res:w(null),json:w("json"),blob:w("blob"),formData:w("formData"),arrayBuffer:w("arrayBuffer"),text:w("text"),error(g,p){return l.set(g,p),this},badRequest(g){return this.error(400,g)},unauthorized(g){return this.error(401,g)},forbidden(g){return this.error(403,g)},notFound(g){return this.error(404,g)},timeout(g){return this.error(408,g)},internalError(g){return this.error(500,g)},fetchError(g){return this.error(Zr,g)}},b=c.reduce((g,p)=>({...g,...typeof p.resolver=="function"?p.resolver(g):p.resolver}),E);return o.reduce((g,p)=>p(g,e),b)},oy={_url:"",_options:{},_config:ct,_catchers:new Map,_resolvers:[],_deferred:[],_middlewares:[],_addons:[],addon(e){return{...this,_addons:[...this._addons,e],...e.wretch}},errorType(e){return{...this,_config:{...this._config,errorType:e}}},polyfills(e,r=!1){return{...this,_config:{...this._config,polyfills:r?e:Dr(this._config.polyfills,e)}}},url(e,r=!1){if(r)return{...this,_url:e};const t=this._url.split("?");return{...this,_url:t.length>1?t[0]+e+"?"+t[1]:this._url+e}},options(e,r=!1){return{...this,_options:r?e:Dr(this._options,e)}},headers(e){const r=e?Array.isArray(e)?Object.fromEntries(e):"entries"in e?Object.fromEntries(e.entries()):e:{};return{...this,_options:Dr(this._options,{headers:r})}},accept(e){return this.headers({Accept:e})},content(e){return this.headers({[hv]:e})},auth(e){return this.headers({Authorization:e})},catcher(e,r){const t=new Map(this._catchers);return t.set(e,r),{...this,_catchers:t}},catcherFallback(e){return this.catcher(vv,e)},resolve(e,r=!1){return{...this,_resolvers:r?[e]:[...this._resolvers,e]}},defer(e,r=!1){return{...this,_deferred:r?[e]:[...this._deferred,e]}},middlewares(e,r=!1){return{...this,_middlewares:r?e:[...this._middlewares,...e]}},fetch(e=this._options.method,r="",t=null){let n=this.url(r).options({method:e});const a=md(n._options.headers),i=this._config.polyfill("FormData",!1),o=typeof t=="object"&&!(i&&t instanceof i)&&(!n._options.headers||!a||gd(a));return n=t?o?n.json(t,a):n.body(t):n,iy(n._deferred.reduce((s,c)=>c(s,s._url,s._options),n))},get(e=""){return this.fetch("GET",e)},delete(e=""){return this.fetch("DELETE",e)},put(e,r=""){return this.fetch("PUT",r,e)},post(e,r=""){return this.fetch("POST",r,e)},patch(e,r=""){return this.fetch("PATCH",r,e)},head(e=""){return this.fetch("HEAD",e)},opts(e=""){return this.fetch("OPTIONS",e)},body(e){return{...this,_options:{...this._options,body:e}}},json(e,r){const t=md(this._options.headers);return this.content(r||gd(t)&&t||ey).body(JSON.stringify(e))}};function mr(e="",r={}){return{...oy,_url:e,_options:r}}mr.default=mr;mr.options=ry;mr.errorType=ny;mr.polyfills=ty;mr.WretchError=pv;function rr(){return sessionStorage.removeItem(qo),ye("Cache cleared"),Ir(We.CLEAR_CACHE,{}),"Cache cleared"}function Ho(e){let r;try{r=new URL(e)}catch{return!1}return r.protocol==="http:"||r.protocol==="https:"}function mv(e,r){if(Ho(e))return{itemSrc:e};const[t,n,a]=e.split(":");return{sku:`${t}:${n}`,purchaseOption:r||a}}function yd(e){return e.endsWith("/")?e.slice(0,-1):e}function wd(e,r){if(!Ho(e)||!Ho(r))return!1;const t=new URL(e),n=new URL(r);return t.origin===n.origin&&yd(t.pathname)===yd(n.pathname)}function sy(e,r,t){const n=new URL(`${vr("checkout3",e.environment)}`);if(r.language&&n.searchParams.set("lang",r.language),r.sku)n.searchParams.set("sku",r.sku),r.purchaseOptionId&&n.searchParams.set("po-id",r.purchaseOptionId);else if(r.itemSrc){const{sku:s,purchaseOption:c,itemSrc:l}=mv(r.itemSrc,r.purchaseOptionId);l&&n.searchParams.set("url",l),s&&n.searchParams.set("sku",s),c&&n.searchParams.set("po-id",c)}r.email&&n.searchParams.set("email",r.email),r.business&&n.searchParams.set("business","true"),r.currency&&n.searchParams.set("currency",r.currency),r.price&&n.searchParams.set("price",r.price.toString()),r.discountCode&&n.searchParams.set("discount-code",r.discountCode),r.attributionItemSrc?n.searchParams.set("itemSrc",r.attributionItemSrc):t.itemSrc&&n.searchParams.set("itemSrc",t.itemSrc),r.attributionPublisherContentId?n.searchParams.set("publisherContentId",r.attributionPublisherContentId):t.publisherContentId&&n.searchParams.set("publisherContentId",t.publisherContentId),r.utmSource?n.searchParams.set("utm_source",r.utmSource):t.utmSource&&n.searchParams.set("utm_source",t.utmSource),r.utmMedium?n.searchParams.set("utm_medium",r.utmMedium):t.utmMedium&&n.searchParams.set("utm_medium",t.utmMedium),r.utmCampaign?n.searchParams.set("utm_campaign",r.utmCampaign):t.utmCampaign&&n.searchParams.set("utm_campaign",t.utmCampaign),r.utmTerm?n.searchParams.set("utm_term",r.utmTerm):t.utmTerm&&n.searchParams.set("utm_term",t.utmTerm),r.utmContent?n.searchParams.set("utm_content",r.utmContent):t.utmContent&&n.searchParams.set("utm_content",t.utmContent);const a=["_ga","_gid","_fbp","_fbc"];document.cookie.split(";").map(s=>{const[c,l]=s.trim().split("=");return{key:c,value:l}}).filter(s=>a.some(c=>c===s.key)).forEach(s=>{n.searchParams.append(s.key,s.value)});let o=new URL(window.location.href);if(r.redirectUrl)try{o=new URL(r.redirectUrl)}catch{console.warn("Invalid redirect URL provided, using current URL instead:",r.redirectUrl)}return o.searchParams.set("force-refetch-entitlements","true"),r.itemSrc&&o.searchParams.set("sesamy-purchase",r.itemSrc),n.searchParams.set("redirect-url",o.toString()),r.paymentMethodsFilter&&n.searchParams.set("paymentmethods-filter",r.paymentMethodsFilter.flatMap(({provider:s,methods:c})=>c?c.map(l=>`${s}|${l}`):s).join(",")),n}const gv="sesamySignedURLs";function _s(){const e=sessionStorage.getItem(gv);return e?JSON.parse(e):[]}function uy(e){const r=_s();r.push(e),ye(`Adding signed URL: ${e}`),sessionStorage.setItem(gv,JSON.stringify(r))}function cy(e){const r={};return Object.keys(e).forEach(t=>{const n=e[t];n!=null&&(r[t]=n.toString())}),r}const Ko="sesamyAttribution";function ly(e){const r=localStorage.getItem(e);if(!r)return null;try{return JSON.parse(r).value}catch{return console.error(`Failed to parse ${e}`),null}}function fy(e){return Object.keys(e).find(r=>r.startsWith("utm_"))?{utmSource:void 0,utmMedium:void 0,utmCampaign:void 0,...e}:e}function sn(){return ly(Ko)||{}}function yv(e){if(e===null)localStorage.removeItem(Ko);else{ye(`Setting attribution ${JSON.stringify(e)}`);const r=sn()??{},t=cy({...r,...fy(e)});localStorage.setItem(Ko,JSON.stringify({value:t}))}}function dy(e){const r=vr("api2",e.environment),t=T=>async(F,J)=>{let pe=sessionStorage.getItem(qo);pe||(pe=Date.now().toString(),sessionStorage.setItem(qo,pe));const ve={...J,headers:{...J.headers,"Cache-Timestamp":pe}};return T(F,ve)},n=(T=!0)=>F=>async(J,pe)=>{let ve=null;if(ve=await Xr(T),!ve){if(T)throw new Error("No access token available");return F(J,pe)}const me={...pe,headers:{...pe.headers,...ve?{Authorization:`Bearer ${ve}`}:{}}};return F(J,me)},a=T=>(F,J)=>{if(J.headers.Authorization)return T(F,J);const pe=localStorage.getItem("__anon_id"),ve=btoa(`${e.clientId}|${pe}:`),me={...J,headers:{...J.headers,Authorization:`Basic ${ve}`}};return T(F,me)},i=mr(r).headers({"Content-Type":"application/json"}).middlewares([t,n(),vd(),pd({delayTimer:1e3,delayRamp:(T,F)=>T*F,maxAttempts:3,until:T=>!!(T&&(T.ok||T.status>=400&&T.status<500)),retryOnNetworkError:!1})]),o=mr(r).headers({"Content-Type":"application/json"}).middlewares([t,n(!1),a,vd(),pd({delayTimer:1e3,delayRamp:(T,F)=>T*F,maxAttempts:3,until:T=>!!(T&&(T.ok||T.status>=400&&T.status<500)),retryOnNetworkError:!1})]);async function s(T={}){const{waitForEntitlementAfter:F,includeSignedLinks:J=!0}=T,pe=F?`?wait-for-entitlement-after=${F.toISOString()}`:"",ve=await Ot()?await i.get(`/entitlements${pe}`).json():[];return J&&ve.push(..._s()),ve}async function c(T,F=[]){return(await s())?.find(ve=>{const{sku:me,purchaseOption:Be}=mv(T);let M="sku"in ve&&me===ve.sku;M&&Be&&"purchaseOptionId"in ve&&(M=Be===ve.purchaseOptionId);const ie=wd(T,ve.url),le=F.some(fe=>wd(fe,ve.url));return M||ie||le})}async function l(T){return(await i.get("/entitlements").json())?.find(J=>J.id===T)}async function u(T){return i.get(`/entitlements/${encodeURIComponent(T)}/access`).json()}async function f(T,F,J){const pe=new URL(vr("api2",e.environment));return pe.pathname="/proxy",pe.searchParams.set("url",F),J&&pe.searchParams.set("selector",J),mr(pe.toString()).headers({Authorization:`Bearer ${T}`}).get().text()}async function h(T){if(!T)throw new Error("SKU is required to get fulfillments");return await Ot()?await i.get(`/fulfillments?sku=${encodeURIComponent(T)}`).json():[]}async function d(T,F){if(!T||!F)throw new Error("SKU and itemId are required to request delivery");return(await i.post({sku:T},`/fulfillments/${encodeURIComponent(F)}/request-delivery?`).res()).ok}async function v(){return i.get("/contracts").json()}async function m(T){return(await i.get("/contracts").json())?.find(J=>J.id===T)}async function w(T){const F=await i.post({},`/contracts/${encodeURIComponent(T)}/cancel`).res();return rr(),F.ok}async function E(){return console.warn("getSubscriptions is deprecated, use getContracts instead"),i.get("/subscriptions").json()}async function b(){return i.get("/bills").json()}async function g(T){return(await i.get("/bills").json())?.find(J=>J.id===T)}async function p(){return i.get("/transactions").json()}async function y(T){return(await i.get("/transactions").json())?.find(J=>J.id===T)}async function k(T,F){const J=await i.url(`/user-metadata/${encodeURIComponent(T)}`).put(F).json();return Ir(We.USER_ATTRIBUTE_CHANGED,{}),rr(),J}async function A(T){const F=await i.url(`/user-metadata/${encodeURIComponent(T)}`).delete().res();return rr(),F.ok}async function j(){return await i.url("/user-metadata").get().json()}async function z(T){return(await j())[T]||null}async function H(){return await i.url("/tags").get().json()}async function ee(T){const F=await i.url(`/tags/${encodeURIComponent(T)}`).delete().res();return rr(),F.ok}async function x(T){const F=await i.url("/tags").post(encodeURIComponent(T)).res();return Ir(We.USER_ATTRIBUTE_CHANGED,{}),rr(),F.ok}async function N(T){return(await o.url("/tallies").get().json())[T]}async function q(){return await o.url("/tallies").get().json()}async function O(T){const F=await o.url(`/tallies/${T}`).delete().res();return rr(),F.ok}async function X(T,F){return await o.url(`/tallies/${encodeURIComponent(T)}/push`).post(F).json()}async function re(T){return await i.url(`/products/${encodeURIComponent(T)}`).get().json()}async function Q(){return await Xr(!1)?await i.url("/profile").get().json():null}async function S(T){const F=await i.url("/profile").patch(T).res();return rr(),F.ok}async function _(){return await i.url("/payment-issues").get().json()}async function $(){return(await i.url("/profile/spotify-link").get().json()).isSpotifyLinked}async function B(){return(await i.url("/profile/unlink-spotify").post().res()).ok}async function G(T){const F=await Xr(!1);if(!F)throw new Error("No access token available");const J=new URL(`${vr("access-sync",e.environment)}/spotify/sesamy-callback`);J.searchParams.set("access_token",F),J.searchParams.set("state",T),window.location.href=J.toString()}async function Z(T){const F=await i.url(`/products/${encodeURIComponent(T)}/auto-onboard`).post().json();return F.length&&rr(),F}async function de(T,F=3600){const{shortlink:J}=await mr(pm).post({url:T,ttl:F}).json();return J}async function ae(T){const F=await Xr(!1,!0);let J;const pe=T.language||en(),ve=sn();switch(T.target){case"account":J=new URL(`${vr("account",e.environment)}/${encodeURIComponent(T.language||pe)}/subscriptions/${encodeURIComponent(e.clientId)}${T.contractId?`/${encodeURIComponent(T.contractId)}`:""}`),J.searchParams.set("sesamy-redirect-url",T.redirectUrl||window.location.href);break;case"change-payment":J=new URL(`${vr("account",e.environment)}/${encodeURIComponent(T.language||pe)}/subscriptions/${encodeURIComponent(e.clientId)}/${encodeURIComponent(T.contractId)}/change-payment-method`),J.searchParams.set("sesamy-redirect-url",T.redirectUrl||window.location.href);break;case"change-plan":J=new URL(`${vr("account",e.environment)}/${encodeURIComponent(T.language||pe)}/subscriptions/${encodeURIComponent(e.clientId)}/${encodeURIComponent(T.contractId)}/edit-plan`),J.searchParams.set("sesamy-redirect-url",T.redirectUrl||window.location.href);break;case"consume":J=new URL(`${vr("consume",e.environment)}/${encodeURIComponent(T.language||pe)}/@${encodeURIComponent(e.clientId)}/${encodeURIComponent(T.sku)}`),T.episodeId?J.href+=`/${T.episodeId}`:J.href+="/listen",J.searchParams.set("sesamy-redirect-url",T.redirectUrl||window.location.href);break;case"checkout":J=sy(e,{language:pe,...T},ve);break;default:throw new Error("Invalid target")}return F&&(J.hash=`#access_token=${F}`),T.shorten?de(J.href,T.ttl):J.href}async function ue(T){const F=sn(),J=["_ga","_gid","_fbp","_fbc"];return document.cookie.split(";").forEach(ve=>{const me=F,[Be,M]=ve.trim().split("=");J.includes(Be)&&!me[Be]&&(me[Be]=M)}),(await o.url("/checkouts").post({language:en(),...T,attribution:{...F,...T.attribution},vendorId:e.clientId})).json()}async function se(T,F){return(await o.url(`/checkouts/${T}`).patch(F)).json()}async function Pe(T){return(await o.url(`/checkouts/${T}`).get()).json()}async function je(T){return(await o.url(`/paywalls/${T}`).get()).json()}async function Fe(){return(await o.url("/vendor").get()).json()}async function Ce(){return(await i.url("/vendors").get()).json()}async function Ve(T){return(await i.url(`/contracts/${encodeURIComponent(T.contractId)}/amendments`).post({amendmentType:T.amendmentType,discountCode:T.discountCode})).json()}async function lr(T){return await i.url(`/amendments/${encodeURIComponent(T)}/confirm`).post(),!0}async function fr(){const T=await Xr(!1),F=new URL(`${vr("account",e.environment)}/subscriptions/${e.clientId}`);T&&(F.hash=`#access_token=${T}`),window.location.href=F.toString()}return{autoOnboardProduct:Z,cancelContract:w,confirmAmendment:lr,createAmendment:Ve,createCheckout:ue,deleteTag:ee,deleteTally:O,deleteUserMetadata:A,generateLink:ae,getBill:g,getBills:b,getCheckout:Pe,getProxyContent:f,getContract:m,getContracts:v,getEntitlement:l,getEntitlementAccess:u,getEntitlements:s,getFulfillments:h,requestDelivery:d,getPaywall:je,getPaymentIssues:_,getProfile:Q,getProduct:re,getSubscriptions:E,getTally:N,getTallies:q,getTags:H,getTransaction:y,getTransactions:p,getUserMetadata:z,hasAccess:c,isSpotifyLinked:$,linkSpotify:G,listUserMetadata:j,openHostedAccountPage:fr,pushTally:X,setTag:x,setUserMetadata:k,unlinkSpotify:B,updateCheckout:se,updateProfile:S,getVendorSettings:Fe,listVendors:Ce}}const hy=["AdHeader","AdContainer","AD_Top","homead","ad-lead"];function vy(){return new Promise(e=>{const r=hy.map(t=>{const n=document.createElement("div");return n.innerHTML=" ",n.id=t,n.style.position="absolute",document.body.appendChild(n),n});window.setTimeout(()=>{const t=!r.every(n=>document.querySelector(`#${n.id}`)?.offsetParent);r.forEach(n=>n.remove()),e(t)},100)})}function py(){const e=navigator.userAgent.toLowerCase(),r=[{name:"Facebook",regex:/fbav|fban/i},{name:"LinkedIn",regex:/linkedin/i},{name:"Instagram",regex:/instagram/i},{name:"Gmail",regex:/gmail/i},{name:"Twitter",regex:/twitter/i},{name:"WeChat",regex:/micromessenger/i},{name:"Line",regex:/line/i},{name:"Snapchat",regex:/snapchat/i},{name:"Pinterest",regex:/pinterest/i},{name:"Kakao",regex:/kakaotalk/i},{name:"Skype",regex:/skype/i},{name:"WhatsApp",regex:/whatsapp/i}];for(const t of r)if(t.regex.test(e))return{isInAppBrowser:!0,browserName:t.name};return/; wv\)/.test(e)?{isInAppBrowser:!0,browserName:"Unknown In-App Browser"}:{isInAppBrowser:!1,browserName:null}}const wv="sesamyFlags";async function bv(e){try{localStorage.setItem(wv,JSON.stringify(e))}catch{ye("Failed to save flags to localStorage")}}async function my(e,r){const t=await On();t[e]=r,await bv(t)}async function gy(e){return(await On())[e]}async function yy(e){const r=await On();e in r&&(delete r[e],await bv(r))}async function On(){try{const e=localStorage.getItem(wv);return e?JSON.parse(e):{}}catch{return{}}}function wy(e){const{autoOnboardProduct:r,cancelContract:t,createCheckout:n,deleteTag:a,deleteTally:i,deleteUserMetadata:o,generateLink:s,getBill:c,getBills:l,getCheckout:u,getContract:f,getContracts:h,getEntitlement:d,getEntitlementAccess:v,getEntitlements:m,getFulfillments:w,getPaywall:E,getPaymentIssues:b,getProfile:g,getProduct:p,getProxyContent:y,getSubscriptions:k,getTags:A,getTally:j,getTallies:z,getTransaction:H,getTransactions:ee,getUserMetadata:x,getVendorSettings:N,listVendors:q,hasAccess:O,isSpotifyLinked:X,linkSpotify:re,listUserMetadata:Q,openHostedAccountPage:S,pushTally:_,requestDelivery:$,setTag:B,setUserMetadata:G,unlinkSpotify:Z,updateCheckout:de,updateProfile:ae}=dy(e),ue={analytics:{track:sv},attribution:{get:sn,set:yv},auth:{getUser:g,getTokenSilently:Xr,isAuthenticated:Ot,loginWithRedirect:Tn,loginWithPopup:dv,login:Vg,logout:Es,setToken:zo},bills:{get:c,list:l},browser:{detectAdblock:vy,isInAppBrowser:py,isIncognito:vs},checkouts:{create:n,get:u,update:de},clearCache:rr,content:{list:Ug,get:Is,getLanguage:en,unlock:Lg,getPropertyFromHTML:tv},contracts:{cancel:t,get:f,list:h},entitlements:{access:v,get:d,hasAccess:O,list:m,signedLinks:_s},events:{emit:uv,cancel:Bg},flags:{get:gy,set:my,list:On,delete:yy},fulfillments:{list:w,requestDelivery:$},generateLink:s,getPaymentIssues:b,getVersion:by,isReady:()=>exports.isInitialized,log:ye,paywalls:{get:E},products:{autoOnboard:r,get:p,linkSpotify:re},profile:{get:g,isSpotifyLinked:X,openHostedAccountPage:S,unlinkSpotify:Z,update:ae},proxy:{getContent:y},subscriptions:{list:k},tags:{delete:a,list:A,set:B},tallies:{delete:i,get:j,list:z,push:_},transactions:{get:H,list:ee},userMetadata:{delete:o,get:x,list:Q,set:G},vendors:{get:N,list:q},setToken:zo};return e.namespace&&(window[e.namespace]=ue),ue}function by(){return Ss}function Sy(e,r){e.style.position="relative",e.style.height="200px",e.style.overflow="hidden";let n=0;const a=Array.from(e.children);for(const o of a){const s=o.offsetHeight;n+s>200?o.remove():n+=s}const i=document.createElement("style");i.innerHTML=`
|
|
37
37
|
${r.selector}::before {
|
|
38
38
|
content: '';
|
|
39
39
|
position: absolute;
|
|
@@ -44,4 +44,4 @@ CAUSE: `+d.stack,y.response=g,y.status=g.status,y.url=f,g.type==="opaque")throw
|
|
|
44
44
|
background: linear-gradient(to bottom, rgba(255, 255, 255, 0), white);
|
|
45
45
|
pointer-events: none;
|
|
46
46
|
}
|
|
47
|
-
`,document.head.appendChild(i)}async function
|
|
47
|
+
`,document.head.appendChild(i)}async function Iy(e){try{const r=await fetch(e);return r.ok?await r.text():(console.error(`Failed to fetch content from ${e}: ${r.statusText}`),null)}catch(r){return console.error(`Error fetching content from ${e}:`,r),null}}async function Ts(e){if(e.contentType==="selector"&&e.content){const r=document.querySelector(e.content);if(r)return r.innerHTML;console.warn(`Source element for selector '${e.content}' not found`)}else if(e.contentType==="url"&&e.content){const r=await Iy(e.content);if(r)return r;console.warn(`Failed to fetch content from URL '${e.content}'`)}else if(e.content)return e.content;return""}async function Py(e,r){const t=r.insertionPoint||"inside",n=await Ts(r);switch(t){case"before":e.insertAdjacentHTML("beforebegin",n);break;case"after":e.insertAdjacentHTML("afterend",n);break;case"inside":default:e.innerHTML+=n;break}}async function Ey(e,r){const t=await Ts(r);e.innerHTML=t}async function Ry(e,r){const t=await Ts(r);e.innerHTML=t.replace("${content}",e.innerHTML)}async function _y({enabled:e=!1,rules:r}){e&&Qh(async()=>{const t=await Ot(),n=window.location.href;for(const a of r){const i=document.querySelectorAll(a.selector);if(!(a.path&&!new RegExp(a.path).test(n)))for(const o of i){const s=o;if(!(a.authenticated!==void 0&&a.authenticated!==t))switch(a.transform){case"insert":await Py(s,a);break;case"replace":await Ey(s,a);break;case"remove":o.remove();break;case"wrap":await Ry(s,a);break;case"gradient":Sy(s,a);break;default:console.warn(`Unknown transform type: ${a.transform}`)}}}})}const bd="access_token";function Ty(){const e=new URLSearchParams(window.location.hash.substring(1)),r=e.get(bd);if(r){zo(r);const t=new URL(window.location.href);e.delete(bd),t.hash=e.toString(),window.history.replaceState(null,"",t)}}const Sd="sesamy-refresh",Id="force-refetch-entitlements";function Oy(){const e=new URLSearchParams(window.location.search),r=e.get(Id),t=e.get(Sd);if(r!==null||t!==null){const n=new URL(window.location.href);e.delete(Id),e.delete(Sd),n.search=e.toString(),rr(),window.history.replaceState(null,"",n)}}function ky(e){const r=e.split(".")[1],t=atob(r);return JSON.parse(t)}function Cy(){const e=new URLSearchParams(window.location.search),r=e.get("sesamy-token")||e.get("token");if(!r)return;try{const n=ky(r),a=new Date(n.exp*1e3),i={id:"",title:n.p?.toString(),sku:n.s?.toString(),purchaseOptionsId:n.pid?.toString(),url:n.url?.toString(),token:r,type:"article",expiresAt:a.toISOString(),createdAt:new Date(n.iat).toISOString(),updatedAt:new Date(n.iat).toISOString()};uy(i)}catch(n){ye(`Failed to extract signed link ${n}`)}const t=new URL(window.location.href);t.searchParams.delete("ss"),t.searchParams.delete("se"),t.searchParams.delete("sp"),t.searchParams.delete("so"),t.searchParams.delete("token"),t.searchParams.delete("sesamy-token"),window.history.replaceState(null,"",t)}const Pd="sesamy-user";async function Ay(){const r=new URLSearchParams(window.location.search).get(Pd)?.toLowerCase();if(!r)return;const t=await Wg();t?.email!==r?(ye(`Current user does not match sesamy user: ${t?.email} !== ${r}`),rr(),Tn({authorizationParams:{login_hint:r}})):ye(`Current user matches sesamy user: ${t?.email} === ${r}`);const n=new URL(window.location.href);n.searchParams.delete(Pd),window.history.replaceState(null,"",n)}const Ed="sesamy-purchase";function jy(){const e=new URLSearchParams(window.location.search),r=e.get(Ed);if(r!==null){const t=new URL(window.location.href);e.delete(Ed),t.search=e.toString(),ye(`Purchase ${r}`),Ir(We.PURCHASE,{itemSrc:r}),rr(),window.history.replaceState(null,"",t)}}const Rd="sesamy-login",Uy="sesamy_login";async function Ly(){const e=new URLSearchParams(window.location.search);if(!(e.get(Rd)||e.get(Uy)))return;await Ot()||Tn();const n=new URL(window.location.href);n.searchParams.delete(Rd),window.history.replaceState(null,"",n)}const _d="sesamy-debug";async function qy(){const r=new URLSearchParams(window.location.search).get(_d)?.toLowerCase();if(!r)return;Mp(r==="true");const t=new URL(window.location.href);t.searchParams.delete(_d),window.history.replaceState(null,"",t)}function xy(){if(!document.referrer.length)return;const e=new URL(document.referrer);if(!(e.hostname===window.location.hostname||e.hostname.includes("sesamy")))return document.referrer}async function Ny(e){if(!_t())return;const r=new URLSearchParams(window.location.search),t={utmSource:r.get("utm_source")??void 0,utmMedium:r.get("utm_medium")??void 0,utmCampaign:r.get("utm_campaign")??void 0,utmTerm:r.get("utm_term")??void 0,utmContent:r.get("utm_content")??void 0,ref:r.get("ref")??void 0,referrer:xy()},[n]=e.content.list();n?.url&&(t.itemSrc=n.url,t.publisherContentId=n.id),yv(t)}function $y(){const e=new URLSearchParams(window.location.search);let r=!1;try{r=!!window.opener&&window.opener.location.origin===window.location.origin}catch{r=!1}const t=sessionStorage.getItem(Uf)==="true",n=e.has("code")||e.has("error")||e.has("state");!r||t||(sessionStorage.setItem(Uf,"true"),n||(ye("Reloading page to get query params in incognito browser"),window.location.reload()))}async function Dy(e){const r=a=>i=>{i.preventDefault();try{a()}catch(o){console.error("Error handling click:",o)}},t=(a,i)=>{try{document.querySelectorAll(a).forEach(s=>{s.addEventListener("click",r(i))})}catch(o){console.error(`Error attaching event handlers (selector: ${a}):`,o)}};t('[sesamy-link="login"]',()=>e.auth.loginWithRedirect()),t('[sesamy-link="logout"]',()=>e.auth.logout());const n=await e.generateLink({target:"account"});n&&t('[sesamy-link="account"]',()=>{window.location.href=n})}async function My(e){const r=await e.auth.isAuthenticated();try{document.querySelectorAll(`[sesamy-visibility="${r?"not-logged-in":"logged-in"}"]`).forEach(a=>{a instanceof HTMLElement&&(a.style.display="none")}),document.querySelectorAll(`[sesamy-visibility="${r?"logged-in":"not-logged-in"}"]`).forEach(a=>{a instanceof HTMLElement&&(a.style.display="")})}catch(t){console.error("Error handling visibility:",t)}}async function Fy(e){const r=at("sesamy:locked-content-redirect-url");if(!r)return;const[t]=e.content.list();if(!t)return;await e.entitlements.hasAccess(t.url||"",t.pass?.split(",")||[])||(location.href=r)}exports.isInitialized=!1;async function Td(e,r){ye(`Init with config: ${JSON.stringify(e)}`);try{$y(),Fg({clientId:e.clientId,environment:e.environment,...e.analytics}),await Gg({clientId:e.clientId,organization:e.organization,environment:e.environment,...e.auth}),Ag(e,r),e.transform&&await _y(e.transform),ym(),qy(),Ny(r),Ty(),Oy(),Cy(),await Ly(),await Ay(),jy(),await My(r),await Dy(r),await Fy(r),exports.isInitialized=!0,Ir(We.READY,{})}catch(t){ye(`Failed to init ${t.message}`)}}async function Sv(e){ye("Initializing Sesamy");const r=e.api?.namespace||"sesamy";if(_t()&&r in window)return ye("Sesamy already initialized. This is likely due to a duplicate import"),exports.isInitialized=!0,window[r];const t=wy({clientId:e.clientId,environment:e.environment,...e.api});return _t()?(e.awaitAllServices?await Td(e,t):Td(e,t),t):(exports.isInitialized=!0,t)}if(_t()){const e=document.getElementById("sesamy-js");if(e?.textContent)try{const r=JSON.parse(e.textContent);Sv(r)}catch(r){console.error("Failed to parse config",r)}}exports.init=Sv;
|