@sesamy/sesamy-js 1.46.0 → 1.50.0
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 +6 -7
- package/dist/sesamy-js.d.ts +668 -647
- package/dist/sesamy-js.iife.js +6 -7
- package/dist/sesamy-js.mjs +3548 -4457
- package/package.json +3 -4
package/dist/sesamy-js.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var hc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},vc={},aa,pc;function $e(){return pc||(pc=1,aa=function(t){try{return!!t()}catch{return!0}}),aa}var ia,mc;function Cn(){if(mc)return ia;mc=1;var t=$e();return ia=!t(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),ia}var oa,gc;function be(){if(gc)return oa;gc=1;var t=Cn(),e=Function.prototype,r=e.call,n=t&&e.bind.bind(r,r);return oa=t?n:function(a){return function(){return r.apply(a,arguments)}},oa}var sa,yc;function An(){if(yc)return sa;yc=1;var t=be(),e=t({}.toString),r=t("".slice);return sa=function(n){return r(e(n),8,-1)},sa}var ca,wc;function vh(){if(wc)return ca;wc=1;var t=be(),e=$e(),r=An(),n=Object,a=t("".split);return ca=e(function(){return!n("z").propertyIsEnumerable(0)})?function(i){return r(i)==="String"?a(i,""):n(i)}:n,ca}var ua,bc;function jn(){return bc||(bc=1,ua=function(t){return t==null}),ua}var la,Sc;function Un(){if(Sc)return la;Sc=1;var t=jn(),e=TypeError;return la=function(r){if(t(r))throw new e("Can't call method on "+r);return r},la}var fa,Ic;function Vr(){if(Ic)return fa;Ic=1;var t=vh(),e=Un();return fa=function(r){return t(e(r))},fa}var Or,Pc;function Se(){if(Pc)return Or;Pc=1;var t=function(e){return e&&e.Math===Math&&e};return Or=t(typeof globalThis=="object"&&globalThis)||t(typeof window=="object"&&window)||t(typeof self=="object"&&self)||t(typeof hc=="object"&&hc)||t(typeof Or=="object"&&Or)||(function(){return this})()||Function("return this")(),Or}var da={exports:{}},ha,Ec;function mt(){return Ec||(Ec=1,ha=!1),ha}var va,_c;function Ps(){if(_c)return va;_c=1;var t=Se(),e=Object.defineProperty;return va=function(r,n){try{e(t,r,{value:n,configurable:!0,writable:!0})}catch{t[r]=n}return n},va}var Tc;function Es(){if(Tc)return da.exports;Tc=1;var t=mt(),e=Se(),r=Ps(),n="__core-js_shared__",a=da.exports=e[n]||r(n,{});return(a.versions||(a.versions=[])).push({version:"3.46.0",mode:t?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.46.0/LICENSE",source:"https://github.com/zloirock/core-js"}),da.exports}var pa,kc;function ph(){if(kc)return pa;kc=1;var t=Es();return pa=function(e,r){return t[e]||(t[e]=r||{})},pa}var ma,Rc;function qn(){if(Rc)return ma;Rc=1;var t=Un(),e=Object;return ma=function(r){return e(t(r))},ma}var ga,Oc;function rt(){if(Oc)return ga;Oc=1;var t=be(),e=qn(),r=t({}.hasOwnProperty);return ga=Object.hasOwn||function(a,i){return r(e(a),i)},ga}var ya,Cc;function mh(){if(Cc)return ya;Cc=1;var t=be(),e=0,r=Math.random(),n=t(1.1.toString);return ya=function(a){return"Symbol("+(a===void 0?"":a)+")_"+n(++e+r,36)},ya}var wa,Ac;function Jr(){if(Ac)return wa;Ac=1;var t=Se(),e=t.navigator,r=e&&e.userAgent;return wa=r?String(r):"",wa}var ba,jc;function gh(){if(jc)return ba;jc=1;var t=Se(),e=Jr(),r=t.process,n=t.Deno,a=r&&r.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&&e&&(o=e.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=e.match(/Chrome\/(\d+)/),o&&(s=+o[1]))),ba=s,ba}var Sa,Uc;function yh(){if(Uc)return Sa;Uc=1;var t=gh(),e=$e(),r=Se(),n=r.String;return Sa=!!Object.getOwnPropertySymbols&&!e(function(){var a=Symbol("symbol detection");return!n(a)||!(Object(a)instanceof Symbol)||!Symbol.sham&&t&&t<41}),Sa}var Ia,qc;function wh(){if(qc)return Ia;qc=1;var t=yh();return Ia=t&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Ia}var Pa,Lc;function xe(){if(Lc)return Pa;Lc=1;var t=Se(),e=ph(),r=rt(),n=mh(),a=yh(),i=wh(),o=t.Symbol,s=e("wks"),c=i?o.for||o:o&&o.withoutSetter||n;return Pa=function(l){return r(s,l)||(s[l]=a&&r(o,l)?o[l]:c("Symbol."+l)),s[l]},Pa}var Ea,Nc;function Pe(){if(Nc)return Ea;Nc=1;var t=typeof document=="object"&&document.all;return Ea=typeof t>"u"&&t!==void 0?function(e){return typeof e=="function"||e===t}:function(e){return typeof e=="function"},Ea}var _a,$c;function nt(){if($c)return _a;$c=1;var t=Pe();return _a=function(e){return typeof e=="object"?e!==null:t(e)},_a}var Ta,xc;function ct(){if(xc)return Ta;xc=1;var t=nt(),e=String,r=TypeError;return Ta=function(n){if(t(n))return n;throw new r(e(n)+" is not an object")},Ta}var ka={},Ra,Dc;function De(){if(Dc)return Ra;Dc=1;var t=$e();return Ra=!t(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Ra}var Oa,Mc;function bh(){if(Mc)return Oa;Mc=1;var t=De(),e=$e();return Oa=t&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Oa}var Ca={},Aa,Fc;function Ln(){if(Fc)return Aa;Fc=1;var t=Se(),e=nt(),r=t.document,n=e(r)&&e(r.createElement);return Aa=function(a){return n?r.createElement(a):{}},Aa}var ja,Kc;function Sh(){if(Kc)return ja;Kc=1;var t=De(),e=$e(),r=Ln();return ja=!t&&!e(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),ja}var Ua,zc;function ze(){if(zc)return Ua;zc=1;var t=Cn(),e=Function.prototype.call;return Ua=t?e.bind(e):function(){return e.apply(e,arguments)},Ua}var qa,Hc;function at(){if(Hc)return qa;Hc=1;var t=Se(),e=Pe(),r=function(n){return e(n)?n:void 0};return qa=function(n,a){return arguments.length<2?r(t[n]):t[n]&&t[n][a]},qa}var La,Bc;function Nn(){if(Bc)return La;Bc=1;var t=be();return La=t({}.isPrototypeOf),La}var Na,Gc;function Ih(){if(Gc)return Na;Gc=1;var t=at(),e=Pe(),r=Nn(),n=wh(),a=Object;return Na=n?function(i){return typeof i=="symbol"}:function(i){var o=t("Symbol");return e(o)&&r(o.prototype,a(i))},Na}var $a,Wc;function $n(){if(Wc)return $a;Wc=1;var t=String;return $a=function(e){try{return t(e)}catch{return"Object"}},$a}var xa,Vc;function ut(){if(Vc)return xa;Vc=1;var t=Pe(),e=$n(),r=TypeError;return xa=function(n){if(t(n))return n;throw new r(e(n)+" is not a function")},xa}var Da,Jc;function _s(){if(Jc)return Da;Jc=1;var t=ut(),e=jn();return Da=function(r,n){var a=r[n];return e(a)?void 0:t(a)},Da}var Ma,Zc;function gp(){if(Zc)return Ma;Zc=1;var t=ze(),e=Pe(),r=nt(),n=TypeError;return Ma=function(a,i){var o,s;if(i==="string"&&e(o=a.toString)&&!r(s=t(o,a))||e(o=a.valueOf)&&!r(s=t(o,a))||i!=="string"&&e(o=a.toString)&&!r(s=t(o,a)))return s;throw new n("Can't convert object to primitive value")},Ma}var Fa,Yc;function yp(){if(Yc)return Fa;Yc=1;var t=ze(),e=nt(),r=Ih(),n=_s(),a=gp(),i=xe(),o=TypeError,s=i("toPrimitive");return Fa=function(c,l){if(!e(c)||r(c))return c;var u=n(c,s),f;if(u){if(l===void 0&&(l="default"),f=t(u,c,l),!e(f)||r(f))return f;throw new o("Can't convert object to primitive value")}return l===void 0&&(l="number"),a(c,l)},Fa}var Ka,Xc;function Ph(){if(Xc)return Ka;Xc=1;var t=yp(),e=Ih();return Ka=function(r){var n=t(r,"string");return e(n)?n:n+""},Ka}var Qc;function Tt(){if(Qc)return Ca;Qc=1;var t=De(),e=Sh(),r=bh(),n=ct(),a=Ph(),i=TypeError,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c="enumerable",l="configurable",u="writable";return Ca.f=t?r?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 p=s(h,d);p&&p[u]&&(h[d]=v.value,v={configurable:l in v?v[l]:p[l],enumerable:c in v?v[c]:p[c],writable:!1})}return o(h,d,v)}:o:function(h,d,v){if(n(h),d=a(d),n(v),e)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},Ca}var za,eu;function wp(){if(eu)return za;eu=1;var t=Math.ceil,e=Math.floor;return za=Math.trunc||function(n){var a=+n;return(a>0?e:t)(a)},za}var Ha,tu;function Ts(){if(tu)return Ha;tu=1;var t=wp();return Ha=function(e){var r=+e;return r!==r||r===0?0:t(r)},Ha}var Ba,ru;function Eh(){if(ru)return Ba;ru=1;var t=Ts(),e=Math.max,r=Math.min;return Ba=function(n,a){var i=t(n);return i<0?e(i+a,0):r(i,a)},Ba}var Ga,nu;function bp(){if(nu)return Ga;nu=1;var t=Ts(),e=Math.min;return Ga=function(r){var n=t(r);return n>0?e(n,9007199254740991):0},Ga}var Wa,au;function ks(){if(au)return Wa;au=1;var t=bp();return Wa=function(e){return t(e.length)},Wa}var Va,iu;function Sp(){if(iu)return Va;iu=1;var t=Vr(),e=Eh(),r=ks(),n=function(a){return function(i,o,s){var c=t(i),l=r(c);if(l===0)return!a&&-1;var u=e(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 Va={includes:n(!0),indexOf:n(!1)},Va}var Ja,ou;function Rs(){return ou||(ou=1,Ja={}),Ja}var Za,su;function _h(){if(su)return Za;su=1;var t=be(),e=rt(),r=Vr(),n=Sp().indexOf,a=Rs(),i=t([].push);return Za=function(o,s){var c=r(o),l=0,u=[],f;for(f in c)!e(a,f)&&e(c,f)&&i(u,f);for(;s.length>l;)e(c,f=s[l++])&&(~n(u,f)||i(u,f));return u},Za}var Ya,cu;function Os(){return cu||(cu=1,Ya=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Ya}var Xa,uu;function Th(){if(uu)return Xa;uu=1;var t=_h(),e=Os();return Xa=Object.keys||function(n){return t(n,e)},Xa}var lu;function Ip(){if(lu)return ka;lu=1;var t=De(),e=bh(),r=Tt(),n=ct(),a=Vr(),i=Th();return ka.f=t&&!e?Object.defineProperties:function(s,c){n(s);for(var l=a(c),u=i(c),f=u.length,h=0,d;f>h;)r.f(s,d=u[h++],l[d]);return s},ka}var Qa,fu;function kh(){if(fu)return Qa;fu=1;var t=at();return Qa=t("document","documentElement"),Qa}var ei,du;function Cs(){if(du)return ei;du=1;var t=ph(),e=mh(),r=t("keys");return ei=function(n){return r[n]||(r[n]=e(n))},ei}var ti,hu;function Zr(){if(hu)return ti;hu=1;var t=ct(),e=Ip(),r=Os(),n=Rs(),a=kh(),i=Ln(),o=Cs(),s=">",c="<",l="prototype",u="script",f=o("IE_PROTO"),h=function(){},d=function(w){return c+u+s+w+c+"/"+u+s},v=function(w){w.write(d("")),w.close();var y=w.parentWindow.Object;return w=null,y},p=function(){var w=i("iframe"),y="java"+u+":",m;return w.style.display="none",a.appendChild(w),w.src=String(y),m=w.contentWindow.document,m.open(),m.write(d("document.F=Object")),m.close(),m.F},g,S=function(){try{g=new ActiveXObject("htmlfile")}catch{}S=typeof document<"u"?document.domain&&g?v(g):p():v(g);for(var w=r.length;w--;)delete S[l][r[w]];return S()};return n[f]=!0,ti=Object.create||function(y,m){var b;return y!==null?(h[l]=t(y),b=new h,h[l]=null,b[f]=y):b=S(),m===void 0?b:e.f(b,m)},ti}var ri,vu;function Pp(){if(vu)return ri;vu=1;var t=xe(),e=Zr(),r=Tt().f,n=t("unscopables"),a=Array.prototype;return a[n]===void 0&&r(a,n,{configurable:!0,value:e(null)}),ri=function(i){a[n][i]=!0},ri}var ni,pu;function Yr(){return pu||(pu=1,ni={}),ni}var ai,mu;function Ep(){if(mu)return ai;mu=1;var t=Se(),e=Pe(),r=t.WeakMap;return ai=e(r)&&/native code/.test(String(r)),ai}var ii,gu;function Xt(){return gu||(gu=1,ii=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}}),ii}var oi,yu;function Qt(){if(yu)return oi;yu=1;var t=De(),e=Tt(),r=Xt();return oi=t?function(n,a,i){return e.f(n,a,r(1,i))}:function(n,a,i){return n[a]=i,n},oi}var si,wu;function Sr(){if(wu)return si;wu=1;var t=Ep(),e=Se(),r=nt(),n=Qt(),a=rt(),i=Es(),o=Cs(),s=Rs(),c="Object already initialized",l=e.TypeError,u=e.WeakMap,f,h,d,v=function(w){return d(w)?h(w):f(w,{})},p=function(w){return function(y){var m;if(!r(y)||(m=h(y)).type!==w)throw new l("Incompatible receiver, "+w+" required");return m}};if(t||i.state){var g=i.state||(i.state=new u);g.get=g.get,g.has=g.has,g.set=g.set,f=function(w,y){if(g.has(w))throw new l(c);return y.facade=w,g.set(w,y),y},h=function(w){return g.get(w)||{}},d=function(w){return g.has(w)}}else{var S=o("state");s[S]=!0,f=function(w,y){if(a(w,S))throw new l(c);return y.facade=w,n(w,S,y),y},h=function(w){return a(w,S)?w[S]:{}},d=function(w){return a(w,S)}}return si={set:f,get:h,has:d,enforce:v,getterFor:p},si}var ci={},ui={},bu;function Rh(){if(bu)return ui;bu=1;var t={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,r=e&&!t.call({1:2},1);return ui.f=r?function(a){var i=e(this,a);return!!i&&i.enumerable}:t,ui}var Su;function Oh(){if(Su)return ci;Su=1;var t=De(),e=ze(),r=Rh(),n=Xt(),a=Vr(),i=Ph(),o=rt(),s=Sh(),c=Object.getOwnPropertyDescriptor;return ci.f=t?c:function(u,f){if(u=a(u),f=i(f),s)try{return c(u,f)}catch{}if(o(u,f))return n(!e(r.f,u,f),u[f])},ci}var li={exports:{}},fi,Iu;function Ch(){if(Iu)return fi;Iu=1;var t=De(),e=rt(),r=Function.prototype,n=t&&Object.getOwnPropertyDescriptor,a=e(r,"name"),i=a&&(function(){}).name==="something",o=a&&(!t||t&&n(r,"name").configurable);return fi={EXISTS:a,PROPER:i,CONFIGURABLE:o},fi}var di,Pu;function As(){if(Pu)return di;Pu=1;var t=be(),e=Pe(),r=Es(),n=t(Function.toString);return e(r.inspectSource)||(r.inspectSource=function(a){return n(a)}),di=r.inspectSource,di}var Eu;function Ah(){if(Eu)return li.exports;Eu=1;var t=be(),e=$e(),r=Pe(),n=rt(),a=De(),i=Ch().CONFIGURABLE,o=As(),s=Sr(),c=s.enforce,l=s.get,u=String,f=Object.defineProperty,h=t("".slice),d=t("".replace),v=t([].join),p=a&&!e(function(){return f(function(){},"length",{value:8}).length!==8}),g=String(String).split("String"),S=li.exports=function(w,y,m){h(u(y),0,7)==="Symbol("&&(y="["+d(u(y),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),m&&m.getter&&(y="get "+y),m&&m.setter&&(y="set "+y),(!n(w,"name")||i&&w.name!==y)&&(a?f(w,"name",{value:y,configurable:!0}):w.name=y),p&&m&&n(m,"arity")&&w.length!==m.arity&&f(w,"length",{value:m.arity});try{m&&n(m,"constructor")&&m.constructor?a&&f(w,"prototype",{writable:!1}):w.prototype&&(w.prototype=void 0)}catch{}var b=c(w);return n(b,"source")||(b.source=v(g,typeof y=="string"?y:"")),w};return Function.prototype.toString=S(function(){return r(this)&&l(this).source||o(this)},"toString"),li.exports}var hi,_u;function it(){if(_u)return hi;_u=1;var t=Pe(),e=Tt(),r=Ah(),n=Ps();return hi=function(a,i,o,s){s||(s={});var c=s.enumerable,l=s.name!==void 0?s.name:i;if(t(o)&&r(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:e.f(a,i,{value:o,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return a},hi}var vi={},Tu;function _p(){if(Tu)return vi;Tu=1;var t=_h(),e=Os(),r=e.concat("length","prototype");return vi.f=Object.getOwnPropertyNames||function(a){return t(a,r)},vi}var pi={},ku;function jh(){return ku||(ku=1,pi.f=Object.getOwnPropertySymbols),pi}var mi,Ru;function Tp(){if(Ru)return mi;Ru=1;var t=at(),e=be(),r=_p(),n=jh(),a=ct(),i=e([].concat);return mi=t("Reflect","ownKeys")||function(s){var c=r.f(a(s)),l=n.f;return l?i(c,l(s)):c},mi}var gi,Ou;function Uh(){if(Ou)return gi;Ou=1;var t=rt(),e=Tp(),r=Oh(),n=Tt();return gi=function(a,i,o){for(var s=e(i),c=n.f,l=r.f,u=0;u<s.length;u++){var f=s[u];!t(a,f)&&!(o&&t(o,f))&&c(a,f,l(i,f))}},gi}var yi,Cu;function qh(){if(Cu)return yi;Cu=1;var t=$e(),e=Pe(),r=/#|\.prototype\./,n=function(c,l){var u=i[a(c)];return u===s?!0:u===o?!1:e(l)?t(l):!!l},a=n.normalize=function(c){return String(c).replace(r,".").toLowerCase()},i=n.data={},o=n.NATIVE="N",s=n.POLYFILL="P";return yi=n,yi}var wi,Au;function ke(){if(Au)return wi;Au=1;var t=Se(),e=Oh().f,r=Qt(),n=it(),a=Ps(),i=Uh(),o=qh();return wi=function(s,c){var l=s.target,u=s.global,f=s.stat,h,d,v,p,g,S;if(u?d=t:f?d=t[l]||a(l,{}):d=t[l]&&t[l].prototype,d)for(v in c){if(g=c[v],s.dontCallGetSet?(S=e(d,v),p=S&&S.value):p=d[v],h=o(u?v:l+(f?".":"#")+v,s.forced),!h&&p!==void 0){if(typeof g==typeof p)continue;i(g,p)}(s.sham||p&&p.sham)&&r(g,"sham",!0),n(d,v,g,s)}},wi}var bi,ju;function kp(){if(ju)return bi;ju=1;var t=$e();return bi=!t(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),bi}var Si,Uu;function js(){if(Uu)return Si;Uu=1;var t=rt(),e=Pe(),r=qn(),n=Cs(),a=kp(),i=n("IE_PROTO"),o=Object,s=o.prototype;return Si=a?o.getPrototypeOf:function(c){var l=r(c);if(t(l,i))return l[i];var u=l.constructor;return e(u)&&l instanceof u?u.prototype:l instanceof o?s:null},Si}var Ii,qu;function Lh(){if(qu)return Ii;qu=1;var t=$e(),e=Pe(),r=nt(),n=Zr(),a=js(),i=it(),o=xe(),s=mt(),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=!r(u)||t(function(){var v={};return u[c].call(v)!==v});return d?u={}:s&&(u=n(u)),e(u[c])||i(u,c,function(){return this}),Ii={IteratorPrototype:u,BUGGY_SAFARI_ITERATORS:l},Ii}var Pi,Lu;function Ir(){if(Lu)return Pi;Lu=1;var t=Tt().f,e=rt(),r=xe(),n=r("toStringTag");return Pi=function(a,i,o){a&&!o&&(a=a.prototype),a&&!e(a,n)&&t(a,n,{configurable:!0,value:i})},Pi}var Ei,Nu;function Nh(){if(Nu)return Ei;Nu=1;var t=Lh().IteratorPrototype,e=Zr(),r=Xt(),n=Ir(),a=Yr(),i=function(){return this};return Ei=function(o,s,c,l){var u=s+" Iterator";return o.prototype=e(t,{next:r(+!l,c)}),n(o,u,!1,!0),a[u]=i,o},Ei}var _i,$u;function Rp(){if($u)return _i;$u=1;var t=be(),e=ut();return _i=function(r,n,a){try{return t(e(Object.getOwnPropertyDescriptor(r,n)[a]))}catch{}},_i}var Ti,xu;function Op(){if(xu)return Ti;xu=1;var t=nt();return Ti=function(e){return t(e)||e===null},Ti}var ki,Du;function Cp(){if(Du)return ki;Du=1;var t=Op(),e=String,r=TypeError;return ki=function(n){if(t(n))return n;throw new r("Can't set "+e(n)+" as a prototype")},ki}var Ri,Mu;function Us(){if(Mu)return Ri;Mu=1;var t=Rp(),e=nt(),r=Un(),n=Cp();return Ri=Object.setPrototypeOf||("__proto__"in{}?(function(){var a=!1,i={},o;try{o=t(Object.prototype,"__proto__","set"),o(i,[]),a=i instanceof Array}catch{}return function(c,l){return r(c),n(l),e(c)&&(a?o(c,l):c.__proto__=l),c}})():void 0),Ri}var Oi,Fu;function $h(){if(Fu)return Oi;Fu=1;var t=ke(),e=ze(),r=mt(),n=Ch(),a=Pe(),i=Nh(),o=js(),s=Us(),c=Ir(),l=Qt(),u=it(),f=xe(),h=Yr(),d=Lh(),v=n.PROPER,p=n.CONFIGURABLE,g=d.IteratorPrototype,S=d.BUGGY_SAFARI_ITERATORS,w=f("iterator"),y="keys",m="values",b="entries",O=function(){return this};return Oi=function(A,L,z,B,ie,q,D){i(z,L,B);var N=function(V){if(V===ie&&I)return I;if(!S&&V&&V in te)return te[V];switch(V){case y:return function(){return new z(this,V)};case m:return function(){return new z(this,V)};case b:return function(){return new z(this,V)}}return function(){return new z(this)}},R=L+" Iterator",Y=!1,te=A.prototype,Q=te[w]||te["@@iterator"]||ie&&te[ie],I=!S&&Q||N(ie),T=L==="Array"&&te.entries||Q,$,F,Z;if(T&&($=o(T.call(new A)),$!==Object.prototype&&$.next&&(!r&&o($)!==g&&(s?s($,g):a($[w])||u($,w,O)),c($,R,!0,!0),r&&(h[R]=O))),v&&ie===m&&Q&&Q.name!==m&&(!r&&p?l(te,"name",m):(Y=!0,I=function(){return e(Q,this)})),ie)if(F={values:N(m),keys:q?I:N(y),entries:N(b)},D)for(Z in F)(S||Y||!(Z in te))&&u(te,Z,F[Z]);else t({target:L,proto:!0,forced:S||Y},F);return(!r||D)&&te[w]!==I&&u(te,w,I,{name:ie}),h[L]=I,F},Oi}var Ci,Ku;function qs(){return Ku||(Ku=1,Ci=function(t,e){return{value:t,done:e}}),Ci}var Ai,zu;function Ls(){if(zu)return Ai;zu=1;var t=Vr(),e=Pp(),r=Yr(),n=Sr(),a=Tt().f,i=$h(),o=qs(),s=mt(),c=De(),l="Array Iterator",u=n.set,f=n.getterFor(l);Ai=i(Array,"Array",function(d,v){u(this,{type:l,target:t(d),index:0,kind:v})},function(){var d=f(this),v=d.target,p=d.index++;if(!v||p>=v.length)return d.target=null,o(void 0,!0);switch(d.kind){case"keys":return o(p,!1);case"values":return o(v[p],!1)}return o([p,v[p]],!1)},"values");var h=r.Arguments=r.Array;if(e("keys"),e("values"),e("entries"),!s&&c&&h.name!=="values")try{a(h,"name",{value:"values"})}catch{}return Ai}var Hu={},Bu;function Ap(){if(Bu)return Hu;Bu=1;var t=ke(),e=be(),r=Eh(),n=RangeError,a=String.fromCharCode,i=String.fromCodePoint,o=e([].join),s=!!i&&i.length!==1;return t({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++],r(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,"")}}),Hu}var ji,Gu;function xh(){if(Gu)return ji;Gu=1;var t=Se(),e=De(),r=Object.getOwnPropertyDescriptor;return ji=function(n){if(!e)return t[n];var a=r(t,n);return a&&a.value},ji}var Ui,Wu;function xn(){if(Wu)return Ui;Wu=1;var t=$e(),e=xe(),r=De(),n=mt(),a=e("iterator");return Ui=!t(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||!r)||!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"}),Ui}var qi,Vu;function Dn(){if(Vu)return qi;Vu=1;var t=Ah(),e=Tt();return qi=function(r,n,a){return a.get&&t(a.get,n,{getter:!0}),a.set&&t(a.set,n,{setter:!0}),e.f(r,n,a)},qi}var Li,Ju;function jp(){if(Ju)return Li;Ju=1;var t=it();return Li=function(e,r,n){for(var a in r)t(e,a,r[a],n);return e},Li}var Ni,Zu;function Ns(){if(Zu)return Ni;Zu=1;var t=Nn(),e=TypeError;return Ni=function(r,n){if(t(n,r))return r;throw new e("Incorrect invocation")},Ni}var $i,Yu;function Up(){if(Yu)return $i;Yu=1;var t=An(),e=be();return $i=function(r){if(t(r)==="Function")return e(r)},$i}var xi,Xu;function Pr(){if(Xu)return xi;Xu=1;var t=Up(),e=ut(),r=Cn(),n=t(t.bind);return xi=function(a,i){return e(a),i===void 0?a:r?n(a,i):function(){return a.apply(i,arguments)}},xi}var Di,Qu;function $s(){if(Qu)return Di;Qu=1;var t=xe(),e=t("toStringTag"),r={};return r[e]="z",Di=String(r)==="[object z]",Di}var Mi,el;function Xr(){if(el)return Mi;el=1;var t=$s(),e=Pe(),r=An(),n=xe(),a=n("toStringTag"),i=Object,o=r((function(){return arguments})())==="Arguments",s=function(c,l){try{return c[l]}catch{}};return Mi=t?r:function(c){var l,u,f;return c===void 0?"Undefined":c===null?"Null":typeof(u=s(l=i(c),a))=="string"?u:o?r(l):(f=r(l))==="Object"&&e(l.callee)?"Arguments":f},Mi}var Fi,tl;function kt(){if(tl)return Fi;tl=1;var t=Xr(),e=String;return Fi=function(r){if(t(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return e(r)},Fi}var Ki,rl;function Mn(){if(rl)return Ki;rl=1;var t=Xr(),e=_s(),r=jn(),n=Yr(),a=xe(),i=a("iterator");return Ki=function(o){if(!r(o))return e(o,i)||e(o,"@@iterator")||n[t(o)]},Ki}var zi,nl;function xs(){if(nl)return zi;nl=1;var t=ze(),e=ut(),r=ct(),n=$n(),a=Mn(),i=TypeError;return zi=function(o,s){var c=arguments.length<2?a(o):s;if(e(c))return r(t(c,o));throw new i(n(o)+" is not iterable")},zi}var Hi,al;function er(){if(al)return Hi;al=1;var t=TypeError;return Hi=function(e,r){if(e<r)throw new t("Not enough arguments");return e},Hi}var Bi,il;function Fn(){if(il)return Bi;il=1;var t=be();return Bi=t([].slice),Bi}var Gi,ol;function qp(){if(ol)return Gi;ol=1;var t=Fn(),e=Math.floor,r=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=e(i/2),u=r(t(n,0,l),a),f=r(t(n,l),a),h=u.length,d=f.length,v=0,p=0;v<h||p<d;)n[v+p]=v<h&&p<d?a(u[v],f[p])<=0?u[v++]:f[p++]:v<h?u[v++]:f[p++];return n};return Gi=r,Gi}var Wi,sl;function Dh(){if(sl)return Wi;sl=1,Ls(),Ap();var t=ke(),e=Se(),r=xh(),n=at(),a=ze(),i=be(),o=De(),s=xn(),c=it(),l=Dn(),u=jp(),f=Ir(),h=Nh(),d=Sr(),v=Ns(),p=Pe(),g=rt(),S=Pr(),w=Xr(),y=ct(),m=nt(),b=kt(),O=Zr(),A=Xt(),L=xs(),z=Mn(),B=qs(),ie=er(),q=xe(),D=qp(),N=q("iterator"),R="URLSearchParams",Y=R+"Iterator",te=d.set,Q=d.getterFor(R),I=d.getterFor(Y),T=r("fetch"),$=r("Request"),F=r("Headers"),Z=$&&$.prototype,V=F&&F.prototype,he=e.TypeError,oe=e.encodeURIComponent,le=String.fromCharCode,se=n("String","fromCodePoint"),_e=parseInt,Ae=i("".charAt),Me=i([].join),Re=i([].push),Je=i("".replace),lt=i([].shift),ft=i([].splice),gt=i("".split),yt=i("".slice),k=i(/./.exec),K=/\+/g,J="�",re=/^[0-9a-f]+$/i,me=function(x,G){var W=yt(x,G,G+2);return k(re,W)?_e(W,16):NaN},Fe=function(x){for(var G=0,W=128;W>0&&(x&W)!==0;W>>=1)G++;return G},M=function(x){var G=null;switch(x.length){case 1:G=x[0];break;case 2:G=(x[0]&31)<<6|x[1]&63;break;case 3:G=(x[0]&15)<<12|(x[1]&63)<<6|x[2]&63;break;case 4:G=(x[0]&7)<<18|(x[1]&63)<<12|(x[2]&63)<<6|x[3]&63;break}return G>1114111?null:G},ee=function(x){x=Je(x,K," ");for(var G=x.length,W="",X=0;X<G;){var ue=Ae(x,X);if(ue==="%"){if(Ae(x,X+1)==="%"||X+3>G){W+="%",X++;continue}var de=me(x,X+1);if(de!==de){W+=ue,X++;continue}X+=2;var ye=Fe(de);if(ye===0)ue=le(de);else{if(ye===1||ye>4){W+=J,X++;continue}for(var we=[de],Ee=1;Ee<ye&&(X++,!(X+3>G||Ae(x,X)!=="%"));){var Ke=me(x,X+1);if(Ke!==Ke){X+=3;break}if(Ke>191||Ke<128)break;Re(we,Ke),X+=2,Ee++}if(we.length!==ye){W+=J;continue}var dt=M(we);dt===null?W+=J:ue=se(dt)}}W+=ue,X++}return W},fe=/[!'()~]|%20/g,ve={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ge=function(x){return ve[x]},Ze=function(x){return Je(oe(x),fe,ge)},je=h(function(G,W){te(this,{type:Y,target:Q(G).entries,index:0,kind:W})},R,function(){var G=I(this),W=G.target,X=G.index++;if(!W||X>=W.length)return G.target=null,B(void 0,!0);var ue=W[X];switch(G.kind){case"keys":return B(ue.key,!1);case"values":return B(ue.value,!1)}return B([ue.key,ue.value],!1)},!0),Be=function(x){this.entries=[],this.url=null,x!==void 0&&(m(x)?this.parseObject(x):this.parseQuery(typeof x=="string"?Ae(x,0)==="?"?yt(x,1):x:b(x)))};Be.prototype={type:R,bindURL:function(x){this.url=x,this.update()},parseObject:function(x){var G=this.entries,W=z(x),X,ue,de,ye,we,Ee,Ke;if(W)for(X=L(x,W),ue=X.next;!(de=a(ue,X)).done;){if(ye=L(y(de.value)),we=ye.next,(Ee=a(we,ye)).done||(Ke=a(we,ye)).done||!a(we,ye).done)throw new he("Expected sequence with length 2");Re(G,{key:b(Ee.value),value:b(Ke.value)})}else for(var dt in x)g(x,dt)&&Re(G,{key:dt,value:b(x[dt])})},parseQuery:function(x){if(x)for(var G=this.entries,W=gt(x,"&"),X=0,ue,de;X<W.length;)ue=W[X++],ue.length&&(de=gt(ue,"="),Re(G,{key:ee(lt(de)),value:ee(Me(de,"="))}))},serialize:function(){for(var x=this.entries,G=[],W=0,X;W<x.length;)X=x[W++],Re(G,Ze(X.key)+"="+Ze(X.value));return Me(G,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Ue=function(){v(this,Xe);var G=arguments.length>0?arguments[0]:void 0,W=te(this,new Be(G));o||(this.size=W.entries.length)},Xe=Ue.prototype;if(u(Xe,{append:function(G,W){var X=Q(this);ie(arguments.length,2),Re(X.entries,{key:b(G),value:b(W)}),o||this.length++,X.updateURL()},delete:function(x){for(var G=Q(this),W=ie(arguments.length,1),X=G.entries,ue=b(x),de=W<2?void 0:arguments[1],ye=de===void 0?de:b(de),we=0;we<X.length;){var Ee=X[we];if(Ee.key===ue&&(ye===void 0||Ee.value===ye)){if(ft(X,we,1),ye!==void 0)break}else we++}o||(this.size=X.length),G.updateURL()},get:function(G){var W=Q(this).entries;ie(arguments.length,1);for(var X=b(G),ue=0;ue<W.length;ue++)if(W[ue].key===X)return W[ue].value;return null},getAll:function(G){var W=Q(this).entries;ie(arguments.length,1);for(var X=b(G),ue=[],de=0;de<W.length;de++)W[de].key===X&&Re(ue,W[de].value);return ue},has:function(G){for(var W=Q(this).entries,X=ie(arguments.length,1),ue=b(G),de=X<2?void 0:arguments[1],ye=de===void 0?de:b(de),we=0;we<W.length;){var Ee=W[we++];if(Ee.key===ue&&(ye===void 0||Ee.value===ye))return!0}return!1},set:function(G,W){var X=Q(this);ie(arguments.length,1);for(var ue=X.entries,de=!1,ye=b(G),we=b(W),Ee=0,Ke;Ee<ue.length;Ee++)Ke=ue[Ee],Ke.key===ye&&(de?ft(ue,Ee--,1):(de=!0,Ke.value=we));de||Re(ue,{key:ye,value:we}),o||(this.size=ue.length),X.updateURL()},sort:function(){var G=Q(this);D(G.entries,function(W,X){return W.key>X.key?1:-1}),G.updateURL()},forEach:function(G){for(var W=Q(this).entries,X=S(G,arguments.length>1?arguments[1]:void 0),ue=0,de;ue<W.length;)de=W[ue++],X(de.value,de.key,this)},keys:function(){return new je(this,"keys")},values:function(){return new je(this,"values")},entries:function(){return new je(this,"entries")}},{enumerable:!0}),c(Xe,N,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(Ue,R),t({global:!0,constructor:!0,forced:!s},{URLSearchParams:Ue}),!s&&p(F)){var tr=i(V.has),Rr=i(V.set),rr=function(x){if(m(x)){var G=x.body,W;if(w(G)===R)return W=x.headers?new F(x.headers):new F,tr(W,"content-type")||Rr(W,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),O(x,{body:A(0,b(G)),headers:A(0,W)})}return x};if(p(T)&&t({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(G){return T(G,arguments.length>1?rr(arguments[1]):{})}}),p($)){var nr=function(G){return v(this,Z),new $(G,arguments.length>1?rr(arguments[1]):{})};Z.constructor=nr,nr.prototype=Z,t({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:nr})}}return Wi={URLSearchParams:Ue,getState:Q},Wi}var cl;function Lp(){return cl||(cl=1,Dh()),vc}var ul={},ll;function Np(){if(ll)return ul;ll=1;var t=it(),e=be(),r=kt(),n=er(),a=URLSearchParams,i=a.prototype,o=e(i.append),s=e(i.delete),c=e(i.forEach),l=e([].push),u=new a("a=1&a=2&b=3");return u.delete("a",1),u.delete("b",void 0),u+""!="a=2"&&t(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(O,A){l(v,{key:A,value:O})}),n(h,1);for(var p=r(f),g=r(d),S=0,w=0,y=!1,m=v.length,b;S<m;)b=v[S++],y||b.key===p?(y=!0,s(this,b.key)):w++;for(;w<m;)b=v[w++],b.key===p&&b.value===g||o(this,b.key,b.value)},{enumerable:!0,unsafe:!0}),ul}var fl={},dl;function $p(){if(dl)return fl;dl=1;var t=it(),e=be(),r=kt(),n=er(),a=URLSearchParams,i=a.prototype,o=e(i.getAll),s=e(i.has),c=new a("a=1");return(c.has("a",2)||!c.has("a",void 0))&&t(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=r(h),p=0;p<d.length;)if(d[p++]===v)return!0;return!1},{enumerable:!0,unsafe:!0}),fl}var hl={},vl;function xp(){if(vl)return hl;vl=1;var t=De(),e=be(),r=Dn(),n=URLSearchParams.prototype,a=e(n.forEach);return t&&!("size"in n)&&r(n,"size",{get:function(){var o=0;return a(this,function(){o++}),o},configurable:!0,enumerable:!0}),hl}var Vi,pl;function Kn(){if(pl)return Vi;pl=1;var t=Se();return Vi=t,Vi}var Ji,ml;function Mh(){if(ml)return Ji;ml=1,Lp(),Np(),$p(),xp();var t=Kn();return Ji=t.URLSearchParams,Ji}var gl={},yl={},wl={},Zi,bl;function Fh(){if(bl)return Zi;bl=1;var t=be(),e=Ts(),r=kt(),n=Un(),a=t("".charAt),i=t("".charCodeAt),o=t("".slice),s=function(c){return function(l,u){var f=r(n(l)),h=e(u),d=f.length,v,p;return h<0||h>=d?c?"":void 0:(v=i(f,h),v<55296||v>56319||h+1===d||(p=i(f,h+1))<56320||p>57343?c?a(f,h):v:c?o(f,h,h+2):(v-55296<<10)+(p-56320)+65536)}};return Zi={codeAt:s(!1),charAt:s(!0)},Zi}var Sl;function Kh(){if(Sl)return wl;Sl=1;var t=Fh().charAt,e=kt(),r=Sr(),n=$h(),a=qs(),i="String Iterator",o=r.set,s=r.getterFor(i);return n(String,"String",function(c){o(this,{type:i,string:e(c),index:0})},function(){var l=s(this),u=l.string,f=l.index,h;return f>=u.length?a(void 0,!0):(h=t(u,f),l.index+=h.length,a(h,!1))}),wl}var Yi,Il;function Dp(){if(Il)return Yi;Il=1;var t=De(),e=be(),r=ze(),n=$e(),a=Th(),i=jh(),o=Rh(),s=qn(),c=vh(),l=Object.assign,u=Object.defineProperty,f=e([].concat);return Yi=!l||n(function(){if(t&&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"),p="abcdefghijklmnopqrst";return h[v]=7,p.split("").forEach(function(g){d[g]=g}),l({},h)[v]!==7||a(l({},d)).join("")!==p})?function(d,v){for(var p=s(d),g=arguments.length,S=1,w=i.f,y=o.f;g>S;)for(var m=c(arguments[S++]),b=w?f(a(m),w(m)):a(m),O=b.length,A=0,L;O>A;)L=b[A++],(!t||r(y,m,L))&&(p[L]=m[L]);return p}:l,Yi}var Xi,Pl;function zh(){if(Pl)return Xi;Pl=1;var t=ze(),e=ct(),r=_s();return Xi=function(n,a,i){var o,s;e(n);try{if(o=r(n,"return"),!o){if(a==="throw")throw i;return i}o=t(o,n)}catch(c){s=!0,o=c}if(a==="throw")throw i;if(s)throw o;return e(o),i},Xi}var Qi,El;function Mp(){if(El)return Qi;El=1;var t=ct(),e=zh();return Qi=function(r,n,a,i){try{return i?n(t(a)[0],a[1]):n(a)}catch(o){e(r,"throw",o)}},Qi}var eo,_l;function Hh(){if(_l)return eo;_l=1;var t=xe(),e=Yr(),r=t("iterator"),n=Array.prototype;return eo=function(a){return a!==void 0&&(e.Array===a||n[r]===a)},eo}var to,Tl;function Bh(){if(Tl)return to;Tl=1;var t=be(),e=$e(),r=Pe(),n=Xr(),a=at(),i=As(),o=function(){},s=a("Reflect","construct"),c=/^\s*(?:class|function)\b/,l=t(c.exec),u=!c.test(o),f=function(v){if(!r(v))return!1;try{return s(o,[],v),!0}catch{return!1}},h=function(v){if(!r(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,to=!s||e(function(){var d;return f(f.call)||!f(Object)||!f(function(){d=!0})||d})?h:f,to}var ro,kl;function Fp(){if(kl)return ro;kl=1;var t=De(),e=Tt(),r=Xt();return ro=function(n,a,i){t?e.f(n,a,r(0,i)):n[a]=i},ro}var no,Rl;function Kp(){if(Rl)return no;Rl=1;var t=Pr(),e=ze(),r=qn(),n=Mp(),a=Hh(),i=Bh(),o=ks(),s=Fp(),c=xs(),l=Mn(),u=Array;return no=function(h){var d=r(h),v=i(this),p=arguments.length,g=p>1?arguments[1]:void 0,S=g!==void 0;S&&(g=t(g,p>2?arguments[2]:void 0));var w=l(d),y=0,m,b,O,A,L,z;if(w&&!(this===u&&a(w)))for(b=v?new this:[],A=c(d,w),L=A.next;!(O=e(L,A)).done;y++)z=S?n(A,g,[O.value,y],!0):O.value,s(b,y,z);else for(m=o(d),b=v?new this(m):u(m);m>y;y++)z=S?g(d[y],y):d[y],s(b,y,z);return b.length=y,b},no}var ao,Ol;function zp(){if(Ol)return ao;Ol=1;var t=be(),e=2147483647,r=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=r-n,v=RangeError,p=t(f.exec),g=Math.floor,S=String.fromCharCode,w=t("".charCodeAt),y=t([].join),m=t([].push),b=t("".replace),O=t("".split),A=t("".toLowerCase),L=function(q){for(var D=[],N=0,R=q.length;N<R;){var Y=w(q,N++);if(Y>=55296&&Y<=56319&&N<R){var te=w(q,N++);(te&64512)===56320?m(D,((Y&1023)<<10)+(te&1023)+65536):(m(D,Y),N--)}else m(D,Y)}return D},z=function(q){return q+22+75*(q<26)},B=function(q,D,N){var R=0;for(q=N?g(q/o):q>>1,q+=g(q/D);q>d*a>>1;)q=g(q/d),R+=r;return g(R+(d+1)*q/(q+i))},ie=function(q){var D=[];q=L(q);var N=q.length,R=c,Y=0,te=s,Q,I;for(Q=0;Q<q.length;Q++)I=q[Q],I<128&&m(D,S(I));var T=D.length,$=T;for(T&&m(D,l);$<N;){var F=e;for(Q=0;Q<q.length;Q++)I=q[Q],I>=R&&I<F&&(F=I);var Z=$+1;if(F-R>g((e-Y)/Z))throw new v(h);for(Y+=(F-R)*Z,R=F,Q=0;Q<q.length;Q++){if(I=q[Q],I<R&&++Y>e)throw new v(h);if(I===R){for(var V=Y,he=r;;){var oe=he<=te?n:he>=te+a?a:he-te;if(V<oe)break;var le=V-oe,se=r-oe;m(D,S(z(oe+le%se))),V=g(le/se),he+=r}m(D,S(z(V))),te=B(Y,Z,$===T),Y=0,$++}}Y++,R++}return y(D,"")};return ao=function(q){var D=[],N=O(b(A(q),f,"."),"."),R,Y;for(R=0;R<N.length;R++)Y=N[R],m(D,p(u,Y)?"xn--"+ie(Y):Y);return y(D,".")},ao}var Cl;function Hp(){if(Cl)return yl;Cl=1,Kh();var t=ke(),e=De(),r=xn(),n=Se(),a=Pr(),i=be(),o=it(),s=Dn(),c=Ns(),l=rt(),u=Dp(),f=Kp(),h=Fn(),d=Fh().codeAt,v=zp(),p=kt(),g=Ir(),S=er(),w=Dh(),y=Sr(),m=y.set,b=y.getterFor("URL"),O=w.URLSearchParams,A=w.getState,L=n.URL,z=n.TypeError,B=n.parseInt,ie=Math.floor,q=Math.pow,D=i("".charAt),N=i(/./.exec),R=i([].join),Y=i(1.1.toString),te=i([].pop),Q=i([].push),I=i("".replace),T=i([].shift),$=i("".split),F=i("".slice),Z=i("".toLowerCase),V=i([].unshift),he="Invalid authority",oe="Invalid scheme",le="Invalid host",se="Invalid port",_e=/[a-z]/i,Ae=/[\d+-.a-z]/i,Me=/\d/,Re=/^0x/i,Je=/^[0-7]+$/,lt=/^\d+$/,ft=/^[\da-f]+$/i,gt=/[\0\t\n\r #%/:<>?@[\\\]^|]/,yt=/[\0\t\n\r #/:<>?@[\\\]^|]/,k=/^[\u0000-\u0020]+/,K=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,J=/[\t\n\r]/g,re,me=function(E){var U=$(E,"."),_,P,C,ce,H,Ie,Te;if(U.length&&U[U.length-1]===""&&U.length--,_=U.length,_>4)return E;for(P=[],C=0;C<_;C++){if(ce=U[C],ce==="")return E;if(H=10,ce.length>1&&D(ce,0)==="0"&&(H=N(Re,ce)?16:8,ce=F(ce,H===8?1:2)),ce==="")Ie=0;else{if(!N(H===10?lt:H===8?Je:ft,ce))return E;Ie=B(ce,H)}Q(P,Ie)}for(C=0;C<_;C++)if(Ie=P[C],C===_-1){if(Ie>=q(256,5-_))return null}else if(Ie>255)return null;for(Te=te(P),C=0;C<P.length;C++)Te+=P[C]*q(256,3-C);return Te},Fe=function(E){var U=[0,0,0,0,0,0,0,0],_=0,P=null,C=0,ce,H,Ie,Te,qe,et,j,Oe=function(){return D(E,C)};if(Oe()===":"){if(D(E,1)!==":")return;C+=2,_++,P=_}for(;Oe();){if(_===8)return;if(Oe()===":"){if(P!==null)return;C++,_++,P=_;continue}for(ce=H=0;H<4&&N(ft,Oe());)ce=ce*16+B(Oe(),16),C++,H++;if(Oe()==="."){if(H===0||(C-=H,_>6))return;for(Ie=0;Oe();){if(Te=null,Ie>0)if(Oe()==="."&&Ie<4)C++;else return;if(!N(Me,Oe()))return;for(;N(Me,Oe());){if(qe=B(Oe(),10),Te===null)Te=qe;else{if(Te===0)return;Te=Te*10+qe}if(Te>255)return;C++}U[_]=U[_]*256+Te,Ie++,(Ie===2||Ie===4)&&_++}if(Ie!==4)return;break}else if(Oe()===":"){if(C++,!Oe())return}else if(Oe())return;U[_++]=ce}if(P!==null)for(et=_-P,_=7;_!==0&&et>0;)j=U[_],U[_--]=U[P+et-1],U[P+--et]=j;else if(_!==8)return;return U},M=function(E){for(var U=null,_=1,P=null,C=0,ce=0;ce<8;ce++)E[ce]!==0?(C>_&&(U=P,_=C),P=null,C=0):(P===null&&(P=ce),++C);return C>_?P:U},ee=function(E){var U,_,P,C;if(typeof E=="number"){for(U=[],_=0;_<4;_++)V(U,E%256),E=ie(E/256);return R(U,".")}if(typeof E=="object"){for(U="",P=M(E),_=0;_<8;_++)C&&E[_]===0||(C&&(C=!1),P===_?(U+=_?":":"::",C=!0):(U+=Y(E[_],16),_<7&&(U+=":")));return"["+U+"]"}return E},fe={},ve=u({},fe,{" ":1,'"':1,"<":1,">":1,"`":1}),ge=u({},ve,{"#":1,"?":1,"{":1,"}":1}),Ze=u({},ge,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),je=function(E,U){var _=d(E,0);return _>32&&_<127&&!l(U,E)?E:encodeURIComponent(E)},Be={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Ue=function(E,U){var _;return E.length===2&&N(_e,D(E,0))&&((_=D(E,1))===":"||!U&&_==="|")},Xe=function(E){var U;return E.length>1&&Ue(F(E,0,2))&&(E.length===2||(U=D(E,2))==="/"||U==="\\"||U==="?"||U==="#")},tr=function(E){return E==="."||Z(E)==="%2e"},Rr=function(E){return E=Z(E),E===".."||E==="%2e."||E===".%2e"||E==="%2e%2e"},rr={},nr={},x={},G={},W={},X={},ue={},de={},ye={},we={},Ee={},Ke={},dt={},Qn={},sc={},ea={},ar={},ht={},cc={},Lt={},wt={},ta=function(E,U,_){var P=p(E),C,ce,H;if(U){if(ce=this.parse(P),ce)throw new z(ce);this.searchParams=null}else{if(_!==void 0&&(C=new ta(_,!0)),ce=this.parse(P,null,C),ce)throw new z(ce);H=A(new O),H.bindURL(this),this.searchParams=H}};ta.prototype={type:"URL",parse:function(E,U,_){var P=this,C=U||rr,ce=0,H="",Ie=!1,Te=!1,qe=!1,et,j,Oe,bt;for(E=p(E),U||(P.scheme="",P.username="",P.password="",P.host=null,P.port=null,P.path=[],P.query=null,P.fragment=null,P.cannotBeABaseURL=!1,E=I(E,k,""),E=I(E,K,"$1")),E=I(E,J,""),et=f(E);ce<=et.length;){switch(j=et[ce],C){case rr:if(j&&N(_e,j))H+=Z(j),C=nr;else{if(U)return oe;C=x;continue}break;case nr:if(j&&(N(Ae,j)||j==="+"||j==="-"||j==="."))H+=Z(j);else if(j===":"){if(U&&(P.isSpecial()!==l(Be,H)||H==="file"&&(P.includesCredentials()||P.port!==null)||P.scheme==="file"&&!P.host))return;if(P.scheme=H,U){P.isSpecial()&&Be[P.scheme]===P.port&&(P.port=null);return}H="",P.scheme==="file"?C=Qn:P.isSpecial()&&_&&_.scheme===P.scheme?C=G:P.isSpecial()?C=de:et[ce+1]==="/"?(C=W,ce++):(P.cannotBeABaseURL=!0,Q(P.path,""),C=cc)}else{if(U)return oe;H="",C=x,ce=0;continue}break;case x:if(!_||_.cannotBeABaseURL&&j!=="#")return oe;if(_.cannotBeABaseURL&&j==="#"){P.scheme=_.scheme,P.path=h(_.path),P.query=_.query,P.fragment="",P.cannotBeABaseURL=!0,C=wt;break}C=_.scheme==="file"?Qn:X;continue;case G:if(j==="/"&&et[ce+1]==="/")C=ye,ce++;else{C=X;continue}break;case W:if(j==="/"){C=we;break}else{C=ht;continue}case X:if(P.scheme=_.scheme,j===re)P.username=_.username,P.password=_.password,P.host=_.host,P.port=_.port,P.path=h(_.path),P.query=_.query;else if(j==="/"||j==="\\"&&P.isSpecial())C=ue;else if(j==="?")P.username=_.username,P.password=_.password,P.host=_.host,P.port=_.port,P.path=h(_.path),P.query="",C=Lt;else if(j==="#")P.username=_.username,P.password=_.password,P.host=_.host,P.port=_.port,P.path=h(_.path),P.query=_.query,P.fragment="",C=wt;else{P.username=_.username,P.password=_.password,P.host=_.host,P.port=_.port,P.path=h(_.path),P.path.length--,C=ht;continue}break;case ue:if(P.isSpecial()&&(j==="/"||j==="\\"))C=ye;else if(j==="/")C=we;else{P.username=_.username,P.password=_.password,P.host=_.host,P.port=_.port,C=ht;continue}break;case de:if(C=ye,j!=="/"||D(H,ce+1)!=="/")continue;ce++;break;case ye:if(j!=="/"&&j!=="\\"){C=we;continue}break;case we:if(j==="@"){Ie&&(H="%40"+H),Ie=!0,Oe=f(H);for(var ra=0;ra<Oe.length;ra++){var fc=Oe[ra];if(fc===":"&&!qe){qe=!0;continue}var dc=je(fc,Ze);qe?P.password+=dc:P.username+=dc}H=""}else if(j===re||j==="/"||j==="?"||j==="#"||j==="\\"&&P.isSpecial()){if(Ie&&H==="")return he;ce-=f(H).length+1,H="",C=Ee}else H+=j;break;case Ee:case Ke:if(U&&P.scheme==="file"){C=ea;continue}else if(j===":"&&!Te){if(H==="")return le;if(bt=P.parseHost(H),bt)return bt;if(H="",C=dt,U===Ke)return}else if(j===re||j==="/"||j==="?"||j==="#"||j==="\\"&&P.isSpecial()){if(P.isSpecial()&&H==="")return le;if(U&&H===""&&(P.includesCredentials()||P.port!==null))return;if(bt=P.parseHost(H),bt)return bt;if(H="",C=ar,U)return;continue}else j==="["?Te=!0:j==="]"&&(Te=!1),H+=j;break;case dt:if(N(Me,j))H+=j;else if(j===re||j==="/"||j==="?"||j==="#"||j==="\\"&&P.isSpecial()||U){if(H!==""){var na=B(H,10);if(na>65535)return se;P.port=P.isSpecial()&&na===Be[P.scheme]?null:na,H=""}if(U)return;C=ar;continue}else return se;break;case Qn:if(P.scheme="file",j==="/"||j==="\\")C=sc;else if(_&&_.scheme==="file")switch(j){case re:P.host=_.host,P.path=h(_.path),P.query=_.query;break;case"?":P.host=_.host,P.path=h(_.path),P.query="",C=Lt;break;case"#":P.host=_.host,P.path=h(_.path),P.query=_.query,P.fragment="",C=wt;break;default:Xe(R(h(et,ce),""))||(P.host=_.host,P.path=h(_.path),P.shortenPath()),C=ht;continue}else{C=ht;continue}break;case sc:if(j==="/"||j==="\\"){C=ea;break}_&&_.scheme==="file"&&!Xe(R(h(et,ce),""))&&(Ue(_.path[0],!0)?Q(P.path,_.path[0]):P.host=_.host),C=ht;continue;case ea:if(j===re||j==="/"||j==="\\"||j==="?"||j==="#"){if(!U&&Ue(H))C=ht;else if(H===""){if(P.host="",U)return;C=ar}else{if(bt=P.parseHost(H),bt)return bt;if(P.host==="localhost"&&(P.host=""),U)return;H="",C=ar}continue}else H+=j;break;case ar:if(P.isSpecial()){if(C=ht,j!=="/"&&j!=="\\")continue}else if(!U&&j==="?")P.query="",C=Lt;else if(!U&&j==="#")P.fragment="",C=wt;else if(j!==re&&(C=ht,j!=="/"))continue;break;case ht:if(j===re||j==="/"||j==="\\"&&P.isSpecial()||!U&&(j==="?"||j==="#")){if(Rr(H)?(P.shortenPath(),j!=="/"&&!(j==="\\"&&P.isSpecial())&&Q(P.path,"")):tr(H)?j!=="/"&&!(j==="\\"&&P.isSpecial())&&Q(P.path,""):(P.scheme==="file"&&!P.path.length&&Ue(H)&&(P.host&&(P.host=""),H=D(H,0)+":"),Q(P.path,H)),H="",P.scheme==="file"&&(j===re||j==="?"||j==="#"))for(;P.path.length>1&&P.path[0]==="";)T(P.path);j==="?"?(P.query="",C=Lt):j==="#"&&(P.fragment="",C=wt)}else H+=je(j,ge);break;case cc:j==="?"?(P.query="",C=Lt):j==="#"?(P.fragment="",C=wt):j!==re&&(P.path[0]+=je(j,fe));break;case Lt:!U&&j==="#"?(P.fragment="",C=wt):j!==re&&(j==="'"&&P.isSpecial()?P.query+="%27":j==="#"?P.query+="%23":P.query+=je(j,fe));break;case wt:j!==re&&(P.fragment+=je(j,ve));break}ce++}},parseHost:function(E){var U,_,P;if(D(E,0)==="["){if(D(E,E.length-1)!=="]"||(U=Fe(F(E,1,-1)),!U))return le;this.host=U}else if(this.isSpecial()){if(E=v(E),N(gt,E)||(U=me(E),U===null))return le;this.host=U}else{if(N(yt,E))return le;for(U="",_=f(E),P=0;P<_.length;P++)U+=je(_[P],fe);this.host=U}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return l(Be,this.scheme)},shortenPath:function(){var E=this.path,U=E.length;U&&(this.scheme!=="file"||U!==1||!Ue(E[0],!0))&&E.length--},serialize:function(){var E=this,U=E.scheme,_=E.username,P=E.password,C=E.host,ce=E.port,H=E.path,Ie=E.query,Te=E.fragment,qe=U+":";return C!==null?(qe+="//",E.includesCredentials()&&(qe+=_+(P?":"+P:"")+"@"),qe+=ee(C),ce!==null&&(qe+=":"+ce)):U==="file"&&(qe+="//"),qe+=E.cannotBeABaseURL?H[0]:H.length?"/"+R(H,"/"):"",Ie!==null&&(qe+="?"+Ie),Te!==null&&(qe+="#"+Te),qe},setHref:function(E){var U=this.parse(E);if(U)throw new z(U);this.searchParams.update()},getOrigin:function(){var E=this.scheme,U=this.port;if(E==="blob")try{return new ir(E.path[0]).origin}catch{return"null"}return E==="file"||!this.isSpecial()?"null":E+"://"+ee(this.host)+(U!==null?":"+U:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(E){this.parse(p(E)+":",rr)},getUsername:function(){return this.username},setUsername:function(E){var U=f(p(E));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var _=0;_<U.length;_++)this.username+=je(U[_],Ze)}},getPassword:function(){return this.password},setPassword:function(E){var U=f(p(E));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var _=0;_<U.length;_++)this.password+=je(U[_],Ze)}},getHost:function(){var E=this.host,U=this.port;return E===null?"":U===null?ee(E):ee(E)+":"+U},setHost:function(E){this.cannotBeABaseURL||this.parse(E,Ee)},getHostname:function(){var E=this.host;return E===null?"":ee(E)},setHostname:function(E){this.cannotBeABaseURL||this.parse(E,Ke)},getPort:function(){var E=this.port;return E===null?"":p(E)},setPort:function(E){this.cannotHaveUsernamePasswordPort()||(E=p(E),E===""?this.port=null:this.parse(E,dt))},getPathname:function(){var E=this.path;return this.cannotBeABaseURL?E[0]:E.length?"/"+R(E,"/"):""},setPathname:function(E){this.cannotBeABaseURL||(this.path=[],this.parse(E,ar))},getSearch:function(){var E=this.query;return E?"?"+E:""},setSearch:function(E){E=p(E),E===""?this.query=null:(D(E,0)==="?"&&(E=F(E,1)),this.query="",this.parse(E,Lt)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var E=this.fragment;return E?"#"+E:""},setHash:function(E){if(E=p(E),E===""){this.fragment=null;return}D(E,0)==="#"&&(E=F(E,1)),this.fragment="",this.parse(E,wt)},update:function(){this.query=this.searchParams.serialize()||null}};var ir=function(U){var _=c(this,He),P=S(arguments.length,1)>1?arguments[1]:void 0,C=m(_,new ta(U,!1,P));e||(_.href=C.serialize(),_.origin=C.getOrigin(),_.protocol=C.getProtocol(),_.username=C.getUsername(),_.password=C.getPassword(),_.host=C.getHost(),_.hostname=C.getHostname(),_.port=C.getPort(),_.pathname=C.getPathname(),_.search=C.getSearch(),_.searchParams=C.getSearchParams(),_.hash=C.getHash())},He=ir.prototype,Qe=function(E,U){return{get:function(){return b(this)[E]()},set:U&&function(_){return b(this)[U](_)},configurable:!0,enumerable:!0}};if(e&&(s(He,"href",Qe("serialize","setHref")),s(He,"origin",Qe("getOrigin")),s(He,"protocol",Qe("getProtocol","setProtocol")),s(He,"username",Qe("getUsername","setUsername")),s(He,"password",Qe("getPassword","setPassword")),s(He,"host",Qe("getHost","setHost")),s(He,"hostname",Qe("getHostname","setHostname")),s(He,"port",Qe("getPort","setPort")),s(He,"pathname",Qe("getPathname","setPathname")),s(He,"search",Qe("getSearch","setSearch")),s(He,"searchParams",Qe("getSearchParams")),s(He,"hash",Qe("getHash","setHash"))),o(He,"toJSON",function(){return b(this).serialize()},{enumerable:!0}),o(He,"toString",function(){return b(this).serialize()},{enumerable:!0}),L){var uc=L.createObjectURL,lc=L.revokeObjectURL;uc&&o(ir,"createObjectURL",a(uc,L)),lc&&o(ir,"revokeObjectURL",a(lc,L))}return g(ir,"URL"),t({global:!0,constructor:!0,forced:!r,sham:!e},{URL:ir}),yl}var Al;function Bp(){return Al||(Al=1,Hp()),gl}var jl={},Ul;function Gp(){if(Ul)return jl;Ul=1;var t=ke(),e=at(),r=$e(),n=er(),a=kt(),i=xn(),o=e("URL"),s=i&&r(function(){o.canParse()}),c=r(function(){return o.canParse.length!==1});return t({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}}}),jl}var ql={},Ll;function Wp(){if(Ll)return ql;Ll=1;var t=ke(),e=at(),r=er(),n=kt(),a=xn(),i=e("URL");return t({target:"URL",stat:!0,forced:!a},{parse:function(s){var c=r(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}}}),ql}var Nl={},$l;function Vp(){if($l)return Nl;$l=1;var t=ke(),e=ze();return t({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return e(URL.prototype.toString,this)}}),Nl}var io,xl;function Jp(){if(xl)return io;xl=1,Mh(),Bp(),Gp(),Wp(),Vp();var t=Kn();return io=t.URL,io}var oo,Dl;function Zp(){if(Dl)return oo;Dl=1;var t=Jp();return oo=t,oo}var so,Ml;function Yp(){if(Ml)return so;Ml=1;var t=Zp();return so=t,so}Yp();var Fl={},co,Kl;function Xp(){return Kl||(Kl=1,co={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}),co}var uo,zl;function Qp(){if(zl)return uo;zl=1;var t=Ln(),e=t("span").classList,r=e&&e.constructor&&e.constructor.prototype;return uo=r===Object.prototype?void 0:r,uo}var Hl;function Gh(){if(Hl)return Fl;Hl=1;var t=Se(),e=Xp(),r=Qp(),n=Ls(),a=Qt(),i=Ir(),o=xe(),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),e[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 e)l(t[u]&&t[u].prototype,u);return l(r,"DOMTokenList"),Fl}var lo,Bl;function em(){if(Bl)return lo;Bl=1;var t=Mh();return Gh(),lo=t,lo}var fo,Gl;function tm(){if(Gl)return fo;Gl=1;var t=em();return fo=t,fo}tm();var Wl={},Vl={},ho,Jl;function rm(){if(Jl)return ho;Jl=1;var t=nt(),e=Qt();return ho=function(r,n){t(n)&&"cause"in n&&e(r,"cause",n.cause)},ho}var vo,Zl;function nm(){if(Zl)return vo;Zl=1;var t=be(),e=Error,r=t("".replace),n=(function(o){return String(new e(o).stack)})("zxcasd"),a=/\n\s*at [^:]*:[^\n]*/,i=a.test(n);return vo=function(o,s){if(i&&typeof o=="string"&&!e.prepareStackTrace)for(;s--;)o=r(o,a,"");return o},vo}var po,Yl;function am(){if(Yl)return po;Yl=1;var t=$e(),e=Xt();return po=!t(function(){var r=new Error("a");return"stack"in r?(Object.defineProperty(r,"stack",e(1,7)),r.stack!==7):!0}),po}var mo,Xl;function im(){if(Xl)return mo;Xl=1;var t=Qt(),e=nm(),r=am(),n=Error.captureStackTrace;return mo=function(a,i,o,s){r&&(n?n(a,i):t(a,"stack",e(o,s)))},mo}var go,Ql;function Qr(){if(Ql)return go;Ql=1;var t=Pr(),e=ze(),r=ct(),n=$n(),a=Hh(),i=ks(),o=Nn(),s=xs(),c=Mn(),l=zh(),u=TypeError,f=function(d,v){this.stopped=d,this.result=v},h=f.prototype;return go=function(d,v,p){var g=p&&p.that,S=!!(p&&p.AS_ENTRIES),w=!!(p&&p.IS_RECORD),y=!!(p&&p.IS_ITERATOR),m=!!(p&&p.INTERRUPTED),b=t(v,g),O,A,L,z,B,ie,q,D=function(R){return O&&l(O,"normal"),new f(!0,R)},N=function(R){return S?(r(R),m?b(R[0],R[1],D):b(R[0],R[1])):m?b(R,D):b(R)};if(w)O=d.iterator;else if(y)O=d;else{if(A=c(d),!A)throw new u(n(d)+" is not iterable");if(a(A)){for(L=0,z=i(d);z>L;L++)if(B=N(d[L]),B&&o(h,B))return B;return new f(!1)}O=s(d,A)}for(ie=w?d.next:O.next;!(q=e(ie,O)).done;){try{B=N(q.value)}catch(R){l(O,"throw",R)}if(typeof B=="object"&&B&&o(h,B))return B}return new f(!1)},go}var yo,ef;function om(){if(ef)return yo;ef=1;var t=kt();return yo=function(e,r){return e===void 0?arguments.length<2?"":r:t(e)},yo}var tf;function sm(){if(tf)return Vl;tf=1;var t=ke(),e=Nn(),r=js(),n=Us(),a=Uh(),i=Zr(),o=Qt(),s=Xt(),c=rm(),l=im(),u=Qr(),f=om(),h=xe(),d=h("toStringTag"),v=Error,p=[].push,g=function(y,m){var b=e(S,this),O;n?O=n(new v,b?r(this):S):(O=b?this:i(S),o(O,d,"Error")),m!==void 0&&o(O,"message",f(m)),l(O,g,O.stack,1),arguments.length>2&&c(O,arguments[2]);var A=[];return u(y,p,{that:A}),o(O,"errors",A),O};n?n(g,v):a(g,v,{name:!0});var S=g.prototype=i(v.prototype,{constructor:s(1,g),message:s(1,""),name:s(1,"AggregateError")});return t({global:!0,constructor:!0,arity:2},{AggregateError:g}),Vl}var rf;function cm(){return rf||(rf=1,sm()),Wl}var nf={},wo,af;function um(){if(af)return wo;af=1;var t=$s(),e=Xr();return wo=t?{}.toString:function(){return"[object "+e(this)+"]"},wo}var of;function lm(){if(of)return nf;of=1;var t=$s(),e=it(),r=um();return t||e(Object.prototype,"toString",r,{unsafe:!0}),nf}var sf={},cf={},bo,uf;function Wh(){if(uf)return bo;uf=1;var t=Se(),e=Jr(),r=An(),n=function(a){return e.slice(0,a.length)===a};return bo=(function(){return n("Bun/")?"BUN":n("Cloudflare-Workers")?"CLOUDFLARE":n("Deno/")?"DENO":n("Node.js/")?"NODE":t.Bun&&typeof Bun.version=="string"?"BUN":t.Deno&&typeof Deno.version=="object"?"DENO":r(t.process)==="process"?"NODE":t.window&&t.document?"BROWSER":"REST"})(),bo}var So,lf;function Ds(){if(lf)return So;lf=1;var t=Wh();return So=t==="NODE",So}var Io,ff;function fm(){if(ff)return Io;ff=1;var t=at(),e=Dn(),r=xe(),n=De(),a=r("species");return Io=function(i){var o=t(i);n&&o&&!o[a]&&e(o,a,{configurable:!0,get:function(){return this}})},Io}var Po,df;function dm(){if(df)return Po;df=1;var t=Bh(),e=$n(),r=TypeError;return Po=function(n){if(t(n))return n;throw new r(e(n)+" is not a constructor")},Po}var Eo,hf;function Vh(){if(hf)return Eo;hf=1;var t=ct(),e=dm(),r=jn(),n=xe(),a=n("species");return Eo=function(i,o){var s=t(i).constructor,c;return s===void 0||r(c=t(s)[a])?o:e(c)},Eo}var _o,vf;function Jh(){if(vf)return _o;vf=1;var t=Cn(),e=Function.prototype,r=e.apply,n=e.call;return _o=typeof Reflect=="object"&&Reflect.apply||(t?n.bind(r):function(){return n.apply(r,arguments)}),_o}var To,pf;function Zh(){if(pf)return To;pf=1;var t=Jr();return To=/(?:ipad|iphone|ipod).*applewebkit/i.test(t),To}var ko,mf;function Yh(){if(mf)return ko;mf=1;var t=Se(),e=Jh(),r=Pr(),n=Pe(),a=rt(),i=$e(),o=kh(),s=Fn(),c=Ln(),l=er(),u=Zh(),f=Ds(),h=t.setImmediate,d=t.clearImmediate,v=t.process,p=t.Dispatch,g=t.Function,S=t.MessageChannel,w=t.String,y=0,m={},b="onreadystatechange",O,A,L,z;i(function(){O=t.location});var B=function(N){if(a(m,N)){var R=m[N];delete m[N],R()}},ie=function(N){return function(){B(N)}},q=function(N){B(N.data)},D=function(N){t.postMessage(w(N),O.protocol+"//"+O.host)};return(!h||!d)&&(h=function(R){l(arguments.length,1);var Y=n(R)?R:g(R),te=s(arguments,1);return m[++y]=function(){e(Y,void 0,te)},A(y),y},d=function(R){delete m[R]},f?A=function(N){v.nextTick(ie(N))}:p&&p.now?A=function(N){p.now(ie(N))}:S&&!u?(L=new S,z=L.port2,L.port1.onmessage=q,A=r(z.postMessage,z)):t.addEventListener&&n(t.postMessage)&&!t.importScripts&&O&&O.protocol!=="file:"&&!i(D)?(A=D,t.addEventListener("message",q,!1)):b in c("script")?A=function(N){o.appendChild(c("script"))[b]=function(){o.removeChild(this),B(N)}}:A=function(N){setTimeout(ie(N),0)}),ko={set:h,clear:d},ko}var Ro,gf;function Xh(){if(gf)return Ro;gf=1;var t=function(){this.head=null,this.tail=null};return t.prototype={add:function(e){var r={item:e,next:null},n=this.tail;n?n.next=r:this.head=r,this.tail=r},get:function(){var e=this.head;if(e){var r=this.head=e.next;return r===null&&(this.tail=null),e.item}}},Ro=t,Ro}var Oo,yf;function hm(){if(yf)return Oo;yf=1;var t=Jr();return Oo=/ipad|iphone|ipod/i.test(t)&&typeof Pebble<"u",Oo}var Co,wf;function vm(){if(wf)return Co;wf=1;var t=Jr();return Co=/web0s(?!.*chrome)/i.test(t),Co}var Ao,bf;function pm(){if(bf)return Ao;bf=1;var t=Se(),e=xh(),r=Pr(),n=Yh().set,a=Xh(),i=Zh(),o=hm(),s=vm(),c=Ds(),l=t.MutationObserver||t.WebKitMutationObserver,u=t.document,f=t.process,h=t.Promise,d=e("queueMicrotask"),v,p,g,S,w;if(!d){var y=new a,m=function(){var b,O;for(c&&(b=f.domain)&&b.exit();O=y.get();)try{O()}catch(A){throw y.head&&v(),A}b&&b.enter()};!i&&!c&&!s&&l&&u?(p=!0,g=u.createTextNode(""),new l(m).observe(g,{characterData:!0}),v=function(){g.data=p=!p}):!o&&h&&h.resolve?(S=h.resolve(void 0),S.constructor=h,w=r(S.then,S),v=function(){w(m)}):c?v=function(){f.nextTick(m)}:(n=r(n,t),v=function(){n(m)}),d=function(b){y.head||v(),y.add(b)}}return Ao=d,Ao}var jo,Sf;function mm(){return Sf||(Sf=1,jo=function(t,e){try{arguments.length===1?console.error(t):console.error(t,e)}catch{}}),jo}var Uo,If;function Er(){return If||(If=1,Uo=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}}),Uo}var qo,Pf;function _r(){if(Pf)return qo;Pf=1;var t=Se();return qo=t.Promise,qo}var Lo,Ef;function en(){if(Ef)return Lo;Ef=1;var t=Se(),e=_r(),r=Pe(),n=qh(),a=As(),i=xe(),o=Wh(),s=mt(),c=gh(),l=e&&e.prototype,u=i("species"),f=!1,h=r(t.PromiseRejectionEvent),d=n("Promise",function(){var v=a(e),p=v!==String(e);if(!p&&c===66||s&&!(l.catch&&l.finally))return!0;if(!c||c<51||!/native code/.test(v)){var g=new e(function(y){y(1)}),S=function(y){y(function(){},function(){})},w=g.constructor={};if(w[u]=S,f=g.then(function(){})instanceof S,!f)return!0}return!p&&(o==="BROWSER"||o==="DENO")&&!h});return Lo={CONSTRUCTOR:d,REJECTION_EVENT:h,SUBCLASSING:f},Lo}var No={},_f;function Rt(){if(_f)return No;_f=1;var t=ut(),e=TypeError,r=function(n){var a,i;this.promise=new n(function(o,s){if(a!==void 0||i!==void 0)throw new e("Bad Promise constructor");a=o,i=s}),this.resolve=t(a),this.reject=t(i)};return No.f=function(n){return new r(n)},No}var Tf;function gm(){if(Tf)return cf;Tf=1;var t=ke(),e=mt(),r=Ds(),n=Se(),a=Kn(),i=ze(),o=it(),s=Us(),c=Ir(),l=fm(),u=ut(),f=Pe(),h=nt(),d=Ns(),v=Vh(),p=Yh().set,g=pm(),S=mm(),w=Er(),y=Xh(),m=Sr(),b=_r(),O=en(),A=Rt(),L="Promise",z=O.CONSTRUCTOR,B=O.REJECTION_EVENT,ie=O.SUBCLASSING,q=m.getterFor(L),D=m.set,N=b&&b.prototype,R=b,Y=N,te=n.TypeError,Q=n.document,I=n.process,T=A.f,$=T,F=!!(Q&&Q.createEvent&&n.dispatchEvent),Z="unhandledrejection",V="rejectionhandled",he=0,oe=1,le=2,se=1,_e=2,Ae,Me,Re,Je,lt=function(M){var ee;return h(M)&&f(ee=M.then)?ee:!1},ft=function(M,ee){var fe=ee.value,ve=ee.state===oe,ge=ve?M.ok:M.fail,Ze=M.resolve,je=M.reject,Be=M.domain,Ue,Xe,tr;try{ge?(ve||(ee.rejection===_e&&J(ee),ee.rejection=se),ge===!0?Ue=fe:(Be&&Be.enter(),Ue=ge(fe),Be&&(Be.exit(),tr=!0)),Ue===M.promise?je(new te("Promise-chain cycle")):(Xe=lt(Ue))?i(Xe,Ue,Ze,je):Ze(Ue)):je(fe)}catch(Rr){Be&&!tr&&Be.exit(),je(Rr)}},gt=function(M,ee){M.notified||(M.notified=!0,g(function(){for(var fe=M.reactions,ve;ve=fe.get();)ft(ve,M);M.notified=!1,ee&&!M.rejection&&k(M)}))},yt=function(M,ee,fe){var ve,ge;F?(ve=Q.createEvent("Event"),ve.promise=ee,ve.reason=fe,ve.initEvent(M,!1,!0),n.dispatchEvent(ve)):ve={promise:ee,reason:fe},!B&&(ge=n["on"+M])?ge(ve):M===Z&&S("Unhandled promise rejection",fe)},k=function(M){i(p,n,function(){var ee=M.facade,fe=M.value,ve=K(M),ge;if(ve&&(ge=w(function(){r?I.emit("unhandledRejection",fe,ee):yt(Z,ee,fe)}),M.rejection=r||K(M)?_e:se,ge.error))throw ge.value})},K=function(M){return M.rejection!==se&&!M.parent},J=function(M){i(p,n,function(){var ee=M.facade;r?I.emit("rejectionHandled",ee):yt(V,ee,M.value)})},re=function(M,ee,fe){return function(ve){M(ee,ve,fe)}},me=function(M,ee,fe){M.done||(M.done=!0,fe&&(M=fe),M.value=ee,M.state=le,gt(M,!0))},Fe=function(M,ee,fe){if(!M.done){M.done=!0,fe&&(M=fe);try{if(M.facade===ee)throw new te("Promise can't be resolved itself");var ve=lt(ee);ve?g(function(){var ge={done:!1};try{i(ve,ee,re(Fe,ge,M),re(me,ge,M))}catch(Ze){me(ge,Ze,M)}}):(M.value=ee,M.state=oe,gt(M,!1))}catch(ge){me({done:!1},ge,M)}}};if(z&&(R=function(ee){d(this,Y),u(ee),i(Ae,this);var fe=q(this);try{ee(re(Fe,fe),re(me,fe))}catch(ve){me(fe,ve)}},Y=R.prototype,Ae=function(ee){D(this,{type:L,done:!1,notified:!1,parent:!1,reactions:new y,rejection:!1,state:he,value:null})},Ae.prototype=o(Y,"then",function(ee,fe){var ve=q(this),ge=T(v(this,R));return ve.parent=!0,ge.ok=f(ee)?ee:!0,ge.fail=f(fe)&&fe,ge.domain=r?I.domain:void 0,ve.state===he?ve.reactions.add(ge):g(function(){ft(ge,ve)}),ge.promise}),Me=function(){var M=new Ae,ee=q(M);this.promise=M,this.resolve=re(Fe,ee),this.reject=re(me,ee)},A.f=T=function(M){return M===R||M===Re?new Me(M):$(M)},!e&&f(b)&&N!==Object.prototype)){Je=N.then,ie||o(N,"then",function(ee,fe){var ve=this;return new R(function(ge,Ze){i(Je,ve,ge,Ze)}).then(ee,fe)},{unsafe:!0});try{delete N.constructor}catch{}s&&s(N,Y)}return t({global:!0,constructor:!0,wrap:!0,forced:z},{Promise:R}),Re=a.Promise,c(R,L,!1,!0),l(L),cf}var kf={},$o,Rf;function ym(){if(Rf)return $o;Rf=1;var t=xe(),e=t("iterator"),r=!1;try{var n=0,a={next:function(){return{done:!!n++}},return:function(){r=!0}};a[e]=function(){return this},Array.from(a,function(){throw 2})}catch{}return $o=function(i,o){try{if(!o&&!r)return!1}catch{return!1}var s=!1;try{var c={};c[e]=function(){return{next:function(){return{done:s=!0}}}},i(c)}catch{}return s},$o}var xo,Of;function zn(){if(Of)return xo;Of=1;var t=_r(),e=ym(),r=en().CONSTRUCTOR;return xo=r||!e(function(n){t.all(n).then(void 0,function(){})}),xo}var Cf;function wm(){if(Cf)return kf;Cf=1;var t=ke(),e=ze(),r=ut(),n=Rt(),a=Er(),i=Qr(),o=zn();return t({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=r(l.resolve),p=[],g=0,S=1;i(c,function(w){var y=g++,m=!1;S++,e(v,l,w).then(function(b){m||(m=!0,p[y]=b,--S||f(p))},h)}),--S||f(p)});return d.error&&h(d.value),u.promise}}),kf}var Af={},jf;function bm(){if(jf)return Af;jf=1;var t=ke(),e=mt(),r=en().CONSTRUCTOR,n=_r(),a=at(),i=Pe(),o=it(),s=n&&n.prototype;if(t({target:"Promise",proto:!0,forced:r,real:!0},{catch:function(l){return this.then(void 0,l)}}),!e&&i(n)){var c=a("Promise").prototype.catch;s.catch!==c&&o(s,"catch",c,{unsafe:!0})}return Af}var Uf={},qf;function Sm(){if(qf)return Uf;qf=1;var t=ke(),e=ze(),r=ut(),n=Rt(),a=Er(),i=Qr(),o=zn();return t({target:"Promise",stat:!0,forced:o},{race:function(c){var l=this,u=n.f(l),f=u.reject,h=a(function(){var d=r(l.resolve);i(c,function(v){e(d,l,v).then(u.resolve,f)})});return h.error&&f(h.value),u.promise}}),Uf}var Lf={},Nf;function Im(){if(Nf)return Lf;Nf=1;var t=ke(),e=Rt(),r=en().CONSTRUCTOR;return t({target:"Promise",stat:!0,forced:r},{reject:function(a){var i=e.f(this),o=i.reject;return o(a),i.promise}}),Lf}var $f={},Do,xf;function Qh(){if(xf)return Do;xf=1;var t=ct(),e=nt(),r=Rt();return Do=function(n,a){if(t(n),e(a)&&a.constructor===n)return a;var i=r.f(n),o=i.resolve;return o(a),i.promise},Do}var Df;function Pm(){if(Df)return $f;Df=1;var t=ke(),e=at(),r=mt(),n=_r(),a=en().CONSTRUCTOR,i=Qh(),o=e("Promise"),s=r&&!a;return t({target:"Promise",stat:!0,forced:r||a},{resolve:function(l){return i(s&&this===o?n:this,l)}}),$f}var Mf;function Em(){return Mf||(Mf=1,gm(),wm(),bm(),Sm(),Im(),Pm()),sf}var Ff={},Kf;function _m(){if(Kf)return Ff;Kf=1;var t=ke(),e=ze(),r=ut(),n=Rt(),a=Er(),i=Qr(),o=zn();return t({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=r(l.resolve),p=[],g=0,S=1;i(c,function(w){var y=g++,m=!1;S++,e(v,l,w).then(function(b){m||(m=!0,p[y]={status:"fulfilled",value:b},--S||f(p))},function(b){m||(m=!0,p[y]={status:"rejected",reason:b},--S||f(p))})}),--S||f(p)});return d.error&&h(d.value),u.promise}}),Ff}var zf={},Hf;function Tm(){if(Hf)return zf;Hf=1;var t=ke(),e=ze(),r=ut(),n=at(),a=Rt(),i=Er(),o=Qr(),s=zn(),c="No one promise resolved";return t({target:"Promise",stat:!0,forced:s},{any:function(u){var f=this,h=n("AggregateError"),d=a.f(f),v=d.resolve,p=d.reject,g=i(function(){var S=r(f.resolve),w=[],y=0,m=1,b=!1;o(u,function(O){var A=y++,L=!1;m++,e(S,f,O).then(function(z){L||b||(b=!0,v(z))},function(z){L||b||(L=!0,w[A]=z,--m||p(new h(w,c)))})}),--m||p(new h(w,c))});return g.error&&p(g.value),d.promise}}),zf}var Bf={},Gf;function ev(){if(Gf)return Bf;Gf=1;var t=ke(),e=Se(),r=Jh(),n=Fn(),a=Rt(),i=ut(),o=Er(),s=e.Promise,c=!1,l=!s||!s.try||o(function(){s.try(function(u){c=u===8},8)}).error||!c;return t({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 r(i(u),void 0,f)});return(d.error?h.reject:h.resolve)(d.value),h.promise}}),Bf}var Wf={},Vf;function tv(){if(Vf)return Wf;Vf=1;var t=ke(),e=Rt();return t({target:"Promise",stat:!0},{withResolvers:function(){var n=e.f(this);return{promise:n.promise,resolve:n.resolve,reject:n.reject}}}),Wf}var Jf={},Zf;function km(){if(Zf)return Jf;Zf=1;var t=ke(),e=mt(),r=_r(),n=$e(),a=at(),i=Pe(),o=Vh(),s=Qh(),c=it(),l=r&&r.prototype,u=!!r&&n(function(){l.finally.call({then:function(){}},function(){})});if(t({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(p){return s(d,h()).then(function(){return p})}:h,v?function(p){return s(d,h()).then(function(){throw p})}:h)}}),!e&&i(r)){var f=a("Promise").prototype.finally;l.finally!==f&&c(l,"finally",f,{unsafe:!0})}return Jf}var Mo,Yf;function Rm(){if(Yf)return Mo;Yf=1,cm(),Ls(),lm(),Em(),_m(),Tm(),ev(),tv(),km(),Kh();var t=Kn();return Mo=t.Promise,Mo}var Fo,Xf;function Om(){if(Xf)return Fo;Xf=1;var t=Rm();return Gh(),Fo=t,Fo}var Qf={},ed;function Cm(){return ed||(ed=1,ev()),Qf}var td={},rd;function Am(){return rd||(rd=1,tv()),td}var Ko,nd;function jm(){if(nd)return Ko;nd=1;var t=Om();return Cm(),Am(),Ko=t,Ko}jm();const rv="sesamy-debug";function Um(t,e,r){const n=new Date;n.setTime(n.getTime()+r*60*60*1e3);const a="expires="+n.toUTCString();document.cookie=`${t}=${e}; ${a}; path=/`}function qm(t){if(typeof document>"u")return null;const e=t+"=",r=document.cookie.split(";");for(let n=0;n<r.length;n++){let a=r[n];for(;a.charAt(0)===" ";)a=a.substring(1);if(a.indexOf(e)===0)return a.substring(e.length,a.length)}return null}function Lm(t){Um(rv,t.toString(),1)}function Nm(){return qm(rv)==="true"}function pe(t){Nm()&&console.log(t)}function qt(t,e){if(typeof window>"u")return;const r=new CustomEvent(t,{detail:e,bubbles:!0,composed:!0});pe(`Triggering event: ${t}`),dispatchEvent(r)}function pt(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function"){var a=0;for(n=Object.getOwnPropertySymbols(t);a<n.length;a++)e.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(t,n[a])&&(r[n[a]]=t[n[a]])}return r}var Dt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ms(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Fs(t,e){return t(e={exports:{}},e.exports),e.exports}var $t=Fs((function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var r=(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})();e.default=function(){return r.getInstance()}}));Ms($t);var $m=Ms(Fs((function(t,e){var r=Dt&&Dt.__awaiter||function(u,f,h,d){return new(h||(h=Promise))((function(v,p){function g(y){try{w(d.next(y))}catch(m){p(m)}}function S(y){try{w(d.throw(y))}catch(m){p(m)}}function w(y){y.done?v(y.value):new h((function(m){m(y.value)})).then(g,S)}w((d=d.apply(u,f||[])).next())}))},n=Dt&&Dt.__generator||function(u,f){var h,d,v,p,g={label:0,sent:function(){if(1&v[0])throw v[1];return v[1]},trys:[],ops:[]};return p={next:S(0),throw:S(1),return:S(2)},typeof Symbol=="function"&&(p[Symbol.iterator]=function(){return this}),p;function S(w){return function(y){return(function(m){if(h)throw new TypeError("Generator is already executing.");for(;g;)try{if(h=1,d&&(v=2&m[0]?d.return:m[0]?d.throw||((v=d.return)&&v.call(d),0):d.next)&&!(v=v.call(d,m[1])).done)return v;switch(d=0,v&&(m=[2&m[0],v.value]),m[0]){case 0:case 1:v=m;break;case 4:return g.label++,{value:m[1],done:!1};case 5:g.label++,d=m[1],m=[0];continue;case 7:m=g.ops.pop(),g.trys.pop();continue;default:if(v=g.trys,!((v=v.length>0&&v[v.length-1])||m[0]!==6&&m[0]!==2)){g=0;continue}if(m[0]===3&&(!v||m[1]>v[0]&&m[1]<v[3])){g.label=m[1];break}if(m[0]===6&&g.label<v[1]){g.label=v[1],v=m;break}if(v&&g.label<v[2]){g.label=v[2],g.ops.push(m);break}v[2]&&g.ops.pop(),g.trys.pop();continue}m=f.call(u,g)}catch(b){m=[6,b],d=0}finally{h=v=0}if(5&m[0])throw m[1];return{value:m[0]?m[1]:void 0,done:!0}})([w,y])}}},a=Dt;Object.defineProperty(e,"__esModule",{value:!0});var i="browser-tabs-lock-key",o={key:function(u){return r(a,void 0,void 0,(function(){return n(this,(function(f){throw new Error("Unsupported")}))}))},getItem:function(u){return r(a,void 0,void 0,(function(){return n(this,(function(f){throw new Error("Unsupported")}))}))},clear:function(){return r(a,void 0,void 0,(function(){return n(this,(function(u){return[2,window.localStorage.clear()]}))}))},removeItem:function(u){return r(a,void 0,void 0,(function(){return n(this,(function(f){throw new Error("Unsupported")}))}))},setItem:function(u,f){return r(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),r(this,void 0,void 0,(function(){var d,v,p,g,S,w,y;return n(this,(function(m){switch(m.label){case 0:d=Date.now()+c(4),v=Date.now()+h,p=i+"-"+f,g=this.storageHandler===void 0?o:this.storageHandler,m.label=1;case 1:return Date.now()<v?[4,s(30)]:[3,8];case 2:return m.sent(),g.getItemSync(p)!==null?[3,5]:(S=this.id+"-"+f+"-"+d,[4,s(Math.floor(25*Math.random()))]);case 3:return m.sent(),g.setItemSync(p,JSON.stringify({id:this.id,iat:d,timeoutKey:S,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,s(30)];case 4:return m.sent(),(w=g.getItemSync(p))!==null&&(y=JSON.parse(w)).id===this.id&&y.iat===d?(this.acquiredIatSet.add(d),this.refreshLockWhileAcquired(p,d),[2,!0]):[3,7];case 5:return u.lockCorrector(this.storageHandler===void 0?o:this.storageHandler),[4,this.waitForSomethingToChange(v)];case 6:m.sent(),m.label=7;case 7:return d=Date.now()+c(4),[3,1];case 8:return[2,!1]}}))}))},u.prototype.refreshLockWhileAcquired=function(f,h){return r(this,void 0,void 0,(function(){var d=this;return n(this,(function(v){return setTimeout((function(){return r(d,void 0,void 0,(function(){var p,g,S;return n(this,(function(w){switch(w.label){case 0:return[4,$t.default().lock(h)];case 1:return w.sent(),this.acquiredIatSet.has(h)?(p=this.storageHandler===void 0?o:this.storageHandler,(g=p.getItemSync(f))===null?($t.default().unlock(h),[2]):((S=JSON.parse(g)).timeRefreshed=Date.now(),p.setItemSync(f,JSON.stringify(S)),$t.default().unlock(h),this.refreshLockWhileAcquired(f,h),[2])):($t.default().unlock(h),[2])}}))}))}),1e3),[2]}))}))},u.prototype.waitForSomethingToChange=function(f){return r(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,p=Date.now(),g=!1;function S(){if(g||(window.removeEventListener("storage",S),u.removeFromWaiting(S),clearTimeout(w),g=!0),!v){v=!0;var y=50-(Date.now()-p);y>0?setTimeout(d,y):d(null)}}window.addEventListener("storage",S),u.addToWaiting(S);var w=setTimeout(S,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 r(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 r(this,void 0,void 0,(function(){var h,d,v,p;return n(this,(function(g){switch(g.label){case 0:return h=this.storageHandler===void 0?o:this.storageHandler,d=i+"-"+f,(v=h.getItemSync(d))===null?[2]:(p=JSON.parse(v)).id!==this.id?[3,2]:[4,$t.default().lock(p.iat)];case 1:g.sent(),this.acquiredIatSet.delete(p.iat),h.removeItemSync(d),$t.default().unlock(p.iat),u.notifyWaiters(),g.label=2;case 2:return[2]}}))}))},u.lockCorrector=function(f){for(var h=Date.now()-5e3,d=f,v=[],p=0;;){var g=d.keySync(p);if(g===null)break;v.push(g),p++}for(var S=!1,w=0;w<v.length;w++){var y=v[w];if(y.includes(i)){var m=d.getItemSync(y);if(m!==null){var b=JSON.parse(m);(b.timeRefreshed===void 0&&b.timeAcquired<h||b.timeRefreshed!==void 0&&b.timeRefreshed<h)&&(d.removeItemSync(y),S=!0)}}}S&&u.notifyWaiters()},u.waiters=void 0,u})();e.default=l})));const xm={timeoutInSeconds:60},nv={name:"auth0-spa-js",version:"2.8.0"},av=()=>Date.now();let Ce=class os extends Error{constructor(e,r){super(r),this.error=e,this.error_description=r,Object.setPrototypeOf(this,os.prototype)}static fromPayload({error:e,error_description:r}){return new os(e,r)}},Dm=class iv extends Ce{constructor(e,r,n,a=null){super(e,r),this.state=n,this.appState=a,Object.setPrototypeOf(this,iv.prototype)}},Mm=class ov extends Ce{constructor(e,r,n,a,i=null){super(e,r),this.connection=n,this.state=a,this.appState=i,Object.setPrototypeOf(this,ov.prototype)}},ss=class sv extends Ce{constructor(){super("timeout","Timeout"),Object.setPrototypeOf(this,sv.prototype)}};class Ks extends ss{constructor(e){super(),this.popup=e,Object.setPrototypeOf(this,Ks.prototype)}}let Fm=class cv extends Ce{constructor(e){super("cancelled","Popup closed"),this.popup=e,Object.setPrototypeOf(this,cv.prototype)}},Km=class uv extends Ce{constructor(e,r,n){super(e,r),this.mfa_token=n,Object.setPrototypeOf(this,uv.prototype)}},lv=class fv extends Ce{constructor(e,r){super("missing_refresh_token",`Missing Refresh Token (audience: '${yn(e,["default"])}', scope: '${yn(r)}')`),this.audience=e,this.scope=r,Object.setPrototypeOf(this,fv.prototype)}},zm=class dv extends Ce{constructor(e,r){super("missing_scopes",`Missing requested scopes after refresh (audience: '${yn(e,["default"])}', missing scope: '${yn(r)}')`),this.audience=e,this.scope=r,Object.setPrototypeOf(this,dv.prototype)}},hv=class vv extends Ce{constructor(e){super("use_dpop_nonce","Server rejected DPoP proof: wrong nonce"),this.newDpopNonce=e,Object.setPrototypeOf(this,vv.prototype)}};function yn(t,e=[]){return t&&!e.includes(t)?t:""}const wn=()=>window.crypto,Cr=()=>{const t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.";let e="";return Array.from(wn().getRandomValues(new Uint8Array(43))).forEach((r=>e+=t[r%t.length])),e},zo=t=>btoa(t),Hm=[{key:"name",type:["string"]},{key:"version",type:["string","number"]},{key:"env",type:["object"]}],Bm=t=>Object.keys(t).reduce(((e,r)=>{const n=Hm.find((a=>a.key===r));return n&&n.type.includes(typeof t[r])&&(e[r]=t[r]),e}),{}),cs=t=>{var{clientId:e}=t,r=pt(t,["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:e},r))).toString()},ad=async t=>await wn().subtle.digest({name:"SHA-256"},new TextEncoder().encode(t)),id=t=>(e=>decodeURIComponent(atob(e).split("").map((r=>"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2))).join("")))(t.replace(/_/g,"/").replace(/-/g,"+")),od=t=>{const e=new Uint8Array(t);return(r=>{const n={"+":"-","/":"_","=":""};return r.replace(/[+/=]/g,(a=>n[a]))})(window.btoa(String.fromCharCode(...Array.from(e))))},Gm=new TextEncoder,Wm=new TextDecoder;function Mr(t){return typeof t=="string"?Gm.encode(t):Wm.decode(t)}function sd(t){if(typeof t.modulusLength!="number"||t.modulusLength<2048)throw new Jm(`${t.name} modulusLength must be at least 2048 bits`)}async function Vm(t,e,r){if(r.usages.includes("sign")===!1)throw new TypeError('private CryptoKey instances used for signing assertions must include "sign" in their "usages"');const n=`${Fr(Mr(JSON.stringify(t)))}.${Fr(Mr(JSON.stringify(e)))}`;return`${n}.${Fr(await crypto.subtle.sign((function(a){switch(a.algorithm.name){case"ECDSA":return{name:a.algorithm.name,hash:"SHA-256"};case"RSA-PSS":return sd(a.algorithm),{name:a.algorithm.name,saltLength:32};case"RSASSA-PKCS1-v1_5":return sd(a.algorithm),{name:a.algorithm.name};case"Ed25519":return{name:a.algorithm.name}}throw new Kt})(r),r,Mr(n)))}`}let us;Uint8Array.prototype.toBase64?us=t=>(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),t.toBase64({alphabet:"base64url",omitPadding:!0})):us=e=>{e instanceof ArrayBuffer&&(e=new Uint8Array(e));const r=[];for(let n=0;n<e.byteLength;n+=32768)r.push(String.fromCharCode.apply(null,e.subarray(n,n+32768)));return btoa(r.join("")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")};function Fr(t){return us(t)}let Kt=class extends Error{constructor(e){var r;super(e??"operation not supported"),this.name=this.constructor.name,(r=Error.captureStackTrace)===null||r===void 0||r.call(Error,this,this.constructor)}},Jm=class extends Error{constructor(e){var r;super(e),this.name=this.constructor.name,(r=Error.captureStackTrace)===null||r===void 0||r.call(Error,this,this.constructor)}};function Zm(t){switch(t.algorithm.name){case"RSA-PSS":return(function(e){if(e.algorithm.hash.name==="SHA-256")return"PS256";throw new Kt("unsupported RsaHashedKeyAlgorithm hash name")})(t);case"RSASSA-PKCS1-v1_5":return(function(e){if(e.algorithm.hash.name==="SHA-256")return"RS256";throw new Kt("unsupported RsaHashedKeyAlgorithm hash name")})(t);case"ECDSA":return(function(e){if(e.algorithm.namedCurve==="P-256")return"ES256";throw new Kt("unsupported EcKeyAlgorithm namedCurve")})(t);case"Ed25519":return"Ed25519";default:throw new Kt("unsupported CryptoKey algorithm name")}}function pv(t){return t instanceof CryptoKey}function mv(t){return pv(t)&&t.type==="public"}async function Ym(t,e,r,n,a,i){const o=t?.privateKey,s=t?.publicKey;if(!pv(c=o)||c.type!=="private")throw new TypeError('"keypair.privateKey" must be a private CryptoKey');var c;if(!mv(s))throw new TypeError('"keypair.publicKey" must be a public CryptoKey');if(s.extractable!==!0)throw new TypeError('"keypair.publicKey.extractable" must be true');if(typeof e!="string")throw new TypeError('"htu" must be a string');if(typeof r!="string")throw new TypeError('"htm" must be a string');if(n!==void 0&&typeof n!="string")throw new TypeError('"nonce" must be a string or undefined');if(a!==void 0&&typeof a!="string")throw new TypeError('"accessToken" must be a string or undefined');return Vm({alg:Zm(o),typ:"dpop+jwt",jwk:await gv(s)},Object.assign(Object.assign({},i),{iat:Math.floor(Date.now()/1e3),jti:crypto.randomUUID(),htm:r,nonce:n,htu:e,ath:a?Fr(await crypto.subtle.digest("SHA-256",Mr(a))):void 0}),o)}async function gv(t){const{kty:e,e:r,n,x:a,y:i,crv:o}=await crypto.subtle.exportKey("jwk",t);return{kty:e,crv:o,e:r,n,x:a,y:i}}const Xm=["authorization_code","refresh_token","urn:ietf:params:oauth:grant-type:token-exchange"];function Qm(){return(async function(t,e){var r;let n;if(t.length===0)throw new TypeError('"alg" must be a non-empty string');switch(t){case"PS256":n={name:"RSA-PSS",hash:"SHA-256",modulusLength:2048,publicExponent:new Uint8Array([1,0,1])};break;case"RS256":n={name:"RSASSA-PKCS1-v1_5",hash:"SHA-256",modulusLength:2048,publicExponent:new Uint8Array([1,0,1])};break;case"ES256":n={name:"ECDSA",namedCurve:"P-256"};break;case"Ed25519":n={name:"Ed25519"};break;default:throw new Kt}return crypto.subtle.generateKey(n,(r=e?.extractable)!==null&&r!==void 0&&r,["sign","verify"])})("ES256",{extractable:!1})}function eg(t){return(async function(e){if(!mv(e))throw new TypeError('"publicKey" must be a public CryptoKey');if(e.extractable!==!0)throw new TypeError('"publicKey.extractable" must be true');const r=await gv(e);let n;switch(r.kty){case"EC":n={crv:r.crv,kty:r.kty,x:r.x,y:r.y};break;case"OKP":n={crv:r.crv,kty:r.kty,x:r.x};break;case"RSA":n={e:r.e,kty:r.kty,n:r.n};break;default:throw new Kt("unsupported JWK kty")}return Fr(await crypto.subtle.digest({name:"SHA-256"},Mr(JSON.stringify(n))))})(t.publicKey)}function tg({keyPair:t,url:e,method:r,nonce:n,accessToken:a}){const i=(function(o){const s=new URL(o);return s.search="",s.hash="",s.href})(e);return Ym(t,i,r,n,a)}const rg=async(t,e)=>{const r=await fetch(t,e);return{ok:r.ok,json:await r.json(),headers:(n=r.headers,[...n].reduce(((a,[i,o])=>(a[i]=o,a)),{}))};var n},ng=async(t,e,r)=>{const n=new AbortController;let a;return e.signal=n.signal,Promise.race([rg(t,e),new Promise(((i,o)=>{a=setTimeout((()=>{n.abort(),o(new Error("Timeout when executing 'fetch'"))}),r)}))]).finally((()=>{clearTimeout(a)}))},ag=async(t,e,r,n,a,i,o,s)=>{return c={auth:{audience:e,scope:r},timeout:a,fetchUrl:t,fetchOptions:n,useFormData:o,useMrrt:s},l=i,new Promise((function(u,f){const h=new MessageChannel;h.port1.onmessage=function(d){d.data.error?f(new Error(d.data.error)):u(d.data),h.port1.close()},l.postMessage(c,[h.port2])}));var c,l},ig=async(t,e,r,n,a,i,o=1e4,s)=>a?ag(t,e,r,n,o,a,i,s):ng(t,n,o);async function yv(t,e,r,n,a,i,o,s,c,l){if(c){const y=await c.generateProof({url:t,method:a.method||"GET",nonce:await c.getNonce()});a.headers=Object.assign(Object.assign({},a.headers),{dpop:y})}let u,f=null;for(let y=0;y<3;y++)try{u=await ig(t,r,n,a,i,o,e,s),f=null;break}catch(m){f=m}if(f)throw f;const h=u.json,{error:d,error_description:v}=h,p=pt(h,["error","error_description"]),{headers:g,ok:S}=u;let w;if(c&&(w=g["dpop-nonce"],w&&await c.setNonce(w)),!S){const y=v||`HTTP error. Unable to fetch ${t}`;if(d==="mfa_required")throw new Km(d,y,p.mfa_token);if(d==="missing_refresh_token")throw new lv(r,n);if(d==="use_dpop_nonce"){if(!c||!w||l)throw new hv(w);return yv(t,e,r,n,a,i,o,s,c,!0)}throw new Ce(d||"request_error",y)}return p}async function og(t,e){var{baseUrl:r,timeout:n,audience:a,scope:i,auth0Client:o,useFormData:s,useMrrt:c,dpop:l}=t,u=pt(t,["baseUrl","timeout","audience","scope","auth0Client","useFormData","useMrrt","dpop"]);const f=u.grant_type==="urn:ietf:params:oauth:grant-type:token-exchange",h=u.grant_type==="refresh_token"&&c,d=Object.assign(Object.assign(Object.assign(Object.assign({},u),f&&a&&{audience:a}),f&&i&&{scope:i}),h&&{audience:a,scope:i}),v=s?cs(d):JSON.stringify(d),p=(g=u.grant_type,Xm.includes(g));var g;return await yv(`${r}/oauth/token`,n,a||"default",i,{method:"POST",body:v,headers:{"Content-Type":s?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(Bm(o||nv)))}},e,s,c,p?l:void 0)}const dn=(...t)=>{return(e=t.filter(Boolean).join(" ").trim().split(/\s+/),Array.from(new Set(e))).join(" ");var e},rn=(t,e,r)=>{let n;return r&&(n=t[r]),n||(n=t.default),dn(n,e)};let It=class ls{constructor(e,r="@@auth0spajs@@",n){this.prefix=r,this.suffix=n,this.clientId=e.clientId,this.scope=e.scope,this.audience=e.audience}toKey(){return[this.prefix,this.clientId,this.audience,this.scope,this.suffix].filter(Boolean).join("::")}static fromKey(e){const[r,n,a,i]=e.split("::");return new ls({clientId:n,scope:i,audience:a},r)}static fromCacheEntry(e){const{scope:r,audience:n,client_id:a}=e;return new ls({scope:r,audience:n,clientId:a})}},sg=class{set(e,r){localStorage.setItem(e,JSON.stringify(r))}get(e){const r=window.localStorage.getItem(e);if(r)try{return JSON.parse(r)}catch{return}}remove(e){localStorage.removeItem(e)}allKeys(){return Object.keys(window.localStorage).filter((e=>e.startsWith("@@auth0spajs@@")))}},wv=class{constructor(){this.enclosedCache=(function(){let e={};return{set(r,n){e[r]=n},get(r){const n=e[r];if(n)return n},remove(r){delete e[r]},allKeys:()=>Object.keys(e)}})()}},cg=class{constructor(e,r,n){this.cache=e,this.keyManifest=r,this.nowProvider=n||av}async setIdToken(e,r,n){var a;const i=this.getIdTokenCacheKey(e);await this.cache.set(i,{id_token:r,decodedToken:n}),await((a=this.keyManifest)===null||a===void 0?void 0:a.add(i))}async getIdToken(e){const r=await this.cache.get(this.getIdTokenCacheKey(e.clientId));if(!r&&e.scope&&e.audience){const n=await this.get(e);return!n||!n.id_token||!n.decodedToken?void 0:{id_token:n.id_token,decodedToken:n.decodedToken}}if(r)return{id_token:r.id_token,decodedToken:r.decodedToken}}async get(e,r=0,n=!1,a){var i;let o=await this.cache.get(e.toKey());if(!o){const l=await this.getCacheKeys();if(!l)return;const u=this.matchExistingCacheKey(e,l);if(u&&(o=await this.cache.get(u)),!u&&n&&a!=="cache-only")return this.getEntryWithRefreshToken(e,l)}if(!o)return;const s=await this.nowProvider(),c=Math.floor(s/1e3);return o.expiresAt-r<c?o.body.refresh_token?this.modifiedCachedEntry(o,e):(await this.cache.remove(e.toKey()),void await((i=this.keyManifest)===null||i===void 0?void 0:i.remove(e.toKey()))):o.body}async modifiedCachedEntry(e,r){return e.body={refresh_token:e.body.refresh_token,audience:e.body.audience,scope:e.body.scope},await this.cache.set(r.toKey(),e),{refresh_token:e.body.refresh_token,audience:e.body.audience,scope:e.body.scope}}async set(e){var r;const n=new It({clientId:e.client_id,scope:e.scope,audience:e.audience}),a=await this.wrapCacheEntry(e);await this.cache.set(n.toKey(),a),await((r=this.keyManifest)===null||r===void 0?void 0:r.add(n.toKey()))}async remove(e,r,n){const a=new It({clientId:e,scope:n,audience:r});await this.cache.remove(a.toKey())}async clear(e){var r;const n=await this.getCacheKeys();n&&(await n.filter((a=>!e||a.includes(e))).reduce((async(a,i)=>{await a,await this.cache.remove(i)}),Promise.resolve()),await((r=this.keyManifest)===null||r===void 0?void 0:r.clear()))}async wrapCacheEntry(e){const r=await this.nowProvider();return{body:e,expiresAt:Math.floor(r/1e3)+e.expires_in}}async getCacheKeys(){var e;return this.keyManifest?(e=await this.keyManifest.get())===null||e===void 0?void 0:e.keys:this.cache.allKeys?this.cache.allKeys():void 0}getIdTokenCacheKey(e){return new It({clientId:e},"@@auth0spajs@@","@@user@@").toKey()}matchExistingCacheKey(e,r){return r.filter((n=>{var a;const i=It.fromKey(n),o=new Set(i.scope&&i.scope.split(" ")),s=((a=e.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===e.clientId&&i.audience===e.audience&&c}))[0]}async getEntryWithRefreshToken(e,r){var n;for(const a of r){const i=It.fromKey(a);if(i.prefix==="@@auth0spajs@@"&&i.clientId===e.clientId){const o=await this.cache.get(a);if(!((n=o?.body)===null||n===void 0)&&n.refresh_token)return this.modifiedCachedEntry(o,e)}}}async updateEntry(e,r){var n;const a=await this.getCacheKeys();if(a)for(const i of a){const o=await this.cache.get(i);if(((n=o?.body)===null||n===void 0?void 0:n.refresh_token)===e){const s=Object.assign(Object.assign({},o.body),{refresh_token:r});await this.set(s)}}}},ug=class{constructor(e,r,n){this.storage=e,this.clientId=r,this.cookieDomain=n,this.storageKey=`a0.spajs.txs.${this.clientId}`}create(e){this.storage.save(this.storageKey,e,{daysUntilExpire:1,cookieDomain:this.cookieDomain})}get(){return this.storage.get(this.storageKey)}remove(){this.storage.remove(this.storageKey,{cookieDomain:this.cookieDomain})}};const Ar=t=>typeof t=="number",lg=["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"],fg=t=>{if(!t.id_token)throw new Error("ID token is required but missing");const e=(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(id(c)),f={__raw:i},h={};return Object.keys(u).forEach((d=>{f[d]=u[d],lg.includes(d)||(h[d]=u[d])})),{encoded:{header:s,payload:c,signature:l},header:JSON.parse(id(s)),claims:f,user:h}})(t.id_token);if(!e.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(e.claims.iss!==t.iss)throw new Error(`Issuer (iss) claim mismatch in the ID token; expected "${t.iss}", found "${e.claims.iss}"`);if(!e.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if(e.header.alg!=="RS256")throw new Error(`Signature algorithm of "${e.header.alg}" is not supported. Expected the ID token to be signed with "RS256".`);if(!e.claims.aud||typeof e.claims.aud!="string"&&!Array.isArray(e.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(e.claims.aud)){if(!e.claims.aud.includes(t.aud))throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${t.aud}" but was not one of "${e.claims.aud.join(", ")}"`);if(e.claims.aud.length>1){if(!e.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(e.claims.azp!==t.aud)throw new Error(`Authorized Party (azp) claim mismatch in the ID token; expected "${t.aud}", found "${e.claims.azp}"`)}}else if(e.claims.aud!==t.aud)throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${t.aud}" but found "${e.claims.aud}"`);if(t.nonce){if(!e.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(e.claims.nonce!==t.nonce)throw new Error(`Nonce (nonce) claim mismatch in the ID token; expected "${t.nonce}", found "${e.claims.nonce}"`)}if(t.max_age&&!Ar(e.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(e.claims.exp==null||!Ar(e.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!Ar(e.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");const r=t.leeway||60,n=new Date(t.now||Date.now()),a=new Date(0);if(a.setUTCSeconds(e.claims.exp+r),n>a)throw new Error(`Expiration Time (exp) claim error in the ID token; current time (${n}) is after expiration time (${a})`);if(e.claims.nbf!=null&&Ar(e.claims.nbf)){const i=new Date(0);if(i.setUTCSeconds(e.claims.nbf-r),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(e.claims.auth_time!=null&&Ar(e.claims.auth_time)){const i=new Date(0);if(i.setUTCSeconds(parseInt(e.claims.auth_time)+t.max_age+r),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(t.organization){const i=t.organization.trim();if(i.startsWith("org_")){const o=i;if(!e.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(o!==e.claims.org_id)throw new Error(`Organization ID (org_id) claim mismatch in the ID token; expected "${o}", found "${e.claims.org_id}"`)}else{const o=i.toLowerCase();if(!e.claims.org_name)throw new Error("Organization Name (org_name) claim must be a string present in the ID token");if(o!==e.claims.org_name)throw new Error(`Organization Name (org_name) claim mismatch in the ID token; expected "${o}", found "${e.claims.org_name}"`)}}return e};var zt=Fs((function(t,e){var r=Dt&&Dt.__assign||function(){return r=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},r.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,r({path:"/"},u))}e.__esModule=!0,e.encode=a,e.parse=i,e.getAll=o,e.get=function(c){return o()[c]},e.set=s,e.remove=function(c,l){s(c,"",r(r({},l),{expires:-1}))}}));Ms(zt),zt.encode,zt.parse,zt.getAll;var dg=zt.get,bv=zt.set,Sv=zt.remove;const sr={get(t){const e=dg(t);if(e!==void 0)return JSON.parse(e)},save(t,e,r){let n={};window.location.protocol==="https:"&&(n={secure:!0,sameSite:"none"}),r?.daysUntilExpire&&(n.expires=r.daysUntilExpire),r?.cookieDomain&&(n.domain=r.cookieDomain),bv(t,JSON.stringify(e),n)},remove(t,e){let r={};e?.cookieDomain&&(r.domain=e.cookieDomain),Sv(t,r)}},hg={get(t){return sr.get(t)||sr.get(`_legacy_${t}`)},save(t,e,r){let n={};window.location.protocol==="https:"&&(n={secure:!0}),r?.daysUntilExpire&&(n.expires=r.daysUntilExpire),r?.cookieDomain&&(n.domain=r.cookieDomain),bv(`_legacy_${t}`,JSON.stringify(e),n),sr.save(t,e,r)},remove(t,e){let r={};e?.cookieDomain&&(r.domain=e.cookieDomain),Sv(t,r),sr.remove(t,e),sr.remove(`_legacy_${t}`,e)}},vg={get(t){if(typeof sessionStorage>"u")return;const e=sessionStorage.getItem(t);return e!=null?JSON.parse(e):void 0},save(t,e){sessionStorage.setItem(t,JSON.stringify(e))},remove(t){sessionStorage.removeItem(t)}};var Mt;(function(t){t.Code="code",t.ConnectCode="connect_code"})(Mt||(Mt={}));function pg(t,e,r){var n=e===void 0?null:e,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})(t,r!==void 0&&r),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 cd,ud,ld,Ho,mg=(cd="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+YCR7ZX18JHt0fWA7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jKHtkYXRhOnt0aW1lb3V0OmUsYXV0aDpyLGZldGNoVXJsOmksZmV0Y2hPcHRpb25zOmMsdXNlRm9ybURhdGE6YSx1c2VNcnJ0OmZ9LHBvcnRzOltwXX0pPT57bGV0IGgsdSxsPXt9O2NvbnN0e2F1ZGllbmNlOmQsc2NvcGU6eX09cnx8e307dHJ5e2NvbnN0IHI9YT8oZT0+e2NvbnN0IHQ9bmV3IFVSTFNlYXJjaFBhcmFtcyhlKSxyPXt9O3JldHVybiB0LmZvckVhY2goKChlLHQpPT57clt0XT1lfSkpLHJ9KShjLmJvZHkpOkpTT04ucGFyc2UoYy5ib2R5KTtpZighci5yZWZyZXNoX3Rva2VuJiYicmVmcmVzaF90b2tlbiI9PT1yLmdyYW50X3R5cGUpe2lmKHU9KChlLHQpPT5vW24oZSx0KV0pKGQseSksIXUmJmYpe2NvbnN0IGU9by5sYXRlc3RfcmVmcmVzaF90b2tlbix0PSgoZSx0KT0+e2NvbnN0IHI9T2JqZWN0LmtleXMobykuZmluZCgocj0+e2lmKCJsYXRlc3RfcmVmcmVzaF90b2tlbiIhPT1yKXtjb25zdCBzPSgoZSx0KT0+dC5zdGFydHNXaXRoKGAke2V9fGApKSh0LHIpLG89ci5zcGxpdCgifCIpWzFdLnNwbGl0KCIgIiksbj1lLnNwbGl0KCIgIikuZXZlcnkoKGU9Pm8uaW5jbHVkZXMoZSkpKTtyZXR1cm4gcyYmbn19KSk7cmV0dXJuISFyfSkoeSxkKTtlJiYhdCYmKHU9ZSl9aWYoIXUpdGhyb3cgbmV3IHQoZCx5KTtjLmJvZHk9YT9zKE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxyKSx7cmVmcmVzaF90b2tlbjp1fSkpOkpTT04uc3RyaW5naWZ5KE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxyKSx7cmVmcmVzaF90b2tlbjp1fSkpfWxldCBqLGs7ImZ1bmN0aW9uIj09dHlwZW9mIEFib3J0Q29udHJvbGxlciYmKGo9bmV3IEFib3J0Q29udHJvbGxlcixjLnNpZ25hbD1qLnNpZ25hbCk7dHJ5e2s9YXdhaXQgUHJvbWlzZS5yYWNlKFsoXz1lLG5ldyBQcm9taXNlKChlPT5zZXRUaW1lb3V0KGUsXykpKSksZmV0Y2goaSxPYmplY3QuYXNzaWduKHt9LGMpKV0pfWNhdGNoKGUpe3JldHVybiB2b2lkIHAucG9zdE1lc3NhZ2Uoe2Vycm9yOmUubWVzc2FnZX0pfWlmKCFrKXJldHVybiBqJiZqLmFib3J0KCksdm9pZCBwLnBvc3RNZXNzYWdlKHtlcnJvcjoiVGltZW91dCB3aGVuIGV4ZWN1dGluZyAnZmV0Y2gnIn0pO2c9ay5oZWFkZXJzLGw9Wy4uLmddLnJlZHVjZSgoKGUsW3Qscl0pPT4oZVt0XT1yLGUpKSx7fSksaD1hd2FpdCBrLmpzb24oKSxoLnJlZnJlc2hfdG9rZW4/KGYmJihvLmxhdGVzdF9yZWZyZXNoX3Rva2VuPWgucmVmcmVzaF90b2tlbixPPXUsYj1oLnJlZnJlc2hfdG9rZW4sT2JqZWN0LmVudHJpZXMobykuZm9yRWFjaCgoKFtlLHRdKT0+e3Q9PT1PJiYob1tlXT1iKX0pKSksKChlLHQscik9PntvW24odCxyKV09ZX0pKGgucmVmcmVzaF90b2tlbixkLHkpLGRlbGV0ZSBoLnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBvW24oZSx0KV19KShkLHkpLHAucG9zdE1lc3NhZ2Uoe29rOmsub2ssanNvbjpoLGhlYWRlcnM6bH0pfWNhdGNoKGUpe3AucG9zdE1lc3NhZ2Uoe29rOiExLGpzb246e2Vycm9yOmUuZXJyb3IsZXJyb3JfZGVzY3JpcHRpb246ZS5tZXNzYWdlfSxoZWFkZXJzOmx9KX12YXIgTyxiLGcsX30pKX0oKTsKCg==",ud=null,ld=!1,function(t){return Ho=Ho||pg(cd,ud,ld),new Worker(Ho,t)});const Bo={};let gg=class{constructor(e,r){this.cache=e,this.clientId=r,this.manifestKey=this.createManifestKeyFrom(this.clientId)}async add(e){var r;const n=new Set(((r=await this.cache.get(this.manifestKey))===null||r===void 0?void 0:r.keys)||[]);n.add(e),await this.cache.set(this.manifestKey,{keys:[...n]})}async remove(e){const r=await this.cache.get(this.manifestKey);if(r){const n=new Set(r.keys);return n.delete(e),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(e){return`@@auth0spajs@@::${e}`}};const yg={memory:()=>new wv().enclosedCache,localstorage:()=>new sg},fd=t=>yg[t],dd=t=>{const{openUrl:e,onRedirect:r}=t,n=pt(t,["openUrl","onRedirect"]);return Object.assign(Object.assign({},n),{openUrl:e===!1||e?e:r})},hd=(t,e)=>{const r=e?.split(" ")||[];return(t?.split(" ")||[]).every((n=>r.includes(n)))},Nt={NONCE:"nonce",KEYPAIR:"keypair"};let wg=class{constructor(e){this.clientId=e}getVersion(){return 1}createDbHandle(){const e=window.indexedDB.open("auth0-spa-js",this.getVersion());return new Promise(((r,n)=>{e.onupgradeneeded=()=>Object.values(Nt).forEach((a=>e.result.createObjectStore(a))),e.onerror=()=>n(e.error),e.onsuccess=()=>r(e.result)}))}async getDbHandle(){return this.dbHandle||(this.dbHandle=await this.createDbHandle()),this.dbHandle}async executeDbRequest(e,r,n){const a=n((await this.getDbHandle()).transaction(e,r).objectStore(e));return new Promise(((i,o)=>{a.onsuccess=()=>i(a.result),a.onerror=()=>o(a.error)}))}buildKey(e){const r=e?`_${e}`:"auth0";return`${this.clientId}::${r}`}setNonce(e,r){return this.save(Nt.NONCE,this.buildKey(r),e)}setKeyPair(e){return this.save(Nt.KEYPAIR,this.buildKey(),e)}async save(e,r,n){await this.executeDbRequest(e,"readwrite",(a=>a.put(n,r)))}findNonce(e){return this.find(Nt.NONCE,this.buildKey(e))}findKeyPair(){return this.find(Nt.KEYPAIR,this.buildKey())}find(e,r){return this.executeDbRequest(e,"readonly",(n=>n.get(r)))}async deleteBy(e,r){const n=await this.executeDbRequest(e,"readonly",(a=>a.getAllKeys()));n?.filter(r).map((a=>this.executeDbRequest(e,"readwrite",(i=>i.delete(a)))))}deleteByClientId(e,r){return this.deleteBy(e,(n=>typeof n=="string"&&n.startsWith(`${r}::`)))}clearNonces(){return this.deleteByClientId(Nt.NONCE,this.clientId)}clearKeyPairs(){return this.deleteByClientId(Nt.KEYPAIR,this.clientId)}},bg=class{constructor(e){this.storage=new wg(e)}getNonce(e){return this.storage.findNonce(e)}setNonce(e,r){return this.storage.setNonce(e,r)}async getOrGenerateKeyPair(){let e=await this.storage.findKeyPair();return e||(e=await Qm(),await this.storage.setKeyPair(e)),e}async generateProof(e){const r=await this.getOrGenerateKeyPair();return tg(Object.assign({keyPair:r},e))}async calculateThumbprint(){return eg(await this.getOrGenerateKeyPair())}async clear(){await Promise.all([this.storage.clearNonces(),this.storage.clearKeyPairs()])}};var cr;(function(t){t.Bearer="Bearer",t.DPoP="DPoP"})(cr||(cr={}));let Sg=class{constructor(e,r){this.hooks=r,this.config=Object.assign(Object.assign({},e),{fetch:e.fetch||(typeof window>"u"?fetch:window.fetch.bind(window))})}isAbsoluteUrl(e){return/^(https?:)?\/\//i.test(e)}buildUrl(e,r){if(r){if(this.isAbsoluteUrl(r))return r;if(e)return`${e.replace(/\/?\/$/,"")}/${r.replace(/^\/+/,"")}`}throw new TypeError("`url` must be absolute or `baseUrl` non-empty.")}getAccessToken(e){return this.config.getAccessToken?this.config.getAccessToken(e):this.hooks.getAccessToken(e)}extractUrl(e){return typeof e=="string"?e:e instanceof URL?e.href:e.url}buildBaseRequest(e,r){if(!this.config.baseUrl)return new Request(e,r);const n=this.buildUrl(this.config.baseUrl,this.extractUrl(e)),a=e instanceof Request?new Request(n,e):n;return new Request(a,r)}setAuthorizationHeader(e,r,n=cr.Bearer){e.headers.set("authorization",`${n} ${r}`)}async setDpopProofHeader(e,r){if(!this.config.dpopNonceId)return;const n=await this.hooks.getDpopNonce(),a=await this.hooks.generateDpopProof({accessToken:r,method:e.method,nonce:n,url:e.url});e.headers.set("dpop",a)}async prepareRequest(e,r){const n=await this.getAccessToken(r);let a,i;typeof n=="string"?(a=this.config.dpopNonceId?cr.DPoP:cr.Bearer,i=n):(a=n.token_type,i=n.access_token),this.setAuthorizationHeader(e,i,a),a===cr.DPoP&&await this.setDpopProofHeader(e,i)}getHeader(e,r){return Array.isArray(e)?new Headers(e).get(r)||"":typeof e.get=="function"?e.get(r)||"":e[r]||""}hasUseDpopNonceError(e){if(e.status!==401)return!1;const r=this.getHeader(e.headers,"www-authenticate");return r.includes("invalid_dpop_nonce")||r.includes("use_dpop_nonce")}async handleResponse(e,r){const n=this.getHeader(e.headers,"dpop-nonce");if(n&&await this.hooks.setDpopNonce(n),!this.hasUseDpopNonceError(e))return e;if(!n||!r.onUseDpopNonceError)throw new hv(n);return r.onUseDpopNonceError()}async internalFetchWithAuth(e,r,n,a){const i=this.buildBaseRequest(e,r);await this.prepareRequest(i,a);const o=await this.config.fetch(i);return this.handleResponse(o,n)}fetchWithAuth(e,r,n){const a={onUseDpopNonceError:()=>this.internalFetchWithAuth(e,r,Object.assign(Object.assign({},a),{onUseDpopNonceError:void 0}),n)};return this.internalFetchWithAuth(e,r,a,n)}},Ig=class{constructor(e,r){this.myAccountFetcher=e,this.apiBase=r}async connectAccount(e){const r=await this.myAccountFetcher.fetchWithAuth(`${this.apiBase}v1/connected-accounts/connect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return this._handleResponse(r)}async completeAccount(e){const r=await this.myAccountFetcher.fetchWithAuth(`${this.apiBase}v1/connected-accounts/complete`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return this._handleResponse(r)}async _handleResponse(e){let r;try{r=await e.text(),r=JSON.parse(r)}catch(n){throw new vd({type:"invalid_json",status:e.status,title:"Invalid JSON response",detail:r||String(n)})}if(e.ok)return r;throw new vd(r)}},vd=class Iv extends Error{constructor({type:e,status:r,title:n,detail:a,validation_errors:i}){super(a),this.name="MyAccountApiError",this.type=e,this.status=r,this.title=n,this.detail=a,this.validation_errors=i,Object.setPrototypeOf(this,Iv.prototype)}};const Go=new $m;let Pg=class{constructor(e){let r,n;if(this.userCache=new wv().enclosedCache,this.activeLockKeys=new Set,this.defaultOptions={authorizationParams:{scope:"openid profile email"},useRefreshTokensFallback:!1,useFormData:!0},this._releaseLockOnPageHide=async()=>{const c=Array.from(this.activeLockKeys);for(const l of c)await Go.releaseLock(l);this.activeLockKeys.clear(),window.removeEventListener("pagehide",this._releaseLockOnPageHide)},this.options=Object.assign(Object.assign(Object.assign({},this.defaultOptions),e),{authorizationParams:Object.assign(Object.assign({},this.defaultOptions.authorizationParams),e.authorizationParams)}),typeof window<"u"&&(()=>{if(!wn())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(wn().subtle===void 0)throw new Error(`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ce=require("@sesamy/sdk");var Xs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Qs={},Wn,ec;function $e(){return ec||(ec=1,Wn=function(t){try{return!!t()}catch{return!0}}),Wn}var Vn,tc;function wn(){if(tc)return Vn;tc=1;var t=$e();return Vn=!t(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),Vn}var Jn,rc;function be(){if(rc)return Jn;rc=1;var t=wn(),e=Function.prototype,r=e.call,n=t&&e.bind.bind(r,r);return Jn=t?n:function(a){return function(){return r.apply(a,arguments)}},Jn}var Zn,nc;function bn(){if(nc)return Zn;nc=1;var t=be(),e=t({}.toString),r=t("".slice);return Zn=function(n){return r(e(n),8,-1)},Zn}var Yn,ac;function Gd(){if(ac)return Yn;ac=1;var t=be(),e=$e(),r=bn(),n=Object,a=t("".split);return Yn=e(function(){return!n("z").propertyIsEnumerable(0)})?function(i){return r(i)==="String"?a(i,""):n(i)}:n,Yn}var Xn,ic;function Sn(){return ic||(ic=1,Xn=function(t){return t==null}),Xn}var Qn,oc;function In(){if(oc)return Qn;oc=1;var t=Sn(),e=TypeError;return Qn=function(r){if(t(r))throw new e("Can't call method on "+r);return r},Qn}var ea,sc;function Dr(){if(sc)return ea;sc=1;var t=Gd(),e=In();return ea=function(r){return t(e(r))},ea}var Rr,cc;function Se(){if(cc)return Rr;cc=1;var t=function(e){return e&&e.Math===Math&&e};return Rr=t(typeof globalThis=="object"&&globalThis)||t(typeof window=="object"&&window)||t(typeof self=="object"&&self)||t(typeof Xs=="object"&&Xs)||t(typeof Rr=="object"&&Rr)||(function(){return this})()||Function("return this")(),Rr}var ta={exports:{}},ra,uc;function pt(){return uc||(uc=1,ra=!1),ra}var na,lc;function cs(){if(lc)return na;lc=1;var t=Se(),e=Object.defineProperty;return na=function(r,n){try{e(t,r,{value:n,configurable:!0,writable:!0})}catch{t[r]=n}return n},na}var fc;function us(){if(fc)return ta.exports;fc=1;var t=pt(),e=Se(),r=cs(),n="__core-js_shared__",a=ta.exports=e[n]||r(n,{});return(a.versions||(a.versions=[])).push({version:"3.46.0",mode:t?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.46.0/LICENSE",source:"https://github.com/zloirock/core-js"}),ta.exports}var aa,dc;function Wd(){if(dc)return aa;dc=1;var t=us();return aa=function(e,r){return t[e]||(t[e]=r||{})},aa}var ia,hc;function Pn(){if(hc)return ia;hc=1;var t=In(),e=Object;return ia=function(r){return e(t(r))},ia}var oa,vc;function rt(){if(vc)return oa;vc=1;var t=be(),e=Pn(),r=t({}.hasOwnProperty);return oa=Object.hasOwn||function(a,i){return r(e(a),i)},oa}var sa,pc;function Vd(){if(pc)return sa;pc=1;var t=be(),e=0,r=Math.random(),n=t(1.1.toString);return sa=function(a){return"Symbol("+(a===void 0?"":a)+")_"+n(++e+r,36)},sa}var ca,mc;function Mr(){if(mc)return ca;mc=1;var t=Se(),e=t.navigator,r=e&&e.userAgent;return ca=r?String(r):"",ca}var ua,gc;function Jd(){if(gc)return ua;gc=1;var t=Se(),e=Mr(),r=t.process,n=t.Deno,a=r&&r.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&&e&&(o=e.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=e.match(/Chrome\/(\d+)/),o&&(s=+o[1]))),ua=s,ua}var la,yc;function Zd(){if(yc)return la;yc=1;var t=Jd(),e=$e(),r=Se(),n=r.String;return la=!!Object.getOwnPropertySymbols&&!e(function(){var a=Symbol("symbol detection");return!n(a)||!(Object(a)instanceof Symbol)||!Symbol.sham&&t&&t<41}),la}var fa,wc;function Yd(){if(wc)return fa;wc=1;var t=Zd();return fa=t&&!Symbol.sham&&typeof Symbol.iterator=="symbol",fa}var da,bc;function De(){if(bc)return da;bc=1;var t=Se(),e=Wd(),r=rt(),n=Vd(),a=Zd(),i=Yd(),o=t.Symbol,s=e("wks"),u=i?o.for||o:o&&o.withoutSetter||n;return da=function(l){return r(s,l)||(s[l]=a&&r(o,l)?o[l]:u("Symbol."+l)),s[l]},da}var ha,Sc;function Pe(){if(Sc)return ha;Sc=1;var t=typeof document=="object"&&document.all;return ha=typeof t>"u"&&t!==void 0?function(e){return typeof e=="function"||e===t}:function(e){return typeof e=="function"},ha}var va,Ic;function nt(){if(Ic)return va;Ic=1;var t=Pe();return va=function(e){return typeof e=="object"?e!==null:t(e)},va}var pa,Pc;function st(){if(Pc)return pa;Pc=1;var t=nt(),e=String,r=TypeError;return pa=function(n){if(t(n))return n;throw new r(e(n)+" is not an object")},pa}var ma={},ga,Ec;function Me(){if(Ec)return ga;Ec=1;var t=$e();return ga=!t(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),ga}var ya,Rc;function Xd(){if(Rc)return ya;Rc=1;var t=Me(),e=$e();return ya=t&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),ya}var wa={},ba,_c;function En(){if(_c)return ba;_c=1;var t=Se(),e=nt(),r=t.document,n=e(r)&&e(r.createElement);return ba=function(a){return n?r.createElement(a):{}},ba}var Sa,Tc;function Qd(){if(Tc)return Sa;Tc=1;var t=Me(),e=$e(),r=En();return Sa=!t&&!e(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),Sa}var Ia,kc;function He(){if(kc)return Ia;kc=1;var t=wn(),e=Function.prototype.call;return Ia=t?e.bind(e):function(){return e.apply(e,arguments)},Ia}var Pa,Oc;function at(){if(Oc)return Pa;Oc=1;var t=Se(),e=Pe(),r=function(n){return e(n)?n:void 0};return Pa=function(n,a){return arguments.length<2?r(t[n]):t[n]&&t[n][a]},Pa}var Ea,Cc;function Rn(){if(Cc)return Ea;Cc=1;var t=be();return Ea=t({}.isPrototypeOf),Ea}var Ra,Ac;function eh(){if(Ac)return Ra;Ac=1;var t=at(),e=Pe(),r=Rn(),n=Yd(),a=Object;return Ra=n?function(i){return typeof i=="symbol"}:function(i){var o=t("Symbol");return e(o)&&r(o.prototype,a(i))},Ra}var _a,Uc;function _n(){if(Uc)return _a;Uc=1;var t=String;return _a=function(e){try{return t(e)}catch{return"Object"}},_a}var Ta,jc;function ct(){if(jc)return Ta;jc=1;var t=Pe(),e=_n(),r=TypeError;return Ta=function(n){if(t(n))return n;throw new r(e(n)+" is not a function")},Ta}var ka,Lc;function ls(){if(Lc)return ka;Lc=1;var t=ct(),e=Sn();return ka=function(r,n){var a=r[n];return e(a)?void 0:t(a)},ka}var Oa,Nc;function Gv(){if(Nc)return Oa;Nc=1;var t=He(),e=Pe(),r=nt(),n=TypeError;return Oa=function(a,i){var o,s;if(i==="string"&&e(o=a.toString)&&!r(s=t(o,a))||e(o=a.valueOf)&&!r(s=t(o,a))||i!=="string"&&e(o=a.toString)&&!r(s=t(o,a)))return s;throw new n("Can't convert object to primitive value")},Oa}var Ca,qc;function Wv(){if(qc)return Ca;qc=1;var t=He(),e=nt(),r=eh(),n=ls(),a=Gv(),i=De(),o=TypeError,s=i("toPrimitive");return Ca=function(u,l){if(!e(u)||r(u))return u;var c=n(u,s),f;if(c){if(l===void 0&&(l="default"),f=t(c,u,l),!e(f)||r(f))return f;throw new o("Can't convert object to primitive value")}return l===void 0&&(l="number"),a(u,l)},Ca}var Aa,xc;function th(){if(xc)return Aa;xc=1;var t=Wv(),e=eh();return Aa=function(r){var n=t(r,"string");return e(n)?n:n+""},Aa}var $c;function Rt(){if($c)return wa;$c=1;var t=Me(),e=Qd(),r=Xd(),n=st(),a=th(),i=TypeError,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return wa.f=t?r?function(h,d,v){if(n(h),d=a(d),n(v),typeof h=="function"&&d==="prototype"&&"value"in v&&c in v&&!v[c]){var p=s(h,d);p&&p[c]&&(h[d]=v.value,v={configurable:l in v?v[l]:p[l],enumerable:u in v?v[u]:p[u],writable:!1})}return o(h,d,v)}:o:function(h,d,v){if(n(h),d=a(d),n(v),e)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},wa}var Ua,Dc;function Vv(){if(Dc)return Ua;Dc=1;var t=Math.ceil,e=Math.floor;return Ua=Math.trunc||function(n){var a=+n;return(a>0?e:t)(a)},Ua}var ja,Mc;function fs(){if(Mc)return ja;Mc=1;var t=Vv();return ja=function(e){var r=+e;return r!==r||r===0?0:t(r)},ja}var La,Fc;function rh(){if(Fc)return La;Fc=1;var t=fs(),e=Math.max,r=Math.min;return La=function(n,a){var i=t(n);return i<0?e(i+a,0):r(i,a)},La}var Na,Kc;function Jv(){if(Kc)return Na;Kc=1;var t=fs(),e=Math.min;return Na=function(r){var n=t(r);return n>0?e(n,9007199254740991):0},Na}var qa,zc;function ds(){if(zc)return qa;zc=1;var t=Jv();return qa=function(e){return t(e.length)},qa}var xa,Hc;function Zv(){if(Hc)return xa;Hc=1;var t=Dr(),e=rh(),r=ds(),n=function(a){return function(i,o,s){var u=t(i),l=r(u);if(l===0)return!a&&-1;var c=e(s,l),f;if(a&&o!==o){for(;l>c;)if(f=u[c++],f!==f)return!0}else for(;l>c;c++)if((a||c in u)&&u[c]===o)return a||c||0;return!a&&-1}};return xa={includes:n(!0),indexOf:n(!1)},xa}var $a,Bc;function hs(){return Bc||(Bc=1,$a={}),$a}var Da,Gc;function nh(){if(Gc)return Da;Gc=1;var t=be(),e=rt(),r=Dr(),n=Zv().indexOf,a=hs(),i=t([].push);return Da=function(o,s){var u=r(o),l=0,c=[],f;for(f in u)!e(a,f)&&e(u,f)&&i(c,f);for(;s.length>l;)e(u,f=s[l++])&&(~n(c,f)||i(c,f));return c},Da}var Ma,Wc;function vs(){return Wc||(Wc=1,Ma=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Ma}var Fa,Vc;function ah(){if(Vc)return Fa;Vc=1;var t=nh(),e=vs();return Fa=Object.keys||function(n){return t(n,e)},Fa}var Jc;function Yv(){if(Jc)return ma;Jc=1;var t=Me(),e=Xd(),r=Rt(),n=st(),a=Dr(),i=ah();return ma.f=t&&!e?Object.defineProperties:function(s,u){n(s);for(var l=a(u),c=i(u),f=c.length,h=0,d;f>h;)r.f(s,d=c[h++],l[d]);return s},ma}var Ka,Zc;function ih(){if(Zc)return Ka;Zc=1;var t=at();return Ka=t("document","documentElement"),Ka}var za,Yc;function ps(){if(Yc)return za;Yc=1;var t=Wd(),e=Vd(),r=t("keys");return za=function(n){return r[n]||(r[n]=e(n))},za}var Ha,Xc;function Fr(){if(Xc)return Ha;Xc=1;var t=st(),e=Yv(),r=vs(),n=hs(),a=ih(),i=En(),o=ps(),s=">",u="<",l="prototype",c="script",f=o("IE_PROTO"),h=function(){},d=function(y){return u+c+s+y+u+"/"+c+s},v=function(y){y.write(d("")),y.close();var b=y.parentWindow.Object;return y=null,b},p=function(){var y=i("iframe"),b="java"+c+":",g;return y.style.display="none",a.appendChild(y),y.src=String(b),g=y.contentWindow.document,g.open(),g.write(d("document.F=Object")),g.close(),g.F},m,P=function(){try{m=new ActiveXObject("htmlfile")}catch{}P=typeof document<"u"?document.domain&&m?v(m):p():v(m);for(var y=r.length;y--;)delete P[l][r[y]];return P()};return n[f]=!0,Ha=Object.create||function(b,g){var w;return b!==null?(h[l]=t(b),w=new h,h[l]=null,w[f]=b):w=P(),g===void 0?w:e.f(w,g)},Ha}var Ba,Qc;function Xv(){if(Qc)return Ba;Qc=1;var t=De(),e=Fr(),r=Rt().f,n=t("unscopables"),a=Array.prototype;return a[n]===void 0&&r(a,n,{configurable:!0,value:e(null)}),Ba=function(i){a[n][i]=!0},Ba}var Ga,eu;function Kr(){return eu||(eu=1,Ga={}),Ga}var Wa,tu;function Qv(){if(tu)return Wa;tu=1;var t=Se(),e=Pe(),r=t.WeakMap;return Wa=e(r)&&/native code/.test(String(r)),Wa}var Va,ru;function Zt(){return ru||(ru=1,Va=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}}),Va}var Ja,nu;function Yt(){if(nu)return Ja;nu=1;var t=Me(),e=Rt(),r=Zt();return Ja=t?function(n,a,i){return e.f(n,a,r(1,i))}:function(n,a,i){return n[a]=i,n},Ja}var Za,au;function gr(){if(au)return Za;au=1;var t=Qv(),e=Se(),r=nt(),n=Yt(),a=rt(),i=us(),o=ps(),s=hs(),u="Object already initialized",l=e.TypeError,c=e.WeakMap,f,h,d,v=function(y){return d(y)?h(y):f(y,{})},p=function(y){return function(b){var g;if(!r(b)||(g=h(b)).type!==y)throw new l("Incompatible receiver, "+y+" required");return g}};if(t||i.state){var m=i.state||(i.state=new c);m.get=m.get,m.has=m.has,m.set=m.set,f=function(y,b){if(m.has(y))throw new l(u);return b.facade=y,m.set(y,b),b},h=function(y){return m.get(y)||{}},d=function(y){return m.has(y)}}else{var P=o("state");s[P]=!0,f=function(y,b){if(a(y,P))throw new l(u);return b.facade=y,n(y,P,b),b},h=function(y){return a(y,P)?y[P]:{}},d=function(y){return a(y,P)}}return Za={set:f,get:h,has:d,enforce:v,getterFor:p},Za}var Ya={},Xa={},iu;function oh(){if(iu)return Xa;iu=1;var t={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,r=e&&!t.call({1:2},1);return Xa.f=r?function(a){var i=e(this,a);return!!i&&i.enumerable}:t,Xa}var ou;function sh(){if(ou)return Ya;ou=1;var t=Me(),e=He(),r=oh(),n=Zt(),a=Dr(),i=th(),o=rt(),s=Qd(),u=Object.getOwnPropertyDescriptor;return Ya.f=t?u:function(c,f){if(c=a(c),f=i(f),s)try{return u(c,f)}catch{}if(o(c,f))return n(!e(r.f,c,f),c[f])},Ya}var Qa={exports:{}},ei,su;function ch(){if(su)return ei;su=1;var t=Me(),e=rt(),r=Function.prototype,n=t&&Object.getOwnPropertyDescriptor,a=e(r,"name"),i=a&&(function(){}).name==="something",o=a&&(!t||t&&n(r,"name").configurable);return ei={EXISTS:a,PROPER:i,CONFIGURABLE:o},ei}var ti,cu;function ms(){if(cu)return ti;cu=1;var t=be(),e=Pe(),r=us(),n=t(Function.toString);return e(r.inspectSource)||(r.inspectSource=function(a){return n(a)}),ti=r.inspectSource,ti}var uu;function uh(){if(uu)return Qa.exports;uu=1;var t=be(),e=$e(),r=Pe(),n=rt(),a=Me(),i=ch().CONFIGURABLE,o=ms(),s=gr(),u=s.enforce,l=s.get,c=String,f=Object.defineProperty,h=t("".slice),d=t("".replace),v=t([].join),p=a&&!e(function(){return f(function(){},"length",{value:8}).length!==8}),m=String(String).split("String"),P=Qa.exports=function(y,b,g){h(c(b),0,7)==="Symbol("&&(b="["+d(c(b),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),g&&g.getter&&(b="get "+b),g&&g.setter&&(b="set "+b),(!n(y,"name")||i&&y.name!==b)&&(a?f(y,"name",{value:b,configurable:!0}):y.name=b),p&&g&&n(g,"arity")&&y.length!==g.arity&&f(y,"length",{value:g.arity});try{g&&n(g,"constructor")&&g.constructor?a&&f(y,"prototype",{writable:!1}):y.prototype&&(y.prototype=void 0)}catch{}var w=u(y);return n(w,"source")||(w.source=v(m,typeof b=="string"?b:"")),y};return Function.prototype.toString=P(function(){return r(this)&&l(this).source||o(this)},"toString"),Qa.exports}var ri,lu;function it(){if(lu)return ri;lu=1;var t=Pe(),e=Rt(),r=uh(),n=cs();return ri=function(a,i,o,s){s||(s={});var u=s.enumerable,l=s.name!==void 0?s.name:i;if(t(o)&&r(o,l,s),s.global)u?a[i]=o:n(i,o);else{try{s.unsafe?a[i]&&(u=!0):delete a[i]}catch{}u?a[i]=o:e.f(a,i,{value:o,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return a},ri}var ni={},fu;function ep(){if(fu)return ni;fu=1;var t=nh(),e=vs(),r=e.concat("length","prototype");return ni.f=Object.getOwnPropertyNames||function(a){return t(a,r)},ni}var ai={},du;function lh(){return du||(du=1,ai.f=Object.getOwnPropertySymbols),ai}var ii,hu;function tp(){if(hu)return ii;hu=1;var t=at(),e=be(),r=ep(),n=lh(),a=st(),i=e([].concat);return ii=t("Reflect","ownKeys")||function(s){var u=r.f(a(s)),l=n.f;return l?i(u,l(s)):u},ii}var oi,vu;function fh(){if(vu)return oi;vu=1;var t=rt(),e=tp(),r=sh(),n=Rt();return oi=function(a,i,o){for(var s=e(i),u=n.f,l=r.f,c=0;c<s.length;c++){var f=s[c];!t(a,f)&&!(o&&t(o,f))&&u(a,f,l(i,f))}},oi}var si,pu;function dh(){if(pu)return si;pu=1;var t=$e(),e=Pe(),r=/#|\.prototype\./,n=function(u,l){var c=i[a(u)];return c===s?!0:c===o?!1:e(l)?t(l):!!l},a=n.normalize=function(u){return String(u).replace(r,".").toLowerCase()},i=n.data={},o=n.NATIVE="N",s=n.POLYFILL="P";return si=n,si}var ci,mu;function Te(){if(mu)return ci;mu=1;var t=Se(),e=sh().f,r=Yt(),n=it(),a=cs(),i=fh(),o=dh();return ci=function(s,u){var l=s.target,c=s.global,f=s.stat,h,d,v,p,m,P;if(c?d=t:f?d=t[l]||a(l,{}):d=t[l]&&t[l].prototype,d)for(v in u){if(m=u[v],s.dontCallGetSet?(P=e(d,v),p=P&&P.value):p=d[v],h=o(c?v:l+(f?".":"#")+v,s.forced),!h&&p!==void 0){if(typeof m==typeof p)continue;i(m,p)}(s.sham||p&&p.sham)&&r(m,"sham",!0),n(d,v,m,s)}},ci}var ui,gu;function rp(){if(gu)return ui;gu=1;var t=$e();return ui=!t(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),ui}var li,yu;function gs(){if(yu)return li;yu=1;var t=rt(),e=Pe(),r=Pn(),n=ps(),a=rp(),i=n("IE_PROTO"),o=Object,s=o.prototype;return li=a?o.getPrototypeOf:function(u){var l=r(u);if(t(l,i))return l[i];var c=l.constructor;return e(c)&&l instanceof c?c.prototype:l instanceof o?s:null},li}var fi,wu;function hh(){if(wu)return fi;wu=1;var t=$e(),e=Pe(),r=nt(),n=Fr(),a=gs(),i=it(),o=De(),s=pt(),u=o("iterator"),l=!1,c,f,h;[].keys&&(h=[].keys(),"next"in h?(f=a(a(h)),f!==Object.prototype&&(c=f)):l=!0);var d=!r(c)||t(function(){var v={};return c[u].call(v)!==v});return d?c={}:s&&(c=n(c)),e(c[u])||i(c,u,function(){return this}),fi={IteratorPrototype:c,BUGGY_SAFARI_ITERATORS:l},fi}var di,bu;function yr(){if(bu)return di;bu=1;var t=Rt().f,e=rt(),r=De(),n=r("toStringTag");return di=function(a,i,o){a&&!o&&(a=a.prototype),a&&!e(a,n)&&t(a,n,{configurable:!0,value:i})},di}var hi,Su;function vh(){if(Su)return hi;Su=1;var t=hh().IteratorPrototype,e=Fr(),r=Zt(),n=yr(),a=Kr(),i=function(){return this};return hi=function(o,s,u,l){var c=s+" Iterator";return o.prototype=e(t,{next:r(+!l,u)}),n(o,c,!1,!0),a[c]=i,o},hi}var vi,Iu;function np(){if(Iu)return vi;Iu=1;var t=be(),e=ct();return vi=function(r,n,a){try{return t(e(Object.getOwnPropertyDescriptor(r,n)[a]))}catch{}},vi}var pi,Pu;function ap(){if(Pu)return pi;Pu=1;var t=nt();return pi=function(e){return t(e)||e===null},pi}var mi,Eu;function ip(){if(Eu)return mi;Eu=1;var t=ap(),e=String,r=TypeError;return mi=function(n){if(t(n))return n;throw new r("Can't set "+e(n)+" as a prototype")},mi}var gi,Ru;function ys(){if(Ru)return gi;Ru=1;var t=np(),e=nt(),r=In(),n=ip();return gi=Object.setPrototypeOf||("__proto__"in{}?(function(){var a=!1,i={},o;try{o=t(Object.prototype,"__proto__","set"),o(i,[]),a=i instanceof Array}catch{}return function(u,l){return r(u),n(l),e(u)&&(a?o(u,l):u.__proto__=l),u}})():void 0),gi}var yi,_u;function ph(){if(_u)return yi;_u=1;var t=Te(),e=He(),r=pt(),n=ch(),a=Pe(),i=vh(),o=gs(),s=ys(),u=yr(),l=Yt(),c=it(),f=De(),h=Kr(),d=hh(),v=n.PROPER,p=n.CONFIGURABLE,m=d.IteratorPrototype,P=d.BUGGY_SAFARI_ITERATORS,y=f("iterator"),b="keys",g="values",w="entries",A=function(){return this};return yi=function(x,N,z,B,ie,j,D){i(z,N,B);var L=function(V){if(V===ie&&S)return S;if(!P&&V&&V in te)return te[V];switch(V){case b:return function(){return new z(this,V)};case g:return function(){return new z(this,V)};case w:return function(){return new z(this,V)}}return function(){return new z(this)}},k=N+" Iterator",Y=!1,te=x.prototype,Q=te[y]||te["@@iterator"]||ie&&te[ie],S=!P&&Q||L(ie),_=N==="Array"&&te.entries||Q,q,F,Z;if(_&&(q=o(_.call(new x)),q!==Object.prototype&&q.next&&(!r&&o(q)!==m&&(s?s(q,m):a(q[y])||c(q,y,A)),u(q,k,!0,!0),r&&(h[k]=A))),v&&ie===g&&Q&&Q.name!==g&&(!r&&p?l(te,"name",g):(Y=!0,S=function(){return e(Q,this)})),ie)if(F={values:L(g),keys:j?S:L(b),entries:L(w)},D)for(Z in F)(P||Y||!(Z in te))&&c(te,Z,F[Z]);else t({target:N,proto:!0,forced:P||Y},F);return(!r||D)&&te[y]!==S&&c(te,y,S,{name:ie}),h[N]=S,F},yi}var wi,Tu;function ws(){return Tu||(Tu=1,wi=function(t,e){return{value:t,done:e}}),wi}var bi,ku;function bs(){if(ku)return bi;ku=1;var t=Dr(),e=Xv(),r=Kr(),n=gr(),a=Rt().f,i=ph(),o=ws(),s=pt(),u=Me(),l="Array Iterator",c=n.set,f=n.getterFor(l);bi=i(Array,"Array",function(d,v){c(this,{type:l,target:t(d),index:0,kind:v})},function(){var d=f(this),v=d.target,p=d.index++;if(!v||p>=v.length)return d.target=null,o(void 0,!0);switch(d.kind){case"keys":return o(p,!1);case"values":return o(v[p],!1)}return o([p,v[p]],!1)},"values");var h=r.Arguments=r.Array;if(e("keys"),e("values"),e("entries"),!s&&u&&h.name!=="values")try{a(h,"name",{value:"values"})}catch{}return bi}var Ou={},Cu;function op(){if(Cu)return Ou;Cu=1;var t=Te(),e=be(),r=rh(),n=RangeError,a=String.fromCharCode,i=String.fromCodePoint,o=e([].join),s=!!i&&i.length!==1;return t({target:"String",stat:!0,arity:1,forced:s},{fromCodePoint:function(l){for(var c=[],f=arguments.length,h=0,d;f>h;){if(d=+arguments[h++],r(d,1114111)!==d)throw new n(d+" is not a valid code point");c[h]=d<65536?a(d):a(((d-=65536)>>10)+55296,d%1024+56320)}return o(c,"")}}),Ou}var Si,Au;function mh(){if(Au)return Si;Au=1;var t=Se(),e=Me(),r=Object.getOwnPropertyDescriptor;return Si=function(n){if(!e)return t[n];var a=r(t,n);return a&&a.value},Si}var Ii,Uu;function Tn(){if(Uu)return Ii;Uu=1;var t=$e(),e=De(),r=Me(),n=pt(),a=e("iterator");return Ii=!t(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"),u="";return i.pathname="c%20d",o.forEach(function(l,c){o.delete("b"),u+=c+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||!r)||!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"||u!=="a1c3"||new URL("https://x",void 0).host!=="x"}),Ii}var Pi,ju;function kn(){if(ju)return Pi;ju=1;var t=uh(),e=Rt();return Pi=function(r,n,a){return a.get&&t(a.get,n,{getter:!0}),a.set&&t(a.set,n,{setter:!0}),e.f(r,n,a)},Pi}var Ei,Lu;function sp(){if(Lu)return Ei;Lu=1;var t=it();return Ei=function(e,r,n){for(var a in r)t(e,a,r[a],n);return e},Ei}var Ri,Nu;function Ss(){if(Nu)return Ri;Nu=1;var t=Rn(),e=TypeError;return Ri=function(r,n){if(t(n,r))return r;throw new e("Incorrect invocation")},Ri}var _i,qu;function cp(){if(qu)return _i;qu=1;var t=bn(),e=be();return _i=function(r){if(t(r)==="Function")return e(r)},_i}var Ti,xu;function wr(){if(xu)return Ti;xu=1;var t=cp(),e=ct(),r=wn(),n=t(t.bind);return Ti=function(a,i){return e(a),i===void 0?a:r?n(a,i):function(){return a.apply(i,arguments)}},Ti}var ki,$u;function Is(){if($u)return ki;$u=1;var t=De(),e=t("toStringTag"),r={};return r[e]="z",ki=String(r)==="[object z]",ki}var Oi,Du;function zr(){if(Du)return Oi;Du=1;var t=Is(),e=Pe(),r=bn(),n=De(),a=n("toStringTag"),i=Object,o=r((function(){return arguments})())==="Arguments",s=function(u,l){try{return u[l]}catch{}};return Oi=t?r:function(u){var l,c,f;return u===void 0?"Undefined":u===null?"Null":typeof(c=s(l=i(u),a))=="string"?c:o?r(l):(f=r(l))==="Object"&&e(l.callee)?"Arguments":f},Oi}var Ci,Mu;function _t(){if(Mu)return Ci;Mu=1;var t=zr(),e=String;return Ci=function(r){if(t(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return e(r)},Ci}var Ai,Fu;function On(){if(Fu)return Ai;Fu=1;var t=zr(),e=ls(),r=Sn(),n=Kr(),a=De(),i=a("iterator");return Ai=function(o){if(!r(o))return e(o,i)||e(o,"@@iterator")||n[t(o)]},Ai}var Ui,Ku;function Ps(){if(Ku)return Ui;Ku=1;var t=He(),e=ct(),r=st(),n=_n(),a=On(),i=TypeError;return Ui=function(o,s){var u=arguments.length<2?a(o):s;if(e(u))return r(t(u,o));throw new i(n(o)+" is not iterable")},Ui}var ji,zu;function Xt(){if(zu)return ji;zu=1;var t=TypeError;return ji=function(e,r){if(e<r)throw new t("Not enough arguments");return e},ji}var Li,Hu;function Cn(){if(Hu)return Li;Hu=1;var t=be();return Li=t([].slice),Li}var Ni,Bu;function up(){if(Bu)return Ni;Bu=1;var t=Cn(),e=Math.floor,r=function(n,a){var i=n.length;if(i<8)for(var o=1,s,u;o<i;){for(u=o,s=n[o];u&&a(n[u-1],s)>0;)n[u]=n[--u];u!==o++&&(n[u]=s)}else for(var l=e(i/2),c=r(t(n,0,l),a),f=r(t(n,l),a),h=c.length,d=f.length,v=0,p=0;v<h||p<d;)n[v+p]=v<h&&p<d?a(c[v],f[p])<=0?c[v++]:f[p++]:v<h?c[v++]:f[p++];return n};return Ni=r,Ni}var qi,Gu;function gh(){if(Gu)return qi;Gu=1,bs(),op();var t=Te(),e=Se(),r=mh(),n=at(),a=He(),i=be(),o=Me(),s=Tn(),u=it(),l=kn(),c=sp(),f=yr(),h=vh(),d=gr(),v=Ss(),p=Pe(),m=rt(),P=wr(),y=zr(),b=st(),g=nt(),w=_t(),A=Fr(),x=Zt(),N=Ps(),z=On(),B=ws(),ie=Xt(),j=De(),D=up(),L=j("iterator"),k="URLSearchParams",Y=k+"Iterator",te=d.set,Q=d.getterFor(k),S=d.getterFor(Y),_=r("fetch"),q=r("Request"),F=r("Headers"),Z=q&&q.prototype,V=F&&F.prototype,he=e.TypeError,oe=e.encodeURIComponent,le=String.fromCharCode,se=n("String","fromCodePoint"),Re=parseInt,Ue=i("".charAt),Fe=i([].join),ke=i([].push),Ze=i("".replace),ut=i([].shift),lt=i([].splice),mt=i("".split),gt=i("".slice),T=i(/./.exec),K=/\+/g,J="�",re=/^[0-9a-f]+$/i,me=function($,G){var W=gt($,G,G+2);return T(re,W)?Re(W,16):NaN},Ke=function($){for(var G=0,W=128;W>0&&($&W)!==0;W>>=1)G++;return G},M=function($){var G=null;switch($.length){case 1:G=$[0];break;case 2:G=($[0]&31)<<6|$[1]&63;break;case 3:G=($[0]&15)<<12|($[1]&63)<<6|$[2]&63;break;case 4:G=($[0]&7)<<18|($[1]&63)<<12|($[2]&63)<<6|$[3]&63;break}return G>1114111?null:G},ee=function($){$=Ze($,K," ");for(var G=$.length,W="",X=0;X<G;){var ue=Ue($,X);if(ue==="%"){if(Ue($,X+1)==="%"||X+3>G){W+="%",X++;continue}var de=me($,X+1);if(de!==de){W+=ue,X++;continue}X+=2;var ye=Ke(de);if(ye===0)ue=le(de);else{if(ye===1||ye>4){W+=J,X++;continue}for(var we=[de],Ee=1;Ee<ye&&(X++,!(X+3>G||Ue($,X)!=="%"));){var ze=me($,X+1);if(ze!==ze){X+=3;break}if(ze>191||ze<128)break;ke(we,ze),X+=2,Ee++}if(we.length!==ye){W+=J;continue}var ft=M(we);ft===null?W+=J:ue=se(ft)}}W+=ue,X++}return W},fe=/[!'()~]|%20/g,ve={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ge=function($){return ve[$]},Ye=function($){return Ze(oe($),fe,ge)},je=h(function(G,W){te(this,{type:Y,target:Q(G).entries,index:0,kind:W})},k,function(){var G=S(this),W=G.target,X=G.index++;if(!W||X>=W.length)return G.target=null,B(void 0,!0);var ue=W[X];switch(G.kind){case"keys":return B(ue.key,!1);case"values":return B(ue.value,!1)}return B([ue.key,ue.value],!1)},!0),Ge=function($){this.entries=[],this.url=null,$!==void 0&&(g($)?this.parseObject($):this.parseQuery(typeof $=="string"?Ue($,0)==="?"?gt($,1):$:w($)))};Ge.prototype={type:k,bindURL:function($){this.url=$,this.update()},parseObject:function($){var G=this.entries,W=z($),X,ue,de,ye,we,Ee,ze;if(W)for(X=N($,W),ue=X.next;!(de=a(ue,X)).done;){if(ye=N(b(de.value)),we=ye.next,(Ee=a(we,ye)).done||(ze=a(we,ye)).done||!a(we,ye).done)throw new he("Expected sequence with length 2");ke(G,{key:w(Ee.value),value:w(ze.value)})}else for(var ft in $)m($,ft)&&ke(G,{key:ft,value:w($[ft])})},parseQuery:function($){if($)for(var G=this.entries,W=mt($,"&"),X=0,ue,de;X<W.length;)ue=W[X++],ue.length&&(de=mt(ue,"="),ke(G,{key:ee(ut(de)),value:ee(Fe(de,"="))}))},serialize:function(){for(var $=this.entries,G=[],W=0,X;W<$.length;)X=$[W++],ke(G,Ye(X.key)+"="+Ye(X.value));return Fe(G,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Le=function(){v(this,Qe);var G=arguments.length>0?arguments[0]:void 0,W=te(this,new Ge(G));o||(this.size=W.entries.length)},Qe=Le.prototype;if(c(Qe,{append:function(G,W){var X=Q(this);ie(arguments.length,2),ke(X.entries,{key:w(G),value:w(W)}),o||this.length++,X.updateURL()},delete:function($){for(var G=Q(this),W=ie(arguments.length,1),X=G.entries,ue=w($),de=W<2?void 0:arguments[1],ye=de===void 0?de:w(de),we=0;we<X.length;){var Ee=X[we];if(Ee.key===ue&&(ye===void 0||Ee.value===ye)){if(lt(X,we,1),ye!==void 0)break}else we++}o||(this.size=X.length),G.updateURL()},get:function(G){var W=Q(this).entries;ie(arguments.length,1);for(var X=w(G),ue=0;ue<W.length;ue++)if(W[ue].key===X)return W[ue].value;return null},getAll:function(G){var W=Q(this).entries;ie(arguments.length,1);for(var X=w(G),ue=[],de=0;de<W.length;de++)W[de].key===X&&ke(ue,W[de].value);return ue},has:function(G){for(var W=Q(this).entries,X=ie(arguments.length,1),ue=w(G),de=X<2?void 0:arguments[1],ye=de===void 0?de:w(de),we=0;we<W.length;){var Ee=W[we++];if(Ee.key===ue&&(ye===void 0||Ee.value===ye))return!0}return!1},set:function(G,W){var X=Q(this);ie(arguments.length,1);for(var ue=X.entries,de=!1,ye=w(G),we=w(W),Ee=0,ze;Ee<ue.length;Ee++)ze=ue[Ee],ze.key===ye&&(de?lt(ue,Ee--,1):(de=!0,ze.value=we));de||ke(ue,{key:ye,value:we}),o||(this.size=ue.length),X.updateURL()},sort:function(){var G=Q(this);D(G.entries,function(W,X){return W.key>X.key?1:-1}),G.updateURL()},forEach:function(G){for(var W=Q(this).entries,X=P(G,arguments.length>1?arguments[1]:void 0),ue=0,de;ue<W.length;)de=W[ue++],X(de.value,de.key,this)},keys:function(){return new je(this,"keys")},values:function(){return new je(this,"values")},entries:function(){return new je(this,"entries")}},{enumerable:!0}),u(Qe,L,Qe.entries,{name:"entries"}),u(Qe,"toString",function(){return Q(this).serialize()},{enumerable:!0}),o&&l(Qe,"size",{get:function(){return Q(this).entries.length},configurable:!0,enumerable:!0}),f(Le,k),t({global:!0,constructor:!0,forced:!s},{URLSearchParams:Le}),!s&&p(F)){var Qt=i(V.has),Er=i(V.set),er=function($){if(g($)){var G=$.body,W;if(y(G)===k)return W=$.headers?new F($.headers):new F,Qt(W,"content-type")||Er(W,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),A($,{body:x(0,w(G)),headers:x(0,W)})}return $};if(p(_)&&t({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(G){return _(G,arguments.length>1?er(arguments[1]):{})}}),p(q)){var tr=function(G){return v(this,Z),new q(G,arguments.length>1?er(arguments[1]):{})};Z.constructor=tr,tr.prototype=Z,t({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:tr})}}return qi={URLSearchParams:Le,getState:Q},qi}var Wu;function lp(){return Wu||(Wu=1,gh()),Qs}var Vu={},Ju;function fp(){if(Ju)return Vu;Ju=1;var t=it(),e=be(),r=_t(),n=Xt(),a=URLSearchParams,i=a.prototype,o=e(i.append),s=e(i.delete),u=e(i.forEach),l=e([].push),c=new a("a=1&a=2&b=3");return c.delete("a",1),c.delete("b",void 0),c+""!="a=2"&&t(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=[];u(this,function(A,x){l(v,{key:x,value:A})}),n(h,1);for(var p=r(f),m=r(d),P=0,y=0,b=!1,g=v.length,w;P<g;)w=v[P++],b||w.key===p?(b=!0,s(this,w.key)):y++;for(;y<g;)w=v[y++],w.key===p&&w.value===m||o(this,w.key,w.value)},{enumerable:!0,unsafe:!0}),Vu}var Zu={},Yu;function dp(){if(Yu)return Zu;Yu=1;var t=it(),e=be(),r=_t(),n=Xt(),a=URLSearchParams,i=a.prototype,o=e(i.getAll),s=e(i.has),u=new a("a=1");return(u.has("a",2)||!u.has("a",void 0))&&t(i,"has",function(c){var f=arguments.length,h=f<2?void 0:arguments[1];if(f&&h===void 0)return s(this,c);var d=o(this,c);n(f,1);for(var v=r(h),p=0;p<d.length;)if(d[p++]===v)return!0;return!1},{enumerable:!0,unsafe:!0}),Zu}var Xu={},Qu;function hp(){if(Qu)return Xu;Qu=1;var t=Me(),e=be(),r=kn(),n=URLSearchParams.prototype,a=e(n.forEach);return t&&!("size"in n)&&r(n,"size",{get:function(){var o=0;return a(this,function(){o++}),o},configurable:!0,enumerable:!0}),Xu}var xi,el;function An(){if(el)return xi;el=1;var t=Se();return xi=t,xi}var $i,tl;function yh(){if(tl)return $i;tl=1,lp(),fp(),dp(),hp();var t=An();return $i=t.URLSearchParams,$i}var rl={},nl={},al={},Di,il;function wh(){if(il)return Di;il=1;var t=be(),e=fs(),r=_t(),n=In(),a=t("".charAt),i=t("".charCodeAt),o=t("".slice),s=function(u){return function(l,c){var f=r(n(l)),h=e(c),d=f.length,v,p;return h<0||h>=d?u?"":void 0:(v=i(f,h),v<55296||v>56319||h+1===d||(p=i(f,h+1))<56320||p>57343?u?a(f,h):v:u?o(f,h,h+2):(v-55296<<10)+(p-56320)+65536)}};return Di={codeAt:s(!1),charAt:s(!0)},Di}var ol;function bh(){if(ol)return al;ol=1;var t=wh().charAt,e=_t(),r=gr(),n=ph(),a=ws(),i="String Iterator",o=r.set,s=r.getterFor(i);return n(String,"String",function(u){o(this,{type:i,string:e(u),index:0})},function(){var l=s(this),c=l.string,f=l.index,h;return f>=c.length?a(void 0,!0):(h=t(c,f),l.index+=h.length,a(h,!1))}),al}var Mi,sl;function vp(){if(sl)return Mi;sl=1;var t=Me(),e=be(),r=He(),n=$e(),a=ah(),i=lh(),o=oh(),s=Pn(),u=Gd(),l=Object.assign,c=Object.defineProperty,f=e([].concat);return Mi=!l||n(function(){if(t&&l({b:1},l(c({},"a",{enumerable:!0,get:function(){c(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var h={},d={},v=Symbol("assign detection"),p="abcdefghijklmnopqrst";return h[v]=7,p.split("").forEach(function(m){d[m]=m}),l({},h)[v]!==7||a(l({},d)).join("")!==p})?function(d,v){for(var p=s(d),m=arguments.length,P=1,y=i.f,b=o.f;m>P;)for(var g=u(arguments[P++]),w=y?f(a(g),y(g)):a(g),A=w.length,x=0,N;A>x;)N=w[x++],(!t||r(b,g,N))&&(p[N]=g[N]);return p}:l,Mi}var Fi,cl;function Sh(){if(cl)return Fi;cl=1;var t=He(),e=st(),r=ls();return Fi=function(n,a,i){var o,s;e(n);try{if(o=r(n,"return"),!o){if(a==="throw")throw i;return i}o=t(o,n)}catch(u){s=!0,o=u}if(a==="throw")throw i;if(s)throw o;return e(o),i},Fi}var Ki,ul;function pp(){if(ul)return Ki;ul=1;var t=st(),e=Sh();return Ki=function(r,n,a,i){try{return i?n(t(a)[0],a[1]):n(a)}catch(o){e(r,"throw",o)}},Ki}var zi,ll;function Ih(){if(ll)return zi;ll=1;var t=De(),e=Kr(),r=t("iterator"),n=Array.prototype;return zi=function(a){return a!==void 0&&(e.Array===a||n[r]===a)},zi}var Hi,fl;function Ph(){if(fl)return Hi;fl=1;var t=be(),e=$e(),r=Pe(),n=zr(),a=at(),i=ms(),o=function(){},s=a("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=t(u.exec),c=!u.test(o),f=function(v){if(!r(v))return!1;try{return s(o,[],v),!0}catch{return!1}},h=function(v){if(!r(v))return!1;switch(n(v)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,i(v))}catch{return!0}};return h.sham=!0,Hi=!s||e(function(){var d;return f(f.call)||!f(Object)||!f(function(){d=!0})||d})?h:f,Hi}var Bi,dl;function mp(){if(dl)return Bi;dl=1;var t=Me(),e=Rt(),r=Zt();return Bi=function(n,a,i){t?e.f(n,a,r(0,i)):n[a]=i},Bi}var Gi,hl;function gp(){if(hl)return Gi;hl=1;var t=wr(),e=He(),r=Pn(),n=pp(),a=Ih(),i=Ph(),o=ds(),s=mp(),u=Ps(),l=On(),c=Array;return Gi=function(h){var d=r(h),v=i(this),p=arguments.length,m=p>1?arguments[1]:void 0,P=m!==void 0;P&&(m=t(m,p>2?arguments[2]:void 0));var y=l(d),b=0,g,w,A,x,N,z;if(y&&!(this===c&&a(y)))for(w=v?new this:[],x=u(d,y),N=x.next;!(A=e(N,x)).done;b++)z=P?n(x,m,[A.value,b],!0):A.value,s(w,b,z);else for(g=o(d),w=v?new this(g):c(g);g>b;b++)z=P?m(d[b],b):d[b],s(w,b,z);return w.length=b,w},Gi}var Wi,vl;function yp(){if(vl)return Wi;vl=1;var t=be(),e=2147483647,r=36,n=1,a=26,i=38,o=700,s=72,u=128,l="-",c=/[^\0-\u007E]/,f=/[.\u3002\uFF0E\uFF61]/g,h="Overflow: input needs wider integers to process",d=r-n,v=RangeError,p=t(f.exec),m=Math.floor,P=String.fromCharCode,y=t("".charCodeAt),b=t([].join),g=t([].push),w=t("".replace),A=t("".split),x=t("".toLowerCase),N=function(j){for(var D=[],L=0,k=j.length;L<k;){var Y=y(j,L++);if(Y>=55296&&Y<=56319&&L<k){var te=y(j,L++);(te&64512)===56320?g(D,((Y&1023)<<10)+(te&1023)+65536):(g(D,Y),L--)}else g(D,Y)}return D},z=function(j){return j+22+75*(j<26)},B=function(j,D,L){var k=0;for(j=L?m(j/o):j>>1,j+=m(j/D);j>d*a>>1;)j=m(j/d),k+=r;return m(k+(d+1)*j/(j+i))},ie=function(j){var D=[];j=N(j);var L=j.length,k=u,Y=0,te=s,Q,S;for(Q=0;Q<j.length;Q++)S=j[Q],S<128&&g(D,P(S));var _=D.length,q=_;for(_&&g(D,l);q<L;){var F=e;for(Q=0;Q<j.length;Q++)S=j[Q],S>=k&&S<F&&(F=S);var Z=q+1;if(F-k>m((e-Y)/Z))throw new v(h);for(Y+=(F-k)*Z,k=F,Q=0;Q<j.length;Q++){if(S=j[Q],S<k&&++Y>e)throw new v(h);if(S===k){for(var V=Y,he=r;;){var oe=he<=te?n:he>=te+a?a:he-te;if(V<oe)break;var le=V-oe,se=r-oe;g(D,P(z(oe+le%se))),V=m(le/se),he+=r}g(D,P(z(V))),te=B(Y,Z,q===_),Y=0,q++}}Y++,k++}return b(D,"")};return Wi=function(j){var D=[],L=A(w(x(j),f,"."),"."),k,Y;for(k=0;k<L.length;k++)Y=L[k],g(D,p(c,Y)?"xn--"+ie(Y):Y);return b(D,".")},Wi}var pl;function wp(){if(pl)return nl;pl=1,bh();var t=Te(),e=Me(),r=Tn(),n=Se(),a=wr(),i=be(),o=it(),s=kn(),u=Ss(),l=rt(),c=vp(),f=gp(),h=Cn(),d=wh().codeAt,v=yp(),p=_t(),m=yr(),P=Xt(),y=gh(),b=gr(),g=b.set,w=b.getterFor("URL"),A=y.URLSearchParams,x=y.getState,N=n.URL,z=n.TypeError,B=n.parseInt,ie=Math.floor,j=Math.pow,D=i("".charAt),L=i(/./.exec),k=i([].join),Y=i(1.1.toString),te=i([].pop),Q=i([].push),S=i("".replace),_=i([].shift),q=i("".split),F=i("".slice),Z=i("".toLowerCase),V=i([].unshift),he="Invalid authority",oe="Invalid scheme",le="Invalid host",se="Invalid port",Re=/[a-z]/i,Ue=/[\d+-.a-z]/i,Fe=/\d/,ke=/^0x/i,Ze=/^[0-7]+$/,ut=/^\d+$/,lt=/^[\da-f]+$/i,mt=/[\0\t\n\r #%/:<>?@[\\\]^|]/,gt=/[\0\t\n\r #/:<>?@[\\\]^|]/,T=/^[\u0000-\u0020]+/,K=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,J=/[\t\n\r]/g,re,me=function(E){var U=q(E,"."),R,I,O,ce,H,Ie,_e;if(U.length&&U[U.length-1]===""&&U.length--,R=U.length,R>4)return E;for(I=[],O=0;O<R;O++){if(ce=U[O],ce==="")return E;if(H=10,ce.length>1&&D(ce,0)==="0"&&(H=L(ke,ce)?16:8,ce=F(ce,H===8?1:2)),ce==="")Ie=0;else{if(!L(H===10?ut:H===8?Ze:lt,ce))return E;Ie=B(ce,H)}Q(I,Ie)}for(O=0;O<R;O++)if(Ie=I[O],O===R-1){if(Ie>=j(256,5-R))return null}else if(Ie>255)return null;for(_e=te(I),O=0;O<I.length;O++)_e+=I[O]*j(256,3-O);return _e},Ke=function(E){var U=[0,0,0,0,0,0,0,0],R=0,I=null,O=0,ce,H,Ie,_e,Ne,tt,C,Oe=function(){return D(E,O)};if(Oe()===":"){if(D(E,1)!==":")return;O+=2,R++,I=R}for(;Oe();){if(R===8)return;if(Oe()===":"){if(I!==null)return;O++,R++,I=R;continue}for(ce=H=0;H<4&&L(lt,Oe());)ce=ce*16+B(Oe(),16),O++,H++;if(Oe()==="."){if(H===0||(O-=H,R>6))return;for(Ie=0;Oe();){if(_e=null,Ie>0)if(Oe()==="."&&Ie<4)O++;else return;if(!L(Fe,Oe()))return;for(;L(Fe,Oe());){if(Ne=B(Oe(),10),_e===null)_e=Ne;else{if(_e===0)return;_e=_e*10+Ne}if(_e>255)return;O++}U[R]=U[R]*256+_e,Ie++,(Ie===2||Ie===4)&&R++}if(Ie!==4)return;break}else if(Oe()===":"){if(O++,!Oe())return}else if(Oe())return;U[R++]=ce}if(I!==null)for(tt=R-I,R=7;R!==0&&tt>0;)C=U[R],U[R--]=U[I+tt-1],U[I+--tt]=C;else if(R!==8)return;return U},M=function(E){for(var U=null,R=1,I=null,O=0,ce=0;ce<8;ce++)E[ce]!==0?(O>R&&(U=I,R=O),I=null,O=0):(I===null&&(I=ce),++O);return O>R?I:U},ee=function(E){var U,R,I,O;if(typeof E=="number"){for(U=[],R=0;R<4;R++)V(U,E%256),E=ie(E/256);return k(U,".")}if(typeof E=="object"){for(U="",I=M(E),R=0;R<8;R++)O&&E[R]===0||(O&&(O=!1),I===R?(U+=R?":":"::",O=!0):(U+=Y(E[R],16),R<7&&(U+=":")));return"["+U+"]"}return E},fe={},ve=c({},fe,{" ":1,'"':1,"<":1,">":1,"`":1}),ge=c({},ve,{"#":1,"?":1,"{":1,"}":1}),Ye=c({},ge,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),je=function(E,U){var R=d(E,0);return R>32&&R<127&&!l(U,E)?E:encodeURIComponent(E)},Ge={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Le=function(E,U){var R;return E.length===2&&L(Re,D(E,0))&&((R=D(E,1))===":"||!U&&R==="|")},Qe=function(E){var U;return E.length>1&&Le(F(E,0,2))&&(E.length===2||(U=D(E,2))==="/"||U==="\\"||U==="?"||U==="#")},Qt=function(E){return E==="."||Z(E)==="%2e"},Er=function(E){return E=Z(E),E===".."||E==="%2e."||E===".%2e"||E==="%2e%2e"},er={},tr={},$={},G={},W={},X={},ue={},de={},ye={},we={},Ee={},ze={},ft={},Kn={},Gs={},zn={},rr={},dt={},Ws={},Lt={},yt={},Hn=function(E,U,R){var I=p(E),O,ce,H;if(U){if(ce=this.parse(I),ce)throw new z(ce);this.searchParams=null}else{if(R!==void 0&&(O=new Hn(R,!0)),ce=this.parse(I,null,O),ce)throw new z(ce);H=x(new A),H.bindURL(this),this.searchParams=H}};Hn.prototype={type:"URL",parse:function(E,U,R){var I=this,O=U||er,ce=0,H="",Ie=!1,_e=!1,Ne=!1,tt,C,Oe,wt;for(E=p(E),U||(I.scheme="",I.username="",I.password="",I.host=null,I.port=null,I.path=[],I.query=null,I.fragment=null,I.cannotBeABaseURL=!1,E=S(E,T,""),E=S(E,K,"$1")),E=S(E,J,""),tt=f(E);ce<=tt.length;){switch(C=tt[ce],O){case er:if(C&&L(Re,C))H+=Z(C),O=tr;else{if(U)return oe;O=$;continue}break;case tr:if(C&&(L(Ue,C)||C==="+"||C==="-"||C==="."))H+=Z(C);else if(C===":"){if(U&&(I.isSpecial()!==l(Ge,H)||H==="file"&&(I.includesCredentials()||I.port!==null)||I.scheme==="file"&&!I.host))return;if(I.scheme=H,U){I.isSpecial()&&Ge[I.scheme]===I.port&&(I.port=null);return}H="",I.scheme==="file"?O=Kn:I.isSpecial()&&R&&R.scheme===I.scheme?O=G:I.isSpecial()?O=de:tt[ce+1]==="/"?(O=W,ce++):(I.cannotBeABaseURL=!0,Q(I.path,""),O=Ws)}else{if(U)return oe;H="",O=$,ce=0;continue}break;case $:if(!R||R.cannotBeABaseURL&&C!=="#")return oe;if(R.cannotBeABaseURL&&C==="#"){I.scheme=R.scheme,I.path=h(R.path),I.query=R.query,I.fragment="",I.cannotBeABaseURL=!0,O=yt;break}O=R.scheme==="file"?Kn:X;continue;case G:if(C==="/"&&tt[ce+1]==="/")O=ye,ce++;else{O=X;continue}break;case W:if(C==="/"){O=we;break}else{O=dt;continue}case X:if(I.scheme=R.scheme,C===re)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(C==="/"||C==="\\"&&I.isSpecial())O=ue;else if(C==="?")I.username=R.username,I.password=R.password,I.host=R.host,I.port=R.port,I.path=h(R.path),I.query="",O=Lt;else if(C==="#")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="",O=yt;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--,O=dt;continue}break;case ue:if(I.isSpecial()&&(C==="/"||C==="\\"))O=ye;else if(C==="/")O=we;else{I.username=R.username,I.password=R.password,I.host=R.host,I.port=R.port,O=dt;continue}break;case de:if(O=ye,C!=="/"||D(H,ce+1)!=="/")continue;ce++;break;case ye:if(C!=="/"&&C!=="\\"){O=we;continue}break;case we:if(C==="@"){Ie&&(H="%40"+H),Ie=!0,Oe=f(H);for(var Bn=0;Bn<Oe.length;Bn++){var Zs=Oe[Bn];if(Zs===":"&&!Ne){Ne=!0;continue}var Ys=je(Zs,Ye);Ne?I.password+=Ys:I.username+=Ys}H=""}else if(C===re||C==="/"||C==="?"||C==="#"||C==="\\"&&I.isSpecial()){if(Ie&&H==="")return he;ce-=f(H).length+1,H="",O=Ee}else H+=C;break;case Ee:case ze:if(U&&I.scheme==="file"){O=zn;continue}else if(C===":"&&!_e){if(H==="")return le;if(wt=I.parseHost(H),wt)return wt;if(H="",O=ft,U===ze)return}else if(C===re||C==="/"||C==="?"||C==="#"||C==="\\"&&I.isSpecial()){if(I.isSpecial()&&H==="")return le;if(U&&H===""&&(I.includesCredentials()||I.port!==null))return;if(wt=I.parseHost(H),wt)return wt;if(H="",O=rr,U)return;continue}else C==="["?_e=!0:C==="]"&&(_e=!1),H+=C;break;case ft:if(L(Fe,C))H+=C;else if(C===re||C==="/"||C==="?"||C==="#"||C==="\\"&&I.isSpecial()||U){if(H!==""){var Gn=B(H,10);if(Gn>65535)return se;I.port=I.isSpecial()&&Gn===Ge[I.scheme]?null:Gn,H=""}if(U)return;O=rr;continue}else return se;break;case Kn:if(I.scheme="file",C==="/"||C==="\\")O=Gs;else if(R&&R.scheme==="file")switch(C){case re: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="",O=Lt;break;case"#":I.host=R.host,I.path=h(R.path),I.query=R.query,I.fragment="",O=yt;break;default:Qe(k(h(tt,ce),""))||(I.host=R.host,I.path=h(R.path),I.shortenPath()),O=dt;continue}else{O=dt;continue}break;case Gs:if(C==="/"||C==="\\"){O=zn;break}R&&R.scheme==="file"&&!Qe(k(h(tt,ce),""))&&(Le(R.path[0],!0)?Q(I.path,R.path[0]):I.host=R.host),O=dt;continue;case zn:if(C===re||C==="/"||C==="\\"||C==="?"||C==="#"){if(!U&&Le(H))O=dt;else if(H===""){if(I.host="",U)return;O=rr}else{if(wt=I.parseHost(H),wt)return wt;if(I.host==="localhost"&&(I.host=""),U)return;H="",O=rr}continue}else H+=C;break;case rr:if(I.isSpecial()){if(O=dt,C!=="/"&&C!=="\\")continue}else if(!U&&C==="?")I.query="",O=Lt;else if(!U&&C==="#")I.fragment="",O=yt;else if(C!==re&&(O=dt,C!=="/"))continue;break;case dt:if(C===re||C==="/"||C==="\\"&&I.isSpecial()||!U&&(C==="?"||C==="#")){if(Er(H)?(I.shortenPath(),C!=="/"&&!(C==="\\"&&I.isSpecial())&&Q(I.path,"")):Qt(H)?C!=="/"&&!(C==="\\"&&I.isSpecial())&&Q(I.path,""):(I.scheme==="file"&&!I.path.length&&Le(H)&&(I.host&&(I.host=""),H=D(H,0)+":"),Q(I.path,H)),H="",I.scheme==="file"&&(C===re||C==="?"||C==="#"))for(;I.path.length>1&&I.path[0]==="";)_(I.path);C==="?"?(I.query="",O=Lt):C==="#"&&(I.fragment="",O=yt)}else H+=je(C,ge);break;case Ws:C==="?"?(I.query="",O=Lt):C==="#"?(I.fragment="",O=yt):C!==re&&(I.path[0]+=je(C,fe));break;case Lt:!U&&C==="#"?(I.fragment="",O=yt):C!==re&&(C==="'"&&I.isSpecial()?I.query+="%27":C==="#"?I.query+="%23":I.query+=je(C,fe));break;case yt:C!==re&&(I.fragment+=je(C,ve));break}ce++}},parseHost:function(E){var U,R,I;if(D(E,0)==="["){if(D(E,E.length-1)!=="]"||(U=Ke(F(E,1,-1)),!U))return le;this.host=U}else if(this.isSpecial()){if(E=v(E),L(mt,E)||(U=me(E),U===null))return le;this.host=U}else{if(L(gt,E))return le;for(U="",R=f(E),I=0;I<R.length;I++)U+=je(R[I],fe);this.host=U}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return l(Ge,this.scheme)},shortenPath:function(){var E=this.path,U=E.length;U&&(this.scheme!=="file"||U!==1||!Le(E[0],!0))&&E.length--},serialize:function(){var E=this,U=E.scheme,R=E.username,I=E.password,O=E.host,ce=E.port,H=E.path,Ie=E.query,_e=E.fragment,Ne=U+":";return O!==null?(Ne+="//",E.includesCredentials()&&(Ne+=R+(I?":"+I:"")+"@"),Ne+=ee(O),ce!==null&&(Ne+=":"+ce)):U==="file"&&(Ne+="//"),Ne+=E.cannotBeABaseURL?H[0]:H.length?"/"+k(H,"/"):"",Ie!==null&&(Ne+="?"+Ie),_e!==null&&(Ne+="#"+_e),Ne},setHref:function(E){var U=this.parse(E);if(U)throw new z(U);this.searchParams.update()},getOrigin:function(){var E=this.scheme,U=this.port;if(E==="blob")try{return new nr(E.path[0]).origin}catch{return"null"}return E==="file"||!this.isSpecial()?"null":E+"://"+ee(this.host)+(U!==null?":"+U:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(E){this.parse(p(E)+":",er)},getUsername:function(){return this.username},setUsername:function(E){var U=f(p(E));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var R=0;R<U.length;R++)this.username+=je(U[R],Ye)}},getPassword:function(){return this.password},setPassword:function(E){var U=f(p(E));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var R=0;R<U.length;R++)this.password+=je(U[R],Ye)}},getHost:function(){var E=this.host,U=this.port;return E===null?"":U===null?ee(E):ee(E)+":"+U},setHost:function(E){this.cannotBeABaseURL||this.parse(E,Ee)},getHostname:function(){var E=this.host;return E===null?"":ee(E)},setHostname:function(E){this.cannotBeABaseURL||this.parse(E,ze)},getPort:function(){var E=this.port;return E===null?"":p(E)},setPort:function(E){this.cannotHaveUsernamePasswordPort()||(E=p(E),E===""?this.port=null:this.parse(E,ft))},getPathname:function(){var E=this.path;return this.cannotBeABaseURL?E[0]:E.length?"/"+k(E,"/"):""},setPathname:function(E){this.cannotBeABaseURL||(this.path=[],this.parse(E,rr))},getSearch:function(){var E=this.query;return E?"?"+E:""},setSearch:function(E){E=p(E),E===""?this.query=null:(D(E,0)==="?"&&(E=F(E,1)),this.query="",this.parse(E,Lt)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var E=this.fragment;return E?"#"+E:""},setHash:function(E){if(E=p(E),E===""){this.fragment=null;return}D(E,0)==="#"&&(E=F(E,1)),this.fragment="",this.parse(E,yt)},update:function(){this.query=this.searchParams.serialize()||null}};var nr=function(U){var R=u(this,Be),I=P(arguments.length,1)>1?arguments[1]:void 0,O=g(R,new Hn(U,!1,I));e||(R.href=O.serialize(),R.origin=O.getOrigin(),R.protocol=O.getProtocol(),R.username=O.getUsername(),R.password=O.getPassword(),R.host=O.getHost(),R.hostname=O.getHostname(),R.port=O.getPort(),R.pathname=O.getPathname(),R.search=O.getSearch(),R.searchParams=O.getSearchParams(),R.hash=O.getHash())},Be=nr.prototype,et=function(E,U){return{get:function(){return w(this)[E]()},set:U&&function(R){return w(this)[U](R)},configurable:!0,enumerable:!0}};if(e&&(s(Be,"href",et("serialize","setHref")),s(Be,"origin",et("getOrigin")),s(Be,"protocol",et("getProtocol","setProtocol")),s(Be,"username",et("getUsername","setUsername")),s(Be,"password",et("getPassword","setPassword")),s(Be,"host",et("getHost","setHost")),s(Be,"hostname",et("getHostname","setHostname")),s(Be,"port",et("getPort","setPort")),s(Be,"pathname",et("getPathname","setPathname")),s(Be,"search",et("getSearch","setSearch")),s(Be,"searchParams",et("getSearchParams")),s(Be,"hash",et("getHash","setHash"))),o(Be,"toJSON",function(){return w(this).serialize()},{enumerable:!0}),o(Be,"toString",function(){return w(this).serialize()},{enumerable:!0}),N){var Vs=N.createObjectURL,Js=N.revokeObjectURL;Vs&&o(nr,"createObjectURL",a(Vs,N)),Js&&o(nr,"revokeObjectURL",a(Js,N))}return m(nr,"URL"),t({global:!0,constructor:!0,forced:!r,sham:!e},{URL:nr}),nl}var ml;function bp(){return ml||(ml=1,wp()),rl}var gl={},yl;function Sp(){if(yl)return gl;yl=1;var t=Te(),e=at(),r=$e(),n=Xt(),a=_t(),i=Tn(),o=e("URL"),s=i&&r(function(){o.canParse()}),u=r(function(){return o.canParse.length!==1});return t({target:"URL",stat:!0,forced:!s||u},{canParse:function(c){var f=n(arguments.length,1),h=a(c),d=f<2||arguments[1]===void 0?void 0:a(arguments[1]);try{return!!new o(h,d)}catch{return!1}}}),gl}var wl={},bl;function Ip(){if(bl)return wl;bl=1;var t=Te(),e=at(),r=Xt(),n=_t(),a=Tn(),i=e("URL");return t({target:"URL",stat:!0,forced:!a},{parse:function(s){var u=r(arguments.length,1),l=n(s),c=u<2||arguments[1]===void 0?void 0:n(arguments[1]);try{return new i(l,c)}catch{return null}}}),wl}var Sl={},Il;function Pp(){if(Il)return Sl;Il=1;var t=Te(),e=He();return t({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return e(URL.prototype.toString,this)}}),Sl}var Vi,Pl;function Ep(){if(Pl)return Vi;Pl=1,yh(),bp(),Sp(),Ip(),Pp();var t=An();return Vi=t.URL,Vi}var Ji,El;function Rp(){if(El)return Ji;El=1;var t=Ep();return Ji=t,Ji}var Zi,Rl;function _p(){if(Rl)return Zi;Rl=1;var t=Rp();return Zi=t,Zi}_p();var _l={},Yi,Tl;function Tp(){return Tl||(Tl=1,Yi={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}),Yi}var Xi,kl;function kp(){if(kl)return Xi;kl=1;var t=En(),e=t("span").classList,r=e&&e.constructor&&e.constructor.prototype;return Xi=r===Object.prototype?void 0:r,Xi}var Ol;function Eh(){if(Ol)return _l;Ol=1;var t=Se(),e=Tp(),r=kp(),n=bs(),a=Yt(),i=yr(),o=De(),s=o("iterator"),u=n.values,l=function(f,h){if(f){if(f[s]!==u)try{a(f,s,u)}catch{f[s]=u}if(i(f,h,!0),e[h]){for(var d in n)if(f[d]!==n[d])try{a(f,d,n[d])}catch{f[d]=n[d]}}}};for(var c in e)l(t[c]&&t[c].prototype,c);return l(r,"DOMTokenList"),_l}var Qi,Cl;function Op(){if(Cl)return Qi;Cl=1;var t=yh();return Eh(),Qi=t,Qi}var eo,Al;function Cp(){if(Al)return eo;Al=1;var t=Op();return eo=t,eo}Cp();var Ul={},jl={},to,Ll;function Ap(){if(Ll)return to;Ll=1;var t=nt(),e=Yt();return to=function(r,n){t(n)&&"cause"in n&&e(r,"cause",n.cause)},to}var ro,Nl;function Up(){if(Nl)return ro;Nl=1;var t=be(),e=Error,r=t("".replace),n=(function(o){return String(new e(o).stack)})("zxcasd"),a=/\n\s*at [^:]*:[^\n]*/,i=a.test(n);return ro=function(o,s){if(i&&typeof o=="string"&&!e.prepareStackTrace)for(;s--;)o=r(o,a,"");return o},ro}var no,ql;function jp(){if(ql)return no;ql=1;var t=$e(),e=Zt();return no=!t(function(){var r=new Error("a");return"stack"in r?(Object.defineProperty(r,"stack",e(1,7)),r.stack!==7):!0}),no}var ao,xl;function Lp(){if(xl)return ao;xl=1;var t=Yt(),e=Up(),r=jp(),n=Error.captureStackTrace;return ao=function(a,i,o,s){r&&(n?n(a,i):t(a,"stack",e(o,s)))},ao}var io,$l;function Hr(){if($l)return io;$l=1;var t=wr(),e=He(),r=st(),n=_n(),a=Ih(),i=ds(),o=Rn(),s=Ps(),u=On(),l=Sh(),c=TypeError,f=function(d,v){this.stopped=d,this.result=v},h=f.prototype;return io=function(d,v,p){var m=p&&p.that,P=!!(p&&p.AS_ENTRIES),y=!!(p&&p.IS_RECORD),b=!!(p&&p.IS_ITERATOR),g=!!(p&&p.INTERRUPTED),w=t(v,m),A,x,N,z,B,ie,j,D=function(k){return A&&l(A,"normal"),new f(!0,k)},L=function(k){return P?(r(k),g?w(k[0],k[1],D):w(k[0],k[1])):g?w(k,D):w(k)};if(y)A=d.iterator;else if(b)A=d;else{if(x=u(d),!x)throw new c(n(d)+" is not iterable");if(a(x)){for(N=0,z=i(d);z>N;N++)if(B=L(d[N]),B&&o(h,B))return B;return new f(!1)}A=s(d,x)}for(ie=y?d.next:A.next;!(j=e(ie,A)).done;){try{B=L(j.value)}catch(k){l(A,"throw",k)}if(typeof B=="object"&&B&&o(h,B))return B}return new f(!1)},io}var oo,Dl;function Np(){if(Dl)return oo;Dl=1;var t=_t();return oo=function(e,r){return e===void 0?arguments.length<2?"":r:t(e)},oo}var Ml;function qp(){if(Ml)return jl;Ml=1;var t=Te(),e=Rn(),r=gs(),n=ys(),a=fh(),i=Fr(),o=Yt(),s=Zt(),u=Ap(),l=Lp(),c=Hr(),f=Np(),h=De(),d=h("toStringTag"),v=Error,p=[].push,m=function(b,g){var w=e(P,this),A;n?A=n(new v,w?r(this):P):(A=w?this:i(P),o(A,d,"Error")),g!==void 0&&o(A,"message",f(g)),l(A,m,A.stack,1),arguments.length>2&&u(A,arguments[2]);var x=[];return c(b,p,{that:x}),o(A,"errors",x),A};n?n(m,v):a(m,v,{name:!0});var P=m.prototype=i(v.prototype,{constructor:s(1,m),message:s(1,""),name:s(1,"AggregateError")});return t({global:!0,constructor:!0,arity:2},{AggregateError:m}),jl}var Fl;function xp(){return Fl||(Fl=1,qp()),Ul}var Kl={},so,zl;function $p(){if(zl)return so;zl=1;var t=Is(),e=zr();return so=t?{}.toString:function(){return"[object "+e(this)+"]"},so}var Hl;function Dp(){if(Hl)return Kl;Hl=1;var t=Is(),e=it(),r=$p();return t||e(Object.prototype,"toString",r,{unsafe:!0}),Kl}var Bl={},Gl={},co,Wl;function Rh(){if(Wl)return co;Wl=1;var t=Se(),e=Mr(),r=bn(),n=function(a){return e.slice(0,a.length)===a};return co=(function(){return n("Bun/")?"BUN":n("Cloudflare-Workers")?"CLOUDFLARE":n("Deno/")?"DENO":n("Node.js/")?"NODE":t.Bun&&typeof Bun.version=="string"?"BUN":t.Deno&&typeof Deno.version=="object"?"DENO":r(t.process)==="process"?"NODE":t.window&&t.document?"BROWSER":"REST"})(),co}var uo,Vl;function Es(){if(Vl)return uo;Vl=1;var t=Rh();return uo=t==="NODE",uo}var lo,Jl;function Mp(){if(Jl)return lo;Jl=1;var t=at(),e=kn(),r=De(),n=Me(),a=r("species");return lo=function(i){var o=t(i);n&&o&&!o[a]&&e(o,a,{configurable:!0,get:function(){return this}})},lo}var fo,Zl;function Fp(){if(Zl)return fo;Zl=1;var t=Ph(),e=_n(),r=TypeError;return fo=function(n){if(t(n))return n;throw new r(e(n)+" is not a constructor")},fo}var ho,Yl;function _h(){if(Yl)return ho;Yl=1;var t=st(),e=Fp(),r=Sn(),n=De(),a=n("species");return ho=function(i,o){var s=t(i).constructor,u;return s===void 0||r(u=t(s)[a])?o:e(u)},ho}var vo,Xl;function Th(){if(Xl)return vo;Xl=1;var t=wn(),e=Function.prototype,r=e.apply,n=e.call;return vo=typeof Reflect=="object"&&Reflect.apply||(t?n.bind(r):function(){return n.apply(r,arguments)}),vo}var po,Ql;function kh(){if(Ql)return po;Ql=1;var t=Mr();return po=/(?:ipad|iphone|ipod).*applewebkit/i.test(t),po}var mo,ef;function Oh(){if(ef)return mo;ef=1;var t=Se(),e=Th(),r=wr(),n=Pe(),a=rt(),i=$e(),o=ih(),s=Cn(),u=En(),l=Xt(),c=kh(),f=Es(),h=t.setImmediate,d=t.clearImmediate,v=t.process,p=t.Dispatch,m=t.Function,P=t.MessageChannel,y=t.String,b=0,g={},w="onreadystatechange",A,x,N,z;i(function(){A=t.location});var B=function(L){if(a(g,L)){var k=g[L];delete g[L],k()}},ie=function(L){return function(){B(L)}},j=function(L){B(L.data)},D=function(L){t.postMessage(y(L),A.protocol+"//"+A.host)};return(!h||!d)&&(h=function(k){l(arguments.length,1);var Y=n(k)?k:m(k),te=s(arguments,1);return g[++b]=function(){e(Y,void 0,te)},x(b),b},d=function(k){delete g[k]},f?x=function(L){v.nextTick(ie(L))}:p&&p.now?x=function(L){p.now(ie(L))}:P&&!c?(N=new P,z=N.port2,N.port1.onmessage=j,x=r(z.postMessage,z)):t.addEventListener&&n(t.postMessage)&&!t.importScripts&&A&&A.protocol!=="file:"&&!i(D)?(x=D,t.addEventListener("message",j,!1)):w in u("script")?x=function(L){o.appendChild(u("script"))[w]=function(){o.removeChild(this),B(L)}}:x=function(L){setTimeout(ie(L),0)}),mo={set:h,clear:d},mo}var go,tf;function Ch(){if(tf)return go;tf=1;var t=function(){this.head=null,this.tail=null};return t.prototype={add:function(e){var r={item:e,next:null},n=this.tail;n?n.next=r:this.head=r,this.tail=r},get:function(){var e=this.head;if(e){var r=this.head=e.next;return r===null&&(this.tail=null),e.item}}},go=t,go}var yo,rf;function Kp(){if(rf)return yo;rf=1;var t=Mr();return yo=/ipad|iphone|ipod/i.test(t)&&typeof Pebble<"u",yo}var wo,nf;function zp(){if(nf)return wo;nf=1;var t=Mr();return wo=/web0s(?!.*chrome)/i.test(t),wo}var bo,af;function Hp(){if(af)return bo;af=1;var t=Se(),e=mh(),r=wr(),n=Oh().set,a=Ch(),i=kh(),o=Kp(),s=zp(),u=Es(),l=t.MutationObserver||t.WebKitMutationObserver,c=t.document,f=t.process,h=t.Promise,d=e("queueMicrotask"),v,p,m,P,y;if(!d){var b=new a,g=function(){var w,A;for(u&&(w=f.domain)&&w.exit();A=b.get();)try{A()}catch(x){throw b.head&&v(),x}w&&w.enter()};!i&&!u&&!s&&l&&c?(p=!0,m=c.createTextNode(""),new l(g).observe(m,{characterData:!0}),v=function(){m.data=p=!p}):!o&&h&&h.resolve?(P=h.resolve(void 0),P.constructor=h,y=r(P.then,P),v=function(){y(g)}):u?v=function(){f.nextTick(g)}:(n=r(n,t),v=function(){n(g)}),d=function(w){b.head||v(),b.add(w)}}return bo=d,bo}var So,of;function Bp(){return of||(of=1,So=function(t,e){try{arguments.length===1?console.error(t):console.error(t,e)}catch{}}),So}var Io,sf;function br(){return sf||(sf=1,Io=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}}),Io}var Po,cf;function Sr(){if(cf)return Po;cf=1;var t=Se();return Po=t.Promise,Po}var Eo,uf;function Br(){if(uf)return Eo;uf=1;var t=Se(),e=Sr(),r=Pe(),n=dh(),a=ms(),i=De(),o=Rh(),s=pt(),u=Jd(),l=e&&e.prototype,c=i("species"),f=!1,h=r(t.PromiseRejectionEvent),d=n("Promise",function(){var v=a(e),p=v!==String(e);if(!p&&u===66||s&&!(l.catch&&l.finally))return!0;if(!u||u<51||!/native code/.test(v)){var m=new e(function(b){b(1)}),P=function(b){b(function(){},function(){})},y=m.constructor={};if(y[c]=P,f=m.then(function(){})instanceof P,!f)return!0}return!p&&(o==="BROWSER"||o==="DENO")&&!h});return Eo={CONSTRUCTOR:d,REJECTION_EVENT:h,SUBCLASSING:f},Eo}var Ro={},lf;function Tt(){if(lf)return Ro;lf=1;var t=ct(),e=TypeError,r=function(n){var a,i;this.promise=new n(function(o,s){if(a!==void 0||i!==void 0)throw new e("Bad Promise constructor");a=o,i=s}),this.resolve=t(a),this.reject=t(i)};return Ro.f=function(n){return new r(n)},Ro}var ff;function Gp(){if(ff)return Gl;ff=1;var t=Te(),e=pt(),r=Es(),n=Se(),a=An(),i=He(),o=it(),s=ys(),u=yr(),l=Mp(),c=ct(),f=Pe(),h=nt(),d=Ss(),v=_h(),p=Oh().set,m=Hp(),P=Bp(),y=br(),b=Ch(),g=gr(),w=Sr(),A=Br(),x=Tt(),N="Promise",z=A.CONSTRUCTOR,B=A.REJECTION_EVENT,ie=A.SUBCLASSING,j=g.getterFor(N),D=g.set,L=w&&w.prototype,k=w,Y=L,te=n.TypeError,Q=n.document,S=n.process,_=x.f,q=_,F=!!(Q&&Q.createEvent&&n.dispatchEvent),Z="unhandledrejection",V="rejectionhandled",he=0,oe=1,le=2,se=1,Re=2,Ue,Fe,ke,Ze,ut=function(M){var ee;return h(M)&&f(ee=M.then)?ee:!1},lt=function(M,ee){var fe=ee.value,ve=ee.state===oe,ge=ve?M.ok:M.fail,Ye=M.resolve,je=M.reject,Ge=M.domain,Le,Qe,Qt;try{ge?(ve||(ee.rejection===Re&&J(ee),ee.rejection=se),ge===!0?Le=fe:(Ge&&Ge.enter(),Le=ge(fe),Ge&&(Ge.exit(),Qt=!0)),Le===M.promise?je(new te("Promise-chain cycle")):(Qe=ut(Le))?i(Qe,Le,Ye,je):Ye(Le)):je(fe)}catch(Er){Ge&&!Qt&&Ge.exit(),je(Er)}},mt=function(M,ee){M.notified||(M.notified=!0,m(function(){for(var fe=M.reactions,ve;ve=fe.get();)lt(ve,M);M.notified=!1,ee&&!M.rejection&&T(M)}))},gt=function(M,ee,fe){var ve,ge;F?(ve=Q.createEvent("Event"),ve.promise=ee,ve.reason=fe,ve.initEvent(M,!1,!0),n.dispatchEvent(ve)):ve={promise:ee,reason:fe},!B&&(ge=n["on"+M])?ge(ve):M===Z&&P("Unhandled promise rejection",fe)},T=function(M){i(p,n,function(){var ee=M.facade,fe=M.value,ve=K(M),ge;if(ve&&(ge=y(function(){r?S.emit("unhandledRejection",fe,ee):gt(Z,ee,fe)}),M.rejection=r||K(M)?Re:se,ge.error))throw ge.value})},K=function(M){return M.rejection!==se&&!M.parent},J=function(M){i(p,n,function(){var ee=M.facade;r?S.emit("rejectionHandled",ee):gt(V,ee,M.value)})},re=function(M,ee,fe){return function(ve){M(ee,ve,fe)}},me=function(M,ee,fe){M.done||(M.done=!0,fe&&(M=fe),M.value=ee,M.state=le,mt(M,!0))},Ke=function(M,ee,fe){if(!M.done){M.done=!0,fe&&(M=fe);try{if(M.facade===ee)throw new te("Promise can't be resolved itself");var ve=ut(ee);ve?m(function(){var ge={done:!1};try{i(ve,ee,re(Ke,ge,M),re(me,ge,M))}catch(Ye){me(ge,Ye,M)}}):(M.value=ee,M.state=oe,mt(M,!1))}catch(ge){me({done:!1},ge,M)}}};if(z&&(k=function(ee){d(this,Y),c(ee),i(Ue,this);var fe=j(this);try{ee(re(Ke,fe),re(me,fe))}catch(ve){me(fe,ve)}},Y=k.prototype,Ue=function(ee){D(this,{type:N,done:!1,notified:!1,parent:!1,reactions:new b,rejection:!1,state:he,value:null})},Ue.prototype=o(Y,"then",function(ee,fe){var ve=j(this),ge=_(v(this,k));return ve.parent=!0,ge.ok=f(ee)?ee:!0,ge.fail=f(fe)&&fe,ge.domain=r?S.domain:void 0,ve.state===he?ve.reactions.add(ge):m(function(){lt(ge,ve)}),ge.promise}),Fe=function(){var M=new Ue,ee=j(M);this.promise=M,this.resolve=re(Ke,ee),this.reject=re(me,ee)},x.f=_=function(M){return M===k||M===ke?new Fe(M):q(M)},!e&&f(w)&&L!==Object.prototype)){Ze=L.then,ie||o(L,"then",function(ee,fe){var ve=this;return new k(function(ge,Ye){i(Ze,ve,ge,Ye)}).then(ee,fe)},{unsafe:!0});try{delete L.constructor}catch{}s&&s(L,Y)}return t({global:!0,constructor:!0,wrap:!0,forced:z},{Promise:k}),ke=a.Promise,u(k,N,!1,!0),l(N),Gl}var df={},_o,hf;function Wp(){if(hf)return _o;hf=1;var t=De(),e=t("iterator"),r=!1;try{var n=0,a={next:function(){return{done:!!n++}},return:function(){r=!0}};a[e]=function(){return this},Array.from(a,function(){throw 2})}catch{}return _o=function(i,o){try{if(!o&&!r)return!1}catch{return!1}var s=!1;try{var u={};u[e]=function(){return{next:function(){return{done:s=!0}}}},i(u)}catch{}return s},_o}var To,vf;function Un(){if(vf)return To;vf=1;var t=Sr(),e=Wp(),r=Br().CONSTRUCTOR;return To=r||!e(function(n){t.all(n).then(void 0,function(){})}),To}var pf;function Vp(){if(pf)return df;pf=1;var t=Te(),e=He(),r=ct(),n=Tt(),a=br(),i=Hr(),o=Un();return t({target:"Promise",stat:!0,forced:o},{all:function(u){var l=this,c=n.f(l),f=c.resolve,h=c.reject,d=a(function(){var v=r(l.resolve),p=[],m=0,P=1;i(u,function(y){var b=m++,g=!1;P++,e(v,l,y).then(function(w){g||(g=!0,p[b]=w,--P||f(p))},h)}),--P||f(p)});return d.error&&h(d.value),c.promise}}),df}var mf={},gf;function Jp(){if(gf)return mf;gf=1;var t=Te(),e=pt(),r=Br().CONSTRUCTOR,n=Sr(),a=at(),i=Pe(),o=it(),s=n&&n.prototype;if(t({target:"Promise",proto:!0,forced:r,real:!0},{catch:function(l){return this.then(void 0,l)}}),!e&&i(n)){var u=a("Promise").prototype.catch;s.catch!==u&&o(s,"catch",u,{unsafe:!0})}return mf}var yf={},wf;function Zp(){if(wf)return yf;wf=1;var t=Te(),e=He(),r=ct(),n=Tt(),a=br(),i=Hr(),o=Un();return t({target:"Promise",stat:!0,forced:o},{race:function(u){var l=this,c=n.f(l),f=c.reject,h=a(function(){var d=r(l.resolve);i(u,function(v){e(d,l,v).then(c.resolve,f)})});return h.error&&f(h.value),c.promise}}),yf}var bf={},Sf;function Yp(){if(Sf)return bf;Sf=1;var t=Te(),e=Tt(),r=Br().CONSTRUCTOR;return t({target:"Promise",stat:!0,forced:r},{reject:function(a){var i=e.f(this),o=i.reject;return o(a),i.promise}}),bf}var If={},ko,Pf;function Ah(){if(Pf)return ko;Pf=1;var t=st(),e=nt(),r=Tt();return ko=function(n,a){if(t(n),e(a)&&a.constructor===n)return a;var i=r.f(n),o=i.resolve;return o(a),i.promise},ko}var Ef;function Xp(){if(Ef)return If;Ef=1;var t=Te(),e=at(),r=pt(),n=Sr(),a=Br().CONSTRUCTOR,i=Ah(),o=e("Promise"),s=r&&!a;return t({target:"Promise",stat:!0,forced:r||a},{resolve:function(l){return i(s&&this===o?n:this,l)}}),If}var Rf;function Qp(){return Rf||(Rf=1,Gp(),Vp(),Jp(),Zp(),Yp(),Xp()),Bl}var _f={},Tf;function em(){if(Tf)return _f;Tf=1;var t=Te(),e=He(),r=ct(),n=Tt(),a=br(),i=Hr(),o=Un();return t({target:"Promise",stat:!0,forced:o},{allSettled:function(u){var l=this,c=n.f(l),f=c.resolve,h=c.reject,d=a(function(){var v=r(l.resolve),p=[],m=0,P=1;i(u,function(y){var b=m++,g=!1;P++,e(v,l,y).then(function(w){g||(g=!0,p[b]={status:"fulfilled",value:w},--P||f(p))},function(w){g||(g=!0,p[b]={status:"rejected",reason:w},--P||f(p))})}),--P||f(p)});return d.error&&h(d.value),c.promise}}),_f}var kf={},Of;function tm(){if(Of)return kf;Of=1;var t=Te(),e=He(),r=ct(),n=at(),a=Tt(),i=br(),o=Hr(),s=Un(),u="No one promise resolved";return t({target:"Promise",stat:!0,forced:s},{any:function(c){var f=this,h=n("AggregateError"),d=a.f(f),v=d.resolve,p=d.reject,m=i(function(){var P=r(f.resolve),y=[],b=0,g=1,w=!1;o(c,function(A){var x=b++,N=!1;g++,e(P,f,A).then(function(z){N||w||(w=!0,v(z))},function(z){N||w||(N=!0,y[x]=z,--g||p(new h(y,u)))})}),--g||p(new h(y,u))});return m.error&&p(m.value),d.promise}}),kf}var Cf={},Af;function Uh(){if(Af)return Cf;Af=1;var t=Te(),e=Se(),r=Th(),n=Cn(),a=Tt(),i=ct(),o=br(),s=e.Promise,u=!1,l=!s||!s.try||o(function(){s.try(function(c){u=c===8},8)}).error||!u;return t({target:"Promise",stat:!0,forced:l},{try:function(c){var f=arguments.length>1?n(arguments,1):[],h=a.f(this),d=o(function(){return r(i(c),void 0,f)});return(d.error?h.reject:h.resolve)(d.value),h.promise}}),Cf}var Uf={},jf;function jh(){if(jf)return Uf;jf=1;var t=Te(),e=Tt();return t({target:"Promise",stat:!0},{withResolvers:function(){var n=e.f(this);return{promise:n.promise,resolve:n.resolve,reject:n.reject}}}),Uf}var Lf={},Nf;function rm(){if(Nf)return Lf;Nf=1;var t=Te(),e=pt(),r=Sr(),n=$e(),a=at(),i=Pe(),o=_h(),s=Ah(),u=it(),l=r&&r.prototype,c=!!r&&n(function(){l.finally.call({then:function(){}},function(){})});if(t({target:"Promise",proto:!0,real:!0,forced:c},{finally:function(h){var d=o(this,a("Promise")),v=i(h);return this.then(v?function(p){return s(d,h()).then(function(){return p})}:h,v?function(p){return s(d,h()).then(function(){throw p})}:h)}}),!e&&i(r)){var f=a("Promise").prototype.finally;l.finally!==f&&u(l,"finally",f,{unsafe:!0})}return Lf}var Oo,qf;function nm(){if(qf)return Oo;qf=1,xp(),bs(),Dp(),Qp(),em(),tm(),Uh(),jh(),rm(),bh();var t=An();return Oo=t.Promise,Oo}var Co,xf;function am(){if(xf)return Co;xf=1;var t=nm();return Eh(),Co=t,Co}var $f={},Df;function im(){return Df||(Df=1,Uh()),$f}var Mf={},Ff;function om(){return Ff||(Ff=1,jh()),Mf}var Ao,Kf;function sm(){if(Kf)return Ao;Kf=1;var t=am();return im(),om(),Ao=t,Ao}sm();const Lh="sesamy-debug";function cm(t,e,r){const n=new Date;n.setTime(n.getTime()+r*60*60*1e3);const a="expires="+n.toUTCString();document.cookie=`${t}=${e}; ${a}; path=/`}function um(t){if(typeof document>"u")return null;const e=t+"=",r=document.cookie.split(";");for(let n=0;n<r.length;n++){let a=r[n];for(;a.charAt(0)===" ";)a=a.substring(1);if(a.indexOf(e)===0)return a.substring(e.length,a.length)}return null}function lm(t){cm(Lh,t.toString(),1)}function fm(){return um(Lh)==="true"}function pe(t){fm()&&console.log(t)}function jt(t,e){if(typeof window>"u")return;const r=new CustomEvent(t,{detail:e,bubbles:!0,composed:!0});pe(`Triggering event: ${t}`),dispatchEvent(r)}function vt(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function"){var a=0;for(n=Object.getOwnPropertySymbols(t);a<n.length;a++)e.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(t,n[a])&&(r[n[a]]=t[n[a]])}return r}var $t=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Rs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function _s(t,e){return t(e={exports:{}},e.exports),e.exports}var qt=_s((function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var r=(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})();e.default=function(){return r.getInstance()}}));Rs(qt);var dm=Rs(_s((function(t,e){var r=$t&&$t.__awaiter||function(c,f,h,d){return new(h||(h=Promise))((function(v,p){function m(b){try{y(d.next(b))}catch(g){p(g)}}function P(b){try{y(d.throw(b))}catch(g){p(g)}}function y(b){b.done?v(b.value):new h((function(g){g(b.value)})).then(m,P)}y((d=d.apply(c,f||[])).next())}))},n=$t&&$t.__generator||function(c,f){var h,d,v,p,m={label:0,sent:function(){if(1&v[0])throw v[1];return v[1]},trys:[],ops:[]};return p={next:P(0),throw:P(1),return:P(2)},typeof Symbol=="function"&&(p[Symbol.iterator]=function(){return this}),p;function P(y){return function(b){return(function(g){if(h)throw new TypeError("Generator is already executing.");for(;m;)try{if(h=1,d&&(v=2&g[0]?d.return:g[0]?d.throw||((v=d.return)&&v.call(d),0):d.next)&&!(v=v.call(d,g[1])).done)return v;switch(d=0,v&&(g=[2&g[0],v.value]),g[0]){case 0:case 1:v=g;break;case 4:return m.label++,{value:g[1],done:!1};case 5:m.label++,d=g[1],g=[0];continue;case 7:g=m.ops.pop(),m.trys.pop();continue;default:if(v=m.trys,!((v=v.length>0&&v[v.length-1])||g[0]!==6&&g[0]!==2)){m=0;continue}if(g[0]===3&&(!v||g[1]>v[0]&&g[1]<v[3])){m.label=g[1];break}if(g[0]===6&&m.label<v[1]){m.label=v[1],v=g;break}if(v&&m.label<v[2]){m.label=v[2],m.ops.push(g);break}v[2]&&m.ops.pop(),m.trys.pop();continue}g=f.call(c,m)}catch(w){g=[6,w],d=0}finally{h=v=0}if(5&g[0])throw g[1];return{value:g[0]?g[1]:void 0,done:!0}})([y,b])}}},a=$t;Object.defineProperty(e,"__esModule",{value:!0});var i="browser-tabs-lock-key",o={key:function(c){return r(a,void 0,void 0,(function(){return n(this,(function(f){throw new Error("Unsupported")}))}))},getItem:function(c){return r(a,void 0,void 0,(function(){return n(this,(function(f){throw new Error("Unsupported")}))}))},clear:function(){return r(a,void 0,void 0,(function(){return n(this,(function(c){return[2,window.localStorage.clear()]}))}))},removeItem:function(c){return r(a,void 0,void 0,(function(){return n(this,(function(f){throw new Error("Unsupported")}))}))},setItem:function(c,f){return r(a,void 0,void 0,(function(){return n(this,(function(h){throw new Error("Unsupported")}))}))},keySync:function(c){return window.localStorage.key(c)},getItemSync:function(c){return window.localStorage.getItem(c)},clearSync:function(){return window.localStorage.clear()},removeItemSync:function(c){return window.localStorage.removeItem(c)},setItemSync:function(c,f){return window.localStorage.setItem(c,f)}};function s(c){return new Promise((function(f){return setTimeout(f,c)}))}function u(c){for(var f="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",h="",d=0;d<c;d++)h+=f[Math.floor(Math.random()*f.length)];return h}var l=(function(){function c(f){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+u(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,c.waiters===void 0&&(c.waiters=[])}return c.prototype.acquireLock=function(f,h){return h===void 0&&(h=5e3),r(this,void 0,void 0,(function(){var d,v,p,m,P,y,b;return n(this,(function(g){switch(g.label){case 0:d=Date.now()+u(4),v=Date.now()+h,p=i+"-"+f,m=this.storageHandler===void 0?o:this.storageHandler,g.label=1;case 1:return Date.now()<v?[4,s(30)]:[3,8];case 2:return g.sent(),m.getItemSync(p)!==null?[3,5]:(P=this.id+"-"+f+"-"+d,[4,s(Math.floor(25*Math.random()))]);case 3:return g.sent(),m.setItemSync(p,JSON.stringify({id:this.id,iat:d,timeoutKey:P,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,s(30)];case 4:return g.sent(),(y=m.getItemSync(p))!==null&&(b=JSON.parse(y)).id===this.id&&b.iat===d?(this.acquiredIatSet.add(d),this.refreshLockWhileAcquired(p,d),[2,!0]):[3,7];case 5:return c.lockCorrector(this.storageHandler===void 0?o:this.storageHandler),[4,this.waitForSomethingToChange(v)];case 6:g.sent(),g.label=7;case 7:return d=Date.now()+u(4),[3,1];case 8:return[2,!1]}}))}))},c.prototype.refreshLockWhileAcquired=function(f,h){return r(this,void 0,void 0,(function(){var d=this;return n(this,(function(v){return setTimeout((function(){return r(d,void 0,void 0,(function(){var p,m,P;return n(this,(function(y){switch(y.label){case 0:return[4,qt.default().lock(h)];case 1:return y.sent(),this.acquiredIatSet.has(h)?(p=this.storageHandler===void 0?o:this.storageHandler,(m=p.getItemSync(f))===null?(qt.default().unlock(h),[2]):((P=JSON.parse(m)).timeRefreshed=Date.now(),p.setItemSync(f,JSON.stringify(P)),qt.default().unlock(h),this.refreshLockWhileAcquired(f,h),[2])):(qt.default().unlock(h),[2])}}))}))}),1e3),[2]}))}))},c.prototype.waitForSomethingToChange=function(f){return r(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,p=Date.now(),m=!1;function P(){if(m||(window.removeEventListener("storage",P),c.removeFromWaiting(P),clearTimeout(y),m=!0),!v){v=!0;var b=50-(Date.now()-p);b>0?setTimeout(d,b):d(null)}}window.addEventListener("storage",P),c.addToWaiting(P);var y=setTimeout(P,Math.max(0,f-Date.now()))}))];case 1:return h.sent(),[2]}}))}))},c.addToWaiting=function(f){this.removeFromWaiting(f),c.waiters!==void 0&&c.waiters.push(f)},c.removeFromWaiting=function(f){c.waiters!==void 0&&(c.waiters=c.waiters.filter((function(h){return h!==f})))},c.notifyWaiters=function(){c.waiters!==void 0&&c.waiters.slice().forEach((function(f){return f()}))},c.prototype.releaseLock=function(f){return r(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()]}}))}))},c.prototype.releaseLock__private__=function(f){return r(this,void 0,void 0,(function(){var h,d,v,p;return n(this,(function(m){switch(m.label){case 0:return h=this.storageHandler===void 0?o:this.storageHandler,d=i+"-"+f,(v=h.getItemSync(d))===null?[2]:(p=JSON.parse(v)).id!==this.id?[3,2]:[4,qt.default().lock(p.iat)];case 1:m.sent(),this.acquiredIatSet.delete(p.iat),h.removeItemSync(d),qt.default().unlock(p.iat),c.notifyWaiters(),m.label=2;case 2:return[2]}}))}))},c.lockCorrector=function(f){for(var h=Date.now()-5e3,d=f,v=[],p=0;;){var m=d.keySync(p);if(m===null)break;v.push(m),p++}for(var P=!1,y=0;y<v.length;y++){var b=v[y];if(b.includes(i)){var g=d.getItemSync(b);if(g!==null){var w=JSON.parse(g);(w.timeRefreshed===void 0&&w.timeAcquired<h||w.timeRefreshed!==void 0&&w.timeRefreshed<h)&&(d.removeItemSync(b),P=!0)}}}P&&c.notifyWaiters()},c.waiters=void 0,c})();e.default=l})));const hm={timeoutInSeconds:60},Nh={name:"auth0-spa-js",version:"2.8.0"},qh=()=>Date.now();let Ae=class Bo extends Error{constructor(e,r){super(r),this.error=e,this.error_description=r,Object.setPrototypeOf(this,Bo.prototype)}static fromPayload({error:e,error_description:r}){return new Bo(e,r)}},vm=class xh extends Ae{constructor(e,r,n,a=null){super(e,r),this.state=n,this.appState=a,Object.setPrototypeOf(this,xh.prototype)}},pm=class $h extends Ae{constructor(e,r,n,a,i=null){super(e,r),this.connection=n,this.state=a,this.appState=i,Object.setPrototypeOf(this,$h.prototype)}},Go=class Dh extends Ae{constructor(){super("timeout","Timeout"),Object.setPrototypeOf(this,Dh.prototype)}};class Ts extends Go{constructor(e){super(),this.popup=e,Object.setPrototypeOf(this,Ts.prototype)}}let mm=class Mh extends Ae{constructor(e){super("cancelled","Popup closed"),this.popup=e,Object.setPrototypeOf(this,Mh.prototype)}},gm=class Fh extends Ae{constructor(e,r,n){super(e,r),this.mfa_token=n,Object.setPrototypeOf(this,Fh.prototype)}},Kh=class zh extends Ae{constructor(e,r){super("missing_refresh_token",`Missing Refresh Token (audience: '${cn(e,["default"])}', scope: '${cn(r)}')`),this.audience=e,this.scope=r,Object.setPrototypeOf(this,zh.prototype)}},ym=class Hh extends Ae{constructor(e,r){super("missing_scopes",`Missing requested scopes after refresh (audience: '${cn(e,["default"])}', missing scope: '${cn(r)}')`),this.audience=e,this.scope=r,Object.setPrototypeOf(this,Hh.prototype)}},Bh=class Gh extends Ae{constructor(e){super("use_dpop_nonce","Server rejected DPoP proof: wrong nonce"),this.newDpopNonce=e,Object.setPrototypeOf(this,Gh.prototype)}};function cn(t,e=[]){return t&&!e.includes(t)?t:""}const un=()=>window.crypto,_r=()=>{const t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.";let e="";return Array.from(un().getRandomValues(new Uint8Array(43))).forEach((r=>e+=t[r%t.length])),e},Uo=t=>btoa(t),wm=[{key:"name",type:["string"]},{key:"version",type:["string","number"]},{key:"env",type:["object"]}],bm=t=>Object.keys(t).reduce(((e,r)=>{const n=wm.find((a=>a.key===r));return n&&n.type.includes(typeof t[r])&&(e[r]=t[r]),e}),{}),Wo=t=>{var{clientId:e}=t,r=vt(t,["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:e},r))).toString()},zf=async t=>await un().subtle.digest({name:"SHA-256"},new TextEncoder().encode(t)),Hf=t=>(e=>decodeURIComponent(atob(e).split("").map((r=>"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2))).join("")))(t.replace(/_/g,"/").replace(/-/g,"+")),Bf=t=>{const e=new Uint8Array(t);return(r=>{const n={"+":"-","/":"_","=":""};return r.replace(/[+/=]/g,(a=>n[a]))})(window.btoa(String.fromCharCode(...Array.from(e))))},Sm=new TextEncoder,Im=new TextDecoder;function Ur(t){return typeof t=="string"?Sm.encode(t):Im.decode(t)}function Gf(t){if(typeof t.modulusLength!="number"||t.modulusLength<2048)throw new Em(`${t.name} modulusLength must be at least 2048 bits`)}async function Pm(t,e,r){if(r.usages.includes("sign")===!1)throw new TypeError('private CryptoKey instances used for signing assertions must include "sign" in their "usages"');const n=`${jr(Ur(JSON.stringify(t)))}.${jr(Ur(JSON.stringify(e)))}`;return`${n}.${jr(await crypto.subtle.sign((function(a){switch(a.algorithm.name){case"ECDSA":return{name:a.algorithm.name,hash:"SHA-256"};case"RSA-PSS":return Gf(a.algorithm),{name:a.algorithm.name,saltLength:32};case"RSASSA-PKCS1-v1_5":return Gf(a.algorithm),{name:a.algorithm.name};case"Ed25519":return{name:a.algorithm.name}}throw new Ft})(r),r,Ur(n)))}`}let Vo;Uint8Array.prototype.toBase64?Vo=t=>(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),t.toBase64({alphabet:"base64url",omitPadding:!0})):Vo=e=>{e instanceof ArrayBuffer&&(e=new Uint8Array(e));const r=[];for(let n=0;n<e.byteLength;n+=32768)r.push(String.fromCharCode.apply(null,e.subarray(n,n+32768)));return btoa(r.join("")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")};function jr(t){return Vo(t)}let Ft=class extends Error{constructor(e){var r;super(e??"operation not supported"),this.name=this.constructor.name,(r=Error.captureStackTrace)===null||r===void 0||r.call(Error,this,this.constructor)}},Em=class extends Error{constructor(e){var r;super(e),this.name=this.constructor.name,(r=Error.captureStackTrace)===null||r===void 0||r.call(Error,this,this.constructor)}};function Rm(t){switch(t.algorithm.name){case"RSA-PSS":return(function(e){if(e.algorithm.hash.name==="SHA-256")return"PS256";throw new Ft("unsupported RsaHashedKeyAlgorithm hash name")})(t);case"RSASSA-PKCS1-v1_5":return(function(e){if(e.algorithm.hash.name==="SHA-256")return"RS256";throw new Ft("unsupported RsaHashedKeyAlgorithm hash name")})(t);case"ECDSA":return(function(e){if(e.algorithm.namedCurve==="P-256")return"ES256";throw new Ft("unsupported EcKeyAlgorithm namedCurve")})(t);case"Ed25519":return"Ed25519";default:throw new Ft("unsupported CryptoKey algorithm name")}}function Wh(t){return t instanceof CryptoKey}function Vh(t){return Wh(t)&&t.type==="public"}async function _m(t,e,r,n,a,i){const o=t?.privateKey,s=t?.publicKey;if(!Wh(u=o)||u.type!=="private")throw new TypeError('"keypair.privateKey" must be a private CryptoKey');var u;if(!Vh(s))throw new TypeError('"keypair.publicKey" must be a public CryptoKey');if(s.extractable!==!0)throw new TypeError('"keypair.publicKey.extractable" must be true');if(typeof e!="string")throw new TypeError('"htu" must be a string');if(typeof r!="string")throw new TypeError('"htm" must be a string');if(n!==void 0&&typeof n!="string")throw new TypeError('"nonce" must be a string or undefined');if(a!==void 0&&typeof a!="string")throw new TypeError('"accessToken" must be a string or undefined');return Pm({alg:Rm(o),typ:"dpop+jwt",jwk:await Jh(s)},Object.assign(Object.assign({},i),{iat:Math.floor(Date.now()/1e3),jti:crypto.randomUUID(),htm:r,nonce:n,htu:e,ath:a?jr(await crypto.subtle.digest("SHA-256",Ur(a))):void 0}),o)}async function Jh(t){const{kty:e,e:r,n,x:a,y:i,crv:o}=await crypto.subtle.exportKey("jwk",t);return{kty:e,crv:o,e:r,n,x:a,y:i}}const Tm=["authorization_code","refresh_token","urn:ietf:params:oauth:grant-type:token-exchange"];function km(){return(async function(t,e){var r;let n;if(t.length===0)throw new TypeError('"alg" must be a non-empty string');switch(t){case"PS256":n={name:"RSA-PSS",hash:"SHA-256",modulusLength:2048,publicExponent:new Uint8Array([1,0,1])};break;case"RS256":n={name:"RSASSA-PKCS1-v1_5",hash:"SHA-256",modulusLength:2048,publicExponent:new Uint8Array([1,0,1])};break;case"ES256":n={name:"ECDSA",namedCurve:"P-256"};break;case"Ed25519":n={name:"Ed25519"};break;default:throw new Ft}return crypto.subtle.generateKey(n,(r=e?.extractable)!==null&&r!==void 0&&r,["sign","verify"])})("ES256",{extractable:!1})}function Om(t){return(async function(e){if(!Vh(e))throw new TypeError('"publicKey" must be a public CryptoKey');if(e.extractable!==!0)throw new TypeError('"publicKey.extractable" must be true');const r=await Jh(e);let n;switch(r.kty){case"EC":n={crv:r.crv,kty:r.kty,x:r.x,y:r.y};break;case"OKP":n={crv:r.crv,kty:r.kty,x:r.x};break;case"RSA":n={e:r.e,kty:r.kty,n:r.n};break;default:throw new Ft("unsupported JWK kty")}return jr(await crypto.subtle.digest({name:"SHA-256"},Ur(JSON.stringify(n))))})(t.publicKey)}function Cm({keyPair:t,url:e,method:r,nonce:n,accessToken:a}){const i=(function(o){const s=new URL(o);return s.search="",s.hash="",s.href})(e);return _m(t,i,r,n,a)}const Am=async(t,e)=>{const r=await fetch(t,e);return{ok:r.ok,json:await r.json(),headers:(n=r.headers,[...n].reduce(((a,[i,o])=>(a[i]=o,a)),{}))};var n},Um=async(t,e,r)=>{const n=new AbortController;let a;return e.signal=n.signal,Promise.race([Am(t,e),new Promise(((i,o)=>{a=setTimeout((()=>{n.abort(),o(new Error("Timeout when executing 'fetch'"))}),r)}))]).finally((()=>{clearTimeout(a)}))},jm=async(t,e,r,n,a,i,o,s)=>{return u={auth:{audience:e,scope:r},timeout:a,fetchUrl:t,fetchOptions:n,useFormData:o,useMrrt:s},l=i,new Promise((function(c,f){const h=new MessageChannel;h.port1.onmessage=function(d){d.data.error?f(new Error(d.data.error)):c(d.data),h.port1.close()},l.postMessage(u,[h.port2])}));var u,l},Lm=async(t,e,r,n,a,i,o=1e4,s)=>a?jm(t,e,r,n,o,a,i,s):Um(t,n,o);async function Zh(t,e,r,n,a,i,o,s,u,l){if(u){const b=await u.generateProof({url:t,method:a.method||"GET",nonce:await u.getNonce()});a.headers=Object.assign(Object.assign({},a.headers),{dpop:b})}let c,f=null;for(let b=0;b<3;b++)try{c=await Lm(t,r,n,a,i,o,e,s),f=null;break}catch(g){f=g}if(f)throw f;const h=c.json,{error:d,error_description:v}=h,p=vt(h,["error","error_description"]),{headers:m,ok:P}=c;let y;if(u&&(y=m["dpop-nonce"],y&&await u.setNonce(y)),!P){const b=v||`HTTP error. Unable to fetch ${t}`;if(d==="mfa_required")throw new gm(d,b,p.mfa_token);if(d==="missing_refresh_token")throw new Kh(r,n);if(d==="use_dpop_nonce"){if(!u||!y||l)throw new Bh(y);return Zh(t,e,r,n,a,i,o,s,u,!0)}throw new Ae(d||"request_error",b)}return p}async function Nm(t,e){var{baseUrl:r,timeout:n,audience:a,scope:i,auth0Client:o,useFormData:s,useMrrt:u,dpop:l}=t,c=vt(t,["baseUrl","timeout","audience","scope","auth0Client","useFormData","useMrrt","dpop"]);const f=c.grant_type==="urn:ietf:params:oauth:grant-type:token-exchange",h=c.grant_type==="refresh_token"&&u,d=Object.assign(Object.assign(Object.assign(Object.assign({},c),f&&a&&{audience:a}),f&&i&&{scope:i}),h&&{audience:a,scope:i}),v=s?Wo(d):JSON.stringify(d),p=(m=c.grant_type,Tm.includes(m));var m;return await Zh(`${r}/oauth/token`,n,a||"default",i,{method:"POST",body:v,headers:{"Content-Type":s?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(bm(o||Nh)))}},e,s,u,p?l:void 0)}const tn=(...t)=>{return(e=t.filter(Boolean).join(" ").trim().split(/\s+/),Array.from(new Set(e))).join(" ");var e},Wr=(t,e,r)=>{let n;return r&&(n=t[r]),n||(n=t.default),tn(n,e)};let St=class Jo{constructor(e,r="@@auth0spajs@@",n){this.prefix=r,this.suffix=n,this.clientId=e.clientId,this.scope=e.scope,this.audience=e.audience}toKey(){return[this.prefix,this.clientId,this.audience,this.scope,this.suffix].filter(Boolean).join("::")}static fromKey(e){const[r,n,a,i]=e.split("::");return new Jo({clientId:n,scope:i,audience:a},r)}static fromCacheEntry(e){const{scope:r,audience:n,client_id:a}=e;return new Jo({scope:r,audience:n,clientId:a})}},qm=class{set(e,r){localStorage.setItem(e,JSON.stringify(r))}get(e){const r=window.localStorage.getItem(e);if(r)try{return JSON.parse(r)}catch{return}}remove(e){localStorage.removeItem(e)}allKeys(){return Object.keys(window.localStorage).filter((e=>e.startsWith("@@auth0spajs@@")))}},Yh=class{constructor(){this.enclosedCache=(function(){let e={};return{set(r,n){e[r]=n},get(r){const n=e[r];if(n)return n},remove(r){delete e[r]},allKeys:()=>Object.keys(e)}})()}},xm=class{constructor(e,r,n){this.cache=e,this.keyManifest=r,this.nowProvider=n||qh}async setIdToken(e,r,n){var a;const i=this.getIdTokenCacheKey(e);await this.cache.set(i,{id_token:r,decodedToken:n}),await((a=this.keyManifest)===null||a===void 0?void 0:a.add(i))}async getIdToken(e){const r=await this.cache.get(this.getIdTokenCacheKey(e.clientId));if(!r&&e.scope&&e.audience){const n=await this.get(e);return!n||!n.id_token||!n.decodedToken?void 0:{id_token:n.id_token,decodedToken:n.decodedToken}}if(r)return{id_token:r.id_token,decodedToken:r.decodedToken}}async get(e,r=0,n=!1,a){var i;let o=await this.cache.get(e.toKey());if(!o){const l=await this.getCacheKeys();if(!l)return;const c=this.matchExistingCacheKey(e,l);if(c&&(o=await this.cache.get(c)),!c&&n&&a!=="cache-only")return this.getEntryWithRefreshToken(e,l)}if(!o)return;const s=await this.nowProvider(),u=Math.floor(s/1e3);return o.expiresAt-r<u?o.body.refresh_token?this.modifiedCachedEntry(o,e):(await this.cache.remove(e.toKey()),void await((i=this.keyManifest)===null||i===void 0?void 0:i.remove(e.toKey()))):o.body}async modifiedCachedEntry(e,r){return e.body={refresh_token:e.body.refresh_token,audience:e.body.audience,scope:e.body.scope},await this.cache.set(r.toKey(),e),{refresh_token:e.body.refresh_token,audience:e.body.audience,scope:e.body.scope}}async set(e){var r;const n=new St({clientId:e.client_id,scope:e.scope,audience:e.audience}),a=await this.wrapCacheEntry(e);await this.cache.set(n.toKey(),a),await((r=this.keyManifest)===null||r===void 0?void 0:r.add(n.toKey()))}async remove(e,r,n){const a=new St({clientId:e,scope:n,audience:r});await this.cache.remove(a.toKey())}async clear(e){var r;const n=await this.getCacheKeys();n&&(await n.filter((a=>!e||a.includes(e))).reduce((async(a,i)=>{await a,await this.cache.remove(i)}),Promise.resolve()),await((r=this.keyManifest)===null||r===void 0?void 0:r.clear()))}async wrapCacheEntry(e){const r=await this.nowProvider();return{body:e,expiresAt:Math.floor(r/1e3)+e.expires_in}}async getCacheKeys(){var e;return this.keyManifest?(e=await this.keyManifest.get())===null||e===void 0?void 0:e.keys:this.cache.allKeys?this.cache.allKeys():void 0}getIdTokenCacheKey(e){return new St({clientId:e},"@@auth0spajs@@","@@user@@").toKey()}matchExistingCacheKey(e,r){return r.filter((n=>{var a;const i=St.fromKey(n),o=new Set(i.scope&&i.scope.split(" ")),s=((a=e.scope)===null||a===void 0?void 0:a.split(" "))||[],u=i.scope&&s.reduce(((l,c)=>l&&o.has(c)),!0);return i.prefix==="@@auth0spajs@@"&&i.clientId===e.clientId&&i.audience===e.audience&&u}))[0]}async getEntryWithRefreshToken(e,r){var n;for(const a of r){const i=St.fromKey(a);if(i.prefix==="@@auth0spajs@@"&&i.clientId===e.clientId){const o=await this.cache.get(a);if(!((n=o?.body)===null||n===void 0)&&n.refresh_token)return this.modifiedCachedEntry(o,e)}}}async updateEntry(e,r){var n;const a=await this.getCacheKeys();if(a)for(const i of a){const o=await this.cache.get(i);if(((n=o?.body)===null||n===void 0?void 0:n.refresh_token)===e){const s=Object.assign(Object.assign({},o.body),{refresh_token:r});await this.set(s)}}}},$m=class{constructor(e,r,n){this.storage=e,this.clientId=r,this.cookieDomain=n,this.storageKey=`a0.spajs.txs.${this.clientId}`}create(e){this.storage.save(this.storageKey,e,{daysUntilExpire:1,cookieDomain:this.cookieDomain})}get(){return this.storage.get(this.storageKey)}remove(){this.storage.remove(this.storageKey,{cookieDomain:this.cookieDomain})}};const Tr=t=>typeof t=="number",Dm=["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"],Mm=t=>{if(!t.id_token)throw new Error("ID token is required but missing");const e=(i=>{const o=i.split("."),[s,u,l]=o;if(o.length!==3||!s||!u||!l)throw new Error("ID token could not be decoded");const c=JSON.parse(Hf(u)),f={__raw:i},h={};return Object.keys(c).forEach((d=>{f[d]=c[d],Dm.includes(d)||(h[d]=c[d])})),{encoded:{header:s,payload:u,signature:l},header:JSON.parse(Hf(s)),claims:f,user:h}})(t.id_token);if(!e.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(e.claims.iss!==t.iss)throw new Error(`Issuer (iss) claim mismatch in the ID token; expected "${t.iss}", found "${e.claims.iss}"`);if(!e.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if(e.header.alg!=="RS256")throw new Error(`Signature algorithm of "${e.header.alg}" is not supported. Expected the ID token to be signed with "RS256".`);if(!e.claims.aud||typeof e.claims.aud!="string"&&!Array.isArray(e.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(e.claims.aud)){if(!e.claims.aud.includes(t.aud))throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${t.aud}" but was not one of "${e.claims.aud.join(", ")}"`);if(e.claims.aud.length>1){if(!e.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(e.claims.azp!==t.aud)throw new Error(`Authorized Party (azp) claim mismatch in the ID token; expected "${t.aud}", found "${e.claims.azp}"`)}}else if(e.claims.aud!==t.aud)throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${t.aud}" but found "${e.claims.aud}"`);if(t.nonce){if(!e.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(e.claims.nonce!==t.nonce)throw new Error(`Nonce (nonce) claim mismatch in the ID token; expected "${t.nonce}", found "${e.claims.nonce}"`)}if(t.max_age&&!Tr(e.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(e.claims.exp==null||!Tr(e.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!Tr(e.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");const r=t.leeway||60,n=new Date(t.now||Date.now()),a=new Date(0);if(a.setUTCSeconds(e.claims.exp+r),n>a)throw new Error(`Expiration Time (exp) claim error in the ID token; current time (${n}) is after expiration time (${a})`);if(e.claims.nbf!=null&&Tr(e.claims.nbf)){const i=new Date(0);if(i.setUTCSeconds(e.claims.nbf-r),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(e.claims.auth_time!=null&&Tr(e.claims.auth_time)){const i=new Date(0);if(i.setUTCSeconds(parseInt(e.claims.auth_time)+t.max_age+r),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(t.organization){const i=t.organization.trim();if(i.startsWith("org_")){const o=i;if(!e.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(o!==e.claims.org_id)throw new Error(`Organization ID (org_id) claim mismatch in the ID token; expected "${o}", found "${e.claims.org_id}"`)}else{const o=i.toLowerCase();if(!e.claims.org_name)throw new Error("Organization Name (org_name) claim must be a string present in the ID token");if(o!==e.claims.org_name)throw new Error(`Organization Name (org_name) claim mismatch in the ID token; expected "${o}", found "${e.claims.org_name}"`)}}return e};var Kt=_s((function(t,e){var r=$t&&$t.__assign||function(){return r=Object.assign||function(u){for(var l,c=1,f=arguments.length;c<f;c++)for(var h in l=arguments[c])Object.prototype.hasOwnProperty.call(l,h)&&(u[h]=l[h]);return u},r.apply(this,arguments)};function n(u,l){if(!l)return"";var c="; "+u;return l===!0?c:c+"="+l}function a(u,l,c){return encodeURIComponent(u).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)})(c)}function i(u){for(var l={},c=u?u.split("; "):[],f=/(%[\dA-F]{2})+/gi,h=0;h<c.length;h++){var d=c[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(u,l,c){document.cookie=a(u,l,r({path:"/"},c))}e.__esModule=!0,e.encode=a,e.parse=i,e.getAll=o,e.get=function(u){return o()[u]},e.set=s,e.remove=function(u,l){s(u,"",r(r({},l),{expires:-1}))}}));Rs(Kt),Kt.encode,Kt.parse,Kt.getAll;var Fm=Kt.get,Xh=Kt.set,Qh=Kt.remove;const ar={get(t){const e=Fm(t);if(e!==void 0)return JSON.parse(e)},save(t,e,r){let n={};window.location.protocol==="https:"&&(n={secure:!0,sameSite:"none"}),r?.daysUntilExpire&&(n.expires=r.daysUntilExpire),r?.cookieDomain&&(n.domain=r.cookieDomain),Xh(t,JSON.stringify(e),n)},remove(t,e){let r={};e?.cookieDomain&&(r.domain=e.cookieDomain),Qh(t,r)}},Km={get(t){return ar.get(t)||ar.get(`_legacy_${t}`)},save(t,e,r){let n={};window.location.protocol==="https:"&&(n={secure:!0}),r?.daysUntilExpire&&(n.expires=r.daysUntilExpire),r?.cookieDomain&&(n.domain=r.cookieDomain),Xh(`_legacy_${t}`,JSON.stringify(e),n),ar.save(t,e,r)},remove(t,e){let r={};e?.cookieDomain&&(r.domain=e.cookieDomain),Qh(t,r),ar.remove(t,e),ar.remove(`_legacy_${t}`,e)}},zm={get(t){if(typeof sessionStorage>"u")return;const e=sessionStorage.getItem(t);return e!=null?JSON.parse(e):void 0},save(t,e){sessionStorage.setItem(t,JSON.stringify(e))},remove(t){sessionStorage.removeItem(t)}};var Dt;(function(t){t.Code="code",t.ConnectCode="connect_code"})(Dt||(Dt={}));function Hm(t,e,r){var n=e===void 0?null:e,a=(function(u,l){var c=atob(u);if(l){for(var f=new Uint8Array(c.length),h=0,d=c.length;h<d;++h)f[h]=c.charCodeAt(h);return String.fromCharCode.apply(null,new Uint16Array(f.buffer))}return c})(t,r!==void 0&&r),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 Wf,Vf,Jf,jo,Bm=(Wf="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+YCR7ZX18JHt0fWA7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jKHtkYXRhOnt0aW1lb3V0OmUsYXV0aDpyLGZldGNoVXJsOmksZmV0Y2hPcHRpb25zOmMsdXNlRm9ybURhdGE6YSx1c2VNcnJ0OmZ9LHBvcnRzOltwXX0pPT57bGV0IGgsdSxsPXt9O2NvbnN0e2F1ZGllbmNlOmQsc2NvcGU6eX09cnx8e307dHJ5e2NvbnN0IHI9YT8oZT0+e2NvbnN0IHQ9bmV3IFVSTFNlYXJjaFBhcmFtcyhlKSxyPXt9O3JldHVybiB0LmZvckVhY2goKChlLHQpPT57clt0XT1lfSkpLHJ9KShjLmJvZHkpOkpTT04ucGFyc2UoYy5ib2R5KTtpZighci5yZWZyZXNoX3Rva2VuJiYicmVmcmVzaF90b2tlbiI9PT1yLmdyYW50X3R5cGUpe2lmKHU9KChlLHQpPT5vW24oZSx0KV0pKGQseSksIXUmJmYpe2NvbnN0IGU9by5sYXRlc3RfcmVmcmVzaF90b2tlbix0PSgoZSx0KT0+e2NvbnN0IHI9T2JqZWN0LmtleXMobykuZmluZCgocj0+e2lmKCJsYXRlc3RfcmVmcmVzaF90b2tlbiIhPT1yKXtjb25zdCBzPSgoZSx0KT0+dC5zdGFydHNXaXRoKGAke2V9fGApKSh0LHIpLG89ci5zcGxpdCgifCIpWzFdLnNwbGl0KCIgIiksbj1lLnNwbGl0KCIgIikuZXZlcnkoKGU9Pm8uaW5jbHVkZXMoZSkpKTtyZXR1cm4gcyYmbn19KSk7cmV0dXJuISFyfSkoeSxkKTtlJiYhdCYmKHU9ZSl9aWYoIXUpdGhyb3cgbmV3IHQoZCx5KTtjLmJvZHk9YT9zKE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxyKSx7cmVmcmVzaF90b2tlbjp1fSkpOkpTT04uc3RyaW5naWZ5KE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxyKSx7cmVmcmVzaF90b2tlbjp1fSkpfWxldCBqLGs7ImZ1bmN0aW9uIj09dHlwZW9mIEFib3J0Q29udHJvbGxlciYmKGo9bmV3IEFib3J0Q29udHJvbGxlcixjLnNpZ25hbD1qLnNpZ25hbCk7dHJ5e2s9YXdhaXQgUHJvbWlzZS5yYWNlKFsoXz1lLG5ldyBQcm9taXNlKChlPT5zZXRUaW1lb3V0KGUsXykpKSksZmV0Y2goaSxPYmplY3QuYXNzaWduKHt9LGMpKV0pfWNhdGNoKGUpe3JldHVybiB2b2lkIHAucG9zdE1lc3NhZ2Uoe2Vycm9yOmUubWVzc2FnZX0pfWlmKCFrKXJldHVybiBqJiZqLmFib3J0KCksdm9pZCBwLnBvc3RNZXNzYWdlKHtlcnJvcjoiVGltZW91dCB3aGVuIGV4ZWN1dGluZyAnZmV0Y2gnIn0pO2c9ay5oZWFkZXJzLGw9Wy4uLmddLnJlZHVjZSgoKGUsW3Qscl0pPT4oZVt0XT1yLGUpKSx7fSksaD1hd2FpdCBrLmpzb24oKSxoLnJlZnJlc2hfdG9rZW4/KGYmJihvLmxhdGVzdF9yZWZyZXNoX3Rva2VuPWgucmVmcmVzaF90b2tlbixPPXUsYj1oLnJlZnJlc2hfdG9rZW4sT2JqZWN0LmVudHJpZXMobykuZm9yRWFjaCgoKFtlLHRdKT0+e3Q9PT1PJiYob1tlXT1iKX0pKSksKChlLHQscik9PntvW24odCxyKV09ZX0pKGgucmVmcmVzaF90b2tlbixkLHkpLGRlbGV0ZSBoLnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBvW24oZSx0KV19KShkLHkpLHAucG9zdE1lc3NhZ2Uoe29rOmsub2ssanNvbjpoLGhlYWRlcnM6bH0pfWNhdGNoKGUpe3AucG9zdE1lc3NhZ2Uoe29rOiExLGpzb246e2Vycm9yOmUuZXJyb3IsZXJyb3JfZGVzY3JpcHRpb246ZS5tZXNzYWdlfSxoZWFkZXJzOmx9KX12YXIgTyxiLGcsX30pKX0oKTsKCg==",Vf=null,Jf=!1,function(t){return jo=jo||Hm(Wf,Vf,Jf),new Worker(jo,t)});const Lo={};let Gm=class{constructor(e,r){this.cache=e,this.clientId=r,this.manifestKey=this.createManifestKeyFrom(this.clientId)}async add(e){var r;const n=new Set(((r=await this.cache.get(this.manifestKey))===null||r===void 0?void 0:r.keys)||[]);n.add(e),await this.cache.set(this.manifestKey,{keys:[...n]})}async remove(e){const r=await this.cache.get(this.manifestKey);if(r){const n=new Set(r.keys);return n.delete(e),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(e){return`@@auth0spajs@@::${e}`}};const Wm={memory:()=>new Yh().enclosedCache,localstorage:()=>new qm},Zf=t=>Wm[t],Yf=t=>{const{openUrl:e,onRedirect:r}=t,n=vt(t,["openUrl","onRedirect"]);return Object.assign(Object.assign({},n),{openUrl:e===!1||e?e:r})},Xf=(t,e)=>{const r=e?.split(" ")||[];return(t?.split(" ")||[]).every((n=>r.includes(n)))},Nt={NONCE:"nonce",KEYPAIR:"keypair"};let Vm=class{constructor(e){this.clientId=e}getVersion(){return 1}createDbHandle(){const e=window.indexedDB.open("auth0-spa-js",this.getVersion());return new Promise(((r,n)=>{e.onupgradeneeded=()=>Object.values(Nt).forEach((a=>e.result.createObjectStore(a))),e.onerror=()=>n(e.error),e.onsuccess=()=>r(e.result)}))}async getDbHandle(){return this.dbHandle||(this.dbHandle=await this.createDbHandle()),this.dbHandle}async executeDbRequest(e,r,n){const a=n((await this.getDbHandle()).transaction(e,r).objectStore(e));return new Promise(((i,o)=>{a.onsuccess=()=>i(a.result),a.onerror=()=>o(a.error)}))}buildKey(e){const r=e?`_${e}`:"auth0";return`${this.clientId}::${r}`}setNonce(e,r){return this.save(Nt.NONCE,this.buildKey(r),e)}setKeyPair(e){return this.save(Nt.KEYPAIR,this.buildKey(),e)}async save(e,r,n){await this.executeDbRequest(e,"readwrite",(a=>a.put(n,r)))}findNonce(e){return this.find(Nt.NONCE,this.buildKey(e))}findKeyPair(){return this.find(Nt.KEYPAIR,this.buildKey())}find(e,r){return this.executeDbRequest(e,"readonly",(n=>n.get(r)))}async deleteBy(e,r){const n=await this.executeDbRequest(e,"readonly",(a=>a.getAllKeys()));n?.filter(r).map((a=>this.executeDbRequest(e,"readwrite",(i=>i.delete(a)))))}deleteByClientId(e,r){return this.deleteBy(e,(n=>typeof n=="string"&&n.startsWith(`${r}::`)))}clearNonces(){return this.deleteByClientId(Nt.NONCE,this.clientId)}clearKeyPairs(){return this.deleteByClientId(Nt.KEYPAIR,this.clientId)}},Jm=class{constructor(e){this.storage=new Vm(e)}getNonce(e){return this.storage.findNonce(e)}setNonce(e,r){return this.storage.setNonce(e,r)}async getOrGenerateKeyPair(){let e=await this.storage.findKeyPair();return e||(e=await km(),await this.storage.setKeyPair(e)),e}async generateProof(e){const r=await this.getOrGenerateKeyPair();return Cm(Object.assign({keyPair:r},e))}async calculateThumbprint(){return Om(await this.getOrGenerateKeyPair())}async clear(){await Promise.all([this.storage.clearNonces(),this.storage.clearKeyPairs()])}};var ir;(function(t){t.Bearer="Bearer",t.DPoP="DPoP"})(ir||(ir={}));let Zm=class{constructor(e,r){this.hooks=r,this.config=Object.assign(Object.assign({},e),{fetch:e.fetch||(typeof window>"u"?fetch:window.fetch.bind(window))})}isAbsoluteUrl(e){return/^(https?:)?\/\//i.test(e)}buildUrl(e,r){if(r){if(this.isAbsoluteUrl(r))return r;if(e)return`${e.replace(/\/?\/$/,"")}/${r.replace(/^\/+/,"")}`}throw new TypeError("`url` must be absolute or `baseUrl` non-empty.")}getAccessToken(e){return this.config.getAccessToken?this.config.getAccessToken(e):this.hooks.getAccessToken(e)}extractUrl(e){return typeof e=="string"?e:e instanceof URL?e.href:e.url}buildBaseRequest(e,r){if(!this.config.baseUrl)return new Request(e,r);const n=this.buildUrl(this.config.baseUrl,this.extractUrl(e)),a=e instanceof Request?new Request(n,e):n;return new Request(a,r)}setAuthorizationHeader(e,r,n=ir.Bearer){e.headers.set("authorization",`${n} ${r}`)}async setDpopProofHeader(e,r){if(!this.config.dpopNonceId)return;const n=await this.hooks.getDpopNonce(),a=await this.hooks.generateDpopProof({accessToken:r,method:e.method,nonce:n,url:e.url});e.headers.set("dpop",a)}async prepareRequest(e,r){const n=await this.getAccessToken(r);let a,i;typeof n=="string"?(a=this.config.dpopNonceId?ir.DPoP:ir.Bearer,i=n):(a=n.token_type,i=n.access_token),this.setAuthorizationHeader(e,i,a),a===ir.DPoP&&await this.setDpopProofHeader(e,i)}getHeader(e,r){return Array.isArray(e)?new Headers(e).get(r)||"":typeof e.get=="function"?e.get(r)||"":e[r]||""}hasUseDpopNonceError(e){if(e.status!==401)return!1;const r=this.getHeader(e.headers,"www-authenticate");return r.includes("invalid_dpop_nonce")||r.includes("use_dpop_nonce")}async handleResponse(e,r){const n=this.getHeader(e.headers,"dpop-nonce");if(n&&await this.hooks.setDpopNonce(n),!this.hasUseDpopNonceError(e))return e;if(!n||!r.onUseDpopNonceError)throw new Bh(n);return r.onUseDpopNonceError()}async internalFetchWithAuth(e,r,n,a){const i=this.buildBaseRequest(e,r);await this.prepareRequest(i,a);const o=await this.config.fetch(i);return this.handleResponse(o,n)}fetchWithAuth(e,r,n){const a={onUseDpopNonceError:()=>this.internalFetchWithAuth(e,r,Object.assign(Object.assign({},a),{onUseDpopNonceError:void 0}),n)};return this.internalFetchWithAuth(e,r,a,n)}},Ym=class{constructor(e,r){this.myAccountFetcher=e,this.apiBase=r}async connectAccount(e){const r=await this.myAccountFetcher.fetchWithAuth(`${this.apiBase}v1/connected-accounts/connect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return this._handleResponse(r)}async completeAccount(e){const r=await this.myAccountFetcher.fetchWithAuth(`${this.apiBase}v1/connected-accounts/complete`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return this._handleResponse(r)}async _handleResponse(e){let r;try{r=await e.text(),r=JSON.parse(r)}catch(n){throw new Qf({type:"invalid_json",status:e.status,title:"Invalid JSON response",detail:r||String(n)})}if(e.ok)return r;throw new Qf(r)}},Qf=class ev extends Error{constructor({type:e,status:r,title:n,detail:a,validation_errors:i}){super(a),this.name="MyAccountApiError",this.type=e,this.status=r,this.title=n,this.detail=a,this.validation_errors=i,Object.setPrototypeOf(this,ev.prototype)}};const No=new dm;let Xm=class{constructor(e){let r,n;if(this.userCache=new Yh().enclosedCache,this.activeLockKeys=new Set,this.defaultOptions={authorizationParams:{scope:"openid profile email"},useRefreshTokensFallback:!1,useFormData:!0},this._releaseLockOnPageHide=async()=>{const u=Array.from(this.activeLockKeys);for(const l of u)await No.releaseLock(l);this.activeLockKeys.clear(),window.removeEventListener("pagehide",this._releaseLockOnPageHide)},this.options=Object.assign(Object.assign(Object.assign({},this.defaultOptions),e),{authorizationParams:Object.assign(Object.assign({},this.defaultOptions.authorizationParams),e.authorizationParams)}),typeof window<"u"&&(()=>{if(!un())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(un().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
|
-
`)})(),e.cache&&e.cacheLocation&&console.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`."),e.cache)n=e.cache;else{if(r=e.cacheLocation||"memory",!fd(r))throw new Error(`Invalid cache location "${r}"`);n=fd(r)()}this.httpTimeoutMs=e.httpTimeoutInSeconds?1e3*e.httpTimeoutInSeconds:1e4,this.cookieStorage=e.legacySameSiteCookie===!1?sr:hg,this.orgHintCookieName=`auth0.${this.options.clientId}.organization_hint`,this.isAuthenticatedCookieName=(c=>`auth0.${c}.is.authenticated`)(this.options.clientId),this.sessionCheckExpiryDays=e.sessionCheckExpiryDays||1;const a=e.useCookiesForTransactions?this.cookieStorage:vg;var i;this.scope=((c,l,...u)=>{if(typeof c!="object")return{default:dn(l,c,...u)};let f={default:dn(l,...u)};return Object.keys(c).forEach((h=>{const d=c[h];f[h]=dn(l,d,...u)})),f})(this.options.authorizationParams.scope,"openid",this.options.useRefreshTokens?"offline_access":""),this.transactionManager=new ug(a,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||av,this.cacheManager=new cg(n,n.allKeys?void 0:new gg(n,this.options.clientId),this.nowProvider),this.dpop=this.options.useDpop?new bg(this.options.clientId):void 0,this.domainUrl=(i=this.options.domain,/^https?:\/\//.test(i)?i:`https://${i}`),this.tokenIssuer=((c,l)=>c?c.startsWith("https://")?c:`https://${c}/`:`${l}/`)(this.options.issuer,this.domainUrl);const o=`${this.domainUrl}/me/`,s=this.createFetcher(Object.assign(Object.assign({},this.options.useDpop&&{dpopNonceId:"__auth0_my_account_api__"}),{getAccessToken:()=>this.getTokenSilently({authorizationParams:{scope:"create:me:connected_accounts",audience:o},detailedResponse:!0})}));this.myAccountApi=new Ig(s,o),typeof window<"u"&&window.Worker&&this.options.useRefreshTokens&&r==="memory"&&(this.options.workerUrl?this.worker=new Worker(this.options.workerUrl):this.worker=new mg)}_url(e){const r=encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client||nv)));return`${this.domainUrl}${e}&auth0Client=${r}`}_authorizeUrl(e){return this._url(`/authorize?${cs(e)}`)}async _verifyIdToken(e,r,n){const a=await this.nowProvider();return fg({iss:this.tokenIssuer,aud:this.options.clientId,id_token:e,nonce:r,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(e){e?this.cookieStorage.save(this.orgHintCookieName,e,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain})}async _prepareAuthorizeUrl(e,r,n){var a;const i=zo(Cr()),o=zo(Cr()),s=Cr(),c=await ad(s),l=od(c),u=await((a=this.dpop)===null||a===void 0?void 0:a.calculateThumbprint()),f=((d,v,p,g,S,w,y,m,b)=>Object.assign(Object.assign(Object.assign({client_id:d.clientId},d.authorizationParams),p),{scope:rn(v,p.scope,p.audience),response_type:"code",response_mode:m||"query",state:g,nonce:S,redirect_uri:y||d.authorizationParams.redirect_uri,code_challenge:w,code_challenge_method:"S256",dpop_jkt:b}))(this.options,this.scope,e,i,o,l,e.redirect_uri||this.options.authorizationParams.redirect_uri||n,r?.response_mode,u),h=this._authorizeUrl(f);return{nonce:o,code_verifier:s,scope:f.scope,audience:f.audience||"default",redirect_uri:f.redirect_uri,state:i,url:h}}async loginWithPopup(e,r){var n;if(e=e||{},!(r=r||{}).popup&&(r.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`)})(""),!r.popup))throw new Error("Unable to open a popup for loginWithPopup - window.open returned `null`");const a=await this._prepareAuthorizeUrl(e.authorizationParams||{},{response_mode:"web_message"},window.location.origin);r.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 Fm(s.popup)))}),1e3),h=setTimeout((()=>{clearInterval(f),l(new Ks(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(Ce.fromPayload(d.data.response));c(d.data.response)}},window.addEventListener("message",u)})))(Object.assign(Object.assign({},r),{timeoutInSeconds:r.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}));if(a.state!==i.state)throw new Ce("state_mismatch","Invalid state");const o=((n=e.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 e;const r=await this._getIdTokenFromCache();return(e=r?.decodedToken)===null||e===void 0?void 0:e.user}async getIdTokenClaims(){var e;const r=await this._getIdTokenFromCache();return(e=r?.decodedToken)===null||e===void 0?void 0:e.claims}async loginWithRedirect(e={}){var r;const n=dd(e),{openUrl:a,fragment:i,appState:o}=n,s=pt(n,["openUrl","fragment","appState"]),c=((r=s.authorizationParams)===null||r===void 0?void 0:r.organization)||this.options.authorizationParams.organization,l=await this._prepareAuthorizeUrl(s.authorizationParams||{}),{url:u}=l,f=pt(l,["url"]);this.transactionManager.create(Object.assign(Object.assign(Object.assign({},f),{appState:o,response_type:Mt.Code}),c&&{organization:c}));const h=i?`${u}#${i}`:u;a?await a(h):window.location.assign(h)}async handleRedirectCallback(e=window.location.href){const r=e.split("?").slice(1);if(r.length===0)throw new Error("There are no query params available for parsing.");const n=this.transactionManager.get();if(!n)throw new Ce("missing_transaction","Invalid state");this.transactionManager.remove();const a=(i=>{i.indexOf("#")>-1&&(i=i.substring(0,i.indexOf("#")));const o=new URLSearchParams(i);return{state:o.get("state"),code:o.get("code")||void 0,connect_code:o.get("connect_code")||void 0,error:o.get("error")||void 0,error_description:o.get("error_description")||void 0}})(r.join(""));return n.response_type===Mt.ConnectCode?this._handleConnectAccountRedirectCallback(a,n):this._handleLoginRedirectCallback(a,n)}async _handleLoginRedirectCallback(e,r){const{code:n,state:a,error:i,error_description:o}=e;if(i)throw new Dm(i,o||i,a,r.appState);if(!r.code_verifier||r.state&&r.state!==a)throw new Ce("state_mismatch","Invalid state");const s=r.organization,c=r.nonce,l=r.redirect_uri;return await this._requestToken(Object.assign({audience:r.audience,scope:r.scope,code_verifier:r.code_verifier,grant_type:"authorization_code",code:n},l?{redirect_uri:l}:{}),{nonceIn:c,organization:s}),{appState:r.appState,response_type:Mt.Code}}async _handleConnectAccountRedirectCallback(e,r){const{connect_code:n,state:a,error:i,error_description:o}=e;if(i)throw new Mm(i,o||i,r.connection,a,r.appState);if(!n)throw new Ce("missing_connect_code","Missing connect code");if(!(r.code_verifier&&r.state&&r.auth_session&&r.redirect_uri&&r.state===a))throw new Ce("state_mismatch","Invalid state");const s=await this.myAccountApi.completeAccount({auth_session:r.auth_session,connect_code:n,redirect_uri:r.redirect_uri,code_verifier:r.code_verifier});return Object.assign(Object.assign({},s),{appState:r.appState,response_type:Mt.ConnectCode})}async checkSession(e){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(e)}catch{}}async getTokenSilently(e={}){var r,n;const a=Object.assign(Object.assign({cacheMode:"on"},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:rn(this.scope,(r=e.authorizationParams)===null||r===void 0?void 0:r.scope,((n=e.authorizationParams)===null||n===void 0?void 0:n.audience)||this.options.authorizationParams.audience)})}),i=await((o,s)=>{let c=Bo[s];return c||(c=o().finally((()=>{delete Bo[s],c=null})),Bo[s]=c),c})((()=>this._getTokenSilently(a)),`${this.options.clientId}::${a.authorizationParams.audience}::${a.authorizationParams.scope}`);return e.detailedResponse?i:i?.access_token}async _getTokenSilently(e){const{cacheMode:r}=e,n=pt(e,["cacheMode"]);if(r!=="off"){const s=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId,cacheMode:r});if(s)return s}if(r==="cache-only")return;const a=(i=this.options.clientId,o=n.authorizationParams.audience||"default",`auth0.lock.getTokenSilently.${i}.${o}`);var i,o;if(!await(async(s,c=3)=>{for(let l=0;l<c;l++)if(await s())return!0;return!1})((()=>Go.acquireLock(a,5e3)),10))throw new ss;this.activeLockKeys.add(a),this.activeLockKeys.size===1&&window.addEventListener("pagehide",this._releaseLockOnPageHide);try{if(r!=="off"){const d=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId});if(d)return d}const s=this.options.useRefreshTokens?await this._getTokenUsingRefreshToken(n):await this._getTokenFromIFrame(n),{id_token:c,token_type:l,access_token:u,oauthTokenScope:f,expires_in:h}=s;return Object.assign(Object.assign({id_token:c,token_type:l,access_token:u},f?{scope:f}:null),{expires_in:h})}finally{await Go.releaseLock(a),this.activeLockKeys.delete(a),this.activeLockKeys.size===0&&window.removeEventListener("pagehide",this._releaseLockOnPageHide)}}async getTokenWithPopup(e={},r={}){var n,a;const i=Object.assign(Object.assign({},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:rn(this.scope,(n=e.authorizationParams)===null||n===void 0?void 0:n.scope,((a=e.authorizationParams)===null||a===void 0?void 0:a.audience)||this.options.authorizationParams.audience)})});return r=Object.assign(Object.assign({},xm),r),await this.loginWithPopup(i,r),(await this.cacheManager.get(new It({scope:i.authorizationParams.scope,audience:i.authorizationParams.audience||"default",clientId:this.options.clientId}),void 0,this.options.useMrrt)).access_token}async isAuthenticated(){return!!await this.getUser()}_buildLogoutUrl(e){e.clientId!==null?e.clientId=e.clientId||this.options.clientId:delete e.clientId;const r=e.logoutParams||{},{federated:n}=r,a=pt(r,["federated"]),i=n?"&federated":"";return this._url(`/v2/logout?${cs(Object.assign({clientId:e.clientId},a))}`)+i}async logout(e={}){var r;const n=dd(e),{openUrl:a}=n,i=pt(n,["openUrl"]);e.clientId===null?await this.cacheManager.clear():await this.cacheManager.clear(e.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@@"),await((r=this.dpop)===null||r===void 0?void 0:r.clear());const o=this._buildLogoutUrl(i);a?await a(o):a!==!1&&window.location.assign(o)}async _getTokenFromIFrame(e){const r=Object.assign(Object.assign({},e.authorizationParams),{prompt:"none"}),n=this.cookieStorage.get(this.orgHintCookieName);n&&!r.organization&&(r.organization=n);const{url:a,state:i,nonce:o,code_verifier:s,redirect_uri:c,scope:l,audience:u}=await this._prepareAuthorizeUrl(r,{response_mode:"web_message"},window.location.origin);try{if(window.crossOriginIsolated)throw new Ce("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");const f=e.timeoutInSeconds||this.options.authorizeTimeoutInSeconds;let h;try{h=new URL(this.domainUrl).origin}catch{h=this.domainUrl}const d=await((p,g,S=60)=>new Promise(((w,y)=>{const m=window.document.createElement("iframe");m.setAttribute("width","0"),m.setAttribute("height","0"),m.style.display="none";const b=()=>{window.document.body.contains(m)&&(window.document.body.removeChild(m),window.removeEventListener("message",O,!1))};let O;const A=setTimeout((()=>{y(new ss),b()}),1e3*S);O=function(L){if(L.origin!=g||!L.data||L.data.type!=="authorization_response")return;const z=L.source;z&&z.close(),L.data.response.error?y(Ce.fromPayload(L.data.response)):w(L.data.response),clearTimeout(A),window.removeEventListener("message",O,!1),setTimeout(b,2e3)},window.addEventListener("message",O,!1),window.document.body.appendChild(m),m.setAttribute("src",p)})))(a,h,f);if(i!==d.state)throw new Ce("state_mismatch","Invalid state");const v=await this._requestToken(Object.assign(Object.assign({},e.authorizationParams),{code_verifier:s,code:d.code,grant_type:"authorization_code",redirect_uri:c,timeout:e.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:o,organization:r.organization});return Object.assign(Object.assign({},v),{scope:l,oauthTokenScope:v.scope,audience:u})}catch(f){throw f.error==="login_required"&&this.logout({openUrl:!1}),f}}async _getTokenUsingRefreshToken(e){const r=await this.cacheManager.get(new It({scope:e.authorizationParams.scope,audience:e.authorizationParams.audience||"default",clientId:this.options.clientId}),void 0,this.options.useMrrt);if(!(r&&r.refresh_token||this.worker)){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);throw new lv(e.authorizationParams.audience||"default",e.authorizationParams.scope)}const n=e.authorizationParams.redirect_uri||this.options.authorizationParams.redirect_uri||window.location.origin,a=typeof e.timeoutInSeconds=="number"?1e3*e.timeoutInSeconds:null,i=((u,f,h,d)=>{var v;if(u&&h&&d){if(f.audience!==h)return f.scope;const p=d.split(" "),g=((v=f.scope)===null||v===void 0?void 0:v.split(" "))||[],S=g.every((w=>p.includes(w)));return p.length>=g.length&&S?d:f.scope}return f.scope})(this.options.useMrrt,e.authorizationParams,r?.audience,r?.scope);try{const u=await this._requestToken(Object.assign(Object.assign(Object.assign({},e.authorizationParams),{grant_type:"refresh_token",refresh_token:r&&r.refresh_token,redirect_uri:n}),a&&{timeout:a}),{scopesToRequest:i});if(u.refresh_token&&this.options.useMrrt&&r?.refresh_token&&await this.cacheManager.updateEntry(r.refresh_token,u.refresh_token),this.options.useMrrt&&(o=r?.audience,s=r?.scope,c=e.authorizationParams.audience,l=e.authorizationParams.scope,(o!==c||!hd(l,s))&&!hd(i,u.scope))){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);await this.cacheManager.remove(this.options.clientId,e.authorizationParams.audience,e.authorizationParams.scope);const f=((h,d)=>{const v=h?.split(" ")||[],p=d?.split(" ")||[];return v.filter((g=>p.indexOf(g)==-1)).join(",")})(i,u.scope);throw new zm(e.authorizationParams.audience||"default",f)}return Object.assign(Object.assign({},u),{scope:e.authorizationParams.scope,oauthTokenScope:u.scope,audience:e.authorizationParams.audience||"default"})}catch(u){if((u.message.indexOf("Missing Refresh Token")>-1||u.message&&u.message.indexOf("invalid refresh token")>-1)&&this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);throw u}var o,s,c,l}async _saveEntryInCache(e){const{id_token:r,decodedToken:n}=e,a=pt(e,["id_token","decodedToken"]);this.userCache.set("@@user@@",{id_token:r,decodedToken:n}),await this.cacheManager.setIdToken(this.options.clientId,e.id_token,e.decodedToken),await this.cacheManager.set(a)}async _getIdTokenFromCache(){const e=this.options.authorizationParams.audience||"default",r=this.scope[e],n=await this.cacheManager.getIdToken(new It({clientId:this.options.clientId,audience:e,scope:r})),a=this.userCache.get("@@user@@");return n&&n.id_token===a?.id_token?a:(this.userCache.set("@@user@@",n),n)}async _getEntryFromCache({scope:e,audience:r,clientId:n,cacheMode:a}){const i=await this.cacheManager.get(new It({scope:e,audience:r,clientId:n}),60,this.options.useMrrt,a);if(i&&i.access_token){const{token_type:o,access_token:s,oauthTokenScope:c,expires_in:l}=i,u=await this._getIdTokenFromCache();return u&&Object.assign(Object.assign({id_token:u.id_token,token_type:o||"Bearer",access_token:s},c?{scope:c}:null),{expires_in:l})}}async _requestToken(e,r){const{nonceIn:n,organization:a,scopesToRequest:i}=r||{},o=await og(Object.assign(Object.assign({baseUrl:this.domainUrl,client_id:this.options.clientId,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs,useMrrt:this.options.useMrrt,dpop:this.dpop},e),{scope:i||e.scope}),this.worker),s=await this._verifyIdToken(o.id_token,n,a);return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({},o),{decodedToken:s,scope:e.scope,audience:e.audience||"default"}),o.scope?{oauthTokenScope:o.scope}:null),{client_id:this.options.clientId})),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgHint(a||s.claims.org_id),Object.assign(Object.assign({},o),{decodedToken:s})}async exchangeToken(e){return this._requestToken({grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",subject_token:e.subject_token,subject_token_type:e.subject_token_type,scope:rn(this.scope,e.scope,e.audience||this.options.authorizationParams.audience),audience:e.audience||this.options.authorizationParams.audience})}_assertDpop(e){if(!e)throw new Error("`useDpop` option must be enabled before using DPoP.")}getDpopNonce(e){return this._assertDpop(this.dpop),this.dpop.getNonce(e)}setDpopNonce(e,r){return this._assertDpop(this.dpop),this.dpop.setNonce(e,r)}generateDpopProof(e){return this._assertDpop(this.dpop),this.dpop.generateProof(e)}createFetcher(e={}){return new Sg(e,{isDpopEnabled:()=>!!this.options.useDpop,getAccessToken:r=>{var n;return this.getTokenSilently({authorizationParams:{scope:(n=r?.scope)===null||n===void 0?void 0:n.join(" "),audience:r?.audience},detailedResponse:!0})},getDpopNonce:()=>this.getDpopNonce(e.dpopNonceId),setDpopNonce:r=>this.setDpopNonce(r,e.dpopNonceId),generateDpopProof:r=>this.generateDpopProof(r)})}async connectAccountWithRedirect(e){const{openUrl:r,appState:n,connection:a,authorization_params:i,redirectUri:o=this.options.authorizationParams.redirect_uri||window.location.origin}=e;if(!a)throw new Error("connection is required");const s=zo(Cr()),c=Cr(),l=await ad(c),u=od(l),{connect_uri:f,connect_params:h,auth_session:d}=await this.myAccountApi.connectAccount({connection:a,redirect_uri:o,state:s,code_challenge:u,code_challenge_method:"S256",authorization_params:i});this.transactionManager.create({state:s,code_verifier:c,auth_session:d,redirect_uri:o,appState:n,connection:a,response_type:Mt.ConnectCode});const v=new URL(f);v.searchParams.set("ticket",h.ticket),r?await r(v.toString()):window.location.assign(v)}};async function Eg(t){const e=new Pg(t);return await e.checkSession(),e}var Ve=(t=>(t.AUTH_INITIALIZED="sesamyJsAuthInitialized",t.READY="sesamyJsReady",t.AUTHENTICATED="sesamyJsAuthenticated",t.LOGOUT="sesamyJsLogout",t.CLEAR_CACHE="sesamyJsClearCache",t.USER_ATTRIBUTE_CHANGED="sesamyUserAttributeChanged",t.PURCHASE="sesamyJsPurchase",t))(Ve||{});const _g="sesamy.com",Tg="sesamy.dev",kg="https://sesa.my",pd="sesamyCacheTimestamp",md="sesamyContentReloaded";function Pv(t,e){return`${t}.${e==="dev"?Tg:_g}`}function vt(t,e){return`https://${Pv(t,e)}`}function bn(){return(document.documentElement.getAttribute("lang")??navigator.language??"en").split("-")[0]?.toLowerCase()??"en"}/*!
|
|
4
|
+
`)})(),e.cache&&e.cacheLocation&&console.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`."),e.cache)n=e.cache;else{if(r=e.cacheLocation||"memory",!Zf(r))throw new Error(`Invalid cache location "${r}"`);n=Zf(r)()}this.httpTimeoutMs=e.httpTimeoutInSeconds?1e3*e.httpTimeoutInSeconds:1e4,this.cookieStorage=e.legacySameSiteCookie===!1?ar:Km,this.orgHintCookieName=`auth0.${this.options.clientId}.organization_hint`,this.isAuthenticatedCookieName=(u=>`auth0.${u}.is.authenticated`)(this.options.clientId),this.sessionCheckExpiryDays=e.sessionCheckExpiryDays||1;const a=e.useCookiesForTransactions?this.cookieStorage:zm;var i;this.scope=((u,l,...c)=>{if(typeof u!="object")return{default:tn(l,u,...c)};let f={default:tn(l,...c)};return Object.keys(u).forEach((h=>{const d=u[h];f[h]=tn(l,d,...c)})),f})(this.options.authorizationParams.scope,"openid",this.options.useRefreshTokens?"offline_access":""),this.transactionManager=new $m(a,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||qh,this.cacheManager=new xm(n,n.allKeys?void 0:new Gm(n,this.options.clientId),this.nowProvider),this.dpop=this.options.useDpop?new Jm(this.options.clientId):void 0,this.domainUrl=(i=this.options.domain,/^https?:\/\//.test(i)?i:`https://${i}`),this.tokenIssuer=((u,l)=>u?u.startsWith("https://")?u:`https://${u}/`:`${l}/`)(this.options.issuer,this.domainUrl);const o=`${this.domainUrl}/me/`,s=this.createFetcher(Object.assign(Object.assign({},this.options.useDpop&&{dpopNonceId:"__auth0_my_account_api__"}),{getAccessToken:()=>this.getTokenSilently({authorizationParams:{scope:"create:me:connected_accounts",audience:o},detailedResponse:!0})}));this.myAccountApi=new Ym(s,o),typeof window<"u"&&window.Worker&&this.options.useRefreshTokens&&r==="memory"&&(this.options.workerUrl?this.worker=new Worker(this.options.workerUrl):this.worker=new Bm)}_url(e){const r=encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client||Nh)));return`${this.domainUrl}${e}&auth0Client=${r}`}_authorizeUrl(e){return this._url(`/authorize?${Wo(e)}`)}async _verifyIdToken(e,r,n){const a=await this.nowProvider();return Mm({iss:this.tokenIssuer,aud:this.options.clientId,id_token:e,nonce:r,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(e){e?this.cookieStorage.save(this.orgHintCookieName,e,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain})}async _prepareAuthorizeUrl(e,r,n){var a;const i=Uo(_r()),o=Uo(_r()),s=_r(),u=await zf(s),l=Bf(u),c=await((a=this.dpop)===null||a===void 0?void 0:a.calculateThumbprint()),f=((d,v,p,m,P,y,b,g,w)=>Object.assign(Object.assign(Object.assign({client_id:d.clientId},d.authorizationParams),p),{scope:Wr(v,p.scope,p.audience),response_type:"code",response_mode:g||"query",state:m,nonce:P,redirect_uri:b||d.authorizationParams.redirect_uri,code_challenge:y,code_challenge_method:"S256",dpop_jkt:w}))(this.options,this.scope,e,i,o,l,e.redirect_uri||this.options.authorizationParams.redirect_uri||n,r?.response_mode,c),h=this._authorizeUrl(f);return{nonce:o,code_verifier:s,scope:f.scope,audience:f.audience||"default",redirect_uri:f.redirect_uri,state:i,url:h}}async loginWithPopup(e,r){var n;if(e=e||{},!(r=r||{}).popup&&(r.popup=(s=>{const u=window.screenX+(window.innerWidth-400)/2,l=window.screenY+(window.innerHeight-600)/2;return window.open(s,"auth0:authorize:popup",`left=${u},top=${l},width=400,height=600,resizable,scrollbars=yes,status=1`)})(""),!r.popup))throw new Error("Unable to open a popup for loginWithPopup - window.open returned `null`");const a=await this._prepareAuthorizeUrl(e.authorizationParams||{},{response_mode:"web_message"},window.location.origin);r.popup.location.href=a.url;const i=await(s=>new Promise(((u,l)=>{let c;const f=setInterval((()=>{s.popup&&s.popup.closed&&(clearInterval(f),clearTimeout(h),window.removeEventListener("message",c,!1),l(new mm(s.popup)))}),1e3),h=setTimeout((()=>{clearInterval(f),l(new Ts(s.popup)),window.removeEventListener("message",c,!1)}),1e3*(s.timeoutInSeconds||60));c=function(d){if(d.data&&d.data.type==="authorization_response"){if(clearTimeout(h),clearInterval(f),window.removeEventListener("message",c,!1),s.popup.close(),d.data.response.error)return l(Ae.fromPayload(d.data.response));u(d.data.response)}},window.addEventListener("message",c)})))(Object.assign(Object.assign({},r),{timeoutInSeconds:r.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}));if(a.state!==i.state)throw new Ae("state_mismatch","Invalid state");const o=((n=e.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 e;const r=await this._getIdTokenFromCache();return(e=r?.decodedToken)===null||e===void 0?void 0:e.user}async getIdTokenClaims(){var e;const r=await this._getIdTokenFromCache();return(e=r?.decodedToken)===null||e===void 0?void 0:e.claims}async loginWithRedirect(e={}){var r;const n=Yf(e),{openUrl:a,fragment:i,appState:o}=n,s=vt(n,["openUrl","fragment","appState"]),u=((r=s.authorizationParams)===null||r===void 0?void 0:r.organization)||this.options.authorizationParams.organization,l=await this._prepareAuthorizeUrl(s.authorizationParams||{}),{url:c}=l,f=vt(l,["url"]);this.transactionManager.create(Object.assign(Object.assign(Object.assign({},f),{appState:o,response_type:Dt.Code}),u&&{organization:u}));const h=i?`${c}#${i}`:c;a?await a(h):window.location.assign(h)}async handleRedirectCallback(e=window.location.href){const r=e.split("?").slice(1);if(r.length===0)throw new Error("There are no query params available for parsing.");const n=this.transactionManager.get();if(!n)throw new Ae("missing_transaction","Invalid state");this.transactionManager.remove();const a=(i=>{i.indexOf("#")>-1&&(i=i.substring(0,i.indexOf("#")));const o=new URLSearchParams(i);return{state:o.get("state"),code:o.get("code")||void 0,connect_code:o.get("connect_code")||void 0,error:o.get("error")||void 0,error_description:o.get("error_description")||void 0}})(r.join(""));return n.response_type===Dt.ConnectCode?this._handleConnectAccountRedirectCallback(a,n):this._handleLoginRedirectCallback(a,n)}async _handleLoginRedirectCallback(e,r){const{code:n,state:a,error:i,error_description:o}=e;if(i)throw new vm(i,o||i,a,r.appState);if(!r.code_verifier||r.state&&r.state!==a)throw new Ae("state_mismatch","Invalid state");const s=r.organization,u=r.nonce,l=r.redirect_uri;return await this._requestToken(Object.assign({audience:r.audience,scope:r.scope,code_verifier:r.code_verifier,grant_type:"authorization_code",code:n},l?{redirect_uri:l}:{}),{nonceIn:u,organization:s}),{appState:r.appState,response_type:Dt.Code}}async _handleConnectAccountRedirectCallback(e,r){const{connect_code:n,state:a,error:i,error_description:o}=e;if(i)throw new pm(i,o||i,r.connection,a,r.appState);if(!n)throw new Ae("missing_connect_code","Missing connect code");if(!(r.code_verifier&&r.state&&r.auth_session&&r.redirect_uri&&r.state===a))throw new Ae("state_mismatch","Invalid state");const s=await this.myAccountApi.completeAccount({auth_session:r.auth_session,connect_code:n,redirect_uri:r.redirect_uri,code_verifier:r.code_verifier});return Object.assign(Object.assign({},s),{appState:r.appState,response_type:Dt.ConnectCode})}async checkSession(e){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(e)}catch{}}async getTokenSilently(e={}){var r,n;const a=Object.assign(Object.assign({cacheMode:"on"},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:Wr(this.scope,(r=e.authorizationParams)===null||r===void 0?void 0:r.scope,((n=e.authorizationParams)===null||n===void 0?void 0:n.audience)||this.options.authorizationParams.audience)})}),i=await((o,s)=>{let u=Lo[s];return u||(u=o().finally((()=>{delete Lo[s],u=null})),Lo[s]=u),u})((()=>this._getTokenSilently(a)),`${this.options.clientId}::${a.authorizationParams.audience}::${a.authorizationParams.scope}`);return e.detailedResponse?i:i?.access_token}async _getTokenSilently(e){const{cacheMode:r}=e,n=vt(e,["cacheMode"]);if(r!=="off"){const s=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId,cacheMode:r});if(s)return s}if(r==="cache-only")return;const a=(i=this.options.clientId,o=n.authorizationParams.audience||"default",`auth0.lock.getTokenSilently.${i}.${o}`);var i,o;if(!await(async(s,u=3)=>{for(let l=0;l<u;l++)if(await s())return!0;return!1})((()=>No.acquireLock(a,5e3)),10))throw new Go;this.activeLockKeys.add(a),this.activeLockKeys.size===1&&window.addEventListener("pagehide",this._releaseLockOnPageHide);try{if(r!=="off"){const d=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId});if(d)return d}const s=this.options.useRefreshTokens?await this._getTokenUsingRefreshToken(n):await this._getTokenFromIFrame(n),{id_token:u,token_type:l,access_token:c,oauthTokenScope:f,expires_in:h}=s;return Object.assign(Object.assign({id_token:u,token_type:l,access_token:c},f?{scope:f}:null),{expires_in:h})}finally{await No.releaseLock(a),this.activeLockKeys.delete(a),this.activeLockKeys.size===0&&window.removeEventListener("pagehide",this._releaseLockOnPageHide)}}async getTokenWithPopup(e={},r={}){var n,a;const i=Object.assign(Object.assign({},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:Wr(this.scope,(n=e.authorizationParams)===null||n===void 0?void 0:n.scope,((a=e.authorizationParams)===null||a===void 0?void 0:a.audience)||this.options.authorizationParams.audience)})});return r=Object.assign(Object.assign({},hm),r),await this.loginWithPopup(i,r),(await this.cacheManager.get(new St({scope:i.authorizationParams.scope,audience:i.authorizationParams.audience||"default",clientId:this.options.clientId}),void 0,this.options.useMrrt)).access_token}async isAuthenticated(){return!!await this.getUser()}_buildLogoutUrl(e){e.clientId!==null?e.clientId=e.clientId||this.options.clientId:delete e.clientId;const r=e.logoutParams||{},{federated:n}=r,a=vt(r,["federated"]),i=n?"&federated":"";return this._url(`/v2/logout?${Wo(Object.assign({clientId:e.clientId},a))}`)+i}async logout(e={}){var r;const n=Yf(e),{openUrl:a}=n,i=vt(n,["openUrl"]);e.clientId===null?await this.cacheManager.clear():await this.cacheManager.clear(e.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@@"),await((r=this.dpop)===null||r===void 0?void 0:r.clear());const o=this._buildLogoutUrl(i);a?await a(o):a!==!1&&window.location.assign(o)}async _getTokenFromIFrame(e){const r=Object.assign(Object.assign({},e.authorizationParams),{prompt:"none"}),n=this.cookieStorage.get(this.orgHintCookieName);n&&!r.organization&&(r.organization=n);const{url:a,state:i,nonce:o,code_verifier:s,redirect_uri:u,scope:l,audience:c}=await this._prepareAuthorizeUrl(r,{response_mode:"web_message"},window.location.origin);try{if(window.crossOriginIsolated)throw new Ae("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");const f=e.timeoutInSeconds||this.options.authorizeTimeoutInSeconds;let h;try{h=new URL(this.domainUrl).origin}catch{h=this.domainUrl}const d=await((p,m,P=60)=>new Promise(((y,b)=>{const g=window.document.createElement("iframe");g.setAttribute("width","0"),g.setAttribute("height","0"),g.style.display="none";const w=()=>{window.document.body.contains(g)&&(window.document.body.removeChild(g),window.removeEventListener("message",A,!1))};let A;const x=setTimeout((()=>{b(new Go),w()}),1e3*P);A=function(N){if(N.origin!=m||!N.data||N.data.type!=="authorization_response")return;const z=N.source;z&&z.close(),N.data.response.error?b(Ae.fromPayload(N.data.response)):y(N.data.response),clearTimeout(x),window.removeEventListener("message",A,!1),setTimeout(w,2e3)},window.addEventListener("message",A,!1),window.document.body.appendChild(g),g.setAttribute("src",p)})))(a,h,f);if(i!==d.state)throw new Ae("state_mismatch","Invalid state");const v=await this._requestToken(Object.assign(Object.assign({},e.authorizationParams),{code_verifier:s,code:d.code,grant_type:"authorization_code",redirect_uri:u,timeout:e.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:o,organization:r.organization});return Object.assign(Object.assign({},v),{scope:l,oauthTokenScope:v.scope,audience:c})}catch(f){throw f.error==="login_required"&&this.logout({openUrl:!1}),f}}async _getTokenUsingRefreshToken(e){const r=await this.cacheManager.get(new St({scope:e.authorizationParams.scope,audience:e.authorizationParams.audience||"default",clientId:this.options.clientId}),void 0,this.options.useMrrt);if(!(r&&r.refresh_token||this.worker)){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);throw new Kh(e.authorizationParams.audience||"default",e.authorizationParams.scope)}const n=e.authorizationParams.redirect_uri||this.options.authorizationParams.redirect_uri||window.location.origin,a=typeof e.timeoutInSeconds=="number"?1e3*e.timeoutInSeconds:null,i=((c,f,h,d)=>{var v;if(c&&h&&d){if(f.audience!==h)return f.scope;const p=d.split(" "),m=((v=f.scope)===null||v===void 0?void 0:v.split(" "))||[],P=m.every((y=>p.includes(y)));return p.length>=m.length&&P?d:f.scope}return f.scope})(this.options.useMrrt,e.authorizationParams,r?.audience,r?.scope);try{const c=await this._requestToken(Object.assign(Object.assign(Object.assign({},e.authorizationParams),{grant_type:"refresh_token",refresh_token:r&&r.refresh_token,redirect_uri:n}),a&&{timeout:a}),{scopesToRequest:i});if(c.refresh_token&&this.options.useMrrt&&r?.refresh_token&&await this.cacheManager.updateEntry(r.refresh_token,c.refresh_token),this.options.useMrrt&&(o=r?.audience,s=r?.scope,u=e.authorizationParams.audience,l=e.authorizationParams.scope,(o!==u||!Xf(l,s))&&!Xf(i,c.scope))){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);await this.cacheManager.remove(this.options.clientId,e.authorizationParams.audience,e.authorizationParams.scope);const f=((h,d)=>{const v=h?.split(" ")||[],p=d?.split(" ")||[];return v.filter((m=>p.indexOf(m)==-1)).join(",")})(i,c.scope);throw new ym(e.authorizationParams.audience||"default",f)}return Object.assign(Object.assign({},c),{scope:e.authorizationParams.scope,oauthTokenScope:c.scope,audience:e.authorizationParams.audience||"default"})}catch(c){if((c.message.indexOf("Missing Refresh Token")>-1||c.message&&c.message.indexOf("invalid refresh token")>-1)&&this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);throw c}var o,s,u,l}async _saveEntryInCache(e){const{id_token:r,decodedToken:n}=e,a=vt(e,["id_token","decodedToken"]);this.userCache.set("@@user@@",{id_token:r,decodedToken:n}),await this.cacheManager.setIdToken(this.options.clientId,e.id_token,e.decodedToken),await this.cacheManager.set(a)}async _getIdTokenFromCache(){const e=this.options.authorizationParams.audience||"default",r=this.scope[e],n=await this.cacheManager.getIdToken(new St({clientId:this.options.clientId,audience:e,scope:r})),a=this.userCache.get("@@user@@");return n&&n.id_token===a?.id_token?a:(this.userCache.set("@@user@@",n),n)}async _getEntryFromCache({scope:e,audience:r,clientId:n,cacheMode:a}){const i=await this.cacheManager.get(new St({scope:e,audience:r,clientId:n}),60,this.options.useMrrt,a);if(i&&i.access_token){const{token_type:o,access_token:s,oauthTokenScope:u,expires_in:l}=i,c=await this._getIdTokenFromCache();return c&&Object.assign(Object.assign({id_token:c.id_token,token_type:o||"Bearer",access_token:s},u?{scope:u}:null),{expires_in:l})}}async _requestToken(e,r){const{nonceIn:n,organization:a,scopesToRequest:i}=r||{},o=await Nm(Object.assign(Object.assign({baseUrl:this.domainUrl,client_id:this.options.clientId,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs,useMrrt:this.options.useMrrt,dpop:this.dpop},e),{scope:i||e.scope}),this.worker),s=await this._verifyIdToken(o.id_token,n,a);return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({},o),{decodedToken:s,scope:e.scope,audience:e.audience||"default"}),o.scope?{oauthTokenScope:o.scope}:null),{client_id:this.options.clientId})),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgHint(a||s.claims.org_id),Object.assign(Object.assign({},o),{decodedToken:s})}async exchangeToken(e){return this._requestToken({grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",subject_token:e.subject_token,subject_token_type:e.subject_token_type,scope:Wr(this.scope,e.scope,e.audience||this.options.authorizationParams.audience),audience:e.audience||this.options.authorizationParams.audience})}_assertDpop(e){if(!e)throw new Error("`useDpop` option must be enabled before using DPoP.")}getDpopNonce(e){return this._assertDpop(this.dpop),this.dpop.getNonce(e)}setDpopNonce(e,r){return this._assertDpop(this.dpop),this.dpop.setNonce(e,r)}generateDpopProof(e){return this._assertDpop(this.dpop),this.dpop.generateProof(e)}createFetcher(e={}){return new Zm(e,{isDpopEnabled:()=>!!this.options.useDpop,getAccessToken:r=>{var n;return this.getTokenSilently({authorizationParams:{scope:(n=r?.scope)===null||n===void 0?void 0:n.join(" "),audience:r?.audience},detailedResponse:!0})},getDpopNonce:()=>this.getDpopNonce(e.dpopNonceId),setDpopNonce:r=>this.setDpopNonce(r,e.dpopNonceId),generateDpopProof:r=>this.generateDpopProof(r)})}async connectAccountWithRedirect(e){const{openUrl:r,appState:n,connection:a,authorization_params:i,redirectUri:o=this.options.authorizationParams.redirect_uri||window.location.origin}=e;if(!a)throw new Error("connection is required");const s=Uo(_r()),u=_r(),l=await zf(u),c=Bf(l),{connect_uri:f,connect_params:h,auth_session:d}=await this.myAccountApi.connectAccount({connection:a,redirect_uri:o,state:s,code_challenge:c,code_challenge_method:"S256",authorization_params:i});this.transactionManager.create({state:s,code_verifier:u,auth_session:d,redirect_uri:o,appState:n,connection:a,response_type:Dt.ConnectCode});const v=new URL(f);v.searchParams.set("ticket",h.ticket),r?await r(v.toString()):window.location.assign(v)}};async function Qm(t){const e=new Xm(t);return await e.checkSession(),e}var Je=(t=>(t.AUTH_INITIALIZED="sesamyJsAuthInitialized",t.READY="sesamyJsReady",t.AUTHENTICATED="sesamyJsAuthenticated",t.LOGOUT="sesamyJsLogout",t.CLEAR_CACHE="sesamyJsClearCache",t.USER_ATTRIBUTE_CHANGED="sesamyUserAttributeChanged",t.PURCHASE="sesamyJsPurchase",t))(Je||{});const eg="sesamy.com",tg="sesamy.dev",rg="https://sesa.my",ed="sesamyCacheTimestamp",td="sesamyContentReloaded";function tv(t,e){return`${t}.${e==="dev"?tg:eg}`}function ht(t,e){return`https://${tv(t,e)}`}function ln(){return(document.documentElement.getAttribute("lang")??navigator.language??"en").split("-")[0]?.toLowerCase()??"en"}/*!
|
|
5
5
|
*
|
|
6
6
|
* detectIncognito v1.6.2
|
|
7
7
|
*
|
|
@@ -31,9 +31,8 @@
|
|
|
31
31
|
*
|
|
32
32
|
* Please keep this comment intact in order to properly abide by the MIT License.
|
|
33
33
|
*
|
|
34
|
-
**/var fs={d:(t,e)=>{for(var r in e)fs.o(e,r)&&!fs.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},zs={};fs.d(zs,{A:()=>Rg,k:()=>Hs});var jr=function(t,e,r,n){return new(r||(r=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 r?u:new r(function(f){f(u)})).then(o,s)}c((n=n.apply(t,[])).next())})},Ur=function(t,e){var r,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(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(o=0)),o;)try{if(r=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=e.call(t,o)}catch(f){u=[6,f],n=0}finally{r=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}})([c,l])}}};function Hs(){return jr(this,void 0,Promise,function(){return Ur(this,function(t){switch(t.label){case 0:return[4,new Promise(function(e,r){var n="Unknown",a=!1;function i(h){a||(a=!0,e({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 jr(this,void 0,void 0,function(){var h,d;return Ur(this,function(v){switch(v.label){case 0:return v.trys.push([0,2,,3]),[4,navigator.storage.getDirectory()];case 1:return v.sent(),i(!1),[3,3];case 2:return h=v.sent(),d=h instanceof Error&&typeof h.message=="string"?h.message:String(h),i(d.includes("unknown transient reason")),[3,3];case 3:return[2]}})})}function c(){var h;return jr(this,void 0,Promise,function(){return Ur(this,function(d){switch(d.label){case 0:return typeof((h=navigator.storage)===null||h===void 0?void 0:h.getDirectory)!="function"?[3,2]:[4,s()];case 1:return d.sent(),[3,3];case 2:navigator.maxTouchPoints!==void 0?(function(){var v=String(Math.random());try{var p=indexedDB.open(v,1);p.onupgradeneeded=function(g){var S=g.target.result,w=function(y){i(y)};try{S.createObjectStore("t",{autoIncrement:!0}).put(new Blob),w(!1)}catch(y){(y instanceof Error&&typeof y.message=="string"?y.message:String(y)).includes("are not yet supported")?w(!0):w(!1)}finally{S.close(),indexedDB.deleteDatabase(v)}},p.onerror=function(){return i(!1)}}catch{i(!1)}})():(function(){var v=window.openDatabase,p=window.localStorage;try{v(null,null,null,null)}catch{return void i(!0)}try{p.setItem("test","1"),p.removeItem("test")}catch{return void i(!0)}i(!1)})(),d.label=3;case 3:return[2]}})})}function l(){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(h,d){var v=Math.round(d/1048576),p=2*Math.round((function(){var g,S,w,y=window;return(w=(S=(g=y?.performance)===null||g===void 0?void 0:g.memory)===null||S===void 0?void 0:S.jsHeapSizeLimit)!==null&&w!==void 0?w:1073741824})()/1048576);i(v<p)},function(h){r(new Error("detectIncognito somehow failed to query storage quota: "+h.message))})}function u(){self.Promise!==void 0&&self.Promise.allSettled!==void 0?l():(0,window.webkitRequestFileSystem)(0,1,function(){i(!1)},function(){i(!0)})}function f(){var h;return jr(this,void 0,Promise,function(){var d,v,p;return Ur(this,function(g){switch(g.label){case 0:if(typeof((h=navigator.storage)===null||h===void 0?void 0:h.getDirectory)!="function")return[3,5];g.label=1;case 1:return g.trys.push([1,3,,4]),[4,navigator.storage.getDirectory()];case 2:return g.sent(),i(!1),[3,4];case 3:return d=g.sent(),v=d instanceof Error&&typeof d.message=="string"?d.message:String(d),i(v.includes("Security error")),[2];case 4:return[3,6];case 5:(p=indexedDB.open("inPrivate")).onerror=function(S){p.error&&p.error.name==="InvalidStateError"&&S.preventDefault(),i(!0)},p.onsuccess=function(){indexedDB.deleteDatabase("inPrivate"),i(!1)},g.label=6;case 6:return[2]}})})}(function(){return jr(this,void 0,Promise,function(){return Ur(this,function(h){switch(h.label){case 0:return o()!==44&&o()!==43?[3,2]:(n="Safari",[4,c()]);case 1:return h.sent(),[3,6];case 2:return o()!==51?[3,3]:(d=navigator.userAgent,n=d.match(/Chrome/)?navigator.brave!==void 0?"Brave":d.match(/Edg/)?"Edge":d.match(/OPR/)?"Opera":"Chrome":"Chromium",u(),[3,6]);case 3:return o()!==25?[3,5]:(n="Firefox",[4,f()]);case 4:return h.sent(),[3,6];case 5:navigator.msSaveBlob!==void 0?(n="Internet Explorer",i(window.indexedDB===void 0)):r(new Error("detectIncognito cannot determine the browser")),h.label=6;case 6:return[2]}var d})})})().catch(r)})];case 1:return[2,t.sent()]}})})}typeof window<"u"&&(window.detectIncognito=Hs);const Rg=Hs;zs.A;const Og=zs.k,hn="sesamy_incognito_mode";function Bs(){try{const t=sessionStorage.getItem(hn);return t===null?void 0:t==="true"}catch{return}}async function Cg(){try{const t=sessionStorage.getItem(hn);if(t!==null)return t==="true";const{isPrivate:e}=await Og();return sessionStorage.setItem(hn,e.toString()),e}catch{try{sessionStorage.setItem(hn,"false")}catch{}return!1}}function Br(){return typeof window<"u"}function gd(t,e,r,n,a){for(e=e.split?e.split("."):e,n=0;n<e.length;n++)t=t?t[e[n]]:a;return t===a?r:t}var Ag="function",jg="string",ot="undefined",Ug="boolean",Sn="object",qg="array",Lg="number",Ng="symbol",$g="null",ds=function(){},Ev="any",_v="*",Jt="__",xg="form",Dg="input",Mg="button",Fg="select",In=typeof process!==ot?process:{};In.env&&In.env.NODE_ENV;var Ne=typeof document!==ot;In.versions!=null&&In.versions.node!=null;typeof Deno!==ot&&Deno.core;Ne&&window.name==="nodejs"||typeof navigator!==ot&&typeof navigator.userAgent!==ot&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));function Tv(t,e){return e.charAt(0)[t]()+e.slice(1)}var Kg=Tv.bind(null,"toUpperCase"),zg=Tv.bind(null,"toLowerCase");function Hg(t){return kv(t)?Kg($g):typeof t===Sn?Vg(t):Object.prototype.toString.call(t).slice(8,-1)}function Pn(t,e){e===void 0&&(e=!0);var r=Hg(t);return e?zg(r):r}function tn(t,e){return typeof e===t}var We=tn.bind(null,Ag),jt=tn.bind(null,jg),ur=tn.bind(null,ot),Bg=tn.bind(null,Ug);tn.bind(null,Ng);function kv(t){return t===null}function Gg(t){return Pn(t)===Lg&&!isNaN(t)}function Rv(t){return Pn(t)===qg}function Ge(t){if(!Wg(t))return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Wg(t){return t&&(typeof t===Sn||t!==null)}function Vg(t){return We(t.constructor)?t.constructor.name:null}function Jg(t){return t instanceof Error||jt(t.message)&&t.constructor&&Gg(t.constructor.stackTraceLimit)}function Ov(t,e){if(typeof e!="object"||kv(e))return!1;if(e instanceof t)return!0;var r=Pn(new t(""));if(Jg(e))for(;e;){if(Pn(e)===r)return!0;e=Object.getPrototypeOf(e)}return!1}Ov.bind(null,TypeError);Ov.bind(null,SyntaxError);function Hn(t,e){var r=t instanceof Element||t instanceof HTMLDocument;return r&&e?Zg(t,e):r}function Zg(t,e){return e===void 0&&(e=""),t&&t.nodeName===e.toUpperCase()}function Bn(t){var e=[].slice.call(arguments,1);return function(){return t.apply(void 0,[].slice.call(arguments).concat(e))}}Bn(Hn,xg);Bn(Hn,Mg);Bn(Hn,Dg);Bn(Hn,Fg);function Yg(t){return t?Rv(t)?t:[t]:[]}function yd(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch{return null}}function Xg(){if(Ne){var t=navigator,e=t.languages;return t.userLanguage||(e&&e.length?e[0]:t.language)}}function Qg(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function ey(t){return(function(e){for(var r,n=Object.create(null),a=/([^&=]+)=?([^&]*)/g;r=a.exec(e);){var i=yd(r[1]),o=yd(r[2]);if(i)if(i.substring(i.length-2)==="[]"){var s=n[i=i.substring(0,i.length-2)]||(n[i]=[]);n[i]=Array.isArray(s)?s:[],n[i].push(o)}else n[i]=o===""||o}for(var c in n){var l=c.split("[");l.length>1&&(ty(n,l.map(function(u){return u.replace(/[?[\]\\ ]/g,"")}),n[c]),delete n[c])}return n})((function(e){return Ne&&window.location.search.substring(1)})())}function ty(t,e,r){for(var n=e.length-1,a=0;a<n;++a){var i=e[a];if(i==="__proto__"||i==="constructor")break;i in t||(t[i]={}),t=t[i]}t[e[n]]=r}function Gn(){for(var t="",e=0,r=4294967295*Math.random()|0;e++<36;){var n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"[e-1],a=15&r;t+=n=="-"||n=="4"?n:(n=="x"?a:3&a|8).toString(16),r=e%8==0?4294967295*Math.random()|0:r>>4}return t}function ry(t,e){var r,n,a,i=null,o=0,s=function(){o=new Date,i=null,a=t.apply(r,n)};return function(){var c=new Date;o||(o=c);var l=e-(c-o);return r=this,n=arguments,l<=0?(clearTimeout(i),i=null,o=c,a=t.apply(r,n)):i||(i=setTimeout(s,l)),a}}var Ht="global",pr=Jt+Ht+Jt,mr=typeof self===Sn&&self.self===self&&self||typeof global===Sn&&global[Ht]===global&&global||void 0;function Zt(t){return mr[pr][t]}function Yt(t,e){return mr[pr][t]=e}function Tr(t){delete mr[pr][t]}function kr(t,e,r){var n;try{if(Gs(t)){var a=window[t];n=a[e].bind(a)}}catch{}return n||r}mr[pr]||(mr[pr]={});var nn={};function Gs(t){if(typeof nn[t]!==ot)return nn[t];try{var e=window[t];e.setItem(ot,ot),e.removeItem(ot)}catch{return nn[t]=!1}return nn[t]=!0}function ae(){return ae=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ae.apply(null,arguments)}var Ct="function",Pt="undefined",Kr="reducer",Cv="@@redux/",hs=Cv+"INIT",ny=Cv+Math.random().toString(36),wd=(function(){return typeof Symbol===Ct&&Symbol.observable||"@@observable"})(),an=" != "+Ct;function Av(t,e,r){var n;if(typeof e===Ct&&typeof r===Pt&&(r=e,e=void 0),typeof r!==Pt){if(typeof r!==Ct)throw new Error("enhancer"+an);return r(Av)(t,e)}if(typeof t!==Ct)throw new Error(Kr+an);var a=t,i=e,o=[],s=o,c=!1;function l(){s===o&&(s=o.slice())}function u(){return i}function f(d){if(typeof d!==Ct)throw new Error("Listener"+an);var v=!0;return l(),s.push(d),function(){if(v){v=!1,l();var p=s.indexOf(d);s.splice(p,1)}}}function h(d){if(!Ge(d))throw new Error("Act != obj");if(typeof d.type===Pt)throw new Error("ActType "+Pt);if(c)throw new Error("Dispatch in "+Kr);try{c=!0,i=a(i,d)}finally{c=!1}for(var v=o=s,p=0;p<v.length;p++)(0,v[p])();return d}return h({type:hs}),(n={dispatch:h,subscribe:f,getState:u,replaceReducer:function(d){if(typeof d!==Ct)throw new Error("next "+Kr+an);a=d,h({type:hs})}})[wd]=function(){var d,v=f;return(d={subscribe:function(p){if(typeof p!="object")throw new TypeError("Observer != obj");function g(){p.next&&p.next(u())}return g(),{unsubscribe:v(g)}}})[wd]=function(){return this},d},n}function ay(t,e){var r=e&&e.type;return"action "+(r&&r.toString()||"?")+Kr+" "+t+" returns "+Pt}function gr(){var t=[].slice.call(arguments);return t.length===0?function(e){return e}:t.length===1?t[0]:t.reduce(function(e,r){return function(){return e(r.apply(void 0,[].slice.call(arguments)))}})}function iy(){var t=arguments;return function(e){return function(r,n,a){var i,o=e(r,n,a),s=o.dispatch,c={getState:o.getState,dispatch:function(l){return s(l)}};return i=[].slice.call(t).map(function(l){return l(c)}),ae({},o,{dispatch:s=gr.apply(void 0,i)(o.dispatch)})}}}var Ut=Jt+"anon_id",Bt=Jt+"user_id",fr=Jt+"user_traits",vs="analytics",Ot="userId",lr="anonymousId",vn=["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"],ps=["name","EVENTS","config","loaded"],ne=vn.reduce(function(t,e){return t[e]=e,t},{registerPluginType:function(t){return"registerPlugin:"+t},pluginReadyType:function(t){return"ready:"+t}}),bd=/^utm_/,Sd=/^an_prop_/,Id=/^an_trait_/;function oy(t){var e=t.storage.setItem;return function(r){return function(n){return function(a){if(a.type===ne.bootstrap){var i=a.params,o=a.user,s=a.persistedUser,c=a.initialUser,l=s.userId===o.userId;s.anonymousId!==o.anonymousId&&e(Ut,o.anonymousId),l||e(Bt,o.userId),c.traits&&e(fr,ae({},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,p){if(p.match(bd)||p.match(/^(d|g)clid/)){var g=p.replace(bd,"");v.campaign[g==="campaign"?"name":g]=i[p]}return p.match(Sd)&&(v.props[p.replace(Sd,"")]=i[p]),p.match(Id)&&(v.traits[p.replace(Id,"")]=i[p]),v},{campaign:{},props:{},traits:{}});r.dispatch(ae({type:ne.params,raw:i},d,f?{userId:f}:{})),f&&setTimeout(function(){return t.identify(f,d.traits)},0),h&&setTimeout(function(){return t.track(h,d.props)},0),Object.keys(d.campaign).length&&r.dispatch({type:ne.campaign,campaign:d.campaign})}}return n(a)}}}}function sy(t){return function(e,r){if(e===void 0&&(e={}),r===void 0&&(r={}),r.type===ne.setItemEnd){if(r.key===Ut)return ae({},e,{anonymousId:r.value});if(r.key===Bt)return ae({},e,{userId:r.value})}switch(r.type){case ne.identify:return Object.assign({},e,{userId:r.userId,traits:ae({},e.traits,r.traits)});case ne.reset:return[Bt,Ut,fr].forEach(function(n){t.removeItem(n)}),Object.assign({},e,{userId:null,anonymousId:null,traits:{}});default:return e}}}function Pd(t){return{userId:t.getItem(Bt),anonymousId:t.getItem(Ut),traits:t.getItem(fr)}}var ms=function(t){return Jt+"TEMP"+Jt+t};function cy(t){var e=t.storage,r=e.setItem,n=e.removeItem,a=e.getItem;return function(i){return function(o){return function(s){var c=s.userId,l=s.traits,u=s.options;if(s.type===ne.reset&&([Bt,fr,Ut].forEach(function(d){n(d)}),[Ot,lr,"traits"].forEach(function(d){Tr(ms(d))})),s.type===ne.identify){a(Ut)||r(Ut,Gn());var f=a(Bt),h=a(fr)||{};f&&f!==c&&i.dispatch({type:ne.userIdChanged,old:{userId:f,traits:h},new:{userId:c,traits:l},options:u}),c&&r(Bt,c),l&&r(fr,ae({},h,l))}return o(s)}}}}var $r={};function Ed(t,e){$r[t]&&We($r[t])&&($r[t](e),delete $r[t])}function jv(t,e,r){return new Promise(function(n,a){return e()?n(t):r<1?a(ae({},t,{queue:!0})):new Promise(function(i){return setTimeout(i,10)}).then(function(i){return jv(t,e,r-10).then(n,a)})})}function uy(t){return{abort:t}}function Uv(t,e,r){var n={},a=e(),i=t.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,p=a[d][v];if(p&&We(p)){var g,S=(function(m,b){return m===void 0&&(m={}),b===void 0&&(b={}),[Ot,lr].reduce(function(O,A){return m.hasOwnProperty(A)&&b[A]&&b[A]!==m[A]&&(O[A]=b[A]),O},m)})(h.payload,c),w=n[S.meta.rid];if(!w&&(g=p({payload:S,config:o[d].config,instance:r,abort:uy}))&&Ge(g)&&g.abort)return void(n[S.meta.rid]=!0);if(!w){var y=v+":"+d;t.dispatch(ae({},S,{type:y,_:{called:y,from:"queueDrain"}}))}}});var u=s.actions.filter(function(f,h){return!~l.processIndex.indexOf(h)});s.actions=u}}}var Wo=function(t){var e=t.data,r=t.action,n=t.instance,a=t.state,i=t.allPlugins,o=t.allMatches,s=t.store,c=t.EVENTS;try{var l=a.plugins,u=a.context,f=r.type,h=f.match(dr),d=e.exact.map(function(g){return g.pluginName});h&&(d=o.during.map(function(g){return g.pluginName}));var v=(function(g,S){return function(w,y,m){var b=y.config,O=y.name,A=O+"."+w.type;m&&(A=m.event);var L=w.type.match(dr)?(function(z,B,ie,q,D){return function(N,R){var Y=q?q.name:z,te=R&&Gr(R)?R:ie;if(q&&(!(te=R&&Gr(R)?R:[z]).includes(z)||te.length!==1))throw new Error("Method "+B+" can only abort "+z+" plugin. "+JSON.stringify(te)+" input valid");return ae({},D,{abort:{reason:N,plugins:te,caller:B,_:Y}})}})(O,A,S,m,w):(function(z,B){return function(){throw new Error(z.type+" action not cancellable. Remove abort in "+B)}})(w,A);return{payload:ly(w),instance:g,config:b||{},abort:L}}})(n,d),p=e.exact.reduce(function(g,S){var w=S.pluginName,y=S.methodName,m=!1;return y.match(/^initialize/)||y.match(/^reset/)||(m=!l[w].loaded),u.offline&&y.match(/^(page|track|identify)/)&&(m=!0),g[""+w]=m,g},{});return Promise.resolve(e.exact.reduce(function(g,S,w){var y=S.pluginName;return Promise.resolve(g).then(function(m){function b(){return Promise.resolve(m)}var O=(function(){if(e.namespaced&&e.namespaced[y])return Promise.resolve(e.namespaced[y].reduce(function(A,L,z){return Promise.resolve(A).then(function(B){return L.method&&We(L.method)?((function(N,R){var Y=Ad(N);if(Y&&Y.name===R){var te=Ad(Y.method);throw new Error([R+" plugin is calling method "+N,"Plugins cant call self","Use "+Y.method+" "+(te?"or "+te.method:"")+" in "+R+" plugin insteadof "+N].join(`
|
|
35
|
-
`))}})(L.methodName,L.pluginName),Promise.resolve(L.method({payload:B,instance:n,abort:(ie=B,q=y,D=L.pluginName,function(N,R){return ae({},ie,{abort:{reason:N,plugins:R||[q],caller:f,from:D||q}})}),config:kd(L.pluginName,l,i),plugins:l})).then(function(N){var R=Ge(N)?N:{};return Promise.resolve(ae({},B,R))})):B;var ie,q,D})},Promise.resolve(r))).then(function(A){m[y]=A});m[y]=r})();return O&&O.then?O.then(b):b()})},Promise.resolve({}))).then(function(g){return Promise.resolve(e.exact.reduce(function(S,w,y){try{var m=e.exact.length===y+1,b=w.pluginName,O=i[b];return Promise.resolve(S).then(function(A){var L=g[b]?g[b]:{};if(h&&(L=A),Jo(L,b))return Vo({data:L,method:f,instance:n,pluginName:b,store:s}),Promise.resolve(A);if(Jo(A,b))return m&&Vo({data:A,method:f,instance:n,store:s}),Promise.resolve(A);if(p.hasOwnProperty(b)&&p[b]===!0)return s.dispatch({type:"queue",plugin:b,payload:L,_:{called:"queue",from:"queueMechanism"}}),Promise.resolve(A);var z=v(g[b],i[b]);return Promise.resolve(O[f]({abort:z.abort,payload:L,instance:n,config:kd(b,l,i),plugins:l})).then(function(B){var ie=Ge(B)?B:{},q=ae({},A,ie),D=g[b];if(Jo(D,b))Vo({data:D,method:f,instance:n,pluginName:b,store:s});else{var N=f+":"+b;(N.match(/:/g)||[]).length<2&&!f.match(_d)&&!f.match(Td)&&n.dispatch(ae({},h?q:L,{type:N,_:{called:N,from:"submethod"}}))}return Promise.resolve(q)})})}catch(A){return Promise.reject(A)}},Promise.resolve(r))).then(function(S){if(!(f.match(dr)||f.match(/^registerPlugin/)||f.match(Td)||f.match(_d)||f.match(/^params/)||f.match(/^userIdChanged/))){if(c.plugins.includes(f),S._&&S._.originalAction===f)return S;var w=ae({},S,{_:{originalAction:S.type,called:S.type,from:"engineEnd"}});qv(S,e.exact.length)&&!f.match(/End$/)&&(w=ae({},w,{type:S.type+"Aborted"})),s.dispatch(w)}return S})})}catch(g){return Promise.reject(g)}},dr=/Start$/,_d=/^bootstrap/,Td=/^ready/;function Vo(t){var e=t.pluginName,r=t.method+"Aborted"+(e?":"+e:"");t.store.dispatch(ae({},t.data,{type:r,_:{called:r,from:"abort"}}))}function kd(t,e,r){var n=e[t]||r[t];return n&&n.config?n.config:{}}function Rd(t,e){return e.reduce(function(r,n){return n[t]?r.concat({methodName:t,pluginName:n.name,method:n[t]}):r},[])}function Od(t,e){var r=t.replace(dr,""),n=e?":"+e:"";return[""+t+n,""+r+n,r+"End"+n]}function Jo(t,e){var r=t.abort;return!!r&&(r===!0||Cd(r,e)||r&&Cd(r.plugins,e))}function qv(t,e){var r=t.abort;if(!r)return!1;if(r===!0||jt(r))return!0;var n=r.plugins;return Gr(r)&&r.length===e||Gr(n)&&n.length===e}function Gr(t){return Array.isArray(t)}function Cd(t,e){return!(!t||!Gr(t))&&t.includes(e)}function Ad(t){var e=t.match(/(.*):(.*)/);return!!e&&{method:e[1],name:e[2]}}function ly(t){return Object.keys(t).reduce(function(e,r){return r==="type"||(e[r]=Ge(t[r])?Object.assign({},t[r]):t[r]),e},{})}function fy(t,e,r){var n={};return function(a){return function(i){return function(o){try{var s,c=function(m){return s?m:i(f)},l=o.type,u=o.plugins,f=o;if(o.abort)return Promise.resolve(i(o));if(l===ne.enablePlugin&&a.dispatch({type:ne.initializeStart,plugins:u,disabled:[],fromEnable:!0,meta:o.meta}),l===ne.disablePlugin&&setTimeout(function(){return Ed(o.meta.rid,{payload:o})},0),l===ne.initializeEnd){var h=e(),d=Object.keys(h),v=d.filter(function(m){return u.includes(m)}).map(function(m){return h[m]}),p=[],g=[],S=o.disabled,w=v.map(function(m){var b=m.loaded,O=m.name,A=m.config;return jv(m,function(){return b({config:A})},1e4).then(function(L){return n[O]||(a.dispatch({type:ne.pluginReadyType(O),name:O,events:Object.keys(m).filter(function(z){return!ps.includes(z)})}),n[O]=!0),p=p.concat(O),m}).catch(function(L){if(L instanceof Error)throw new Error(L);return g=g.concat(L.name),L})});Promise.all(w).then(function(m){var b={plugins:p,failed:g,disabled:S};setTimeout(function(){d.length===w.length+S.length&&a.dispatch(ae({},{type:ne.ready},b))},0)})}var y=(function(){if(l!==ne.bootstrap)return/^ready:([^:]*)$/.test(l)&&setTimeout(function(){return Uv(a,e,t)},0),Promise.resolve((function(m,b,O,A,L){try{var z=We(b)?b():b,B=m.type,ie=B.replace(dr,"");if(m._&&m._.called)return Promise.resolve(m);var q=O.getState(),D=(Y=z,(te=q.plugins)===void 0&&(te={}),(Q=m.options)===void 0&&(Q={}),Object.keys(Y).filter(function(I){var T=Q.plugins||{};return Bg(T[I])?T[I]:T.all!==!1&&(!te[I]||te[I].enabled!==!1)}).map(function(I){return Y[I]}));B===ne.initializeStart&&m.fromEnable&&(D=Object.keys(q.plugins).filter(function(I){var T=q.plugins[I];return m.plugins.includes(I)&&!T.initialized}).map(function(I){return z[I]}));var N=D.map(function(I){return I.name}),R=(function(I,T){var $=Od(I).map(function(F){return Rd(F,T)});return T.reduce(function(F,Z){var V=Z.name,he=Od(I,V).map(function(_e){return Rd(_e,T)}),oe=he[0],le=he[1],se=he[2];return oe.length&&(F.beforeNS[V]=oe),le.length&&(F.duringNS[V]=le),se.length&&(F.afterNS[V]=se),F},{before:$[0],beforeNS:{},during:$[1],duringNS:{},after:$[2],afterNS:{}})})(B,D);return Promise.resolve(Wo({action:m,data:{exact:R.before,namespaced:R.beforeNS},state:q,allPlugins:z,allMatches:R,instance:O,store:A,EVENTS:L})).then(function(I){function T(){var Z=(function(){if(B.match(dr))return Promise.resolve(Wo({action:ae({},$,{type:ie+"End"}),data:{exact:R.after,namespaced:R.afterNS},state:q,allPlugins:z,allMatches:R,instance:O,store:A,EVENTS:L})).then(function(V){V.meta&&V.meta.hasCallback&&Ed(V.meta.rid,{payload:V})})})();return Z&&Z.then?Z.then(function(){return I}):I}if(qv(I,N.length))return I;var $,F=(function(){if(B!==ie)return Promise.resolve(Wo({action:ae({},I,{type:ie}),data:{exact:R.during,namespaced:R.duringNS},state:q,allPlugins:z,allMatches:R,instance:O,store:A,EVENTS:L})).then(function(Z){$=Z});$=I})();return F&&F.then?F.then(T):T()})}catch(I){return Promise.reject(I)}var Y,te,Q})(o,e,t,a,r)).then(function(m){var b=i(m);return s=1,b})})();return Promise.resolve(y&&y.then?y.then(c):c(y))}catch(m){return Promise.reject(m)}}}}}function dy(t){return function(e){return function(r){return function(n){var a=n.type,i=n.key,o=n.value,s=n.options;if(a===ne.setItem||a===ne.removeItem){if(n.abort)return r(n);a===ne.setItem?t.setItem(i,o,s):t.removeItem(i,s)}return r(n)}}}}var hy=function(){var t=this;this.before=[],this.after=[],this.addMiddleware=function(e,r){t[r]=t[r].concat(e)},this.removeMiddleware=function(e,r){var n=t[r].findIndex(function(a){return a===e});n!==-1&&(t[r]=[].concat(t[r].slice(0,n),t[r].slice(n+1)))},this.dynamicMiddlewares=function(e){return function(r){return function(n){return function(a){var i={getState:r.getState,dispatch:function(s){return r.dispatch(s)}},o=t[e].map(function(s){return s(i)});return gr.apply(void 0,o)(n)(a)}}}}};function vy(t){return function(e,r){e===void 0&&(e={});var n={};if(r.type==="initialize:aborted")return e;if(/^registerPlugin:([^:]*)$/.test(r.type)){var a=jd(r.type,"registerPlugin"),i=t()[a];if(!i||!a)return e;var o=r.enabled,s=i.config;return n[a]={enabled:o,initialized:!!o&&!i.initialize,loaded:!!o&&!!i.loaded({config:s}),config:s},ae({},e,n)}if(/^initialize:([^:]*)$/.test(r.type)){var c=jd(r.type,ne.initialize),l=t()[c];return l&&c?(n[c]=ae({},e[c],{initialized:!0,loaded:!!l.loaded({config:l.config})}),ae({},e,n)):e}if(/^ready:([^:]*)$/.test(r.type))return n[r.name]=ae({},e[r.name],{loaded:!0}),ae({},e,n);switch(r.type){case ne.disablePlugin:return ae({},e,Ud(r.plugins,!1,e));case ne.enablePlugin:return ae({},e,Ud(r.plugins,!0,e));default:return e}}}function jd(t,e){return t.substring(e.length+1,t.length)}function Ud(t,e,r){return t.reduce(function(n,a){return n[a]=ae({},r[a],{enabled:e}),n},r)}function Lv(t){try{return JSON.parse(JSON.stringify(t))}catch{}return t}var py={last:{},history:[]};function my(t,e){t===void 0&&(t=py);var r=e.options,n=e.meta;if(e.type===ne.track){var a=Lv(ae({event:e.event,properties:e.properties},Object.keys(r).length&&{options:r},{meta:n}));return ae({},t,{last:a,history:t.history.concat(a)})}return t}var gy={actions:[]};function yy(t,e){t===void 0&&(t=gy);var r=e.payload;switch(e.type){case"queue":var n;return n=r&&r.type&&r.type===ne.identify?[e].concat(t.actions):t.actions.concat(e),ae({},t,{actions:n});case"dequeue":return[];default:return t}}var Nv=/#.*$/;function wy(t){var e=/(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(t);return"/"+(e&&e[3]?e[3].split("?")[0].replace(Nv,""):"")}var $v,xv,Dv,Mv,by=function(t){if(t===void 0&&(t={}),!Ne)return t;var e=document,r=e.title,n=e.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(Ne){for(var v,p=document.getElementsByTagName("link"),g=0;v=p[g];g++)if(v.getAttribute("rel")==="canonical")return v.getAttribute("href")}})();return d?d.match(/\?/)?d:d+h:window.location.href.replace(Nv,"")})(l),f={title:r,url:u,path:wy(u),hash:c,search:l,width:o,height:s};return n&&n!==""&&(f.referrer=n),ae({},f,t)},Sy={last:{},history:[]};function Iy(t,e){t===void 0&&(t=Sy);var r=e.options;if(e.type===ne.page){var n=Lv(ae({properties:e.properties,meta:e.meta},Object.keys(r).length&&{options:r}));return ae({},t,{last:n,history:t.history.concat(n)})}return t}$v=(function(){if(!Ne)return!1;var t=navigator.appVersion;return~t.indexOf("Win")?"Windows":~t.indexOf("Mac")?"MacOS":~t.indexOf("X11")?"UNIX":~t.indexOf("Linux")?"Linux":"Unknown OS"})(),xv=Ne?document.referrer:null,Dv=Xg(),Mv=Qg();var qd={initialized:!1,sessionId:Gn(),app:null,version:null,debug:!1,offline:!!Ne&&!navigator.onLine,os:{name:$v},userAgent:Ne?navigator.userAgent:"node",library:{name:vs,version:"0.13.1"},timezone:Mv,locale:Dv,campaign:{},referrer:xv};function Py(t,e){t===void 0&&(t=qd);var r=t.initialized,n=e.campaign;switch(e.type){case ne.campaign:return ae({},t,{campaign:n});case ne.offline:return ae({},t,{offline:!0});case ne.online:return ae({},t,{offline:!1});default:return r?t:ae({},qd,t,{initialized:!0})}}var Ey=["plugins","reducers","storage"];function _y(t,e,r){if(Ne){var n=window[(r?"add":"remove")+"EventListener"];t.split(" ").forEach(function(a){n(a,e)})}}function Ty(t){var e=_y.bind(null,"online offline",function(r){return Promise.resolve(!navigator.onLine).then(t)});return e(!0),function(r){return e(!1)}}function Fv(){return Yt(vs,[]),function(t){return function(e,r,n){var a=t(e,r,n),i=a.dispatch;return Object.assign(a,{dispatch:function(o){return mr[pr][vs].push(o.action||o),i(o)}})}}}function Ld(t){return function(){return gr(gr.apply(null,arguments),Fv())}}function Zo(t){return t?Rv(t)?t:[t]:[]}function Nd(t,e,r){t===void 0&&(t={});var n,a,i=Gn();return e&&($r[i]=(n=e,a=(function(o){for(var s,c=o||Array.prototype.slice.call(arguments),l=0;l<c.length;l++)if(We(c[l])){s=c[l];break}return s})(r),function(o){a&&a(o),n(o)})),ae({},t,{rid:i,ts:new Date().getTime()},e?{hasCallback:!0}:{})}function ky(t){t===void 0&&(t={});var e=t.reducers||{},r=t.initialUser||{},n=(t.plugins||[]).reduce(function(I,T){if(We(T))return I.middlewares=I.middlewares.concat(T),I;if(T.NAMESPACE&&(T.name=T.NAMESPACE),!T.name)throw new Error("https://lytics.dev/errors/1");T.config||(T.config={});var $=T.EVENTS?Object.keys(T.EVENTS).map(function(V){return T.EVENTS[V]}):[];I.pluginEnabled[T.name]=!(T.enabled===!1||T.config.enabled===!1),delete T.enabled,T.methods&&(I.methods[T.name]=Object.keys(T.methods).reduce(function(V,he){var oe;return V[he]=(oe=T.methods[he],function(){for(var le=Array.prototype.slice.call(arguments),se=new Array(oe.length),_e=0;_e<le.length;_e++)se[_e]=le[_e];return se[se.length]=b,oe.apply({instance:b},se)}),V},{}),delete T.methods);var F=Object.keys(T).concat($),Z=new Set(I.events.concat(F));if(I.events=Array.from(Z),I.pluginsArray=I.pluginsArray.concat(T),I.plugins[T.name])throw new Error(T.name+"AlreadyLoaded");return I.plugins[T.name]=T,I.plugins[T.name].loaded||(I.plugins[T.name].loaded=function(){return!0}),I},{plugins:{},pluginEnabled:{},methods:{},pluginsArray:[],middlewares:[],events:[]}),a=t.storage?t.storage:{getItem:Zt,setItem:Yt,removeItem:Tr},i=(function(I){return function(T,$,F){return $.getState("user")[T]||(F&&Ge(F)&&F[T]?F[T]:Pd(I)[T]||Zt(ms(T))||null)}})(a),o=n.plugins,s=n.events.filter(function(I){return!ps.includes(I)}).sort(),c=new Set(s.concat(vn).filter(function(I){return!ps.includes(I)})),l=Array.from(c).sort(),u=function(){return o},f=new hy,h=f.addMiddleware,d=f.removeMiddleware,v=f.dynamicMiddlewares,p=function(){throw new Error("Abort disabled inListener")},g=ey(),S=Pd(a),w=ae({},S,r,g.an_uid?{userId:g.an_uid}:{},g.an_aid?{anonymousId:g.an_aid}:{});w.anonymousId||(w.anonymousId=Gn());var y=ae({enable:function(I,T){return new Promise(function($){R.dispatch({type:ne.enablePlugin,plugins:Zo(I),_:{originalAction:ne.enablePlugin}},$,[T])})},disable:function(I,T){return new Promise(function($){R.dispatch({type:ne.disablePlugin,plugins:Zo(I),_:{originalAction:ne.disablePlugin}},$,[T])})}},n.methods),m=!1,b={identify:function(I,T,$,F){try{var Z=jt(I)?I:null,V=Ge(I)?I:T,he=$||{},oe=b.user();Yt(ms(Ot),Z);var le=Z||V.userId||i(Ot,b,V);return Promise.resolve(new Promise(function(se){R.dispatch(ae({type:ne.identifyStart,userId:le,traits:V||{},options:he,anonymousId:oe.anonymousId},oe.id&&oe.id!==Z&&{previousId:oe.id}),se,[T,$,F])}))}catch(se){return Promise.reject(se)}},track:function(I,T,$,F){try{var Z=Ge(I)?I.event:I;if(!Z||!jt(Z))throw new Error("EventMissing");var V=Ge(I)?I:T||{},he=Ge($)?$:{};return Promise.resolve(new Promise(function(oe){R.dispatch({type:ne.trackStart,event:Z,properties:V,options:he,userId:i(Ot,b,T),anonymousId:i(lr,b,T)},oe,[T,$,F])}))}catch(oe){return Promise.reject(oe)}},page:function(I,T,$){try{var F=Ge(I)?I:{},Z=Ge(T)?T:{};return Promise.resolve(new Promise(function(V){R.dispatch({type:ne.pageStart,properties:by(F),options:Z,userId:i(Ot,b,F),anonymousId:i(lr,b,F)},V,[I,T,$])}))}catch(V){return Promise.reject(V)}},user:function(I){if(I===Ot||I==="id")return i(Ot,b);if(I===lr||I==="anonId")return i(lr,b);var T=b.getState("user");return I?gd(T,I):T},reset:function(I){return new Promise(function(T){R.dispatch({type:ne.resetStart},T,I)})},ready:function(I){return m&&I({plugins:y,instance:b}),b.on(ne.ready,function(T){I&&I(T),m=!0})},on:function(I,T){if(!I||!We(T))return!1;if(I===ne.bootstrap)throw new Error(".on disabled for "+I);var $=/Start$|Start:/;if(I==="*"){var F=function(oe){return function(le){return function(se){return se.type.match($)&&T({payload:se,instance:b,plugins:o}),le(se)}}},Z=function(oe){return function(le){return function(se){return se.type.match($)||T({payload:se,instance:b,plugins:o}),le(se)}}};return h(F,on),h(Z,sn),function(){d(F,on),d(Z,sn)}}var V=I.match($)?on:sn,he=function(oe){return function(le){return function(se){return se.type===I&&T({payload:se,instance:b,plugins:o,abort:p}),le(se)}}};return h(he,V),function(){return d(he,V)}},once:function(I,T){if(!I||!We(T))return!1;if(I===ne.bootstrap)throw new Error(".once disabled for "+I);var $=b.on(I,function(F){T({payload:F.payload,instance:b,plugins:o,abort:p}),$()});return $},getState:function(I){var T=R.getState();return I?gd(T,I):Object.assign({},T)},dispatch:function(I){var T=jt(I)?{type:I}:I;if(vn.includes(T.type))throw new Error("reserved action "+T.type);var $=ae({},T,{_:ae({originalAction:T.type},I._||{})});R.dispatch($)},enablePlugin:y.enable,disablePlugin:y.disable,plugins:y,storage:{getItem:a.getItem,setItem:function(I,T,$){R.dispatch({type:ne.setItemStart,key:I,value:T,options:$})},removeItem:function(I,T){R.dispatch({type:ne.removeItemStart,key:I,options:T})}},setAnonymousId:function(I,T){b.storage.setItem(Ut,I,T)},events:{core:vn,plugins:s}},O=n.middlewares.concat([function(I){return function(T){return function($){return $.meta||($.meta=Nd()),T($)}}},v(on),fy(b,u,{all:l,plugins:s}),dy(a),oy(b),cy(b),v(sn)]),A={context:Py,user:sy(a),page:Iy,track:my,plugins:vy(u),queue:yy},L=gr,z=gr;if(Ne&&t.debug){var B=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;B&&(L=B({trace:!0,traceLimit:25})),z=function(){return arguments.length===0?Fv():Ge(typeof arguments[0])?Ld():Ld().apply(null,arguments)}}var ie,q=(function(I){return Object.keys(I).reduce(function(T,$){return Ey.includes($)||(T[$]=I[$]),T},{})})(t),D=n.pluginsArray.reduce(function(I,T){var $=T.name,F=T.config,Z=T.loaded,V=n.pluginEnabled[$];return I[$]={enabled:V,initialized:!!V&&!T.initialize,loaded:!!Z({config:F}),config:F},I},{}),N={context:q,user:w,plugins:D},R=Av((function(I){for(var T=Object.keys(I),$={},F=0;F<T.length;F++){var Z=T[F];typeof I[Z]===Ct&&($[Z]=I[Z])}var V,he=Object.keys($);try{(function(oe){Object.keys(oe).forEach(function(le){var se=oe[le];if(typeof se(void 0,{type:hs})===Pt||typeof se(void 0,{type:ny})===Pt)throw new Error(Kr+" "+le+" "+Pt)})})($)}catch(oe){V=oe}return function(oe,le){if(oe===void 0&&(oe={}),V)throw V;for(var se=!1,_e={},Ae=0;Ae<he.length;Ae++){var Me=he[Ae],Re=oe[Me],Je=(0,$[Me])(Re,le);if(typeof Je===Pt){var lt=ay(Me,le);throw new Error(lt)}_e[Me]=Je,se=se||Je!==Re}return se?_e:oe}})(ae({},A,e)),N,z(L(iy.apply(void 0,O))));R.dispatch=(ie=R.dispatch,function(I,T,$){var F=ae({},I,{meta:Nd(I.meta,T,Zo($))});return ie.apply(null,[F])});var Y=Object.keys(o);R.dispatch({type:ne.bootstrap,plugins:Y,config:q,params:g,user:w,initialUser:r,persistedUser:S});var te=Y.filter(function(I){return n.pluginEnabled[I]}),Q=Y.filter(function(I){return!n.pluginEnabled[I]});return R.dispatch({type:ne.registerPlugins,plugins:Y,enabled:n.pluginEnabled}),n.pluginsArray.map(function(I,T){var $=I.bootstrap,F=I.config,Z=I.name;$&&We($)&&$({instance:b,config:F,payload:I}),R.dispatch({type:ne.registerPluginType(Z),name:Z,enabled:n.pluginEnabled[Z],plugin:I}),n.pluginsArray.length===T+1&&R.dispatch({type:ne.initializeStart,plugins:te,disabled:Q})}),Ty(function(I){R.dispatch({type:I?ne.offline:ne.online})}),(function(I,T,$){setInterval(function(){return Uv(I,T,$)},3e3)})(R,u,b),b}var on="before",sn="after",Gt="cookie",Ft=Hv(),Kv=Wn,Ry=Wn;function zv(t){return Ft?Wn(t,"",-1):Tr(t)}function Hv(){if(Ft!==void 0)return Ft;var t=Gt+Gt;try{Wn(t,t),Ft=document.cookie.indexOf(t)!==-1,zv(t)}catch{Ft=!1}return Ft}function Wn(t,e,r,n,a,i){if(typeof window<"u"){var o=arguments.length>1;return Ft===!1&&(o?Yt(t,e):Zt(t)),o?document.cookie=t+"="+encodeURIComponent(e)+(r?"; expires="+new Date(+new Date+1e3*r).toUTCString()+(n?"; path="+n:"")+(a?"; domain="+a:"")+(i?"; secure":""):""):decodeURIComponent((("; "+document.cookie).split("; "+t+"=")[1]||"").split(";")[0])}}var Et="localStorage",Oy=Gs.bind(null,Et);kr(Et,"getItem",Zt);kr(Et,"setItem",Yt);kr(Et,"removeItem",Tr);var _t="sessionStorage",Cy=Gs.bind(null,_t);kr(_t,"getItem",Zt);kr(_t,"setItem",Yt);kr(_t,"removeItem",Tr);function hr(t){var e=t;try{if((e=JSON.parse(t))==="true")return!0;if(e==="false")return!1;if(Ge(e))return e;parseFloat(e)===e&&(e=parseFloat(e))}catch{}if(e!==null&&e!=="")return e}var Ay=Oy(),jy=Cy(),Uy=Hv();function Wt(t,e){if(t){var r=Ws(e),n=!Ys(r),a=Vs(r)?hr(localStorage.getItem(t)):void 0;if(n&&!ur(a))return a;var i=Js(r)?hr(Kv(t)):void 0;if(n&&i)return i;var o=Zs(r)?hr(sessionStorage.getItem(t)):void 0;if(n&&o)return o;var s=Zt(t);return n?s:{localStorage:a,sessionStorage:o,cookie:i,global:s}}}function En(t,e,r){if(t&&!ur(e)){var n={},a=Ws(r),i=JSON.stringify(e),o=!Ys(a);return Vs(a)&&(n[Et]=cn(Et,e,hr(localStorage.getItem(t))),localStorage.setItem(t,i),o)?n[Et]:Js(a)&&(n[Gt]=cn(Gt,e,hr(Kv(t))),Ry(t,i),o)?n[Gt]:Zs(a)&&(n[_t]=cn(_t,e,hr(sessionStorage.getItem(t))),sessionStorage.setItem(t,i),o)?n[_t]:(n[Ht]=cn(Ht,e,Zt(t)),Yt(t,e),o?n[Ht]:n)}}function qy(t,e){if(t){var r=Ws(e),n=Wt(t,_v),a={};return!ur(n.localStorage)&&Vs(r)&&(localStorage.removeItem(t),a[Et]=n.localStorage),!ur(n.cookie)&&Js(r)&&(zv(t),a[Gt]=n.cookie),!ur(n.sessionStorage)&&Zs(r)&&(sessionStorage.removeItem(t),a[_t]=n.sessionStorage),!ur(n.global)&&Vn(r,Ht)&&(Tr(t),a[Ht]=n.global),a}}function Ws(t){return t?jt(t)?t:t.storage:Ev}function Vs(t){return Ay&&Vn(t,Et)}function Js(t){return Uy&&Vn(t,Gt)}function Zs(t){return jy&&Vn(t,_t)}function Ys(t){return t===_v||t==="all"}function Vn(t,e){return t===Ev||t===e||Ys(t)}function cn(t,e,r){return{location:t,current:e,previous:r}}var Ly={setItem:En,getItem:Wt,removeItem:qy};function Ny(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function xd(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?$d(Object(r),!0).forEach(function(n){Ny(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$d(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function $y(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e={storage:Ly};return ky(xd(xd({},e),t))}const Xs="@sesamy/sesamy-js",Jn="1.46.0";function xy(t){if(typeof window>"u")return;const{addEventListener:e,history:r,location:n}=window;let a=n.pathname;e("popstate",()=>t(n.pathname)),["push","replace"].map(i=>{const o=`${i}State`;if(o!=="pushState"&&o!=="replaceState")return;const s=r[o];r[o]=function(...c){const l=c[2]?.toString()||"",u=My(l);return a!==u&&(a=u,setTimeout(()=>t(l),0)),s.apply(r,c)}})}function Dy(t,e){const r=t.indexOf(e);return r>-1?t.slice(0,r):t}function My(t){return["#","?"].forEach(e=>t=Dy(t,e)),t}function Fy(){xy(()=>{St.page()})}var Yo="up",Xo="down";function Ky(t){if(t===void 0&&(t={}),!Ne)return ds;var e=Md(),r=gs(),n=Dd(),a=un(n,e),i=un(r,e),o=[],s=[],c=[],l=n,u=a,f=i,h=Object.keys(t);if(!h.length)return ds;var d=h.map(function(p){return Number(p)}),v=ry(function(){var p=Md(),g=(function(q,D){return D.map(function(N){return N===100?q-5:q*(N/100)})})(p,d),S=gs(),w=Dd(),y=un(w,p),m=un(S,p);if(u=y>u?y:u,f=m<f?m:f,!(o.length>=d.length)){var b=l===w,O=Yo;b?O="initial":l<=w&&(O=Xo);var A=g,L=d;(O===Yo||b)&&(A=g.slice().reverse(),L=d.slice().reverse());var z=L.reduce(function(q,D,N){var R=A[N];return c.includes(D)&&w<=R&&(c=c.filter(function(Y){return Y!==D}),q.singleFunction=D),O===Xo&&!o.includes(D)&&w>=R&&D>i?(s.push(D),q.callbacks=q.callbacks.concat(D),q):O===Yo&&!o.includes(D)&&w<=R&&D<=y?(q.foundFunc=[D],q):(b&&w>=R&&q.foundFunc.length===0&&(q.foundFunc=[D]),!s.includes(D)&&w>=R&&(s.push(D),q.singleFunction?c.push(D):q.singleFunction=D),q)},{foundFunc:[],singleFunction:null,callbacks:[],direction:O});if(l=w,O===Xo&&z.callbacks&&z.callbacks.forEach(function(q){We(t[q])&&(t[q]({trigger:q,direction:O,scrollMin:f,scrollMax:u,range:[f,u]}),o.push(q))}),z.singleFunction){var B=z.singleFunction,ie=z.direction;We(t[B])&&t[B]({trigger:B,direction:ie,scrollMin:f,scrollMax:u,range:[f,u]}),o.push(B)}}},500);return window.addEventListener("scroll",v),function(){return window.removeEventListener("scroll",v)}}function gs(){return Ne?document.body.scrollTop||document.documentElement.scrollTop:0}function zy(){return Ne?window.innerHeight||document.documentElement.clientHeight:0}function Dd(){return Math.round(gs()+zy())}function Md(){if(!Ne)return 0;var t=document.body,e=document.documentElement;return Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight)}function un(t,e){return Math.round(t/e*100)}var Qs="Event",Fd=Qs+"Listener";function Hy(t){return function(e,r,n,a){var i=n||ds,o=a||!1;if(!Ne)return i;var s=_n(r),c=_n(e,!0);if(!c.length)throw new Error("noElements");if(!s.length)throw new Error("no"+Qs);var l=[];return(function u(f){f&&(l=[]);for(var h=f?"add"+Fd:"remove"+Fd,d=0;d<c.length;d++){var v=c[d];l[d]=f?o&&o.once?By(i):i:l[d]||i;for(var p=0;p<s.length;p++)v[h]?v["on"+s[p]]=f?l[d]:null:v[h](s[p],l[d],o)}return u.bind(null,!f)})(t)}}function _n(t,e){if(jt(t))return e?_n(document.querySelectorAll(t)):(r=t).split(r.indexOf(",")>-1?",":" ").map(function(o){return o.trim()});var r;if(NodeList.prototype.isPrototypeOf(t)){for(var n=[],a=t.length>>>0;a--;)n[a]=t[a];return n}var i=Yg(t);return e?i.map(function(o){return jt(o)?_n(o,!0):o}).flat():i}function By(t,e){var r;return function(){return t&&(r=t.apply(this,arguments),t=null),r}}var Qo=Hy(Qs);function Bv(t,e){return Ne&&We(window[t])?(r=window[t],n=e,(a=window)===void 0&&(a=null),We(r)?function(){r.apply(a,arguments),n.apply(a,arguments)}:n):window[t]=e;var r,n,a}Bv.bind(null,"onerror");Bv.bind(null,"onload");var Gv=typeof window>"u",Kd="hidden";function Gy(t){if(Gv)return!1;var e=Wy(),r="".concat(e.replace(/[H|h]idden/,""),"visibilitychange"),n=function(){return t(!!document[e])},a=function(){return document.addEventListener(r,n)};return a(),function(){return document.removeEventListener(r,n),a}}function Wy(){var t=["webkit","moz","ms","o"];return Gv||Kd in document?Kd:t.reduce(function(e,r){var n=r+"Hidden";return!e&&n in document?n:e},null)}var Vy=["mousemove","mousedown","touchmove","touchstart","touchend","keydown"];function Jy(t,e){e===void 0&&(e={});var r=(function(o,s){var c=this,l=!1;return function(u){l||(o.call(c,u),l=!0,setTimeout(function(){return l=!1},s))}})(t,e.throttle||1e4),n=[];function a(){var o=Gy(function(s){s||r({type:"tabVisible"})});return n=[o].concat(Vy.map(function(s){return Qo(document,s,r)})).concat(Qo(window,"load",r)).concat(Qo(window,"scroll",r,{capture:!0,passive:!0})),i}function i(){n.map(function(o){return o()})}return a(),function(){return i(),a}}function Zy(t){var e,r,n=t.onIdle,a=t.onWakeUp,i=t.onHeartbeat,o=t.timeout,s=o,c=t.throttle,l=c===void 0?2e3:c,u=!1,f=!1,h=new Date,d=function(){return clearTimeout(e)};function v(g){d(),i&&!u&&i(qr(h),g),a&&u&&(u=!1,a(qr(r),g),h=new Date),e=setTimeout(function(){u=!0,n&&(r=new Date,n(qr(h),g))},s)}var p=Jy(v,{throttle:l});return{disable:function(){f=!0,u=!1,d();var g=p();return function(){return f=!1,h=new Date,v({type:"load"}),g()}},getStatus:function(){return{isIdle:u,isDisabled:f,active:u?0:qr(h,f),idle:u?qr(r,f):0}}}}function qr(t,e){return e?0:Math.round((new Date-t)/1e3)}const zd=5e3;class Yy{element;isInViewport=!1;isAwake=!1;isFlushing;observer;lastEventAt=Date.now();registeredView=!1;viewCallback;activeDurationCallback;idleDurationCallback;scrollCallback;constructor(e){this.element=e.element,this.viewCallback=e.viewCallback,this.activeDurationCallback=e.activeDurationCallback,this.idleDurationCallback=e.idleDurationCallback,this.scrollCallback=e.scrollCallback,this.observer=new IntersectionObserver(r=>{r.forEach(n=>{this.handleInViewPort(n.isIntersecting)})},{threshold:0}),this.observer.observe(this.element),Zy({onIdle:r=>this.handleAwake(!1,r),onWakeUp:r=>this.handleAwake(!0,r),timeout:zd}),Ky({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(e){e?(this.isAwake=!0,this.trackInViewport()):this.handleAwake(!1),this.isInViewport=e}handleAwake(e,r=Math.round((Date.now()-this.lastEventAt)/1e3)){this.isAwake=e,this.lastEventAt=e?Date.now()-r*zd:Date.now(),this.isInViewport&&this.trackAwake(e,r)}handleScroll(e){this.scrollCallback&&this.scrollCallback(e)}handleVisibilityChange(){this.isAwake=!1;const e=Math.round((Date.now()-this.lastEventAt)/1e3);e>1&&(this.lastEventAt=Date.now(),this.trackAwake(!1,e))}trackAwake(e,r){!e&&this.activeDurationCallback&&this.activeDurationCallback(r,this.isFlushing,this.lastEventAt),e&&this.idleDurationCallback&&this.idleDurationCallback(r,this.isFlushing,this.lastEventAt)}trackInViewport(){this.registeredView||(this.registeredView=!0,this.viewCallback&&this.viewCallback())}}function Wv(t){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",t):t()}function Xy(t,e){e=e||{};var r,n,a=[],i=e.max||1/0;function o(){clearInterval(r),t(a.splice(0,i)),s()}function s(){r=setInterval(o,e.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(r)}}}const Hd="sesamy_session_id";function Qy(){let t=sessionStorage.getItem(Hd);return t||(t=Math.random().toString(36).slice(2,9),sessionStorage.setItem(Hd,t)),t}function Vv(t){function e(n){return n.id?`#${n.id}`:n.classList.length>0?Array.from(n.classList).map(i=>`.${i}`).join(""):null}function r(n){const a=[];let i=n;for(;i&&i!==document.body&&i!==document.documentElement;){const o=e(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 r(t)}let Ye={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"}},Jv=[],pn;function Zv(){const t=window.location.pathname;return Jv.find(e=>e.path?t.includes(e.path):!0)}function ew(t,e){Jv=t.content||[];const r=Zv();r&&r.type==="article"&&(Ye={...Ye,...r.selectors}),pn=e}function tw(t,e){const{selector:r}=e;return r===Ye.article.selector?t:t.querySelector(r)}function Yv(t,e){if(t)return e.attribute?e.attribute==="textContent"?t.textContent??void 0:t.getAttribute(e.attribute)??Yv(t.parentElement,e):t.textContent??void 0}function vr(t){const e=document.head.querySelectorAll(`[property~='${t}'][content]`);for(let n=0;n<e.length;n+=1)if(e[n].content)return e[n].content;const r=document.head.querySelectorAll(`[name~='${t}'][content]`);for(let n=0;n<r.length;n+=1)if(r[n].content)return r[n].content}function Xv({publisherContentId:t,key:e,defaultValue:r=""}){return(t?document.body.querySelector(`sesamy-content-data[id='${t}']`):null)?.getAttribute(e)||vr(`sesamy:${e}`)||vr(`og:${e}`)||vr(e)||r}function rw(){const t=document.querySelectorAll(Ye.article.selector);return Array.from(t).map(ec).filter(e=>e!==null)}function ec(t){const e=typeof t=="string"?document.querySelector(t):t;if(!e)return null;const r={element:e,selector:typeof t=="string"?t:Vv(e)},n=(i,o,s,c)=>{const l=tw(e,o);if(l){const u=Yv(l,o)||Xv({publisherContentId:s,key:i});u!==void 0&&(r[i]=c?c(u):u)}};n("id",Ye.id),n("title",Ye.title,r.id),n("excerpt",Ye.excerpt,r.id),n("image",Ye.image,r.id),n("price",Ye.price,r.id,i=>parseFloat(i)),n("currency",Ye.currency,r.id),n("url",Ye.url,r.id),n("pass",Ye.pass,r.id),n("accessLevel",Ye.accessLevel,r.id,i=>i||"entitlement");const a=Zv();return a&&a.type==="article"&&(a.pass&&(r.pass=r.pass?`${r.pass},${a.pass}`:a.pass),a.price&&!r.price&&(r.price=a.price.amount),a.price?.currency&&!r.currency&&(r.currency=a.price.currency)),r}async function nw(t,e){const r=typeof t=="string"?document.querySelector(t):t;if(!r)throw new Error("Could not find element");const n=ec(r);if(!n?.url)throw new Error("Could not find content for element");const a=await pn.entitlements.hasAccess(n.url||"",n.pass?.split(",")||[]);if(!a)throw new Error("User does not have access to the content");const i=await pn.entitlements.access(a.id);if(!i.token)throw new Error("Could not get access token");const o=e||Vv(r.parentElement||r);return pn.proxy.getContent(i.token,n.url,o)}let Qv=!1,mn,Tn,ys;function ep(t){return JSON.stringify(t.map(e=>{const{campaign:r,...n}=e.properties||{};return{anonymousId:e.anonymousId,userId:e.userId,type:e.type,properties:n,clientId:ys,requestId:Math.random().toString(36).slice(2,9),sessionId:Qy(),timestamp:new Date().toISOString(),version:Jn,event:e.event,context:{...e.context,page:{url:window.location.href,title:document.title,referrer:document.referrer,itemSrc:vr("sesamy:item-src"),publisherContentId:vr("sesamy:publisher-content-id")},campaign:r,locale:navigator.language,library:Xs,userAgent:navigator.userAgent,clientId:ys}}}))}const tp=Xy(async t=>{if(t.length>0){const e=ep(t);Qv?navigator.sendBeacon(Tn,e):(await fetch(Tn,{method:"POST",body:e,headers:{"Content-Type":"text/plain"}})).ok}},{max:10,interval:3e3});function es(t){if(t.anonymousId)if(t.properties?.flushing){const e={...t};delete e.properties.flushing,navigator.sendBeacon(Tn,ep([e]))}else tp.push(t)}function aw(){return Qv=!0,tp.flush()}function iw(t,e,r){mn=e,Tn=`${vt("logs",r)}/events`,ys=t}const ow={name:"custom-analytics-plugin",page:({payload:t})=>{if(!mn)return;const{properties:e,anonymousId:r,userId:n,event:a}=t;es({anonymousId:r,userId:n,properties:e,event:a,type:"page"})},track:({payload:t})=>{if(!mn)return;const{properties:e,anonymousId:r,userId:n,event:a}=t;es({anonymousId:r,userId:n,properties:e,event:a,type:"track"})},identify:({payload:t})=>{if(!mn)return;const{properties:e,anonymousId:r,userId:n}=t;es({anonymousId:r,userId:n,properties:e,type:"identify"})}},Bd=["source","medium","campaign","term","content"],At="utm_",sw=1800*1e3;function rp(t){return t?Date.now()-parseInt(t,10)>sw:!0}function Gd(){const t=document.referrer||"";if(!t)return;const e=Wt(`${At}set_at`);(rp(e)||!Wt(`${At}referrer`))&&En(`${At}referrer`,t)}function cw(){const t=()=>{const r={};for(const a of Bd){const i=Wt(`${At}${a}`);i&&(r[`utm_${a}`]=i)}const n=Wt(`${At}referrer`);return n&&(r.utm_referrer=n),r};return{name:"attribution-tracking",initialize(){Gd()},campaign({payload:r}){const n=r?.campaign||{},a=Wt(`${At}set_at`);if(Object.keys(n).length>0&&rp(a)){for(const o of Bd){const s=n[o];s&&En(`${At}${o}`,s)}En(`${At}set_at`,String(Date.now()))}Gd()},page({payload:r}){return r.properties.campaign=t(),r},track({payload:r}){return r.properties.campaign=t(),r},getStoredCampaignData:t}}const uw=cw(),Wd=new Map,Vd=new Map;function lw({clientId:t,enabled:e=!0,environment:r}){iw(t,e,r),e&&(window.addEventListener("beforeunload",()=>{Vd.forEach((n,a)=>{n.bind(a)()}),aw()}),window.addEventListener("visibilitychange",()=>{document.visibilityState!=="visible"&&Wd.forEach((n,a)=>{n.bind(a)()})}),Fy(),Wv(()=>{const n=new Yy({element:document.body,viewCallback:()=>{St.page()},activeDurationCallback:(a,i,o)=>{St.track("activeDuration",{duration:a,durationStart:o,flushing:i})},idleDurationCallback:(a,i,o)=>{St.track("idleDuration",{duration:a,durationStart:o,flushing:i})},scrollCallback:a=>{St.track("scroll",{scroll:a.scrollMax})}});Vd.set(document.body,()=>{n.flush()}),Wd.set(document.body,()=>{n.handleVisibilityChange()})}),window.addEventListener(Ve.AUTHENTICATED,async n=>{const a=n;await St.identify(a.detail.sub)}),window.addEventListener(Ve.LOGOUT,async()=>{await St.track("logout",{}),await St.reset()}))}const St=$y({app:Xs,version:Jn,plugins:[uw,ow]});function np(t,e){St.track(t,e)}function ap(t,e,r=!1){const n={name:t,data:e},a=new CustomEvent(t,{detail:n,cancelable:r,bubbles:!0});np(`event:${t}`,{...e,timestamp:new Date().toISOString()});const i=window.dispatchEvent(a);return r&&!i?{canceled:!0,message:n.cancellationMessage}:{canceled:!1}}function fw(t,e){t.cancelable&&(t.detail.cancellationMessage=e,t.preventDefault())}function dw(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function hw(){return/android/i.test(navigator.userAgent)}let Le,ip,zr,ws=!1,gn=!1;Br()&&window.addEventListener("pageshow",()=>{gn=!1});const yr="sesamyAccessToken",ts="sesamyRefreshToken",kn="sesamySilentAuthThrottle",vw=300*1e3;async function Zn(){return ws?!0:new Promise((t,e)=>{const r=setTimeout(()=>{ws?t(!0):e(new Error("Initialization failed: Timeout"))},2e3);window.addEventListener(Ve.AUTH_INITIALIZED,()=>{clearTimeout(r),t(!0)})})}async function pw(t){if(!t)return null;const e=localStorage.getItem(ts);if(!e)return pe("No refresh token found in localstorage"),null;const r=new URLSearchParams;r.set("client_id",t.iss),r.set("refresh_token",e),r.set("grant_type","refresh_token");const n=new URL(t.iss);n.pathname="/oauth/token",n.searchParams.set("user_id",t.sub);try{const a=await fetch(n.href,{body:r.toString(),method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"}});if(!a.ok)throw localStorage.removeItem(ts),new Error("Renew token failed");const i=await a.json();return localStorage.setItem(ts,i.refresh_token),localStorage.setItem(yr,i.access_token),i.access_token}catch{nc()}}async function tc(){const t=localStorage.getItem(yr);if(!t)return null;const e=ac(t);if(!e||!e.exp||e.exp<new Date().getTime()/1e3){const r=await pw(e);if(r)return r;localStorage.removeItem(yr)}return t}let ln=null;const mw=64;function gw(){try{if(ln!==null)return ln;const e=Object.keys(localStorage).filter(r=>r.startsWith("@@auth0spajs@@"));for(const r of e){const n=JSON.parse(localStorage.getItem(r)||"{}");let a;if(typeof n=="object"&&(n.body&&typeof n.body=="object"&&"refresh_token"in n.body?a=n.body.refresh_token:"refresh_token"in n&&(a=n.refresh_token)),a&&typeof a=="string"&&a.length===mw)return ln=!0,!0}}catch(t){pe(`Error checking for existing auth0 tokens: ${t.message}`)}return ln=!1,!1}function yw(t){if(t.domains&&t.domains.length>0){const e=wr(window.location.href);if(e){for(const r of t.domains)if(wr(`https://${r}`)===e)return pe(`Found matching domain in domains array: ${r} for TLD: ${e}`),r;pe(`No matching domain found in domains array for TLD: ${e}`)}}if(t.domain)return pe(`Using fallback domain property: ${t.domain}`),t.domain}function wr(t){try{const e=new URL(t).hostname,r=e.split(".");if(r.length<=1)return e;const n=["co.uk","com.au","co.nz","co.za","com.br","co.jp","gov.uk","ac.uk","org.uk","net.uk","com.sg","com.my","co.in","co.id","co.th","co.kr","com.mx","com.ar","com.co","com.pe","com.ph","com.pk","com.sa","com.eg","com.ng","co.ke","co.tz","co.zw","co.bw","co.mz","gov.au","edu.au","org.au","net.au","asn.au","id.au"];for(const a of n)if(e.endsWith(`.${a}`)){const i=a.split(".").length+1;return r.slice(-i).join(".")}return r.slice(-2).join(".")}catch{return null}}async function ww(t){if(t.enabled===!1)return;ip=t.organization;const e=yw(t);zr=e&&!gw()?e:Pv("token",t.environment);const r={domain:zr,clientId:t.clientId,useCookiesForTransactions:!0};r.cacheLocation="localstorage",wr(window.location.href)!==wr(`https://${zr}`)&&(r.useRefreshTokens=!0),pe(`Initializing auth0 client: ${JSON.stringify(r)}`),Le=await Eg(r);const n=new URLSearchParams(window.location.search),a=n.get("code"),i=n.get("state");if(a)if(window.opener)pe("Code found in URL, posting to opener"),window.opener.postMessage({type:"authorization_response",response:{code:a,state:i}},window.location.origin);else{pe("Code found in URL, handling redirect");try{const c=await Le.handleRedirectCallback();pe(`Login result: ${JSON.stringify(c)}`);const l=await Le.getUser();if(!l)throw pe("No user found"),new Error("No user found");pe(`User found ${JSON.stringify(l)}`),rc(),qt(Ve.AUTHENTICATED,l),pe("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())}ws=!0,qt(Ve.AUTH_INITIALIZED,{})}async function Wr(){return await Zn(),await tc()?!0:Le?Le.isAuthenticated():!1}async function bw(){return await Zn(),await tc()?(pe("Using local user"),{sub:"local",name:"Local User"}):Le?Le.getUser():null}function op(t){if(gn)return pe("Login already in progress"),null;if(gn=!0,setTimeout(()=>{gn=!1},3e3),localStorage.removeItem(yr),!Le)throw new Error("Auth0 client not initialized");const e=t?.authorizationParams||{};return{...t,authorizationParams:{organization:ip,redirect_uri:window.location.href,ui_locales:bn(),incognito:Bs(),...e}}}async function Yn(t){const e=op(t);if(e)return Le.loginWithRedirect(e)}async function sp(t){const e=op(t);if(!e)return;await Le.loginWithPopup(e,{timeoutInSeconds:1800}),rc(),ap(Ve.AUTHENTICATED,await Le.getUser()).canceled||window.location.reload()}async function Sw(t){return zr&&wr(window.location.href)!==wr(`https://${zr}`)&&(dw()||hw()||Bs())?sp(t):Yn(t)}function Iw(){try{const t=sessionStorage.getItem(kn);if(!t)return!1;const{timestamp:e}=JSON.parse(t);return Date.now()-e<vw}catch{return sessionStorage.removeItem(kn),!1}}function Pw(){try{const t={timestamp:Date.now()};sessionStorage.setItem(kn,JSON.stringify(t))}catch{pe("Failed to set silent auth throttle in sessionStorage")}}function rc(){try{sessionStorage.removeItem(kn)}catch{}}async function xt(t=!0,e=!1){await Zn();const r=await tc();if(r)return r;if(!e&&Iw()){if(pe("Silent auth is throttled due to recent failures, skipping request"),t)throw new Error("Silent auth throttled");return null}try{if(!Le)return pe("Auth client not initialized"),null;let n=await Le.getTokenSilently();const a=ac(n);return e&&a?.exp&&a.exp+3600<new Date().getTime()/1e3&&(n=await Le.getTokenSilently({cacheMode:e?"off":"on"})),rc(),n}catch(n){const a=n;if(pe(`Failed to get token silently: ${a.message}`),Pw(),await Le.isAuthenticated()&&(a.message==="Invalid refresh token"||a.message.includes("Missing Refresh Token"))&&await nc(),t)throw n;return null}}async function nc(t={}){if(await Zn(),localStorage.removeItem(yr),qt(Ve.LOGOUT,{}),!!Le)return pe(`Logout with options: ${JSON.stringify(t)}`),Le.logout({...t,logoutParams:{returnTo:window.location.href,...t.logoutParams}})}function ac(t){const e=t.split(".");if(e.length!==3)return null;const n=e[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 bs(t){const e=ac(t);if(!e||!e.exp||e.exp<new Date().getTime()/1e3)throw new Error("Invalid token");pe("Set token"),localStorage.setItem(yr,t),qt(Ve.AUTHENTICATED,e)}const Ew=(t,e)=>e.skipDedupe||e.method!=="GET",_w=(t,e)=>e.method+"@"+t,Tw=t=>t.clone(),Jd=({skip:t=Ew,key:e=_w,resolver:r=Tw}={})=>{const n=new Map;return a=>(i,o)=>{if(t(i,o))return a(i,o);const s=e(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(r(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)}}},kw=(t,e)=>t*e,Rw=t=>t&&t.ok,Zd=({delayTimer:t=500,delayRamp:e=kw,maxAttempts:r=10,until:n=Rw,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(p=>p?d&&o?d:v?Promise.reject(v):d:(f++,!r||f<=r?new Promise(g=>{const S=e(t,f);setTimeout(()=>{typeof a=="function"?Promise.resolve(a({response:d,error:v,url:l,options:u})).then((w={})=>{var y,m;g(c((y=w&&w.url)!==null&&y!==void 0?y:l,(m=w&&w.options)!==null&&m!==void 0?m:u))}):g(c(l,u))},S)}).then(h).catch(g=>{if(!i)throw g;return h(null,g)}):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)})};var Ow=Object.defineProperty,Cw=(t,e,r)=>e in t?Ow(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,xr=(t,e,r)=>Cw(t,typeof e!="symbol"?e+"":e,r),Rn=(t=>(t.BROWSER="browser",t.NORMAL="normal",t))(Rn||{});class Hr extends Error{constructor(e,r,n,a,i){super(a),xr(this,"status"),xr(this,"statusText"),xr(this,"url"),xr(this,"body"),this.name="APIError",this.status=e,this.statusText=r,this.url=n,this.body=i,Error.captureStackTrace&&Error.captureStackTrace(this,Hr)}isClientError(){return this.status>=400&&this.status<500}isServerError(){return this.status>=500}isAuthError(){return this.status===401}isForbiddenError(){return this.status===403}isNotFoundError(){return this.status===404}}const Aw="application/json",cp="Content-Type",or=Symbol(),up=Symbol();function Yd(t={}){var e;const r=t instanceof Array?Object.fromEntries(t):t;return(e=Object.entries(r).find(([n])=>n.toLowerCase()===cp.toLowerCase()))===null||e===void 0?void 0:e[1]}function Xd(t){return/^application\/.*json.*/.test(t)}const Vt=function(t,e,r=!1){return Object.entries(e).reduce((n,[a,i])=>{const o=t[a];return Array.isArray(o)&&Array.isArray(i)?n[a]=r?[...o,...i]:i:typeof o=="object"&&typeof i=="object"?n[a]=Vt(o,i,r):n[a]=i,n},{...t})},br={options:{},errorType:"text",polyfills:{},polyfill(t,e=!0,r=!1,...n){const a=this.polyfills[t]||(typeof self<"u"?self[t]:null)||(typeof global<"u"?global[t]:null);if(e&&!a)throw new Error(t+" is not defined");return r&&a?new a(...n):a}};function jw(t,e=!1){br.options=e?t:Vt(br.options,t)}function Uw(t,e=!1){br.polyfills=e?t:Vt(br.polyfills,t)}function qw(t){br.errorType=t}const Lw=t=>e=>t.reduceRight((r,n)=>n(r),e)||e;class lp extends Error{}const Nw=t=>{const e=Object.create(null);t=t._addons.reduce((y,m)=>m.beforeRequest&&m.beforeRequest(y,t._options,e)||y,t);const{_url:r,_options:n,_config:a,_catchers:i,_resolvers:o,_middlewares:s,_addons:c}=t,l=new Map(i),u=Vt(a.options,n);let f=r;const h=Lw(s)((y,m)=>(f=y,a.polyfill("fetch")(y,m)))(r,u),d=new Error,v=h.catch(y=>{throw{[or]:y}}).then(y=>{var m;if(!y.ok){const b=new lp;if(b.cause=d,b.stack=b.stack+`
|
|
36
|
-
CAUSE: `+d.stack,b.response=y,b.status=y.status,b.url=f,y.type==="opaque")throw b;const O=a.errorType==="json"||((m=y.headers.get("Content-Type"))===null||m===void 0?void 0:m.split(";")[0])==="application/json";return(a.errorType?O?y.text():y[a.errorType]():Promise.resolve(y.body)).then(A=>{if(b.message=typeof A=="string"?A:y.statusText,A)if(O&&typeof A=="string"){b.text=A;try{b.json=JSON.parse(A)}catch{}}else b[a.errorType]=A;throw b})}return y}),p=y=>y.catch(m=>{const b=Object.prototype.hasOwnProperty.call(m,or),O=b?m[or]:m,A=O?.status&&l.get(O.status)||l.get(O?.name)||b&&l.has(or)&&l.get(or);if(A)return A(O,t);const L=l.get(up);if(L)return L(O,t);throw O}),g=y=>m=>p(y?v.then(b=>b&&b[y]()).then(b=>m?m(b):b):v.then(b=>m?m(b):b)),S={_wretchReq:t,_fetchReq:h,_sharedState:e,res:g(null),json:g("json"),blob:g("blob"),formData:g("formData"),arrayBuffer:g("arrayBuffer"),text:g("text"),error(y,m){return l.set(y,m),this},badRequest(y){return this.error(400,y)},unauthorized(y){return this.error(401,y)},forbidden(y){return this.error(403,y)},notFound(y){return this.error(404,y)},timeout(y){return this.error(408,y)},internalError(y){return this.error(500,y)},fetchError(y){return this.error(or,y)}},w=c.reduce((y,m)=>({...y,...typeof m.resolver=="function"?m.resolver(y):m.resolver}),S);return o.reduce((y,m)=>m(y,t),w)},$w={_url:"",_options:{},_config:br,_catchers:new Map,_resolvers:[],_deferred:[],_middlewares:[],_addons:[],addon(t){return{...this,_addons:[...this._addons,t],...t.wretch}},errorType(t){return{...this,_config:{...this._config,errorType:t}}},polyfills(t,e=!1){return{...this,_config:{...this._config,polyfills:e?t:Vt(this._config.polyfills,t)}}},url(t,e=!1){if(e)return{...this,_url:t};const r=this._url.split("?");return{...this,_url:r.length>1?r[0]+t+"?"+r[1]:this._url+t}},options(t,e=!1){return{...this,_options:e?t:Vt(this._options,t)}},headers(t){const e=t?Array.isArray(t)?Object.fromEntries(t):"entries"in t?Object.fromEntries(t.entries()):t:{};return{...this,_options:Vt(this._options,{headers:e})}},accept(t){return this.headers({Accept:t})},content(t){return this.headers({[cp]:t})},auth(t){return this.headers({Authorization:t})},catcher(t,e){const r=new Map(this._catchers);return r.set(t,e),{...this,_catchers:r}},catcherFallback(t){return this.catcher(up,t)},resolve(t,e=!1){return{...this,_resolvers:e?[t]:[...this._resolvers,t]}},defer(t,e=!1){return{...this,_deferred:e?[t]:[...this._deferred,t]}},middlewares(t,e=!1){return{...this,_middlewares:e?t:[...this._middlewares,...t]}},fetch(t=this._options.method,e="",r=null){let n=this.url(e).options({method:t});const a=Yd(n._options.headers),i=this._config.polyfill("FormData",!1),o=typeof r=="object"&&!(i&&r instanceof i)&&(!n._options.headers||!a||Xd(a));return n=r?o?n.json(r,a):n.body(r):n,Nw(n._deferred.reduce((s,c)=>c(s,s._url,s._options),n))},get(t=""){return this.fetch("GET",t)},delete(t=""){return this.fetch("DELETE",t)},put(t,e=""){return this.fetch("PUT",e,t)},post(t,e=""){return this.fetch("POST",e,t)},patch(t,e=""){return this.fetch("PATCH",e,t)},head(t=""){return this.fetch("HEAD",t)},opts(t=""){return this.fetch("OPTIONS",t)},body(t){return{...this,_options:{...this._options,body:t}}},json(t,e){const r=Yd(this._options.headers);return this.content(e||Xd(r)&&r||Aw).body(JSON.stringify(t))}};function st(t="",e={}){return{...$w,_url:t,_options:e}}st.default=st;st.options=jw;st.errorType=qw;st.polyfills=Uw;st.WretchError=lp;const xw=(t,e)=>e.skipDedupe||e.method!=="GET",Dw=(t,e)=>e.method+"@"+t,Mw=t=>t.clone(),Fw=({skip:t=xw,key:e=Dw,resolver:r=Mw}={})=>{const n=new Map;return a=>(i,o)=>{if(t(i,o))return a(i,o);const s=e(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(r(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)}}},Kw=(t,e)=>e.skipCache||e.method!=="GET",zw=(t,e)=>e.method+"@"+t,Hw=()=>!1,Bw=()=>null,Gw=t=>t.ok,Ww=({throttle:t=1e3,skip:e=Kw,key:r=zw,clear:n=Hw,invalidate:a=Bw,condition:i=Gw,flagResponseOnCacheHit:o="__cached"}={})=>{const s=new Map,c=new Map,l=new Set,u=h=>{t&&!l.has(h)&&(l.add(h),setTimeout(()=>{l.delete(h)},t))},f=h=>(d,v)=>{const p=r(d,v);let g=a(d,v);if(g&&(g instanceof Array||(g=[g]),g.forEach(S=>{typeof S=="string"?s.delete(S):S instanceof RegExp&&s.forEach((w,y)=>{S.test(y)&&s.delete(y)})})),n(d,v)&&s.clear(),e(d,v))return h(d,v);if(l.has(p)){if(s.has(p)){const S=s.get(p).clone();return o&&Object.defineProperty(S,o,{value:p,enumerable:!1}),Promise.resolve(S)}else if(c.has(p))return new Promise((S,w)=>{c.get(p).push([S,w])})}return c.has(p)||c.set(p,[]),u(p),h(d,v).then(S=>(i(S.clone())&&s.set(p,S.clone()),c.get(p).forEach(([w])=>w(S.clone())),c.delete(p),S)).catch(S=>{throw c.get(p).forEach(([,w])=>w(S)),c.delete(p),S})};return f.cacheResponse=function(h,d){u(h),s.set(h,d)},f.cache=s,f.inflight=c,f.throttling=l,f},Vw=(t,e)=>t*e,Jw=t=>t&&t.ok,Zw=({delayTimer:t=500,delayRamp:e=Vw,maxAttempts:r=10,until:n=Jw,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(p=>p?d&&o?d:v?Promise.reject(v):d:(f++,!r||f<=r?new Promise(g=>{const S=e(t,f);setTimeout(()=>{typeof a=="function"?Promise.resolve(a({response:d,error:v,url:l,options:u})).then((w={})=>{var y,m;g(c((y=w&&w.url)!==null&&y!==void 0?y:l,(m=w&&w.options)!==null&&m!==void 0?m:u))}):g(c(l,u))},S)}).then(h).catch(g=>{if(!i)throw g;return h(null,g)}):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)})},Yw="@sesamy/sdk",Xw="1.2.0";class Qw{constructor(){xr(this,"cache",new Map)}get(e){return this.cache.get(e)||null}set(e,r){this.cache.set(e,r)}remove(e){this.cache.delete(e)}clear(){this.cache.clear()}}const Dr="sesamyCacheTimestamp",eb=t=>{const{libraryName:e=Yw,libraryVersion:r=Xw,cache:n}=t,a=n?.storage||new Qw,i=[s=>async(c,l)=>{if(n?.mode===Rn.BROWSER){let u;typeof sessionStorage<"u"?(u=sessionStorage.getItem(Dr),u||(u=Date.now().toString(),sessionStorage.setItem(Dr,u))):(u=a.get(Dr),u||(u=Date.now().toString(),a.set(Dr,u)));const f={...l,headers:{...l.headers,"Cache-Timestamp":u}};return s(c,f)}return s(c,l)},s=>async(c,l)=>{const u=await t.tokenProvider(),f={...l,headers:{...l.headers,Authorization:`Bearer ${u}`}};return s(c,f)},Fw()];n?.mode===Rn.NORMAL&&i.push(Ww({throttle:300*1e3,skip:(s,c)=>c.method!=="GET"})),i.push(Zw({delayTimer:1e3,delayRamp:(s,c)=>s*c,maxAttempts:3,until:s=>!!(s&&(s.ok||s.status>=400&&s.status<500)),retryOnNetworkError:!1}));const o=st(t.baseUrl).headers({"Content-Type":"application/json","X-Sesamy-Client":`${e}/${r}`,...t.vendorId&&{"tenant-id":t.vendorId},...t.headers}).middlewares(i);return{async request(s,c={}){try{let l=o.url(s);c.headers&&(l=l.headers(c.headers));const u=(c.method||"GET").toLowerCase();let f;switch(u){case"get":f=l.get();break;case"post":f=l.post(c.body?JSON.parse(c.body):void 0);break;case"put":f=l.put(c.body?JSON.parse(c.body):void 0);break;case"patch":f=l.patch(c.body?JSON.parse(c.body):void 0);break;case"delete":f=l.delete();break;default:f=l.get()}const h=await f.res();if(h.status===204)return null;if(!h.ok){const d=await h.text().catch(()=>"Unknown error");throw new Hr(h.status,h.statusText,h.url,`API Error ${h.status}: ${d}`,d)}return await h.json()}catch(l){if(l instanceof Hr)throw l;const u=l.status||500,f=l.message||"Unknown error",h=`${t.baseUrl}${s}`;throw new Hr(u,f,h,`API Error ${u}: ${l.message||"Unknown error"}`,l.message||"Unknown error")}}}},tt=()=>(typeof sessionStorage<"u"&&sessionStorage.removeItem(Dr),"Cache cleared"),Lr={get:async(t,e)=>t.request(`/profile/${e}`),update:async(t,e,r)=>t.request(`/profile/${e}`,{method:"PATCH",body:JSON.stringify(r)}),checkSpotifyLink:async t=>t.request("/profile/spotify-link"),unlinkSpotify:async t=>t.request("/profile/unlink-spotify",{method:"POST"}),delete:async t=>{await t.request("/profile",{method:"DELETE"})}},rs={list:async(t,e)=>{const r=new URLSearchParams;e!=null&&e.type&&r.append("type",e.type),e!=null&&e.sku&&r.append("sku",e.sku),e!=null&&e.purchaseOptionId&&r.append("purchase-option-id",e.purchaseOptionId),e!=null&&e.waitForEntitlementAfter&&r.append("wait-for-entitlement-after",e.waitForEntitlementAfter);const n=r.toString(),a=n?`/entitlements?${n}`:"/entitlements";return t.request(a)},get:async(t,e)=>t.request(`/entitlements/${e}`),getAccess:async(t,e)=>t.request(`/entitlements/${e}/access`)},Qd={list:async t=>t.request("/subscriptions"),get:async(t,e)=>t.request(`/subscriptions/${e}`)},eh={get:async(t,e)=>t.request(`/products/${e}`),autoOnboard:async(t,e)=>t.request(`/products/${e}/auto-onboard`,{method:"POST"})},Nr={list:async t=>t.request("/contracts"),get:async(t,e)=>t.request(`/contracts/${e}`),cancel:async(t,e)=>t.request(`/contracts/${e}/cancel`,{method:"POST"}),createAmendment:async(t,e,r)=>t.request(`/contracts/${e}/amendments`,{method:"POST",body:JSON.stringify(r)}),confirmAmendment:async(t,e,r)=>t.request(`/contracts/${e}/amendments/${r}/confirm`,{method:"POST"})},ns={get:async t=>t.request("/user-metadata"),set:async(t,e,r)=>{await t.request(`/user-metadata/${e}`,{method:"PUT",body:JSON.stringify({value:r})})},delete:async(t,e)=>{await t.request(`/user-metadata/${e}`,{method:"DELETE"})}},fn={list:async t=>t.request("/tallies"),get:async(t,e)=>t.request(`/tallies/${e}`),update:async(t,e,r)=>t.request(`/tallies/${e}`,{method:"PUT",body:JSON.stringify(r)}),create:async(t,e)=>t.request("/tallies",{method:"POST",body:JSON.stringify(e)})},as={list:async t=>t.request("/tags"),add:async(t,e)=>{await t.request("/tags",{method:"POST",body:JSON.stringify({tag:e})})},remove:async(t,e)=>{await t.request(`/tags/${e}`,{method:"DELETE"})}},is={create:async(t,e)=>t.request("/checkout",{method:"POST",body:JSON.stringify(e)}),get:async(t,e)=>t.request(`/checkout/${e}`),update:async(t,e,r)=>t.request(`/checkout/${e}`,{method:"PATCH",body:JSON.stringify(r)})},th={list:async t=>t.request("/bills"),get:async(t,e)=>t.request(`/bills/${e}`)},rh={list:async t=>t.request("/fulfillments"),create:async(t,e)=>t.request("/fulfillments",{method:"POST",body:JSON.stringify(e)})},tb={get:async(t,e)=>t.request(`/paywalls/${e}`)},rb={list:async t=>t.request("/payment-issues")},nb={content:async(t,e,r,n,a)=>{const i=new URLSearchParams({url:e});return r&&i.append("selector",r),n&&i.append("cache",n),t.request(`/proxy?${i.toString()}`,a)}},ab={list:async(t,e)=>{const r=(e?new URLSearchParams({q:e}):new URLSearchParams).toString(),n=r?`/transactions?${r}`:"/transactions";return t.request(n)}},nh={get:async t=>t.request("/vendor"),list:async t=>t.request("/vendors")},ib=t=>{const e=eb(t);return{profile:{get:r=>Lr.get(e,r),update:(r,n)=>Lr.update(e,r,n),checkSpotifyLink:()=>Lr.checkSpotifyLink(e),unlinkSpotify:()=>Lr.unlinkSpotify(e),delete:()=>Lr.delete(e)},entitlements:{list:r=>rs.list(e,r),get:r=>rs.get(e,r),getAccess:r=>rs.getAccess(e,r)},subscriptions:{list:()=>Qd.list(e),get:r=>Qd.get(e,r)},products:{get:r=>eh.get(e,r),autoOnboard:r=>eh.autoOnboard(e,r)},contracts:{list:()=>Nr.list(e),get:r=>Nr.get(e,r),cancel:r=>Nr.cancel(e,r),createAmendment:(r,n)=>Nr.createAmendment(e,r,n),confirmAmendment:(r,n)=>Nr.confirmAmendment(e,r,n)},userMetadata:{get:()=>ns.get(e),set:(r,n)=>ns.set(e,r,n),delete:r=>ns.delete(e,r)},tallies:{list:()=>fn.list(e),get:r=>fn.get(e,r),update:(r,n)=>fn.update(e,r,n),create:r=>fn.create(e,r)},tags:{list:()=>as.list(e),add:r=>as.add(e,r),remove:r=>as.remove(e,r)},checkout:{create:r=>is.create(e,r),get:r=>is.get(e,r),update:(r,n)=>is.update(e,r,n)},bills:{list:()=>th.list(e),get:r=>th.get(e,r)},fulfillments:{list:()=>rh.list(e),create:r=>rh.create(e,r)},paywall:{get:r=>tb.get(e,r)},paymentIssues:{list:()=>rb.list(e)},proxy:{content:(r,n,a,i)=>nb.content(e,r,n,a,i)},transactions:{list:r=>ab.list(e,r)},vendor:{get:()=>nh.get(e),list:()=>nh.list(e)}}};class ob{get(e){return typeof sessionStorage>"u"?null:sessionStorage.getItem(e)}set(e,r){typeof sessionStorage<"u"&&sessionStorage.setItem(e,r)}remove(e){typeof sessionStorage<"u"&&sessionStorage.removeItem(e)}clear(){}}function Ss(t){let e;try{e=new URL(t)}catch{return!1}return e.protocol==="http:"||e.protocol==="https:"}function fp(t,e){if(Ss(t))return{itemSrc:t};const r=t.split(":");if(r.length<2)throw new Error(`Invalid itemSrc format: expected at least 2 segments separated by ':', got ${r.length}`);const[n,a,i]=r;if(!a)throw new Error("Invalid itemSrc format: sku segment is empty");return{sku:`${n}:${a}`,purchaseOption:e||i}}function ah(t){return t.endsWith("/")?t.slice(0,-1):t}function ih(t,e){if(!Ss(t)||!Ss(e))return!1;const r=new URL(t),n=new URL(e);return r.origin===n.origin&&ah(r.pathname)===ah(n.pathname)}function sb(t,e,r){const n=new URL(`${vt("checkout3",t.environment)}`);if(e.language&&n.searchParams.set("lang",e.language),e.sku)n.searchParams.set("sku",e.sku),e.purchaseOptionId&&n.searchParams.set("po-id",e.purchaseOptionId);else if(e.itemSrc){const{sku:s,purchaseOption:c,itemSrc:l}=fp(e.itemSrc,e.purchaseOptionId);l&&n.searchParams.set("url",l),s&&n.searchParams.set("sku",s),c&&n.searchParams.set("po-id",c)}e.email&&n.searchParams.set("email",e.email),e.business&&n.searchParams.set("business","true"),e.currency&&n.searchParams.set("currency",e.currency),e.price&&n.searchParams.set("price",e.price.toString()),e.discountCode&&n.searchParams.set("discount-code",e.discountCode),e.attributionItemSrc?n.searchParams.set("itemSrc",e.attributionItemSrc):r.itemSrc&&n.searchParams.set("itemSrc",r.itemSrc),e.attributionPublisherContentId?n.searchParams.set("publisherContentId",e.attributionPublisherContentId):r.publisherContentId&&n.searchParams.set("publisherContentId",r.publisherContentId),e.utmSource?n.searchParams.set("utm_source",e.utmSource):r.utmSource&&n.searchParams.set("utm_source",r.utmSource),e.utmMedium?n.searchParams.set("utm_medium",e.utmMedium):r.utmMedium&&n.searchParams.set("utm_medium",r.utmMedium),e.utmCampaign?n.searchParams.set("utm_campaign",e.utmCampaign):r.utmCampaign&&n.searchParams.set("utm_campaign",r.utmCampaign),e.utmTerm?n.searchParams.set("utm_term",e.utmTerm):r.utmTerm&&n.searchParams.set("utm_term",r.utmTerm),e.utmContent?n.searchParams.set("utm_content",e.utmContent):r.utmContent&&n.searchParams.set("utm_content",r.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(e.redirectUrl)try{o=new URL(e.redirectUrl)}catch{console.warn("Invalid redirect URL provided, using current URL instead:",e.redirectUrl)}return o.searchParams.set("force-refetch-entitlements","true"),e.itemSrc&&o.searchParams.set("sesamy-purchase",e.itemSrc),n.searchParams.set("redirect-url",o.toString()),e.paymentMethodsFilter&&n.searchParams.set("paymentmethods-filter",e.paymentMethodsFilter.flatMap(({provider:s,methods:c})=>c?c.map(l=>`${s}|${l}`):s).join(",")),n}const dp="sesamySignedURLs";function ic(){const t=sessionStorage.getItem(dp);return t?JSON.parse(t):[]}function cb(t){const e=ic();e.push(t),pe(`Adding signed URL: ${t}`),sessionStorage.setItem(dp,JSON.stringify(e))}function ub(t){const e={};return Object.keys(t).forEach(r=>{const n=t[r];n!=null&&(e[r]=n.toString())}),e}const Is="sesamyAttribution";function lb(t){const e=localStorage.getItem(t);if(!e)return null;try{return JSON.parse(e).value}catch{return console.error(`Failed to parse ${t}`),null}}function fb(t){return Object.keys(t).find(e=>e.startsWith("utm_"))?{utmSource:void 0,utmMedium:void 0,utmCampaign:void 0,...t}:t}function On(){return lb(Is)||{}}function hp(t){if(t===null)localStorage.removeItem(Is);else{pe(`Setting attribution ${JSON.stringify(t)}`);const e=On()??{},r=ub({...e,...fb(t)});localStorage.setItem(Is,JSON.stringify({value:r}))}}function db(t){const e=t.endpoint||vt("api2",t.environment),n=ib({baseUrl:e,tokenProvider:async()=>{const k=await xt(!0);if(!k)throw new Error("No access token available");return k},libraryName:Xs,libraryVersion:Jn,vendorId:t.vendorId,cache:{mode:Rn.BROWSER,storage:new ob}}),a=k=>async(K,J)=>{let re=sessionStorage.getItem(pd);re||(re=Date.now().toString(),sessionStorage.setItem(pd,re));const me={...J,headers:{...J.headers,"Cache-Timestamp":re}};return k(K,me)},i=(k=!0)=>K=>async(J,re)=>{let me=null;if(me=await xt(k),!me){if(k)throw new Error("No access token available");return K(J,re)}const Fe={...re,headers:{...re.headers,...me?{Authorization:`Bearer ${me}`}:{}}};return K(J,Fe)},o=k=>(K,J)=>{if(J.headers&&"Authorization"in J.headers)return k(K,J);const re=localStorage.getItem("__anon_id"),me=btoa(`${t.clientId}|${re}:`),Fe={...J,headers:{...J.headers,Authorization:`Basic ${me}`}};return k(K,Fe)},s=st(e).headers({"Content-Type":"application/json"}).middlewares([a,i(),Jd(),Zd({delayTimer:1e3,delayRamp:(k,K)=>k*K,maxAttempts:3,until:k=>!!(k&&(k.ok||k.status>=400&&k.status<500)),retryOnNetworkError:!1})]),c=st(e).headers({"Content-Type":"application/json"}).middlewares([a,i(!1),o,Jd(),Zd({delayTimer:1e3,delayRamp:(k,K)=>k*K,maxAttempts:3,until:k=>!!(k&&(k.ok||k.status>=400&&k.status<500)),retryOnNetworkError:!1})]);async function l(k={}){const{waitForEntitlementAfter:K,includeSignedLinks:J=!0}=k,re=await Wr()?await n.entitlements.list({waitForEntitlementAfter:K?.toISOString()}):[];return J&&re.push(...ic()),re}async function u(k,K=[]){return(await l())?.find(me=>{const{sku:Fe,purchaseOption:M}=fp(k);return!!("sku"in me&&Fe===me.sku||M&&"purchaseOptionsId"in me&&M===me.purchaseOptionsId||ih(k,me.url)||K.some(ee=>ih(ee,me.url)))})}async function f(k){return n.entitlements.get(k)}async function h(k){return n.entitlements.getAccess(k)}async function d(k,K,J){const re=new URL(vt("api2",t.environment));return re.pathname="/proxy",re.searchParams.set("url",K),J&&re.searchParams.set("selector",J),st(re.toString()).headers({Authorization:`Bearer ${k}`}).get().text()}async function v(k){if(!k)throw new Error("SKU is required to get fulfillments");return await Wr()?await s.get(`/fulfillments?sku=${encodeURIComponent(k)}`).json():[]}async function p(k,K){if(!k||!K)throw new Error("SKU and itemId are required to request delivery");return(await s.post({sku:k},`/fulfillments/${encodeURIComponent(K)}/request-delivery?`).res()).ok}async function g(){return s.get("/contracts").json()}async function S(k){return(await s.get("/contracts").json())?.find(J=>J.id===k)}async function w(k){const K=await s.post({},`/contracts/${encodeURIComponent(k)}/cancel`).res();return tt(),K.ok}async function y(){return console.warn("getSubscriptions is deprecated, use getContracts instead"),s.get("/subscriptions").json()}async function m(){return s.get("/bills").json()}async function b(k){return(await s.get("/bills").json())?.find(J=>J.id===k)}async function O(){return s.get("/transactions").json()}async function A(k){return(await s.get("/transactions").json())?.find(J=>J.id===k)}async function L(k,K){const J=await s.url(`/user-metadata/${encodeURIComponent(k)}`).put(K).json();return qt(Ve.USER_ATTRIBUTE_CHANGED,{}),tt(),J}async function z(k){const K=await s.url(`/user-metadata/${encodeURIComponent(k)}`).delete().res();return tt(),K.ok}async function B(){return await s.url("/user-metadata").get().json()}async function ie(k){return(await B())[k]||null}async function q(){return await s.url("/tags").get().json()}async function D(k){const K=await s.url(`/tags/${encodeURIComponent(k)}`).delete().res();return tt(),K.ok}async function N(k){const K=await s.url("/tags").post(encodeURIComponent(k)).res();return qt(Ve.USER_ATTRIBUTE_CHANGED,{}),tt(),K.ok}async function R(k){return(await c.url("/tallies").get().json())[k]}async function Y(){return await c.url("/tallies").get().json()}async function te(k){const K=await c.url(`/tallies/${k}`).delete().res();return tt(),K.ok}async function Q(k,K){return await c.url(`/tallies/${encodeURIComponent(k)}/push`).post(K).json()}async function I(k){return n.products.get(k)}async function T(){return await xt(!1)?await s.url("/profile").get().json():null}async function $(k){const K=await s.url("/profile").patch(k).res();return tt(),K.ok}async function F(){return await s.url("/payment-issues").get().json()}async function Z(){return(await s.url("/profile/spotify-link").get().json()).isSpotifyLinked}async function V(){return(await s.url("/profile/unlink-spotify").post().res()).ok}async function he(k){const K=await xt(!1);if(!K)throw new Error("No access token available");const J=new URL(`${vt("access-sync",t.environment)}/spotify/sesamy-callback`);J.searchParams.set("access_token",K),J.searchParams.set("state",k),window.location.href=J.toString()}async function oe(k){const K=await s.url(`/products/${encodeURIComponent(k)}/auto-onboard`).post().json();return K.length&&tt(),K}async function le(k,K=3600){const{shortlink:J}=await st(kg).post({url:k,ttl:K}).json();return J}async function se(k){const K=await xt(!1,!0);let J;const re=k.language||bn(),me=On();switch(k.target){case"account":J=new URL(`${vt("account",t.environment)}/${encodeURIComponent(k.language||re)}/subscriptions/${encodeURIComponent(t.clientId)}${k.contractId?`/${encodeURIComponent(k.contractId)}`:""}`),J.searchParams.set("sesamy-redirect-url",k.redirectUrl||window.location.href);break;case"change-payment":J=new URL(`${vt("account",t.environment)}/${encodeURIComponent(k.language||re)}/subscriptions/${encodeURIComponent(t.clientId)}/${encodeURIComponent(k.contractId)}/change-payment-method`),J.searchParams.set("sesamy-redirect-url",k.redirectUrl||window.location.href);break;case"change-plan":J=new URL(`${vt("account",t.environment)}/${encodeURIComponent(k.language||re)}/subscriptions/${encodeURIComponent(t.clientId)}/${encodeURIComponent(k.contractId)}/edit-plan`),J.searchParams.set("sesamy-redirect-url",k.redirectUrl||window.location.href);break;case"consume":J=new URL(`${vt("consume",t.environment)}/${encodeURIComponent(k.language||re)}/@${encodeURIComponent(t.clientId)}/${encodeURIComponent(k.sku)}`),k.episodeId?J.href+=`/${k.episodeId}`:J.href+="/listen",J.searchParams.set("sesamy-redirect-url",k.redirectUrl||window.location.href);break;case"checkout":J=sb(t,{language:re,...k},me);break;default:throw new Error("Invalid target")}return K&&(J.hash=`#access_token=${K}`),k.shorten?le(J.href,k.ttl):J.href}async function _e(k){const K=On(),J=["_ga","_gid","_fbp","_fbc"];return document.cookie.split(";").forEach(me=>{const Fe=K,[M,ee]=me.trim().split("=");J.includes(M)&&!Fe[M]&&(Fe[M]=ee)}),(await c.url("/checkouts").post({language:bn(),...k,attribution:{...K,...k.attribution},vendorId:t.vendorId})).json()}async function Ae(k,K){return(await c.url(`/checkouts/${k}`).patch(K)).json()}async function Me(k){return(await c.url(`/checkouts/${k}`).get()).json()}async function Re(k){return(await c.url(`/paywalls/${k}`).get()).json()}async function Je(){return(await c.url("/vendor").get()).json()}async function lt(){return(await s.url("/vendors").get()).json()}async function ft(k){return(await s.url(`/contracts/${encodeURIComponent(k.contractId)}/amendments`).post({amendmentType:k.amendmentType,discountCode:k.discountCode})).json()}async function gt(k){return await s.url(`/amendments/${encodeURIComponent(k)}/confirm`).post(),!0}async function yt(){const k=await xt(!1),K=new URL(`${vt("account",t.environment)}/subscriptions/${t.clientId}`);k&&(K.hash=`#access_token=${k}`),window.location.href=K.toString()}return{autoOnboardProduct:oe,cancelContract:w,confirmAmendment:gt,createAmendment:ft,createCheckout:_e,deleteTag:D,deleteTally:te,deleteUserMetadata:z,generateLink:se,getBill:b,getBills:m,getCheckout:Me,getProxyContent:d,getContract:S,getContracts:g,getEntitlement:f,getEntitlementAccess:h,getEntitlements:l,getFulfillments:v,requestDelivery:p,getPaywall:Re,getPaymentIssues:F,getProfile:T,getProduct:I,getSubscriptions:y,getTally:R,getTallies:Y,getTags:q,getTransaction:A,getTransactions:O,getUserMetadata:ie,hasAccess:u,isSpotifyLinked:Z,linkSpotify:he,listUserMetadata:B,openHostedAccountPage:yt,pushTally:Q,setTag:N,setUserMetadata:L,unlinkSpotify:V,updateCheckout:Ae,updateProfile:$,getVendorSettings:Je,listVendors:lt}}const hb=["AdHeader","AdContainer","AD_Top","homead","ad-lead"];function vb(){return new Promise(t=>{const e=hb.map(r=>{const n=document.createElement("div");return n.innerHTML=" ",n.id=r,n.style.position="absolute",document.body.appendChild(n),n});window.setTimeout(()=>{const r=!e.every(n=>document.querySelector(`#${n.id}`)?.offsetParent);e.forEach(n=>n.remove()),t(r)},100)})}function pb(){const t=navigator.userAgent.toLowerCase(),e=[{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 r of e)if(r.regex.test(t))return{isInAppBrowser:!0,browserName:r.name};return/; wv\)/.test(t)?{isInAppBrowser:!0,browserName:"Unknown In-App Browser"}:{isInAppBrowser:!1,browserName:null}}const vp="sesamyFlags";async function pp(t){try{localStorage.setItem(vp,JSON.stringify(t))}catch{pe("Failed to save flags to localStorage")}}async function mb(t,e){const r=await Xn();r[t]=e,await pp(r)}async function gb(t){return(await Xn())[t]}async function yb(t){const e=await Xn();t in e&&(delete e[t],await pp(e))}async function Xn(){try{const t=localStorage.getItem(vp);return t?JSON.parse(t):{}}catch{return{}}}function wb(t){const{autoOnboardProduct:e,cancelContract:r,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:p,getFulfillments:g,getPaywall:S,getPaymentIssues:w,getProfile:y,getProduct:m,getProxyContent:b,getSubscriptions:O,getTags:A,getTally:L,getTallies:z,getTransaction:B,getTransactions:ie,getUserMetadata:q,getVendorSettings:D,listVendors:N,hasAccess:R,isSpotifyLinked:Y,linkSpotify:te,listUserMetadata:Q,openHostedAccountPage:I,pushTally:T,requestDelivery:$,setTag:F,setUserMetadata:Z,unlinkSpotify:V,updateCheckout:he,updateProfile:oe}=db(t),le={analytics:{track:np},attribution:{get:On,set:hp},auth:{getUser:y,getTokenSilently:xt,isAuthenticated:Wr,loginWithRedirect:Yn,loginWithPopup:sp,login:Sw,logout:nc,setToken:bs},bills:{get:c,list:l},browser:{detectAdblock:vb,isInAppBrowser:pb,isIncognito:Bs},checkouts:{create:n,get:u,update:he},clearCache:tt,content:{list:rw,get:ec,getLanguage:bn,unlock:nw,getPropertyFromHTML:Xv},contracts:{cancel:r,get:f,list:h},entitlements:{access:v,get:d,hasAccess:R,list:p,signedLinks:ic},events:{emit:ap,cancel:fw},flags:{get:gb,set:mb,list:Xn,delete:yb},fulfillments:{list:g,requestDelivery:$},generateLink:s,getPaymentIssues:w,getVersion:bb,isReady:()=>exports.isInitialized,log:pe,paywalls:{get:S},products:{autoOnboard:e,get:m,linkSpotify:te},profile:{get:y,isSpotifyLinked:Y,openHostedAccountPage:I,unlinkSpotify:V,update:oe},proxy:{getContent:b},subscriptions:{list:O},tags:{delete:a,list:A,set:F},tallies:{delete:i,get:L,list:z,push:T},transactions:{get:B,list:ie},userMetadata:{delete:o,get:q,list:Q,set:Z},vendors:{get:D,list:N},setToken:bs};return t.namespace&&(window[t.namespace]=le),le}function bb(){return Jn}function Sb(t,e){t.style.position="relative",t.style.height="200px",t.style.overflow="hidden";let n=0;const a=Array.from(t.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 Zo={d:(t,e)=>{for(var r in e)Zo.o(e,r)&&!Zo.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},ks={};Zo.d(ks,{A:()=>ng,k:()=>Os});var kr=function(t,e,r,n){return new(r||(r=Promise))(function(a,i){function o(l){try{u(n.next(l))}catch(c){i(c)}}function s(l){try{u(n.throw(l))}catch(c){i(c)}}function u(l){var c;l.done?a(l.value):(c=l.value,c instanceof r?c:new r(function(f){f(c)})).then(o,s)}u((n=n.apply(t,[])).next())})},Or=function(t,e){var r,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(u){return function(l){return(function(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(o=0)),o;)try{if(r=1,n&&(a=2&c[0]?n.return:c[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,c[1])).done)return a;switch(n=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,n=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!((a=a.length>0&&a[a.length-1])||c[0]!==6&&c[0]!==2)){o=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){o.label=c[1];break}if(c[0]===6&&o.label<a[1]){o.label=a[1],a=c;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(c);break}a[2]&&o.ops.pop(),o.trys.pop();continue}c=e.call(t,o)}catch(f){c=[6,f],n=0}finally{r=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}})([u,l])}}};function Os(){return kr(this,void 0,Promise,function(){return Or(this,function(t){switch(t.label){case 0:return[4,new Promise(function(e,r){var n="Unknown",a=!1;function i(h){a||(a=!0,e({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 kr(this,void 0,void 0,function(){var h,d;return Or(this,function(v){switch(v.label){case 0:return v.trys.push([0,2,,3]),[4,navigator.storage.getDirectory()];case 1:return v.sent(),i(!1),[3,3];case 2:return h=v.sent(),d=h instanceof Error&&typeof h.message=="string"?h.message:String(h),i(d.includes("unknown transient reason")),[3,3];case 3:return[2]}})})}function u(){var h;return kr(this,void 0,Promise,function(){return Or(this,function(d){switch(d.label){case 0:return typeof((h=navigator.storage)===null||h===void 0?void 0:h.getDirectory)!="function"?[3,2]:[4,s()];case 1:return d.sent(),[3,3];case 2:navigator.maxTouchPoints!==void 0?(function(){var v=String(Math.random());try{var p=indexedDB.open(v,1);p.onupgradeneeded=function(m){var P=m.target.result,y=function(b){i(b)};try{P.createObjectStore("t",{autoIncrement:!0}).put(new Blob),y(!1)}catch(b){(b instanceof Error&&typeof b.message=="string"?b.message:String(b)).includes("are not yet supported")?y(!0):y(!1)}finally{P.close(),indexedDB.deleteDatabase(v)}},p.onerror=function(){return i(!1)}}catch{i(!1)}})():(function(){var v=window.openDatabase,p=window.localStorage;try{v(null,null,null,null)}catch{return void i(!0)}try{p.setItem("test","1"),p.removeItem("test")}catch{return void i(!0)}i(!1)})(),d.label=3;case 3:return[2]}})})}function l(){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(h,d){var v=Math.round(d/1048576),p=2*Math.round((function(){var m,P,y,b=window;return(y=(P=(m=b?.performance)===null||m===void 0?void 0:m.memory)===null||P===void 0?void 0:P.jsHeapSizeLimit)!==null&&y!==void 0?y:1073741824})()/1048576);i(v<p)},function(h){r(new Error("detectIncognito somehow failed to query storage quota: "+h.message))})}function c(){self.Promise!==void 0&&self.Promise.allSettled!==void 0?l():(0,window.webkitRequestFileSystem)(0,1,function(){i(!1)},function(){i(!0)})}function f(){var h;return kr(this,void 0,Promise,function(){var d,v,p;return Or(this,function(m){switch(m.label){case 0:if(typeof((h=navigator.storage)===null||h===void 0?void 0:h.getDirectory)!="function")return[3,5];m.label=1;case 1:return m.trys.push([1,3,,4]),[4,navigator.storage.getDirectory()];case 2:return m.sent(),i(!1),[3,4];case 3:return d=m.sent(),v=d instanceof Error&&typeof d.message=="string"?d.message:String(d),i(v.includes("Security error")),[2];case 4:return[3,6];case 5:(p=indexedDB.open("inPrivate")).onerror=function(P){p.error&&p.error.name==="InvalidStateError"&&P.preventDefault(),i(!0)},p.onsuccess=function(){indexedDB.deleteDatabase("inPrivate"),i(!1)},m.label=6;case 6:return[2]}})})}(function(){return kr(this,void 0,Promise,function(){return Or(this,function(h){switch(h.label){case 0:return o()!==44&&o()!==43?[3,2]:(n="Safari",[4,u()]);case 1:return h.sent(),[3,6];case 2:return o()!==51?[3,3]:(d=navigator.userAgent,n=d.match(/Chrome/)?navigator.brave!==void 0?"Brave":d.match(/Edg/)?"Edge":d.match(/OPR/)?"Opera":"Chrome":"Chromium",c(),[3,6]);case 3:return o()!==25?[3,5]:(n="Firefox",[4,f()]);case 4:return h.sent(),[3,6];case 5:navigator.msSaveBlob!==void 0?(n="Internet Explorer",i(window.indexedDB===void 0)):r(new Error("detectIncognito cannot determine the browser")),h.label=6;case 6:return[2]}var d})})})().catch(r)})];case 1:return[2,t.sent()]}})})}typeof window<"u"&&(window.detectIncognito=Os);const ng=Os;ks.A;const ag=ks.k,rn="sesamy_incognito_mode";function Cs(){try{const t=sessionStorage.getItem(rn);return t===null?void 0:t==="true"}catch{return}}async function ig(){try{const t=sessionStorage.getItem(rn);if(t!==null)return t==="true";const{isPrivate:e}=await ag();return sessionStorage.setItem(rn,e.toString()),e}catch{try{sessionStorage.setItem(rn,"false")}catch{}return!1}}function qr(){return typeof window<"u"}function rd(t,e,r,n,a){for(e=e.split?e.split("."):e,n=0;n<e.length;n++)t=t?t[e[n]]:a;return t===a?r:t}var og="function",sg="string",ot="undefined",cg="boolean",fn="object",ug="array",lg="number",fg="symbol",dg="null",Yo=function(){},rv="any",nv="*",Wt="__",hg="form",vg="input",pg="button",mg="select",dn=typeof process!==ot?process:{};dn.env&&dn.env.NODE_ENV;var xe=typeof document!==ot;dn.versions!=null&&dn.versions.node!=null;typeof Deno!==ot&&Deno.core;xe&&window.name==="nodejs"||typeof navigator!==ot&&typeof navigator.userAgent!==ot&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));function av(t,e){return e.charAt(0)[t]()+e.slice(1)}var gg=av.bind(null,"toUpperCase"),yg=av.bind(null,"toLowerCase");function wg(t){return iv(t)?gg(dg):typeof t===fn?Pg(t):Object.prototype.toString.call(t).slice(8,-1)}function hn(t,e){e===void 0&&(e=!0);var r=wg(t);return e?yg(r):r}function Gr(t,e){return typeof e===t}var Ve=Gr.bind(null,og),At=Gr.bind(null,sg),or=Gr.bind(null,ot),bg=Gr.bind(null,cg);Gr.bind(null,fg);function iv(t){return t===null}function Sg(t){return hn(t)===lg&&!isNaN(t)}function ov(t){return hn(t)===ug}function We(t){if(!Ig(t))return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Ig(t){return t&&(typeof t===fn||t!==null)}function Pg(t){return Ve(t.constructor)?t.constructor.name:null}function Eg(t){return t instanceof Error||At(t.message)&&t.constructor&&Sg(t.constructor.stackTraceLimit)}function sv(t,e){if(typeof e!="object"||iv(e))return!1;if(e instanceof t)return!0;var r=hn(new t(""));if(Eg(e))for(;e;){if(hn(e)===r)return!0;e=Object.getPrototypeOf(e)}return!1}sv.bind(null,TypeError);sv.bind(null,SyntaxError);function jn(t,e){var r=t instanceof Element||t instanceof HTMLDocument;return r&&e?Rg(t,e):r}function Rg(t,e){return e===void 0&&(e=""),t&&t.nodeName===e.toUpperCase()}function Ln(t){var e=[].slice.call(arguments,1);return function(){return t.apply(void 0,[].slice.call(arguments).concat(e))}}Ln(jn,hg);Ln(jn,pg);Ln(jn,vg);Ln(jn,mg);function _g(t){return t?ov(t)?t:[t]:[]}function nd(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch{return null}}function Tg(){if(xe){var t=navigator,e=t.languages;return t.userLanguage||(e&&e.length?e[0]:t.language)}}function kg(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function Og(t){return(function(e){for(var r,n=Object.create(null),a=/([^&=]+)=?([^&]*)/g;r=a.exec(e);){var i=nd(r[1]),o=nd(r[2]);if(i)if(i.substring(i.length-2)==="[]"){var s=n[i=i.substring(0,i.length-2)]||(n[i]=[]);n[i]=Array.isArray(s)?s:[],n[i].push(o)}else n[i]=o===""||o}for(var u in n){var l=u.split("[");l.length>1&&(Cg(n,l.map(function(c){return c.replace(/[?[\]\\ ]/g,"")}),n[u]),delete n[u])}return n})((function(e){return xe&&window.location.search.substring(1)})())}function Cg(t,e,r){for(var n=e.length-1,a=0;a<n;++a){var i=e[a];if(i==="__proto__"||i==="constructor")break;i in t||(t[i]={}),t=t[i]}t[e[n]]=r}function Nn(){for(var t="",e=0,r=4294967295*Math.random()|0;e++<36;){var n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"[e-1],a=15&r;t+=n=="-"||n=="4"?n:(n=="x"?a:3&a|8).toString(16),r=e%8==0?4294967295*Math.random()|0:r>>4}return t}function Ag(t,e){var r,n,a,i=null,o=0,s=function(){o=new Date,i=null,a=t.apply(r,n)};return function(){var u=new Date;o||(o=u);var l=e-(u-o);return r=this,n=arguments,l<=0?(clearTimeout(i),i=null,o=u,a=t.apply(r,n)):i||(i=setTimeout(s,l)),a}}var zt="global",dr=Wt+zt+Wt,hr=typeof self===fn&&self.self===self&&self||typeof global===fn&&global[zt]===global&&global||void 0;function Vt(t){return hr[dr][t]}function Jt(t,e){return hr[dr][t]=e}function Ir(t){delete hr[dr][t]}function Pr(t,e,r){var n;try{if(As(t)){var a=window[t];n=a[e].bind(a)}}catch{}return n||r}hr[dr]||(hr[dr]={});var Vr={};function As(t){if(typeof Vr[t]!==ot)return Vr[t];try{var e=window[t];e.setItem(ot,ot),e.removeItem(ot)}catch{return Vr[t]=!1}return Vr[t]=!0}function ae(){return ae=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ae.apply(null,arguments)}var Ot="function",It="undefined",Lr="reducer",cv="@@redux/",Xo=cv+"INIT",Ug=cv+Math.random().toString(36),ad=(function(){return typeof Symbol===Ot&&Symbol.observable||"@@observable"})(),Jr=" != "+Ot;function uv(t,e,r){var n;if(typeof e===Ot&&typeof r===It&&(r=e,e=void 0),typeof r!==It){if(typeof r!==Ot)throw new Error("enhancer"+Jr);return r(uv)(t,e)}if(typeof t!==Ot)throw new Error(Lr+Jr);var a=t,i=e,o=[],s=o,u=!1;function l(){s===o&&(s=o.slice())}function c(){return i}function f(d){if(typeof d!==Ot)throw new Error("Listener"+Jr);var v=!0;return l(),s.push(d),function(){if(v){v=!1,l();var p=s.indexOf(d);s.splice(p,1)}}}function h(d){if(!We(d))throw new Error("Act != obj");if(typeof d.type===It)throw new Error("ActType "+It);if(u)throw new Error("Dispatch in "+Lr);try{u=!0,i=a(i,d)}finally{u=!1}for(var v=o=s,p=0;p<v.length;p++)(0,v[p])();return d}return h({type:Xo}),(n={dispatch:h,subscribe:f,getState:c,replaceReducer:function(d){if(typeof d!==Ot)throw new Error("next "+Lr+Jr);a=d,h({type:Xo})}})[ad]=function(){var d,v=f;return(d={subscribe:function(p){if(typeof p!="object")throw new TypeError("Observer != obj");function m(){p.next&&p.next(c())}return m(),{unsubscribe:v(m)}}})[ad]=function(){return this},d},n}function jg(t,e){var r=e&&e.type;return"action "+(r&&r.toString()||"?")+Lr+" "+t+" returns "+It}function vr(){var t=[].slice.call(arguments);return t.length===0?function(e){return e}:t.length===1?t[0]:t.reduce(function(e,r){return function(){return e(r.apply(void 0,[].slice.call(arguments)))}})}function Lg(){var t=arguments;return function(e){return function(r,n,a){var i,o=e(r,n,a),s=o.dispatch,u={getState:o.getState,dispatch:function(l){return s(l)}};return i=[].slice.call(t).map(function(l){return l(u)}),ae({},o,{dispatch:s=vr.apply(void 0,i)(o.dispatch)})}}}var Ut=Wt+"anon_id",Ht=Wt+"user_id",cr=Wt+"user_traits",Qo="analytics",kt="userId",sr="anonymousId",nn=["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"],es=["name","EVENTS","config","loaded"],ne=nn.reduce(function(t,e){return t[e]=e,t},{registerPluginType:function(t){return"registerPlugin:"+t},pluginReadyType:function(t){return"ready:"+t}}),id=/^utm_/,od=/^an_prop_/,sd=/^an_trait_/;function Ng(t){var e=t.storage.setItem;return function(r){return function(n){return function(a){if(a.type===ne.bootstrap){var i=a.params,o=a.user,s=a.persistedUser,u=a.initialUser,l=s.userId===o.userId;s.anonymousId!==o.anonymousId&&e(Ut,o.anonymousId),l||e(Ht,o.userId),u.traits&&e(cr,ae({},l&&s.traits?s.traits:{},u.traits));var c=Object.keys(a.params);if(c.length){var f=i.an_uid,h=i.an_event,d=c.reduce(function(v,p){if(p.match(id)||p.match(/^(d|g)clid/)){var m=p.replace(id,"");v.campaign[m==="campaign"?"name":m]=i[p]}return p.match(od)&&(v.props[p.replace(od,"")]=i[p]),p.match(sd)&&(v.traits[p.replace(sd,"")]=i[p]),v},{campaign:{},props:{},traits:{}});r.dispatch(ae({type:ne.params,raw:i},d,f?{userId:f}:{})),f&&setTimeout(function(){return t.identify(f,d.traits)},0),h&&setTimeout(function(){return t.track(h,d.props)},0),Object.keys(d.campaign).length&&r.dispatch({type:ne.campaign,campaign:d.campaign})}}return n(a)}}}}function qg(t){return function(e,r){if(e===void 0&&(e={}),r===void 0&&(r={}),r.type===ne.setItemEnd){if(r.key===Ut)return ae({},e,{anonymousId:r.value});if(r.key===Ht)return ae({},e,{userId:r.value})}switch(r.type){case ne.identify:return Object.assign({},e,{userId:r.userId,traits:ae({},e.traits,r.traits)});case ne.reset:return[Ht,Ut,cr].forEach(function(n){t.removeItem(n)}),Object.assign({},e,{userId:null,anonymousId:null,traits:{}});default:return e}}}function cd(t){return{userId:t.getItem(Ht),anonymousId:t.getItem(Ut),traits:t.getItem(cr)}}var ts=function(t){return Wt+"TEMP"+Wt+t};function xg(t){var e=t.storage,r=e.setItem,n=e.removeItem,a=e.getItem;return function(i){return function(o){return function(s){var u=s.userId,l=s.traits,c=s.options;if(s.type===ne.reset&&([Ht,cr,Ut].forEach(function(d){n(d)}),[kt,sr,"traits"].forEach(function(d){Ir(ts(d))})),s.type===ne.identify){a(Ut)||r(Ut,Nn());var f=a(Ht),h=a(cr)||{};f&&f!==u&&i.dispatch({type:ne.userIdChanged,old:{userId:f,traits:h},new:{userId:u,traits:l},options:c}),u&&r(Ht,u),l&&r(cr,ae({},h,l))}return o(s)}}}}var Ar={};function ud(t,e){Ar[t]&&Ve(Ar[t])&&(Ar[t](e),delete Ar[t])}function lv(t,e,r){return new Promise(function(n,a){return e()?n(t):r<1?a(ae({},t,{queue:!0})):new Promise(function(i){return setTimeout(i,10)}).then(function(i){return lv(t,e,r-10).then(n,a)})})}function $g(t){return{abort:t}}function fv(t,e,r){var n={},a=e(),i=t.getState(),o=i.plugins,s=i.queue,u=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,p=a[d][v];if(p&&Ve(p)){var m,P=(function(g,w){return g===void 0&&(g={}),w===void 0&&(w={}),[kt,sr].reduce(function(A,x){return g.hasOwnProperty(x)&&w[x]&&w[x]!==g[x]&&(A[x]=w[x]),A},g)})(h.payload,u),y=n[P.meta.rid];if(!y&&(m=p({payload:P,config:o[d].config,instance:r,abort:$g}))&&We(m)&&m.abort)return void(n[P.meta.rid]=!0);if(!y){var b=v+":"+d;t.dispatch(ae({},P,{type:b,_:{called:b,from:"queueDrain"}}))}}});var c=s.actions.filter(function(f,h){return!~l.processIndex.indexOf(h)});s.actions=c}}}var qo=function(t){var e=t.data,r=t.action,n=t.instance,a=t.state,i=t.allPlugins,o=t.allMatches,s=t.store,u=t.EVENTS;try{var l=a.plugins,c=a.context,f=r.type,h=f.match(ur),d=e.exact.map(function(m){return m.pluginName});h&&(d=o.during.map(function(m){return m.pluginName}));var v=(function(m,P){return function(y,b,g){var w=b.config,A=b.name,x=A+"."+y.type;g&&(x=g.event);var N=y.type.match(ur)?(function(z,B,ie,j,D){return function(L,k){var Y=j?j.name:z,te=k&&xr(k)?k:ie;if(j&&(!(te=k&&xr(k)?k:[z]).includes(z)||te.length!==1))throw new Error("Method "+B+" can only abort "+z+" plugin. "+JSON.stringify(te)+" input valid");return ae({},D,{abort:{reason:L,plugins:te,caller:B,_:Y}})}})(A,x,P,g,y):(function(z,B){return function(){throw new Error(z.type+" action not cancellable. Remove abort in "+B)}})(y,x);return{payload:Dg(y),instance:m,config:w||{},abort:N}}})(n,d),p=e.exact.reduce(function(m,P){var y=P.pluginName,b=P.methodName,g=!1;return b.match(/^initialize/)||b.match(/^reset/)||(g=!l[y].loaded),c.offline&&b.match(/^(page|track|identify)/)&&(g=!0),m[""+y]=g,m},{});return Promise.resolve(e.exact.reduce(function(m,P,y){var b=P.pluginName;return Promise.resolve(m).then(function(g){function w(){return Promise.resolve(g)}var A=(function(){if(e.namespaced&&e.namespaced[b])return Promise.resolve(e.namespaced[b].reduce(function(x,N,z){return Promise.resolve(x).then(function(B){return N.method&&Ve(N.method)?((function(L,k){var Y=md(L);if(Y&&Y.name===k){var te=md(Y.method);throw new Error([k+" plugin is calling method "+L,"Plugins cant call self","Use "+Y.method+" "+(te?"or "+te.method:"")+" in "+k+" plugin insteadof "+L].join(`
|
|
35
|
+
`))}})(N.methodName,N.pluginName),Promise.resolve(N.method({payload:B,instance:n,abort:(ie=B,j=b,D=N.pluginName,function(L,k){return ae({},ie,{abort:{reason:L,plugins:k||[j],caller:f,from:D||j}})}),config:dd(N.pluginName,l,i),plugins:l})).then(function(L){var k=We(L)?L:{};return Promise.resolve(ae({},B,k))})):B;var ie,j,D})},Promise.resolve(r))).then(function(x){g[b]=x});g[b]=r})();return A&&A.then?A.then(w):w()})},Promise.resolve({}))).then(function(m){return Promise.resolve(e.exact.reduce(function(P,y,b){try{var g=e.exact.length===b+1,w=y.pluginName,A=i[w];return Promise.resolve(P).then(function(x){var N=m[w]?m[w]:{};if(h&&(N=x),$o(N,w))return xo({data:N,method:f,instance:n,pluginName:w,store:s}),Promise.resolve(x);if($o(x,w))return g&&xo({data:x,method:f,instance:n,store:s}),Promise.resolve(x);if(p.hasOwnProperty(w)&&p[w]===!0)return s.dispatch({type:"queue",plugin:w,payload:N,_:{called:"queue",from:"queueMechanism"}}),Promise.resolve(x);var z=v(m[w],i[w]);return Promise.resolve(A[f]({abort:z.abort,payload:N,instance:n,config:dd(w,l,i),plugins:l})).then(function(B){var ie=We(B)?B:{},j=ae({},x,ie),D=m[w];if($o(D,w))xo({data:D,method:f,instance:n,pluginName:w,store:s});else{var L=f+":"+w;(L.match(/:/g)||[]).length<2&&!f.match(ld)&&!f.match(fd)&&n.dispatch(ae({},h?j:N,{type:L,_:{called:L,from:"submethod"}}))}return Promise.resolve(j)})})}catch(x){return Promise.reject(x)}},Promise.resolve(r))).then(function(P){if(!(f.match(ur)||f.match(/^registerPlugin/)||f.match(fd)||f.match(ld)||f.match(/^params/)||f.match(/^userIdChanged/))){if(u.plugins.includes(f),P._&&P._.originalAction===f)return P;var y=ae({},P,{_:{originalAction:P.type,called:P.type,from:"engineEnd"}});dv(P,e.exact.length)&&!f.match(/End$/)&&(y=ae({},y,{type:P.type+"Aborted"})),s.dispatch(y)}return P})})}catch(m){return Promise.reject(m)}},ur=/Start$/,ld=/^bootstrap/,fd=/^ready/;function xo(t){var e=t.pluginName,r=t.method+"Aborted"+(e?":"+e:"");t.store.dispatch(ae({},t.data,{type:r,_:{called:r,from:"abort"}}))}function dd(t,e,r){var n=e[t]||r[t];return n&&n.config?n.config:{}}function hd(t,e){return e.reduce(function(r,n){return n[t]?r.concat({methodName:t,pluginName:n.name,method:n[t]}):r},[])}function vd(t,e){var r=t.replace(ur,""),n=e?":"+e:"";return[""+t+n,""+r+n,r+"End"+n]}function $o(t,e){var r=t.abort;return!!r&&(r===!0||pd(r,e)||r&&pd(r.plugins,e))}function dv(t,e){var r=t.abort;if(!r)return!1;if(r===!0||At(r))return!0;var n=r.plugins;return xr(r)&&r.length===e||xr(n)&&n.length===e}function xr(t){return Array.isArray(t)}function pd(t,e){return!(!t||!xr(t))&&t.includes(e)}function md(t){var e=t.match(/(.*):(.*)/);return!!e&&{method:e[1],name:e[2]}}function Dg(t){return Object.keys(t).reduce(function(e,r){return r==="type"||(e[r]=We(t[r])?Object.assign({},t[r]):t[r]),e},{})}function Mg(t,e,r){var n={};return function(a){return function(i){return function(o){try{var s,u=function(g){return s?g:i(f)},l=o.type,c=o.plugins,f=o;if(o.abort)return Promise.resolve(i(o));if(l===ne.enablePlugin&&a.dispatch({type:ne.initializeStart,plugins:c,disabled:[],fromEnable:!0,meta:o.meta}),l===ne.disablePlugin&&setTimeout(function(){return ud(o.meta.rid,{payload:o})},0),l===ne.initializeEnd){var h=e(),d=Object.keys(h),v=d.filter(function(g){return c.includes(g)}).map(function(g){return h[g]}),p=[],m=[],P=o.disabled,y=v.map(function(g){var w=g.loaded,A=g.name,x=g.config;return lv(g,function(){return w({config:x})},1e4).then(function(N){return n[A]||(a.dispatch({type:ne.pluginReadyType(A),name:A,events:Object.keys(g).filter(function(z){return!es.includes(z)})}),n[A]=!0),p=p.concat(A),g}).catch(function(N){if(N instanceof Error)throw new Error(N);return m=m.concat(N.name),N})});Promise.all(y).then(function(g){var w={plugins:p,failed:m,disabled:P};setTimeout(function(){d.length===y.length+P.length&&a.dispatch(ae({},{type:ne.ready},w))},0)})}var b=(function(){if(l!==ne.bootstrap)return/^ready:([^:]*)$/.test(l)&&setTimeout(function(){return fv(a,e,t)},0),Promise.resolve((function(g,w,A,x,N){try{var z=Ve(w)?w():w,B=g.type,ie=B.replace(ur,"");if(g._&&g._.called)return Promise.resolve(g);var j=A.getState(),D=(Y=z,(te=j.plugins)===void 0&&(te={}),(Q=g.options)===void 0&&(Q={}),Object.keys(Y).filter(function(S){var _=Q.plugins||{};return bg(_[S])?_[S]:_.all!==!1&&(!te[S]||te[S].enabled!==!1)}).map(function(S){return Y[S]}));B===ne.initializeStart&&g.fromEnable&&(D=Object.keys(j.plugins).filter(function(S){var _=j.plugins[S];return g.plugins.includes(S)&&!_.initialized}).map(function(S){return z[S]}));var L=D.map(function(S){return S.name}),k=(function(S,_){var q=vd(S).map(function(F){return hd(F,_)});return _.reduce(function(F,Z){var V=Z.name,he=vd(S,V).map(function(Re){return hd(Re,_)}),oe=he[0],le=he[1],se=he[2];return oe.length&&(F.beforeNS[V]=oe),le.length&&(F.duringNS[V]=le),se.length&&(F.afterNS[V]=se),F},{before:q[0],beforeNS:{},during:q[1],duringNS:{},after:q[2],afterNS:{}})})(B,D);return Promise.resolve(qo({action:g,data:{exact:k.before,namespaced:k.beforeNS},state:j,allPlugins:z,allMatches:k,instance:A,store:x,EVENTS:N})).then(function(S){function _(){var Z=(function(){if(B.match(ur))return Promise.resolve(qo({action:ae({},q,{type:ie+"End"}),data:{exact:k.after,namespaced:k.afterNS},state:j,allPlugins:z,allMatches:k,instance:A,store:x,EVENTS:N})).then(function(V){V.meta&&V.meta.hasCallback&&ud(V.meta.rid,{payload:V})})})();return Z&&Z.then?Z.then(function(){return S}):S}if(dv(S,L.length))return S;var q,F=(function(){if(B!==ie)return Promise.resolve(qo({action:ae({},S,{type:ie}),data:{exact:k.during,namespaced:k.duringNS},state:j,allPlugins:z,allMatches:k,instance:A,store:x,EVENTS:N})).then(function(Z){q=Z});q=S})();return F&&F.then?F.then(_):_()})}catch(S){return Promise.reject(S)}var Y,te,Q})(o,e,t,a,r)).then(function(g){var w=i(g);return s=1,w})})();return Promise.resolve(b&&b.then?b.then(u):u(b))}catch(g){return Promise.reject(g)}}}}}function Fg(t){return function(e){return function(r){return function(n){var a=n.type,i=n.key,o=n.value,s=n.options;if(a===ne.setItem||a===ne.removeItem){if(n.abort)return r(n);a===ne.setItem?t.setItem(i,o,s):t.removeItem(i,s)}return r(n)}}}}var Kg=function(){var t=this;this.before=[],this.after=[],this.addMiddleware=function(e,r){t[r]=t[r].concat(e)},this.removeMiddleware=function(e,r){var n=t[r].findIndex(function(a){return a===e});n!==-1&&(t[r]=[].concat(t[r].slice(0,n),t[r].slice(n+1)))},this.dynamicMiddlewares=function(e){return function(r){return function(n){return function(a){var i={getState:r.getState,dispatch:function(s){return r.dispatch(s)}},o=t[e].map(function(s){return s(i)});return vr.apply(void 0,o)(n)(a)}}}}};function zg(t){return function(e,r){e===void 0&&(e={});var n={};if(r.type==="initialize:aborted")return e;if(/^registerPlugin:([^:]*)$/.test(r.type)){var a=gd(r.type,"registerPlugin"),i=t()[a];if(!i||!a)return e;var o=r.enabled,s=i.config;return n[a]={enabled:o,initialized:!!o&&!i.initialize,loaded:!!o&&!!i.loaded({config:s}),config:s},ae({},e,n)}if(/^initialize:([^:]*)$/.test(r.type)){var u=gd(r.type,ne.initialize),l=t()[u];return l&&u?(n[u]=ae({},e[u],{initialized:!0,loaded:!!l.loaded({config:l.config})}),ae({},e,n)):e}if(/^ready:([^:]*)$/.test(r.type))return n[r.name]=ae({},e[r.name],{loaded:!0}),ae({},e,n);switch(r.type){case ne.disablePlugin:return ae({},e,yd(r.plugins,!1,e));case ne.enablePlugin:return ae({},e,yd(r.plugins,!0,e));default:return e}}}function gd(t,e){return t.substring(e.length+1,t.length)}function yd(t,e,r){return t.reduce(function(n,a){return n[a]=ae({},r[a],{enabled:e}),n},r)}function hv(t){try{return JSON.parse(JSON.stringify(t))}catch{}return t}var Hg={last:{},history:[]};function Bg(t,e){t===void 0&&(t=Hg);var r=e.options,n=e.meta;if(e.type===ne.track){var a=hv(ae({event:e.event,properties:e.properties},Object.keys(r).length&&{options:r},{meta:n}));return ae({},t,{last:a,history:t.history.concat(a)})}return t}var Gg={actions:[]};function Wg(t,e){t===void 0&&(t=Gg);var r=e.payload;switch(e.type){case"queue":var n;return n=r&&r.type&&r.type===ne.identify?[e].concat(t.actions):t.actions.concat(e),ae({},t,{actions:n});case"dequeue":return[];default:return t}}var vv=/#.*$/;function Vg(t){var e=/(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(t);return"/"+(e&&e[3]?e[3].split("?")[0].replace(vv,""):"")}var pv,mv,gv,yv,Jg=function(t){if(t===void 0&&(t={}),!xe)return t;var e=document,r=e.title,n=e.referrer,a=window,i=a.location,o=a.innerWidth,s=a.innerHeight,u=i.hash,l=i.search,c=(function(h){var d=(function(){if(xe){for(var v,p=document.getElementsByTagName("link"),m=0;v=p[m];m++)if(v.getAttribute("rel")==="canonical")return v.getAttribute("href")}})();return d?d.match(/\?/)?d:d+h:window.location.href.replace(vv,"")})(l),f={title:r,url:c,path:Vg(c),hash:u,search:l,width:o,height:s};return n&&n!==""&&(f.referrer=n),ae({},f,t)},Zg={last:{},history:[]};function Yg(t,e){t===void 0&&(t=Zg);var r=e.options;if(e.type===ne.page){var n=hv(ae({properties:e.properties,meta:e.meta},Object.keys(r).length&&{options:r}));return ae({},t,{last:n,history:t.history.concat(n)})}return t}pv=(function(){if(!xe)return!1;var t=navigator.appVersion;return~t.indexOf("Win")?"Windows":~t.indexOf("Mac")?"MacOS":~t.indexOf("X11")?"UNIX":~t.indexOf("Linux")?"Linux":"Unknown OS"})(),mv=xe?document.referrer:null,gv=Tg(),yv=kg();var wd={initialized:!1,sessionId:Nn(),app:null,version:null,debug:!1,offline:!!xe&&!navigator.onLine,os:{name:pv},userAgent:xe?navigator.userAgent:"node",library:{name:Qo,version:"0.13.1"},timezone:yv,locale:gv,campaign:{},referrer:mv};function Xg(t,e){t===void 0&&(t=wd);var r=t.initialized,n=e.campaign;switch(e.type){case ne.campaign:return ae({},t,{campaign:n});case ne.offline:return ae({},t,{offline:!0});case ne.online:return ae({},t,{offline:!1});default:return r?t:ae({},wd,t,{initialized:!0})}}var Qg=["plugins","reducers","storage"];function ey(t,e,r){if(xe){var n=window[(r?"add":"remove")+"EventListener"];t.split(" ").forEach(function(a){n(a,e)})}}function ty(t){var e=ey.bind(null,"online offline",function(r){return Promise.resolve(!navigator.onLine).then(t)});return e(!0),function(r){return e(!1)}}function wv(){return Jt(Qo,[]),function(t){return function(e,r,n){var a=t(e,r,n),i=a.dispatch;return Object.assign(a,{dispatch:function(o){return hr[dr][Qo].push(o.action||o),i(o)}})}}}function bd(t){return function(){return vr(vr.apply(null,arguments),wv())}}function Do(t){return t?ov(t)?t:[t]:[]}function Sd(t,e,r){t===void 0&&(t={});var n,a,i=Nn();return e&&(Ar[i]=(n=e,a=(function(o){for(var s,u=o||Array.prototype.slice.call(arguments),l=0;l<u.length;l++)if(Ve(u[l])){s=u[l];break}return s})(r),function(o){a&&a(o),n(o)})),ae({},t,{rid:i,ts:new Date().getTime()},e?{hasCallback:!0}:{})}function ry(t){t===void 0&&(t={});var e=t.reducers||{},r=t.initialUser||{},n=(t.plugins||[]).reduce(function(S,_){if(Ve(_))return S.middlewares=S.middlewares.concat(_),S;if(_.NAMESPACE&&(_.name=_.NAMESPACE),!_.name)throw new Error("https://lytics.dev/errors/1");_.config||(_.config={});var q=_.EVENTS?Object.keys(_.EVENTS).map(function(V){return _.EVENTS[V]}):[];S.pluginEnabled[_.name]=!(_.enabled===!1||_.config.enabled===!1),delete _.enabled,_.methods&&(S.methods[_.name]=Object.keys(_.methods).reduce(function(V,he){var oe;return V[he]=(oe=_.methods[he],function(){for(var le=Array.prototype.slice.call(arguments),se=new Array(oe.length),Re=0;Re<le.length;Re++)se[Re]=le[Re];return se[se.length]=w,oe.apply({instance:w},se)}),V},{}),delete _.methods);var F=Object.keys(_).concat(q),Z=new Set(S.events.concat(F));if(S.events=Array.from(Z),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=t.storage?t.storage:{getItem:Vt,setItem:Jt,removeItem:Ir},i=(function(S){return function(_,q,F){return q.getState("user")[_]||(F&&We(F)&&F[_]?F[_]:cd(S)[_]||Vt(ts(_))||null)}})(a),o=n.plugins,s=n.events.filter(function(S){return!es.includes(S)}).sort(),u=new Set(s.concat(nn).filter(function(S){return!es.includes(S)})),l=Array.from(u).sort(),c=function(){return o},f=new Kg,h=f.addMiddleware,d=f.removeMiddleware,v=f.dynamicMiddlewares,p=function(){throw new Error("Abort disabled inListener")},m=Og(),P=cd(a),y=ae({},P,r,m.an_uid?{userId:m.an_uid}:{},m.an_aid?{anonymousId:m.an_aid}:{});y.anonymousId||(y.anonymousId=Nn());var b=ae({enable:function(S,_){return new Promise(function(q){k.dispatch({type:ne.enablePlugin,plugins:Do(S),_:{originalAction:ne.enablePlugin}},q,[_])})},disable:function(S,_){return new Promise(function(q){k.dispatch({type:ne.disablePlugin,plugins:Do(S),_:{originalAction:ne.disablePlugin}},q,[_])})}},n.methods),g=!1,w={identify:function(S,_,q,F){try{var Z=At(S)?S:null,V=We(S)?S:_,he=q||{},oe=w.user();Jt(ts(kt),Z);var le=Z||V.userId||i(kt,w,V);return Promise.resolve(new Promise(function(se){k.dispatch(ae({type:ne.identifyStart,userId:le,traits:V||{},options:he,anonymousId:oe.anonymousId},oe.id&&oe.id!==Z&&{previousId:oe.id}),se,[_,q,F])}))}catch(se){return Promise.reject(se)}},track:function(S,_,q,F){try{var Z=We(S)?S.event:S;if(!Z||!At(Z))throw new Error("EventMissing");var V=We(S)?S:_||{},he=We(q)?q:{};return Promise.resolve(new Promise(function(oe){k.dispatch({type:ne.trackStart,event:Z,properties:V,options:he,userId:i(kt,w,_),anonymousId:i(sr,w,_)},oe,[_,q,F])}))}catch(oe){return Promise.reject(oe)}},page:function(S,_,q){try{var F=We(S)?S:{},Z=We(_)?_:{};return Promise.resolve(new Promise(function(V){k.dispatch({type:ne.pageStart,properties:Jg(F),options:Z,userId:i(kt,w,F),anonymousId:i(sr,w,F)},V,[S,_,q])}))}catch(V){return Promise.reject(V)}},user:function(S){if(S===kt||S==="id")return i(kt,w);if(S===sr||S==="anonId")return i(sr,w);var _=w.getState("user");return S?rd(_,S):_},reset:function(S){return new Promise(function(_){k.dispatch({type:ne.resetStart},_,S)})},ready:function(S){return g&&S({plugins:b,instance:w}),w.on(ne.ready,function(_){S&&S(_),g=!0})},on:function(S,_){if(!S||!Ve(_))return!1;if(S===ne.bootstrap)throw new Error(".on disabled for "+S);var q=/Start$|Start:/;if(S==="*"){var F=function(oe){return function(le){return function(se){return se.type.match(q)&&_({payload:se,instance:w,plugins:o}),le(se)}}},Z=function(oe){return function(le){return function(se){return se.type.match(q)||_({payload:se,instance:w,plugins:o}),le(se)}}};return h(F,Zr),h(Z,Yr),function(){d(F,Zr),d(Z,Yr)}}var V=S.match(q)?Zr:Yr,he=function(oe){return function(le){return function(se){return se.type===S&&_({payload:se,instance:w,plugins:o,abort:p}),le(se)}}};return h(he,V),function(){return d(he,V)}},once:function(S,_){if(!S||!Ve(_))return!1;if(S===ne.bootstrap)throw new Error(".once disabled for "+S);var q=w.on(S,function(F){_({payload:F.payload,instance:w,plugins:o,abort:p}),q()});return q},getState:function(S){var _=k.getState();return S?rd(_,S):Object.assign({},_)},dispatch:function(S){var _=At(S)?{type:S}:S;if(nn.includes(_.type))throw new Error("reserved action "+_.type);var q=ae({},_,{_:ae({originalAction:_.type},S._||{})});k.dispatch(q)},enablePlugin:b.enable,disablePlugin:b.disable,plugins:b,storage:{getItem:a.getItem,setItem:function(S,_,q){k.dispatch({type:ne.setItemStart,key:S,value:_,options:q})},removeItem:function(S,_){k.dispatch({type:ne.removeItemStart,key:S,options:_})}},setAnonymousId:function(S,_){w.storage.setItem(Ut,S,_)},events:{core:nn,plugins:s}},A=n.middlewares.concat([function(S){return function(_){return function(q){return q.meta||(q.meta=Sd()),_(q)}}},v(Zr),Mg(w,c,{all:l,plugins:s}),Fg(a),Ng(w),xg(w),v(Yr)]),x={context:Xg,user:qg(a),page:Yg,track:Bg,plugins:zg(c),queue:Wg},N=vr,z=vr;if(xe&&t.debug){var B=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;B&&(N=B({trace:!0,traceLimit:25})),z=function(){return arguments.length===0?wv():We(typeof arguments[0])?bd():bd().apply(null,arguments)}}var ie,j=(function(S){return Object.keys(S).reduce(function(_,q){return Qg.includes(q)||(_[q]=S[q]),_},{})})(t),D=n.pluginsArray.reduce(function(S,_){var q=_.name,F=_.config,Z=_.loaded,V=n.pluginEnabled[q];return S[q]={enabled:V,initialized:!!V&&!_.initialize,loaded:!!Z({config:F}),config:F},S},{}),L={context:j,user:y,plugins:D},k=uv((function(S){for(var _=Object.keys(S),q={},F=0;F<_.length;F++){var Z=_[F];typeof S[Z]===Ot&&(q[Z]=S[Z])}var V,he=Object.keys(q);try{(function(oe){Object.keys(oe).forEach(function(le){var se=oe[le];if(typeof se(void 0,{type:Xo})===It||typeof se(void 0,{type:Ug})===It)throw new Error(Lr+" "+le+" "+It)})})(q)}catch(oe){V=oe}return function(oe,le){if(oe===void 0&&(oe={}),V)throw V;for(var se=!1,Re={},Ue=0;Ue<he.length;Ue++){var Fe=he[Ue],ke=oe[Fe],Ze=(0,q[Fe])(ke,le);if(typeof Ze===It){var ut=jg(Fe,le);throw new Error(ut)}Re[Fe]=Ze,se=se||Ze!==ke}return se?Re:oe}})(ae({},x,e)),L,z(N(Lg.apply(void 0,A))));k.dispatch=(ie=k.dispatch,function(S,_,q){var F=ae({},S,{meta:Sd(S.meta,_,Do(q))});return ie.apply(null,[F])});var Y=Object.keys(o);k.dispatch({type:ne.bootstrap,plugins:Y,config:j,params:m,user:y,initialUser:r,persistedUser:P});var te=Y.filter(function(S){return n.pluginEnabled[S]}),Q=Y.filter(function(S){return!n.pluginEnabled[S]});return k.dispatch({type:ne.registerPlugins,plugins:Y,enabled:n.pluginEnabled}),n.pluginsArray.map(function(S,_){var q=S.bootstrap,F=S.config,Z=S.name;q&&Ve(q)&&q({instance:w,config:F,payload:S}),k.dispatch({type:ne.registerPluginType(Z),name:Z,enabled:n.pluginEnabled[Z],plugin:S}),n.pluginsArray.length===_+1&&k.dispatch({type:ne.initializeStart,plugins:te,disabled:Q})}),ty(function(S){k.dispatch({type:S?ne.offline:ne.online})}),(function(S,_,q){setInterval(function(){return fv(S,_,q)},3e3)})(k,c,w),w}var Zr="before",Yr="after",Bt="cookie",Mt=Iv(),bv=qn,ny=qn;function Sv(t){return Mt?qn(t,"",-1):Ir(t)}function Iv(){if(Mt!==void 0)return Mt;var t=Bt+Bt;try{qn(t,t),Mt=document.cookie.indexOf(t)!==-1,Sv(t)}catch{Mt=!1}return Mt}function qn(t,e,r,n,a,i){if(typeof window<"u"){var o=arguments.length>1;return Mt===!1&&(o?Jt(t,e):Vt(t)),o?document.cookie=t+"="+encodeURIComponent(e)+(r?"; expires="+new Date(+new Date+1e3*r).toUTCString()+(n?"; path="+n:"")+(a?"; domain="+a:"")+(i?"; secure":""):""):decodeURIComponent((("; "+document.cookie).split("; "+t+"=")[1]||"").split(";")[0])}}var Pt="localStorage",ay=As.bind(null,Pt);Pr(Pt,"getItem",Vt);Pr(Pt,"setItem",Jt);Pr(Pt,"removeItem",Ir);var Et="sessionStorage",iy=As.bind(null,Et);Pr(Et,"getItem",Vt);Pr(Et,"setItem",Jt);Pr(Et,"removeItem",Ir);function lr(t){var e=t;try{if((e=JSON.parse(t))==="true")return!0;if(e==="false")return!1;if(We(e))return e;parseFloat(e)===e&&(e=parseFloat(e))}catch{}if(e!==null&&e!=="")return e}var oy=ay(),sy=iy(),cy=Iv();function Gt(t,e){if(t){var r=Us(e),n=!qs(r),a=js(r)?lr(localStorage.getItem(t)):void 0;if(n&&!or(a))return a;var i=Ls(r)?lr(bv(t)):void 0;if(n&&i)return i;var o=Ns(r)?lr(sessionStorage.getItem(t)):void 0;if(n&&o)return o;var s=Vt(t);return n?s:{localStorage:a,sessionStorage:o,cookie:i,global:s}}}function vn(t,e,r){if(t&&!or(e)){var n={},a=Us(r),i=JSON.stringify(e),o=!qs(a);return js(a)&&(n[Pt]=Xr(Pt,e,lr(localStorage.getItem(t))),localStorage.setItem(t,i),o)?n[Pt]:Ls(a)&&(n[Bt]=Xr(Bt,e,lr(bv(t))),ny(t,i),o)?n[Bt]:Ns(a)&&(n[Et]=Xr(Et,e,lr(sessionStorage.getItem(t))),sessionStorage.setItem(t,i),o)?n[Et]:(n[zt]=Xr(zt,e,Vt(t)),Jt(t,e),o?n[zt]:n)}}function uy(t,e){if(t){var r=Us(e),n=Gt(t,nv),a={};return!or(n.localStorage)&&js(r)&&(localStorage.removeItem(t),a[Pt]=n.localStorage),!or(n.cookie)&&Ls(r)&&(Sv(t),a[Bt]=n.cookie),!or(n.sessionStorage)&&Ns(r)&&(sessionStorage.removeItem(t),a[Et]=n.sessionStorage),!or(n.global)&&xn(r,zt)&&(Ir(t),a[zt]=n.global),a}}function Us(t){return t?At(t)?t:t.storage:rv}function js(t){return oy&&xn(t,Pt)}function Ls(t){return cy&&xn(t,Bt)}function Ns(t){return sy&&xn(t,Et)}function qs(t){return t===nv||t==="all"}function xn(t,e){return t===rv||t===e||qs(t)}function Xr(t,e,r){return{location:t,current:e,previous:r}}var ly={setItem:vn,getItem:Gt,removeItem:uy};function fy(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Id(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Pd(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Id(Object(r),!0).forEach(function(n){fy(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Id(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function dy(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e={storage:ly};return ry(Pd(Pd({},e),t))}const xs="@sesamy/sesamy-js",$n="1.50.0";function hy(t){if(typeof window>"u")return;const{addEventListener:e,history:r,location:n}=window;let a=n.pathname;e("popstate",()=>t(n.pathname)),["push","replace"].map(i=>{const o=`${i}State`;if(o!=="pushState"&&o!=="replaceState")return;const s=r[o];r[o]=function(...u){const l=u[2]?.toString()||"",c=py(l);return a!==c&&(a=c,setTimeout(()=>t(l),0)),s.apply(r,u)}})}function vy(t,e){const r=t.indexOf(e);return r>-1?t.slice(0,r):t}function py(t){return["#","?"].forEach(e=>t=vy(t,e)),t}function my(){hy(()=>{bt.page()})}var Mo="up",Fo="down";function gy(t){if(t===void 0&&(t={}),!xe)return Yo;var e=Rd(),r=rs(),n=Ed(),a=Qr(n,e),i=Qr(r,e),o=[],s=[],u=[],l=n,c=a,f=i,h=Object.keys(t);if(!h.length)return Yo;var d=h.map(function(p){return Number(p)}),v=Ag(function(){var p=Rd(),m=(function(j,D){return D.map(function(L){return L===100?j-5:j*(L/100)})})(p,d),P=rs(),y=Ed(),b=Qr(y,p),g=Qr(P,p);if(c=b>c?b:c,f=g<f?g:f,!(o.length>=d.length)){var w=l===y,A=Mo;w?A="initial":l<=y&&(A=Fo);var x=m,N=d;(A===Mo||w)&&(x=m.slice().reverse(),N=d.slice().reverse());var z=N.reduce(function(j,D,L){var k=x[L];return u.includes(D)&&y<=k&&(u=u.filter(function(Y){return Y!==D}),j.singleFunction=D),A===Fo&&!o.includes(D)&&y>=k&&D>i?(s.push(D),j.callbacks=j.callbacks.concat(D),j):A===Mo&&!o.includes(D)&&y<=k&&D<=b?(j.foundFunc=[D],j):(w&&y>=k&&j.foundFunc.length===0&&(j.foundFunc=[D]),!s.includes(D)&&y>=k&&(s.push(D),j.singleFunction?u.push(D):j.singleFunction=D),j)},{foundFunc:[],singleFunction:null,callbacks:[],direction:A});if(l=y,A===Fo&&z.callbacks&&z.callbacks.forEach(function(j){Ve(t[j])&&(t[j]({trigger:j,direction:A,scrollMin:f,scrollMax:c,range:[f,c]}),o.push(j))}),z.singleFunction){var B=z.singleFunction,ie=z.direction;Ve(t[B])&&t[B]({trigger:B,direction:ie,scrollMin:f,scrollMax:c,range:[f,c]}),o.push(B)}}},500);return window.addEventListener("scroll",v),function(){return window.removeEventListener("scroll",v)}}function rs(){return xe?document.body.scrollTop||document.documentElement.scrollTop:0}function yy(){return xe?window.innerHeight||document.documentElement.clientHeight:0}function Ed(){return Math.round(rs()+yy())}function Rd(){if(!xe)return 0;var t=document.body,e=document.documentElement;return Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight)}function Qr(t,e){return Math.round(t/e*100)}var $s="Event",_d=$s+"Listener";function wy(t){return function(e,r,n,a){var i=n||Yo,o=a||!1;if(!xe)return i;var s=pn(r),u=pn(e,!0);if(!u.length)throw new Error("noElements");if(!s.length)throw new Error("no"+$s);var l=[];return(function c(f){f&&(l=[]);for(var h=f?"add"+_d:"remove"+_d,d=0;d<u.length;d++){var v=u[d];l[d]=f?o&&o.once?by(i):i:l[d]||i;for(var p=0;p<s.length;p++)v[h]?v["on"+s[p]]=f?l[d]:null:v[h](s[p],l[d],o)}return c.bind(null,!f)})(t)}}function pn(t,e){if(At(t))return e?pn(document.querySelectorAll(t)):(r=t).split(r.indexOf(",")>-1?",":" ").map(function(o){return o.trim()});var r;if(NodeList.prototype.isPrototypeOf(t)){for(var n=[],a=t.length>>>0;a--;)n[a]=t[a];return n}var i=_g(t);return e?i.map(function(o){return At(o)?pn(o,!0):o}).flat():i}function by(t,e){var r;return function(){return t&&(r=t.apply(this,arguments),t=null),r}}var Ko=wy($s);function Pv(t,e){return xe&&Ve(window[t])?(r=window[t],n=e,(a=window)===void 0&&(a=null),Ve(r)?function(){r.apply(a,arguments),n.apply(a,arguments)}:n):window[t]=e;var r,n,a}Pv.bind(null,"onerror");Pv.bind(null,"onload");var Ev=typeof window>"u",Td="hidden";function Sy(t){if(Ev)return!1;var e=Iy(),r="".concat(e.replace(/[H|h]idden/,""),"visibilitychange"),n=function(){return t(!!document[e])},a=function(){return document.addEventListener(r,n)};return a(),function(){return document.removeEventListener(r,n),a}}function Iy(){var t=["webkit","moz","ms","o"];return Ev||Td in document?Td:t.reduce(function(e,r){var n=r+"Hidden";return!e&&n in document?n:e},null)}var Py=["mousemove","mousedown","touchmove","touchstart","touchend","keydown"];function Ey(t,e){e===void 0&&(e={});var r=(function(o,s){var u=this,l=!1;return function(c){l||(o.call(u,c),l=!0,setTimeout(function(){return l=!1},s))}})(t,e.throttle||1e4),n=[];function a(){var o=Sy(function(s){s||r({type:"tabVisible"})});return n=[o].concat(Py.map(function(s){return Ko(document,s,r)})).concat(Ko(window,"load",r)).concat(Ko(window,"scroll",r,{capture:!0,passive:!0})),i}function i(){n.map(function(o){return o()})}return a(),function(){return i(),a}}function Ry(t){var e,r,n=t.onIdle,a=t.onWakeUp,i=t.onHeartbeat,o=t.timeout,s=o,u=t.throttle,l=u===void 0?2e3:u,c=!1,f=!1,h=new Date,d=function(){return clearTimeout(e)};function v(m){d(),i&&!c&&i(Cr(h),m),a&&c&&(c=!1,a(Cr(r),m),h=new Date),e=setTimeout(function(){c=!0,n&&(r=new Date,n(Cr(h),m))},s)}var p=Ey(v,{throttle:l});return{disable:function(){f=!0,c=!1,d();var m=p();return function(){return f=!1,h=new Date,v({type:"load"}),m()}},getStatus:function(){return{isIdle:c,isDisabled:f,active:c?0:Cr(h,f),idle:c?Cr(r,f):0}}}}function Cr(t,e){return e?0:Math.round((new Date-t)/1e3)}const kd=5e3;class _y{element;isInViewport=!1;isAwake=!1;isFlushing;observer;lastEventAt=Date.now();registeredView=!1;viewCallback;activeDurationCallback;idleDurationCallback;scrollCallback;constructor(e){this.element=e.element,this.viewCallback=e.viewCallback,this.activeDurationCallback=e.activeDurationCallback,this.idleDurationCallback=e.idleDurationCallback,this.scrollCallback=e.scrollCallback,this.observer=new IntersectionObserver(r=>{r.forEach(n=>{this.handleInViewPort(n.isIntersecting)})},{threshold:0}),this.observer.observe(this.element),Ry({onIdle:r=>this.handleAwake(!1,r),onWakeUp:r=>this.handleAwake(!0,r),timeout:kd}),gy({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(e){e?(this.isAwake=!0,this.trackInViewport()):this.handleAwake(!1),this.isInViewport=e}handleAwake(e,r=Math.round((Date.now()-this.lastEventAt)/1e3)){this.isAwake=e,this.lastEventAt=e?Date.now()-r*kd:Date.now(),this.isInViewport&&this.trackAwake(e,r)}handleScroll(e){this.scrollCallback&&this.scrollCallback(e)}handleVisibilityChange(){this.isAwake=!1;const e=Math.round((Date.now()-this.lastEventAt)/1e3);e>1&&(this.lastEventAt=Date.now(),this.trackAwake(!1,e))}trackAwake(e,r){!e&&this.activeDurationCallback&&this.activeDurationCallback(r,this.isFlushing,this.lastEventAt),e&&this.idleDurationCallback&&this.idleDurationCallback(r,this.isFlushing,this.lastEventAt)}trackInViewport(){this.registeredView||(this.registeredView=!0,this.viewCallback&&this.viewCallback())}}function Rv(t){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",t):t()}function Ty(t,e){e=e||{};var r,n,a=[],i=e.max||1/0;function o(){clearInterval(r),t(a.splice(0,i)),s()}function s(){r=setInterval(o,e.interval||1e4)}return s(),{flush:o,push:function(u){return n=a.push(u),n>=i&&o(),n},size:function(){return a.length},end:function(u){u&&o(),clearInterval(r)}}}const Od="sesamy_session_id";function ky(){let t=sessionStorage.getItem(Od);return t||(t=Math.random().toString(36).slice(2,9),sessionStorage.setItem(Od,t)),t}function _v(t){function e(n){return n.id?`#${n.id}`:n.classList.length>0?Array.from(n.classList).map(i=>`.${i}`).join(""):null}function r(n){const a=[];let i=n;for(;i&&i!==document.body&&i!==document.documentElement;){const o=e(i);if(o){a.unshift(o);break}if(i.parentElement){const s=Array.from(i.parentElement.children),u=s.indexOf(i)+1,l=i.tagName.toLowerCase();s.filter(f=>f.tagName.toLowerCase()===l).length>1?a.unshift(`${l}:nth-child(${u})`):a.unshift(l)}i=i.parentElement}return a.join(" > ")}return r(t)}let Xe={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"}},Tv=[],an;function kv(){const t=window.location.pathname;return Tv.find(e=>e.path?t.includes(e.path):!0)}function Oy(t,e){Tv=t.content||[];const r=kv();r&&r.type==="article"&&(Xe={...Xe,...r.selectors}),an=e}function Cy(t,e){const{selector:r}=e;return r===Xe.article.selector?t:t.querySelector(r)}function Ov(t,e){if(t)return e.attribute?e.attribute==="textContent"?t.textContent??void 0:t.getAttribute(e.attribute)??Ov(t.parentElement,e):t.textContent??void 0}function fr(t){const e=document.head.querySelectorAll(`[property~='${t}'][content]`);for(let n=0;n<e.length;n+=1)if(e[n].content)return e[n].content;const r=document.head.querySelectorAll(`[name~='${t}'][content]`);for(let n=0;n<r.length;n+=1)if(r[n].content)return r[n].content}function Cv({publisherContentId:t,key:e,defaultValue:r=""}){return(t?document.body.querySelector(`sesamy-content-data[id='${t}']`):null)?.getAttribute(e)||fr(`sesamy:${e}`)||fr(`og:${e}`)||fr(e)||r}function Ay(){const t=document.querySelectorAll(Xe.article.selector);return Array.from(t).map(Ds).filter(e=>e!==null)}function Ds(t){const e=typeof t=="string"?document.querySelector(t):t;if(!e)return null;const r={element:e,selector:typeof t=="string"?t:_v(e)},n=(i,o,s,u)=>{const l=Cy(e,o);if(l){const c=Ov(l,o)||Cv({publisherContentId:s,key:i});c!==void 0&&(r[i]=u?u(c):c)}};n("id",Xe.id),n("title",Xe.title,r.id),n("excerpt",Xe.excerpt,r.id),n("image",Xe.image,r.id),n("price",Xe.price,r.id,i=>parseFloat(i)),n("currency",Xe.currency,r.id),n("url",Xe.url,r.id),n("pass",Xe.pass,r.id),n("accessLevel",Xe.accessLevel,r.id,i=>i||"entitlement");const a=kv();return a&&a.type==="article"&&(a.pass&&(r.pass=r.pass?`${r.pass},${a.pass}`:a.pass),a.price&&!r.price&&(r.price=a.price.amount),a.price?.currency&&!r.currency&&(r.currency=a.price.currency)),r}async function Uy(t,e){const r=typeof t=="string"?document.querySelector(t):t;if(!r)throw new Error("Could not find element");const n=Ds(r);if(!n?.url)throw new Error("Could not find content for element");const a=await an.entitlements.hasAccess(n.url||"",n.pass?.split(",")||[]);if(!a)throw new Error("User does not have access to the content");const i=await an.entitlements.access(a.id);if(!i.token)throw new Error("Could not get access token");const o=e||_v(r.parentElement||r);return an.proxy.getContent(i.token,n.url,o)}let Av=!1,on,mn,ns;function Uv(t){return JSON.stringify(t.map(e=>{const{campaign:r,...n}=e.properties||{};return{anonymousId:e.anonymousId,userId:e.userId,type:e.type,properties:n,clientId:ns,requestId:Math.random().toString(36).slice(2,9),sessionId:ky(),timestamp:new Date().toISOString(),version:$n,event:e.event,context:{...e.context,page:{url:window.location.href,title:document.title,referrer:document.referrer,itemSrc:fr("sesamy:item-src"),publisherContentId:fr("sesamy:publisher-content-id")},campaign:r,locale:navigator.language,library:xs,userAgent:navigator.userAgent,clientId:ns}}}))}const jv=Ty(async t=>{if(t.length>0){const e=Uv(t);Av?navigator.sendBeacon(mn,e):(await fetch(mn,{method:"POST",body:e,headers:{"Content-Type":"text/plain"}})).ok}},{max:10,interval:3e3});function zo(t){if(t.anonymousId)if(t.properties?.flushing){const e={...t};delete e.properties.flushing,navigator.sendBeacon(mn,Uv([e]))}else jv.push(t)}function jy(){return Av=!0,jv.flush()}function Ly(t,e,r){on=e,mn=`${ht("logs",r)}/events`,ns=t}const Ny={name:"custom-analytics-plugin",page:({payload:t})=>{if(!on)return;const{properties:e,anonymousId:r,userId:n,event:a}=t;zo({anonymousId:r,userId:n,properties:e,event:a,type:"page"})},track:({payload:t})=>{if(!on)return;const{properties:e,anonymousId:r,userId:n,event:a}=t;zo({anonymousId:r,userId:n,properties:e,event:a,type:"track"})},identify:({payload:t})=>{if(!on)return;const{properties:e,anonymousId:r,userId:n}=t;zo({anonymousId:r,userId:n,properties:e,type:"identify"})}},Cd=["source","medium","campaign","term","content"],Ct="utm_",qy=1800*1e3;function Lv(t){return t?Date.now()-parseInt(t,10)>qy:!0}function Ad(){const t=document.referrer||"";if(!t)return;const e=Gt(`${Ct}set_at`);(Lv(e)||!Gt(`${Ct}referrer`))&&vn(`${Ct}referrer`,t)}function xy(){const t=()=>{const r={};for(const a of Cd){const i=Gt(`${Ct}${a}`);i&&(r[`utm_${a}`]=i)}const n=Gt(`${Ct}referrer`);return n&&(r.utm_referrer=n),r};return{name:"attribution-tracking",initialize(){Ad()},campaign({payload:r}){const n=r?.campaign||{},a=Gt(`${Ct}set_at`);if(Object.keys(n).length>0&&Lv(a)){for(const o of Cd){const s=n[o];s&&vn(`${Ct}${o}`,s)}vn(`${Ct}set_at`,String(Date.now()))}Ad()},page({payload:r}){return r.properties.campaign=t(),r},track({payload:r}){return r.properties.campaign=t(),r},getStoredCampaignData:t}}const $y=xy(),Ud=new Map,jd=new Map;function Dy({clientId:t,enabled:e=!0,environment:r}){Ly(t,e,r),e&&(window.addEventListener("beforeunload",()=>{jd.forEach((n,a)=>{n.bind(a)()}),jy()}),window.addEventListener("visibilitychange",()=>{document.visibilityState!=="visible"&&Ud.forEach((n,a)=>{n.bind(a)()})}),my(),Rv(()=>{const n=new _y({element:document.body,viewCallback:()=>{bt.page()},activeDurationCallback:(a,i,o)=>{bt.track("activeDuration",{duration:a,durationStart:o,flushing:i})},idleDurationCallback:(a,i,o)=>{bt.track("idleDuration",{duration:a,durationStart:o,flushing:i})},scrollCallback:a=>{bt.track("scroll",{scroll:a.scrollMax})}});jd.set(document.body,()=>{n.flush()}),Ud.set(document.body,()=>{n.handleVisibilityChange()})}),window.addEventListener(Je.AUTHENTICATED,async n=>{const a=n;await bt.identify(a.detail.sub)}),window.addEventListener(Je.LOGOUT,async()=>{await bt.track("logout",{}),await bt.reset()}))}const bt=dy({app:xs,version:$n,plugins:[$y,Ny]});function Nv(t,e){bt.track(t,e)}function qv(t,e,r=!1){const n={name:t,data:e},a=new CustomEvent(t,{detail:n,cancelable:r,bubbles:!0});Nv(`event:${t}`,{...e,timestamp:new Date().toISOString()});const i=window.dispatchEvent(a);return r&&!i?{canceled:!0,message:n.cancellationMessage}:{canceled:!1}}function My(t,e){t.cancelable&&(t.detail.cancellationMessage=e,t.preventDefault())}function Fy(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Ky(){return/android/i.test(navigator.userAgent)}let qe,xv,Nr,as=!1,sn=!1;qr()&&window.addEventListener("pageshow",()=>{sn=!1});const pr="sesamyAccessToken",Ho="sesamyRefreshToken",gn="sesamySilentAuthThrottle",zy=300*1e3;async function Dn(){return as?!0:new Promise((t,e)=>{const r=setTimeout(()=>{as?t(!0):e(new Error("Initialization failed: Timeout"))},2e3);window.addEventListener(Je.AUTH_INITIALIZED,()=>{clearTimeout(r),t(!0)})})}async function Hy(t){if(!t)return null;const e=localStorage.getItem(Ho);if(!e)return pe("No refresh token found in localstorage"),null;const r=new URLSearchParams;r.set("client_id",t.iss),r.set("refresh_token",e),r.set("grant_type","refresh_token");const n=new URL(t.iss);n.pathname="/oauth/token",n.searchParams.set("user_id",t.sub);try{const a=await fetch(n.href,{body:r.toString(),method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"}});if(!a.ok)throw localStorage.removeItem(Ho),new Error("Renew token failed");const i=await a.json();return localStorage.setItem(Ho,i.refresh_token),localStorage.setItem(pr,i.access_token),i.access_token}catch{Ks()}}async function Ms(){const t=localStorage.getItem(pr);if(!t)return null;const e=zs(t);if(!e||!e.exp||e.exp<new Date().getTime()/1e3){const r=await Hy(e);if(r)return r;localStorage.removeItem(pr)}return t}let en=null;const By=64;function Gy(){try{if(en!==null)return en;const e=Object.keys(localStorage).filter(r=>r.startsWith("@@auth0spajs@@"));for(const r of e){const n=JSON.parse(localStorage.getItem(r)||"{}");let a;if(typeof n=="object"&&(n.body&&typeof n.body=="object"&&"refresh_token"in n.body?a=n.body.refresh_token:"refresh_token"in n&&(a=n.refresh_token)),a&&typeof a=="string"&&a.length===By)return en=!0,!0}}catch(t){pe(`Error checking for existing auth0 tokens: ${t.message}`)}return en=!1,!1}function Wy(t){if(t.domains&&t.domains.length>0){const e=mr(window.location.href);if(e){for(const r of t.domains)if(mr(`https://${r}`)===e)return pe(`Found matching domain in domains array: ${r} for TLD: ${e}`),r;pe(`No matching domain found in domains array for TLD: ${e}`)}}if(t.domain)return pe(`Using fallback domain property: ${t.domain}`),t.domain}function mr(t){try{const e=new URL(t).hostname,r=e.split(".");if(r.length<=1)return e;const n=["co.uk","com.au","co.nz","co.za","com.br","co.jp","gov.uk","ac.uk","org.uk","net.uk","com.sg","com.my","co.in","co.id","co.th","co.kr","com.mx","com.ar","com.co","com.pe","com.ph","com.pk","com.sa","com.eg","com.ng","co.ke","co.tz","co.zw","co.bw","co.mz","gov.au","edu.au","org.au","net.au","asn.au","id.au"];for(const a of n)if(e.endsWith(`.${a}`)){const i=a.split(".").length+1;return r.slice(-i).join(".")}return r.slice(-2).join(".")}catch{return null}}async function Vy(t){if(t.enabled===!1)return;xv=t.organization;const e=Wy(t);Nr=e&&!Gy()?e:tv("token",t.environment);const r={domain:Nr,clientId:t.clientId,useCookiesForTransactions:!0};r.cacheLocation="localstorage",mr(window.location.href)!==mr(`https://${Nr}`)&&(r.useRefreshTokens=!0),pe(`Initializing auth0 client: ${JSON.stringify(r)}`),qe=await Qm(r);const n=new URLSearchParams(window.location.search),a=n.get("code"),i=n.get("state");if(a)if(window.opener)pe("Code found in URL, posting to opener"),window.opener.postMessage({type:"authorization_response",response:{code:a,state:i}},window.location.origin);else{pe("Code found in URL, handling redirect");try{const u=await qe.handleRedirectCallback();pe(`Login result: ${JSON.stringify(u)}`);const l=await qe.getUser();if(!l)throw pe("No user found"),new Error("No user found");pe(`User found ${JSON.stringify(l)}`),Fs(),jt(Je.AUTHENTICATED,l),pe("Rewrite url")}catch(u){alert("There was an error logging in"),console.error(u)}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())}as=!0,jt(Je.AUTH_INITIALIZED,{})}async function $r(){return await Dn(),await Ms()?!0:qe?qe.isAuthenticated():!1}async function Jy(){return await Dn(),await Ms()?(pe("Using local user"),{sub:"local",name:"Local User"}):qe?qe.getUser():null}function $v(t){if(sn)return pe("Login already in progress"),null;if(sn=!0,setTimeout(()=>{sn=!1},3e3),localStorage.removeItem(pr),!qe)throw new Error("Auth0 client not initialized");const e=t?.authorizationParams||{};return{...t,authorizationParams:{organization:xv,redirect_uri:window.location.href,ui_locales:ln(),incognito:Cs(),...e}}}async function Mn(t){const e=$v(t);if(e)return qe.loginWithRedirect(e)}async function Dv(t){const e=$v(t);if(!e)return;await qe.loginWithPopup(e,{timeoutInSeconds:1800}),Fs(),qv(Je.AUTHENTICATED,await qe.getUser()).canceled||window.location.reload()}async function Zy(t){return Nr&&mr(window.location.href)!==mr(`https://${Nr}`)&&(Fy()||Ky()||Cs())?Dv(t):Mn(t)}function Yy(){try{const t=sessionStorage.getItem(gn);if(!t)return!1;const{timestamp:e}=JSON.parse(t);return Date.now()-e<zy}catch{return sessionStorage.removeItem(gn),!1}}function Xy(){try{const t={timestamp:Date.now()};sessionStorage.setItem(gn,JSON.stringify(t))}catch{pe("Failed to set silent auth throttle in sessionStorage")}}function Fs(){try{sessionStorage.removeItem(gn)}catch{}}async function xt(t=!0,e=!1){await Dn();const r=await Ms();if(r)return r;if(!e&&Yy()){if(pe("Silent auth is throttled due to recent failures, skipping request"),t)throw new Error("Silent auth throttled");return null}try{if(!qe)return pe("Auth client not initialized"),null;let n=await qe.getTokenSilently();const a=zs(n);return e&&a?.exp&&a.exp+3600<new Date().getTime()/1e3&&(n=await qe.getTokenSilently({cacheMode:e?"off":"on"})),Fs(),n}catch(n){const a=n;if(pe(`Failed to get token silently: ${a.message}`),Xy(),await qe.isAuthenticated()&&(a.message==="Invalid refresh token"||a.message.includes("Missing Refresh Token"))&&await Ks(),t)throw n;return null}}async function Ks(t={}){if(await Dn(),localStorage.removeItem(pr),jt(Je.LOGOUT,{}),!!qe)return pe(`Logout with options: ${JSON.stringify(t)}`),qe.logout({...t,logoutParams:{returnTo:window.location.href,...t.logoutParams}})}function zs(t){const e=t.split(".");if(e.length!==3)return null;const n=e[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 is(t){const e=zs(t);if(!e||!e.exp||e.exp<new Date().getTime()/1e3)throw new Error("Invalid token");pe("Set token"),localStorage.setItem(pr,t),jt(Je.AUTHENTICATED,e)}const Qy=(t,e)=>e.skipDedupe||e.method!=="GET",ew=(t,e)=>e.method+"@"+t,tw=t=>t.clone(),Ld=({skip:t=Qy,key:e=ew,resolver:r=tw}={})=>{const n=new Map;return a=>(i,o)=>{if(t(i,o))return a(i,o);const s=e(i,o);if(!n.has(s))n.set(s,[]);else return new Promise((u,l)=>{n.get(s).push([u,l])});try{return a(i,o).then(u=>(n.get(s).forEach(([l])=>l(r(u))),n.delete(s),u)).catch(u=>{throw n.get(s).forEach(([,l])=>l(u)),n.delete(s),u})}catch(u){return n.delete(s),Promise.reject(u)}}},rw=(t,e)=>t*e,nw=t=>t&&t.ok,Nd=({delayTimer:t=500,delayRamp:e=rw,maxAttempts:r=10,until:n=nw,onRetry:a=null,retryOnNetworkError:i=!1,resolveWithLatestResponse:o=!1,skip:s}={})=>u=>(l,c)=>{let f=0;if(s&&s(l,c))return u(l,c);const h=(d,v)=>Promise.resolve(n(d,v)).then(p=>p?d&&o?d:v?Promise.reject(v):d:(f++,!r||f<=r?new Promise(m=>{const P=e(t,f);setTimeout(()=>{typeof a=="function"?Promise.resolve(a({response:d,error:v,url:l,options:c})).then((y={})=>{var b,g;m(u((b=y&&y.url)!==null&&b!==void 0?b:l,(g=y&&y.options)!==null&&g!==void 0?g:c))}):m(u(l,c))},P)}).then(h).catch(m=>{if(!i)throw m;return h(null,m)}):d&&o?d:Promise.reject(v||new Error("Number of attempts exceeded."))));return u(l,c).then(h).catch(d=>{if(!i)throw d;return h(null,d)})};class aw{get(e){return typeof sessionStorage>"u"?null:sessionStorage.getItem(e)}set(e,r){typeof sessionStorage<"u"&&sessionStorage.setItem(e,r)}remove(e){typeof sessionStorage<"u"&&sessionStorage.removeItem(e)}clear(){}}function os(t){let e;try{e=new URL(t)}catch{return!1}return e.protocol==="http:"||e.protocol==="https:"}function Mv(t,e){if(os(t))return{itemSrc:t};const r=t.split(":");if(r.length<2)throw new Error(`Invalid itemSrc format: expected at least 2 segments separated by ':', got ${r.length}`);const[n,a,i]=r;if(!a)throw new Error("Invalid itemSrc format: sku segment is empty");return{sku:`${n}:${a}`,purchaseOption:e||i}}function qd(t){return t.endsWith("/")?t.slice(0,-1):t}function xd(t,e){if(!os(t)||!os(e))return!1;const r=new URL(t),n=new URL(e);return r.origin===n.origin&&qd(r.pathname)===qd(n.pathname)}function iw(t,e,r){const n=new URL(`${ht("checkout3",t.environment)}`);if(e.language&&n.searchParams.set("lang",e.language),e.sku)n.searchParams.set("sku",e.sku),e.purchaseOptionId&&n.searchParams.set("po-id",e.purchaseOptionId);else if(e.itemSrc){const{sku:s,purchaseOption:u,itemSrc:l}=Mv(e.itemSrc,e.purchaseOptionId);l&&n.searchParams.set("url",l),s&&n.searchParams.set("sku",s),u&&n.searchParams.set("po-id",u)}e.email&&n.searchParams.set("email",e.email),e.business&&n.searchParams.set("business","true"),e.currency&&n.searchParams.set("currency",e.currency),e.price&&n.searchParams.set("price",e.price.toString()),e.discountCode&&n.searchParams.set("discount-code",e.discountCode),e.attributionItemSrc?n.searchParams.set("itemSrc",e.attributionItemSrc):r.itemSrc&&n.searchParams.set("itemSrc",r.itemSrc),e.attributionPublisherContentId?n.searchParams.set("publisherContentId",e.attributionPublisherContentId):r.publisherContentId&&n.searchParams.set("publisherContentId",r.publisherContentId),e.utmSource?n.searchParams.set("utm_source",e.utmSource):r.utmSource&&n.searchParams.set("utm_source",r.utmSource),e.utmMedium?n.searchParams.set("utm_medium",e.utmMedium):r.utmMedium&&n.searchParams.set("utm_medium",r.utmMedium),e.utmCampaign?n.searchParams.set("utm_campaign",e.utmCampaign):r.utmCampaign&&n.searchParams.set("utm_campaign",r.utmCampaign),e.utmTerm?n.searchParams.set("utm_term",e.utmTerm):r.utmTerm&&n.searchParams.set("utm_term",r.utmTerm),e.utmContent?n.searchParams.set("utm_content",e.utmContent):r.utmContent&&n.searchParams.set("utm_content",r.utmContent);const a=["_ga","_gid","_fbp","_fbc"];document.cookie.split(";").map(s=>{const[u,l]=s.trim().split("=");return{key:u,value:l}}).filter(s=>a.some(u=>u===s.key)).forEach(s=>{n.searchParams.append(s.key,s.value)});let o=new URL(window.location.href);if(e.redirectUrl)try{o=new URL(e.redirectUrl)}catch{console.warn("Invalid redirect URL provided, using current URL instead:",e.redirectUrl)}return o.searchParams.set("force-refetch-entitlements","true"),e.itemSrc&&o.searchParams.set("sesamy-purchase",e.itemSrc),n.searchParams.set("redirect-url",o.toString()),e.paymentMethodsFilter&&n.searchParams.set("paymentmethods-filter",e.paymentMethodsFilter.flatMap(({provider:s,methods:u})=>u?u.map(l=>`${s}|${l}`):s).join(",")),n}const Fv="sesamySignedURLs";function Hs(){const t=sessionStorage.getItem(Fv);return t?JSON.parse(t):[]}function ow(t){const e=Hs();e.push(t),pe(`Adding signed URL: ${t}`),sessionStorage.setItem(Fv,JSON.stringify(e))}function sw(t){const e={};return Object.keys(t).forEach(r=>{const n=t[r];n!=null&&(e[r]=n.toString())}),e}const ss="sesamyAttribution";function cw(t){const e=localStorage.getItem(t);if(!e)return null;try{return JSON.parse(e).value}catch{return console.error(`Failed to parse ${t}`),null}}function uw(t){return Object.keys(t).find(e=>e.startsWith("utm_"))?{utmSource:void 0,utmMedium:void 0,utmCampaign:void 0,...t}:t}function yn(){return cw(ss)||{}}function Kv(t){if(t===null)localStorage.removeItem(ss);else{pe(`Setting attribution ${JSON.stringify(t)}`);const e=yn()??{},r=sw({...e,...uw(t)});localStorage.setItem(ss,JSON.stringify({value:r}))}}function lw(t){const e=t.endpoint||ht("api2",t.environment),r=async()=>{const T=await xt(!0);if(!T)throw new Error("No access token available");return T},n=Ce.client({baseUrl:e,tokenProvider:r,libraryName:xs,libraryVersion:$n,vendorId:t.vendorId,cache:{mode:Ce.CacheMode.BROWSER,storage:new aw}}),a=T=>async(K,J)=>{let re=sessionStorage.getItem(ed);re||(re=Date.now().toString(),sessionStorage.setItem(ed,re));const me={...J,headers:{...J.headers,"Cache-Timestamp":re}};return T(K,me)},i=(T=!0)=>K=>async(J,re)=>{let me=null;if(me=await xt(T),!me){if(T)throw new Error("No access token available");return K(J,re)}const Ke={...re,headers:{...re.headers,...me?{Authorization:`Bearer ${me}`}:{}}};return K(J,Ke)},o=T=>(K,J)=>{if(J.headers&&"Authorization"in J.headers)return T(K,J);const re=localStorage.getItem("__anon_id"),me=btoa(`${t.clientId}|${re}:`),Ke={...J,headers:{...J.headers,Authorization:`Basic ${me}`}};return T(K,Ke)},s=Ce.wretch(e).headers({"Content-Type":"application/json"}).middlewares([a,i(),Ld(),Nd({delayTimer:1e3,delayRamp:(T,K)=>T*K,maxAttempts:3,until:T=>!!(T&&(T.ok||T.status>=400&&T.status<500)),retryOnNetworkError:!1})]),u=Ce.wretch(e).headers({"Content-Type":"application/json"}).middlewares([a,i(!1),o,Ld(),Nd({delayTimer:1e3,delayRamp:(T,K)=>T*K,maxAttempts:3,until:T=>!!(T&&(T.ok||T.status>=400&&T.status<500)),retryOnNetworkError:!1})]);async function l(T={}){const{waitForEntitlementAfter:K,includeSignedLinks:J=!0}=T,re=await $r()?await n.entitlements.list({waitForEntitlementAfter:K?.toISOString()}):[];return J&&re.push(...Hs()),re}async function c(T,K=[]){return(await l())?.find(me=>{const{sku:Ke,purchaseOption:M}=Mv(T);return!!("sku"in me&&Ke===me.sku||M&&"purchaseOptionsId"in me&&M===me.purchaseOptionsId||xd(T,me.url)||K.some(ee=>xd(ee,me.url)))})}async function f(T){return n.entitlements.get(T)}async function h(T){return n.entitlements.getAccess(T)}async function d(T,K,J){const re=new URL(ht("api2",t.environment));return re.pathname="/proxy",re.searchParams.set("url",K),J&&re.searchParams.set("selector",J),Ce.wretch(re.toString()).headers({Authorization:`Bearer ${T}`}).get().text()}async function v(T){if(!T)throw new Error("SKU is required to get fulfillments");return await $r()?await s.get(`/fulfillments?sku=${encodeURIComponent(T)}`).json():[]}async function p(T,K){if(!T||!K)throw new Error("SKU and itemId are required to request delivery");return(await s.post({sku:T},`/fulfillments/${encodeURIComponent(K)}/request-delivery?`).res()).ok}async function m(){return s.get("/contracts").json()}async function P(T){return(await s.get("/contracts").json())?.find(J=>J.id===T)}async function y(T){const K=await s.post({},`/contracts/${encodeURIComponent(T)}/cancel`).res();return Ce.clearCache(),K.ok}async function b(){return console.warn("getSubscriptions is deprecated, use getContracts instead"),s.get("/subscriptions").json()}async function g(){return s.get("/bills").json()}async function w(T){return(await s.get("/bills").json())?.find(J=>J.id===T)}async function A(){return s.get("/transactions").json()}async function x(T){return(await s.get("/transactions").json())?.find(J=>J.id===T)}async function N(T,K){const J=await s.url(`/user-metadata/${encodeURIComponent(T)}`).put(K).json();return jt(Je.USER_ATTRIBUTE_CHANGED,{}),Ce.clearCache(),J}async function z(T){const K=await s.url(`/user-metadata/${encodeURIComponent(T)}`).delete().res();return Ce.clearCache(),K.ok}async function B(){return await s.url("/user-metadata").get().json()}async function ie(T){return(await B())[T]||null}async function j(){return await s.url("/tags").get().json()}async function D(T){const K=await s.url(`/tags/${encodeURIComponent(T)}`).delete().res();return Ce.clearCache(),K.ok}async function L(T){const K=await s.url("/tags").post(encodeURIComponent(T)).res();return jt(Je.USER_ATTRIBUTE_CHANGED,{}),Ce.clearCache(),K.ok}async function k(T){return(await u.url("/tallies").get().json())[T]}async function Y(){return await u.url("/tallies").get().json()}async function te(T){const K=await u.url(`/tallies/${T}`).delete().res();return Ce.clearCache(),K.ok}async function Q(T,K){return await u.url(`/tallies/${encodeURIComponent(T)}/push`).post(K).json()}async function S(T){return n.products.get(T)}async function _(){return await xt(!1)?await s.url("/profile").get().json():null}async function q(T){const K=await s.url("/profile").patch(T).res();return Ce.clearCache(),K.ok}async function F(){return await s.url("/payment-issues").get().json()}async function Z(){return(await s.url("/profile/spotify-link").get().json()).isSpotifyLinked}async function V(){return(await s.url("/profile/unlink-spotify").post().res()).ok}async function he(T){const K=await xt(!1);if(!K)throw new Error("No access token available");const J=new URL(`${ht("access-sync",t.environment)}/spotify/sesamy-callback`);J.searchParams.set("access_token",K),J.searchParams.set("state",T),window.location.href=J.toString()}async function oe(T){const K=await s.url(`/products/${encodeURIComponent(T)}/auto-onboard`).post().json();return K.length&&Ce.clearCache(),K}async function le(T,K=3600){const{shortlink:J}=await Ce.wretch(rg).post({url:T,ttl:K}).json();return J}async function se(T){const K=await xt(!1,!0);let J;const re=T.language||ln(),me=yn();switch(T.target){case"account":J=new URL(`${ht("account",t.environment)}/${encodeURIComponent(T.language||re)}/subscriptions/${encodeURIComponent(t.clientId)}${T.contractId?`/${encodeURIComponent(T.contractId)}`:""}`),J.searchParams.set("sesamy-redirect-url",T.redirectUrl||window.location.href);break;case"change-payment":J=new URL(`${ht("account",t.environment)}/${encodeURIComponent(T.language||re)}/subscriptions/${encodeURIComponent(t.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(`${ht("account",t.environment)}/${encodeURIComponent(T.language||re)}/subscriptions/${encodeURIComponent(t.clientId)}/${encodeURIComponent(T.contractId)}/edit-plan`),J.searchParams.set("sesamy-redirect-url",T.redirectUrl||window.location.href);break;case"consume":J=new URL(`${ht("consume",t.environment)}/${encodeURIComponent(T.language||re)}/@${encodeURIComponent(t.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=iw(t,{language:re,...T},me);break;default:throw new Error("Invalid target")}return K&&(J.hash=`#access_token=${K}`),T.shorten?le(J.href,T.ttl):J.href}async function Re(T){const K=yn(),J=["_ga","_gid","_fbp","_fbc"];return document.cookie.split(";").forEach(me=>{const Ke=K,[M,ee]=me.trim().split("=");J.includes(M)&&!Ke[M]&&(Ke[M]=ee)}),(await u.url("/checkouts").post({language:ln(),...T,attribution:{...K,...T.attribution},vendorId:t.vendorId})).json()}async function Ue(T,K){return(await u.url(`/checkouts/${T}`).patch(K)).json()}async function Fe(T){return(await u.url(`/checkouts/${T}`).get()).json()}async function ke(T){return(await u.url(`/paywalls/${T}`).get()).json()}async function Ze(){return(await u.url("/vendor").get()).json()}async function ut(){return(await s.url("/vendors").get()).json()}async function lt(T){return(await s.url(`/contracts/${encodeURIComponent(T.contractId)}/amendments`).post({amendmentType:T.amendmentType,discountCode:T.discountCode})).json()}async function mt(T){return await s.url(`/amendments/${encodeURIComponent(T)}/confirm`).post(),!0}async function gt(){const T=await xt(!1),K=new URL(`${ht("account",t.environment)}/subscriptions/${t.clientId}`);T&&(K.hash=`#access_token=${T}`),window.location.href=K.toString()}return{autoOnboardProduct:oe,cancelContract:y,confirmAmendment:mt,createAmendment:lt,createCheckout:Re,deleteTag:D,deleteTally:te,deleteUserMetadata:z,generateLink:se,getBill:w,getBills:g,getCheckout:Fe,getProxyContent:d,getContract:P,getContracts:m,getEntitlement:f,getEntitlementAccess:h,getEntitlements:l,getFulfillments:v,requestDelivery:p,getPaywall:ke,getPaymentIssues:F,getProfile:_,getProduct:S,getSubscriptions:b,getTally:k,getTallies:Y,getTags:j,getTransaction:x,getTransactions:A,getUserMetadata:ie,hasAccess:c,isSpotifyLinked:Z,linkSpotify:he,listUserMetadata:B,openHostedAccountPage:gt,pushTally:Q,setTag:L,setUserMetadata:N,unlinkSpotify:V,updateCheckout:Ue,updateProfile:q,getVendorSettings:Ze,listVendors:ut}}const fw=["AdHeader","AdContainer","AD_Top","homead","ad-lead"];function dw(){return new Promise(t=>{const e=fw.map(r=>{const n=document.createElement("div");return n.innerHTML=" ",n.id=r,n.style.position="absolute",document.body.appendChild(n),n});window.setTimeout(()=>{const r=!e.every(n=>document.querySelector(`#${n.id}`)?.offsetParent);e.forEach(n=>n.remove()),t(r)},100)})}function hw(){const t=navigator.userAgent.toLowerCase(),e=[{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 r of e)if(r.regex.test(t))return{isInAppBrowser:!0,browserName:r.name};return/; wv\)/.test(t)?{isInAppBrowser:!0,browserName:"Unknown In-App Browser"}:{isInAppBrowser:!1,browserName:null}}const zv="sesamyFlags";async function Hv(t){try{localStorage.setItem(zv,JSON.stringify(t))}catch{pe("Failed to save flags to localStorage")}}async function vw(t,e){const r=await Fn();r[t]=e,await Hv(r)}async function pw(t){return(await Fn())[t]}async function mw(t){const e=await Fn();t in e&&(delete e[t],await Hv(e))}async function Fn(){try{const t=localStorage.getItem(zv);return t?JSON.parse(t):{}}catch{return{}}}function gw(t){const{autoOnboardProduct:e,cancelContract:r,createCheckout:n,deleteTag:a,deleteTally:i,deleteUserMetadata:o,generateLink:s,getBill:u,getBills:l,getCheckout:c,getContract:f,getContracts:h,getEntitlement:d,getEntitlementAccess:v,getEntitlements:p,getFulfillments:m,getPaywall:P,getPaymentIssues:y,getProfile:b,getProduct:g,getProxyContent:w,getSubscriptions:A,getTags:x,getTally:N,getTallies:z,getTransaction:B,getTransactions:ie,getUserMetadata:j,getVendorSettings:D,listVendors:L,hasAccess:k,isSpotifyLinked:Y,linkSpotify:te,listUserMetadata:Q,openHostedAccountPage:S,pushTally:_,requestDelivery:q,setTag:F,setUserMetadata:Z,unlinkSpotify:V,updateCheckout:he,updateProfile:oe}=lw(t),le={analytics:{track:Nv},attribution:{get:yn,set:Kv},auth:{getUser:b,getTokenSilently:xt,isAuthenticated:$r,loginWithRedirect:Mn,loginWithPopup:Dv,login:Zy,logout:Ks,setToken:is},bills:{get:u,list:l},browser:{detectAdblock:dw,isInAppBrowser:hw,isIncognito:Cs},checkouts:{create:n,get:c,update:he},clearCache:Ce.clearCache,content:{list:Ay,get:Ds,getLanguage:ln,unlock:Uy,getPropertyFromHTML:Cv},contracts:{cancel:r,get:f,list:h},entitlements:{access:v,get:d,hasAccess:k,list:p,signedLinks:Hs},events:{emit:qv,cancel:My},flags:{get:pw,set:vw,list:Fn,delete:mw},fulfillments:{list:m,requestDelivery:q},generateLink:s,getPaymentIssues:y,getVersion:yw,isReady:()=>exports.isInitialized,log:pe,paywalls:{get:P},products:{autoOnboard:e,get:g,linkSpotify:te},profile:{get:b,isSpotifyLinked:Y,openHostedAccountPage:S,unlinkSpotify:V,update:oe},proxy:{getContent:w},subscriptions:{list:A},tags:{delete:a,list:x,set:F},tallies:{delete:i,get:N,list:z,push:_},transactions:{get:B,list:ie},userMetadata:{delete:o,get:j,list:Q,set:Z},vendors:{get:D,list:L},setToken:is};return t.namespace&&(window[t.namespace]=le),le}function yw(){return $n}function ww(t,e){t.style.position="relative",t.style.height="200px",t.style.overflow="hidden";let n=0;const a=Array.from(t.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
36
|
${e.selector}::before {
|
|
38
37
|
content: '';
|
|
39
38
|
position: absolute;
|
|
@@ -44,4 +43,4 @@ CAUSE: `+d.stack,b.response=y,b.status=y.status,b.url=f,y.type==="opaque")throw
|
|
|
44
43
|
background: linear-gradient(to bottom, rgba(255, 255, 255, 0), white);
|
|
45
44
|
pointer-events: none;
|
|
46
45
|
}
|
|
47
|
-
`,document.head.appendChild(i)}async function
|
|
46
|
+
`,document.head.appendChild(i)}async function bw(t){try{const e=await fetch(t);return e.ok?await e.text():(console.error(`Failed to fetch content from ${t}: ${e.statusText}`),null)}catch(e){return console.error(`Error fetching content from ${t}:`,e),null}}async function Bs(t){if(t.contentType==="selector"&&t.content){const e=document.querySelector(t.content);if(e)return e.innerHTML;console.warn(`Source element for selector '${t.content}' not found`)}else if(t.contentType==="url"&&t.content){const e=await bw(t.content);if(e)return e;console.warn(`Failed to fetch content from URL '${t.content}'`)}else if(t.content)return t.content;return""}async function Sw(t,e){const r=e.insertionPoint||"inside",n=await Bs(e);switch(r){case"before":t.insertAdjacentHTML("beforebegin",n);break;case"after":t.insertAdjacentHTML("afterend",n);break;case"inside":default:t.innerHTML+=n;break}}async function Iw(t,e){const r=await Bs(e);t.innerHTML=r}async function Pw(t,e){const r=await Bs(e);t.innerHTML=r.replace("${content}",t.innerHTML)}async function Ew({enabled:t=!1,rules:e}){t&&Rv(async()=>{const r=await $r(),n=window.location.href;for(const a of e){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!==r))switch(a.transform){case"insert":await Sw(s,a);break;case"replace":await Iw(s,a);break;case"remove":o.remove();break;case"wrap":await Pw(s,a);break;case"gradient":ww(s,a);break;default:console.warn(`Unknown transform type: ${a.transform}`)}}}})}const $d="access_token";function Rw(){const t=new URLSearchParams(window.location.hash.substring(1)),e=t.get($d);if(e){is(e);const r=new URL(window.location.href);t.delete($d),r.hash=t.toString(),window.history.replaceState(null,"",r)}}const Dd="sesamy-refresh",Md="force-refetch-entitlements";function _w(){const t=new URLSearchParams(window.location.search),e=t.get(Md),r=t.get(Dd);if(e!==null||r!==null){const n=new URL(window.location.href);t.delete(Md),t.delete(Dd),n.search=t.toString(),Ce.clearCache(),window.history.replaceState(null,"",n)}}function Tw(t){if(!t||typeof t!="string")throw new Error("Invalid token: token must be a non-empty string");const e=t.split(".");if(e.length!==3)throw new Error("Invalid JWT format: token must have exactly 3 parts separated by dots");const[,r]=e;if(!r)throw new Error("Invalid JWT format: payload is empty");let n;try{n=atob(r)}catch{throw new Error("Invalid JWT format: payload is not valid base64")}try{return JSON.parse(n)}catch{throw new Error("Invalid JWT format: payload is not valid JSON")}}function kw(){const t=new URLSearchParams(window.location.search),e=t.get("sesamy-token")||t.get("token");if(!e)return;try{const n=Tw(e),a=new Date(n.exp*1e3),i={id:"",title:n.p?.toString(),sku:n.s?.toString(),purchaseOption:n.p?.toString(),publisherContentId:n.pid?.toString(),url:n.url?.toString(),token:e,type:"article",hasAccess:!0,expiresAt:a.toISOString(),createdAt:new Date(n.iat).toISOString(),updatedAt:new Date(n.iat).toISOString()};ow(i)}catch(n){pe(`Failed to extract signed link ${n}`)}const r=new URL(window.location.href);r.searchParams.delete("ss"),r.searchParams.delete("se"),r.searchParams.delete("sp"),r.searchParams.delete("so"),r.searchParams.delete("token"),r.searchParams.delete("sesamy-token"),window.history.replaceState(null,"",r)}const Fd="sesamy-user";async function Ow(){const e=new URLSearchParams(window.location.search).get(Fd)?.toLowerCase();if(!e)return;const r=await Jy();r?.email!==e?(pe(`Current user does not match sesamy user: ${r?.email} !== ${e}`),Ce.clearCache(),Mn({authorizationParams:{login_hint:e}})):pe(`Current user matches sesamy user: ${r?.email} === ${e}`);const n=new URL(window.location.href);n.searchParams.delete(Fd),window.history.replaceState(null,"",n)}const Kd="sesamy-purchase";function Cw(){const t=new URLSearchParams(window.location.search),e=t.get(Kd);if(e!==null){const r=new URL(window.location.href);t.delete(Kd),r.search=t.toString(),pe(`Purchase ${e}`),jt(Je.PURCHASE,{itemSrc:e}),Ce.clearCache(),window.history.replaceState(null,"",r)}}const zd="sesamy-login",Aw="sesamy_login";async function Uw(){const t=new URLSearchParams(window.location.search);if(!(t.get(zd)||t.get(Aw)))return;await $r()||Mn();const n=new URL(window.location.href);n.searchParams.delete(zd),window.history.replaceState(null,"",n)}const Hd="sesamy-debug";async function jw(){const e=new URLSearchParams(window.location.search).get(Hd)?.toLowerCase();if(!e)return;lm(e==="true");const r=new URL(window.location.href);r.searchParams.delete(Hd),window.history.replaceState(null,"",r)}function Lw(){if(!document.referrer.length)return;const t=new URL(document.referrer);if(!(t.hostname===window.location.hostname||t.hostname.includes("sesamy")))return document.referrer}async function Nw(t){if(!qr())return;const e=new URLSearchParams(window.location.search),r={utmSource:e.get("utm_source")??void 0,utmMedium:e.get("utm_medium")??void 0,utmCampaign:e.get("utm_campaign")??void 0,utmTerm:e.get("utm_term")??void 0,utmContent:e.get("utm_content")??void 0,ref:e.get("ref")??void 0,referrer:Lw()},[n]=t.content.list();n?.url&&(r.itemSrc=n.url,r.publisherContentId=n.id),Kv(r)}function qw(){const t=new URLSearchParams(window.location.search);let e=!1;try{e=!!window.opener&&window.opener.location.origin===window.location.origin}catch{e=!1}const r=sessionStorage.getItem(td)==="true",n=t.has("code")||t.has("error")||t.has("state");!e||r||(sessionStorage.setItem(td,"true"),n||(pe("Reloading page to get query params in incognito browser"),window.location.reload()))}async function xw(t){const e=a=>i=>{i.preventDefault();try{a()}catch(o){console.error("Error handling click:",o)}},r=(a,i)=>{try{document.querySelectorAll(a).forEach(s=>{s.addEventListener("click",e(i))})}catch(o){console.error(`Error attaching event handlers (selector: ${a}):`,o)}};r('[sesamy-link="login"]',()=>t.auth.loginWithRedirect()),r('[sesamy-link="logout"]',()=>t.auth.logout());const n=await t.generateLink({target:"account"});n&&r('[sesamy-link="account"]',()=>{window.location.href=n})}async function $w(t){const e=await t.auth.isAuthenticated();try{document.querySelectorAll(`[sesamy-visibility="${e?"not-logged-in":"logged-in"}"]`).forEach(a=>{a instanceof HTMLElement&&(a.style.display="none")}),document.querySelectorAll(`[sesamy-visibility="${e?"logged-in":"not-logged-in"}"]`).forEach(a=>{a instanceof HTMLElement&&(a.style.display="")})}catch(r){console.error("Error handling visibility:",r)}}async function Dw(t){const e=fr("sesamy:locked-content-redirect-url");if(!e)return;const[r]=t.content.list();if(!r)return;await t.entitlements.hasAccess(r.url||"",r.pass?.split(",")||[])||(location.href=e)}exports.isInitialized=!1;async function Bd(t,e){pe(`Init with config: ${JSON.stringify(t)}`);try{qw(),Dy({clientId:t.clientId,environment:t.environment,...t.analytics}),await Vy({clientId:t.clientId,organization:t.organization,environment:t.environment,...t.auth}),Oy(t,e),t.transform&&await Ew(t.transform),ig(),jw(),Nw(e),Rw(),_w(),kw(),await Uw(),await Ow(),Cw(),await $w(e),await xw(e),await Dw(e),exports.isInitialized=!0,jt(Je.READY,{})}catch(r){pe(`Failed to init ${r.message}`)}}async function Bv(t){pe("Initializing Sesamy");const e=t.api?.namespace||"sesamy";if(qr()&&e in window)return pe("Sesamy already initialized. This is likely due to a duplicate import"),exports.isInitialized=!0,window[e];const r=gw({clientId:t.clientId,vendorId:t.vendorId,environment:t.environment,...t.api});return qr()?(t.awaitAllServices?await Bd(t,r):Bd(t,r),r):(exports.isInitialized=!0,r)}if(qr()){const t=document.getElementById("sesamy-js");if(t?.textContent)try{const e=JSON.parse(t.textContent);Bv(e)}catch(e){console.error("Failed to parse config",e)}}exports.Events=Je;exports.init=Bv;
|