@everymatrix/cashier-step-up 0.6.2 → 0.6.4
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/components/{CashierStepUp-DvXworYR.js → CashierStepUp--A_D8ZI2.js} +1159 -1163
- package/components/CashierStepUp-BRmmiLGR.cjs +16 -0
- package/components/{CashierStepUp-Cl0RmZrh.js → CashierStepUp-BrPq_1gQ.js} +1149 -1153
- package/es2015/cashier-step-up.cjs +1 -1
- package/es2015/cashier-step-up.js +1 -1
- package/esnext/cashier-step-up.js +1 -1
- package/package.json +1 -1
- package/components/CashierStepUp-C7wS_ltU.cjs +0 -3
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";var Wn=Object.defineProperty,Zn=Object.defineProperties;var qn=Object.getOwnPropertyDescriptors;var Nt=Object.getOwnPropertySymbols;var Qn=Object.prototype.hasOwnProperty,Jn=Object.prototype.propertyIsEnumerable;var st=(e,t,n)=>t in e?Wn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ze=(e,t)=>{for(var n in t||(t={}))Qn.call(t,n)&&st(e,n,t[n]);if(Nt)for(var n of Nt(t))Jn.call(t,n)&&st(e,n,t[n]);return e},at=(e,t)=>Zn(e,qn(t));var K=(e,t,n)=>(st(e,typeof t!="symbol"?t+"":t,n),n);var Ee=(e,t,n)=>new Promise((r,i)=>{var o=u=>{try{s(n.next(u))}catch(l){i(l)}},a=u=>{try{s(n.throw(u))}catch(l){i(l)}},s=u=>u.done?r(u.value):Promise.resolve(u.value).then(o,a);s((n=n.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function ee(){}function on(e){return e()}function Rt(){return Object.create(null)}function ve(e){e.forEach(on)}function Ht(e){return typeof e=="function"}function sn(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function Yn(e){return Object.keys(e).length===0}function an(e,...t){if(e==null){for(const r of t)r(void 0);return ee}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function Kn(e,t,n){e.$$.on_destroy.push(an(t,n))}function y(e,t){e.appendChild(t)}function er(e,t,n){const r=tr(e);if(!r.getElementById(t)){const i=H("style");i.id=t,i.textContent=n,nr(r,i)}}function tr(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function nr(e,t){return y(e.head||e,t),t.sheet}function B(e,t,n){e.insertBefore(t,n||null)}function A(e){e.parentNode&&e.parentNode.removeChild(e)}function rr(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function H(e){return document.createElement(e)}function oe(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function k(e){return document.createTextNode(e)}function F(){return k(" ")}function ir(){return k("")}function fe(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function p(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function or(e){return Array.from(e.childNodes)}function j(e,t){t=""+t,e.data!==t&&(e.data=t)}function se(e,t,n){e.classList.toggle(t,!!n)}function sr(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}let Ue;function De(e){Ue=e}function ar(){if(!Ue)throw new Error("Function called outside component initialization");return Ue}function lr(e){ar().$$.on_mount.push(e)}const Ae=[],Qe=[];let Ce=[];const kt=[],ur=Promise.resolve();let dt=!1;function hr(){dt||(dt=!0,ur.then(ae))}function gt(e){Ce.push(e)}const lt=new Set;let He=0;function ae(){if(He!==0)return;const e=Ue;do{try{for(;He<Ae.length;){const t=Ae[He];He++,De(t),cr(t.$$)}}catch(t){throw Ae.length=0,He=0,t}for(De(null),Ae.length=0,He=0;Qe.length;)Qe.pop()();for(let t=0;t<Ce.length;t+=1){const n=Ce[t];lt.has(n)||(lt.add(n),n())}Ce.length=0}while(Ae.length);for(;kt.length;)kt.pop()();dt=!1,lt.clear(),De(e)}function cr(e){if(e.fragment!==null){e.update(),ve(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(gt)}}function fr(e){const t=[],n=[];Ce.forEach(r=>e.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),Ce=t}const pr=new Set;function mr(e,t){e&&e.i&&(pr.delete(e),e.i(t))}function Dt(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function dr(e,t,n){const{fragment:r,after_update:i}=e.$$;r&&r.m(t,n),gt(()=>{const o=e.$$.on_mount.map(on).filter(Ht);e.$$.on_destroy?e.$$.on_destroy.push(...o):ve(o),e.$$.on_mount=[]}),i.forEach(gt)}function gr(e,t){const n=e.$$;n.fragment!==null&&(fr(n.after_update),ve(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function br(e,t){e.$$.dirty[0]===-1&&(Ae.push(e),hr(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function yr(e,t,n,r,i,o,a=null,s=[-1]){const u=Ue;De(e);const l=e.$$={fragment:null,ctx:[],props:o,update:ee,not_equal:i,bound:Rt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:Rt(),dirty:s,skip_bound:!1,root:t.target||u.$$.root};a&&a(l.root);let h=!1;if(l.ctx=n?n(e,t.props||{},(c,m,..._)=>{const d=_.length?_[0]:m;return l.ctx&&i(l.ctx[c],l.ctx[c]=d)&&(!l.skip_bound&&l.bound[c]&&l.bound[c](d),h&&br(e,c)),m}):[],l.update(),h=!0,ve(l.before_update),l.fragment=r?r(l.ctx):!1,t.target){if(t.hydrate){const c=or(t.target);l.fragment&&l.fragment.l(c),c.forEach(A)}else l.fragment&&l.fragment.c();t.intro&&mr(e.$$.fragment),dr(e,t.target,t.anchor),ae()}De(u)}let ln;typeof HTMLElement=="function"&&(ln=class extends HTMLElement{constructor(t,n,r){super();K(this,"$$ctor");K(this,"$$s");K(this,"$$c");K(this,"$$cn",!1);K(this,"$$d",{});K(this,"$$r",!1);K(this,"$$p_d",{});K(this,"$$l",{});K(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=n,r&&this.attachShadow({mode:"open"})}addEventListener(t,n,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(n),this.$$c){const i=this.$$c.$on(t,n);this.$$l_u.set(n,i)}super.addEventListener(t,n,r)}removeEventListener(t,n,r){if(super.removeEventListener(t,n,r),this.$$c){const i=this.$$l_u.get(n);i&&(i(),this.$$l_u.delete(n))}}connectedCallback(){return Ee(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(o){return()=>{let a;return{c:function(){a=H("slot"),o!=="default"&&p(a,"name",o)},m:function(l,h){B(l,a,h)},d:function(l){l&&A(a)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const n={},r=sr(this);for(const o of this.$$s)o in r&&(n[o]=[t(o)]);for(const o of this.attributes){const a=this.$$g_p(o.name);a in this.$$d||(this.$$d[a]=We(a,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:at(ze({},this.$$d),{$$slots:n,$$scope:{ctx:[]}})});const i=()=>{this.$$r=!0;for(const o in this.$$p_d)if(this.$$d[o]=this.$$c.$$.ctx[this.$$c.$$.props[o]],this.$$p_d[o].reflect){const a=We(o,this.$$d[o],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,a)}this.$$r=!1};this.$$c.$$.after_update.push(i),i();for(const o in this.$$l)for(const a of this.$$l[o]){const s=this.$$c.$on(o,a);this.$$l_u.set(a,s)}this.$$l={}}})}attributeChangedCallback(t,n,r){var i;this.$$r||(t=this.$$g_p(t),this.$$d[t]=We(t,r,this.$$p_d,"toProp"),(i=this.$$c)==null||i.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(t){return Object.keys(this.$$p_d).find(n=>this.$$p_d[n].attribute===t||!this.$$p_d[n].attribute&&n.toLowerCase()===t)||t}});function We(e,t,n,r){var o;const i=(o=n[e])==null?void 0:o.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t==null?null:t;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function _r(e,t,n,r,i,o){let a=class extends ln{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(s=>(t[s].attribute||s).toLowerCase())}};return Object.keys(t).forEach(s=>{Object.defineProperty(a.prototype,s,{get(){return this.$$c&&s in this.$$c?this.$$c[s]:this.$$d[s]},set(u){var l;u=We(s,u,t),this.$$d[s]=u,(l=this.$$c)==null||l.$set({[s]:u})}})}),r.forEach(s=>{Object.defineProperty(a.prototype,s,{get(){var u;return(u=this.$$c)==null?void 0:u[s]}})}),e.element=a,a}class Er{constructor(){K(this,"$$");K(this,"$$set")}$destroy(){gr(this,1),this.$destroy=ee}$on(t,n){if(!Ht(n))return ee;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(t){this.$$set&&!Yn(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const vr="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(vr);function xr(e,t){if(e){const n=document.createElement("style");n.innerHTML=t,e.appendChild(n)}}function wr(e,t){if(!e||!t)return;const n=new URL(t);fetch(n.href).then(r=>r.text()).then(r=>{const i=document.createElement("style");i.innerHTML=r,e&&e.appendChild(i)}).catch(r=>{console.error("There was an error while trying to load client styling from URL",r)})}function Sr(e,t,n){if(window.emMessageBus){const r=document.createElement("style");window.emMessageBus.subscribe(t,i=>{r.innerHTML=i,e&&e.appendChild(r)})}}const Oe=[];function Tr(e,t){return{subscribe:Ke(e,t).subscribe}}function Ke(e,t=ee){let n;const r=new Set;function i(s){if(sn(e,s)&&(e=s,n)){const u=!Oe.length;for(const l of r)l[1](),Oe.push(l,e);if(u){for(let l=0;l<Oe.length;l+=2)Oe[l][0](Oe[l+1]);Oe.length=0}}}function o(s){i(s(e))}function a(s,u=ee){const l=[s,u];return r.add(l),r.size===1&&(n=t(i,o)||ee),s(e),()=>{r.delete(l),r.size===0&&n&&(n(),n=null)}}return{set:i,update:o,subscribe:a}}function Ie(e,t,n){const r=!Array.isArray(e),i=r?[e]:e;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const o=t.length<2;return Tr(n,(a,s)=>{let u=!1;const l=[];let h=0,c=ee;const m=()=>{if(h)return;c();const d=t(r?l[0]:l,a,s);o?a(d):c=Ht(d)?d:ee},_=i.map((d,g)=>an(d,v=>{l[g]=v,h&=~(1<<g),u&&m()},()=>{h|=1<<g}));return u=!0,m(),function(){ve(_),c(),u=!1}})}function Hr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Or=function(t){return Ar(t)&&!Cr(t)};function Ar(e){return!!e&&typeof e=="object"}function Cr(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Mr(e)}var Br=typeof Symbol=="function"&&Symbol.for,Pr=Br?Symbol.for("react.element"):60103;function Mr(e){return e.$$typeof===Pr}function Lr(e){return Array.isArray(e)?[]:{}}function Ge(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Be(Lr(e),e,t):e}function Ir(e,t,n){return e.concat(t).map(function(r){return Ge(r,n)})}function Nr(e,t){if(!t.customMerge)return Be;var n=t.customMerge(e);return typeof n=="function"?n:Be}function Rr(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Ut(e){return Object.keys(e).concat(Rr(e))}function un(e,t){try{return t in e}catch(n){return!1}}function kr(e,t){return un(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function Dr(e,t,n){var r={};return n.isMergeableObject(e)&&Ut(e).forEach(function(i){r[i]=Ge(e[i],n)}),Ut(t).forEach(function(i){kr(e,i)||(un(e,i)&&n.isMergeableObject(t[i])?r[i]=Nr(i,n)(e[i],t[i],n):r[i]=Ge(t[i],n))}),r}function Be(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||Ir,n.isMergeableObject=n.isMergeableObject||Or,n.cloneUnlessOtherwiseSpecified=Ge;var r=Array.isArray(t),i=Array.isArray(e),o=r===i;return o?r?n.arrayMerge(e,t,n):Dr(e,t,n):Ge(t,n)}Be.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return Be(r,i,n)},{})};var Ur=Be,Gr=Ur;const Fr=Hr(Gr);/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation.
|
|
3
|
+
|
|
4
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
+
purpose with or without fee is hereby granted.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
+
***************************************************************************** */var bt=function(e,t){return bt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},bt(e,t)};function et(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");bt(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var O=function(){return O=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},O.apply(this,arguments)};function jr(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function ut(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||t)}function ht(e,t){var n=t&&t.cache?t.cache:Zr,r=t&&t.serializer?t.serializer:Wr,i=t&&t.strategy?t.strategy:$r;return i(e,{cache:n,serializer:r})}function Vr(e){return e==null||typeof e=="number"||typeof e=="boolean"}function hn(e,t,n,r){var i=Vr(r)?r:n(r),o=t.get(i);return typeof o=="undefined"&&(o=e.call(this,r),t.set(i,o)),o}function cn(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=t.get(i);return typeof o=="undefined"&&(o=e.apply(this,r),t.set(i,o)),o}function Ot(e,t,n,r,i){return n.bind(t,e,r,i)}function $r(e,t){var n=e.length===1?hn:cn;return Ot(e,this,n,t.cache.create(),t.serializer)}function zr(e,t){return Ot(e,this,cn,t.cache.create(),t.serializer)}function Xr(e,t){return Ot(e,this,hn,t.cache.create(),t.serializer)}var Wr=function(){return JSON.stringify(arguments)};function At(){this.cache=Object.create(null)}At.prototype.get=function(e){return this.cache[e]};At.prototype.set=function(e,t){this.cache[e]=t};var Zr={create:function(){return new At}},ct={variadic:zr,monadic:Xr},w;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(w||(w={}));var I;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(I||(I={}));var Pe;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Pe||(Pe={}));function Gt(e){return e.type===I.literal}function qr(e){return e.type===I.argument}function fn(e){return e.type===I.number}function pn(e){return e.type===I.date}function mn(e){return e.type===I.time}function dn(e){return e.type===I.select}function gn(e){return e.type===I.plural}function Qr(e){return e.type===I.pound}function bn(e){return e.type===I.tag}function yn(e){return!!(e&&typeof e=="object"&&e.type===Pe.number)}function yt(e){return!!(e&&typeof e=="object"&&e.type===Pe.dateTime)}var _n=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Jr=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function Yr(e){var t={};return e.replace(Jr,function(n){var r=n.length;switch(n[0]){case"G":t.era=r===4?"long":r===5?"narrow":"short";break;case"y":t.year=r===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=r===4?"long":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var Kr=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function ei(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Kr).filter(function(m){return m.length>0}),n=[],r=0,i=t;r<i.length;r++){var o=i[r],a=o.split("/");if(a.length===0)throw new Error("Invalid number skeleton");for(var s=a[0],u=a.slice(1),l=0,h=u;l<h.length;l++){var c=h[l];if(c.length===0)throw new Error("Invalid number skeleton")}n.push({stem:s,options:u})}return n}function ti(e){return e.replace(/^(.*?)-/,"")}var Ft=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,En=/^(@+)?(\+|#+)?[rs]?$/g,ni=/(\*)(0+)|(#+)(0+)|(0+)/g,vn=/^(0+)$/;function jt(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(En,function(n,r,i){return typeof i!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):i==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof i=="string"?i.length:0)),""}),t}function xn(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function ri(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!vn.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Vt(e){var t={},n=xn(e);return n||t}function ii(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=ti(i.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=O(O(O({},t),{notation:"scientific"}),i.options.reduce(function(u,l){return O(O({},u),Vt(l))},{}));continue;case"engineering":t=O(O(O({},t),{notation:"engineering"}),i.options.reduce(function(u,l){return O(O({},u),Vt(l))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(ni,function(u,l,h,c,m,_){if(l)t.minimumIntegerDigits=h.length;else{if(c&&m)throw new Error("We currently do not support maximum integer digits");if(_)throw new Error("We currently do not support exact integer digits")}return""});continue}if(vn.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(Ft.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Ft,function(u,l,h,c,m,_){return h==="*"?t.minimumFractionDigits=l.length:c&&c[0]==="#"?t.maximumFractionDigits=c.length:m&&_?(t.minimumFractionDigits=m.length,t.maximumFractionDigits=m.length+_.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var o=i.options[0];o==="w"?t=O(O({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=O(O({},t),jt(o)));continue}if(En.test(i.stem)){t=O(O({},t),jt(i.stem));continue}var a=xn(i.stem);a&&(t=O(O({},t),a));var s=ri(i.stem);s&&(t=O(O({},t),s))}return t}var Xe={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function oi(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if(i==="j"){for(var o=0;r+1<e.length&&e.charAt(r+1)===i;)o++,r++;var a=1+(o&1),s=o<2?1:3+(o>>1),u="a",l=si(t);for((l=="H"||l=="k")&&(s=0);s-- >0;)n+=u;for(;a-- >0;)n=l+n}else i==="J"?n+="H":n+=i}return n}function si(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,r;n!=="root"&&(r=e.maximize().region);var i=Xe[r||""]||Xe[n||""]||Xe["".concat(n,"-001")]||Xe["001"];return i[0]}var ft,ai=new RegExp("^".concat(_n.source,"*")),li=new RegExp("".concat(_n.source,"*$"));function T(e,t){return{start:e,end:t}}var ui=!!String.prototype.startsWith&&"_a".startsWith("a",1),hi=!!String.fromCodePoint,ci=!!Object.fromEntries,fi=!!String.prototype.codePointAt,pi=!!String.prototype.trimStart,mi=!!String.prototype.trimEnd,di=!!Number.isSafeInteger,gi=di?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},_t=!0;try{var bi=Sn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");_t=((ft=bi.exec("a"))===null||ft===void 0?void 0:ft[0])==="a"}catch(e){_t=!1}var $t=ui?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},Et=hi?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=t.length,o=0,a;i>o;){if(a=t[o++],a>1114111)throw RangeError(a+" is not a valid code point");r+=a<65536?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,a%1024+56320)}return r},zt=ci?Object.fromEntries:function(t){for(var n={},r=0,i=t;r<i.length;r++){var o=i[r],a=o[0],s=o[1];n[a]=s}return n},wn=fi?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var i=t.charCodeAt(n),o;return i<55296||i>56319||n+1===r||(o=t.charCodeAt(n+1))<56320||o>57343?i:(i-55296<<10)+(o-56320)+65536}},yi=pi?function(t){return t.trimStart()}:function(t){return t.replace(ai,"")},_i=mi?function(t){return t.trimEnd()}:function(t){return t.replace(li,"")};function Sn(e,t){return new RegExp(e,t)}var vt;if(_t){var Xt=Sn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");vt=function(t,n){var r;Xt.lastIndex=n;var i=Xt.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else vt=function(t,n){for(var r=[];;){var i=wn(t,n);if(i===void 0||Tn(i)||wi(i))break;r.push(i),n+=i>=65536?2:1}return Et.apply(void 0,r)};var Ei=function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,r){for(var i=[];!this.isEOF();){var o=this.char();if(o===123){var a=this.parseArgument(t,r);if(a.err)return a;i.push(a.val)}else{if(o===125&&t>0)break;if(o===35&&(n==="plural"||n==="selectordinal")){var s=this.clonePosition();this.bump(),i.push({type:I.pound,location:T(s,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(w.UNMATCHED_CLOSING_TAG,T(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&xt(this.peek()||0)){var a=this.parseTag(t,n);if(a.err)return a;i.push(a.val)}else{var a=this.parseLiteral(t,n);if(a.err)return a;i.push(a.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:I.literal,value:"<".concat(i,"/>"),location:T(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(t+1,n,!0);if(o.err)return o;var a=o.val,s=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!xt(this.char()))return this.error(w.INVALID_TAG,T(s,this.clonePosition()));var u=this.clonePosition(),l=this.parseTagName();return i!==l?this.error(w.UNMATCHED_CLOSING_TAG,T(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:I.tag,value:i,children:a,location:T(r,this.clonePosition())},err:null}:this.error(w.INVALID_TAG,T(s,this.clonePosition())))}else return this.error(w.UNCLOSED_TAG,T(r,this.clonePosition()))}else return this.error(w.INVALID_TAG,T(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&xi(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),i="";;){var o=this.tryParseQuote(n);if(o){i+=o;continue}var a=this.tryParseUnquoted(t,n);if(a){i+=a;continue}var s=this.tryParseLeftAngleBracket();if(s){i+=s;continue}break}var u=T(r,this.clonePosition());return{val:{type:I.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!vi(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return Et.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),Et(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,T(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(w.EMPTY_ARGUMENT,T(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(w.MALFORMED_ARGUMENT,T(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,T(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:I.argument,value:i,location:T(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,T(r,this.clonePosition())):this.parseArgumentOptions(t,n,i,r);default:return this.error(w.MALFORMED_ARGUMENT,T(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=vt(this.message,n),i=n+r.length;this.bumpTo(i);var o=this.clonePosition(),a=T(t,o);return{value:r,location:a}},e.prototype.parseArgumentOptions=function(t,n,r,i){var o,a=this.clonePosition(),s=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(s){case"":return this.error(w.EXPECT_ARGUMENT_TYPE,T(a,u));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition(),c=this.parseSimpleArgStyleIfPossible();if(c.err)return c;var m=_i(c.val);if(m.length===0)return this.error(w.EXPECT_ARGUMENT_STYLE,T(this.clonePosition(),this.clonePosition()));var _=T(h,this.clonePosition());l={style:m,styleLocation:_}}var d=this.tryParseArgumentClose(i);if(d.err)return d;var g=T(i,this.clonePosition());if(l&&$t(l==null?void 0:l.style,"::",0)){var v=yi(l.style.slice(2));if(s==="number"){var c=this.parseNumberSkeletonFromString(v,l.styleLocation);return c.err?c:{val:{type:I.number,value:r,location:g,style:c.val},err:null}}else{if(v.length===0)return this.error(w.EXPECT_DATE_TIME_SKELETON,g);var S=v;this.locale&&(S=oi(v,this.locale));var m={type:Pe.dateTime,pattern:S,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?Yr(S):{}},M=s==="date"?I.date:I.time;return{val:{type:M,value:r,location:g,style:m},err:null}}}return{val:{type:s==="number"?I.number:s==="date"?I.date:I.time,value:r,location:g,style:(o=l==null?void 0:l.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var N=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(w.EXPECT_SELECT_ARGUMENT_OPTIONS,T(N,O({},N)));this.bumpSpace();var D=this.parseIdentifierIfPossible(),L=0;if(s!=="select"&&D.value==="offset"){if(!this.bumpIf(":"))return this.error(w.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,T(this.clonePosition(),this.clonePosition()));this.bumpSpace();var c=this.tryParseDecimalInteger(w.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,w.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(c.err)return c;this.bumpSpace(),D=this.parseIdentifierIfPossible(),L=c.val}var R=this.tryParsePluralOrSelectOptions(t,s,n,D);if(R.err)return R;var d=this.tryParseArgumentClose(i);if(d.err)return d;var te=T(i,this.clonePosition());return s==="select"?{val:{type:I.select,value:r,options:zt(R.val),location:te},err:null}:{val:{type:I.plural,value:r,options:zt(R.val),offset:L,pluralType:s==="plural"?"cardinal":"ordinal",location:te},err:null}}default:return this.error(w.INVALID_ARGUMENT_TYPE,T(a,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,T(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(w.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,T(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var r=[];try{r=ei(t)}catch(i){return this.error(w.INVALID_NUMBER_SKELETON,n)}return{val:{type:Pe.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?ii(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,i){for(var o,a=!1,s=[],u=new Set,l=i.value,h=i.location;;){if(l.length===0){var c=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var m=this.tryParseDecimalInteger(w.EXPECT_PLURAL_ARGUMENT_SELECTOR,w.INVALID_PLURAL_ARGUMENT_SELECTOR);if(m.err)return m;h=T(c,this.clonePosition()),l=this.message.slice(c.offset,this.offset())}else break}if(u.has(l))return this.error(n==="select"?w.DUPLICATE_SELECT_ARGUMENT_SELECTOR:w.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);l==="other"&&(a=!0),this.bumpSpace();var _=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?w.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:w.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,T(this.clonePosition(),this.clonePosition()));var d=this.parseMessage(t+1,n,r);if(d.err)return d;var g=this.tryParseArgumentClose(_);if(g.err)return g;s.push([l,{value:d.val,location:T(_,this.clonePosition())}]),u.add(l),this.bumpSpace(),o=this.parseIdentifierIfPossible(),l=o.value,h=o.location}return s.length===0?this.error(n==="select"?w.EXPECT_SELECT_ARGUMENT_SELECTOR:w.EXPECT_PLURAL_ARGUMENT_SELECTOR,T(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(w.MISSING_OTHER_CLAUSE,T(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var o=!1,a=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)o=!0,a=a*10+(s-48),this.bump();else break}var u=T(i,this.clonePosition());return o?(a*=r,gi(a)?{val:a,err:null}:this.error(n,u)):this.error(t,u)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=wn(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if($t(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),r=this.message.indexOf(t,n);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Tn(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(t>=65536?2:1));return r!=null?r:null},e}();function xt(e){return e>=97&&e<=122||e>=65&&e<=90}function vi(e){return xt(e)||e===47}function xi(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Tn(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function wi(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function wt(e){e.forEach(function(t){if(delete t.location,dn(t)||gn(t))for(var n in t.options)delete t.options[n].location,wt(t.options[n].value);else fn(t)&&yn(t.style)||(pn(t)||mn(t))&&yt(t.style)?delete t.style.location:bn(t)&&wt(t.children)})}function Si(e,t){t===void 0&&(t={}),t=O({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Ei(e,t).parse();if(n.err){var r=SyntaxError(w[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||wt(n.val),n.val}var Me;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Me||(Me={}));var tt=function(e){et(t,e);function t(n,r,i){var o=e.call(this,n)||this;return o.code=r,o.originalMessage=i,o}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),Wt=function(e){et(t,e);function t(n,r,i,o){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Me.INVALID_VALUE,o)||this}return t}(tt),Ti=function(e){et(t,e);function t(n,r,i){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Me.INVALID_VALUE,i)||this}return t}(tt),Hi=function(e){et(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),Me.MISSING_VALUE,r)||this}return t}(tt),q;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(q||(q={}));function Oi(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==q.literal||n.type!==q.literal?t.push(n):r.value+=n.value,t},[])}function Ai(e){return typeof e=="function"}function Ze(e,t,n,r,i,o,a){if(e.length===1&&Gt(e[0]))return[{type:q.literal,value:e[0].value}];for(var s=[],u=0,l=e;u<l.length;u++){var h=l[u];if(Gt(h)){s.push({type:q.literal,value:h.value});continue}if(Qr(h)){typeof o=="number"&&s.push({type:q.literal,value:n.getNumberFormat(t).format(o)});continue}var c=h.value;if(!(i&&c in i))throw new Hi(c,a);var m=i[c];if(qr(h)){(!m||typeof m=="string"||typeof m=="number")&&(m=typeof m=="string"||typeof m=="number"?String(m):""),s.push({type:typeof m=="string"?q.literal:q.object,value:m});continue}if(pn(h)){var _=typeof h.style=="string"?r.date[h.style]:yt(h.style)?h.style.parsedOptions:void 0;s.push({type:q.literal,value:n.getDateTimeFormat(t,_).format(m)});continue}if(mn(h)){var _=typeof h.style=="string"?r.time[h.style]:yt(h.style)?h.style.parsedOptions:r.time.medium;s.push({type:q.literal,value:n.getDateTimeFormat(t,_).format(m)});continue}if(fn(h)){var _=typeof h.style=="string"?r.number[h.style]:yn(h.style)?h.style.parsedOptions:void 0;_&&_.scale&&(m=m*(_.scale||1)),s.push({type:q.literal,value:n.getNumberFormat(t,_).format(m)});continue}if(bn(h)){var d=h.children,g=h.value,v=i[g];if(!Ai(v))throw new Ti(g,"function",a);var S=Ze(d,t,n,r,i,o),M=v(S.map(function(L){return L.value}));Array.isArray(M)||(M=[M]),s.push.apply(s,M.map(function(L){return{type:typeof L=="string"?q.literal:q.object,value:L}}))}if(dn(h)){var N=h.options[m]||h.options.other;if(!N)throw new Wt(h.value,m,Object.keys(h.options),a);s.push.apply(s,Ze(N.value,t,n,r,i));continue}if(gn(h)){var N=h.options["=".concat(m)];if(!N){if(!Intl.PluralRules)throw new tt(`Intl.PluralRules is not available in this environment.
|
|
15
|
+
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
16
|
+
`,Me.MISSING_INTL_API,a);var D=n.getPluralRules(t,{type:h.pluralType}).select(m-(h.offset||0));N=h.options[D]||h.options.other}if(!N)throw new Wt(h.value,m,Object.keys(h.options),a);s.push.apply(s,Ze(N.value,t,n,r,i,m-(h.offset||0)));continue}}return Oi(s)}function Ci(e,t){return t?O(O(O({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=O(O({},e[r]),t[r]||{}),n},{})):e}function Bi(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=Ci(e[r],t[r]),n},O({},e)):e}function pt(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Pi(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:ht(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,ut([void 0],n,!1)))},{cache:pt(e.number),strategy:ct.variadic}),getDateTimeFormat:ht(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,ut([void 0],n,!1)))},{cache:pt(e.dateTime),strategy:ct.variadic}),getPluralRules:ht(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,ut([void 0],n,!1)))},{cache:pt(e.pluralRules),strategy:ct.variadic})}}var Mi=function(){function e(t,n,r,i){n===void 0&&(n=e.defaultLocale);var o=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var l=o.formatToParts(u);if(l.length===1)return l[0].value;var h=l.reduce(function(c,m){return!c.length||m.type!==q.literal||typeof c[c.length-1]!="string"?c.push(m.value):c[c.length-1]+=m.value,c},[]);return h.length<=1?h[0]||"":h},this.formatToParts=function(u){return Ze(o.ast,o.locales,o.formatters,o.formats,u,void 0,o.message)},this.resolvedOptions=function(){var u;return{locale:((u=o.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(o.locales)[0]}},this.getAst=function(){return o.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var a=i||{};a.formatters;var s=jr(a,["formatters"]);this.ast=e.__parse(t,O(O({},s),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=Bi(e.formats,r),this.formatters=i&&i.formatters||Pi(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(typeof Intl.Locale!="undefined"){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=Si,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();function Li(e,t){if(t==null)return;if(t in e)return e[t];const n=t.split(".");let r=e;for(let i=0;i<n.length;i++)if(typeof r=="object"){if(i>0){const o=n.slice(i,n.length).join(".");if(o in r){r=r[o];break}}r=r[n[i]]}else r=void 0;return r}const pe={},Ii=(e,t,n)=>n&&(t in pe||(pe[t]={}),e in pe[t]||(pe[t][e]=n),n),Hn=(e,t)=>{if(t==null)return;if(t in pe&&e in pe[t])return pe[t][e];const n=nt(t);for(let r=0;r<n.length;r++){const i=n[r],o=Ri(i,e);if(o)return Ii(e,t,o)}};let Ct;const je=Ke({});function Ni(e){return Ct[e]||null}function On(e){return e in Ct}function Ri(e,t){if(!On(e))return null;const n=Ni(e);return Li(n,t)}function ki(e){if(e==null)return;const t=nt(e);for(let n=0;n<t.length;n++){const r=t[n];if(On(r))return r}}function An(e,...t){delete pe[e],je.update(n=>(n[e]=Fr.all([n[e]||{},...t]),n))}Ie([je],([e])=>Object.keys(e));je.subscribe(e=>Ct=e);const qe={};function Di(e,t){qe[e].delete(t),qe[e].size===0&&delete qe[e]}function Cn(e){return qe[e]}function Ui(e){return nt(e).map(t=>{const n=Cn(t);return[t,n?[...n]:[]]}).filter(([,t])=>t.length>0)}function St(e){return e==null?!1:nt(e).some(t=>{var n;return(n=Cn(t))==null?void 0:n.size})}function Gi(e,t){return Promise.all(t.map(r=>(Di(e,r),r().then(i=>i.default||i)))).then(r=>An(e,...r))}const ke={};function Bn(e){if(!St(e))return e in ke?ke[e]:Promise.resolve();const t=Ui(e);return ke[e]=Promise.all(t.map(([n,r])=>Gi(n,r))).then(()=>{if(St(e))return Bn(e);delete ke[e]}),ke[e]}const Fi={number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},ji={fallbackLocale:null,loadingDelay:200,formats:Fi,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},Vi=ji;function Le(){return Vi}const mt=Ke(!1);var $i=Object.defineProperty,zi=Object.defineProperties,Xi=Object.getOwnPropertyDescriptors,Zt=Object.getOwnPropertySymbols,Wi=Object.prototype.hasOwnProperty,Zi=Object.prototype.propertyIsEnumerable,qt=(e,t,n)=>t in e?$i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qi=(e,t)=>{for(var n in t||(t={}))Wi.call(t,n)&&qt(e,n,t[n]);if(Zt)for(var n of Zt(t))Zi.call(t,n)&&qt(e,n,t[n]);return e},Qi=(e,t)=>zi(e,Xi(t));let Tt;const Je=Ke(null);function Qt(e){return e.split("-").map((t,n,r)=>r.slice(0,n+1).join("-")).reverse()}function nt(e,t=Le().fallbackLocale){const n=Qt(e);return t?[...new Set([...n,...Qt(t)])]:n}function xe(){return Tt!=null?Tt:void 0}Je.subscribe(e=>{Tt=e!=null?e:void 0,typeof window!="undefined"&&e!=null&&document.documentElement.setAttribute("lang",e)});const Ji=e=>{if(e&&ki(e)&&St(e)){const{loadingDelay:t}=Le();let n;return typeof window!="undefined"&&xe()!=null&&t?n=window.setTimeout(()=>mt.set(!0),t):mt.set(!0),Bn(e).then(()=>{Je.set(e)}).finally(()=>{clearTimeout(n),mt.set(!1)})}return Je.set(e)},Ne=Qi(qi({},Je),{set:Ji}),rt=e=>{const t=Object.create(null);return r=>{const i=JSON.stringify(r);return i in t?t[i]:t[i]=e(r)}};var Yi=Object.defineProperty,Ye=Object.getOwnPropertySymbols,Pn=Object.prototype.hasOwnProperty,Mn=Object.prototype.propertyIsEnumerable,Jt=(e,t,n)=>t in e?Yi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bt=(e,t)=>{for(var n in t||(t={}))Pn.call(t,n)&&Jt(e,n,t[n]);if(Ye)for(var n of Ye(t))Mn.call(t,n)&&Jt(e,n,t[n]);return e},Re=(e,t)=>{var n={};for(var r in e)Pn.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ye)for(var r of Ye(e))t.indexOf(r)<0&&Mn.call(e,r)&&(n[r]=e[r]);return n};const Fe=(e,t)=>{const{formats:n}=Le();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},Ki=rt(e=>{var t=e,{locale:n,format:r}=t,i=Re(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return r&&(i=Fe("number",r)),new Intl.NumberFormat(n,i)}),eo=rt(e=>{var t=e,{locale:n,format:r}=t,i=Re(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return r?i=Fe("date",r):Object.keys(i).length===0&&(i=Fe("date","short")),new Intl.DateTimeFormat(n,i)}),to=rt(e=>{var t=e,{locale:n,format:r}=t,i=Re(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return r?i=Fe("time",r):Object.keys(i).length===0&&(i=Fe("time","short")),new Intl.DateTimeFormat(n,i)}),no=(e={})=>{var t=e,{locale:n=xe()}=t,r=Re(t,["locale"]);return Ki(Bt({locale:n},r))},ro=(e={})=>{var t=e,{locale:n=xe()}=t,r=Re(t,["locale"]);return eo(Bt({locale:n},r))},io=(e={})=>{var t=e,{locale:n=xe()}=t,r=Re(t,["locale"]);return to(Bt({locale:n},r))},oo=rt((e,t=xe())=>new Mi(e,t,Le().formats,{ignoreTag:Le().ignoreTag})),so=(e,t={})=>{var n,r,i,o;let a=t;typeof e=="object"&&(a=e,e=a.id);const{values:s,locale:u=xe(),default:l}=a;if(u==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let h=Hn(e,u);if(!h)h=(o=(i=(r=(n=Le()).handleMissingMessage)==null?void 0:r.call(n,{locale:u,id:e,defaultValue:l}))!=null?i:l)!=null?o:e;else if(typeof h!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof h}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),h;if(!s)return h;let c=h;try{c=oo(h,u).format(s)}catch(m){m instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,m.message)}return c},ao=(e,t)=>io(t).format(e),lo=(e,t)=>ro(t).format(e),uo=(e,t)=>no(t).format(e),ho=(e,t=xe())=>Hn(e,t),co=Ie([Ne,je],()=>so);Ie([Ne],()=>ao);Ie([Ne],()=>lo);Ie([Ne],()=>uo);Ie([Ne,je],()=>ho);function Yt(e,t){An(e,t)}function fo(e){Ne.set(e)}const Kt={en:{otpTitle:"Code verification is required",popupMessage:"Please enter the security code received on your SMS/email address to perform the update.",popupMessageLastWarning:"If the next validation attempt is failed, you will be logged out and blocked temporarily.",minutes:"minutes",errorHeader:"Error",configError:"Unable to load OTP data. Please try again later.",otpHeading:"Enter OTP",resendOtp:"Resent OTP",submit:"Submit",close:"Close",invalidOtp:"The code you've sent is not valid. Please try again.",accountBlocked:"Too many attempts for OTP. Your account has been blocked for one hour.",submissionError:"Something went wrong. Please try again.",otpExpiredMessage:"Validation code has expired, please request a new one to continue.",timeRemaining:"Code expires in:",selectChannelTitle:"Select verification method",selectChannelMessage:"Choose how you would like to receive your verification code",channelSMS:"SMS",channelEmail:"Email",sendCode:"Send code",waitSeconds:"Please wait for before resending:"},tr:{otpTitle:"Kod doğrulaması gereklidir",popupMessage:"Güncellemeyi gerçekleştirmek için SMS/e-posta adresinize gönderilen güvenlik kodunu girin.",popupMessageLastWarning:"Bir sonraki doğrulama denemesi başarısız olursa, oturumunuz kapatılacak ve geçici olarak engelleneceksiniz.",minutes:"dakika",errorHeader:"Hata",configError:"OTP verileri yüklenemedi. Lütfen daha sonra tekrar deneyin.",otpHeading:"OTP Girin",resendOtp:"OTP'yi Yeniden Gönder",submit:"Gönder",close:"Kapat",invalidOtp:"Gönderdiğiniz kod geçerli değil. Lütfen tekrar deneyin.",accountBlocked:"OTP için çok fazla deneme yapıldı. Hesabınız bir saat süreyle engellenmiştir.",submissionError:"Bir şeyler ters gitti. Lütfen tekrar deneyin.",otpExpiredMessage:"Doğrulama kodunun süresi doldu, devam etmek için lütfen yeni bir kod isteyin.",timeRemaining:"Kodun süresi doluyor:",selectChannelTitle:"Select verification method",selectChannelMessage:"Choose how you would like to receive your verification code",channelSMS:"SMS kodu",channelEmail:"E-posta kodu",sendCode:"Kodu gönder",waitSeconds:"Tekrar göndermeden önce lütfen bekleyin:"}};function po(e){er(e,"svelte-gpy3mu",'*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit}.RadioIndicator{width:20px;height:20px;border-radius:50%;border:2px solid var(--emw--color-typography, #fff);position:relative;flex-shrink:0;margin-right:8px;transition:all 0.2s ease;opacity:0.7}.RadioIndicator.checked::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:10px;height:10px;border-radius:50%;opacity:1;background:var(--emw--color-primary, #fff)}.RadioIndicator.checked{border:2px solid var(--emw--color-primary, #fff)}.ModalCloseIcon{padding:0px;position:absolute;right:0;top:0;margin:15px 20px;z-index:20;transition:all 0.3s ease}.ModalCloseIcon svg{width:11px;height:11px;fill:var(--emw--color-primary, red);cursor:pointer}.ModalCloseIcon:hover{transform:rotate(90deg)}.OtpContent{width:100%;display:flex;flex-direction:column;gap:var(--emw--spacing-large, 20px)}.OtpFieldWrapper{display:flex;flex-direction:column;gap:10px}.OtpFieldWrapper h2{margin:0}.OtpButton{text-transform:uppercase;font-weight:var(--emw--font-weight-medium, 500);color:var(--emw--color-typography-button, #000000);text-align:center;font-size:var(--emw--font-size-medium, 16px);font-style:normal;font-family:inherit;height:46px;line-height:normal;border:none;background:var(--emw--color-primary, #f9c408);border-radius:10px;width:100%;margin:var(--emw--spacing-small, 12px) 0;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:var(--emw--spacing-2x-small-plus, 5px);transition:all 0.2s linear}.OtpButton:active{box-shadow:inset 0px 0px 0px 1px rgba(255, 255, 255, 0.2);background-color:var(--emw--color-active, #fecd1c)}.OtpButton[disabled],.OtpButton.disabled{filter:saturate(50%);opacity:0.5;cursor:not-allowed;pointer-events:none}.OtpButton:hover:not([disabled]):not(.disabled){box-shadow:inset 0px 0px 0px 1px rgba(255, 255, 255, 0.2);background-color:var(--emw--color-hover, #dbac03)}@container (max-width: 500px){.OtpDescription{font-size:var(--emw--font-size-small, 12px)}.OtpDescription .Title{font-size:var(--emw--font-size-big, 20px)}}.OtpDescription{display:flex;color:var(--emw--color-typography, #fff);flex-direction:column;gap:12px;font-size:var(--emw--font-size-small, 12px)}.OtpDescription .Title{font-size:var(--emw--font-medium, 16px);font-weight:var(--emw--font-weight-medium, 600)}.OtpError{display:flex;flex-direction:column;gap:20px;align-items:center}.OtpError .OtpErrorHeader{display:flex;justify-content:center;gap:5px;align-items:center}.OtpError h2{margin:0;color:var(--emw--color-typography, #fff)}.OtpError p{color:var(--emw--color-typography, #fff);text-align:center;font-size:var(--emw--font-size-small, 12px)}.OtpError svg{width:25px;fill:var(--emw--color-error, #dd3434)}.ChannelSelection{display:flex;flex-direction:row;justify-content:space-between}.ChannelCheckbox{display:flex;align-items:center;padding:var(--emw--spacing-medium, 16px);cursor:pointer;transition:all 0.2s ease}.ChannelCheckbox input[type=radio]{display:none}.ChannelCheckbox .ChannelContent{display:flex;align-items:center;gap:3px;width:100%;color:var(--emw--color-typography, #fff);font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-medium, 500)}.ChannelCheckbox .ChannelContent svg{flex-shrink:0;opacity:0.7;width:20px;height:20px}.ChannelCheckbox .ChannelContent span{text-transform:uppercase}.ChannelCheckbox.selected .ChannelContent{color:var(--emw--color-primary, #000000)}.ChannelCheckbox.selected .ChannelContent svg{stroke:var(--emw--color-primary, #000000);opacity:1}.ChannelCheckbox:hover:not(.selected){color:var(--emw--color-active, #fff)}.OtpField{display:flex;justify-content:space-between;margin:10px}.OtpField input{width:45px;font-size:32px;padding:5px;text-align:center;border-radius:5px;margin:6px;font-weight:bold;outline:none;background:var(--emw--color-background);border:0;transition:all 0.1s;box-shadow:inset 0px 0px 0px 1px rgba(255, 255, 255, 0.3);color:var(--emw--color-typography, #fff)}.OtpField input.space{margin-right:1rem !important}.OtpField input:focus{box-shadow:0 0 1px 1px var(--emw--color-primary, #007bff)}.OtpActionButtons{display:flex;justify-content:space-between;gap:40px}.OtpErrorMessage{color:var(--emw--color-error, #dd3434);font-weight:bold}.OtpNoticeMessage{color:var(--emw--color-primary, #f9c408);font-weight:bold}.LastWarningMessage{color:var(--emw--color-error, #dd3434);font-weight:bold}.OtpLoaderContainer{width:100%;display:flex;justify-content:center;align-items:center;padding:20px 0}.OtpLoader{width:48px;height:48px;border:5px solid var(--emw--color-secondary, #b3d8ff);border-bottom-color:var(--emw--color-primary, #007bff);border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.OtpTimer{color:var(--emw--color-typography, #fff);font-size:var(--emw--font-size-small, 12px);opacity:0.8}@container (max-width: 500px){.OtpContent{padding:var(--emw--spacing-small, 10px)}.OtpField input{width:40px;font-size:28px;margin:4px}}')}function en(e,t,n){const r=e.slice();return r[69]=t[n],r[70]=t,r[71]=n,r}function mo(e){let t,n,r,i,o,a,s,u,l,h,c,m,_,d,g,v,S,M=e[19]("channelSMS")+"",N,D,L,R,te,Q,le,me,ue,P,U,Z,de,ge,be=e[19]("channelEmail")+"",J,ne,X,he,re,ye,we;function _e(b,C){return b[9]?_o:b[12]?bo:yo}let Se=_e(e),Y=Se(e),V=e[0]&&nn(e);function Ve(b,C){if(b[3]&&b[12])return To;if(b[12]&&b[4])return So}let ce=Ve(e),$=ce&&ce(e);function $e(b,C){if(b[9])return Oo;if(b[12]&&b[4])return Ho}let ie=$e(e),W=ie&&ie(e);return{c(){t=H("div"),Y.c(),n=F(),r=H("div"),i=H("label"),o=H("div"),a=F(),s=H("input"),l=F(),h=H("div"),c=oe("svg"),m=oe("path"),_=oe("circle"),d=oe("circle"),g=oe("circle"),v=F(),S=H("span"),N=k(M),D=F(),L=H("label"),R=H("div"),te=F(),Q=H("input"),me=F(),ue=H("div"),P=oe("svg"),U=oe("rect"),Z=oe("path"),de=F(),ge=H("span"),J=k(be),ne=F(),V&&V.c(),X=F(),$&&$.c(),he=F(),re=H("div"),W&&W.c(),p(t,"class","OtpDescription"),p(o,"class","RadioIndicator"),se(o,"checked",e[0]===e[20].SMS),p(s,"type","radio"),p(s,"name","channel"),s.value=e[20].SMS,s.checked=u=e[0]===e[20].SMS,p(m,"d","M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"),p(_,"cx","9"),p(_,"cy","11"),p(_,"r","0.5"),p(_,"fill","currentColor"),p(d,"cx","12"),p(d,"cy","11"),p(d,"r","0.5"),p(d,"fill","currentColor"),p(g,"cx","15"),p(g,"cy","11"),p(g,"r","0.5"),p(g,"fill","currentColor"),p(c,"xmlns","http://www.w3.org/2000/svg"),p(c,"width","24"),p(c,"height","24"),p(c,"viewBox","0 0 24 24"),p(c,"fill","none"),p(c,"stroke","currentColor"),p(c,"stroke-width","2"),p(c,"stroke-linecap","round"),p(c,"stroke-linejoin","round"),p(h,"class","ChannelContent"),p(i,"class","ChannelCheckbox"),se(i,"selected",e[0]===e[20].SMS),p(R,"class","RadioIndicator"),se(R,"checked",e[0]===e[20].EMAIL),p(Q,"type","radio"),p(Q,"name","channel"),Q.value=e[20].EMAIL,Q.checked=le=e[0]===e[20].EMAIL,p(U,"x","2"),p(U,"y","4"),p(U,"width","20"),p(U,"height","16"),p(U,"rx","2"),p(Z,"d","m2 7 10 6 10-6"),p(P,"xmlns","http://www.w3.org/2000/svg"),p(P,"width","24"),p(P,"height","24"),p(P,"viewBox","0 0 24 24"),p(P,"fill","none"),p(P,"stroke","currentColor"),p(P,"stroke-width","2"),p(P,"stroke-linecap","round"),p(P,"stroke-linejoin","round"),p(ue,"class","ChannelContent"),p(L,"class","ChannelCheckbox"),se(L,"selected",e[0]===e[20].EMAIL),p(r,"class","ChannelSelection"),p(re,"class","OtpActionButtons")},m(b,C){B(b,t,C),Y.m(t,null),B(b,n,C),B(b,r,C),y(r,i),y(i,o),y(i,a),y(i,s),y(i,l),y(i,h),y(h,c),y(c,m),y(c,_),y(c,d),y(c,g),y(h,v),y(h,S),y(S,N),y(r,D),y(r,L),y(L,R),y(L,te),y(L,Q),y(L,me),y(L,ue),y(ue,P),y(P,U),y(P,Z),y(ue,de),y(ue,ge),y(ge,J),B(b,ne,C),V&&V.m(b,C),B(b,X,C),$&&$.m(b,C),B(b,he,C),B(b,re,C),W&&W.m(re,null),ye||(we=[fe(s,"change",e[39]),fe(Q,"change",e[40])],ye=!0)},p(b,C){Se===(Se=_e(b))&&Y?Y.p(b,C):(Y.d(1),Y=Se(b),Y&&(Y.c(),Y.m(t,null))),C[0]&1048577&&se(o,"checked",b[0]===b[20].SMS),C[0]&1&&u!==(u=b[0]===b[20].SMS)&&(s.checked=u),C[0]&524288&&M!==(M=b[19]("channelSMS")+"")&&j(N,M),C[0]&1048577&&se(i,"selected",b[0]===b[20].SMS),C[0]&1048577&&se(R,"checked",b[0]===b[20].EMAIL),C[0]&1&&le!==(le=b[0]===b[20].EMAIL)&&(Q.checked=le),C[0]&524288&&be!==(be=b[19]("channelEmail")+"")&&j(J,be),C[0]&1048577&&se(L,"selected",b[0]===b[20].EMAIL),b[0]?V?V.p(b,C):(V=nn(b),V.c(),V.m(X.parentNode,X)):V&&(V.d(1),V=null),ce===(ce=Ve(b))&&$?$.p(b,C):($&&$.d(1),$=ce&&ce(b),$&&($.c(),$.m(he.parentNode,he))),ie===(ie=$e(b))&&W?W.p(b,C):(W&&W.d(1),W=ie&&ie(b),W&&(W.c(),W.m(re,null)))},d(b){b&&(A(t),A(n),A(r),A(ne),A(X),A(he),A(re)),Y.d(),V&&V.d(b),$&&$.d(b),W&&W.d(),ye=!1,ve(we)}}}function go(e){let t,n,r,i,o,a,s=e[19]("errorHeader")+"",u,l,h,c,m,_,d=e[19]("close")+"",g,v,S;return{c(){t=H("div"),n=H("div"),r=oe("svg"),i=oe("path"),o=F(),a=H("h2"),u=k(s),l=F(),h=H("p"),c=k(e[8]),m=F(),_=H("button"),g=k(d),p(i,"d","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"),p(r,"xmlns","http://www.w3.org/2000/svg"),p(r,"viewBox","0 0 512 512"),p(n,"class","OtpErrorHeader"),p(_,"class","OtpButton error"),p(t,"class","OtpError")},m(M,N){B(M,t,N),y(t,n),y(n,r),y(r,i),y(n,o),y(n,a),y(a,u),y(t,l),y(t,h),y(h,c),y(t,m),y(t,_),y(_,g),v||(S=fe(_,"click",e[28]),v=!0)},p(M,N){N[0]&524288&&s!==(s=M[19]("errorHeader")+"")&&j(u,s),N[0]&256&&j(c,M[8]),N[0]&524288&&d!==(d=M[19]("close")+"")&&j(g,d)},d(M){M&&A(t),v=!1,S()}}}function bo(e){let t,n,r,i;function o(l,h){return l[10]?vo:Eo}let a=o(e),s=a(e),u=e[6]&&tn(e);return{c(){t=H("p"),s.c(),r=F(),u&&u.c(),i=ir(),p(t,"class",n=e[10]?"LastWarningMessage":"")},m(l,h){B(l,t,h),s.m(t,null),B(l,r,h),u&&u.m(l,h),B(l,i,h)},p(l,h){a===(a=o(l))&&s?s.p(l,h):(s.d(1),s=a(l),s&&(s.c(),s.m(t,null))),h[0]&1024&&n!==(n=l[10]?"LastWarningMessage":"")&&p(t,"class",n),l[6]?u?u.p(l,h):(u=tn(l),u.c(),u.m(i.parentNode,i)):u&&(u.d(1),u=null)},d(l){l&&(A(t),A(r),A(i)),s.d(),u&&u.d(l)}}}function yo(e){let t,n=(e[19]("selectChannelMessage")||"Selectează metoda prin care vrei să primești codul OTP")+"",r;return{c(){t=H("p"),r=k(n)},m(i,o){B(i,t,o),y(t,r)},p(i,o){o[0]&524288&&n!==(n=(i[19]("selectChannelMessage")||"Selectează metoda prin care vrei să primești codul OTP")+"")&&j(r,n)},d(i){i&&A(t)}}}function _o(e){let t,n=e[19]("otpExpiredMessage")+"",r;return{c(){t=H("p"),r=k(n),p(t,"class","OtpNoticeMessage"),p(t,"role","alert")},m(i,o){B(i,t,o),y(t,r)},p(i,o){o[0]&524288&&n!==(n=i[19]("otpExpiredMessage")+"")&&j(r,n)},d(i){i&&A(t)}}}function Eo(e){let t=e[19]("popupMessage")+"",n;return{c(){n=k(t)},m(r,i){B(r,n,i)},p(r,i){i[0]&524288&&t!==(t=r[19]("popupMessage")+"")&&j(n,t)},d(r){r&&A(n)}}}function vo(e){let t=e[19]("popupMessageLastWarning")+"",n;return{c(){n=k(t)},m(r,i){B(r,n,i)},p(r,i){i[0]&524288&&t!==(t=r[19]("popupMessageLastWarning")+"")&&j(n,t)},d(r){r&&A(n)}}}function tn(e){let t,n;return{c(){t=H("p"),n=k(e[8]),p(t,"class","OtpErrorMessage"),p(t,"role","alert")},m(r,i){B(r,t,i),y(t,n)},p(r,i){i[0]&256&&j(n,r[8])},d(r){r&&A(t)}}}function nn(e){let t,n,r,i;function o(u,l){return u[17]>0?wo:xo}let a=o(e),s=a(e);return{c(){t=H("button"),s.c(),p(t,"class","OtpButton"),t.disabled=n=!e[18],se(t,"disabled",!e[18]||e[16])},m(u,l){B(u,t,l),s.m(t,null),r||(i=fe(t,"click",e[22]),r=!0)},p(u,l){a===(a=o(u))&&s?s.p(u,l):(s.d(1),s=a(u),s&&(s.c(),s.m(t,null))),l[0]&262144&&n!==(n=!u[18])&&(t.disabled=n),l[0]&327680&&se(t,"disabled",!u[18]||u[16])},d(u){u&&A(t),s.d(),r=!1,i()}}}function xo(e){let t=e[19]("sendCode")+"",n;return{c(){n=k(t)},m(r,i){B(r,n,i)},p(r,i){i[0]&524288&&t!==(t=r[19]("sendCode")+"")&&j(n,t)},d(r){r&&A(n)}}}function wo(e){let t=e[19]("waitSeconds")+"",n,r,i,o;return{c(){n=k(t),r=k(" ("),i=k(e[17]),o=k("s)")},m(a,s){B(a,n,s),B(a,r,s),B(a,i,s),B(a,o,s)},p(a,s){s[0]&524288&&t!==(t=a[19]("waitSeconds")+"")&&j(n,t),s[0]&131072&&j(i,a[17])},d(a){a&&(A(n),A(r),A(i),A(o))}}}function So(e){let t,n,r=e[19]("timeRemaining")+"",i,o,a=e[23](e[5])+"",s,u,l=e[19]("minutes")+"",h,c,m,_=Dt(e[2]),d=[];for(let g=0;g<_.length;g+=1)d[g]=rn(en(e,_,g));return{c(){t=H("div"),n=H("div"),i=k(r),o=F(),s=k(a),u=F(),h=k(l),c=F(),m=H("div");for(let g=0;g<d.length;g+=1)d[g].c();p(n,"class","OtpTimer"),p(m,"class","OtpField"),p(t,"class","OtpFieldWrapper")},m(g,v){B(g,t,v),y(t,n),y(n,i),y(n,o),y(n,s),y(n,u),y(n,h),y(t,c),y(t,m);for(let S=0;S<d.length;S+=1)d[S]&&d[S].m(m,null)},p(g,v){if(v[0]&524288&&r!==(r=g[19]("timeRemaining")+"")&&j(i,r),v[0]&32&&a!==(a=g[23](g[5])+"")&&j(s,a),v[0]&524288&&l!==(l=g[19]("minutes")+"")&&j(h,l),v[0]&117458964){_=Dt(g[2]);let S;for(S=0;S<_.length;S+=1){const M=en(g,_,S);d[S]?d[S].p(M,v):(d[S]=rn(M),d[S].c(),d[S].m(m,null))}for(;S<d.length;S+=1)d[S].d(1);d.length=_.length}},d(g){g&&A(t),rr(d,g)}}}function To(e){let t;return{c(){t=H("div"),t.innerHTML='<span class="OtpLoader"></span>',p(t,"class","OtpLoaderContainer")},m(n,r){B(n,t,r)},p:ee,d(n){n&&A(t)}}}function rn(e){let t,n,r,i=e[71],o,a;const s=()=>e[41](t,i),u=()=>e[41](null,i);function l(...c){return e[42](e[71],...c)}function h(...c){return e[43](e[71],...c)}return{c(){t=H("input"),p(t,"id",`otp-input-${e[71]}`),p(t,"type","text"),p(t,"class",n=`otp-box ${e[4].inputLength%2===0&&e[71]===e[4].inputLength/2-1?"space":""}`),p(t,"maxlength",1),t.value=r=e[69],p(t,"inputmode","numeric"),t.disabled=e[11],p(t,"autocomplete","off")},m(c,m){B(c,t,m),s(),o||(a=[fe(t,"input",l),fe(t,"keydown",h),fe(t,"paste",e[24])],o=!0)},p(c,m){e=c,m[0]&16&&n!==(n=`otp-box ${e[4].inputLength%2===0&&e[71]===e[4].inputLength/2-1?"space":""}`)&&p(t,"class",n),m[0]&4&&r!==(r=e[69])&&t.value!==r&&(t.value=r),m[0]&2048&&(t.disabled=e[11]),i!==e[71]&&(u(),i=e[71],s())},d(c){c&&A(t),u(),o=!1,ve(a)}}}function Ho(e){let t,n=e[19]("submit")+"",r,i,o,a;return{c(){t=H("button"),r=k(n),p(t,"class","OtpButton"),t.disabled=i=e[2].join("").length!==e[4].inputLength||e[13]||e[15]},m(s,u){B(s,t,u),y(t,r),o||(a=fe(t,"click",e[29]),o=!0)},p(s,u){u[0]&524288&&n!==(n=s[19]("submit")+"")&&j(r,n),u[0]&40980&&i!==(i=s[2].join("").length!==s[4].inputLength||s[13]||s[15])&&(t.disabled=i)},d(s){s&&A(t),o=!1,a()}}}function Oo(e){let t,n=e[19]("resendOtp")+"",r,i,o;return{c(){t=H("button"),r=k(n),p(t,"class","OtpButton")},m(a,s){B(a,t,s),y(t,r),i||(o=fe(t,"click",e[27]),i=!0)},p(a,s){s[0]&524288&&n!==(n=a[19]("resendOtp")+"")&&j(r,n)},d(a){a&&A(t),i=!1,o()}}}function Ao(e){let t;function n(o,a){return o[7]?go:mo}let r=n(e),i=r(e);return{c(){t=H("div"),i.c(),p(t,"class","OtpContent")},m(o,a){B(o,t,a),i.m(t,null),e[44](t)},p(o,a){r===(r=n(o))&&i?i.p(o,a):(i.d(1),i=r(o),i&&(i.c(),i.m(t,null)))},i:ee,o:ee,d(o){o&&A(t),i.d(),e[44](null)}}}function Co(e,t,n){let r,i,o;Kn(e,co,f=>n(19,o=f));let{clientstyling:a=""}=t,{clientstylingurl:s=""}=t,{mbsource:u}=t,{lang:l="en"}=t,{endpoint:h}=t,{session:c}=t,{translationurl:m}=t,{templateid:_}=t,d=[],g=!0,v=null,S=0,M="",N="",D=!1,L=!1,R="",te="",Q="",le=!1,me=!1,ue=!1,P="",U={},Z=null,de=!1,ge=!1,be="",J,ne=[],X=null,he=0,re=!1,ye=!1;const we={SMS:"sms",EMAIL:"email"},_e={MAX_ATTEMPTS_EXCEEDED:"gm.twofa.token_max_attempts_exceeded",INTERNAL_SERVER_ERROR:"gm.multifactorauthentication.internal_server_error",MAX_INVALIDATE:"gm.multifactorauthentication.challenge_internal_server_error"};Object.keys(Kt).forEach(f=>{Yt(f,Kt[f])});const Se=()=>{fo(l)},Y=()=>{fetch(m).then(f=>f.json()).then(f=>{Object.keys(f).forEach(E=>{Yt(E,f[E])})}).catch(f=>{console.log(f)})},V=f=>Ee(this,null,function*(){var E;if((E=f.detail)!=null&&E["x-step-up-required"]){if(n(7,L=!1),n(6,D=!1),n(8,R=""),te=f.detail["x-step-up-token"],Q=f.detail.flow,!te||!Q){n(3,g=!1),n(7,L=!0),n(8,R=o("configError"));return}n(12,de=!1),n(3,g=!1)}}),Ve=()=>{X&&(clearInterval(X),X=null),Z&&(clearInterval(Z),Z=null),n(6,D=!1),n(7,L=!1),n(8,R=""),n(10,me=!1),n(2,d=[]),n(4,v=null),n(3,g=!0),n(0,P=""),n(12,de=!1),n(38,U={})},ce=()=>{Ve()},$=()=>new Promise((f,E)=>{const x=new URL(`${h}/api/pam/v1/mfa/challenge/${te}`),G=new Headers;G.append("accept","application/json"),G.append("Content-Type","application/json"),G.append("X-SessionId",`${c}`),n(16,ye=!0);const Te={method:"PATCH",headers:G,body:JSON.stringify({channel:P,templateId:_})};fetch(x,Te).then(It=>It.json()).then(()=>{n(15,re=!1),b(),C(),f()}).catch(It=>{E()})}),$e=()=>{Z&&clearInterval(Z),Z=setInterval(()=>{const f=ze({},U);let E=!1;Object.keys(f).forEach(x=>{f[x]>0&&(f[x]--,E=!0)}),n(38,U=f),!E&&Z&&(clearInterval(Z),Z=null)},1e3)},ie=f=>{n(0,P=f)},W=()=>Ee(this,null,function*(){if(!(!P||U[P]&&U[P]>0)){n(3,g=!0),_&&_.startsWith("2fa-")&&n(30,_=`2fa-${P}`);try{yield $(),yield ot(),n(38,U=at(ze({},U),{[P]:30})),$e(),n(12,de=!0),b(),C()}catch(f){console.error("Error submitting channel:",f),n(6,D=!0),n(8,R=o("submissionError"))}finally{n(3,g=!1)}}}),b=()=>{const f=new Date(M),E=new Date(N),x=new Date,G=E.getTime()-x.getTime();he=f.getTime()-G;const z=Date.now(),Te=Math.max(0,Math.floor((he-z)/1e3));n(5,S=Te)},C=()=>{X&&clearInterval(X),X=setInterval(()=>{const f=Date.now(),E=Math.max(0,Math.floor((he-f)/1e3));n(5,S=E),n(11,ue=E<=0),E<=0&&(clearInterval(X),X=null,n(9,le=!0),n(6,D=!1),n(10,me=!1))},1e3)},In=f=>{const E=Math.floor(f/60),x=f%60;return`${E.toString().padStart(2,"0")}:${x.toString().padStart(2,"0")}`},it=(f,E)=>{const x=[...d];x[f]=E.toUpperCase(),n(2,d=x),x.join("")!==be&&n(13,ge=!1)},Nn=f=>{var G,z,Te;f.preventDefault();const x=(((z=(G=f.clipboardData)==null?void 0:G.getData("text"))==null?void 0:z.trim())||"").slice(0,v.inputLength).split("");n(2,d=[...x,...Array(v.inputLength-x.length).fill("")]),(Te=ne[x.length])==null||Te.focus(),x.length===v.inputLength&&Lt()},Pt=(f,E)=>{const x=f.target,G=x.value;if(/^[a-z0-9]$/i.test(G)){it(E,G);const z=ne[E+1];z==null||z.focus()}x.value=""},Mt=(f,E)=>{const x=f.key,G=f.ctrlKey||f.metaKey;if(/^[a-z0-9]$/i.test(x)){if(G&&x.toLowerCase()==="v")return;f.preventDefault(),it(E,x);const z=ne[E+1];z==null||z.focus()}else if(x==="Backspace"){f.preventDefault(),d[E]!==""&&it(E,"");const z=ne[E-1];z==null||z.focus()}},Rn=()=>{Q=="stateful"&&($(),n(9,le=!1));const f=new CustomEvent("otpResendRequested");window.dispatchEvent(f)},kn=f=>{window.dispatchEvent(new CustomEvent("otpSubmitted",{detail:{code:f,maxAttempts:v.maxValidationAttempts,validatedAttempts:v.numberOfValidateAttempts}}))},Dn=f=>Ee(this,null,function*(){const E=new URL(`/api/nwa/api/v1/mfa/challenge/${te}/validate`,h);E.searchParams.append("input",f);try{const x=yield fetch(E.href,{method:"POST"});if(x.status===200){Un();return}const G=yield x.json();throw new Error(G.message)}catch(x){if(yield ot(),x.message===_e.INTERNAL_SERVER_ERROR){if(v.numberOfValidateAttempts===v.maxValidationAttempts-1){window.dispatchEvent(new CustomEvent("otpSetTimeout")),window.postMessage({type:"WidgetNotification",data:{type:"error",message:o("accountBlocked")}},window.location.href),window.dispatchEvent(new CustomEvent("manualClosePopup"));return}n(6,D=!0),n(8,R=o("invalidOtp")),ot();return}x.message===_e.MAX_INVALIDATE&&(n(6,D=!0),n(8,R=o("invalidOtp"))),x.details===_e.MAX_ATTEMPTS_EXCEEDED&&n(15,re=!0),console.error("OTP submission failed:",x),n(6,D=!0),n(8,R=o("submissionError"))}finally{n(3,g=!1)}}),Un=()=>{window.dispatchEvent(new CustomEvent("otpSuccess",{detail:{message:"User successfully authenticated"}}))},Gn=()=>{window.dispatchEvent(new CustomEvent("manualClosePopup"))},Lt=()=>Ee(this,null,function*(){if(d.join("").length!==v.inputLength){n(6,D=!0),n(8,R=o("invalidOtp"));return}const f=d.join("");n(13,ge=!0),be=f,n(3,g=!0),n(6,D=!1),n(8,R=""),Q==="stateless"&&kn(f),Q==="stateful"&&(yield Dn(f))}),ot=()=>Ee(this,null,function*(){if(h)try{n(3,g=!0);const f=new URL(`/api/nwa/api/v1/mfa/challenge/${te}/config`,h),E=yield fetch(f.href),x=yield E.json();if(E.ok)n(4,v=x),n(2,d=Array(v.inputLength).fill("")),n(9,le=!1),M=v.expirationTime,N=v.serverTime,v.numberOfValidateAttempts!==0&&(n(6,D=!0),n(8,R=o("invalidOtp"))),v.numberOfValidateAttempts===v.maxValidationAttempts-1&&n(10,me=!0),n(3,g=!1),b(),C(),n(16,ye=!1);else if(x&&x.details===_e.MAX_ATTEMPTS_EXCEEDED)window.dispatchEvent(new CustomEvent("manualClosePopup"));else{const G=x&&x.message||`Failed to load config. Status: ${E.status}`;throw new Error(G)}}catch(f){n(3,g=!1),n(7,L=!0),n(8,R=o("configError")),window.dispatchEvent(new CustomEvent("2fa-loading",{detail:{isLoading:!1}})),console.error("Error loading 2FA config:",f)}});lr(()=>(window.addEventListener("stepUpAuthRequired",V,!1),window.addEventListener("closePopup",ce,!1),()=>{window.removeEventListener("stepUpAuthRequired",V),window.removeEventListener("closePopup",ce,!1),X&&clearInterval(X),Z&&clearInterval(Z)}));const Fn=()=>ie(we.SMS),jn=()=>ie(we.EMAIL);function Vn(f,E){Qe[f?"unshift":"push"](()=>{ne[E]=f,n(14,ne)})}const $n=(f,E)=>Pt(E,f),zn=(f,E)=>Mt(E,f);function Xn(f){Qe[f?"unshift":"push"](()=>{J=f,n(1,J)})}return e.$$set=f=>{"clientstyling"in f&&n(31,a=f.clientstyling),"clientstylingurl"in f&&n(32,s=f.clientstylingurl),"mbsource"in f&&n(33,u=f.mbsource),"lang"in f&&n(34,l=f.lang),"endpoint"in f&&n(35,h=f.endpoint),"session"in f&&n(36,c=f.session),"translationurl"in f&&n(37,m=f.translationurl),"templateid"in f&&n(30,_=f.templateid)},e.$$.update=()=>{e.$$.dirty[0]&2|e.$$.dirty[1]&1&&a&&J&&xr(J,a),e.$$.dirty[0]&2|e.$$.dirty[1]&2&&s&&J&&wr(J,s),e.$$.dirty[0]&2|e.$$.dirty[1]&4&&u&&J&&Sr(J,`${u}.Style`),e.$$.dirty[1]&8&&l&&Se(),e.$$.dirty[1]&72&&l&&m&&Y(),e.$$.dirty[0]&1|e.$$.dirty[1]&128&&n(18,r=P&&(!U[P]||U[P]===0)),e.$$.dirty[0]&1|e.$$.dirty[1]&128&&n(17,i=P&&U[P]||0)},[P,J,d,g,v,S,D,L,R,le,me,ue,de,ge,ne,re,ye,i,r,o,we,ie,W,In,Nn,Pt,Mt,Rn,Gn,Lt,_,a,s,u,l,h,c,m,U,Fn,jn,Vn,$n,zn,Xn]}class Ln extends Er{constructor(t){super(),yr(this,t,Co,Ao,sn,{clientstyling:31,clientstylingurl:32,mbsource:33,lang:34,endpoint:35,session:36,translationurl:37,templateid:30},po,[-1,-1,-1])}get clientstyling(){return this.$$.ctx[31]}set clientstyling(t){this.$$set({clientstyling:t}),ae()}get clientstylingurl(){return this.$$.ctx[32]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),ae()}get mbsource(){return this.$$.ctx[33]}set mbsource(t){this.$$set({mbsource:t}),ae()}get lang(){return this.$$.ctx[34]}set lang(t){this.$$set({lang:t}),ae()}get endpoint(){return this.$$.ctx[35]}set endpoint(t){this.$$set({endpoint:t}),ae()}get session(){return this.$$.ctx[36]}set session(t){this.$$set({session:t}),ae()}get translationurl(){return this.$$.ctx[37]}set translationurl(t){this.$$set({translationurl:t}),ae()}get templateid(){return this.$$.ctx[30]}set templateid(t){this.$$set({templateid:t}),ae()}}_r(Ln,{clientstyling:{},clientstylingurl:{},mbsource:{},lang:{},endpoint:{},session:{},translationurl:{},templateid:{}},[],[],!0);exports.default=Ln;
|