@everymatrix/casino-promotions-slider 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -0
- package/dist/casino-promotions-slider.js +699 -0
- package/dist/casino-promotions-slider.js.map +1 -0
- package/img/slider-line.svg +3 -0
- package/index.html +105 -0
- package/index.js +1 -0
- package/package.json +41 -0
- package/public/favicon.png +0 -0
- package/public/reset.css +48 -0
- package/rollup.config.js +59 -0
- package/src/CasinoPromotionsSlider.svelte +737 -0
- package/src/i18n.js +27 -0
- package/src/index.ts +4 -0
- package/src/translations.js +51 -0
- package/stories/CasinoPromotionsSlider.stories.js +13 -0
- package/tsconfig.json +6 -0
|
@@ -0,0 +1,699 @@
|
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).app=e()}(this,(function(){"use strict";function t(){}function e(t){return t()}function r(){return Object.create(null)}function n(t){t.forEach(e)}function i(t){return"function"==typeof t}function o(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}let s,a,l;function h(t,e){return s||(s=document.createElement("a")),s.href=e,t===s.href}function c(e,...r){if(null==e)return t;const n=e.subscribe(...r);return n.unsubscribe?()=>n.unsubscribe():n}function u(t,e){t.appendChild(e)}function f(t,e,r){t.insertBefore(e,r||null)}function p(t){t.parentNode&&t.parentNode.removeChild(t)}function d(t,e){for(let r=0;r<t.length;r+=1)t[r]&&t[r].d(e)}function m(t){return document.createElement(t)}function g(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function y(t){return document.createTextNode(t)}function b(){return y(" ")}function v(t,e,r,n){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r,n)}function E(t,e,r){null==r?t.removeAttribute(e):t.getAttribute(e)!==r&&t.setAttribute(e,r)}function w(t,e){e=""+e,t.data!==e&&(t.data=e)}function _(){if(void 0===a){a=!1;try{"undefined"!=typeof window&&window.parent&&window.parent.document}catch(t){a=!0}}return a}function T(t){const e={};for(const r of t)e[r.name]=r.value;return e}function S(t){l=t}function P(){if(!l)throw new Error("Function called outside component initialization");return l}
|
|
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 H(){const t=P();return(e,r,{cancelable:n=!1}={})=>{const i=t.$$.callbacks[e];if(i){
|
|
24
|
+
// TODO are there situations where events could be dispatched
|
|
25
|
+
// in a server (non-DOM) environment?
|
|
26
|
+
const o=function(t,e,{bubbles:r=!1,cancelable:n=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(t,r,n,e),i}(e,r,{cancelable:n});return i.slice().forEach((e=>{e.call(t,o)})),!o.defaultPrevented}return!0}}const A=[],B=[];let C=[];const x=[],L=Promise.resolve();let O=!1;function I(t){C.push(t)}
|
|
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 N=new Set;let M=0;// Do *not* move this inside the flush() function
|
|
46
|
+
function R(){
|
|
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!==M)return;const t=l;do{
|
|
51
|
+
// first, call beforeUpdate functions
|
|
52
|
+
// and update components
|
|
53
|
+
try{for(;M<A.length;){const t=A[M];M++,S(t),k(t.$$)}}catch(t){
|
|
54
|
+
// reset dirty state to not end up in a deadlocked state and then rethrow
|
|
55
|
+
throw A.length=0,M=0,t}for(S(null),A.length=0,M=0;B.length;)B.pop()();
|
|
56
|
+
// then, once components are updated, call
|
|
57
|
+
// afterUpdate functions. This may cause
|
|
58
|
+
// subsequent updates...
|
|
59
|
+
for(let t=0;t<C.length;t+=1){const e=C[t];N.has(e)||(
|
|
60
|
+
// ...so guard against infinite loops
|
|
61
|
+
N.add(e),e())}C.length=0}while(A.length);for(;x.length;)x.pop()();O=!1,N.clear(),S(t)}function k(t){if(null!==t.fragment){t.update(),n(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(I)}}
|
|
62
|
+
/**
|
|
63
|
+
* Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.
|
|
64
|
+
*/const U=new Set;function D(t,e){const r=t.$$;null!==r.fragment&&(!function(t){const e=[],r=[];C.forEach((n=>-1===t.indexOf(n)?e.push(n):r.push(n))),r.forEach((t=>t())),C=e}(r.after_update),n(r.on_destroy),r.fragment&&r.fragment.d(e),
|
|
65
|
+
// TODO null out other refs, including component.$$ (but need to
|
|
66
|
+
// preserve final state?)
|
|
67
|
+
r.on_destroy=r.fragment=null,r.ctx=[])}function F(t,e){-1===t.$$.dirty[0]&&(A.push(t),O||(O=!0,L.then(R)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function G(o,s,a,h,c,u,f,d=[-1]){const m=l;S(o);const g=o.$$={fragment:null,ctx:[],
|
|
68
|
+
// state
|
|
69
|
+
props:u,update:t,not_equal:c,bound:r(),
|
|
70
|
+
// lifecycle
|
|
71
|
+
on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s.context||(m?m.$$.context:[])),
|
|
72
|
+
// everything else
|
|
73
|
+
callbacks:r(),dirty:d,skip_bound:!1,root:s.target||m.$$.root};f&&f(g.root);let y=!1;if(g.ctx=a?a(o,s.props||{},((t,e,...r)=>{const n=r.length?r[0]:e;return g.ctx&&c(g.ctx[t],g.ctx[t]=n)&&(!g.skip_bound&&g.bound[t]&&g.bound[t](n),y&&F(o,t)),e})):[],g.update(),y=!0,n(g.before_update),
|
|
74
|
+
// `false` as a special case of no DOM component
|
|
75
|
+
g.fragment=!!h&&h(g.ctx),s.target){if(s.hydrate){const t=function(t){return Array.from(t.childNodes)}(s.target);
|
|
76
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
77
|
+
g.fragment&&g.fragment.l(t),t.forEach(p)}else
|
|
78
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
79
|
+
g.fragment&&g.fragment.c();s.intro&&((b=o.$$.fragment)&&b.i&&(U.delete(b),b.i(v))),function(t,r,o,s){const{fragment:a,after_update:l}=t.$$;a&&a.m(r,o),s||
|
|
80
|
+
// onMount happens before the initial afterUpdate
|
|
81
|
+
I((()=>{const r=t.$$.on_mount.map(e).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
|
+
t.$$.on_destroy?t.$$.on_destroy.push(...r):
|
|
86
|
+
// Edge case - component was destroyed immediately,
|
|
87
|
+
// most likely as a result of a binding initialising
|
|
88
|
+
n(r),t.$$.on_mount=[]})),l.forEach(I)}(o,s.target,s.anchor,s.customElement),R()}var b,v;S(m)}let $;"function"==typeof HTMLElement&&($=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(e).filter(i);
|
|
89
|
+
// @ts-ignore todo: improve typings
|
|
90
|
+
for(const t in this.$$.slotted)
|
|
91
|
+
// @ts-ignore todo: improve typings
|
|
92
|
+
this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,r){this[t]=r}disconnectedCallback(){n(this.$$.on_disconnect)}$destroy(){D(this,1),this.$destroy=t}$on(e,r){
|
|
93
|
+
// TODO should this delegate to addEventListener?
|
|
94
|
+
if(!i(r))return t;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(r),()=>{const t=n.indexOf(r);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function j(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var X=function(t,e,r){return t(r={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&r.path)}},r.exports),r.exports}((function(t,e){"undefined"!=typeof self&&self,t.exports=function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}([function(t,e,r){function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),s=function(){function t(e){var r=this;if(n(this,t),this.config=t.mergeSettings(e),this.selector="string"==typeof this.config.selector?document.querySelector(this.config.selector):this.config.selector,null===this.selector)throw new Error("Something wrong with your selector 😭");this.resolveSlidesNumber(),this.selectorWidth=this.selector.offsetWidth,this.innerElements=[].slice.call(this.selector.children),this.currentSlide=this.config.loop?this.config.startIndex%this.innerElements.length:Math.max(0,Math.min(this.config.startIndex,this.innerElements.length-this.perPage)),this.transformProperty=t.webkitOrNot(),["resizeHandler","touchstartHandler","touchendHandler","touchmoveHandler","mousedownHandler","mouseupHandler","mouseleaveHandler","mousemoveHandler","clickHandler"].forEach((function(t){r[t]=r[t].bind(r)})),this.init()}return o(t,[{key:"attachEvents",value:function(){window.addEventListener("resize",this.resizeHandler),this.config.draggable&&(this.pointerDown=!1,this.drag={startX:0,endX:0,startY:0,letItGo:null,preventClick:!1},this.selector.addEventListener("touchstart",this.touchstartHandler),this.selector.addEventListener("touchend",this.touchendHandler),this.selector.addEventListener("touchmove",this.touchmoveHandler),this.selector.addEventListener("mousedown",this.mousedownHandler),this.selector.addEventListener("mouseup",this.mouseupHandler),this.selector.addEventListener("mouseleave",this.mouseleaveHandler),this.selector.addEventListener("mousemove",this.mousemoveHandler),this.selector.addEventListener("click",this.clickHandler))}},{key:"detachEvents",value:function(){window.removeEventListener("resize",this.resizeHandler),this.selector.removeEventListener("touchstart",this.touchstartHandler),this.selector.removeEventListener("touchend",this.touchendHandler),this.selector.removeEventListener("touchmove",this.touchmoveHandler),this.selector.removeEventListener("mousedown",this.mousedownHandler),this.selector.removeEventListener("mouseup",this.mouseupHandler),this.selector.removeEventListener("mouseleave",this.mouseleaveHandler),this.selector.removeEventListener("mousemove",this.mousemoveHandler),this.selector.removeEventListener("click",this.clickHandler)}},{key:"init",value:function(){this.attachEvents(),this.selector.style.overflow="hidden",this.selector.style.direction=this.config.rtl?"rtl":"ltr",this.buildSliderFrame(),this.config.onInit.call(this)}},{key:"buildSliderFrame",value:function(){var t=this.selectorWidth/this.perPage,e=this.config.loop?this.innerElements.length+2*this.perPage:this.innerElements.length;this.sliderFrame=document.createElement("div"),this.sliderFrame.style.width=t*e+"px",this.enableTransition(),this.config.draggable&&(this.selector.style.cursor="-webkit-grab");var r=document.createDocumentFragment();if(this.config.loop)for(var n=this.innerElements.length-this.perPage;n<this.innerElements.length;n++){var i=this.buildSliderFrameItem(this.innerElements[n].cloneNode(!0));r.appendChild(i)}for(var o=0;o<this.innerElements.length;o++){var s=this.buildSliderFrameItem(this.innerElements[o]);r.appendChild(s)}if(this.config.loop)for(var a=0;a<this.perPage;a++){var l=this.buildSliderFrameItem(this.innerElements[a].cloneNode(!0));r.appendChild(l)}this.sliderFrame.appendChild(r),this.selector.innerHTML="",this.selector.appendChild(this.sliderFrame),this.slideToCurrent()}},{key:"buildSliderFrameItem",value:function(t){var e=document.createElement("div");return e.style.cssFloat=this.config.rtl?"right":"left",e.style.float=this.config.rtl?"right":"left",e.style.width=(this.config.loop?100/(this.innerElements.length+2*this.perPage):100/this.innerElements.length)+"%",e.appendChild(t),e}},{key:"resolveSlidesNumber",value:function(){if("number"==typeof this.config.perPage)this.perPage=this.config.perPage;else if("object"===i(this.config.perPage))for(var t in this.perPage=1,this.config.perPage)window.innerWidth>=t&&(this.perPage=this.config.perPage[t])}},{key:"prev",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments[1];if(!(this.innerElements.length<=this.perPage)){var r=this.currentSlide;if(this.config.loop)if(this.currentSlide-t<0){this.disableTransition();var n=this.currentSlide+this.innerElements.length,i=n+this.perPage,o=(this.config.rtl?1:-1)*i*(this.selectorWidth/this.perPage),s=this.config.draggable?this.drag.endX-this.drag.startX:0;this.sliderFrame.style[this.transformProperty]="translate3d("+(o+s)+"px, 0, 0)",this.currentSlide=n-t}else this.currentSlide=this.currentSlide-t;else this.currentSlide=Math.max(this.currentSlide-t,0);r!==this.currentSlide&&(this.slideToCurrent(this.config.loop),this.config.onChange.call(this),e&&e.call(this))}}},{key:"next",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments[1];if(!(this.innerElements.length<=this.perPage)){var r=this.currentSlide;if(this.config.loop)if(this.currentSlide+t>this.innerElements.length-this.perPage){this.disableTransition();var n=this.currentSlide-this.innerElements.length,i=n+this.perPage,o=(this.config.rtl?1:-1)*i*(this.selectorWidth/this.perPage),s=this.config.draggable?this.drag.endX-this.drag.startX:0;this.sliderFrame.style[this.transformProperty]="translate3d("+(o+s)+"px, 0, 0)",this.currentSlide=n+t}else this.currentSlide=this.currentSlide+t;else this.currentSlide=Math.min(this.currentSlide+t,this.innerElements.length-this.perPage);r!==this.currentSlide&&(this.slideToCurrent(this.config.loop),this.config.onChange.call(this),e&&e.call(this))}}},{key:"disableTransition",value:function(){this.sliderFrame.style.webkitTransition="all 0ms "+this.config.easing,this.sliderFrame.style.transition="all 0ms "+this.config.easing}},{key:"enableTransition",value:function(){this.sliderFrame.style.webkitTransition="all "+this.config.duration+"ms "+this.config.easing,this.sliderFrame.style.transition="all "+this.config.duration+"ms "+this.config.easing}},{key:"goTo",value:function(t,e){if(!(this.innerElements.length<=this.perPage)){var r=this.currentSlide;this.currentSlide=this.config.loop?t%this.innerElements.length:Math.min(Math.max(t,0),this.innerElements.length-this.perPage),r!==this.currentSlide&&(this.slideToCurrent(),this.config.onChange.call(this),e&&e.call(this))}}},{key:"slideToCurrent",value:function(t){var e=this,r=this.config.loop?this.currentSlide+this.perPage:this.currentSlide,n=(this.config.rtl?1:-1)*r*(this.selectorWidth/this.perPage);t?requestAnimationFrame((function(){requestAnimationFrame((function(){e.enableTransition(),e.sliderFrame.style[e.transformProperty]="translate3d("+n+"px, 0, 0)"}))})):this.sliderFrame.style[this.transformProperty]="translate3d("+n+"px, 0, 0)"}},{key:"updateAfterDrag",value:function(){var t=(this.config.rtl?-1:1)*(this.drag.endX-this.drag.startX),e=Math.abs(t),r=this.config.multipleDrag?Math.ceil(e/(this.selectorWidth/this.perPage)):1,n=t>0&&this.currentSlide-r<0,i=t<0&&this.currentSlide+r>this.innerElements.length-this.perPage;t>0&&e>this.config.threshold&&this.innerElements.length>this.perPage?this.prev(r):t<0&&e>this.config.threshold&&this.innerElements.length>this.perPage&&this.next(r),this.slideToCurrent(n||i)}},{key:"resizeHandler",value:function(){this.resolveSlidesNumber(),this.currentSlide+this.perPage>this.innerElements.length&&(this.currentSlide=this.innerElements.length<=this.perPage?0:this.innerElements.length-this.perPage),this.selectorWidth=this.selector.offsetWidth,this.buildSliderFrame()}},{key:"clearDrag",value:function(){this.drag={startX:0,endX:0,startY:0,letItGo:null,preventClick:this.drag.preventClick}}},{key:"touchstartHandler",value:function(t){-1!==["TEXTAREA","OPTION","INPUT","SELECT"].indexOf(t.target.nodeName)||(t.stopPropagation(),this.pointerDown=!0,this.drag.startX=t.touches[0].pageX,this.drag.startY=t.touches[0].pageY)}},{key:"touchendHandler",value:function(t){t.stopPropagation(),this.pointerDown=!1,this.enableTransition(),this.drag.endX&&this.updateAfterDrag(),this.clearDrag()}},{key:"touchmoveHandler",value:function(t){if(t.stopPropagation(),null===this.drag.letItGo&&(this.drag.letItGo=Math.abs(this.drag.startY-t.touches[0].pageY)<Math.abs(this.drag.startX-t.touches[0].pageX)),this.pointerDown&&this.drag.letItGo){t.preventDefault(),this.drag.endX=t.touches[0].pageX,this.sliderFrame.style.webkitTransition="all 0ms "+this.config.easing,this.sliderFrame.style.transition="all 0ms "+this.config.easing;var e=(this.config.loop?this.currentSlide+this.perPage:this.currentSlide)*(this.selectorWidth/this.perPage),r=this.drag.endX-this.drag.startX,n=this.config.rtl?e+r:e-r;this.sliderFrame.style[this.transformProperty]="translate3d("+(this.config.rtl?1:-1)*n+"px, 0, 0)"}}},{key:"mousedownHandler",value:function(t){-1!==["TEXTAREA","OPTION","INPUT","SELECT"].indexOf(t.target.nodeName)||(t.preventDefault(),t.stopPropagation(),this.pointerDown=!0,this.drag.startX=t.pageX)}},{key:"mouseupHandler",value:function(t){t.stopPropagation(),this.pointerDown=!1,this.selector.style.cursor="-webkit-grab",this.enableTransition(),this.drag.endX&&this.updateAfterDrag(),this.clearDrag()}},{key:"mousemoveHandler",value:function(t){if(t.preventDefault(),this.pointerDown){"A"===t.target.nodeName&&(this.drag.preventClick=!0),this.drag.endX=t.pageX,this.selector.style.cursor="-webkit-grabbing",this.sliderFrame.style.webkitTransition="all 0ms "+this.config.easing,this.sliderFrame.style.transition="all 0ms "+this.config.easing;var e=(this.config.loop?this.currentSlide+this.perPage:this.currentSlide)*(this.selectorWidth/this.perPage),r=this.drag.endX-this.drag.startX,n=this.config.rtl?e+r:e-r;this.sliderFrame.style[this.transformProperty]="translate3d("+(this.config.rtl?1:-1)*n+"px, 0, 0)"}}},{key:"mouseleaveHandler",value:function(t){this.pointerDown&&(this.pointerDown=!1,this.selector.style.cursor="-webkit-grab",this.drag.endX=t.pageX,this.drag.preventClick=!1,this.enableTransition(),this.updateAfterDrag(),this.clearDrag())}},{key:"clickHandler",value:function(t){this.drag.preventClick&&t.preventDefault(),this.drag.preventClick=!1}},{key:"remove",value:function(t,e){if(t<0||t>=this.innerElements.length)throw new Error("Item to remove doesn't exist 😭");var r=t<this.currentSlide,n=this.currentSlide+this.perPage-1===t;(r||n)&&this.currentSlide--,this.innerElements.splice(t,1),this.buildSliderFrame(),e&&e.call(this)}},{key:"insert",value:function(t,e,r){if(e<0||e>this.innerElements.length+1)throw new Error("Unable to inset it at this index 😭");if(-1!==this.innerElements.indexOf(t))throw new Error("The same item in a carousel? Really? Nope 😭");var n=e<=this.currentSlide>0&&this.innerElements.length;this.currentSlide=n?this.currentSlide+1:this.currentSlide,this.innerElements.splice(e,0,t),this.buildSliderFrame(),r&&r.call(this)}},{key:"prepend",value:function(t,e){this.insert(t,0),e&&e.call(this)}},{key:"append",value:function(t,e){this.insert(t,this.innerElements.length+1),e&&e.call(this)}},{key:"destroy",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments[1];if(this.detachEvents(),this.selector.style.cursor="auto",t){for(var r=document.createDocumentFragment(),n=0;n<this.innerElements.length;n++)r.appendChild(this.innerElements[n]);this.selector.innerHTML="",this.selector.appendChild(r),this.selector.removeAttribute("style")}e&&e.call(this)}}],[{key:"mergeSettings",value:function(t){var e={selector:".siema",duration:200,easing:"ease-out",perPage:1,startIndex:0,draggable:!0,multipleDrag:!0,threshold:20,loop:!1,rtl:!1,onInit:function(){},onChange:function(){}},r=t;for(var n in r)e[n]=r[n];return e}},{key:"webkitOrNot",value:function(){return"string"==typeof document.documentElement.style.transform?"transform":"WebkitTransform"}}]),t}();e.default=s,t.exports=e.default}])})),z=j(X),V="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==V&&V,W="URLSearchParams"in V,K="Symbol"in V&&"iterator"in Symbol,Y="FileReader"in V&&"Blob"in V&&function(){try{return new Blob,!0}catch(t){return!1}}(),Z="FormData"in V,q="ArrayBuffer"in V;if(q)var J=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Q=ArrayBuffer.isView||function(t){return t&&J.indexOf(Object.prototype.toString.call(t))>-1};function tt(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function et(t){return"string"!=typeof t&&(t=String(t)),t}
|
|
95
|
+
// Build a destructive iterator for the value list
|
|
96
|
+
function rt(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return K&&(e[Symbol.iterator]=function(){return e}),e}function nt(t){this.map={},t instanceof nt?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function it(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function ot(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function st(t){var e=new FileReader,r=ot(e);return e.readAsArrayBuffer(t),r}function at(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function lt(){return this.bodyUsed=!1,this._initBody=function(t){var e;
|
|
97
|
+
/*
|
|
98
|
+
fetch-mock wraps the Response object in an ES6 Proxy to
|
|
99
|
+
provide useful test harness features such as flush. However, on
|
|
100
|
+
ES5 browsers without fetch or Proxy support pollyfills must be used;
|
|
101
|
+
the proxy-pollyfill is unable to proxy an attribute unless it exists
|
|
102
|
+
on the object before the Proxy is created. This change ensures
|
|
103
|
+
Response.bodyUsed exists on the instance, while maintaining the
|
|
104
|
+
semantic of setting Request.bodyUsed in the constructor before
|
|
105
|
+
_initBody is called.
|
|
106
|
+
*/
|
|
107
|
+
this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:Y&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:Z&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:W&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():q&&Y&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=at(t.buffer),
|
|
108
|
+
// IE 10-11 can't handle a DataView body.
|
|
109
|
+
this._bodyInit=new Blob([this._bodyArrayBuffer])):q&&(ArrayBuffer.prototype.isPrototypeOf(t)||Q(t))?this._bodyArrayBuffer=at(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):W&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Y&&(this.blob=function(){var t=it(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var t=it(this);return t||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(st)}),this.text=function(){var t,e,r,n=it(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,r=ot(e),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},Z&&(this.formData=function(){return this.text().then(ut)}),this.json=function(){return this.text().then(JSON.parse)},this}
|
|
110
|
+
// HTTP methods whose capitalization should be normalized
|
|
111
|
+
nt.prototype.append=function(t,e){t=tt(t),e=et(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},nt.prototype.delete=function(t){delete this.map[tt(t)]},nt.prototype.get=function(t){return t=tt(t),this.has(t)?this.map[t]:null},nt.prototype.has=function(t){return this.map.hasOwnProperty(tt(t))},nt.prototype.set=function(t,e){this.map[tt(t)]=et(e)},nt.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},nt.prototype.keys=function(){var t=[];return this.forEach((function(e,r){t.push(r)})),rt(t)},nt.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),rt(t)},nt.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),rt(t)},K&&(nt.prototype[Symbol.iterator]=nt.prototype.entries);var ht=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function ct(t,e){if(!(this instanceof ct))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r,n,i=(e=e||{}).body;if(t instanceof ct){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new nt(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new nt(e.headers)),this.method=(r=e.method||this.method||"GET",n=r.toUpperCase(),ht.indexOf(n)>-1?n:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){
|
|
112
|
+
// Search for a '_' parameter in the query string
|
|
113
|
+
var o=/([?&])_=[^&]*/;if(o.test(this.url))
|
|
114
|
+
// If it already exists then set the value with the current time
|
|
115
|
+
this.url=this.url.replace(o,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function ut(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(i))}})),e}function ft(t,e){if(!(this instanceof ft))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new nt(e.headers),this.url=e.url||"",this._initBody(t)}ct.prototype.clone=function(){return new ct(this,{body:this._bodyInit})},lt.call(ct.prototype),lt.call(ft.prototype),ft.prototype.clone=function(){return new ft(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new nt(this.headers),url:this.url})},ft.error=function(){var t=new ft(null,{status:0,statusText:""});return t.type="error",t};var pt=[301,302,303,307,308];ft.redirect=function(t,e){if(-1===pt.indexOf(e))throw new RangeError("Invalid status code");return new ft(null,{status:e,headers:{location:t}})};var dt=V.DOMException;try{new dt}catch(t){(dt=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack}).prototype=Object.create(Error.prototype),dt.prototype.constructor=dt}function mt(t,e){return new Promise((function(r,n){var i=new ct(t,e);if(i.signal&&i.signal.aborted)return n(new dt("Aborted","AbortError"));var o=new XMLHttpRequest;function s(){o.abort()}o.onload=function(){var t,e,n={status:o.status,statusText:o.statusText,headers:(t=o.getAllResponseHeaders()||"",e=new nt,
|
|
116
|
+
// Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill
|
|
117
|
+
// https://github.com/github/fetch/issues/748
|
|
118
|
+
// https://github.com/zloirock/core-js/issues/751
|
|
119
|
+
t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();e.append(n,i)}})),e)};n.url="responseURL"in o?o.responseURL:n.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;setTimeout((function(){r(new ft(i,n))}),0)},o.onerror=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)},o.ontimeout=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)},o.onabort=function(){setTimeout((function(){n(new dt("Aborted","AbortError"))}),0)},o.open(i.method,function(t){try{return""===t&&V.location.href?V.location.href:t}catch(e){return t}}(i.url),!0),"include"===i.credentials?o.withCredentials=!0:"omit"===i.credentials&&(o.withCredentials=!1),"responseType"in o&&(Y?o.responseType="blob":q&&i.headers.get("Content-Type")&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(o.responseType="arraybuffer")),!e||"object"!=typeof e.headers||e.headers instanceof nt?i.headers.forEach((function(t,e){o.setRequestHeader(e,t)})):Object.getOwnPropertyNames(e.headers).forEach((function(t){o.setRequestHeader(t,et(e.headers[t]))})),i.signal&&(i.signal.addEventListener("abort",s),o.onreadystatechange=function(){
|
|
120
|
+
// DONE (success or failure)
|
|
121
|
+
4===o.readyState&&i.signal.removeEventListener("abort",s)}),o.send(void 0===i._bodyInit?null:i._bodyInit)}))}mt.polyfill=!0,V.fetch||(V.fetch=mt,V.Headers=nt,V.Request=ct,V.Response=ft),
|
|
122
|
+
// the whatwg-fetch polyfill installs the fetch() function
|
|
123
|
+
// on the global object (window or self)
|
|
124
|
+
// Return that as the export for use in Webpack, Browserify etc.
|
|
125
|
+
self.fetch.bind(self);
|
|
126
|
+
/******************************************************************************
|
|
127
|
+
Copyright (c) Microsoft Corporation.
|
|
128
|
+
|
|
129
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
130
|
+
purpose with or without fee is hereby granted.
|
|
131
|
+
|
|
132
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
133
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
134
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
135
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
136
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
137
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
138
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
139
|
+
***************************************************************************** */
|
|
140
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
141
|
+
var gt=function(t,e){return gt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},gt(t,e)};function yt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}gt(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function bt(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function vt(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function Et(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))}function wt(t){return"function"==typeof t}function _t(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}"function"==typeof SuppressedError&&SuppressedError;var Tt=_t((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function St(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var Pt=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}var e;return t.prototype.unsubscribe=function(){var t,e,r,n,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=bt(o),a=s.next();!a.done;a=s.next()){a.value.remove(this)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}else o.remove(this);var l=this.initialTeardown;if(wt(l))try{l()}catch(t){i=t instanceof Tt?t.errors:[t]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var c=bt(h),u=c.next();!u.done;u=c.next()){var f=u.value;try{Bt(f)}catch(t){i=null!=i?i:[],t instanceof Tt?i=Et(Et([],vt(i)),vt(t.errors)):i.push(t)}}}catch(t){r={error:t}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}}if(i)throw new Tt(i)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)Bt(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&St(e,t)},t.prototype.remove=function(e){var r=this._finalizers;r&&St(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),Ht=Pt.EMPTY;function At(t){return t instanceof Pt||t&&"closed"in t&&wt(t.remove)&&wt(t.add)&&wt(t.unsubscribe)}function Bt(t){wt(t)?t():t.unsubscribe()}var Ct={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},xt={setTimeout:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=xt.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,Et([t,e],vt(r))):setTimeout.apply(void 0,Et([t,e],vt(r)))},clearTimeout:function(t){var e=xt.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function Lt(){}var Ot=null;function It(t){if(Ct.useDeprecatedSynchronousErrorHandling){var e=!Ot;if(e&&(Ot={errorThrown:!1,error:null}),t(),e){var r=Ot,n=r.errorThrown,i=r.error;if(Ot=null,n)throw i}}else t()}var Nt=function(t){function e(e){var r=t.call(this)||this;return r.isStopped=!1,e?(r.destination=e,At(e)&&e.add(r)):r.destination=Ft,r}return yt(e,t),e.create=function(t,e,r){return new Ut(t,e,r)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Pt),Mt=Function.prototype.bind;function Rt(t,e){return Mt.call(t,e)}var kt=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(t){Dt(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){Dt(t)}else Dt(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){Dt(t)}},t}(),Ut=function(t){function e(e,r,n){var i,o,s=t.call(this)||this;wt(e)||!e?i={next:null!=e?e:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:s&&Ct.useDeprecatedNextContext?((o=Object.create(e)).unsubscribe=function(){return s.unsubscribe()},i={next:e.next&&Rt(e.next,o),error:e.error&&Rt(e.error,o),complete:e.complete&&Rt(e.complete,o)}):i=e;return s.destination=new kt(i),s}return yt(e,t),e}(Nt);function Dt(t){var e;e=t,xt.setTimeout((function(){throw e}))}var Ft={closed:!0,next:Lt,error:function(t){throw t},complete:Lt},Gt="function"==typeof Symbol&&Symbol.observable||"@@observable";function $t(t){return t}var jt=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n,i=this,o=(n=t)&&n instanceof Nt||function(t){return t&&wt(t.next)&&wt(t.error)&&wt(t.complete)}(n)&&At(n)?t:new Ut(t,e,r);return It((function(){var t=i,e=t.operator,r=t.source;o.add(e?e.call(o,r):r?i._subscribe(o):i._trySubscribe(o))})),o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var r=this;return new(e=Xt(e))((function(e,n){var i=new Ut({next:function(e){try{t(e)}catch(t){n(t),i.unsubscribe()}},error:n,complete:e});r.subscribe(i)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[Gt]=function(){return this},t.prototype.pipe=function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return(0===(t=e).length?$t:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)})(this)},t.prototype.toPromise=function(t){var e=this;return new(t=Xt(t))((function(t,r){var n;e.subscribe((function(t){return n=t}),(function(t){return r(t)}),(function(){return t(n)}))}))},t.create=function(e){return new t(e)},t}();function Xt(t){var e;return null!==(e=null!=t?t:Ct.Promise)&&void 0!==e?e:Promise}var zt=_t((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Vt=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return yt(e,t),e.prototype.lift=function(t){var e=new Wt(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new zt},e.prototype.next=function(t){var e=this;It((function(){var r,n;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var i=bt(e.currentObservers),o=i.next();!o.done;o=i.next()){o.value.next(t)}}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}}))},e.prototype.error=function(t){var e=this;It((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var r=e.observers;r.length;)r.shift().error(t)}}))},e.prototype.complete=function(){var t=this;It((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,r=this,n=r.hasError,i=r.isStopped,o=r.observers;return n||i?Ht:(this.currentObservers=null,o.push(t),new Pt((function(){e.currentObservers=null,St(o,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,r=e.hasError,n=e.thrownError,i=e.isStopped;r?t.error(n):i&&t.complete()},e.prototype.asObservable=function(){var t=new jt;return t.source=this,t},e.create=function(t,e){return new Wt(t,e)},e}(jt),Wt=function(t){function e(e,r){var n=t.call(this)||this;return n.destination=e,n.source=r,n}return yt(e,t),e.prototype.next=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===r||r.call(e,t)},e.prototype.error=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===r||r.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,r;return null!==(r=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==r?r:Ht},e}(Vt),Kt={now:function(){return(Kt.delegate||Date).now()},delegate:void 0},Yt=function(t){function e(e,r,n){void 0===e&&(e=1/0),void 0===r&&(r=1/0),void 0===n&&(n=Kt);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,r),i}return yt(e,t),e.prototype.next=function(e){var r=this,n=r.isStopped,i=r._buffer,o=r._infiniteTimeWindow,s=r._timestampProvider,a=r._windowTime;n||(i.push(e),!o&&i.push(s.now()+a)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!t.closed;i+=r?1:2)t.next(n[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,r=t._timestampProvider,n=t._buffer,i=t._infiniteTimeWindow,o=(i?1:2)*e;if(e<1/0&&o<n.length&&n.splice(0,n.length-o),!i){for(var s=r.now(),a=0,l=1;l<n.length&&n[l]<=s;l+=2)a=l;a&&n.splice(0,a+1)}},e}(Vt);let Zt=[],qt={};
|
|
142
|
+
/**
|
|
143
|
+
* @name topic
|
|
144
|
+
* @description A small wrapper over the rxjs to offer the topic method on top of it
|
|
145
|
+
* @param event [String] Event name
|
|
146
|
+
* @param step [String] How many values to be buffed for new subscribers - default 0
|
|
147
|
+
* @returns ReplaySubject
|
|
148
|
+
*/
|
|
149
|
+
const Jt=[];
|
|
150
|
+
/**
|
|
151
|
+
* Create a `Writable` store that allows both updating and reading by subscription.
|
|
152
|
+
* @param {*=}value initial value
|
|
153
|
+
* @param {StartStopNotifier=} start
|
|
154
|
+
*/
|
|
155
|
+
function Qt(e,r=t){let n;const i=new Set;function s(t){if(o(e,t)&&(e=t,n)){// store is ready
|
|
156
|
+
const t=!Jt.length;for(const t of i)t[1](),Jt.push(t,e);if(t){for(let t=0;t<Jt.length;t+=2)Jt[t][0](Jt[t+1]);Jt.length=0}}}return{set:s,update:function(t){s(t(e))},subscribe:function(o,a=t){const l=[o,a];return i.add(l),1===i.size&&(n=r(s)||t),o(e),()=>{i.delete(l),0===i.size&&n&&(n(),n=null)}}}}function te(e,r,o){const s=!Array.isArray(e),a=s?[e]:e,l=r.length<2;return h=e=>{let o=!1;const h=[];let u=0,f=t;const p=()=>{if(u)return;f();const n=r(s?h[0]:h,e);l?e(n):f=i(n)?n:t},d=a.map(((t,e)=>c(t,(t=>{h[e]=t,u&=~(1<<e),o&&p()}),(()=>{u|=1<<e}))));return o=!0,p(),function(){n(d),f(),
|
|
157
|
+
// We need to set this to false because callbacks can still happen despite having unsubscribed:
|
|
158
|
+
// Callbacks might already be placed in the queue which doesn't know it should no longer
|
|
159
|
+
// invoke this derived store.
|
|
160
|
+
o=!1}},{subscribe:Qt(o,h).subscribe};
|
|
161
|
+
/**
|
|
162
|
+
* Creates a `Readable` store that allows reading by subscription.
|
|
163
|
+
* @param value initial value
|
|
164
|
+
* @param {StartStopNotifier} [start]
|
|
165
|
+
*/
|
|
166
|
+
var h}var ee=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e||function(t){return t.$$typeof===re}(t)}
|
|
167
|
+
// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
|
|
168
|
+
(t)};var re="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function ne(t,e){return!1!==e.clone&&e.isMergeableObject(t)?le((r=t,Array.isArray(r)?[]:{}),t,e):t;var r}function ie(t,e,r){return t.concat(e).map((function(t){return ne(t,r)}))}function oe(t){return Object.keys(t).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(e){return Object.propertyIsEnumerable.call(t,e)})):[]}(t))}function se(t,e){try{return e in t}catch(t){return!1}}
|
|
169
|
+
// Protects from prototype poisoning and unexpected merging up the prototype chain.
|
|
170
|
+
function ae(t,e,r){var n={};return r.isMergeableObject(t)&&oe(t).forEach((function(e){n[e]=ne(t[e],r)})),oe(e).forEach((function(i){(function(t,e){return se(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e));// and also unsafe if they're nonenumerable.
|
|
171
|
+
})(t,i)||(se(t,i)&&r.isMergeableObject(e[i])?n[i]=function(t,e){if(!e.customMerge)return le;var r=e.customMerge(t);return"function"==typeof r?r:le}(i,r)(t[i],e[i],r):n[i]=ne(e[i],r))})),n}function le(t,e,r){(r=r||{}).arrayMerge=r.arrayMerge||ie,r.isMergeableObject=r.isMergeableObject||ee,
|
|
172
|
+
// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
|
|
173
|
+
// implementations can use it. The caller may not replace it.
|
|
174
|
+
r.cloneUnlessOtherwiseSpecified=ne;var n=Array.isArray(e);return n===Array.isArray(t)?n?r.arrayMerge(t,e,r):ae(t,e,r):ne(e,r)}le.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce((function(t,r){return le(t,r,e)}),{})};var he=le,ce=function(t,e){return ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},ce(t,e)};function ue(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}ce(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var fe,pe,de,me=function(){return me=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},me.apply(this,arguments)};function ge(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))}
|
|
175
|
+
/**
|
|
176
|
+
* Type Guards
|
|
177
|
+
*/
|
|
178
|
+
function ye(t){return t.type===pe.literal}function be(t){return t.type===pe.argument}function ve(t){return t.type===pe.number}function Ee(t){return t.type===pe.date}function we(t){return t.type===pe.time}function _e(t){return t.type===pe.select}function Te(t){return t.type===pe.plural}function Se(t){return t.type===pe.pound}function Pe(t){return t.type===pe.tag}function He(t){return!(!t||"object"!=typeof t||t.type!==de.number)}function Ae(t){return!(!t||"object"!=typeof t||t.type!==de.dateTime)}
|
|
179
|
+
// @generated from regex-gen.ts
|
|
180
|
+
"function"==typeof SuppressedError&&SuppressedError,function(t){
|
|
181
|
+
/** Argument is unclosed (e.g. `{0`) */
|
|
182
|
+
t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",
|
|
183
|
+
/** Argument is empty (e.g. `{}`). */
|
|
184
|
+
t[t.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",
|
|
185
|
+
/** Argument is malformed (e.g. `{foo!}``) */
|
|
186
|
+
t[t.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",
|
|
187
|
+
/** Expect an argument type (e.g. `{foo,}`) */
|
|
188
|
+
t[t.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",
|
|
189
|
+
/** Unsupported argument type (e.g. `{foo,foo}`) */
|
|
190
|
+
t[t.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",
|
|
191
|
+
/** Expect an argument style (e.g. `{foo, number, }`) */
|
|
192
|
+
t[t.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",
|
|
193
|
+
/** The number skeleton is invalid. */
|
|
194
|
+
t[t.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",
|
|
195
|
+
/** The date time skeleton is invalid. */
|
|
196
|
+
t[t.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",
|
|
197
|
+
/** Exepct a number skeleton following the `::` (e.g. `{foo, number, ::}`) */
|
|
198
|
+
t[t.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",
|
|
199
|
+
/** Exepct a date time skeleton following the `::` (e.g. `{foo, date, ::}`) */
|
|
200
|
+
t[t.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",
|
|
201
|
+
/** Unmatched apostrophes in the argument style (e.g. `{foo, number, 'test`) */
|
|
202
|
+
t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",
|
|
203
|
+
/** Missing select argument options (e.g. `{foo, select}`) */
|
|
204
|
+
t[t.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",
|
|
205
|
+
/** Expecting an offset value in `plural` or `selectordinal` argument (e.g `{foo, plural, offset}`) */
|
|
206
|
+
t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",
|
|
207
|
+
/** Offset value in `plural` or `selectordinal` is invalid (e.g. `{foo, plural, offset: x}`) */
|
|
208
|
+
t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",
|
|
209
|
+
/** Expecting a selector in `select` argument (e.g `{foo, select}`) */
|
|
210
|
+
t[t.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",
|
|
211
|
+
/** Expecting a selector in `plural` or `selectordinal` argument (e.g `{foo, plural}`) */
|
|
212
|
+
t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",
|
|
213
|
+
/** Expecting a message fragment after the `select` selector (e.g. `{foo, select, apple}`) */
|
|
214
|
+
t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",
|
|
215
|
+
/**
|
|
216
|
+
* Expecting a message fragment after the `plural` or `selectordinal` selector
|
|
217
|
+
* (e.g. `{foo, plural, one}`)
|
|
218
|
+
*/
|
|
219
|
+
t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",
|
|
220
|
+
/** Selector in `plural` or `selectordinal` is malformed (e.g. `{foo, plural, =x {#}}`) */
|
|
221
|
+
t[t.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",
|
|
222
|
+
/**
|
|
223
|
+
* Duplicate selectors in `plural` or `selectordinal` argument.
|
|
224
|
+
* (e.g. {foo, plural, one {#} one {#}})
|
|
225
|
+
*/
|
|
226
|
+
t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",
|
|
227
|
+
/** Duplicate selectors in `select` argument.
|
|
228
|
+
* (e.g. {foo, select, apple {apple} apple {apple}})
|
|
229
|
+
*/
|
|
230
|
+
t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",
|
|
231
|
+
/** Plural or select argument option must have `other` clause. */
|
|
232
|
+
t[t.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",
|
|
233
|
+
/** The tag is malformed. (e.g. `<bold!>foo</bold!>) */
|
|
234
|
+
t[t.INVALID_TAG=23]="INVALID_TAG",
|
|
235
|
+
/** The tag name is invalid. (e.g. `<123>foo</123>`) */
|
|
236
|
+
t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",
|
|
237
|
+
/** The closing tag does not match the opening tag. (e.g. `<bold>foo</italic>`) */
|
|
238
|
+
t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",
|
|
239
|
+
/** The opening tag has unmatched closing tag. (e.g. `<bold>foo`) */
|
|
240
|
+
t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(fe||(fe={})),function(t){
|
|
241
|
+
/**
|
|
242
|
+
* Raw text
|
|
243
|
+
*/
|
|
244
|
+
t[t.literal=0]="literal",
|
|
245
|
+
/**
|
|
246
|
+
* Variable w/o any format, e.g `var` in `this is a {var}`
|
|
247
|
+
*/
|
|
248
|
+
t[t.argument=1]="argument",
|
|
249
|
+
/**
|
|
250
|
+
* Variable w/ number format
|
|
251
|
+
*/
|
|
252
|
+
t[t.number=2]="number",
|
|
253
|
+
/**
|
|
254
|
+
* Variable w/ date format
|
|
255
|
+
*/
|
|
256
|
+
t[t.date=3]="date",
|
|
257
|
+
/**
|
|
258
|
+
* Variable w/ time format
|
|
259
|
+
*/
|
|
260
|
+
t[t.time=4]="time",
|
|
261
|
+
/**
|
|
262
|
+
* Variable w/ select format
|
|
263
|
+
*/
|
|
264
|
+
t[t.select=5]="select",
|
|
265
|
+
/**
|
|
266
|
+
* Variable w/ plural format
|
|
267
|
+
*/
|
|
268
|
+
t[t.plural=6]="plural",
|
|
269
|
+
/**
|
|
270
|
+
* Only possible within plural argument.
|
|
271
|
+
* This is the `#` symbol that will be substituted with the count.
|
|
272
|
+
*/
|
|
273
|
+
t[t.pound=7]="pound",
|
|
274
|
+
/**
|
|
275
|
+
* XML-like tag
|
|
276
|
+
*/
|
|
277
|
+
t[t.tag=8]="tag"}(pe||(pe={})),function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"}(de||(de={}));var Be=/[ \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;
|
|
278
|
+
/**
|
|
279
|
+
* https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
280
|
+
* Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js
|
|
281
|
+
* with some tweaks
|
|
282
|
+
*/
|
|
283
|
+
/**
|
|
284
|
+
* Parse Date time skeleton into Intl.DateTimeFormatOptions
|
|
285
|
+
* Ref: https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
286
|
+
* @public
|
|
287
|
+
* @param skeleton skeleton string
|
|
288
|
+
*/
|
|
289
|
+
function xe(t){var e={};return t.replace(Ce,(function(t){var r=t.length;switch(t[0]){
|
|
290
|
+
// Era
|
|
291
|
+
case"G":e.era=4===r?"long":5===r?"narrow":"short";break;
|
|
292
|
+
// Year
|
|
293
|
+
case"y":e.year=2===r?"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");
|
|
294
|
+
// Quarter
|
|
295
|
+
case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");
|
|
296
|
+
// Month
|
|
297
|
+
case"M":case"L":e.month=["numeric","2-digit","short","long","narrow"][r-1];break;
|
|
298
|
+
// Week
|
|
299
|
+
case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":e.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
|
|
300
|
+
// Weekday
|
|
301
|
+
case"E":e.weekday=4===r?"short":5===r?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][r-4];break;
|
|
302
|
+
// Period
|
|
303
|
+
case"a":// AM, PM
|
|
304
|
+
e.hour12=!0;break;case"b":// am, pm, noon, midnight
|
|
305
|
+
case"B":// flexible day periods
|
|
306
|
+
throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");
|
|
307
|
+
// Hour
|
|
308
|
+
case"h":e.hourCycle="h12",e.hour=["numeric","2-digit"][r-1];break;case"H":e.hourCycle="h23",e.hour=["numeric","2-digit"][r-1];break;case"K":e.hourCycle="h11",e.hour=["numeric","2-digit"][r-1];break;case"k":e.hourCycle="h24",e.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");
|
|
309
|
+
// Minute
|
|
310
|
+
case"m":e.minute=["numeric","2-digit"][r-1];break;
|
|
311
|
+
// Second
|
|
312
|
+
case"s":e.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");
|
|
313
|
+
// Zone
|
|
314
|
+
case"z":// 1..3, 4: specific non-location format
|
|
315
|
+
e.timeZoneName=r<4?"short":"long";break;case"Z":// 1..3, 4, 5: The ISO8601 varios formats
|
|
316
|
+
case"O":// 1, 4: miliseconds in day short, long
|
|
317
|
+
case"v":// 1, 4: generic non-location format
|
|
318
|
+
case"V":// 1, 2, 3, 4: time zone ID or city
|
|
319
|
+
case"X":// 1, 2, 3, 4: The ISO8601 varios formats
|
|
320
|
+
case"x":// 1, 2, 3, 4: The ISO8601 varios formats
|
|
321
|
+
throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),e}
|
|
322
|
+
// @generated from regex-gen.ts
|
|
323
|
+
var Le=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var Oe=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Ie=/^(@+)?(\+|#+)?[rs]?$/g,Ne=/(\*)(0+)|(#+)(0+)|(0+)/g,Me=/^(0+)$/;function Re(t){var e={};return"r"===t[t.length-1]?e.roundingPriority="morePrecision":"s"===t[t.length-1]&&(e.roundingPriority="lessPrecision"),t.replace(Ie,(function(t,r,n){
|
|
324
|
+
// @@@ case
|
|
325
|
+
return"string"!=typeof n?(e.minimumSignificantDigits=r.length,e.maximumSignificantDigits=r.length):"+"===n?e.minimumSignificantDigits=r.length:"#"===r[0]?e.maximumSignificantDigits=r.length:(e.minimumSignificantDigits=r.length,e.maximumSignificantDigits=r.length+("string"==typeof n?n.length:0)),""})),e}function ke(t){switch(t){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 Ue(t){
|
|
326
|
+
// Engineering
|
|
327
|
+
var e;if("E"===t[0]&&"E"===t[1]?(e={notation:"engineering"},t=t.slice(2)):"E"===t[0]&&(e={notation:"scientific"},t=t.slice(1)),e){var r=t.slice(0,2);if("+!"===r?(e.signDisplay="always",t=t.slice(2)):"+?"===r&&(e.signDisplay="exceptZero",t=t.slice(2)),!Me.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}function De(t){var e=ke(t);return e||{}}
|
|
328
|
+
/**
|
|
329
|
+
* https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options
|
|
330
|
+
*/function Fe(t){for(var e={},r=0,n=t;r<n.length;r++){var i=n[r];switch(i.stem){case"percent":case"%":e.style="percent";continue;case"%x100":e.style="percent",e.scale=100;continue;case"currency":e.style="currency",e.currency=i.options[0];continue;case"group-off":case",_":e.useGrouping=!1;continue;case"precision-integer":case".":e.maximumFractionDigits=0;continue;case"measure-unit":case"unit":e.style="unit",e.unit=i.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":e.notation="compact",e.compactDisplay="short";continue;case"compact-long":case"KK":e.notation="compact",e.compactDisplay="long";continue;case"scientific":e=me(me(me({},e),{notation:"scientific"}),i.options.reduce((function(t,e){return me(me({},t),De(e))}),{}));continue;case"engineering":e=me(me(me({},e),{notation:"engineering"}),i.options.reduce((function(t,e){return me(me({},t),De(e))}),{}));continue;case"notation-simple":e.notation="standard";continue;
|
|
331
|
+
// https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h
|
|
332
|
+
case"unit-width-narrow":e.currencyDisplay="narrowSymbol",e.unitDisplay="narrow";continue;case"unit-width-short":e.currencyDisplay="code",e.unitDisplay="short";continue;case"unit-width-full-name":e.currencyDisplay="name",e.unitDisplay="long";continue;case"unit-width-iso-code":e.currencyDisplay="symbol";continue;case"scale":e.scale=parseFloat(i.options[0]);continue;
|
|
333
|
+
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
|
|
334
|
+
case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Ne,(function(t,r,n,i,o,s){if(r)e.minimumIntegerDigits=n.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}
|
|
335
|
+
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
|
|
336
|
+
if(Me.test(i.stem))e.minimumIntegerDigits=i.stem.length;else if(Oe.test(i.stem)){
|
|
337
|
+
// Precision
|
|
338
|
+
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#fraction-precision
|
|
339
|
+
// precision-integer case
|
|
340
|
+
if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Oe,(function(t,r,n,i,o,s){
|
|
341
|
+
// .000* case (before ICU67 it was .000+)
|
|
342
|
+
return"*"===n?e.minimumFractionDigits=r.length:i&&"#"===i[0]?e.maximumFractionDigits=i.length:o&&s?(e.minimumFractionDigits=o.length,e.maximumFractionDigits=o.length+s.length):(e.minimumFractionDigits=r.length,e.maximumFractionDigits=r.length),""}));var o=i.options[0];
|
|
343
|
+
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#trailing-zero-display
|
|
344
|
+
"w"===o?e=me(me({},e),{trailingZeroDisplay:"stripIfInteger"}):o&&(e=me(me({},e),Re(o)))}
|
|
345
|
+
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#significant-digits-precision
|
|
346
|
+
else if(Ie.test(i.stem))e=me(me({},e),Re(i.stem));else{var s=ke(i.stem);s&&(e=me(me({},e),s));var a=Ue(i.stem);a&&(e=me(me({},e),a))}}return e}
|
|
347
|
+
// @generated from time-data-gen.ts
|
|
348
|
+
// prettier-ignore
|
|
349
|
+
var Ge,$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"]};
|
|
350
|
+
/**
|
|
351
|
+
* Returns the best matching date time pattern if a date time skeleton
|
|
352
|
+
* pattern is provided with a locale. Follows the Unicode specification:
|
|
353
|
+
* https://www.unicode.org/reports/tr35/tr35-dates.html#table-mapping-requested-time-skeletons-to-patterns
|
|
354
|
+
* @param skeleton date time skeleton pattern that possibly includes j, J or C
|
|
355
|
+
* @param locale
|
|
356
|
+
*/
|
|
357
|
+
/**
|
|
358
|
+
* Maps the [hour cycle type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/hourCycle)
|
|
359
|
+
* of the given `locale` to the corresponding time pattern.
|
|
360
|
+
* @param locale
|
|
361
|
+
*/
|
|
362
|
+
function je(t){var e=t.hourCycle;if(void 0===e&&
|
|
363
|
+
// @ts-ignore hourCycle(s) is not identified yet
|
|
364
|
+
t.hourCycles&&
|
|
365
|
+
// @ts-ignore
|
|
366
|
+
t.hourCycles.length&&(
|
|
367
|
+
// @ts-ignore
|
|
368
|
+
e=t.hourCycles[0]),e)switch(e){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}
|
|
369
|
+
// TODO: Once hourCycle is fully supported remove the following with data generation
|
|
370
|
+
var r,n=t.language;return"root"!==n&&(r=t.maximize().region),($e[r||""]||$e[n||""]||$e["".concat(n,"-001")]||$e["001"])[0]}var Xe=new RegExp("^".concat(Be.source,"*")),ze=new RegExp("".concat(Be.source,"*$"));function Ve(t,e){return{start:t,end:e}}
|
|
371
|
+
// #region Ponyfills
|
|
372
|
+
// Consolidate these variables up top for easier toggling during debugging
|
|
373
|
+
var We=!!String.prototype.startsWith,Ke=!!String.fromCodePoint,Ye=!!Object.fromEntries,Ze=!!String.prototype.codePointAt,qe=!!String.prototype.trimStart,Je=!!String.prototype.trimEnd,Qe=!!Number.isSafeInteger?Number.isSafeInteger:function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},tr=!0;try{
|
|
374
|
+
/**
|
|
375
|
+
* legacy Edge or Xbox One browser
|
|
376
|
+
* Unicode flag support: supported
|
|
377
|
+
* Pattern_Syntax support: not supported
|
|
378
|
+
* See https://github.com/formatjs/formatjs/issues/2822
|
|
379
|
+
*/
|
|
380
|
+
tr="a"===(null===(Ge=lr("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===Ge?void 0:Ge[0])}catch(t){tr=!1}var er,rr=We?// Native
|
|
381
|
+
function(t,e,r){return t.startsWith(e,r)}:// For IE11
|
|
382
|
+
function(t,e,r){return t.slice(r,r+e.length)===e},nr=Ke?String.fromCodePoint:// IE11
|
|
383
|
+
function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r,n="",i=t.length,o=0;i>o;){if((r=t[o++])>1114111)throw RangeError(r+" is not a valid code point");n+=r<65536?String.fromCharCode(r):String.fromCharCode(55296+((r-=65536)>>10),r%1024+56320)}return n},ir=
|
|
384
|
+
// native
|
|
385
|
+
Ye?Object.fromEntries:// Ponyfill
|
|
386
|
+
function(t){for(var e={},r=0,n=t;r<n.length;r++){var i=n[r],o=i[0],s=i[1];e[o]=s}return e},or=Ze?// Native
|
|
387
|
+
function(t,e){return t.codePointAt(e)}:// IE 11
|
|
388
|
+
function(t,e){var r=t.length;if(!(e<0||e>=r)){var n,i=t.charCodeAt(e);return i<55296||i>56319||e+1===r||(n=t.charCodeAt(e+1))<56320||n>57343?i:n-56320+(i-55296<<10)+65536}},sr=qe?// Native
|
|
389
|
+
function(t){return t.trimStart()}:// Ponyfill
|
|
390
|
+
function(t){return t.replace(Xe,"")},ar=Je?// Native
|
|
391
|
+
function(t){return t.trimEnd()}:// Ponyfill
|
|
392
|
+
function(t){return t.replace(ze,"")};
|
|
393
|
+
// Prevent minifier to translate new RegExp to literal form that might cause syntax error on IE11.
|
|
394
|
+
function lr(t,e){return new RegExp(t,e)}
|
|
395
|
+
// #endregion
|
|
396
|
+
if(tr){
|
|
397
|
+
// Native
|
|
398
|
+
var hr=lr("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");er=function(t,e){var r;return hr.lastIndex=e,null!==(r=hr.exec(t)[1])&&void 0!==r?r:""}}else
|
|
399
|
+
// IE11
|
|
400
|
+
er=function(t,e){for(var r=[];;){var n=or(t,e);if(void 0===n||pr(n)||dr(n))break;r.push(n),e+=n>=65536?2:1}return nr.apply(void 0,r)};var cr=/** @class */function(){function t(t,e){void 0===e&&(e={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!e.ignoreTag,this.locale=e.locale,this.requiresOtherClause=!!e.requiresOtherClause,this.shouldParseSkeletons=!!e.shouldParseSkeletons}return t.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(t,e,r){for(var n=[];!this.isEOF();){var i=this.char();if(123/* `{` */===i){if((o=this.parseArgument(t,r)).err)return o;n.push(o.val)}else{if(125/* `}` */===i&&t>0)break;if(35/* `#` */!==i||"plural"!==e&&"selectordinal"!==e){if(60/* `<` */===i&&!this.ignoreTag&&47===this.peek()){if(r)break;return this.error(fe.UNMATCHED_CLOSING_TAG,Ve(this.clonePosition(),this.clonePosition()))}if(60/* `<` */===i&&!this.ignoreTag&&ur(this.peek()||0)){if((o=this.parseTag(t,e)).err)return o;n.push(o.val)}else{var o;if((o=this.parseLiteral(t,e)).err)return o;n.push(o.val)}}else{var s=this.clonePosition();this.bump(),n.push({type:pe.pound,location:Ve(s,this.clonePosition())})}}}return{val:n,err:null}},
|
|
401
|
+
/**
|
|
402
|
+
* A tag name must start with an ASCII lower/upper case letter. The grammar is based on the
|
|
403
|
+
* [custom element name][] except that a dash is NOT always mandatory and uppercase letters
|
|
404
|
+
* are accepted:
|
|
405
|
+
*
|
|
406
|
+
* ```
|
|
407
|
+
* tag ::= "<" tagName (whitespace)* "/>" | "<" tagName (whitespace)* ">" message "</" tagName (whitespace)* ">"
|
|
408
|
+
* tagName ::= [a-z] (PENChar)*
|
|
409
|
+
* PENChar ::=
|
|
410
|
+
* "-" | "." | [0-9] | "_" | [a-z] | [A-Z] | #xB7 | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x37D] |
|
|
411
|
+
* [#x37F-#x1FFF] | [#x200C-#x200D] | [#x203F-#x2040] | [#x2070-#x218F] | [#x2C00-#x2FEF] |
|
|
412
|
+
* [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
|
|
413
|
+
* ```
|
|
414
|
+
*
|
|
415
|
+
* [custom element name]: https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name
|
|
416
|
+
* NOTE: We're a bit more lax here since HTML technically does not allow uppercase HTML element but we do
|
|
417
|
+
* since other tag-based engines like React allow it
|
|
418
|
+
*/
|
|
419
|
+
t.prototype.parseTag=function(t,e){var r=this.clonePosition();this.bump();// `<`
|
|
420
|
+
var n=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))
|
|
421
|
+
// Self closing tag
|
|
422
|
+
return{val:{type:pe.literal,value:"<".concat(n,"/>"),location:Ve(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,e,!0);if(i.err)return i;var o=i.val,s=this.clonePosition();
|
|
423
|
+
// Expecting a close tag
|
|
424
|
+
if(this.bumpIf("</")){if(this.isEOF()||!ur(this.char()))return this.error(fe.INVALID_TAG,Ve(s,this.clonePosition()));var a=this.clonePosition();return n!==this.parseTagName()?this.error(fe.UNMATCHED_CLOSING_TAG,Ve(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:pe.tag,value:n,children:o,location:Ve(r,this.clonePosition())},err:null}:this.error(fe.INVALID_TAG,Ve(s,this.clonePosition())))}return this.error(fe.UNCLOSED_TAG,Ve(r,this.clonePosition()))}return this.error(fe.INVALID_TAG,Ve(r,this.clonePosition()))},
|
|
425
|
+
/**
|
|
426
|
+
* This method assumes that the caller has peeked ahead for the first tag character.
|
|
427
|
+
*/
|
|
428
|
+
t.prototype.parseTagName=function(){var t=this.offset();// the first tag name character
|
|
429
|
+
for(this.bump();!this.isEOF()&&fr(this.char());)this.bump();return this.message.slice(t,this.offset())},t.prototype.parseLiteral=function(t,e){for(var r=this.clonePosition(),n="";;){var i=this.tryParseQuote(e);if(i)n+=i;else{var o=this.tryParseUnquoted(t,e);if(o)n+=o;else{var s=this.tryParseLeftAngleBracket();if(!s)break;n+=s}}}var a=Ve(r,this.clonePosition());return{val:{type:pe.literal,value:n,location:a},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60/* `<` */!==this.char()||!this.ignoreTag&&(ur(t=this.peek()||0)||47===t)?null:(this.bump(),"<");var t;
|
|
430
|
+
/** See `parseTag` function docs. */},
|
|
431
|
+
/**
|
|
432
|
+
* Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes
|
|
433
|
+
* a character that requires quoting (that is, "only where needed"), and works the same in
|
|
434
|
+
* nested messages as on the top level of the pattern. The new behavior is otherwise compatible.
|
|
435
|
+
*/
|
|
436
|
+
t.prototype.tryParseQuote=function(t){if(this.isEOF()||39/* `'` */!==this.char())return null;
|
|
437
|
+
// Parse escaped char following the apostrophe, or early return if there is no escaped char.
|
|
438
|
+
// Check if is valid escaped character
|
|
439
|
+
switch(this.peek()){case 39/* `'` */:
|
|
440
|
+
// double quote, should return as a single quote.
|
|
441
|
+
return this.bump(),this.bump(),"'";
|
|
442
|
+
// '{', '<', '>', '}'
|
|
443
|
+
case 123:case 60:case 62:case 125:break;case 35:// '#'
|
|
444
|
+
if("plural"===t||"selectordinal"===t)break;return null;default:return null}this.bump();// apostrophe
|
|
445
|
+
var e=[this.char()];// escaped char
|
|
446
|
+
// read chars until the optional closing apostrophe is found
|
|
447
|
+
for(this.bump();!this.isEOF();){var r=this.char();if(39/* `'` */===r){if(39/* `'` */!==this.peek()){
|
|
448
|
+
// Optional closing apostrophe.
|
|
449
|
+
this.bump();break}e.push(39),
|
|
450
|
+
// Bump one more time because we need to skip 2 characters.
|
|
451
|
+
this.bump()}else e.push(r);this.bump()}return nr.apply(void 0,e)},t.prototype.tryParseUnquoted=function(t,e){if(this.isEOF())return null;var r=this.char();return 60/* `<` */===r||123/* `{` */===r||35/* `#` */===r&&("plural"===e||"selectordinal"===e)||125/* `}` */===r&&t>0?null:(this.bump(),nr(r))},t.prototype.parseArgument=function(t,e){var r=this.clonePosition();if(this.bump(),// `{`
|
|
452
|
+
this.bumpSpace(),this.isEOF())return this.error(fe.EXPECT_ARGUMENT_CLOSING_BRACE,Ve(r,this.clonePosition()));if(125/* `}` */===this.char())return this.bump(),this.error(fe.EMPTY_ARGUMENT,Ve(r,this.clonePosition()));
|
|
453
|
+
// argument name
|
|
454
|
+
var n=this.parseIdentifierIfPossible().value;if(!n)return this.error(fe.MALFORMED_ARGUMENT,Ve(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(fe.EXPECT_ARGUMENT_CLOSING_BRACE,Ve(r,this.clonePosition()));switch(this.char()){
|
|
455
|
+
// Simple argument: `{name}`
|
|
456
|
+
case 125/* `}` */:// `}`
|
|
457
|
+
return this.bump(),{val:{type:pe.argument,
|
|
458
|
+
// value does not include the opening and closing braces.
|
|
459
|
+
value:n,location:Ve(r,this.clonePosition())},err:null};
|
|
460
|
+
// Argument with options: `{name, format, ...}`
|
|
461
|
+
case 44/* `,` */:return this.bump(),// `,`
|
|
462
|
+
this.bumpSpace(),this.isEOF()?this.error(fe.EXPECT_ARGUMENT_CLOSING_BRACE,Ve(r,this.clonePosition())):this.parseArgumentOptions(t,e,n,r);default:return this.error(fe.MALFORMED_ARGUMENT,Ve(r,this.clonePosition()))}},
|
|
463
|
+
/**
|
|
464
|
+
* Advance the parser until the end of the identifier, if it is currently on
|
|
465
|
+
* an identifier character. Return an empty string otherwise.
|
|
466
|
+
*/
|
|
467
|
+
t.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),e=this.offset(),r=er(this.message,e),n=e+r.length;return this.bumpTo(n),{value:r,location:Ve(t,this.clonePosition())}},t.prototype.parseArgumentOptions=function(t,e,r,n){var i,o=this.clonePosition(),s=this.parseIdentifierIfPossible().value,a=this.clonePosition();
|
|
468
|
+
// Parse this range:
|
|
469
|
+
// {name, type, style}
|
|
470
|
+
// ^---^
|
|
471
|
+
switch(s){case"":
|
|
472
|
+
// Expecting a style string number, date, time, plural, selectordinal, or select.
|
|
473
|
+
return this.error(fe.EXPECT_ARGUMENT_TYPE,Ve(o,a));case"number":case"date":case"time":
|
|
474
|
+
// Parse this range:
|
|
475
|
+
// {name, number, style}
|
|
476
|
+
// ^-------^
|
|
477
|
+
this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition();if((y=this.parseSimpleArgStyleIfPossible()).err)return y;if(0===(p=ar(y.val)).length)return this.error(fe.EXPECT_ARGUMENT_STYLE,Ve(this.clonePosition(),this.clonePosition()));l={style:p,styleLocation:Ve(h,this.clonePosition())}}if((b=this.tryParseArgumentClose(n)).err)return b;var c=Ve(n,this.clonePosition());
|
|
478
|
+
// Extract style or skeleton
|
|
479
|
+
if(l&&rr(null==l?void 0:l.style,"::",0)){
|
|
480
|
+
// Skeleton starts with `::`.
|
|
481
|
+
var u=sr(l.style.slice(2));if("number"===s)return(y=this.parseNumberSkeletonFromString(u,l.styleLocation)).err?y:{val:{type:pe.number,value:r,location:c,style:y.val},err:null};if(0===u.length)return this.error(fe.EXPECT_DATE_TIME_SKELETON,c);var f=u;
|
|
482
|
+
// Get "best match" pattern only if locale is passed, if not, let it
|
|
483
|
+
// pass as-is where `parseDateTimeSkeleton()` will throw an error
|
|
484
|
+
// for unsupported patterns.
|
|
485
|
+
this.locale&&(f=function(t,e){for(var r="",n=0;n<t.length;n++){var i=t.charAt(n);if("j"===i){for(var o=0;n+1<t.length&&t.charAt(n+1)===i;)o++,n++;var s=1+(1&o),a=o<2?1:3+(o>>1),l=je(e);for("H"!=l&&"k"!=l||(a=0);a-- >0;)r+="a";for(;s-- >0;)r=l+r}else r+="J"===i?"H":i}return r}(u,this.locale));var p={type:de.dateTime,pattern:f,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?xe(f):{}};return{val:{type:"date"===s?pe.date:pe.time,value:r,location:c,style:p},err:null}}
|
|
486
|
+
// Regular style or no style.
|
|
487
|
+
return{val:{type:"number"===s?pe.number:"date"===s?pe.date:pe.time,value:r,location:c,style:null!==(i=null==l?void 0:l.style)&&void 0!==i?i:null},err:null};case"plural":case"selectordinal":case"select":
|
|
488
|
+
// Parse this range:
|
|
489
|
+
// {name, plural, options}
|
|
490
|
+
// ^---------^
|
|
491
|
+
var d=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(fe.EXPECT_SELECT_ARGUMENT_OPTIONS,Ve(d,me({},d)));this.bumpSpace();
|
|
492
|
+
// Parse offset:
|
|
493
|
+
// {name, plural, offset:1, options}
|
|
494
|
+
// ^-----^
|
|
495
|
+
// or the first option:
|
|
496
|
+
// {name, plural, one {...} other {...}}
|
|
497
|
+
// ^--^
|
|
498
|
+
var m=this.parseIdentifierIfPossible(),g=0;if("select"!==s&&"offset"===m.value){if(!this.bumpIf(":"))return this.error(fe.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ve(this.clonePosition(),this.clonePosition()));var y;if(this.bumpSpace(),(y=this.tryParseDecimalInteger(fe.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,fe.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return y;
|
|
499
|
+
// Parse another identifier for option parsing
|
|
500
|
+
this.bumpSpace(),m=this.parseIdentifierIfPossible(),g=y.val}var b,v=this.tryParsePluralOrSelectOptions(t,s,e,m);if(v.err)return v;if((b=this.tryParseArgumentClose(n)).err)return b;var E=Ve(n,this.clonePosition());return"select"===s?{val:{type:pe.select,value:r,options:ir(v.val),location:E},err:null}:{val:{type:pe.plural,value:r,options:ir(v.val),offset:g,pluralType:"plural"===s?"cardinal":"ordinal",location:E},err:null};default:return this.error(fe.INVALID_ARGUMENT_TYPE,Ve(o,a))}},t.prototype.tryParseArgumentClose=function(t){
|
|
501
|
+
// Parse: {value, number, ::currency/GBP }
|
|
502
|
+
return this.isEOF()||125/* `}` */!==this.char()?this.error(fe.EXPECT_ARGUMENT_CLOSING_BRACE,Ve(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},
|
|
503
|
+
/**
|
|
504
|
+
* See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659
|
|
505
|
+
*/
|
|
506
|
+
t.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,e=this.clonePosition();!this.isEOF();){switch(this.char()){case 39/* `'` */:
|
|
507
|
+
// Treat apostrophe as quoting but include it in the style part.
|
|
508
|
+
// Find the end of the quoted literal text.
|
|
509
|
+
this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(fe.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Ve(r,this.clonePosition()));this.bump();break;case 123/* `{` */:t+=1,this.bump();break;case 125/* `}` */:if(!(t>0))return{val:this.message.slice(e.offset,this.offset()),err:null};t-=1;break;default:this.bump()}}return{val:this.message.slice(e.offset,this.offset()),err:null}},t.prototype.parseNumberSkeletonFromString=function(t,e){var r=[];try{r=function(t){if(0===t.length)throw new Error("Number skeleton cannot be empty");
|
|
510
|
+
// Parse the skeleton
|
|
511
|
+
for(var e=t.split(Le).filter((function(t){return t.length>0})),r=[],n=0,i=e;n<i.length;n++){var o=i[n].split("/");if(0===o.length)throw new Error("Invalid number skeleton");for(var s=o[0],a=o.slice(1),l=0,h=a;l<h.length;l++)if(0===h[l].length)throw new Error("Invalid number skeleton");r.push({stem:s,options:a})}return r}(t)}catch(t){return this.error(fe.INVALID_NUMBER_SKELETON,e)}return{val:{type:de.number,tokens:r,location:e,parsedOptions:this.shouldParseSkeletons?Fe(r):{}},err:null}},
|
|
512
|
+
/**
|
|
513
|
+
* @param nesting_level The current nesting level of messages.
|
|
514
|
+
* This can be positive when parsing message fragment in select or plural argument options.
|
|
515
|
+
* @param parent_arg_type The parent argument's type.
|
|
516
|
+
* @param parsed_first_identifier If provided, this is the first identifier-like selector of
|
|
517
|
+
* the argument. It is a by-product of a previous parsing attempt.
|
|
518
|
+
* @param expecting_close_tag If true, this message is directly or indirectly nested inside
|
|
519
|
+
* between a pair of opening and closing tags. The nested message will not parse beyond
|
|
520
|
+
* the closing tag boundary.
|
|
521
|
+
*/
|
|
522
|
+
t.prototype.tryParsePluralOrSelectOptions=function(t,e,r,n){
|
|
523
|
+
// Parse:
|
|
524
|
+
// one {one apple}
|
|
525
|
+
// ^--^
|
|
526
|
+
for(var i,o=!1,s=[],a=new Set,l=n.value,h=n.location;;){if(0===l.length){var c=this.clonePosition();if("select"===e||!this.bumpIf("="))break;
|
|
527
|
+
// Try parse `={number}` selector
|
|
528
|
+
var u=this.tryParseDecimalInteger(fe.EXPECT_PLURAL_ARGUMENT_SELECTOR,fe.INVALID_PLURAL_ARGUMENT_SELECTOR);if(u.err)return u;h=Ve(c,this.clonePosition()),l=this.message.slice(c.offset,this.offset())}
|
|
529
|
+
// Duplicate selector clauses
|
|
530
|
+
if(a.has(l))return this.error("select"===e?fe.DUPLICATE_SELECT_ARGUMENT_SELECTOR:fe.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);"other"===l&&(o=!0),
|
|
531
|
+
// Parse:
|
|
532
|
+
// one {one apple}
|
|
533
|
+
// ^----------^
|
|
534
|
+
this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===e?fe.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:fe.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Ve(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(t+1,e,r);if(p.err)return p;var d=this.tryParseArgumentClose(f);if(d.err)return d;s.push([l,{value:p.val,location:Ve(f,this.clonePosition())}]),
|
|
535
|
+
// Keep track of the existing selectors
|
|
536
|
+
a.add(l),
|
|
537
|
+
// Prep next selector clause.
|
|
538
|
+
this.bumpSpace(),l=(i=this.parseIdentifierIfPossible()).value,h=i.location}return 0===s.length?this.error("select"===e?fe.EXPECT_SELECT_ARGUMENT_SELECTOR:fe.EXPECT_PLURAL_ARGUMENT_SELECTOR,Ve(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(fe.MISSING_OTHER_CLAUSE,Ve(this.clonePosition(),this.clonePosition())):{val:s,err:null}},t.prototype.tryParseDecimalInteger=function(t,e){var r=1,n=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-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=Ve(n,this.clonePosition());return i?Qe(o*=r)?{val:o,err:null}:this.error(e,a):this.error(t,a)},t.prototype.offset=function(){return this.position.offset},t.prototype.isEOF=function(){return this.offset()===this.message.length},t.prototype.clonePosition=function(){
|
|
539
|
+
// This is much faster than `Object.assign` or spread.
|
|
540
|
+
return{offset:this.position.offset,line:this.position.line,column:this.position.column}},
|
|
541
|
+
/**
|
|
542
|
+
* Return the code point at the current position of the parser.
|
|
543
|
+
* Throws if the index is out of bound.
|
|
544
|
+
*/
|
|
545
|
+
t.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var e=or(this.message,t);if(void 0===e)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return e},t.prototype.error=function(t,e){return{val:null,err:{kind:t,message:this.message,location:e}}},
|
|
546
|
+
/** Bump the parser to the next UTF-16 code unit. */
|
|
547
|
+
t.prototype.bump=function(){if(!this.isEOF()){var t=this.char();10/* '\n' */===t?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,
|
|
548
|
+
// 0 ~ 0x10000 -> unicode BMP, otherwise skip the surrogate pair.
|
|
549
|
+
this.position.offset+=t<65536?1:2)}},
|
|
550
|
+
/**
|
|
551
|
+
* If the substring starting at the current position of the parser has
|
|
552
|
+
* the given prefix, then bump the parser to the character immediately
|
|
553
|
+
* following the prefix and return true. Otherwise, don't bump the parser
|
|
554
|
+
* and return false.
|
|
555
|
+
*/
|
|
556
|
+
t.prototype.bumpIf=function(t){if(rr(this.message,t,this.offset())){for(var e=0;e<t.length;e++)this.bump();return!0}return!1},
|
|
557
|
+
/**
|
|
558
|
+
* Bump the parser until the pattern character is found and return `true`.
|
|
559
|
+
* Otherwise bump to the end of the file and return `false`.
|
|
560
|
+
*/
|
|
561
|
+
t.prototype.bumpUntil=function(t){var e=this.offset(),r=this.message.indexOf(t,e);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},
|
|
562
|
+
/**
|
|
563
|
+
* Bump the parser to the target offset.
|
|
564
|
+
* If target offset is beyond the end of the input, bump the parser to the end of the input.
|
|
565
|
+
*/
|
|
566
|
+
t.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var e=this.offset();if(e===t)break;if(e>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},
|
|
567
|
+
/** advance the parser through all whitespace to the next non-whitespace code unit. */
|
|
568
|
+
t.prototype.bumpSpace=function(){for(;!this.isEOF()&&pr(this.char());)this.bump()},
|
|
569
|
+
/**
|
|
570
|
+
* Peek at the *next* Unicode codepoint in the input without advancing the parser.
|
|
571
|
+
* If the input has been exhausted, then this returns null.
|
|
572
|
+
*/
|
|
573
|
+
t.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),e=this.offset(),r=this.message.charCodeAt(e+(t>=65536?2:1));return null!=r?r:null},t}();
|
|
574
|
+
/**
|
|
575
|
+
* This check if codepoint is alphabet (lower & uppercase)
|
|
576
|
+
* @param codepoint
|
|
577
|
+
* @returns
|
|
578
|
+
*/function ur(t){return t>=97&&t<=122||t>=65&&t<=90}function fr(t){return 45/* '-' */===t||46/* '.' */===t||t>=48&&t<=57/* 0..9 */||95/* '_' */===t||t>=97&&t<=122/** a..z */||t>=65&&t<=90/* A..Z */||183==t||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8255&&t<=8256||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}
|
|
579
|
+
/**
|
|
580
|
+
* Code point equivalent of regex `\p{White_Space}`.
|
|
581
|
+
* From: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
|
|
582
|
+
*/function pr(t){return t>=9&&t<=13||32===t||133===t||t>=8206&&t<=8207||8232===t||8233===t}
|
|
583
|
+
/**
|
|
584
|
+
* Code point equivalent of regex `\p{Pattern_Syntax}`.
|
|
585
|
+
* See https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
|
|
586
|
+
*/function dr(t){return t>=33&&t<=35||36===t||t>=37&&t<=39||40===t||41===t||42===t||43===t||44===t||45===t||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||91===t||92===t||93===t||94===t||96===t||123===t||124===t||125===t||126===t||161===t||t>=162&&t<=165||166===t||167===t||169===t||171===t||172===t||174===t||176===t||177===t||182===t||187===t||191===t||215===t||247===t||t>=8208&&t<=8213||t>=8214&&t<=8215||8216===t||8217===t||8218===t||t>=8219&&t<=8220||8221===t||8222===t||8223===t||t>=8224&&t<=8231||t>=8240&&t<=8248||8249===t||8250===t||t>=8251&&t<=8254||t>=8257&&t<=8259||8260===t||8261===t||8262===t||t>=8263&&t<=8273||8274===t||8275===t||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||8608===t||t>=8609&&t<=8610||8611===t||t>=8612&&t<=8613||8614===t||t>=8615&&t<=8621||8622===t||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||8658===t||8659===t||8660===t||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||8968===t||8969===t||8970===t||8971===t||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||9001===t||9002===t||t>=9003&&t<=9083||9084===t||t>=9085&&t<=9114||t>=9115&&t<=9139||t>=9140&&t<=9179||t>=9180&&t<=9185||t>=9186&&t<=9254||t>=9255&&t<=9279||t>=9280&&t<=9290||t>=9291&&t<=9311||t>=9472&&t<=9654||9655===t||t>=9656&&t<=9664||9665===t||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||9839===t||t>=9840&&t<=10087||10088===t||10089===t||10090===t||10091===t||10092===t||10093===t||10094===t||10095===t||10096===t||10097===t||10098===t||10099===t||10100===t||10101===t||t>=10132&&t<=10175||t>=10176&&t<=10180||10181===t||10182===t||t>=10183&&t<=10213||10214===t||10215===t||10216===t||10217===t||10218===t||10219===t||10220===t||10221===t||10222===t||10223===t||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||10627===t||10628===t||10629===t||10630===t||10631===t||10632===t||10633===t||10634===t||10635===t||10636===t||10637===t||10638===t||10639===t||10640===t||10641===t||10642===t||10643===t||10644===t||10645===t||10646===t||10647===t||10648===t||t>=10649&&t<=10711||10712===t||10713===t||10714===t||10715===t||t>=10716&&t<=10747||10748===t||10749===t||t>=10750&&t<=11007||t>=11008&&t<=11055||t>=11056&&t<=11076||t>=11077&&t<=11078||t>=11079&&t<=11084||t>=11085&&t<=11123||t>=11124&&t<=11125||t>=11126&&t<=11157||11158===t||t>=11159&&t<=11263||t>=11776&&t<=11777||11778===t||11779===t||11780===t||11781===t||t>=11782&&t<=11784||11785===t||11786===t||11787===t||11788===t||11789===t||t>=11790&&t<=11798||11799===t||t>=11800&&t<=11801||11802===t||11803===t||11804===t||11805===t||t>=11806&&t<=11807||11808===t||11809===t||11810===t||11811===t||11812===t||11813===t||11814===t||11815===t||11816===t||11817===t||t>=11818&&t<=11822||11823===t||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||11840===t||11841===t||11842===t||t>=11843&&t<=11855||t>=11856&&t<=11857||11858===t||t>=11859&&t<=11903||t>=12289&&t<=12291||12296===t||12297===t||12298===t||12299===t||12300===t||12301===t||12302===t||12303===t||12304===t||12305===t||t>=12306&&t<=12307||12308===t||12309===t||12310===t||12311===t||12312===t||12313===t||12314===t||12315===t||12316===t||12317===t||t>=12318&&t<=12319||12320===t||12336===t||64830===t||64831===t||t>=65093&&t<=65094}function mr(t){t.forEach((function(t){if(delete t.location,_e(t)||Te(t))for(var e in t.options)delete t.options[e].location,mr(t.options[e].value);else ve(t)&&He(t.style)||(Ee(t)||we(t))&&Ae(t.style)?delete t.style.location:Pe(t)&&mr(t.children)}))}function gr(t,e){void 0===e&&(e={}),e=me({shouldParseSkeletons:!0,requiresOtherClause:!0},e);var r=new cr(t,e).parse();if(r.err){var n=SyntaxError(fe[r.err.kind]);
|
|
587
|
+
// @ts-expect-error Assign to error object
|
|
588
|
+
throw n.location=r.err.location,
|
|
589
|
+
// @ts-expect-error Assign to error object
|
|
590
|
+
n.originalMessage=r.err.message,n}return(null==e?void 0:e.captureLocation)||mr(r.val),r.val}
|
|
591
|
+
|
|
592
|
+
// Main
|
|
593
|
+
|
|
594
|
+
function yr(t,e){var r=e&&e.cache?e.cache:Pr,n=e&&e.serializer?e.serializer:_r;return(e&&e.strategy?e.strategy:wr)(t,{cache:r,serializer:n})}
|
|
595
|
+
|
|
596
|
+
// Strategy
|
|
597
|
+
|
|
598
|
+
function br(t,e,r,n){var i,o=null==(i=n)||"number"==typeof i||"boolean"==typeof i?n:r(n),s=e.get(o);return void 0===s&&(s=t.call(this,n),e.set(o,s)),s}function vr(t,e,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),o=e.get(i);return void 0===o&&(o=t.apply(this,n),e.set(i,o)),o}function Er(t,e,r,n,i){return r.bind(e,t,n,i)}function wr(t,e){return Er(t,this,1===t.length?br:vr,e.cache.create(),e.serializer)}
|
|
599
|
+
// Serializer
|
|
600
|
+
var _r=function(){return JSON.stringify(arguments)};
|
|
601
|
+
|
|
602
|
+
// Cache
|
|
603
|
+
|
|
604
|
+
function Tr(){this.cache=Object.create(null)}Tr.prototype.get=function(t){return this.cache[t]},Tr.prototype.set=function(t,e){this.cache[t]=e};var Sr,Pr={create:function(){
|
|
605
|
+
// @ts-ignore
|
|
606
|
+
return new Tr}},Hr={variadic:function(t,e){return Er(t,this,vr,e.cache.create(),e.serializer)},monadic:function(t,e){return Er(t,this,br,e.cache.create(),e.serializer)}};!function(t){
|
|
607
|
+
// When we have a placeholder but no value to format
|
|
608
|
+
t.MISSING_VALUE="MISSING_VALUE",
|
|
609
|
+
// When value supplied is invalid
|
|
610
|
+
t.INVALID_VALUE="INVALID_VALUE",
|
|
611
|
+
// When we need specific Intl API but it's not available
|
|
612
|
+
t.MISSING_INTL_API="MISSING_INTL_API"}(Sr||(Sr={}));var Ar,Br=/** @class */function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.code=r,i.originalMessage=n,i}return ue(e,t),e.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},e}(Error),Cr=/** @class */function(t){function e(e,r,n,i){return t.call(this,'Invalid values for "'.concat(e,'": "').concat(r,'". Options are "').concat(Object.keys(n).join('", "'),'"'),Sr.INVALID_VALUE,i)||this}return ue(e,t),e}(Br),xr=/** @class */function(t){function e(e,r,n){return t.call(this,'Value for "'.concat(e,'" must be of type ').concat(r),Sr.INVALID_VALUE,n)||this}return ue(e,t),e}(Br),Lr=/** @class */function(t){function e(e,r){return t.call(this,'The intl string context variable "'.concat(e,'" was not provided to the string "').concat(r,'"'),Sr.MISSING_VALUE,r)||this}return ue(e,t),e}(Br);function Or(t){return"function"==typeof t}
|
|
613
|
+
// TODO(skeleton): add skeleton support
|
|
614
|
+
function Ir(t,e,r,n,i,o,
|
|
615
|
+
// For debugging
|
|
616
|
+
s){
|
|
617
|
+
// Hot path for straight simple msg translations
|
|
618
|
+
if(1===t.length&&ye(t[0]))return[{type:Ar.literal,value:t[0].value}];for(var a=[],l=0,h=t;l<h.length;l++){var c=h[l];
|
|
619
|
+
// Exit early for string parts.
|
|
620
|
+
if(ye(c))a.push({type:Ar.literal,value:c.value});else
|
|
621
|
+
// TODO: should this part be literal type?
|
|
622
|
+
// Replace `#` in plural rules with the actual numeric value.
|
|
623
|
+
if(Se(c))"number"==typeof o&&a.push({type:Ar.literal,value:r.getNumberFormat(e).format(o)});else{var u=c.value;
|
|
624
|
+
// Enforce that all required values are provided by the caller.
|
|
625
|
+
if(!i||!(u in i))throw new Lr(u,s);var f=i[u];if(be(c))f&&"string"!=typeof f&&"number"!=typeof f||(f="string"==typeof f||"number"==typeof f?String(f):""),a.push({type:"string"==typeof f?Ar.literal:Ar.object,value:f});else
|
|
626
|
+
// Recursively format plural and select parts' option — which can be a
|
|
627
|
+
// nested pattern structure. The choosing of the option to use is
|
|
628
|
+
// abstracted-by and delegated-to the part helper object.
|
|
629
|
+
if(Ee(c)){var p="string"==typeof c.style?n.date[c.style]:Ae(c.style)?c.style.parsedOptions:void 0;a.push({type:Ar.literal,value:r.getDateTimeFormat(e,p).format(f)})}else if(we(c)){p="string"==typeof c.style?n.time[c.style]:Ae(c.style)?c.style.parsedOptions:n.time.medium;a.push({type:Ar.literal,value:r.getDateTimeFormat(e,p).format(f)})}else if(ve(c)){(p="string"==typeof c.style?n.number[c.style]:He(c.style)?c.style.parsedOptions:void 0)&&p.scale&&(f*=p.scale||1),a.push({type:Ar.literal,value:r.getNumberFormat(e,p).format(f)})}else{if(Pe(c)){var d=c.children,m=c.value,g=i[m];if(!Or(g))throw new xr(m,"function",s);var y=g(Ir(d,e,r,n,i,o).map((function(t){return t.value})));Array.isArray(y)||(y=[y]),a.push.apply(a,y.map((function(t){return{type:"string"==typeof t?Ar.literal:Ar.object,value:t}})))}if(_e(c)){if(!(b=c.options[f]||c.options.other))throw new Cr(c.value,f,Object.keys(c.options),s);a.push.apply(a,Ir(b.value,e,r,n,i))}else if(Te(c)){var b;if(!(b=c.options["=".concat(f)])){if(!Intl.PluralRules)throw new Br('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',Sr.MISSING_INTL_API,s);var v=r.getPluralRules(e,{type:c.pluralType}).select(f-(c.offset||0));b=c.options[v]||c.options.other}if(!b)throw new Cr(c.value,f,Object.keys(c.options),s);a.push.apply(a,Ir(b.value,e,r,n,i,f-(c.offset||0)))}else;}}}return function(t){return t.length<2?t:t.reduce((function(t,e){var r=t[t.length-1];return r&&r.type===Ar.literal&&e.type===Ar.literal?r.value+=e.value:t.push(e),t}),[])}(a)}
|
|
630
|
+
/*
|
|
631
|
+
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
|
|
632
|
+
Copyrights licensed under the New BSD License.
|
|
633
|
+
See the accompanying LICENSE file for terms.
|
|
634
|
+
*/
|
|
635
|
+
// -- MessageFormat --------------------------------------------------------
|
|
636
|
+
function Nr(t,e){return e?Object.keys(t).reduce((function(r,n){var i,o;return r[n]=(i=t[n],(o=e[n])?me(me(me({},i||{}),o||{}),Object.keys(i).reduce((function(t,e){return t[e]=me(me({},i[e]),o[e]||{}),t}),{})):i),r}),me({},t)):t}function Mr(t){return{create:function(){return{get:function(e){return t[e]},set:function(e,r){t[e]=r}}}}}!function(t){t[t.literal=0]="literal",t[t.object=1]="object"}(Ar||(Ar={}));var Rr=/** @class */function(){function t(e,r,n,i){var o,s=this;if(void 0===r&&(r=t.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(t){var e=s.formatToParts(t);
|
|
637
|
+
// Hot path for straight simple msg translations
|
|
638
|
+
if(1===e.length)return e[0].value;var r=e.reduce((function(t,e){return t.length&&e.type===Ar.literal&&"string"==typeof t[t.length-1]?t[t.length-1]+=e.value:t.push(e.value),t}),[]);return r.length<=1?r[0]||"":r},this.formatToParts=function(t){return Ir(s.ast,s.locales,s.formatters,s.formats,t,void 0,s.message)},this.resolvedOptions=function(){return{locale:s.resolvedLocale.toString()}},this.getAst=function(){return s.ast},
|
|
639
|
+
// Defined first because it's used to build the format pattern.
|
|
640
|
+
this.locales=r,this.resolvedLocale=t.resolveLocale(r),"string"==typeof e){if(this.message=e,!t.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
|
|
641
|
+
// Parse string messages into an AST.
|
|
642
|
+
this.ast=t.__parse(e,{ignoreTag:null==i?void 0:i.ignoreTag,locale:this.resolvedLocale})}else this.ast=e;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");
|
|
643
|
+
// Creates a new object with the specified `formats` merged with the default
|
|
644
|
+
// formats.
|
|
645
|
+
this.formats=Nr(t.formats,n),this.formatters=i&&i.formatters||(void 0===(o=this.formatterCache)&&(o={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:yr((function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,ge([void 0],e,!1)))}),{cache:Mr(o.number),strategy:Hr.variadic}),getDateTimeFormat:yr((function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,ge([void 0],e,!1)))}),{cache:Mr(o.dateTime),strategy:Hr.variadic}),getPluralRules:yr((function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,ge([void 0],e,!1)))}),{cache:Mr(o.pluralRules),strategy:Hr.variadic})})}return Object.defineProperty(t,"defaultLocale",{get:function(){return t.memoizedDefaultLocale||(t.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),t.memoizedDefaultLocale},enumerable:!1,configurable:!0}),t.memoizedDefaultLocale=null,t.resolveLocale=function(t){var e=Intl.NumberFormat.supportedLocalesOf(t);return e.length>0?new Intl.Locale(e[0]):new Intl.Locale("string"==typeof t?t:t[0])},t.__parse=gr,
|
|
646
|
+
// Default format options used as the prototype of the `formats` provided to the
|
|
647
|
+
// constructor. These are used when constructing the internal Intl.NumberFormat
|
|
648
|
+
// and Intl.DateTimeFormat instances.
|
|
649
|
+
t.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"}}},t}(),kr=Rr;
|
|
650
|
+
/*
|
|
651
|
+
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
|
|
652
|
+
Copyrights licensed under the New BSD License.
|
|
653
|
+
See the accompanying LICENSE file for terms.
|
|
654
|
+
*/const Ur={},Dr=(t,e,r)=>r?(e in Ur||(Ur[e]={}),t in Ur[e]||(Ur[e][t]=r),r):r,Fr=(t,e)=>{if(null==e)return;if(e in Ur&&t in Ur[e])return Ur[e][t];const r=nn(e);for(let n=0;n<r.length;n++){const i=Xr(r[n],t);if(i)return Dr(t,e,i)}};let Gr;const $r=Qt({});function jr(t){return t in Gr}function Xr(t,e){if(!jr(t))return null;const r=function(t){return Gr[t]||null}(t);return function(t,e){if(null==e)return;if(e in t)return t[e];const r=e.split(".");let n=t;for(let t=0;t<r.length;t++)if("object"==typeof n){if(t>0){const e=r.slice(t,r.length).join(".");if(e in n){n=n[e];break}}n=n[r[t]]}else n=void 0;return n}(r,e)}function zr(t,...e){delete Ur[t],$r.update((r=>(r[t]=he.all([r[t]||{},...e]),r)))}te([$r],(([t])=>Object.keys(t))),$r.subscribe((t=>Gr=t));const Vr={};function Wr(t){return Vr[t]}function Kr(t){return null!=t&&nn(t).some((t=>{var e;return null===(e=Wr(t))||void 0===e?void 0:e.size}))}const Yr={};function Zr(t){if(!Kr(t))return t in Yr?Yr[t]:Promise.resolve();const e=function(t){return nn(t).map((t=>{const e=Wr(t);return[t,e?[...e]:[]]})).filter((([,t])=>t.length>0))}(t);return Yr[t]=Promise.all(e.map((([t,e])=>function(t,e){const r=Promise.all(e.map((e=>(function(t,e){Vr[t].delete(e),0===Vr[t].size&&delete Vr[t]}(t,e),e().then((t=>t.default||t))))));return r.then((e=>zr(t,...e)))}(t,e)))).then((()=>{if(Kr(t))return Zr(t);delete Yr[t]})),Yr[t]}const qr={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 Jr(){return qr}const Qr=Qt(!1);let tn;const en=Qt(null);function rn(t){return t.split("-").map(((t,e,r)=>r.slice(0,e+1).join("-"))).reverse()}function nn(t,e=Jr().fallbackLocale){const r=rn(t);return e?[...new Set([...r,...rn(e)])]:r}function on(){return null!=tn?tn:void 0}en.subscribe((t=>{tn=null!=t?t:void 0,"undefined"!=typeof window&&null!=t&&document.documentElement.setAttribute("lang",t)}));const sn={...en,set:t=>{if(t&&function(t){if(null==t)return;const e=nn(t);for(let t=0;t<e.length;t++){const r=e[t];if(jr(r))return r}}(t)&&Kr(t)){const{loadingDelay:e}=Jr();let r;return"undefined"!=typeof window&&null!=on()&&e?r=window.setTimeout((()=>Qr.set(!0)),e):Qr.set(!0),Zr(t).then((()=>{en.set(t)})).finally((()=>{clearTimeout(r),Qr.set(!1)}))}return en.set(t)}},an=t=>{const e=Object.create(null);return r=>{const n=JSON.stringify(r);return n in e?e[n]:e[n]=t(r)}},ln=(t,e)=>{const{formats:r}=Jr();if(t in r&&e in r[t])return r[t][e];throw new Error(`[svelte-i18n] Unknown "${e}" ${t} format.`)},hn=an((({locale:t,format:e,...r})=>{if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return e&&(r=ln("number",e)),new Intl.NumberFormat(t,r)})),cn=an((({locale:t,format:e,...r})=>{if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return e?r=ln("date",e):0===Object.keys(r).length&&(r=ln("date","short")),new Intl.DateTimeFormat(t,r)})),un=an((({locale:t,format:e,...r})=>{if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return e?r=ln("time",e):0===Object.keys(r).length&&(r=ln("time","short")),new Intl.DateTimeFormat(t,r)})),fn=an(((t,e=on())=>new kr(t,e,Jr().formats,{ignoreTag:Jr().ignoreTag}))),pn=(t,e={})=>{var r,n,i,o;let s=e;"object"==typeof t&&(s=t,t=s.id);const{values:a,locale:l=on(),default:h}=s;if(null==l)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let c=Fr(t,l);if(c){if("string"!=typeof c)return console.warn(`[svelte-i18n] Message with id "${t}" must be of type "string", found: "${typeof c}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),c}else c=null!==(o=null!==(i=null===(n=(r=Jr()).handleMissingMessage)||void 0===n?void 0:n.call(r,{locale:l,id:t,defaultValue:h}))&&void 0!==i?i:h)&&void 0!==o?o:t;if(!a)return c;let u=c;try{u=fn(c,l).format(a)}catch(e){e instanceof Error&&console.warn(`[svelte-i18n] Message "${t}" has syntax error:`,e.message)}return u},dn=(t,e)=>(({locale:t=on(),...e}={})=>un({locale:t,...e}))(e).format(t),mn=(t,e)=>(({locale:t=on(),...e}={})=>cn({locale:t,...e}))(e).format(t),gn=(t,e)=>(({locale:t=on(),...e}={})=>hn({locale:t,...e}))(e).format(t),yn=(t,e=on())=>Fr(t,e),bn=te([sn,$r],(()=>pn));te([sn],(()=>dn)),te([sn],(()=>mn)),te([sn],(()=>gn)),te([sn,$r],(()=>yn)),window.emWidgets={topic:(t,e=0)=>{if(-1==Zt.indexOf(t)){let r=new Yt(e);qt[t]=r,Zt.push(t)}return qt[t]}};function vn(t,e){zr(t,e)}const En={en:{promotionsTitle:"Promotions",promotionsSubTitle:"New hot offers everyday!",promotionsButton:"More Info",promotionsNone:"There are no promotions available at the moment.",promotionsLoading:"Loading, please wait ..."},zh:{promotionsTitle:"促銷活動",promotionsSubTitle:"New hot offers everyday!",promotionsButton:"更多信息",promotionsNone:"目前沒有促銷活動。",promotionsLoading:"Loading, please wait ..."},fr:{promotionsTitle:"Promotions",promotionsSubTitle:"New hot offers everyday!",promotionsButton:"Plus d'informations",promotionsNone:"Il n'y a pas de promotions disponibles pour le moment.",promotionsLoading:"Loading, please wait ..."},tr:{promotionsTitle:"Promosyonlar",promotionsSubTitle:"New hot offers everyday!",promotionsButton:"Daha fazla bilgi",promotionsNone:"Şu anda herhangi bir promosyon bulunmamaktadır.",promotionsLoading:"Loading, please wait ..."},ro:{promotionsTitle:"Promotii",promotionsSubTitle:"New hot offers everyday!",promotionsButton:"Detalii",promotionsNone:"Nu avem promotii disponibile momentan.",promotionsLoading:"Loading, please wait ..."},es:{promotionsTitle:"Promociones",promotionsSubTitle:"New hot offers everyday!",promotionsButton:"Mas informaciones",promotionsNone:"Actualmente no hay promociones disponibles.",promotionsLoading:"Loading, please wait ..."},pt:{promotionsTitle:"Promoções",promotionsSubTitle:"New hot offers everyday!",promotionsButton:"Mais informações",promotionsNone:"Não há promoções disponíveis no momento.",promotionsLoading:"Loading, please wait ..."}};
|
|
655
|
+
/* src/CasinoPromotionsSlider.svelte generated by Svelte v3.59.2 */function wn(t,e,r){const n=t.slice();return n[48]=e[r],n}function _n(t,e,r){const n=t.slice();return n[51]=e[r],n}function Tn(t,e,r){const n=t.slice();return n[48]=e[r],n}
|
|
656
|
+
// (272:8) {:else}
|
|
657
|
+
function Sn(t){let e,r,n=/*$_*/t[11]("promotionsNone")+"";return{c(){e=m("p"),r=y(n),E(e,"class","text__center w__100")},m(t,n){f(t,e,n),u(e,r)},p(t,e){/*$_*/2048&e[0]&&n!==(n=/*$_*/t[11]("promotionsNone")+"")&&w(r,n)},d(t){t&&p(e)}}}
|
|
658
|
+
// (227:8) {#if promotions.length > 0}
|
|
659
|
+
function Pn(t){let e,r,n,i=/*promotions*/t[1],o=[];for(let e=0;e<i.length;e+=1)o[e]=Bn(_n(t,i,e));let s=/*totalDots*/t[5]>1&&Cn(t);return{c(){e=m("div"),r=m("div");for(let t=0;t<o.length;t+=1)o[t].c();n=b(),s&&s.c(),E(r,"class","slides"),E(e,"class","carousel")},m(i,a){f(i,e,a),u(e,r);for(let t=0;t<o.length;t+=1)o[t]&&o[t].m(r,null);
|
|
660
|
+
/*div0_binding*/t[25](r),u(e,n),s&&s.m(e,null)
|
|
661
|
+
/*div1_binding*/,t[26](e)},p(t,n){if(/*handleOpenModal, promotions, $_*/10242&n[0]){let e;for(i=/*promotions*/t[1],e=0;e<i.length;e+=1){const s=_n(t,i,e);o[e]?o[e].p(s,n):(o[e]=Bn(s),o[e].c(),o[e].m(r,null))}for(;e<o.length;e+=1)o[e].d(1);o.length=i.length}/*totalDots*/t[5]>1?s?s.p(t,n):(s=Cn(t),s.c(),s.m(e,null)):s&&(s.d(1),s=null)},d(r){r&&p(e),d(o,r),
|
|
662
|
+
/*div0_binding*/t[25](null),s&&s.d()
|
|
663
|
+
/*div1_binding*/,t[26](null)}}}
|
|
664
|
+
// (224:6) {#if isLoading}
|
|
665
|
+
function Hn(t){let e,r,n=/*$_*/t[11]("promotionsLoading")+"";return{c(){e=m("p"),r=y(n),E(e,"class","text__center w__100")},m(t,n){f(t,e,n),u(e,r)},p(t,e){/*$_*/2048&e[0]&&n!==(n=/*$_*/t[11]("promotionsLoading")+"")&&w(r,n)},d(t){t&&p(e)}}}
|
|
666
|
+
// (234:18) {#each promotion.image.sources as imgSource}
|
|
667
|
+
function An(t){let e,r,n;return{c(){e=m("source"),E(e,"srcset",r=/*imgSource*/t[48].pictureSource),E(e,"media",n="("+/*imgSource*/t[48].media+")")},m(t,r){f(t,e,r)},p(t,i){/*promotions*/2&i[0]&&r!==(r=/*imgSource*/t[48].pictureSource)&&E(e,"srcset",r),/*promotions*/2&i[0]&&n!==(n="("+/*imgSource*/t[48].media+")")&&E(e,"media",n)},d(t){t&&p(e)}}}
|
|
668
|
+
// (230:12) {#each promotions as promotion}
|
|
669
|
+
function Bn(t){let e,r,n,i,o,s,a,l,c,_,T,S,P,H,A,B,C,x,L,O,I,N,M,R,k=/*promotion*/t[51].title+"",U=/*promotion*/t[51].content.split("</div>")[0]+"",D=/*$_*/t[11]("promotionsButton")+"",F=/*promotion*/t[51].image.sources,G=[];for(let e=0;e<F.length;e+=1)G[e]=An(Tn(t,F,e));function $(){/*click_handler*/
|
|
670
|
+
return t[24](/*promotion*/t[51])}return{c(){e=m("div"),r=m("div"),n=m("picture");for(let t=0;t<G.length;t+=1)G[t].c();var u,f,p,d;
|
|
671
|
+
// unfortunately this can't be a constant as that wouldn't be tree-shakeable
|
|
672
|
+
// so we cache the result instead
|
|
673
|
+
i=b(),o=m("img"),l=b(),c=m("h3"),_=b(),T=m("div"),S=b(),P=m("div"),H=m("a"),A=m("b"),B=y(D),C=b(),x=g("svg"),L=g("style"),O=y(".st0{fill:#FFFFFF;}\n "),I=g("path"),N=b(),h(o.src,s=/*promotion*/t[51].image.src)||E(o,"src",s),E(o,"alt",a=/*promotion*/t[51].title),E(n,"class","PromotionImg"),E(n,"part","PromotionImg"),E(c,"class","PromotionTitle"),E(c,"part","PromotionTitle"),E(T,"class","description"),E(T,"part","description"),E(L,"type","text/css"),E(I,"class","st0"),E(I,"d","M9.5,13.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L12.4,9H1.2C0.9,9,0.7,8.9,0.5,8.7\n C0.3,8.5,0.2,8.3,0.2,8s0.1-0.5,0.3-0.7C0.7,7.1,0.9,7,1.2,7h11.1L9.5,4.1C9.3,3.9,9.2,3.7,9.2,3.4c0-0.3,0.1-0.5,0.3-0.7\n c0.2-0.2,0.4-0.3,0.7-0.3c0.3,0,0.5,0.1,0.7,0.3l4.6,4.6c0.1,0.1,0.2,0.2,0.2,0.3c0,0.1,0.1,0.2,0.1,0.4s0,0.3-0.1,0.4\n c0,0.1-0.1,0.2-0.2,0.3l-4.6,4.6c-0.2,0.2-0.4,0.3-0.7,0.3C10,13.6,9.7,13.5,9.5,13.3z"),E(x,"class","arrow"),E(x,"version","1.1"),E(x,"id","Layer_1"),E(x,"xmlns","http://www.w3.org/2000/svg"),E(x,"xmlns:xlink","http://www.w3.org/1999/xlink"),E(x,"x","0px"),E(x,"y","0px"),E(x,"viewBox","0 0 16 16"),u=x,f="enable-background",null==(p="new 0 0 16 16")?u.style.removeProperty(f):u.style.setProperty(f,p,d?"important":""),E(x,"xml:space","preserve"),E(H,"href","javascript:void(0)"),E(H,"class","btn"),E(P,"class","btnArea"),E(r,"class","PromotionCard"),E(e,"class","d-flex")},m(t,s){f(t,e,s),u(e,r),u(r,n);for(let t=0;t<G.length;t+=1)G[t]&&G[t].m(n,null);u(n,i),u(n,o),u(r,l),u(r,c),c.innerHTML=k,u(r,_),u(r,T),T.innerHTML=U,u(r,S),u(r,P),u(P,H),u(H,A),u(A,B),u(H,C),u(H,x),u(x,L),u(L,O),u(x,I),u(e,N),M||(R=v(H,"click",$),M=!0)},p(e,r){if(t=e,/*promotions*/2&r[0]){let e;for(F=/*promotion*/t[51].image.sources,e=0;e<F.length;e+=1){const o=Tn(t,F,e);G[e]?G[e].p(o,r):(G[e]=An(o),G[e].c(),G[e].m(n,i))}for(;e<G.length;e+=1)G[e].d(1);G.length=F.length}/*promotions*/2&r[0]&&!h(o.src,s=/*promotion*/t[51].image.src)&&E(o,"src",s),/*promotions*/2&r[0]&&a!==(a=/*promotion*/t[51].title)&&E(o,"alt",a),/*promotions*/2&r[0]&&k!==(k=/*promotion*/t[51].title+"")&&(c.innerHTML=k),/*promotions*/2&r[0]&&U!==(U=/*promotion*/t[51].content.split("</div>")[0]+"")&&(T.innerHTML=U),/*$_*/2048&r[0]&&D!==(D=/*$_*/t[11]("promotionsButton")+"")&&w(B,D)},d(t){t&&p(e),d(G,t),M=!1,R()}}}
|
|
674
|
+
// (266:8) {#if totalDots > 1}
|
|
675
|
+
function Cn(t){let e,r,n=`${/*getCurrentNumber*/t[12](/*currentIndex*/t[6],/*currentPerPage*/t[3])} / ${/*totalDots*/t[5]}`;return{c(){e=m("div"),r=y(n),E(e,"class","numberOfPage")},m(t,n){f(t,e,n),u(e,r)},p(t,e){/*currentIndex, currentPerPage, totalDots*/104&e[0]&&n!==(n=`${/*getCurrentNumber*/t[12](/*currentIndex*/t[6],/*currentPerPage*/t[3])} / ${/*totalDots*/t[5]}`)&&w(r,n)},d(t){t&&p(e)}}}
|
|
676
|
+
// (279:2) {#if modalIsOpen}
|
|
677
|
+
function xn(t){let e,r,i,o,s,a,l,c,g,y,w,_,T,S,P,H,A,B=/*modalItem*/t[9].title+"",C=/*modalItem*/t[9].content+"",x=/*modalItem*/t[9].image.sources,L=[];for(let e=0;e<x.length;e+=1)L[e]=Ln(wn(t,x,e));return{c(){e=m("div"),r=b(),i=m("div"),o=m("div"),s=m("a"),s.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="close_multi"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"></path></svg>',a=b(),l=m("picture");for(let t=0;t<L.length;t+=1)L[t].c();c=b(),g=m("img"),_=b(),T=m("h3"),S=b(),P=m("div"),E(e,"class","modal__overlay"),E(s,"href","#"),E(s,"class","IconClose"),E(o,"class","wrapper"),h(g.src,y=/*modalItem*/t[9].image.src)||E(g,"src",y),E(g,"alt",w=/*modalItem*/t[9].title),E(l,"class","modal__img"),E(l,"part","modal-img"),E(T,"class","modal__title"),E(P,"class","modal__description"),E(i,"class","modal")},m(n,h){f(n,e,h),f(n,r,h),f(n,i,h),u(i,o),u(o,s),u(i,a),u(i,l);for(let t=0;t<L.length;t+=1)L[t]&&L[t].m(l,null);u(l,c),u(l,g),u(i,_),u(i,T),T.innerHTML=B,u(i,S),u(i,P),P.innerHTML=C,H||(A=[v(e,"click",/*click_handler_1*/t[28]),v(s,"click",/*click_handler_2*/t[29])],H=!0)},p(t,e){if(/*modalItem*/512&e[0]){let r;for(x=/*modalItem*/t[9].image.sources,r=0;r<x.length;r+=1){const n=wn(t,x,r);L[r]?L[r].p(n,e):(L[r]=Ln(n),L[r].c(),L[r].m(l,c))}for(;r<L.length;r+=1)L[r].d(1);L.length=x.length}/*modalItem*/512&e[0]&&!h(g.src,y=/*modalItem*/t[9].image.src)&&E(g,"src",y),/*modalItem*/512&e[0]&&w!==(w=/*modalItem*/t[9].title)&&E(g,"alt",w),/*modalItem*/512&e[0]&&B!==(B=/*modalItem*/t[9].title+"")&&(T.innerHTML=B),/*modalItem*/512&e[0]&&C!==(C=/*modalItem*/t[9].content+"")&&(P.innerHTML=C)},d(t){t&&p(e),t&&p(r),t&&p(i),d(L,t),H=!1,n(A)}}}
|
|
678
|
+
// (302:12) {#each modalItem.image.sources as imgSource}
|
|
679
|
+
function Ln(t){let e,r,n;return{c(){e=m("source"),E(e,"srcset",r=/*imgSource*/t[48].pictureSource),E(e,"media",n="("+/*imgSource*/t[48].media+")")},m(t,r){f(t,e,r)},p(t,i){/*modalItem*/512&i[0]&&r!==(r=/*imgSource*/t[48].pictureSource)&&E(e,"srcset",r),/*modalItem*/512&i[0]&&n!==(n="("+/*imgSource*/t[48].media+")")&&E(e,"media",n)},d(t){t&&p(e)}}}function On(e){let r,n,i,o,s,a,l,h,c,d,g,T=/*$_*/e[11]("promotionsTitle")+"",S=/*$_*/e[11]("promotionsSubTitle")+"";function P(t,e){/*isLoading*/
|
|
680
|
+
return t[4]?Hn:/*promotions*/t[1].length>0?Pn:Sn}let H=P(e),A=H(e),B=/*modalIsOpen*/e[10]&&xn(e);return{c(){r=m("div"),n=m("section"),i=m("h2"),o=y(T),s=b(),a=m("p"),l=y(S),h=b(),c=m("div"),A.c(),g=b(),B&&B.c(),this.c=t,E(i,"class","title"),E(a,"class","SubTitle"),E(c,"class","container"),E(n,"class","PromotionSlider"),I((()=>/*section_elementresize_handler*/e[27].call(n))),E(r,"class","CasinoPromotionsSlider")},m(t,y){f(t,r,y),u(r,n),u(n,i),u(i,o),u(n,s),u(n,a),u(a,l),u(n,h),u(n,c),A.m(c,null),d=function(t,e){"static"===getComputedStyle(t).position&&(t.style.position="relative");const r=m("iframe");r.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),r.setAttribute("aria-hidden","true"),r.tabIndex=-1;const n=_();let i;return n?(r.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",i=v(window,"message",(t=>{t.source===r.contentWindow&&e()}))):(r.src="about:blank",r.onload=()=>{i=v(r.contentWindow,"resize",e),
|
|
681
|
+
// make sure an initial resize event is fired _after_ the iframe is loaded (which is asynchronous)
|
|
682
|
+
// see https://github.com/sveltejs/svelte/issues/4233
|
|
683
|
+
e()}),u(t,r),()=>{(n||i&&r.contentWindow)&&i(),p(r)}}(n,/*section_elementresize_handler*/e[27].bind(n)),u(r,g),B&&B.m(r,null)
|
|
684
|
+
/*div1_binding_1*/,e[30](r)},p(t,e){/*$_*/2048&e[0]&&T!==(T=/*$_*/t[11]("promotionsTitle")+"")&&w(o,T),/*$_*/2048&e[0]&&S!==(S=/*$_*/t[11]("promotionsSubTitle")+"")&&w(l,S),H===(H=P(t))&&A?A.p(t,e):(A.d(1),A=H(t),A&&(A.c(),A.m(c,null))),/*modalIsOpen*/t[10]?B?B.p(t,e):(B=xn(t),B.c(),B.m(r,null)):B&&(B.d(1),B=null)},i:t,o:t,d(t){t&&p(r),A.d(),d(),B&&B.d()
|
|
685
|
+
/*div1_binding_1*/,e[30](null)}}}function In(t,e,r){let n,i;var o,s;o=bn,s=t=>r(11,i=t),t.$$.on_destroy.push(c(o,s));let a,l,{endpoint:h=""}=e,{lang:u=""}=e,{env:f=""}=e,{userroles:p=""}=e,{translationurl:d=""}=e,{clientstyling:m=""}=e,{clientstylingurl:g=""}=e,y=!1,b=[],v=0;
|
|
686
|
+
// End implement Fetch data from CMS(api)
|
|
687
|
+
// Start implement translation
|
|
688
|
+
!function({withLocale:t,translations:e}){sn.subscribe((r=>{null==r&&($r.set(e),sn.set(t))}));// maybe we will need this to make sure that the i18n is set up only once
|
|
689
|
+
/*dictionary.set(translations);
|
|
690
|
+
locale.set(_locale);*/}({withLocale:"en",translations:{}});Object.keys(En).forEach((t=>{vn(t,En[t])}));const E=()=>{var t;t=u,sn.set(t)};
|
|
691
|
+
// End implement translation
|
|
692
|
+
let w=window.navigator.userAgent;
|
|
693
|
+
// Start implement Fetch data from CMS(api)
|
|
694
|
+
// End clientstyling & clientstylingurl functionality
|
|
695
|
+
// start implement slider
|
|
696
|
+
let _,T,S,A=4,C=0;const x=H();let L;const O=()=>!(b.length<=(L>=1536?r(22,A=4):L>=1024?r(22,A=3):L>=768?r(22,A=2):L>=320&&r(22,A=1),"object"==typeof A?A:Number(A))),I=()=>{T&&(r(22,A=r(3,n=T?T.perPage:A)),r(5,v=T?Math.ceil(T.innerElements.length/n):0))},N=((t,e)=>{let r;return function(){const n=this,i=arguments;clearTimeout(r),r=setTimeout((()=>t.apply(n,i)),e)}})(I,300);var M;M=()=>(window.addEventListener("resize",N),()=>{window.removeEventListener("resize",N)}),P().$$.on_mount.push(M);function R(){r(6,C=T.currentSlide),x("change",{currentSlide:T.currentSlide,slideCount:T.innerElements.length})}
|
|
697
|
+
// Get number of page
|
|
698
|
+
let k={},U=!1;const D=t=>{r(9,k=t),r(10,U=!0)},F=()=>{r(9,k={}),r(10,U=!1)};return t.$$set=t=>{"endpoint"in t&&r(15,h=t.endpoint),"lang"in t&&r(16,u=t.lang),"env"in t&&r(17,f=t.env),"userroles"in t&&r(18,p=t.userroles),"translationurl"in t&&r(19,d=t.translationurl),"clientstyling"in t&&r(20,m=t.clientstyling),"clientstylingurl"in t&&r(21,g=t.clientstylingurl)},t.$$.update=()=>{/*lang*/65536&t.$$.dirty[0]&&u&&E(),/*translationurl*/524288&t.$$.dirty[0]&&d&&fetch(d).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{vn(e,t[e])}))})).catch((t=>{console.log(t)})),/*endpoint, lang, env*/229376&t.$$.dirty[0]&&h&&u&&f&&(()=>{r(4,y=!0);let t=new URL(`${h}/${u}/promotions?env=${f}`),e=(t=>t.toLowerCase().match(/android/i)?"Android":t.toLowerCase().match(/iphone/i)?"iPhone":t.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC")(w);e&&("PC"===e?t.searchParams.append("device","dk"):"iPad"===e||"iPhone"===e?t.searchParams.append("device","ios"):t.searchParams.append("device","mtWeb")),fetch(t.href).then((t=>t.json())).then((t=>{r(4,y=!1),r(1,b=t)})).catch((t=>{r(4,y=!1),console.error(t)}))})(),/*clientstyling, customStylingContainer*/1048577&t.$$.dirty[0]&&m&&a&&(()=>{let t=document.createElement("style");t.innerHTML=m,a.appendChild(t)})(),/*clientstylingurl, customStylingContainer*/2097153&t.$$.dirty[0]&&g&&a&&(()=>{let t=document.createElement("style");fetch(new URL(g)).then((t=>t.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{a.appendChild(t)}),1)}))})(),/*controller, perPage*/12582912&t.$$.dirty[0]&&r(3,n=T?T.perPage:A),/*controller, currentPerPage*/8388616&t.$$.dirty[0]&&r(5,v=T?Math.ceil(T.innerElements.length/n):0),/*promotions, promotionsSlider*/6&t.$$.dirty[0]&&b&&l&&(r(23,T=new z({selector:_,loop:O(),duration:200,easing:"ease-out",startIndex:0,draggable:!0,multipleDrag:!0,threshold:20,rtl:!1,onChange:R,perPage:{320:1,768:2,1024:3,1536:4}})),S=setInterval((()=>T.next()),4e3)),/*controller*/8388608&t.$$.dirty[0]&&T&&I()},[a,b,l,n,y,v,C,_,L,k,U,i,(t,e)=>{const r=Math.ceil((t+1)/e);return 0===r?v:r},D,F,h,u,f,p,d,m,g,A,T,t=>{D(t)},function(t){B[t?"unshift":"push"]((()=>{_=t,r(7,_)}))},function(t){B[t?"unshift":"push"]((()=>{l=t,r(2,l)}))},function(){L=this.clientWidth,r(8,L)},()=>F(),()=>F(),function(t){B[t?"unshift":"push"]((()=>{a=t,r(0,a)}))}]}class Nn extends ${constructor(t){super();const e=document.createElement("style");e.textContent=':host{font-family:"Montserrat", sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"}*,*::before,*::after{padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.CasinoPromotionsSlider{height:590px;background:linear-gradient(180deg, #F3F1FF, #ECE8FF);color:#080843;text-align:center;container-type:inline-size;container-name:container-slider}.CasinoPromotionsSlider .title{margin-bottom:4px}.CasinoPromotionsSlider .SubTitle{margin-bottom:20px}.CasinoPromotionsSlider .sliders .carousel{position:relative;width:100%;justify-content:center;align-items:center}.CasinoPromotionsSlider .PromotionSlider{overflow:hidden;position:relative;padding:20px 130px}.CasinoPromotionsSlider .container{display:flex;justify-content:space-between;width:100%}.CasinoPromotionsSlider .container .carousel{width:100%;position:relative}.CasinoPromotionsSlider .container .slides{height:440px}.CasinoPromotionsSlider .PromotionCard{height:420px;background:#fff;box-shadow:0 4px 6px rgba(0, 0, 0, 0.2);border-radius:4px;padding:10px 10px 20px 10px;text-align:center;margin:0 10px;max-width:450px;color:#080843;position:relative}.CasinoPromotionsSlider .PromotionCard .PromotionImg img{object-fit:cover;border-radius:4px;width:100%;height:214px}.CasinoPromotionsSlider .PromotionCard .PromotionTitle{margin-bottom:4px;text-align:left;font-size:18px;display:-webkit-box !important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.CasinoPromotionsSlider .PromotionCard .description{margin-bottom:20px;text-align:left;font-size:14px;line-height:16px;display:-webkit-box !important;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}.CasinoPromotionsSlider .PromotionCard .arrow{width:19px;height:19px;position:absolute;transform:translateX(10px) translateY(-3px)}.CasinoPromotionsSlider .PromotionCard .btnArea{display:flex;align-items:center;height:60px;width:93%;position:absolute;bottom:0}.CasinoPromotionsSlider .PromotionCard .btn:link,.CasinoPromotionsSlider .PromotionCard .btn:visited{text-transform:uppercase;padding:10px 60px;background:linear-gradient(180deg, #F9253C, #D50866);color:#fff;display:inline-block;border-radius:100px;transition:all 0.2s;transition-timing-function:ease-out;position:relative;font-size:14px;justify-content:center;margin:0 auto}.CasinoPromotionsSlider .PromotionCard .btn:hover{padding:12px 62px}.CasinoPromotionsSlider .PromotionCard .btn:hover .arrow{transform:translateX(20px) translateY(-3px);transition:all 0.2s}.CasinoPromotionsSlider .text__center{text-align:center}.CasinoPromotionsSlider .w__100{width:100%}.CasinoPromotionsSlider .d-flex{display:flex;justify-content:space-around;align-items:center}.CasinoPromotionsSlider .numberOfPage{color:#D50866;font-size:18px;margin-top:15px}.CasinoPromotionsSlider .modal{background:#fff;box-shadow:0 4px 6px rgba(0, 0, 0, 0.2);border-radius:4px;padding:40px;max-height:90%;width:1000px;color:#080843;position:absolute;z-index:10;top:50%;left:50%;transform:translate(-50%, -50%);overflow-y:auto;display:flex;flex-direction:column}.CasinoPromotionsSlider .modal .wrapper{position:sticky;top:0;right:0;z-index:10}.CasinoPromotionsSlider .modal .IconClose{width:24px;height:24px;color:#888;position:absolute;top:-30px;right:-30px;z-index:20}.CasinoPromotionsSlider .modal .IconClose:hover,.CasinoPromotionsSlider .modal .IconClose:focus{cursor:pointer;color:#222}.CasinoPromotionsSlider .modal::-webkit-scrollbar{display:none}.CasinoPromotionsSlider .modal__img{display:block;position:relative}.CasinoPromotionsSlider .modal__img img{object-fit:cover;border-radius:4px;max-height:300px;width:100%;height:100%}.CasinoPromotionsSlider .modal__title{margin-bottom:4px;text-align:left;font-size:18px}.CasinoPromotionsSlider .modal__description{margin-bottom:20px;text-align:left;font-size:14px;line-height:16px}.CasinoPromotionsSlider .modal__overlay{position:fixed;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:rgba(0, 0, 0, 0.4);z-index:5}@container container-slider (max-width: 1700px){.CasinoPromotionsSlider .PromotionSlider{padding:20px 100px}}@container container-slider (max-width: 1300px){.CasinoPromotionsSlider .title{font-size:22px}.CasinoPromotionsSlider .SubTitle{font-size:15px}.CasinoPromotionsSlider .PromotionSlider{padding:20px 80px}.CasinoPromotionsSlider .PromotionTitle{font-size:16px}.CasinoPromotionsSlider .description{font-size:13px}.CasinoPromotionsSlider .btn:link,.CasinoPromotionsSlider .btn:visited{font-size:13px}.CasinoPromotionsSlider .numberOfPage{font-size:16px}.CasinoPromotionsSlider .modal{width:900px}.CasinoPromotionsSlider .modal__title{font-size:16px}.CasinoPromotionsSlider .modal__description{font-size:13px}}@container container-slider (max-width: 950px){.CasinoPromotionsSlider .PromotionSlider{padding:20px 20px}.CasinoPromotionsSlider .modal{padding:30px;width:600px}.CasinoPromotionsSlider .modal .IconClose{width:20px;height:20px;top:-24px;right:-24px}}@container container-slider (max-width: 720px){.CasinoPromotionsSlider .PromotionSlider{padding:20px 10px}.CasinoPromotionsSlider .modal{padding:30px;width:500px}}@container container-slider (max-width: 600px){.CasinoPromotionsSlider .modal{padding:26px;width:90%}.CasinoPromotionsSlider .modal .IconClose{width:20px;height:20px;top:-20px;right:-20px}}',this.shadowRoot.appendChild(e),G(this,{target:this.shadowRoot,props:T(this.attributes),customElement:!0},In,On,o,{endpoint:15,lang:16,env:17,userroles:18,translationurl:19,clientstyling:20,clientstylingurl:21},null,[-1,-1]),t&&(t.target&&f(t.target,this,t.anchor),t.props&&(this.$set(t.props),R()))}static get observedAttributes(){return["endpoint","lang","env","userroles","translationurl","clientstyling","clientstylingurl"]}get endpoint(){return this.$$.ctx[15]}set endpoint(t){this.$$set({endpoint:t}),R()}get lang(){return this.$$.ctx[16]}set lang(t){this.$$set({lang:t}),R()}get env(){return this.$$.ctx[17]}set env(t){this.$$set({env:t}),R()}get userroles(){return this.$$.ctx[18]}set userroles(t){this.$$set({userroles:t}),R()}get translationurl(){return this.$$.ctx[19]}set translationurl(t){this.$$set({translationurl:t}),R()}get clientstyling(){return this.$$.ctx[20]}set clientstyling(t){this.$$set({clientstyling:t}),R()}get clientstylingurl(){return this.$$.ctx[21]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),R()}}return!customElements.get("casino-promotions-slider")&&customElements.define("casino-promotions-slider",Nn),Nn}));
|
|
699
|
+
//# sourceMappingURL=casino-promotions-slider.js.map
|