@everymatrix/cashier-method-details 1.22.10
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +30 -0
- package/dist/cashier-method-details.js +661 -0
- package/dist/cashier-method-details.js.map +1 -0
- package/index.html +36 -0
- package/index.js +1 -0
- package/package.json +39 -0
- package/public/favicon.png +0 -0
- package/public/reset.css +48 -0
- package/rollup.config.js +59 -0
- package/src/CashierMethodDetails.svelte +592 -0
- package/src/CashierMethodDetails.types.ts +91 -0
- package/src/i18n.js +27 -0
- package/src/index.ts +4 -0
- package/src/translations.js +18 -0
- package/stories/CashierMethodDetails.stories.js +13 -0
- package/tsconfig.json +6 -0
@@ -0,0 +1,661 @@
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).app=t()}(this,(function(){"use strict";function e(){}function t(e){return e()}function n(){return Object.create(null)}function r(e){e.forEach(t)}function i(e){return"function"==typeof e}function o(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}let s,a;function l(e,t){return s||(s=document.createElement("a")),s.href=t,e===s.href}function c(t,...n){if(null==t)return e;const r=t.subscribe(...n);return r.unsubscribe?()=>r.unsubscribe():r}function u(e,t,n){e.$$.on_destroy.push(c(t,n))}function h(e,t){e.appendChild(t)}function p(e,t,n){e.insertBefore(t,n||null)}function f(e){e.parentNode&&e.parentNode.removeChild(e)}function m(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function d(e){return document.createElement(e)}function g(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function b(e){return document.createTextNode(e)}function y(){return b(" ")}function E(){return b("")}function v(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function T(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function B(e,t,n){t in e?e[t]="boolean"==typeof e[t]&&""===n||n:T(e,t,n)}function w(e){return""===e?null:+e}function C(e,t){t=""+t,e.data!==t&&(e.data=t)}function H(e,t){e.value=null==t?"":t}function L(e,t,n){e.classList[n?"add":"remove"](t)}function A(e){const t={};for(const n of e)t[n.name]=n.value;return t}function _(e){a=e}function P(){if(!a)throw new Error("Function called outside component initialization");return a}
|
2
|
+
/**
|
3
|
+
* The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.
|
4
|
+
* It must be called during the component's initialisation (but doesn't need to live *inside* the component;
|
5
|
+
* it can be called from an external module).
|
6
|
+
*
|
7
|
+
* `onMount` does not run inside a [server-side component](/docs#run-time-server-side-component-api).
|
8
|
+
*
|
9
|
+
* https://svelte.dev/docs#run-time-svelte-onmount
|
10
|
+
*/
|
11
|
+
/**
|
12
|
+
* Creates an event dispatcher that can be used to dispatch [component events](/docs#template-syntax-component-directives-on-eventname).
|
13
|
+
* Event dispatchers are functions that can take two arguments: `name` and `detail`.
|
14
|
+
*
|
15
|
+
* Component events created with `createEventDispatcher` create a
|
16
|
+
* [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent).
|
17
|
+
* These events do not [bubble](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#Event_bubbling_and_capture).
|
18
|
+
* The `detail` argument corresponds to the [CustomEvent.detail](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/detail)
|
19
|
+
* property and can contain any type of data.
|
20
|
+
*
|
21
|
+
* https://svelte.dev/docs#run-time-svelte-createeventdispatcher
|
22
|
+
*/
|
23
|
+
function S(){const e=P();return(t,n,{cancelable:r=!1}={})=>{const i=e.$$.callbacks[t];if(i){
|
24
|
+
// TODO are there situations where events could be dispatched
|
25
|
+
// in a server (non-DOM) environment?
|
26
|
+
const o=function(e,t,{bubbles:n=!1,cancelable:r=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(e,n,r,t),i}(t,n,{cancelable:r});return i.slice().forEach((t=>{t.call(e,o)})),!o.defaultPrevented}return!0}}const x=[],N=[];let M=[];const R=[],O=Promise.resolve();let I=!1;function $(e){M.push(e)}
|
27
|
+
// flush() calls callbacks in this order:
|
28
|
+
// 1. All beforeUpdate callbacks, in order: parents before children
|
29
|
+
// 2. All bind:this callbacks, in reverse order: children before parents.
|
30
|
+
// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT
|
31
|
+
// for afterUpdates called during the initial onMount, which are called in
|
32
|
+
// reverse order: children before parents.
|
33
|
+
// Since callbacks might update component values, which could trigger another
|
34
|
+
// call to flush(), the following steps guard against this:
|
35
|
+
// 1. During beforeUpdate, any updated components will be added to the
|
36
|
+
// dirty_components array and will cause a reentrant call to flush(). Because
|
37
|
+
// the flush index is kept outside the function, the reentrant call will pick
|
38
|
+
// up where the earlier call left off and go through all dirty components. The
|
39
|
+
// current_component value is saved and restored so that the reentrant call will
|
40
|
+
// not interfere with the "parent" flush() call.
|
41
|
+
// 2. bind:this callbacks cannot trigger new flush() calls.
|
42
|
+
// 3. During afterUpdate, any updated components will NOT have their afterUpdate
|
43
|
+
// callback called a second time; the seen_callbacks set, outside the flush()
|
44
|
+
// function, guarantees this behavior.
|
45
|
+
const k=new Set;let D=0;// Do *not* move this inside the flush() function
|
46
|
+
function U(){
|
47
|
+
// Do not reenter flush while dirty components are updated, as this can
|
48
|
+
// result in an infinite loop. Instead, let the inner flush handle it.
|
49
|
+
// Reentrancy is ok afterwards for bindings etc.
|
50
|
+
if(0!==D)return;const e=a;do{
|
51
|
+
// first, call beforeUpdate functions
|
52
|
+
// and update components
|
53
|
+
try{for(;D<x.length;){const e=x[D];D++,_(e),F(e.$$)}}catch(e){
|
54
|
+
// reset dirty state to not end up in a deadlocked state and then rethrow
|
55
|
+
throw x.length=0,D=0,e}for(_(null),x.length=0,D=0;N.length;)N.pop()();
|
56
|
+
// then, once components are updated, call
|
57
|
+
// afterUpdate functions. This may cause
|
58
|
+
// subsequent updates...
|
59
|
+
for(let e=0;e<M.length;e+=1){const t=M[e];k.has(t)||(
|
60
|
+
// ...so guard against infinite loops
|
61
|
+
k.add(t),t())}M.length=0}while(x.length);for(;R.length;)R.pop()();I=!1,k.clear(),_(e)}function F(e){if(null!==e.fragment){e.update(),r(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach($)}}
|
62
|
+
/**
|
63
|
+
* Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.
|
64
|
+
*/const G=new Set;function j(e,t){const n=e.$$;null!==n.fragment&&(!function(e){const t=[],n=[];M.forEach((r=>-1===e.indexOf(r)?t.push(r):n.push(r))),n.forEach((e=>e())),M=t}(n.after_update),r(n.on_destroy),n.fragment&&n.fragment.d(t),
|
65
|
+
// TODO null out other refs, including component.$$ (but need to
|
66
|
+
// preserve final state?)
|
67
|
+
n.on_destroy=n.fragment=null,n.ctx=[])}function V(e,t){-1===e.$$.dirty[0]&&(x.push(e),I||(I=!0,O.then(U)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function X(o,s,l,c,u,h,p,m=[-1]){const d=a;_(o);const g=o.$$={fragment:null,ctx:[],
|
68
|
+
// state
|
69
|
+
props:h,update:e,not_equal:u,bound:n(),
|
70
|
+
// lifecycle
|
71
|
+
on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s.context||(d?d.$$.context:[])),
|
72
|
+
// everything else
|
73
|
+
callbacks:n(),dirty:m,skip_bound:!1,root:s.target||d.$$.root};p&&p(g.root);let b=!1;if(g.ctx=l?l(o,s.props||{},((e,t,...n)=>{const r=n.length?n[0]:t;return g.ctx&&u(g.ctx[e],g.ctx[e]=r)&&(!g.skip_bound&&g.bound[e]&&g.bound[e](r),b&&V(o,e)),t})):[],g.update(),b=!0,r(g.before_update),
|
74
|
+
// `false` as a special case of no DOM component
|
75
|
+
g.fragment=!!c&&c(g.ctx),s.target){if(s.hydrate){const e=function(e){return Array.from(e.childNodes)}(s.target);
|
76
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
77
|
+
g.fragment&&g.fragment.l(e),e.forEach(f)}else
|
78
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
79
|
+
g.fragment&&g.fragment.c();s.intro&&((y=o.$$.fragment)&&y.i&&(G.delete(y),y.i(E))),function(e,n,o,s){const{fragment:a,after_update:l}=e.$$;a&&a.m(n,o),s||
|
80
|
+
// onMount happens before the initial afterUpdate
|
81
|
+
$((()=>{const n=e.$$.on_mount.map(t).filter(i);
|
82
|
+
// if the component was destroyed immediately
|
83
|
+
// it will update the `$$.on_destroy` reference to `null`.
|
84
|
+
// the destructured on_destroy may still reference to the old array
|
85
|
+
e.$$.on_destroy?e.$$.on_destroy.push(...n):
|
86
|
+
// Edge case - component was destroyed immediately,
|
87
|
+
// most likely as a result of a binding initialising
|
88
|
+
r(n),e.$$.on_mount=[]})),l.forEach($)}(o,s.target,s.anchor,s.customElement),U()}var y,E;_(d)}let z;"function"==typeof HTMLElement&&(z=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(t).filter(i);
|
89
|
+
// @ts-ignore todo: improve typings
|
90
|
+
for(const e in this.$$.slotted)
|
91
|
+
// @ts-ignore todo: improve typings
|
92
|
+
this.appendChild(this.$$.slotted[e])}attributeChangedCallback(e,t,n){this[e]=n}disconnectedCallback(){r(this.$$.on_disconnect)}$destroy(){j(this,1),this.$destroy=e}$on(t,n){
|
93
|
+
// TODO should this delegate to addEventListener?
|
94
|
+
if(!i(n))return e;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const e=r.indexOf(n);-1!==e&&r.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}});const K=[];
|
95
|
+
/**
|
96
|
+
* Creates a `Readable` store that allows reading by subscription.
|
97
|
+
* @param value initial value
|
98
|
+
* @param {StartStopNotifier} [start]
|
99
|
+
*/
|
100
|
+
/**
|
101
|
+
* Create a `Writable` store that allows both updating and reading by subscription.
|
102
|
+
* @param {*=}value initial value
|
103
|
+
* @param {StartStopNotifier=} start
|
104
|
+
*/
|
105
|
+
function W(t,n=e){let r;const i=new Set;function s(e){if(o(t,e)&&(t=e,r)){// store is ready
|
106
|
+
const e=!K.length;for(const e of i)e[1](),K.push(e,t);if(e){for(let e=0;e<K.length;e+=2)K[e][0](K[e+1]);K.length=0}}}return{set:s,update:function(e){s(e(t))},subscribe:function(o,a=e){const l=[o,a];return i.add(l),1===i.size&&(r=n(s)||e),o(t),()=>{i.delete(l),0===i.size&&r&&(r(),r=null)}}}}function Z(t,n,o){const s=!Array.isArray(t),a=s?[t]:t,l=n.length<2;return u=t=>{let o=!1;const u=[];let h=0,p=e;const f=()=>{if(h)return;p();const r=n(s?u[0]:u,t);l?t(r):p=i(r)?r:e},m=a.map(((e,t)=>c(e,(e=>{u[t]=e,h&=~(1<<t),o&&f()}),(()=>{h|=1<<t}))));return o=!0,f(),function(){r(m),p(),
|
107
|
+
// We need to set this to false because callbacks can still happen despite having unsubscribed:
|
108
|
+
// Callbacks might already be placed in the queue which doesn't know it should no longer
|
109
|
+
// invoke this derived store.
|
110
|
+
o=!1}},{subscribe:W(o,u).subscribe};var u}var Y=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===q}(e)}
|
111
|
+
// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
|
112
|
+
(e)};var q="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function J(e,t){return!1!==t.clone&&t.isMergeableObject(e)?re((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Q(e,t,n){return e.concat(t).map((function(e){return J(e,n)}))}function ee(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function te(e,t){try{return t in e}catch(e){return!1}}
|
113
|
+
// Protects from prototype poisoning and unexpected merging up the prototype chain.
|
114
|
+
function ne(e,t,n){var r={};return n.isMergeableObject(e)&&ee(e).forEach((function(t){r[t]=J(e[t],n)})),ee(t).forEach((function(i){(function(e,t){return te(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t));// and also unsafe if they're nonenumerable.
|
115
|
+
})(e,i)||(te(e,i)&&n.isMergeableObject(t[i])?r[i]=function(e,t){if(!t.customMerge)return re;var n=t.customMerge(e);return"function"==typeof n?n:re}(i,n)(e[i],t[i],n):r[i]=J(t[i],n))})),r}function re(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Q,n.isMergeableObject=n.isMergeableObject||Y,
|
116
|
+
// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
|
117
|
+
// implementations can use it. The caller may not replace it.
|
118
|
+
n.cloneUnlessOtherwiseSpecified=J;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):ne(e,t,n):J(t,n)}re.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return re(e,n,t)}),{})};var ie=re,oe=function(e,t){return oe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},oe(e,t)};function se(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}oe(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var ae,le,ce,ue=function(){return ue=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ue.apply(this,arguments)};function he(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}
|
119
|
+
/**
|
120
|
+
* Type Guards
|
121
|
+
*/
|
122
|
+
function pe(e){return e.type===le.literal}function fe(e){return e.type===le.argument}function me(e){return e.type===le.number}function de(e){return e.type===le.date}function ge(e){return e.type===le.time}function be(e){return e.type===le.select}function ye(e){return e.type===le.plural}function Ee(e){return e.type===le.pound}function ve(e){return e.type===le.tag}function Te(e){return!(!e||"object"!=typeof e||e.type!==ce.number)}function Be(e){return!(!e||"object"!=typeof e||e.type!==ce.dateTime)}
|
123
|
+
// @generated from regex-gen.ts
|
124
|
+
"function"==typeof SuppressedError&&SuppressedError,function(e){
|
125
|
+
/** Argument is unclosed (e.g. `{0`) */
|
126
|
+
e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",
|
127
|
+
/** Argument is empty (e.g. `{}`). */
|
128
|
+
e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",
|
129
|
+
/** Argument is malformed (e.g. `{foo!}``) */
|
130
|
+
e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",
|
131
|
+
/** Expect an argument type (e.g. `{foo,}`) */
|
132
|
+
e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",
|
133
|
+
/** Unsupported argument type (e.g. `{foo,foo}`) */
|
134
|
+
e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",
|
135
|
+
/** Expect an argument style (e.g. `{foo, number, }`) */
|
136
|
+
e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",
|
137
|
+
/** The number skeleton is invalid. */
|
138
|
+
e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",
|
139
|
+
/** The date time skeleton is invalid. */
|
140
|
+
e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",
|
141
|
+
/** Exepct a number skeleton following the `::` (e.g. `{foo, number, ::}`) */
|
142
|
+
e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",
|
143
|
+
/** Exepct a date time skeleton following the `::` (e.g. `{foo, date, ::}`) */
|
144
|
+
e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",
|
145
|
+
/** Unmatched apostrophes in the argument style (e.g. `{foo, number, 'test`) */
|
146
|
+
e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",
|
147
|
+
/** Missing select argument options (e.g. `{foo, select}`) */
|
148
|
+
e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",
|
149
|
+
/** Expecting an offset value in `plural` or `selectordinal` argument (e.g `{foo, plural, offset}`) */
|
150
|
+
e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",
|
151
|
+
/** Offset value in `plural` or `selectordinal` is invalid (e.g. `{foo, plural, offset: x}`) */
|
152
|
+
e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",
|
153
|
+
/** Expecting a selector in `select` argument (e.g `{foo, select}`) */
|
154
|
+
e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",
|
155
|
+
/** Expecting a selector in `plural` or `selectordinal` argument (e.g `{foo, plural}`) */
|
156
|
+
e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",
|
157
|
+
/** Expecting a message fragment after the `select` selector (e.g. `{foo, select, apple}`) */
|
158
|
+
e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",
|
159
|
+
/**
|
160
|
+
* Expecting a message fragment after the `plural` or `selectordinal` selector
|
161
|
+
* (e.g. `{foo, plural, one}`)
|
162
|
+
*/
|
163
|
+
e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",
|
164
|
+
/** Selector in `plural` or `selectordinal` is malformed (e.g. `{foo, plural, =x {#}}`) */
|
165
|
+
e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",
|
166
|
+
/**
|
167
|
+
* Duplicate selectors in `plural` or `selectordinal` argument.
|
168
|
+
* (e.g. {foo, plural, one {#} one {#}})
|
169
|
+
*/
|
170
|
+
e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",
|
171
|
+
/** Duplicate selectors in `select` argument.
|
172
|
+
* (e.g. {foo, select, apple {apple} apple {apple}})
|
173
|
+
*/
|
174
|
+
e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",
|
175
|
+
/** Plural or select argument option must have `other` clause. */
|
176
|
+
e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",
|
177
|
+
/** The tag is malformed. (e.g. `<bold!>foo</bold!>) */
|
178
|
+
e[e.INVALID_TAG=23]="INVALID_TAG",
|
179
|
+
/** The tag name is invalid. (e.g. `<123>foo</123>`) */
|
180
|
+
e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",
|
181
|
+
/** The closing tag does not match the opening tag. (e.g. `<bold>foo</italic>`) */
|
182
|
+
e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",
|
183
|
+
/** The opening tag has unmatched closing tag. (e.g. `<bold>foo`) */
|
184
|
+
e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(ae||(ae={})),function(e){
|
185
|
+
/**
|
186
|
+
* Raw text
|
187
|
+
*/
|
188
|
+
e[e.literal=0]="literal",
|
189
|
+
/**
|
190
|
+
* Variable w/o any format, e.g `var` in `this is a {var}`
|
191
|
+
*/
|
192
|
+
e[e.argument=1]="argument",
|
193
|
+
/**
|
194
|
+
* Variable w/ number format
|
195
|
+
*/
|
196
|
+
e[e.number=2]="number",
|
197
|
+
/**
|
198
|
+
* Variable w/ date format
|
199
|
+
*/
|
200
|
+
e[e.date=3]="date",
|
201
|
+
/**
|
202
|
+
* Variable w/ time format
|
203
|
+
*/
|
204
|
+
e[e.time=4]="time",
|
205
|
+
/**
|
206
|
+
* Variable w/ select format
|
207
|
+
*/
|
208
|
+
e[e.select=5]="select",
|
209
|
+
/**
|
210
|
+
* Variable w/ plural format
|
211
|
+
*/
|
212
|
+
e[e.plural=6]="plural",
|
213
|
+
/**
|
214
|
+
* Only possible within plural argument.
|
215
|
+
* This is the `#` symbol that will be substituted with the count.
|
216
|
+
*/
|
217
|
+
e[e.pound=7]="pound",
|
218
|
+
/**
|
219
|
+
* XML-like tag
|
220
|
+
*/
|
221
|
+
e[e.tag=8]="tag"}(le||(le={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(ce||(ce={}));var we=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Ce=/(?:[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;
|
222
|
+
/**
|
223
|
+
* https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
224
|
+
* Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js
|
225
|
+
* with some tweaks
|
226
|
+
*/
|
227
|
+
/**
|
228
|
+
* Parse Date time skeleton into Intl.DateTimeFormatOptions
|
229
|
+
* Ref: https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
230
|
+
* @public
|
231
|
+
* @param skeleton skeleton string
|
232
|
+
*/
|
233
|
+
function He(e){var t={};return e.replace(Ce,(function(e){var n=e.length;switch(e[0]){
|
234
|
+
// Era
|
235
|
+
case"G":t.era=4===n?"long":5===n?"narrow":"short";break;
|
236
|
+
// Year
|
237
|
+
case"y":t.year=2===n?"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");
|
238
|
+
// Quarter
|
239
|
+
case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");
|
240
|
+
// Month
|
241
|
+
case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;
|
242
|
+
// Week
|
243
|
+
case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
|
244
|
+
// Weekday
|
245
|
+
case"E":t.weekday=4===n?"short":5===n?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;
|
246
|
+
// Period
|
247
|
+
case"a":// AM, PM
|
248
|
+
t.hour12=!0;break;case"b":// am, pm, noon, midnight
|
249
|
+
case"B":// flexible day periods
|
250
|
+
throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");
|
251
|
+
// Hour
|
252
|
+
case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-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");
|
253
|
+
// Minute
|
254
|
+
case"m":t.minute=["numeric","2-digit"][n-1];break;
|
255
|
+
// Second
|
256
|
+
case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");
|
257
|
+
// Zone
|
258
|
+
case"z":// 1..3, 4: specific non-location format
|
259
|
+
t.timeZoneName=n<4?"short":"long";break;case"Z":// 1..3, 4, 5: The ISO8601 varios formats
|
260
|
+
case"O":// 1, 4: miliseconds in day short, long
|
261
|
+
case"v":// 1, 4: generic non-location format
|
262
|
+
case"V":// 1, 2, 3, 4: time zone ID or city
|
263
|
+
case"X":// 1, 2, 3, 4: The ISO8601 varios formats
|
264
|
+
case"x":// 1, 2, 3, 4: The ISO8601 varios formats
|
265
|
+
throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),t}
|
266
|
+
// @generated from regex-gen.ts
|
267
|
+
var Le=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var Ae=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,_e=/^(@+)?(\+|#+)?[rs]?$/g,Pe=/(\*)(0+)|(#+)(0+)|(0+)/g,Se=/^(0+)$/;function xe(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(_e,(function(e,n,r){
|
268
|
+
// @@@ case
|
269
|
+
return"string"!=typeof r?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):"+"===r?t.minimumSignificantDigits=n.length:"#"===n[0]?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+("string"==typeof r?r.length:0)),""})),t}function Ne(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 Me(e){
|
270
|
+
// Engineering
|
271
|
+
var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(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)),!Se.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Re(e){var t=Ne(e);return t||{}}
|
272
|
+
/**
|
273
|
+
* https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options
|
274
|
+
*/function Oe(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=i.options[0].replace(/^(.*?)-/,"");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=ue(ue(ue({},t),{notation:"scientific"}),i.options.reduce((function(e,t){return ue(ue({},e),Re(t))}),{}));continue;case"engineering":t=ue(ue(ue({},t),{notation:"engineering"}),i.options.reduce((function(e,t){return ue(ue({},e),Re(t))}),{}));continue;case"notation-simple":t.notation="standard";continue;
|
275
|
+
// https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h
|
276
|
+
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;
|
277
|
+
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
|
278
|
+
case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Pe,(function(e,n,r,i,o,s){if(n)t.minimumIntegerDigits=r.length;else{if(i&&o)throw new Error("We currently do not support maximum integer digits");if(s)throw new Error("We currently do not support exact integer digits")}return""}));continue}
|
279
|
+
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
|
280
|
+
if(Se.test(i.stem))t.minimumIntegerDigits=i.stem.length;else if(Ae.test(i.stem)){
|
281
|
+
// Precision
|
282
|
+
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#fraction-precision
|
283
|
+
// precision-integer case
|
284
|
+
if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Ae,(function(e,n,r,i,o,s){
|
285
|
+
// .000* case (before ICU67 it was .000+)
|
286
|
+
return"*"===r?t.minimumFractionDigits=n.length:i&&"#"===i[0]?t.maximumFractionDigits=i.length:o&&s?(t.minimumFractionDigits=o.length,t.maximumFractionDigits=o.length+s.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),""}));var o=i.options[0];
|
287
|
+
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#trailing-zero-display
|
288
|
+
"w"===o?t=ue(ue({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=ue(ue({},t),xe(o)))}
|
289
|
+
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#significant-digits-precision
|
290
|
+
else if(_e.test(i.stem))t=ue(ue({},t),xe(i.stem));else{var s=Ne(i.stem);s&&(t=ue(ue({},t),s));var a=Me(i.stem);a&&(t=ue(ue({},t),a))}}return t}
|
291
|
+
// @generated from time-data-gen.ts
|
292
|
+
// prettier-ignore
|
293
|
+
var Ie,$e={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};
|
294
|
+
/**
|
295
|
+
* Returns the best matching date time pattern if a date time skeleton
|
296
|
+
* pattern is provided with a locale. Follows the Unicode specification:
|
297
|
+
* https://www.unicode.org/reports/tr35/tr35-dates.html#table-mapping-requested-time-skeletons-to-patterns
|
298
|
+
* @param skeleton date time skeleton pattern that possibly includes j, J or C
|
299
|
+
* @param locale
|
300
|
+
*/
|
301
|
+
/**
|
302
|
+
* Maps the [hour cycle type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/hourCycle)
|
303
|
+
* of the given `locale` to the corresponding time pattern.
|
304
|
+
* @param locale
|
305
|
+
*/
|
306
|
+
function ke(e){var t=e.hourCycle;if(void 0===t&&
|
307
|
+
// @ts-ignore hourCycle(s) is not identified yet
|
308
|
+
e.hourCycles&&
|
309
|
+
// @ts-ignore
|
310
|
+
e.hourCycles.length&&(
|
311
|
+
// @ts-ignore
|
312
|
+
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")}
|
313
|
+
// TODO: Once hourCycle is fully supported remove the following with data generation
|
314
|
+
var n,r=e.language;return"root"!==r&&(n=e.maximize().region),($e[n||""]||$e[r||""]||$e["".concat(r,"-001")]||$e["001"])[0]}var De=new RegExp("^".concat(we.source,"*")),Ue=new RegExp("".concat(we.source,"*$"));function Fe(e,t){return{start:e,end:t}}
|
315
|
+
// #region Ponyfills
|
316
|
+
// Consolidate these variables up top for easier toggling during debugging
|
317
|
+
var Ge=!!String.prototype.startsWith,je=!!String.fromCodePoint,Ve=!!Object.fromEntries,Xe=!!String.prototype.codePointAt,ze=!!String.prototype.trimStart,Ke=!!String.prototype.trimEnd,We=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Ze=!0;try{
|
318
|
+
/**
|
319
|
+
* legacy Edge or Xbox One browser
|
320
|
+
* Unicode flag support: supported
|
321
|
+
* Pattern_Syntax support: not supported
|
322
|
+
* See https://github.com/formatjs/formatjs/issues/2822
|
323
|
+
*/
|
324
|
+
Ze="a"===(null===(Ie=rt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===Ie?void 0:Ie[0])}catch(e){Ze=!1}var Ye,qe=Ge?// Native
|
325
|
+
function(e,t,n){return e.startsWith(t,n)}:// For IE11
|
326
|
+
function(e,t,n){return e.slice(n,n+t.length)===t},Je=je?String.fromCodePoint:// IE11
|
327
|
+
function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n,r="",i=e.length,o=0;i>o;){if((n=e[o++])>1114111)throw RangeError(n+" is not a valid code point");r+=n<65536?String.fromCharCode(n):String.fromCharCode(55296+((n-=65536)>>10),n%1024+56320)}return r},Qe=
|
328
|
+
// native
|
329
|
+
Ve?Object.fromEntries:// Ponyfill
|
330
|
+
function(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n],o=i[0],s=i[1];t[o]=s}return t},et=Xe?// Native
|
331
|
+
function(e,t){return e.codePointAt(t)}:// IE 11
|
332
|
+
function(e,t){var n=e.length;if(!(t<0||t>=n)){var r,i=e.charCodeAt(t);return i<55296||i>56319||t+1===n||(r=e.charCodeAt(t+1))<56320||r>57343?i:r-56320+(i-55296<<10)+65536}},tt=ze?// Native
|
333
|
+
function(e){return e.trimStart()}:// Ponyfill
|
334
|
+
function(e){return e.replace(De,"")},nt=Ke?// Native
|
335
|
+
function(e){return e.trimEnd()}:// Ponyfill
|
336
|
+
function(e){return e.replace(Ue,"")};
|
337
|
+
// Prevent minifier to translate new RegExp to literal form that might cause syntax error on IE11.
|
338
|
+
function rt(e,t){return new RegExp(e,t)}
|
339
|
+
// #endregion
|
340
|
+
if(Ze){
|
341
|
+
// Native
|
342
|
+
var it=rt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Ye=function(e,t){var n;return it.lastIndex=t,null!==(n=it.exec(e)[1])&&void 0!==n?n:""}}else
|
343
|
+
// IE11
|
344
|
+
Ye=function(e,t){for(var n=[];;){var r=et(e,t);if(void 0===r||at(r)||lt(r))break;n.push(r),t+=r>=65536?2:1}return Je.apply(void 0,n)};var ot=/** @class */function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,n){for(var r=[];!this.isEOF();){var i=this.char();if(123/* `{` */===i){if((o=this.parseArgument(e,n)).err)return o;r.push(o.val)}else{if(125/* `}` */===i&&e>0)break;if(35/* `#` */!==i||"plural"!==t&&"selectordinal"!==t){if(60/* `<` */===i&&!this.ignoreTag&&47===this.peek()){if(n)break;return this.error(ae.UNMATCHED_CLOSING_TAG,Fe(this.clonePosition(),this.clonePosition()))}if(60/* `<` */===i&&!this.ignoreTag&&st(this.peek()||0)){if((o=this.parseTag(e,t)).err)return o;r.push(o.val)}else{var o;if((o=this.parseLiteral(e,t)).err)return o;r.push(o.val)}}else{var s=this.clonePosition();this.bump(),r.push({type:le.pound,location:Fe(s,this.clonePosition())})}}}return{val:r,err:null}},
|
345
|
+
/**
|
346
|
+
* A tag name must start with an ASCII lower/upper case letter. The grammar is based on the
|
347
|
+
* [custom element name][] except that a dash is NOT always mandatory and uppercase letters
|
348
|
+
* are accepted:
|
349
|
+
*
|
350
|
+
* ```
|
351
|
+
* tag ::= "<" tagName (whitespace)* "/>" | "<" tagName (whitespace)* ">" message "</" tagName (whitespace)* ">"
|
352
|
+
* tagName ::= [a-z] (PENChar)*
|
353
|
+
* PENChar ::=
|
354
|
+
* "-" | "." | [0-9] | "_" | [a-z] | [A-Z] | #xB7 | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x37D] |
|
355
|
+
* [#x37F-#x1FFF] | [#x200C-#x200D] | [#x203F-#x2040] | [#x2070-#x218F] | [#x2C00-#x2FEF] |
|
356
|
+
* [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
|
357
|
+
* ```
|
358
|
+
*
|
359
|
+
* [custom element name]: https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name
|
360
|
+
* NOTE: We're a bit more lax here since HTML technically does not allow uppercase HTML element but we do
|
361
|
+
* since other tag-based engines like React allow it
|
362
|
+
*/
|
363
|
+
e.prototype.parseTag=function(e,t){var n=this.clonePosition();this.bump();// `<`
|
364
|
+
var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))
|
365
|
+
// Self closing tag
|
366
|
+
return{val:{type:le.literal,value:"<".concat(r,"/>"),location:Fe(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(e+1,t,!0);if(i.err)return i;var o=i.val,s=this.clonePosition();
|
367
|
+
// Expecting a close tag
|
368
|
+
if(this.bumpIf("</")){if(this.isEOF()||!st(this.char()))return this.error(ae.INVALID_TAG,Fe(s,this.clonePosition()));var a=this.clonePosition();return r!==this.parseTagName()?this.error(ae.UNMATCHED_CLOSING_TAG,Fe(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:le.tag,value:r,children:o,location:Fe(n,this.clonePosition())},err:null}:this.error(ae.INVALID_TAG,Fe(s,this.clonePosition())))}return this.error(ae.UNCLOSED_TAG,Fe(n,this.clonePosition()))}return this.error(ae.INVALID_TAG,Fe(n,this.clonePosition()))},
|
369
|
+
/**
|
370
|
+
* This method assumes that the caller has peeked ahead for the first tag character.
|
371
|
+
*/
|
372
|
+
e.prototype.parseTagName=function(){var e,t=this.offset();// the first tag name character
|
373
|
+
for(this.bump();!this.isEOF()&&(45/* '-' */===(e=this.char())||46/* '.' */===e||e>=48&&e<=57/* 0..9 */||95/* '_' */===e||e>=97&&e<=122/** a..z */||e>=65&&e<=90/* A..Z */||183==e||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);)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(e,t){for(var n=this.clonePosition(),r="";;){var i=this.tryParseQuote(t);if(i)r+=i;else{var o=this.tryParseUnquoted(e,t);if(o)r+=o;else{var s=this.tryParseLeftAngleBracket();if(!s)break;r+=s}}}var a=Fe(n,this.clonePosition());return{val:{type:le.literal,value:r,location:a},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60/* `<` */!==this.char()||!this.ignoreTag&&(st(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e;
|
374
|
+
/** See `parseTag` function docs. */},
|
375
|
+
/**
|
376
|
+
* Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes
|
377
|
+
* a character that requires quoting (that is, "only where needed"), and works the same in
|
378
|
+
* nested messages as on the top level of the pattern. The new behavior is otherwise compatible.
|
379
|
+
*/
|
380
|
+
e.prototype.tryParseQuote=function(e){if(this.isEOF()||39/* `'` */!==this.char())return null;
|
381
|
+
// Parse escaped char following the apostrophe, or early return if there is no escaped char.
|
382
|
+
// Check if is valid escaped character
|
383
|
+
switch(this.peek()){case 39/* `'` */:
|
384
|
+
// double quote, should return as a single quote.
|
385
|
+
return this.bump(),this.bump(),"'";
|
386
|
+
// '{', '<', '>', '}'
|
387
|
+
case 123:case 60:case 62:case 125:break;case 35:// '#'
|
388
|
+
if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();// apostrophe
|
389
|
+
var t=[this.char()];// escaped char
|
390
|
+
// read chars until the optional closing apostrophe is found
|
391
|
+
for(this.bump();!this.isEOF();){var n=this.char();if(39/* `'` */===n){if(39/* `'` */!==this.peek()){
|
392
|
+
// Optional closing apostrophe.
|
393
|
+
this.bump();break}t.push(39),
|
394
|
+
// Bump one more time because we need to skip 2 characters.
|
395
|
+
this.bump()}else t.push(n);this.bump()}return Je.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var n=this.char();return 60/* `<` */===n||123/* `{` */===n||35/* `#` */===n&&("plural"===t||"selectordinal"===t)||125/* `}` */===n&&e>0?null:(this.bump(),Je(n))},e.prototype.parseArgument=function(e,t){var n=this.clonePosition();if(this.bump(),// `{`
|
396
|
+
this.bumpSpace(),this.isEOF())return this.error(ae.EXPECT_ARGUMENT_CLOSING_BRACE,Fe(n,this.clonePosition()));if(125/* `}` */===this.char())return this.bump(),this.error(ae.EMPTY_ARGUMENT,Fe(n,this.clonePosition()));
|
397
|
+
// argument name
|
398
|
+
var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(ae.MALFORMED_ARGUMENT,Fe(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(ae.EXPECT_ARGUMENT_CLOSING_BRACE,Fe(n,this.clonePosition()));switch(this.char()){
|
399
|
+
// Simple argument: `{name}`
|
400
|
+
case 125/* `}` */:// `}`
|
401
|
+
return this.bump(),{val:{type:le.argument,
|
402
|
+
// value does not include the opening and closing braces.
|
403
|
+
value:r,location:Fe(n,this.clonePosition())},err:null};
|
404
|
+
// Argument with options: `{name, format, ...}`
|
405
|
+
case 44/* `,` */:return this.bump(),// `,`
|
406
|
+
this.bumpSpace(),this.isEOF()?this.error(ae.EXPECT_ARGUMENT_CLOSING_BRACE,Fe(n,this.clonePosition())):this.parseArgumentOptions(e,t,r,n);default:return this.error(ae.MALFORMED_ARGUMENT,Fe(n,this.clonePosition()))}},
|
407
|
+
/**
|
408
|
+
* Advance the parser until the end of the identifier, if it is currently on
|
409
|
+
* an identifier character. Return an empty string otherwise.
|
410
|
+
*/
|
411
|
+
e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=Ye(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:Fe(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,n,r){var i,o=this.clonePosition(),s=this.parseIdentifierIfPossible().value,a=this.clonePosition();
|
412
|
+
// Parse this range:
|
413
|
+
// {name, type, style}
|
414
|
+
// ^---^
|
415
|
+
switch(s){case"":
|
416
|
+
// Expecting a style string number, date, time, plural, selectordinal, or select.
|
417
|
+
return this.error(ae.EXPECT_ARGUMENT_TYPE,Fe(o,a));case"number":case"date":case"time":
|
418
|
+
// Parse this range:
|
419
|
+
// {name, number, style}
|
420
|
+
// ^-------^
|
421
|
+
this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition();if((b=this.parseSimpleArgStyleIfPossible()).err)return b;if(0===(f=nt(b.val)).length)return this.error(ae.EXPECT_ARGUMENT_STYLE,Fe(this.clonePosition(),this.clonePosition()));l={style:f,styleLocation:Fe(c,this.clonePosition())}}if((y=this.tryParseArgumentClose(r)).err)return y;var u=Fe(r,this.clonePosition());
|
422
|
+
// Extract style or skeleton
|
423
|
+
if(l&&qe(null==l?void 0:l.style,"::",0)){
|
424
|
+
// Skeleton starts with `::`.
|
425
|
+
var h=tt(l.style.slice(2));if("number"===s)return(b=this.parseNumberSkeletonFromString(h,l.styleLocation)).err?b:{val:{type:le.number,value:n,location:u,style:b.val},err:null};if(0===h.length)return this.error(ae.EXPECT_DATE_TIME_SKELETON,u);var p=h;
|
426
|
+
// Get "best match" pattern only if locale is passed, if not, let it
|
427
|
+
// pass as-is where `parseDateTimeSkeleton()` will throw an error
|
428
|
+
// for unsupported patterns.
|
429
|
+
this.locale&&(p=function(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if("j"===i){for(var o=0;r+1<e.length&&e.charAt(r+1)===i;)o++,r++;var s=1+(1&o),a=o<2?1:3+(o>>1),l=ke(t);for("H"!=l&&"k"!=l||(a=0);a-- >0;)n+="a";for(;s-- >0;)n=l+n}else n+="J"===i?"H":i}return n}(h,this.locale));var f={type:ce.dateTime,pattern:p,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?He(p):{}};return{val:{type:"date"===s?le.date:le.time,value:n,location:u,style:f},err:null}}
|
430
|
+
// Regular style or no style.
|
431
|
+
return{val:{type:"number"===s?le.number:"date"===s?le.date:le.time,value:n,location:u,style:null!==(i=null==l?void 0:l.style)&&void 0!==i?i:null},err:null};case"plural":case"selectordinal":case"select":
|
432
|
+
// Parse this range:
|
433
|
+
// {name, plural, options}
|
434
|
+
// ^---------^
|
435
|
+
var m=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(ae.EXPECT_SELECT_ARGUMENT_OPTIONS,Fe(m,ue({},m)));this.bumpSpace();
|
436
|
+
// Parse offset:
|
437
|
+
// {name, plural, offset:1, options}
|
438
|
+
// ^-----^
|
439
|
+
// or the first option:
|
440
|
+
// {name, plural, one {...} other {...}}
|
441
|
+
// ^--^
|
442
|
+
var d=this.parseIdentifierIfPossible(),g=0;if("select"!==s&&"offset"===d.value){if(!this.bumpIf(":"))return this.error(ae.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Fe(this.clonePosition(),this.clonePosition()));var b;if(this.bumpSpace(),(b=this.tryParseDecimalInteger(ae.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ae.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return b;
|
443
|
+
// Parse another identifier for option parsing
|
444
|
+
this.bumpSpace(),d=this.parseIdentifierIfPossible(),g=b.val}var y,E=this.tryParsePluralOrSelectOptions(e,s,t,d);if(E.err)return E;if((y=this.tryParseArgumentClose(r)).err)return y;var v=Fe(r,this.clonePosition());return"select"===s?{val:{type:le.select,value:n,options:Qe(E.val),location:v},err:null}:{val:{type:le.plural,value:n,options:Qe(E.val),offset:g,pluralType:"plural"===s?"cardinal":"ordinal",location:v},err:null};default:return this.error(ae.INVALID_ARGUMENT_TYPE,Fe(o,a))}},e.prototype.tryParseArgumentClose=function(e){
|
445
|
+
// Parse: {value, number, ::currency/GBP }
|
446
|
+
return this.isEOF()||125/* `}` */!==this.char()?this.error(ae.EXPECT_ARGUMENT_CLOSING_BRACE,Fe(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},
|
447
|
+
/**
|
448
|
+
* See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659
|
449
|
+
*/
|
450
|
+
e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){switch(this.char()){case 39/* `'` */:
|
451
|
+
// Treat apostrophe as quoting but include it in the style part.
|
452
|
+
// Find the end of the quoted literal text.
|
453
|
+
this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(ae.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Fe(n,this.clonePosition()));this.bump();break;case 123/* `{` */:e+=1,this.bump();break;case 125/* `}` */:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var n=[];try{n=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");
|
454
|
+
// Parse the skeleton
|
455
|
+
for(var t=[],n=0,r=e.split(Le).filter((function(e){return e.length>0}));n<r.length;n++){var i=r[n].split("/");if(0===i.length)throw new Error("Invalid number skeleton");for(var o=i[0],s=i.slice(1),a=0,l=s;a<l.length;a++)if(0===l[a].length)throw new Error("Invalid number skeleton");t.push({stem:o,options:s})}return t}(e)}catch(e){return this.error(ae.INVALID_NUMBER_SKELETON,t)}return{val:{type:ce.number,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?Oe(n):{}},err:null}},
|
456
|
+
/**
|
457
|
+
* @param nesting_level The current nesting level of messages.
|
458
|
+
* This can be positive when parsing message fragment in select or plural argument options.
|
459
|
+
* @param parent_arg_type The parent argument's type.
|
460
|
+
* @param parsed_first_identifier If provided, this is the first identifier-like selector of
|
461
|
+
* the argument. It is a by-product of a previous parsing attempt.
|
462
|
+
* @param expecting_close_tag If true, this message is directly or indirectly nested inside
|
463
|
+
* between a pair of opening and closing tags. The nested message will not parse beyond
|
464
|
+
* the closing tag boundary.
|
465
|
+
*/
|
466
|
+
e.prototype.tryParsePluralOrSelectOptions=function(e,t,n,r){
|
467
|
+
// Parse:
|
468
|
+
// one {one apple}
|
469
|
+
// ^--^
|
470
|
+
for(var i,o=!1,s=[],a=new Set,l=r.value,c=r.location;;){if(0===l.length){var u=this.clonePosition();if("select"===t||!this.bumpIf("="))break;
|
471
|
+
// Try parse `={number}` selector
|
472
|
+
var h=this.tryParseDecimalInteger(ae.EXPECT_PLURAL_ARGUMENT_SELECTOR,ae.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;c=Fe(u,this.clonePosition()),l=this.message.slice(u.offset,this.offset())}
|
473
|
+
// Duplicate selector clauses
|
474
|
+
if(a.has(l))return this.error("select"===t?ae.DUPLICATE_SELECT_ARGUMENT_SELECTOR:ae.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);"other"===l&&(o=!0),
|
475
|
+
// Parse:
|
476
|
+
// one {one apple}
|
477
|
+
// ^----------^
|
478
|
+
this.bumpSpace();var p=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?ae.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:ae.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Fe(this.clonePosition(),this.clonePosition()));var f=this.parseMessage(e+1,t,n);if(f.err)return f;var m=this.tryParseArgumentClose(p);if(m.err)return m;s.push([l,{value:f.val,location:Fe(p,this.clonePosition())}]),
|
479
|
+
// Keep track of the existing selectors
|
480
|
+
a.add(l),
|
481
|
+
// Prep next selector clause.
|
482
|
+
this.bumpSpace(),l=(i=this.parseIdentifierIfPossible()).value,c=i.location}return 0===s.length?this.error("select"===t?ae.EXPECT_SELECT_ARGUMENT_SELECTOR:ae.EXPECT_PLURAL_ARGUMENT_SELECTOR,Fe(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(ae.MISSING_OTHER_CLAUSE,Fe(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var n=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var i=!1,o=0;!this.isEOF();){var s=this.char();if(!(s>=48/* `0` */&&s<=57/* `9` */))break;i=!0,o=10*o+(s-48),this.bump()}var a=Fe(r,this.clonePosition());return i?We(o*=n)?{val:o,err:null}:this.error(t,a):this.error(e,a)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){
|
483
|
+
// This is much faster than `Object.assign` or spread.
|
484
|
+
return{offset:this.position.offset,line:this.position.line,column:this.position.column}},
|
485
|
+
/**
|
486
|
+
* Return the code point at the current position of the parser.
|
487
|
+
* Throws if the index is out of bound.
|
488
|
+
*/
|
489
|
+
e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=et(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},
|
490
|
+
/** Bump the parser to the next UTF-16 code unit. */
|
491
|
+
e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10/* '\n' */===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,
|
492
|
+
// 0 ~ 0x10000 -> unicode BMP, otherwise skip the surrogate pair.
|
493
|
+
this.position.offset+=e<65536?1:2)}},
|
494
|
+
/**
|
495
|
+
* If the substring starting at the current position of the parser has
|
496
|
+
* the given prefix, then bump the parser to the character immediately
|
497
|
+
* following the prefix and return true. Otherwise, don't bump the parser
|
498
|
+
* and return false.
|
499
|
+
*/
|
500
|
+
e.prototype.bumpIf=function(e){if(qe(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},
|
501
|
+
/**
|
502
|
+
* Bump the parser until the pattern character is found and return `true`.
|
503
|
+
* Otherwise bump to the end of the file and return `false`.
|
504
|
+
*/
|
505
|
+
e.prototype.bumpUntil=function(e){var t=this.offset(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},
|
506
|
+
/**
|
507
|
+
* Bump the parser to the target offset.
|
508
|
+
* If target offset is beyond the end of the input, bump the parser to the end of the input.
|
509
|
+
*/
|
510
|
+
e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},
|
511
|
+
/** advance the parser through all whitespace to the next non-whitespace code unit. */
|
512
|
+
e.prototype.bumpSpace=function(){for(;!this.isEOF()&&at(this.char());)this.bump()},
|
513
|
+
/**
|
514
|
+
* Peek at the *next* Unicode codepoint in the input without advancing the parser.
|
515
|
+
* If the input has been exhausted, then this returns null.
|
516
|
+
*/
|
517
|
+
e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),n=this.message.charCodeAt(t+(e>=65536?2:1));return null!=n?n:null},e}();
|
518
|
+
/**
|
519
|
+
* This check if codepoint is alphabet (lower & uppercase)
|
520
|
+
* @param codepoint
|
521
|
+
* @returns
|
522
|
+
*/function st(e){return e>=97&&e<=122||e>=65&&e<=90}
|
523
|
+
/**
|
524
|
+
* Code point equivalent of regex `\p{White_Space}`.
|
525
|
+
* From: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
|
526
|
+
*/
|
527
|
+
function at(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}
|
528
|
+
/**
|
529
|
+
* Code point equivalent of regex `\p{Pattern_Syntax}`.
|
530
|
+
* See https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
|
531
|
+
*/function lt(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||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||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||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||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||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||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||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||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||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||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function ct(e){e.forEach((function(e){if(delete e.location,be(e)||ye(e))for(var t in e.options)delete e.options[t].location,ct(e.options[t].value);else me(e)&&Te(e.style)||(de(e)||ge(e))&&Be(e.style)?delete e.style.location:ve(e)&&ct(e.children)}))}function ut(e,t){void 0===t&&(t={}),t=ue({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new ot(e,t).parse();if(n.err){var r=SyntaxError(ae[n.err.kind]);
|
532
|
+
// @ts-expect-error Assign to error object
|
533
|
+
throw r.location=n.err.location,
|
534
|
+
// @ts-expect-error Assign to error object
|
535
|
+
r.originalMessage=n.err.message,r}return(null==t?void 0:t.captureLocation)||ct(n.val),n.val}
|
536
|
+
|
537
|
+
// Main
|
538
|
+
|
539
|
+
function ht(e,t){var n=t&&t.cache?t.cache:Et,r=t&&t.serializer?t.serializer:gt;return(t&&t.strategy?t.strategy:dt)(e,{cache:n,serializer:r})}
|
540
|
+
|
541
|
+
// Strategy
|
542
|
+
|
543
|
+
function pt(e,t,n,r){var i,o=null==(i=r)||"number"==typeof i||"boolean"==typeof i?r:n(r),s=t.get(o);return void 0===s&&(s=e.call(this,r),t.set(o,s)),s}function ft(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=t.get(i);return void 0===o&&(o=e.apply(this,r),t.set(i,o)),o}function mt(e,t,n,r,i){return n.bind(t,e,r,i)}function dt(e,t){return mt(e,this,1===e.length?pt:ft,t.cache.create(),t.serializer)}
|
544
|
+
// Serializer
|
545
|
+
var gt=function(){return JSON.stringify(arguments)};
|
546
|
+
|
547
|
+
// Cache
|
548
|
+
|
549
|
+
function bt(){this.cache=Object.create(null)}bt.prototype.get=function(e){return this.cache[e]},bt.prototype.set=function(e,t){this.cache[e]=t};var yt,Et={create:function(){
|
550
|
+
// @ts-ignore
|
551
|
+
return new bt}},vt={variadic:function(e,t){return mt(e,this,ft,t.cache.create(),t.serializer)},monadic:function(e,t){return mt(e,this,pt,t.cache.create(),t.serializer)}};!function(e){
|
552
|
+
// When we have a placeholder but no value to format
|
553
|
+
e.MISSING_VALUE="MISSING_VALUE",
|
554
|
+
// When value supplied is invalid
|
555
|
+
e.INVALID_VALUE="INVALID_VALUE",
|
556
|
+
// When we need specific Intl API but it's not available
|
557
|
+
e.MISSING_INTL_API="MISSING_INTL_API"}(yt||(yt={}));var Tt,Bt=/** @class */function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.code=n,i.originalMessage=r,i}return se(t,e),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),wt=/** @class */function(e){function t(t,n,r,i){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(n,'". Options are "').concat(Object.keys(r).join('", "'),'"'),yt.INVALID_VALUE,i)||this}return se(t,e),t}(Bt),Ct=/** @class */function(e){function t(t,n,r){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(n),yt.INVALID_VALUE,r)||this}return se(t,e),t}(Bt),Ht=/** @class */function(e){function t(t,n){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(n,'"'),yt.MISSING_VALUE,n)||this}return se(t,e),t}(Bt);function Lt(e){return"function"==typeof e}
|
558
|
+
// TODO(skeleton): add skeleton support
|
559
|
+
function At(e,t,n,r,i,o,
|
560
|
+
// For debugging
|
561
|
+
s){
|
562
|
+
// Hot path for straight simple msg translations
|
563
|
+
if(1===e.length&&pe(e[0]))return[{type:Tt.literal,value:e[0].value}];for(var a=[],l=0,c=e;l<c.length;l++){var u=c[l];
|
564
|
+
// Exit early for string parts.
|
565
|
+
if(pe(u))a.push({type:Tt.literal,value:u.value});else
|
566
|
+
// TODO: should this part be literal type?
|
567
|
+
// Replace `#` in plural rules with the actual numeric value.
|
568
|
+
if(Ee(u))"number"==typeof o&&a.push({type:Tt.literal,value:n.getNumberFormat(t).format(o)});else{var h=u.value;
|
569
|
+
// Enforce that all required values are provided by the caller.
|
570
|
+
if(!i||!(h in i))throw new Ht(h,s);var p=i[h];if(fe(u))p&&"string"!=typeof p&&"number"!=typeof p||(p="string"==typeof p||"number"==typeof p?String(p):""),a.push({type:"string"==typeof p?Tt.literal:Tt.object,value:p});else
|
571
|
+
// Recursively format plural and select parts' option — which can be a
|
572
|
+
// nested pattern structure. The choosing of the option to use is
|
573
|
+
// abstracted-by and delegated-to the part helper object.
|
574
|
+
if(de(u)){var f="string"==typeof u.style?r.date[u.style]:Be(u.style)?u.style.parsedOptions:void 0;a.push({type:Tt.literal,value:n.getDateTimeFormat(t,f).format(p)})}else if(ge(u)){f="string"==typeof u.style?r.time[u.style]:Be(u.style)?u.style.parsedOptions:r.time.medium;a.push({type:Tt.literal,value:n.getDateTimeFormat(t,f).format(p)})}else if(me(u)){(f="string"==typeof u.style?r.number[u.style]:Te(u.style)?u.style.parsedOptions:void 0)&&f.scale&&(p*=f.scale||1),a.push({type:Tt.literal,value:n.getNumberFormat(t,f).format(p)})}else{if(ve(u)){var m=u.children,d=u.value,g=i[d];if(!Lt(g))throw new Ct(d,"function",s);var b=g(At(m,t,n,r,i,o).map((function(e){return e.value})));Array.isArray(b)||(b=[b]),a.push.apply(a,b.map((function(e){return{type:"string"==typeof e?Tt.literal:Tt.object,value:e}})))}if(be(u)){if(!(y=u.options[p]||u.options.other))throw new wt(u.value,p,Object.keys(u.options),s);a.push.apply(a,At(y.value,t,n,r,i))}else if(ye(u)){var y;if(!(y=u.options["=".concat(p)])){if(!Intl.PluralRules)throw new Bt('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',yt.MISSING_INTL_API,s);var E=n.getPluralRules(t,{type:u.pluralType}).select(p-(u.offset||0));y=u.options[E]||u.options.other}if(!y)throw new wt(u.value,p,Object.keys(u.options),s);a.push.apply(a,At(y.value,t,n,r,i,p-(u.offset||0)))}else;}}}return function(e){return e.length<2?e:e.reduce((function(e,t){var n=e[e.length-1];return n&&n.type===Tt.literal&&t.type===Tt.literal?n.value+=t.value:e.push(t),e}),[])}(a)}
|
575
|
+
/*
|
576
|
+
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
|
577
|
+
Copyrights licensed under the New BSD License.
|
578
|
+
See the accompanying LICENSE file for terms.
|
579
|
+
*/
|
580
|
+
// -- MessageFormat --------------------------------------------------------
|
581
|
+
function _t(e,t){return t?Object.keys(e).reduce((function(n,r){var i,o;return n[r]=(i=e[r],(o=t[r])?ue(ue(ue({},i||{}),o||{}),Object.keys(i).reduce((function(e,t){return e[t]=ue(ue({},i[t]),o[t]||{}),e}),{})):i),n}),ue({},e)):e}function Pt(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}!function(e){e[e.literal=0]="literal",e[e.object=1]="object"}(Tt||(Tt={}));var St=/** @class */function(){function e(t,n,r,i){var o,s=this;if(void 0===n&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=s.formatToParts(e);
|
582
|
+
// Hot path for straight simple msg translations
|
583
|
+
if(1===t.length)return t[0].value;var n=t.reduce((function(e,t){return e.length&&t.type===Tt.literal&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e}),[]);return n.length<=1?n[0]||"":n},this.formatToParts=function(e){return At(s.ast,s.locales,s.formatters,s.formats,e,void 0,s.message)},this.resolvedOptions=function(){return{locale:s.resolvedLocale.toString()}},this.getAst=function(){return s.ast},
|
584
|
+
// Defined first because it's used to build the format pattern.
|
585
|
+
this.locales=n,this.resolvedLocale=e.resolveLocale(n),"string"==typeof t){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
|
586
|
+
// Parse string messages into an AST.
|
587
|
+
this.ast=e.__parse(t,{ignoreTag:null==i?void 0:i.ignoreTag,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.");
|
588
|
+
// Creates a new object with the specified `formats` merged with the default
|
589
|
+
// formats.
|
590
|
+
this.formats=_t(e.formats,r),this.formatters=i&&i.formatters||(void 0===(o=this.formatterCache)&&(o={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:ht((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.NumberFormat).bind.apply(e,he([void 0],t,!1)))}),{cache:Pt(o.number),strategy:vt.variadic}),getDateTimeFormat:ht((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.DateTimeFormat).bind.apply(e,he([void 0],t,!1)))}),{cache:Pt(o.dateTime),strategy:vt.variadic}),getPluralRules:ht((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.PluralRules).bind.apply(e,he([void 0],t,!1)))}),{cache:Pt(o.pluralRules),strategy:vt.variadic})})}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(e){var t=Intl.NumberFormat.supportedLocalesOf(e);return t.length>0?new Intl.Locale(t[0]):new Intl.Locale("string"==typeof e?e:e[0])},e.__parse=ut,
|
591
|
+
// Default format options used as the prototype of the `formats` provided to the
|
592
|
+
// constructor. These are used when constructing the internal Intl.NumberFormat
|
593
|
+
// and Intl.DateTimeFormat instances.
|
594
|
+
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}();const xt={},Nt=(e,t,n)=>n?(t in xt||(xt[t]={}),e in xt[t]||(xt[t][e]=n),n):n,Mt=(e,t)=>{if(null==t)return;if(t in xt&&e in xt[t])return xt[t][e];const n=on(t);for(let r=0;r<n.length;r++){const i=$t(n[r],e);if(i)return Nt(e,t,i)}};let Rt;const Ot=W({});function It(e){return e in Rt}function $t(e,t){if(!It(e))return null;const n=function(e){return Rt[e]||null}(e);return function(e,t){if(null==t)return;if(t in e)return e[t];const n=t.split(".");let r=e;for(let e=0;e<n.length;e++)if("object"==typeof r){if(e>0){const t=n.slice(e,n.length).join(".");if(t in r){r=r[t];break}}r=r[n[e]]}else r=void 0;return r}(n,t)}function kt(e,...t){delete xt[e],Ot.update((n=>(n[e]=ie.all([n[e]||{},...t]),n)))}Z([Ot],(([e])=>Object.keys(e))),Ot.subscribe((e=>Rt=e));const Dt={};function Ut(e){return Dt[e]}function Ft(e){return null!=e&&on(e).some((e=>{var t;return null==(t=Ut(e))?void 0:t.size}))}function Gt(e,t){const n=Promise.all(t.map((t=>(function(e,t){Dt[e].delete(t),0===Dt[e].size&&delete Dt[e]}(e,t),t().then((e=>e.default||e))))));return n.then((t=>kt(e,...t)))}const jt={};function Vt(e){if(!Ft(e))return e in jt?jt[e]:Promise.resolve();const t=function(e){return on(e).map((e=>{const t=Ut(e);return[e,t?[...t]:[]]})).filter((([,e])=>e.length>0))}(e);return jt[e]=Promise.all(t.map((([e,t])=>Gt(e,t)))).then((()=>{if(Ft(e))return Vt(e);delete jt[e]})),jt[e]}const Xt={fallbackLocale:null,loadingDelay:200,formats:{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"}}},warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function zt(){return Xt}const Kt=W(!1);var Wt=Object.defineProperty,Zt=Object.defineProperties,Yt=Object.getOwnPropertyDescriptors,qt=Object.getOwnPropertySymbols,Jt=Object.prototype.hasOwnProperty,Qt=Object.prototype.propertyIsEnumerable,en=(e,t,n)=>t in e?Wt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;let tn;const nn=W(null);function rn(e){return e.split("-").map(((e,t,n)=>n.slice(0,t+1).join("-"))).reverse()}function on(e,t=zt().fallbackLocale){const n=rn(e);return t?[...new Set([...n,...rn(t)])]:n}function sn(){return null!=tn?tn:void 0}nn.subscribe((e=>{tn=null!=e?e:void 0,"undefined"!=typeof window&&null!=e&&document.documentElement.setAttribute("lang",e)}));const an=(ln=((e,t)=>{for(var n in t||(t={}))Jt.call(t,n)&&en(e,n,t[n]);if(qt)for(var n of qt(t))Qt.call(t,n)&&en(e,n,t[n]);return e})({},nn),Zt(ln,Yt({set:e=>{if(e&&function(e){if(null==e)return;const t=on(e);for(let e=0;e<t.length;e++){const n=t[e];if(It(n))return n}}(e)&&Ft(e)){const{loadingDelay:t}=zt();let n;return"undefined"!=typeof window&&null!=sn()&&t?n=window.setTimeout((()=>Kt.set(!0)),t):Kt.set(!0),Vt(e).then((()=>{nn.set(e)})).finally((()=>{clearTimeout(n),Kt.set(!1)}))}return nn.set(e)}})));var ln;const cn=e=>{const t=Object.create(null);return n=>{const r=JSON.stringify(n);return r in t?t[r]:t[r]=e(n)}};var un=Object.defineProperty,hn=Object.getOwnPropertySymbols,pn=Object.prototype.hasOwnProperty,fn=Object.prototype.propertyIsEnumerable,mn=(e,t,n)=>t in e?un(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dn=(e,t)=>{for(var n in t||(t={}))pn.call(t,n)&&mn(e,n,t[n]);if(hn)for(var n of hn(t))fn.call(t,n)&&mn(e,n,t[n]);return e},gn=(e,t)=>{var n={};for(var r in e)pn.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&hn)for(var r of hn(e))t.indexOf(r)<0&&fn.call(e,r)&&(n[r]=e[r]);return n};const bn=(e,t)=>{const{formats:n}=zt();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},yn=cn((e=>{var t=e,{locale:n,format:r}=t,i=gn(t,["locale","format"]);if(null==n)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return r&&(i=bn("number",r)),new Intl.NumberFormat(n,i)})),En=cn((e=>{var t=e,{locale:n,format:r}=t,i=gn(t,["locale","format"]);if(null==n)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return r?i=bn("date",r):0===Object.keys(i).length&&(i=bn("date","short")),new Intl.DateTimeFormat(n,i)})),vn=cn((e=>{var t=e,{locale:n,format:r}=t,i=gn(t,["locale","format"]);if(null==n)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return r?i=bn("time",r):0===Object.keys(i).length&&(i=bn("time","short")),new Intl.DateTimeFormat(n,i)})),Tn=cn((
|
595
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
596
|
+
(e,t=sn())=>new St(e,t,zt().formats,{ignoreTag:zt().ignoreTag}))),Bn=(e,t={})=>{var n,r,i,o;let s=t;"object"==typeof e&&(s=e,e=s.id);const{values:a,locale:l=sn(),default:c}=s;if(null==l)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let u=Mt(e,l);if(u){if("string"!=typeof u)return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof u}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),u}else u=null!=(o=null!=(i=null==(r=(n=zt()).handleMissingMessage)?void 0:r.call(n,{locale:l,id:e,defaultValue:c}))?i:c)?o:e;if(!a)return u;let h=u;try{h=Tn(u,l).format(a)}catch(t){t instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,t.message)}return h},wn=(e,t)=>((e={})=>{var t=e,{locale:n=sn()}=t,r=gn(t,["locale"]);return vn(dn({locale:n},r))})(t).format(e),Cn=(e,t)=>((e={})=>{var t=e,{locale:n=sn()}=t,r=gn(t,["locale"]);return En(dn({locale:n},r))})(t).format(e),Hn=(e,t)=>((e={})=>{var t=e,{locale:n=sn()}=t,r=gn(t,["locale"]);return yn(dn({locale:n},r))})(t).format(e),Ln=(e,t=sn())=>Mt(e,t),An=Z([an,Ot],(()=>Bn));function _n(e,t){kt(e,t)}Z([an],(()=>wn)),Z([an],(()=>Cn)),Z([an],(()=>Hn)),Z([an,Ot],(()=>Ln));const Pn={en:{loading:"Loading...",amountLabel:"Amount",makeDepositButton:"Deposit",confirmDepositText:"Are you sure you want to deposit",confirmDepositButton:"Ok",redirectTitle:"You are redirected to the payment's provider page",redirectMessage:"Please complete your transaction on the payment's provider page.",backToPayment:"Close",retryText:"Please note that your popup blocker may prevent the payment window from appearing",retryButton:"RETRY",processingButton:"Processing...",generalMin:"Min",generalMax:"Max",amountPlaceholder:"0.00"}};function Sn(e,t){kt(e,t)}const xn={en:{backButton:"Back"}};
|
597
|
+
/* ../cashier-iframe-redirect/src/CashierIframeRedirect.svelte generated by Svelte v3.59.2 */function Nn(t){let n,r,i,o,s,a,c,u,m,E,B,w,H=/*$_*/t[1]("backButton")+"";return{c(){n=d("div"),r=d("div"),i=g("svg"),o=g("path"),s=y(),a=d("span"),c=b(H),u=y(),m=d("iframe"),this.c=e,T(o,"fill-rule","evenodd"),T(o,"clip-rule","evenodd"),T(o,"d","M12.5632 3.47776C12.4787 3.50132 12.3362 3.57499 12.2465 3.64147C12.1567 3.708 10.8069 5.0421 9.24694 6.6062C6.11944 9.74186 6.25999 9.58198 6.25999 10.0036C6.25999 10.4243 6.13093 10.2783 9.34296 13.4902C12.4449 16.5921 12.356 16.5115 12.7278 16.5555C13.1855 16.6098 13.6413 16.2584 13.7301 15.783C13.7612 15.6163 13.7212 15.3394 13.6437 15.1846C13.6158 15.1289 12.451 13.9396 11.0553 12.5417L8.51768 9.99999L11.0553 7.45831C12.451 6.06042 13.6158 4.87108 13.6437 4.81538C13.7729 4.55745 13.7703 4.20054 13.6374 3.94268C13.4469 3.57304 12.9668 3.36526 12.5632 3.47776Z"),T(o,"fill","#111111"),T(i,"xmlns","http://www.w3.org/2000/svg"),T(i,"width","20"),T(i,"height","20"),T(i,"viewBox","0 0 20 20"),T(i,"fill","none"),T(r,"class","BackButton"),l(m.src,E=/*iframeurl*/t[0])||T(m,"src",E),T(m,"frameborder","0"),T(n,"class","CashierRedirectIframe")},m(e,l){p(e,n,l),h(n,r),h(r,i),h(i,o),h(r,s),h(r,a),h(a,c),h(n,u),h(n,m),B||(w=v(r,"click",/*close*/t[2]),B=!0)},p(e,[t]){/*$_*/2&t&&H!==(H=/*$_*/e[1]("backButton")+"")&&C(c,H),/*iframeurl*/1&t&&!l(m.src,E=/*iframeurl*/e[0])&&T(m,"src",E)},i:e,o:e,d(e){e&&f(n),B=!1,w()}}}function Mn(e,t,n){let r;u(e,An,(e=>n(1,r=e)));let{lang:i="en"}=t,{iframeurl:o}=t,{translationurl:s=""}=t;S();Object.keys(xn).forEach((e=>{Sn(e,xn[e])}));const a=()=>{var e;e=i,an.set(e)};return e.$$set=e=>{"lang"in e&&n(3,i=e.lang),"iframeurl"in e&&n(0,o=e.iframeurl),"translationurl"in e&&n(4,s=e.translationurl)},e.$$.update=()=>{/*lang*/8&e.$$.dirty&&i&&a(),/*translationurl*/16&e.$$.dirty&&s&&(()=>{if(s)fetch(s).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{Sn(t,e[t])}))})).catch((e=>{console.log(e)}))})()},[o,r,()=>{dispatchEvent(new CustomEvent("closeIframe",{bubbles:!0,cancelable:!0,composed:!0}))},i,s]}
|
598
|
+
/* ../cashier-confirm-modal/src/CashierConfirmModal.svelte generated by Svelte v3.59.2 */
|
599
|
+
function Rn(t){let n,i,o,s,a,l,c,u,m,g,b,E;return{c(){n=d("div"),i=d("div"),o=d("div"),s=d("slot"),a=y(),l=d("slot"),c=y(),u=d("span"),u.innerHTML='<slot name="confirm"></slot>',m=y(),g=d("span"),g.innerHTML='<slot name="close"><svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></slot>',this.c=e,T(s,"name","title"),T(s,"class","CashierModalTitle"),T(l,"name","text"),T(l,"class","CashierModalText"),T(u,"class","ModalOkBtn"),T(u,"role","button"),T(g,"class","ModalCloseBtn"),T(g,"role","button"),T(o,"class","CashierModalContainer"),T(o,"part","CashierModalContainer"),T(i,"class","CashierModalWindow"),T(i,"part","CashierModalWindow"),T(i,"id","Modal"),T(n,"part","CustomStylingContainer")},m(e,r){p(e,n,r),h(n,i),h(i,o),h(o,s),h(o,a),h(o,l),h(o,c),h(o,u),h(o,m),h(o,g),b||(E=[v(u,"click",/*confirm*/t[1]),v(g,"click",/*close*/t[0])],b=!0)},p:e,i:e,o:e,d(e){e&&f(n),b=!1,r(E)}}}function On(e){const t=()=>{dispatchEvent(new CustomEvent("closeModal",{bubbles:!0,cancelable:!0,composed:!0}))};return[t,()=>{dispatchEvent(new CustomEvent("confirmModal",{bubbles:!0,cancelable:!0,composed:!0})),t()}]}!customElements.get("cashier-iframe-redirect")&&customElements.define("cashier-iframe-redirect",class extends z{constructor(e){super();const t=document.createElement("style");t.textContent=".CashierRedirectIframe{height:inherit;width:inherit}iframe{height:100%;width:100%;background:rgba(0, 0, 0, 0.1)}.BackButton{position:absolute;display:flex;align-items:center;padding:8px 8px 8px 4px;margin:8px;border-radius:2px;background:rgba(0, 0, 0, 0.1);justify-content:center;cursor:pointer}",this.shadowRoot.appendChild(t),X(this,{target:this.shadowRoot,props:A(this.attributes),customElement:!0},Mn,Nn,o,{lang:3,iframeurl:0,translationurl:4},null),e&&(e.target&&p(e.target,this,e.anchor),e.props&&(this.$set(e.props),U()))}static get observedAttributes(){return["lang","iframeurl","translationurl"]}get lang(){return this.$$.ctx[3]}set lang(e){this.$$set({lang:e}),U()}get iframeurl(){return this.$$.ctx[0]}set iframeurl(e){this.$$set({iframeurl:e}),U()}get translationurl(){return this.$$.ctx[4]}set translationurl(e){this.$$set({translationurl:e}),U()}});
|
600
|
+
/* ../cashier-notifications/src/CashierNotifications.svelte generated by Svelte v3.59.2 */
|
601
|
+
function In(t){let n,r,i,o,s,a,l,c;return{c(){n=d("div"),r=d("span"),i=b(/*text*/t[0]),o=y(),s=d("button"),a=b(/*button*/t[1]),this.c=e,T(n,"class","cashier-notifications")},m(e,u){p(e,n,u),h(n,r),h(r,i),h(n,o),h(n,s),h(s,a),l||(c=v(s,"click",/*notificationClick*/t[2]),l=!0)},p(e,[t]){/*text*/1&t&&C(i,/*text*/e[0]),/*button*/2&t&&C(a,/*button*/e[1])},i:e,o:e,d(e){e&&f(n),l=!1,c()}}}function $n(e,t,n){let{text:r}=t,{button:i}=t;return e.$$set=e=>{"text"in e&&n(0,r=e.text),"button"in e&&n(1,i=e.button)},[r,i,()=>{dispatchEvent(new CustomEvent("notificationButtonClick",{bubbles:!0,cancelable:!0,composed:!0}))}]}!customElements.get("cashier-confirm-modal")&&customElements.define("cashier-confirm-modal",class extends z{constructor(e){super();const t=document.createElement("style");t.textContent="*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}.CashierModalWindow{display:flex;position:absolute;align-items:center;justify-content:center;width:100%;height:100%;z-index:100;top:0;left:0;background-color:rgba(0, 0, 0, 0.1)}.CashierModalWindow .CashierModalContainer{width:500px;display:flex;gap:20px;align-items:center;position:relative;padding:15px;min-height:200px;box-shadow:0 2px 6px 0 rgba(0, 0, 0, 0.1);justify-content:center;border-radius:10px;flex-direction:column;background-color:#fff}.CashierModalWindow .ModalOkBtn{color:#FFF;display:flex;align-items:center;justify-content:center;font-size:14px;font-style:normal;font-weight:400;height:46px;border-radius:50px;line-height:normal;border:none;background-color:rgb(126, 197, 30);width:100%;margin:12px 0;cursor:pointer}.CashierModalWindow .ModalCloseBtn{position:absolute;display:flex;align-items:center;justify-content:center;top:-50px;right:-50px;padding:6px;border-radius:50%;color:#FFFFFF;background:rgba(84, 77, 77, 0.1);cursor:pointer;transition:all 150ms ease-in-out}.CashierModalWindow .ModalCloseBtn svg{width:32px;height:32px}.CashierModalWindow .ModalCloseBtn:hover{background:rgba(255, 255, 255, 0.2)}",this.shadowRoot.appendChild(t),X(this,{target:this.shadowRoot,props:A(this.attributes),customElement:!0},On,Rn,o,{},null),e&&e.target&&p(e.target,this,e.anchor)}});
|
602
|
+
/* src/CashierMethodDetails.svelte generated by Svelte v3.59.2 */
|
603
|
+
function kn(e,t,n){const r=e.slice();return r[54]=t[n],r[55]=t,r[56]=n,r}function Dn(e,t,n){const r=e.slice();return r[57]=t[n],r}
|
604
|
+
// (227:2) {#if isTranslationLoaded && selectedPaymentMethod.Name}
|
605
|
+
function Un(e){let t,n,r,i,o,s,a,c,u,g,E,B,w,H,L,A,_,P,S=/*selectedPaymentMethod*/e[6].Label+"",x=!/*selectedPaymentMethod*/e[6].HideAmountField&&Fn(e),N=/*fields*/e[7],M=[];for(let t=0;t<N.length;t+=1)M[t]=tr(kn(e,N,t));function R(e,t){/*isProcessingTxn*/
|
606
|
+
return e[14]?nr:rr}let O=R(e),I=O(e),$=/*showRetryNotification*/e[13]&&ir(e),k=/*showRedirectNotification*/e[11]&&or(e);return{c(){t=d("div"),n=d("form"),r=d("div"),i=d("div"),o=d("div"),s=d("img"),u=y(),g=d("div"),E=b(S),B=y(),x&&x.c(),w=y();for(let e=0;e<M.length;e+=1)M[e].c();H=y(),I.c(),L=y(),$&&$.c(),A=y(),k&&k.c(),l(s.src,a=/*selectedPaymentMethod*/e[6].Logos[0].LogoUrl)||T(s,"src",a),T(s,"alt",c=/*selectedPaymentMethod*/e[6].Label),T(o,"class","SelectedLogoWrapper"),T(g,"class","SelectedLogoDescription"),T(i,"class","form-logo"),T(r,"class","FieldWrapper"),T(t,"class","MethodsDetails")},m(a,l){p(a,t,l),h(t,n),h(n,r),h(r,i),h(i,o),h(o,s),h(i,u),h(i,g),h(g,E),h(r,B),x&&x.m(r,null),h(n,w);for(let e=0;e<M.length;e+=1)M[e]&&M[e].m(n,null);var c;h(n,H),I.m(n,null),h(n,L),$&&$.m(n,null),h(t,A),k&&k.m(t,null),_||(P=v(n,"submit",(c=/*prepareTxn*/e[19],function(e){
|
607
|
+
// @ts-ignore
|
608
|
+
return e.preventDefault(),c.call(this,e)})),_=!0)},p(e,i){if(/*selectedPaymentMethod*/64&i[0]&&!l(s.src,a=/*selectedPaymentMethod*/e[6].Logos[0].LogoUrl)&&T(s,"src",a),/*selectedPaymentMethod*/64&i[0]&&c!==(c=/*selectedPaymentMethod*/e[6].Label)&&T(s,"alt",c),/*selectedPaymentMethod*/64&i[0]&&S!==(S=/*selectedPaymentMethod*/e[6].Label+"")&&C(E,S),/*selectedPaymentMethod*/e[6].HideAmountField?x&&(x.d(1),x=null):x?x.p(e,i):(x=Fn(e),x.c(),x.m(r,null)),/*fields, FieldTypes, prepareFields, openedLookup, showLookup, showField*/1376641&i[0]){let t;for(N=/*fields*/e[7],t=0;t<N.length;t+=1){const r=kn(e,N,t);M[t]?M[t].p(r,i):(M[t]=tr(r),M[t].c(),M[t].m(n,H))}for(;t<M.length;t+=1)M[t].d(1);M.length=N.length}O===(O=R(e))&&I?I.p(e,i):(I.d(1),I=O(e),I&&(I.c(),I.m(n,L))),/*showRetryNotification*/e[13]?$?$.p(e,i):($=ir(e),$.c(),$.m(n,null)):$&&($.d(1),$=null),/*showRedirectNotification*/e[11]?k?k.p(e,i):(k=or(e),k.c(),k.m(t,null)):k&&(k.d(1),k=null)},d(e){e&&f(t),x&&x.d(),m(M,e),I.d(),$&&$.d(),k&&k.d(),_=!1,P()}}}
|
609
|
+
// (239:10) {#if !selectedPaymentMethod.HideAmountField}
|
610
|
+
function Fn(e){let t,n,r,i,o,s=/*$_*/e[17]("amountLabel")+"";function a(e,t){/*selectedPaymentMethod*/
|
611
|
+
return e[6].IsAmountConfigurable?jn:Gn}let l=a(e),c=l(e);return{c(){t=d("div"),n=d("label"),r=d("span"),i=b(s),o=y(),c.c(),T(r,"class","Required"),T(t,"class","Amount")},m(e,s){p(e,t,s),h(t,n),h(n,r),h(r,i),h(n,o),c.m(n,null)},p(e,t){/*$_*/131072&t[0]&&s!==(s=/*$_*/e[17]("amountLabel")+"")&&C(i,s),l===(l=a(e))&&c?c.p(e,t):(c.d(1),c=l(e),c&&(c.c(),c.m(n,null)))},d(e){e&&f(t),c.d()}}}
|
612
|
+
// (253:14) {:else}
|
613
|
+
function Gn(e){let t,n,r,i;return{c(){t=d("span"),n=b(/*amount*/e[1]),r=y(),i=b(/*currency*/e[5]),T(t,"class","NonConfigurableAmount")},m(e,o){p(e,t,o),h(t,n),h(t,r),h(t,i)},p(e,t){/*amount*/2&t[0]&&C(n,/*amount*/e[1]),/*currency*/32&t[0]&&C(i,/*currency*/e[5])},d(e){e&&f(t)}}}
|
614
|
+
// (245:14) {#if selectedPaymentMethod.IsAmountConfigurable}
|
615
|
+
function jn(e){let t,n,r,i,o,s,a=/*selectedPaymentMethod*/e[6].DisplayCurrency&&Vn(e);return{c(){t=d("input"),r=y(),a&&a.c(),i=E(),T(t,"type","number"),T(t,"placeholder",n=/*$_*/e[17]("amountPlaceholder"))},m(n,l){p(n,t,l),H(t,/*amount*/e[1]),p(n,r,l),a&&a.m(n,l),p(n,i,l),o||(s=v(t,"input",/*input_input_handler*/e[27]),o=!0)},p(e,r){/*$_*/131072&r[0]&&n!==(n=/*$_*/e[17]("amountPlaceholder"))&&T(t,"placeholder",n),/*amount*/2&r[0]&&w(t.value)!==/*amount*/e[1]&&H(t,/*amount*/e[1]),/*selectedPaymentMethod*/e[6].DisplayCurrency?a?a.p(e,r):(a=Vn(e),a.c(),a.m(i.parentNode,i)):a&&(a.d(1),a=null)},d(e){e&&f(t),e&&f(r),a&&a.d(e),e&&f(i),o=!1,s()}}}
|
616
|
+
// (247:16) {#if selectedPaymentMethod.DisplayCurrency}
|
617
|
+
function Vn(e){let t,n,r,i,o=/*selectedPaymentMethod*/e[6].DisplayCurrency.MinAmountLimit?`${/*$_*/e[17]("generalMin")} ${/*selectedPaymentMethod*/e[6].DisplayCurrency.MinAmountLimit} ${/*currency*/e[5]}`:"",s=/*selectedPaymentMethod*/e[6].DisplayCurrency.MaxAmountLimit?`/ ${/*$_*/e[17]("generalMax")} ${/*selectedPaymentMethod*/e[6].DisplayCurrency.MaxAmountLimit} ${/*currency*/e[5]}`:"";return{c(){t=d("span"),n=b(o),r=y(),i=b(s),T(t,"class","AmountLimits")},m(e,o){p(e,t,o),h(t,n),h(t,r),h(t,i)},p(e,t){/*selectedPaymentMethod, $_, currency*/131168&t[0]&&o!==(o=/*selectedPaymentMethod*/e[6].DisplayCurrency.MinAmountLimit?`${/*$_*/e[17]("generalMin")} ${/*selectedPaymentMethod*/e[6].DisplayCurrency.MinAmountLimit} ${/*currency*/e[5]}`:"")&&C(n,o),/*selectedPaymentMethod, $_, currency*/131168&t[0]&&s!==(s=/*selectedPaymentMethod*/e[6].DisplayCurrency.MaxAmountLimit?`/ ${/*$_*/e[17]("generalMax")} ${/*selectedPaymentMethod*/e[6].DisplayCurrency.MaxAmountLimit} ${/*currency*/e[5]}`:"")&&C(i,s)},d(e){e&&f(t)}}}
|
618
|
+
// (263:12) {#if showField(field)}
|
619
|
+
function Xn(e){let t,n,r,i,o,s,a=/*field*/e[54].Label+"",l=/*field*/e[54].Description&&/*field*/e[54].Description!==/*field*/e[54].Label&&zn(e);function c(e,t){/*field*/
|
620
|
+
return e[54].Type===/*FieldTypes*/e[0].Text?Qn:/*field*/e[54].Type===/*FieldTypes*/e[0].Number||/*field*/e[54].Type===/*FieldTypes*/e[0].Money?Jn:/*field*/e[54].Type===/*FieldTypes*/e[0].Password?qn:/*field*/e[54].Type===/*FieldTypes*/e[0].Hidden?Yn:/*field*/e[54].Type===/*FieldTypes*/e[0].Lookup?Zn:/*field*/e[54].Type===/*FieldTypes*/e[0].Boolean?Wn:Kn}let u=c(e),m=u(e);return{c(){t=d("div"),n=d("label"),r=d("span"),i=b(a),o=y(),l&&l.c(),s=y(),m.c(),L(r,"Required",/*field*/e[54].IsRequired),T(t,"class","FieldWrapper"),L(t,"Hidden",/*field*/e[54].Type===/*FieldTypes*/e[0].Hidden)},m(e,a){p(e,t,a),h(t,n),h(n,r),h(r,i),h(n,o),l&&l.m(n,null),h(n,s),m.m(n,null)},p(e,o){/*fields*/128&o[0]&&a!==(a=/*field*/e[54].Label+"")&&C(i,a),/*fields*/128&o[0]&&L(r,"Required",/*field*/e[54].IsRequired),/*field*/e[54].Description&&/*field*/e[54].Description!==/*field*/e[54].Label?l?l.p(e,o):(l=zn(e),l.c(),l.m(n,s)):l&&(l.d(1),l=null),u===(u=c(e))&&m?m.p(e,o):(m.d(1),m=u(e),m&&(m.c(),m.m(n,null))),/*fields, FieldTypes*/129&o[0]&&L(t,"Hidden",/*field*/e[54].Type===/*FieldTypes*/e[0].Hidden)},d(e){e&&f(t),l&&l.d(),m.d()}}}
|
621
|
+
// (267:16) {#if field.Description && field.Description !== field.Label}
|
622
|
+
function zn(e){let t,n,r=/*field*/e[54].Description+"";return{c(){t=d("span"),n=b(r),T(t,"class","Description")},m(e,r){p(e,t,r),h(t,n)},p(e,t){/*fields*/128&t[0]&&r!==(r=/*field*/e[54].Description+"")&&C(n,r)},d(e){e&&f(t)}}}
|
623
|
+
// (295:16) {:else}
|
624
|
+
function Kn(e){let t,n,r,i;function o(){
|
625
|
+
/*input_input_handler_5*/e[35].call(t,/*field*/e[54])}return{c(){t=d("input"),T(t,"type","text"),T(t,"placeholder",n=/*field*/e[54].Placeholder)},m(n,s){p(n,t,s),H(t,/*prepareFields*/e[8][/*field*/e[54].Name]),r||(i=v(t,"input",o),r=!0)},p(r,i){e=r,/*fields*/128&i[0]&&n!==(n=/*field*/e[54].Placeholder)&&T(t,"placeholder",n),/*prepareFields, fields*/384&i[0]&&t.value!==/*prepareFields*/e[8][/*field*/e[54].Name]&&H(t,/*prepareFields*/e[8][/*field*/e[54].Name])},d(e){e&&f(t),r=!1,i()}}}
|
626
|
+
// (293:60)
|
627
|
+
function Wn(e){let t,n,r,i;function o(){
|
628
|
+
/*input_change_handler*/e[34].call(t,/*field*/e[54])}return{c(){t=d("input"),T(t,"type","checkbox"),T(t,"placeholder",n=/*field*/e[54].Placeholder)},m(n,s){p(n,t,s),H(t,/*prepareFields*/e[8][/*field*/e[54].Name]),r||(i=v(t,"change",o),r=!0)},p(r,i){e=r,/*fields*/128&i[0]&&n!==(n=/*field*/e[54].Placeholder)&&T(t,"placeholder",n),/*prepareFields, fields*/384&i[0]&&H(t,/*prepareFields*/e[8][/*field*/e[54].Name])},d(e){e&&f(t),r=!1,i()}}}
|
629
|
+
// (282:59)
|
630
|
+
function Zn(e){let t,n,r,i,o,s,a,l=/*prepareFields*/(e[8][/*field*/e[54].Name]||"")+"";function c(...t){/*click_handler*/
|
631
|
+
return e[32](/*index*/e[56],...t)}let u=/*field*/e[54].Values,g=[];for(let t=0;t<u.length;t+=1)g[t]=er(Dn(e,u,t));return{c(){t=d("div"),n=d("div"),r=b(l),i=y(),o=d("div");for(let e=0;e<g.length;e+=1)g[e].c();T(n,"class","Selected"),T(n,"id",/*index*/e[56]),T(o,"class","OptionList"),L(o,"Opened",/*openedLookup*/e[16]===/*index*/e[56]),T(t,"class","CustomSelect")},m(e,l){p(e,t,l),h(t,n),h(n,r),h(t,i),h(t,o);for(let e=0;e<g.length;e+=1)g[e]&&g[e].m(o,null);s||(a=v(n,"click",c),s=!0)},p(t,n){if(e=t,/*prepareFields, fields*/384&n[0]&&l!==(l=/*prepareFields*/(e[8][/*field*/e[54].Name]||"")+"")&&C(r,l),/*prepareFields, fields*/384&n[0]){let t;for(u=/*field*/e[54].Values,t=0;t<u.length;t+=1){const r=Dn(e,u,t);g[t]?g[t].p(r,n):(g[t]=er(r),g[t].c(),g[t].m(o,null))}for(;t<g.length;t+=1)g[t].d(1);g.length=u.length}/*openedLookup*/65536&n[0]&&L(o,"Opened",/*openedLookup*/e[16]===/*index*/e[56])},d(e){e&&f(t),m(g,e),s=!1,a()}}}
|
632
|
+
// (279:59)
|
633
|
+
function Yn(e){let t,n,r,i;function o(){
|
634
|
+
/*input_input_handler_4*/e[31].call(t,/*field*/e[54])}return{c(){t=d("input"),T(t,"type","hidden"),T(t,"placeholder",n=/*field*/e[54].Placeholder)},m(n,s){p(n,t,s),H(t,/*prepareFields*/e[8][/*field*/e[54].Name]),r||(i=v(t,"input",o),r=!0)},p(r,i){e=r,/*fields*/128&i[0]&&n!==(n=/*field*/e[54].Placeholder)&&T(t,"placeholder",n),/*prepareFields, fields*/384&i[0]&&H(t,/*prepareFields*/e[8][/*field*/e[54].Name])},d(e){e&&f(t),r=!1,i()}}}
|
635
|
+
// (276:61)
|
636
|
+
function qn(e){let t,n,r,i;function o(){
|
637
|
+
/*input_input_handler_3*/e[30].call(t,/*field*/e[54])}return{c(){t=d("input"),T(t,"type","password"),T(t,"placeholder",n=/*field*/e[54].Placeholder)},m(n,s){p(n,t,s),H(t,/*prepareFields*/e[8][/*field*/e[54].Name]),r||(i=v(t,"input",o),r=!0)},p(r,i){e=r,/*fields*/128&i[0]&&n!==(n=/*field*/e[54].Placeholder)&&T(t,"placeholder",n),/*prepareFields, fields*/384&i[0]&&t.value!==/*prepareFields*/e[8][/*field*/e[54].Name]&&H(t,/*prepareFields*/e[8][/*field*/e[54].Name])},d(e){e&&f(t),r=!1,i()}}}
|
638
|
+
// (273:94)
|
639
|
+
function Jn(e){let t,n,r,i;function o(){
|
640
|
+
/*input_input_handler_2*/e[29].call(t,/*field*/e[54])}return{c(){t=d("input"),T(t,"type","number"),T(t,"placeholder",n=/*field*/e[54].Placeholder)},m(n,s){p(n,t,s),H(t,/*prepareFields*/e[8][/*field*/e[54].Name]),r||(i=v(t,"input",o),r=!0)},p(r,i){e=r,/*fields*/128&i[0]&&n!==(n=/*field*/e[54].Placeholder)&&T(t,"placeholder",n),/*prepareFields, fields*/384&i[0]&&w(t.value)!==/*prepareFields*/e[8][/*field*/e[54].Name]&&H(t,/*prepareFields*/e[8][/*field*/e[54].Name])},d(e){e&&f(t),r=!1,i()}}}
|
641
|
+
// (270:16) {#if field.Type === FieldTypes.Text}
|
642
|
+
function Qn(e){let t,n,r,i;function o(){
|
643
|
+
/*input_input_handler_1*/e[28].call(t,/*field*/e[54])}return{c(){t=d("input"),T(t,"type","text"),T(t,"placeholder",n=/*field*/e[54].Placeholder)},m(n,s){p(n,t,s),H(t,/*prepareFields*/e[8][/*field*/e[54].Name]),r||(i=v(t,"input",o),r=!0)},p(r,i){e=r,/*fields*/128&i[0]&&n!==(n=/*field*/e[54].Placeholder)&&T(t,"placeholder",n),/*prepareFields, fields*/384&i[0]&&t.value!==/*prepareFields*/e[8][/*field*/e[54].Name]&&H(t,/*prepareFields*/e[8][/*field*/e[54].Name])},d(e){e&&f(t),r=!1,i()}}}
|
644
|
+
// (286:22) {#each field.Values as value}
|
645
|
+
function er(e){let t,n,r,i,o,s=/*value*/e[57].Value+"";function a(){/*click_handler_1*/
|
646
|
+
return e[33](/*field*/e[54],/*value*/e[57])}return{c(){t=d("div"),n=d("span"),r=b(s)},m(e,s){p(e,t,s),h(t,n),h(n,r),i||(o=v(t,"click",a),i=!0)},p(t,n){e=t,/*fields*/128&n[0]&&s!==(s=/*value*/e[57].Value+"")&&C(r,s)},d(e){e&&f(t),i=!1,o()}}}
|
647
|
+
// (262:10) {#each fields as field, index}
|
648
|
+
function tr(e){let t,n=/*showField*/e[20](/*field*/e[54]),r=n&&Xn(e);return{c(){r&&r.c(),t=E()},m(e,n){r&&r.m(e,n),p(e,t,n)},p(e,i){/*fields*/128&i[0]&&(n=/*showField*/e[20](/*field*/e[54])),n?r?r.p(e,i):(r=Xn(e),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null)},d(e){r&&r.d(e),e&&f(t)}}}
|
649
|
+
// (310:8) {:else}
|
650
|
+
function nr(e){let t,n,r,i,o,s=/*$_*/e[17]("processingButton")+"";return{c(){t=d("button"),n=g("svg"),r=g("path"),i=y(),o=b(s),T(r,"d","M14.0282 6.58425C13.9037 4.05374 12.3688 1.68916 10.0872 0.61058C7.59818 -0.509483 4.56986 -0.0531603 2.49567 1.68916C0.504443 3.34851 -0.408201 6.04496 0.172573 8.57547C0.711862 11.0645 2.6616 13.0972 5.10915 13.7609C8.0545 14.5906 10.7509 13.1802 12.4103 10.7741C10.9169 12.7653 8.63527 14.0928 6.10476 13.6365C3.57424 13.1802 1.50005 11.2719 0.919281 8.78289C0.297024 6.12793 1.54154 3.34851 3.90612 1.97955C6.35366 0.569097 9.79682 1.10839 11.4147 3.51445C11.8295 4.09522 12.1199 4.80045 12.2444 5.50567C12.3688 6.08644 12.3273 6.7087 12.4103 7.28947C12.4933 7.82876 12.9496 8.53399 13.5718 8.16063C14.1111 7.82876 14.0696 7.12354 14.0282 6.58425C14.0696 6.87464 14.0282 6.41831 14.0282 6.58425Z"),T(r,"fill","white"),T(n,"class","ButtonSpinner"),T(n,"xmlns","http://www.w3.org/2000/svg"),T(n,"width","15"),T(n,"height","14"),T(n,"viewBox","0 0 15 14"),T(n,"fill","none"),T(t,"class","PrimaryButton")},m(e,s){p(e,t,s),h(t,n),h(n,r),h(t,i),h(t,o)},p(e,t){/*$_*/131072&t[0]&&s!==(s=/*$_*/e[17]("processingButton")+"")&&C(o,s)},d(e){e&&f(t)}}}
|
651
|
+
// (302:8) {#if !isProcessingTxn}
|
652
|
+
function rr(e){let t,n,r,i,o,s,a,l,c,u,m=/*$_*/e[17]("makeDepositButton")+"",E=/*amount*/(e[1]||/*$_*/e[17]("amountPlaceholder"))+"";return{c(){t=d("button"),n=g("svg"),r=g("path"),i=y(),o=b(m),s=y(),a=d("span"),l=b(E),c=y(),u=b(/*currency*/e[5]),T(r,"fill-rule","evenodd"),T(r,"clip-rule","evenodd"),T(r,"d","M7.51564 0.574496C6.49714 0.733152 5.5928 1.46162 5.21164 2.43037C5.01714 2.92471 4.98674 3.24368 4.98671 4.78987L4.98668 5.99306L4.55336 6.00671C4.20693 6.01762 4.08258 6.03221 3.93336 6.07946C3.43136 6.23846 3.00318 6.58293 2.73943 7.04C2.70133 7.106 2.63639 7.256 2.59508 7.37334L2.52002 7.58665V13.9067L2.59268 14.12C2.6993 14.4331 2.83849 14.6518 3.09336 14.9067C3.34821 15.1615 3.56693 15.3007 3.88002 15.4073L4.09336 15.48H11.9067L12.12 15.4073C12.4331 15.3007 12.6518 15.1615 12.9067 14.9067C13.1616 14.6518 13.3007 14.4331 13.4074 14.12L13.48 13.9067V7.58665L13.405 7.37334C13.1846 6.74712 12.6999 6.27875 12.0667 6.08C11.9191 6.03371 11.7891 6.0184 11.4467 6.00696L11.0134 5.99253L11.0133 4.78959C11.0133 4.128 11.0008 3.45465 10.9855 3.29334C10.9257 2.66268 10.7188 2.13556 10.3497 1.67368C9.66549 0.817589 8.6023 0.405214 7.51564 0.574496ZM8.46436 1.58665C9.01596 1.7035 9.52999 2.11659 9.79758 2.65809C9.98521 3.03771 9.98202 3.00646 9.99305 4.58L10.003 6H5.99702L6.00699 4.58C6.01802 3.00646 6.01483 3.03771 6.20246 2.65809C6.31793 2.42446 6.43799 2.26065 6.61818 2.09103C6.89043 1.83468 7.21371 1.65496 7.52352 1.58775C7.74977 1.53865 8.23518 1.53809 8.46436 1.58665ZM11.9201 7.0955C12.0975 7.17871 12.2992 7.37412 12.3874 7.54806C12.4231 7.61846 12.465 7.75796 12.4805 7.85803C12.4993 7.97978 12.5061 8.97962 12.501 10.88L12.4934 13.72L12.4082 13.8997C12.26 14.2127 12.0016 14.419 11.6821 14.4796C11.4864 14.5167 4.51364 14.5167 4.31793 14.4796C3.99843 14.419 3.74008 14.2127 3.59183 13.8997L3.50668 13.72L3.49905 10.88C3.49393 8.97728 3.50074 7.97987 3.51964 7.85778C3.57627 7.49218 3.79218 7.21543 4.12918 7.0765L4.28002 7.01431L8.02668 7.0205L11.7734 7.02665L11.9201 7.0955Z"),T(r,"fill","white"),T(n,"class","ButtonLock"),T(n,"xmlns","http://www.w3.org/2000/svg"),T(n,"width","16"),T(n,"height","16"),T(n,"viewBox","0 0 16 16"),T(n,"fill","none"),T(a,"class","ButtonAmount"),T(t,"class","PrimaryButton"),T(t,"type","submit")},m(e,f){p(e,t,f),h(t,n),h(n,r),h(t,i),h(t,o),h(t,s),h(t,a),h(a,l),h(a,c),h(a,u)},p(e,t){/*$_*/131072&t[0]&&m!==(m=/*$_*/e[17]("makeDepositButton")+"")&&C(o,m),/*amount, $_*/131074&t[0]&&E!==(E=/*amount*/(e[1]||/*$_*/e[17]("amountPlaceholder"))+"")&&C(l,E),/*currency*/32&t[0]&&C(u,/*currency*/e[5])},d(e){e&&f(t)}}}
|
653
|
+
// (318:8) {#if showRetryNotification}
|
654
|
+
function ir(e){let t,n,r;return{c(){t=d("cashier-notifications"),B(t,"text",n=/*$_*/e[17]("retryText")),B(t,"button",r=/*$_*/e[17]("retryButton"))},m(e,n){p(e,t,n)},p(e,i){/*$_*/131072&i[0]&&n!==(n=/*$_*/e[17]("retryText"))&&B(t,"text",n),/*$_*/131072&i[0]&&r!==(r=/*$_*/e[17]("retryButton"))&&B(t,"button",r)},d(e){e&&f(t)}}}
|
655
|
+
// (326:6) {#if showRedirectNotification}
|
656
|
+
function or(e){let t,n,r,i,o,s,a,c,u,m,g,E,B,w,H=/*$_*/e[17]("redirectTitle")+"",L=/*$_*/e[17]("redirectMessage")+"",A=/*$_*/e[17]("backToPayment")+"";return{c(){t=d("div"),n=d("img"),i=y(),o=d("span"),s=b(H),a=y(),c=d("span"),u=b(L),m=y(),g=d("div"),E=b(A),l(n.src,r="//static.everymatrix.com/mmstage/cashier/assets/redirect.png")||T(n,"src","//static.everymatrix.com/mmstage/cashier/assets/redirect.png"),T(n,"alt",""),T(o,"class","RedirectionTitle"),T(c,"class","RedirectionMessage"),T(g,"class","RedirectionClose"),T(t,"class","RedirectionNotification")},m(r,l){p(r,t,l),h(t,n),h(t,i),h(t,o),h(o,s),h(t,a),h(t,c),h(c,u),h(t,m),h(t,g),h(g,E),B||(w=v(g,"click",/*click_handler_2*/e[36]),B=!0)},p(e,t){/*$_*/131072&t[0]&&H!==(H=/*$_*/e[17]("redirectTitle")+"")&&C(s,H),/*$_*/131072&t[0]&&L!==(L=/*$_*/e[17]("redirectMessage")+"")&&C(u,L),/*$_*/131072&t[0]&&A!==(A=/*$_*/e[17]("backToPayment")+"")&&C(E,A)},d(e){e&&f(t),B=!1,w()}}}
|
657
|
+
// (336:2) {#if redirectUrl && redirectMode === RedirectionModeStringEnum.Default}
|
658
|
+
function sr(e){let t,n;return{c(){t=d("div"),n=d("cashier-iframe-redirect"),B(n,"lang",/*lang*/e[3]),B(n,"translationurl",/*translationurl*/e[4]),B(n,"iframeurl",/*redirectUrl*/e[10]),T(t,"class","IframeRedirect")},m(e,r){p(e,t,r),h(t,n)},p(e,t){/*lang*/8&t[0]&&B(n,"lang",/*lang*/e[3]),/*translationurl*/16&t[0]&&B(n,"translationurl",/*translationurl*/e[4]),/*redirectUrl*/1024&t[0]&&B(n,"iframeurl",/*redirectUrl*/e[10])},d(e){e&&f(t)}}}
|
659
|
+
// (345:2) {#if showConfirmModal}
|
660
|
+
function ar(e){let t,n,r,i,o,s,a,l,c,u,m,g=/*$_*/e[17]("confirmDepositText")+"",E=/*$_*/e[17]("confirmDepositButton")+"";return{c(){t=d("cashier-confirm-modal"),n=d("span"),r=b(g),i=y(),o=b(/*amount*/e[1]),s=y(),a=b(/*currency*/e[5]),l=b(" ?"),c=y(),u=d("div"),m=b(E),T(n,"slot","text"),T(u,"slot","confirm")},m(e,f){p(e,t,f),h(t,n),h(n,r),h(n,i),h(n,o),h(n,s),h(n,a),h(n,l),h(t,c),h(t,u),h(u,m)},p(e,t){/*$_*/131072&t[0]&&g!==(g=/*$_*/e[17]("confirmDepositText")+"")&&C(r,g),/*amount*/2&t[0]&&C(o,/*amount*/e[1]),/*currency*/32&t[0]&&C(a,/*currency*/e[5]),/*$_*/131072&t[0]&&E!==(E=/*$_*/e[17]("confirmDepositButton")+"")&&C(m,E)},d(e){e&&f(t)}}}function lr(t){let n,r,i,o=/*isTranslationLoaded*/t[15]&&/*selectedPaymentMethod*/t[6].Name&&Un(t),s=/*redirectUrl*/t[10]&&/*redirectMode*/t[12]===/*RedirectionModeStringEnum*/t[2].Default&&sr(t),a=/*showConfirmModal*/t[9]&&ar(t);return{c(){n=d("div"),o&&o.c(),r=y(),s&&s.c(),i=y(),a&&a.c(),this.c=e,T(n,"class","CashierMethodDetails")},m(e,t){p(e,n,t),o&&o.m(n,null),h(n,r),s&&s.m(n,null),h(n,i),a&&a.m(n,null)},p(e,t){/*isTranslationLoaded*/e[15]&&/*selectedPaymentMethod*/e[6].Name?o?o.p(e,t):(o=Un(e),o.c(),o.m(n,r)):o&&(o.d(1),o=null),/*redirectUrl*/e[10]&&/*redirectMode*/e[12]===/*RedirectionModeStringEnum*/e[2].Default?s?s.p(e,t):(s=sr(e),s.c(),s.m(n,i)):s&&(s.d(1),s=null),/*showConfirmModal*/e[9]?a?a.p(e,t):(a=ar(e),a.c(),a.m(n,null)):a&&(a.d(1),a=null)},i:e,o:e,d(e){e&&f(n),o&&o.d(),s&&s.d(),a&&a.d()}}}function cr(e,t,n){let r;u(e,An,(e=>n(17,r=e)));let{FieldTypes:i}=t;!function(e){e.Unknown="Unknown",e.Text="Text",e.Boolean="Boolean",e.Number="Number",e.Money="Money",e.DateTime="DateTime",e.Lookup="Lookup",e.IpAddress="IpAddress",e.Date="Date",e.Time="Time",e.LookupCollection="LookupCollection",e.Hidden="Hidden",e.Label="Label",e.Password="Password",e.Link="Link",e.Image="Image",e.Html="Html",e.QRCod="QRCode"}(i||(i={}));let o,{endpoint:s}=t,{session:a}=t,{lang:l}=t,{translationurl:c}=t,{customerid:h}=t,{currency:p}=t,{amount:f}=t,{selectedpaymentmethodname:m}=t,{clientstyling:d=""}=t,{clientstylingurl:g=""}=t,{RedirectionModeStringEnum:b}=t;!function(e){e.Default="Default",e.RedirectWithRetry="Redirect"}(b||(b={}));let y,E,v,T,B,C,H,L,A,_={},S=[],x={},N=!1;const M=()=>{var e;e=l,an.set(e)};Object.keys(Pn).forEach((e=>{_n(e,Pn[e])}));var R;R=()=>(window.addEventListener("closeModal",k,!1),window.addEventListener("confirmModal",D,!1),window.addEventListener("closeIframe",$,!1),window.addEventListener("notificationButtonClick",U,!1),document.addEventListener("click",O),()=>{window.removeEventListener("closeModal",k),window.removeEventListener("confirmModal",D),window.removeEventListener("closeIframe",$),window.removeEventListener("notificationButtonClick",U)}),P().$$.on_mount.push(R);const O=e=>{e.composedPath().includes(A)||n(16,L=null)},I=(e,t)=>{t!==L?(A=e.composedPath()[0],n(16,L=t)):n(16,L=null)},$=()=>{n(10,y=null)},k=()=>{n(9,N=!1)},D=()=>{n(14,C=!0);const e=new URL(`${s}/v1/player/${h}/payment/GetPaymentConfirm`),t=new Headers;t.append("accept","application/json"),t.append("Content-Type","application/json");const r={method:"POST",mode:"cors",headers:t,body:JSON.stringify({XPaymentSessionToken:o})};fetch(e,r).then((e=>e.json())).then((e=>{o=e.XPaymentSessionToken,n(10,y=e.RedirectUrl),n(12,T=e.RedirectionMode),n(14,C=!1),e.RedirectionMode===b.RedirectWithRetry&&(E=window.open(e.RedirectUrl,"_blank"),n(11,v=!!E),E||n(13,B=!0))}))},U=()=>{E=window.open(y,"_blank"),n(11,v=!0),n(13,B=!1)};return e.$$set=e=>{"FieldTypes"in e&&n(0,i=e.FieldTypes),"endpoint"in e&&n(21,s=e.endpoint),"session"in e&&n(22,a=e.session),"lang"in e&&n(3,l=e.lang),"translationurl"in e&&n(4,c=e.translationurl),"customerid"in e&&n(23,h=e.customerid),"currency"in e&&n(5,p=e.currency),"amount"in e&&n(1,f=e.amount),"selectedpaymentmethodname"in e&&n(24,m=e.selectedpaymentmethodname),"clientstyling"in e&&n(25,d=e.clientstyling),"clientstylingurl"in e&&n(26,g=e.clientstylingurl),"RedirectionModeStringEnum"in e&&n(2,b=e.RedirectionModeStringEnum)},e.$$.update=()=>{/*endpoint, session, selectedpaymentmethodname, currency*/23068704&e.$$.dirty[0]&&s&&a&&m&&p&&(()=>{const e=new URL(`${s}/v1/player/${h}/payment/GetPaymentMethod`),t=new Headers;t.append("accept","application/json"),t.append("Content-Type","application/json");const r={method:"POST",mode:"cors",headers:t,body:JSON.stringify({PaymentMethodName:m,Currency:p,XPaymentSessionToken:a})};fetch(e,r).then((e=>e.json())).then((e=>{o=e.XPaymentSessionToken,n(6,_=e.PaymentMethod),n(7,S=_.Fields),n(8,x={})}))})(),e.$$.dirty[0],e.$$.dirty[0],/*lang*/8&e.$$.dirty[0]&&l&&M(),/*lang, translationurl*/24&e.$$.dirty[0]&&l&&c&&(()=>{if(c)fetch(c).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{_n(t,e[t]),n(15,H=!0)}))})).catch((e=>{n(15,H=!0)}))})()},[i,f,b,l,c,p,_,S,x,N,y,v,T,B,C,H,L,r,I,()=>{n(14,C=!0);const e=new URL(`${s}/v1/player/${h}/payment/GetPaymentPrepare`),t=new Headers;t.append("accept","application/json"),t.append("Content-Type","application/json");const r={method:"POST",mode:"cors",headers:t,body:JSON.stringify({XPaymentSessionToken:o,Transaction:{PaymentMethod:_.Name,Amount:f,Currency:p,CustomFields:x},Account:{}})};fetch(e,r).then((e=>e.json())).then((e=>{o=e.XPaymentSessionToken,n(14,C=!1),n(9,N=!0)}))},e=>!e.CorrelationFieldName||e.CorrelationFieldName&&x[e.CorrelationFieldName]===e.CorrelationFieldValue,s,a,h,m,d,g,function(){f=w(this.value),n(1,f)},function(e){x[e.Name]=this.value,n(8,x)},function(e){x[e.Name]=w(this.value),n(8,x)},function(e){x[e.Name]=this.value,n(8,x)},function(e){x[e.Name]=this.value,n(8,x)},(e,t)=>I(t,e),(e,t)=>{n(8,x[e.Name]=t.Name,x),n(7,S)},function(e){x[e.Name]=this.value,n(8,x)},function(e){x[e.Name]=this.value,n(8,x)},()=>{n(11,v=!1)}]}!customElements.get("cashier-notifications")&&customElements.define("cashier-notifications",class extends z{constructor(e){super();const t=document.createElement("style");t.textContent='.cashier-notifications{position:absolute;margin:12px 0;background-color:rgb(17, 17, 17);color:rgb(255, 255, 255);display:flex;border-radius:4px;align-items:center;gap:12px;padding:12px 15px;min-height:65px;pointer-events:auto;bottom:0;width:calc(100% - 30px)}.cashier-notifications span,.cashier-notifications button{font-family:"Roboto", sans-serif;border:none;font-variant:normal}.cashier-notifications span{line-height:normal}.cashier-notifications button{color:rgb(126, 197, 30);background-color:rgb(17, 17, 17);cursor:pointer;font-size:14px;font-style:normal;font-weight:700}',this.shadowRoot.appendChild(t),X(this,{target:this.shadowRoot,props:A(this.attributes),customElement:!0},$n,In,o,{text:0,button:1},null),e&&(e.target&&p(e.target,this,e.anchor),e.props&&(this.$set(e.props),U()))}static get observedAttributes(){return["text","button"]}get text(){return this.$$.ctx[0]}set text(e){this.$$set({text:e}),U()}get button(){return this.$$.ctx[1]}set button(e){this.$$set({button:e}),U()}});class ur extends z{constructor(e){super();const t=document.createElement("style");t.textContent='@keyframes loading-spinner{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.MethodsDetails{position:relative;display:flex;flex-direction:column;gap:5px}.MethodsDetails:has(.RedirectionNotification) form{visibility:hidden}.form-logo{align-items:center;display:flex;height:50px;border-bottom:1px solid var(--emw--color-gray-100, #E8E9EB)}.form-logo .SelectedLogoDescription{color:var(--emw--color-black, #111);font-size:var(--emw--font-size-small, 14px);margin:7px 5px 7px 7px;word-break:break-word}.form-logo .SelectedLogoWrapper{width:56px;height:32px;flex-shrink:0;background:var(--emw--color-background, #FFF);border:1px solid var(--emw--color-gray-100, #E8E9EB);border-radius:var(--emw--border-radius-large, 6px)}.form-logo .SelectedLogoWrapper img{max-height:32px;max-width:56px}.RedirectionNotification{height:100%;width:inherit;position:absolute;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px}.RedirectionNotification .RedirectionClose{display:flex;width:234px;height:36px;flex-direction:column;justify-content:center;flex-shrink:0;color:var(--emw--color-white, #FFF);cursor:pointer;text-align:center;font-size:var(--emw--font-size-x-small, 12px);font-style:normal;font-weight:500;line-height:normal;text-transform:uppercase;border-radius:4px;background:var(--emw--color-primary, #7EC51E)}.RedirectionNotification .RedirectionTitle{color:var(--emw--color-black, #111);font-size:var(--emw--font-size-x-small, 12px);font-style:normal;text-transform:none;font-weight:var(--emw--font-weight-bold, 600)}.RedirectionNotification .RedirectionMessage{color:var(--emw--color-gray-300, #666);font-size:var(--emw--font-size-x-small, 12px);font-style:normal;text-transform:none}cashier-iframe-redirect{height:inherit;width:inherit}.IframeRedirect{display:flex;position:absolute;align-items:center;justify-content:center;width:100%;height:100%;z-index:100;top:0;left:0;background-color:var(--emw--color-gray-transparency-20, rgba(0, 0, 0, 0.2))}.FieldWrapper,label{display:flex;flex-direction:column}.FieldWrapper{background-color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));border-radius:6px;box-shadow:0 2px 6px 0 rgba(0, 0, 0, 0.1);padding:0 15px 15px;margin-bottom:10px}.FieldWrapper.Hidden{height:0;visibility:hidden;margin:0;padding:0}.AmountLimits{color:var(--emw--color-gray-300, #666);font-size:var(--emw--font-size-x-small, 12px);margin:5px 0 0 2px;line-height:var(--emw--font-size-x-small, 12px)}input,.Selected{border:1px solid var(--emw--color-gray-100, #E8E9EB);border-radius:var(--emw--border-radius-medium, 4px);height:40px;line-height:var(--emw--size-small, 14px);color:var(--emw--color-black, #111);padding:0 15px}input:focus,.Selected:focus{outline:none}label{color:var(--emw--color-black, #111);font-size:var(--emw--size-small, 14px);margin-top:7px;line-height:27px}label span.Required:before{content:"*";display:inline-block;margin-right:2px}.Description{color:var(--emw--color-gray-300, #666);font-size:var(--emw--font-size-x-small, 12px);margin:0 0 5px 2px;line-height:var(--emw--font-size-x-small, 12px)}.PrimaryButton{color:var(--emw--color-white, #FFF);text-align:center;font-size:var(--emw--font-size-small, 14px);font-style:normal;font-weight:400;height:46px;border-radius:50px;line-height:normal;border:none;background:var(--emw--color-primary, #7EC51E);width:100%;margin:12px 0;cursor:pointer;text-transform:uppercase}.PrimaryButton .ButtonSpinner{animation:loading-spinner 1s linear infinite}.CustomSelect{width:100%;position:relative}.Selected{display:flex;align-items:center;cursor:pointer}.Selected:after{position:absolute;content:"";top:19px;right:10px;width:0;height:0;border:6px solid transparent;border-color:rgb(168, 169, 170) transparent transparent transparent}.OptionList{display:none;position:absolute;top:100%;left:0;right:0;z-index:99;background-color:white;border:1px solid var(--emw--color-gray-100, #E8E9EB);border-radius:var(--emw--border-radius-medium, 4px);margin-top:5px}.OptionList div{padding:8px 16px;cursor:pointer;user-select:none}.OptionList div:hover{background-color:var(--emw--color-background-secondary, #F9F9F9)}.OptionList.Opened{display:block}',this.shadowRoot.appendChild(t),X(this,{target:this.shadowRoot,props:A(this.attributes),customElement:!0},cr,lr,o,{FieldTypes:0,endpoint:21,session:22,lang:3,translationurl:4,customerid:23,currency:5,amount:1,selectedpaymentmethodname:24,clientstyling:25,clientstylingurl:26,RedirectionModeStringEnum:2},null,[-1,-1]),e&&(e.target&&p(e.target,this,e.anchor),e.props&&(this.$set(e.props),U()))}static get observedAttributes(){return["FieldTypes","endpoint","session","lang","translationurl","customerid","currency","amount","selectedpaymentmethodname","clientstyling","clientstylingurl","RedirectionModeStringEnum"]}get FieldTypes(){return this.$$.ctx[0]}set FieldTypes(e){this.$$set({FieldTypes:e}),U()}get endpoint(){return this.$$.ctx[21]}set endpoint(e){this.$$set({endpoint:e}),U()}get session(){return this.$$.ctx[22]}set session(e){this.$$set({session:e}),U()}get lang(){return this.$$.ctx[3]}set lang(e){this.$$set({lang:e}),U()}get translationurl(){return this.$$.ctx[4]}set translationurl(e){this.$$set({translationurl:e}),U()}get customerid(){return this.$$.ctx[23]}set customerid(e){this.$$set({customerid:e}),U()}get currency(){return this.$$.ctx[5]}set currency(e){this.$$set({currency:e}),U()}get amount(){return this.$$.ctx[1]}set amount(e){this.$$set({amount:e}),U()}get selectedpaymentmethodname(){return this.$$.ctx[24]}set selectedpaymentmethodname(e){this.$$set({selectedpaymentmethodname:e}),U()}get clientstyling(){return this.$$.ctx[25]}set clientstyling(e){this.$$set({clientstyling:e}),U()}get clientstylingurl(){return this.$$.ctx[26]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),U()}get RedirectionModeStringEnum(){return this.$$.ctx[2]}set RedirectionModeStringEnum(e){this.$$set({RedirectionModeStringEnum:e}),U()}}return!customElements.get("cashier-method-details")&&customElements.define("cashier-method-details",ur),ur}));
|
661
|
+
//# sourceMappingURL=cashier-method-details.js.map
|