@everymatrix/casino-jackpot-banner 1.34.0 → 1.34.2
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.
|
@@ -120,7 +120,7 @@ self.fetch.bind(self);
|
|
|
120
120
|
PERFORMANCE OF THIS SOFTWARE.
|
|
121
121
|
***************************************************************************** */
|
|
122
122
|
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
123
|
-
var st=function(t,e){return st=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])},st(t,e)};function at(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}st(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function ct(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 lt(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 ut(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 ht(t){return"function"==typeof t}function pt(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 ft=pt((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 dt(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var mt=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}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=ct(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 c=this.initialTeardown;if(ht(c))try{c()}catch(t){i=t instanceof ft?t.errors:[t]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=ct(l),h=u.next();!h.done;h=u.next()){var p=h.value;try{gt(p)}catch(t){i=null!=i?i:[],t instanceof ft?i=ut(ut([],lt(i)),lt(t.errors)):i.push(t)}}}catch(t){r={error:t}}finally{try{h&&!h.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}}if(i)throw new ft(i)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)gt(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)&&dt(e,t)},t.prototype.remove=function(e){var r=this._finalizers;r&&dt(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),yt=mt.EMPTY;function bt(t){return t instanceof mt||t&&"closed"in t&&ht(t.remove)&&ht(t.add)&&ht(t.unsubscribe)}function gt(t){ht(t)?t():t.unsubscribe()}var vt={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Et={setTimeout:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=Et.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,ut([t,e],lt(r))):setTimeout.apply(void 0,ut([t,e],lt(r)))},clearTimeout:function(t){var e=Et.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function _t(){}var Tt=null;function wt(t){if(vt.useDeprecatedSynchronousErrorHandling){var e=!Tt;if(e&&(Tt={errorThrown:!1,error:null}),t(),e){var r=Tt,n=r.errorThrown,i=r.error;if(Tt=null,n)throw i}}else t()}var At=function(t){function e(e){var r=t.call(this)||this;return r.isStopped=!1,e?(r.destination=e,bt(e)&&e.add(r)):r.destination=Ct,r}return at(e,t),e.create=function(t,e,r){return new Pt(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}(mt),Bt=Function.prototype.bind;function Ht(t,e){return Bt.call(t,e)}var St=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){Lt(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){Lt(t)}else Lt(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){Lt(t)}},t}(),Pt=function(t){function e(e,r,n){var i,o,s=t.call(this)||this;ht(e)||!e?i={next:null!=e?e:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:s&&vt.useDeprecatedNextContext?((o=Object.create(e)).unsubscribe=function(){return s.unsubscribe()},i={next:e.next&&Ht(e.next,o),error:e.error&&Ht(e.error,o),complete:e.complete&&Ht(e.complete,o)}):i=e;return s.destination=new St(i),s}return at(e,t),e}(At);function Lt(t){var e;e=t,Et.setTimeout((function(){throw e}))}var Ct={closed:!0,next:_t,error:function(t){throw t},complete:_t},Ot="function"==typeof Symbol&&Symbol.observable||"@@observable";function xt(t){return t}var It=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 At||function(t){return t&&ht(t.next)&&ht(t.error)&&ht(t.complete)}(n)&&bt(n)?t:new Pt(t,e,r);return wt((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=Nt(e))((function(e,n){var i=new Pt({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[Ot]=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?xt: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=Nt(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 Nt(t){var e;return null!==(e=null!=t?t:vt.Promise)&&void 0!==e?e:Promise}var Rt=pt((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Mt=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 at(e,t),e.prototype.lift=function(t){var e=new Ut(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new Rt},e.prototype.next=function(t){var e=this;wt((function(){var r,n;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var i=ct(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;wt((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;wt((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?yt:(this.currentObservers=null,o.push(t),new mt((function(){e.currentObservers=null,dt(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 It;return t.source=this,t},e.create=function(t,e){return new Ut(t,e)},e}(It),Ut=function(t){function e(e,r){var n=t.call(this)||this;return n.destination=e,n.source=r,n}return at(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:yt},e}(Mt),$t={now:function(){return($t.delegate||Date).now()},delegate:void 0},Dt=function(t){function e(e,r,n){void 0===e&&(e=1/0),void 0===r&&(r=1/0),void 0===n&&(n=$t);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 at(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,c=1;c<n.length&&n[c]<=s;c+=2)a=c;a&&n.splice(0,a+1)}},e}(Mt);let kt=[],Gt={};
|
|
123
|
+
var st=function(t,e){return st=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])},st(t,e)};function at(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}st(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var ct=function(){return ct=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},ct.apply(this,arguments)};function lt(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 ut(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 ht(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 pt(t){return"function"==typeof t}function ft(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 dt=ft((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 mt(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var yt=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}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=lt(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 c=this.initialTeardown;if(pt(c))try{c()}catch(t){i=t instanceof dt?t.errors:[t]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=lt(l),h=u.next();!h.done;h=u.next()){var p=h.value;try{vt(p)}catch(t){i=null!=i?i:[],t instanceof dt?i=ht(ht([],ut(i)),ut(t.errors)):i.push(t)}}}catch(t){r={error:t}}finally{try{h&&!h.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}}if(i)throw new dt(i)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)vt(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)&&mt(e,t)},t.prototype.remove=function(e){var r=this._finalizers;r&&mt(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),bt=yt.EMPTY;function gt(t){return t instanceof yt||t&&"closed"in t&&pt(t.remove)&&pt(t.add)&&pt(t.unsubscribe)}function vt(t){pt(t)?t():t.unsubscribe()}var Et={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},_t={setTimeout:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=_t.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,ht([t,e],ut(r))):setTimeout.apply(void 0,ht([t,e],ut(r)))},clearTimeout:function(t){var e=_t.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function Tt(){}var wt=null;function At(t){if(Et.useDeprecatedSynchronousErrorHandling){var e=!wt;if(e&&(wt={errorThrown:!1,error:null}),t(),e){var r=wt,n=r.errorThrown,i=r.error;if(wt=null,n)throw i}}else t()}var Bt=function(t){function e(e){var r=t.call(this)||this;return r.isStopped=!1,e?(r.destination=e,gt(e)&&e.add(r)):r.destination=Ot,r}return at(e,t),e.create=function(t,e,r){return new Lt(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}(yt),Ht=Function.prototype.bind;function St(t,e){return Ht.call(t,e)}var Pt=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){Ct(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){Ct(t)}else Ct(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){Ct(t)}},t}(),Lt=function(t){function e(e,r,n){var i,o,s=t.call(this)||this;pt(e)||!e?i={next:null!=e?e:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:s&&Et.useDeprecatedNextContext?((o=Object.create(e)).unsubscribe=function(){return s.unsubscribe()},i={next:e.next&&St(e.next,o),error:e.error&&St(e.error,o),complete:e.complete&&St(e.complete,o)}):i=e;return s.destination=new Pt(i),s}return at(e,t),e}(Bt);function Ct(t){var e;e=t,_t.setTimeout((function(){throw e}))}var Ot={closed:!0,next:Tt,error:function(t){throw t},complete:Tt},xt="function"==typeof Symbol&&Symbol.observable||"@@observable";function It(t){return t}var Nt=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 Bt||function(t){return t&&pt(t.next)&&pt(t.error)&&pt(t.complete)}(n)&>(n)?t:new Lt(t,e,r);return At((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=Rt(e))((function(e,n){var i=new Lt({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[xt]=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?It: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=Rt(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 Rt(t){var e;return null!==(e=null!=t?t:Et.Promise)&&void 0!==e?e:Promise}var Mt=ft((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Ut=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 at(e,t),e.prototype.lift=function(t){var e=new $t(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new Mt},e.prototype.next=function(t){var e=this;At((function(){var r,n;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var i=lt(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;At((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;At((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?bt:(this.currentObservers=null,o.push(t),new yt((function(){e.currentObservers=null,mt(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 Nt;return t.source=this,t},e.create=function(t,e){return new $t(t,e)},e}(Nt),$t=function(t){function e(e,r){var n=t.call(this)||this;return n.destination=e,n.source=r,n}return at(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:bt},e}(Ut),Dt={now:function(){return(Dt.delegate||Date).now()},delegate:void 0},kt=function(t){function e(e,r,n){void 0===e&&(e=1/0),void 0===r&&(r=1/0),void 0===n&&(n=Dt);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 at(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,c=1;c<n.length&&n[c]<=s;c+=2)a=c;a&&n.splice(0,a+1)}},e}(Ut);let Gt=[],jt={};
|
|
124
124
|
/**
|
|
125
125
|
* @name topic
|
|
126
126
|
* @description A small wrapper over the rxjs to offer the topic method on top of it
|
|
@@ -128,38 +128,38 @@ var st=function(t,e){return st=Object.setPrototypeOf||{__proto__:[]}instanceof A
|
|
|
128
128
|
* @param step [String] How many values to be buffed for new subscribers - default 0
|
|
129
129
|
* @returns ReplaySubject
|
|
130
130
|
*/
|
|
131
|
-
const
|
|
131
|
+
const Ft=[];
|
|
132
132
|
/**
|
|
133
133
|
* Create a `Writable` store that allows both updating and reading by subscription.
|
|
134
134
|
* @param {*=}value initial value
|
|
135
135
|
* @param {StartStopNotifier=} start
|
|
136
136
|
*/
|
|
137
|
-
function
|
|
138
|
-
const t=!
|
|
137
|
+
function Vt(e,r=t){let n;const i=new Set;function s(t){if(o(e,t)&&(e=t,n)){// store is ready
|
|
138
|
+
const t=!Ft.length;for(const t of i)t[1](),Ft.push(t,e);if(t){for(let t=0;t<Ft.length;t+=2)Ft[t][0](Ft[t+1]);Ft.length=0}}}return{set:s,update:function(t){s(t(e))},subscribe:function(o,a=t){const c=[o,a];return i.add(c),1===i.size&&(n=r(s)||t),o(e),()=>{i.delete(c),0===i.size&&n&&(n(),n=null)}}}}function Wt(e,r,o){const s=!Array.isArray(e),a=s?[e]:e,c=r.length<2;return l=e=>{let o=!1;const l=[];let u=0,h=t;const p=()=>{if(u)return;h();const n=r(s?l[0]:l,e);c?e(n):h=i(n)?n:t},f=a.map(((e,r)=>function(e,...r){if(null==e)return t;const n=e.subscribe(...r);return n.unsubscribe?()=>n.unsubscribe():n}(e,(t=>{l[r]=t,u&=~(1<<r),o&&p()}),(()=>{u|=1<<r}))));return o=!0,p(),function(){n(f),h(),
|
|
139
139
|
// We need to set this to false because callbacks can still happen despite having unsubscribed:
|
|
140
140
|
// Callbacks might already be placed in the queue which doesn't know it should no longer
|
|
141
141
|
// invoke this derived store.
|
|
142
|
-
o=!1}},{subscribe:
|
|
142
|
+
o=!1}},{subscribe:Vt(o,l).subscribe};
|
|
143
143
|
/**
|
|
144
144
|
* Creates a `Readable` store that allows reading by subscription.
|
|
145
145
|
* @param value initial value
|
|
146
146
|
* @param {StartStopNotifier} [start]
|
|
147
147
|
*/
|
|
148
|
-
var l}var
|
|
148
|
+
var l}var Xt=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===zt}(t)}
|
|
149
149
|
// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
|
|
150
|
-
(t)};var
|
|
150
|
+
(t)};var zt="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function Kt(t,e){return!1!==e.clone&&e.isMergeableObject(t)?Qt((r=t,Array.isArray(r)?[]:{}),t,e):t;var r}function Yt(t,e,r){return t.concat(e).map((function(t){return Kt(t,r)}))}function Zt(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 qt(t,e){try{return e in t}catch(t){return!1}}
|
|
151
151
|
// Protects from prototype poisoning and unexpected merging up the prototype chain.
|
|
152
|
-
function
|
|
153
|
-
})(t,i)||(
|
|
152
|
+
function Jt(t,e,r){var n={};return r.isMergeableObject(t)&&Zt(t).forEach((function(e){n[e]=Kt(t[e],r)})),Zt(e).forEach((function(i){(function(t,e){return qt(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e));// and also unsafe if they're nonenumerable.
|
|
153
|
+
})(t,i)||(qt(t,i)&&r.isMergeableObject(e[i])?n[i]=function(t,e){if(!e.customMerge)return Qt;var r=e.customMerge(t);return"function"==typeof r?r:Qt}(i,r)(t[i],e[i],r):n[i]=Kt(e[i],r))})),n}function Qt(t,e,r){(r=r||{}).arrayMerge=r.arrayMerge||Yt,r.isMergeableObject=r.isMergeableObject||Xt,
|
|
154
154
|
// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
|
|
155
155
|
// implementations can use it. The caller may not replace it.
|
|
156
|
-
r.cloneUnlessOtherwiseSpecified=
|
|
156
|
+
r.cloneUnlessOtherwiseSpecified=Kt;var n=Array.isArray(e);return n===Array.isArray(t)?n?r.arrayMerge(t,e,r):Jt(t,e,r):Kt(e,r)}Qt.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce((function(t,r){return Qt(t,r,e)}),{})};var te,ee,re,ne=Qt;
|
|
157
157
|
/**
|
|
158
158
|
* Type Guards
|
|
159
159
|
*/
|
|
160
|
-
function
|
|
160
|
+
function ie(t){return t.type===ee.literal}function oe(t){return t.type===ee.argument}function se(t){return t.type===ee.number}function ae(t){return t.type===ee.date}function ce(t){return t.type===ee.time}function le(t){return t.type===ee.select}function ue(t){return t.type===ee.plural}function he(t){return t.type===ee.pound}function pe(t){return t.type===ee.tag}function fe(t){return!(!t||"object"!=typeof t||t.type!==re.number)}function de(t){return!(!t||"object"!=typeof t||t.type!==re.dateTime)}
|
|
161
161
|
// @generated from regex-gen.ts
|
|
162
|
-
|
|
162
|
+
!function(t){
|
|
163
163
|
/** Argument is unclosed (e.g. `{0`) */
|
|
164
164
|
t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",
|
|
165
165
|
/** Argument is empty (e.g. `{}`). */
|
|
@@ -219,7 +219,7 @@ t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",
|
|
|
219
219
|
/** The closing tag does not match the opening tag. (e.g. `<bold>foo</italic>`) */
|
|
220
220
|
t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",
|
|
221
221
|
/** The opening tag has unmatched closing tag. (e.g. `<bold>foo`) */
|
|
222
|
-
t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(
|
|
222
|
+
t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(te||(te={})),function(t){
|
|
223
223
|
/**
|
|
224
224
|
* Raw text
|
|
225
225
|
*/
|
|
@@ -256,7 +256,7 @@ t[t.pound=7]="pound",
|
|
|
256
256
|
/**
|
|
257
257
|
* XML-like tag
|
|
258
258
|
*/
|
|
259
|
-
t[t.tag=8]="tag"}(
|
|
259
|
+
t[t.tag=8]="tag"}(ee||(ee={})),function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"}(re||(re={}));var me=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,ye=/(?:[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;
|
|
260
260
|
/**
|
|
261
261
|
* https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
262
262
|
* Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js
|
|
@@ -268,7 +268,7 @@ t[t.tag=8]="tag"}(ne||(ne={})),function(t){t[t.number=0]="number",t[t.dateTime=1
|
|
|
268
268
|
* @public
|
|
269
269
|
* @param skeleton skeleton string
|
|
270
270
|
*/
|
|
271
|
-
function
|
|
271
|
+
function be(t){var e={};return t.replace(ye,(function(t){var r=t.length;switch(t[0]){
|
|
272
272
|
// Era
|
|
273
273
|
case"G":e.era=4===r?"long":5===r?"narrow":"short";break;
|
|
274
274
|
// Year
|
|
@@ -302,33 +302,33 @@ case"X":// 1, 2, 3, 4: The ISO8601 varios formats
|
|
|
302
302
|
case"x":// 1, 2, 3, 4: The ISO8601 varios formats
|
|
303
303
|
throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),e}
|
|
304
304
|
// @generated from regex-gen.ts
|
|
305
|
-
var
|
|
305
|
+
var ge=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var ve=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Ee=/^(@+)?(\+|#+)?[rs]?$/g,_e=/(\*)(0+)|(#+)(0+)|(0+)/g,Te=/^(0+)$/;function we(t){var e={};return"r"===t[t.length-1]?e.roundingPriority="morePrecision":"s"===t[t.length-1]&&(e.roundingPriority="lessPrecision"),t.replace(Ee,(function(t,r,n){
|
|
306
306
|
// @@@ case
|
|
307
|
-
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
|
|
307
|
+
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 Ae(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 Be(t){
|
|
308
308
|
// Engineering
|
|
309
|
-
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)),!
|
|
309
|
+
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)),!Te.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}function He(t){var e=Ae(t);return e||{}}
|
|
310
310
|
/**
|
|
311
311
|
* https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options
|
|
312
|
-
*/function
|
|
312
|
+
*/function Se(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=ct(ct(ct({},e),{notation:"scientific"}),i.options.reduce((function(t,e){return ct(ct({},t),He(e))}),{}));continue;case"engineering":e=ct(ct(ct({},e),{notation:"engineering"}),i.options.reduce((function(t,e){return ct(ct({},t),He(e))}),{}));continue;case"notation-simple":e.notation="standard";continue;
|
|
313
313
|
// https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h
|
|
314
314
|
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;
|
|
315
315
|
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
|
|
316
|
-
case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(
|
|
316
|
+
case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(_e,(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}
|
|
317
317
|
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
|
|
318
|
-
if(
|
|
318
|
+
if(Te.test(i.stem))e.minimumIntegerDigits=i.stem.length;else if(ve.test(i.stem)){
|
|
319
319
|
// Precision
|
|
320
320
|
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#fraction-precision
|
|
321
321
|
// precision-integer case
|
|
322
|
-
if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(
|
|
322
|
+
if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(ve,(function(t,r,n,i,o,s){
|
|
323
323
|
// .000* case (before ICU67 it was .000+)
|
|
324
324
|
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];
|
|
325
325
|
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#trailing-zero-display
|
|
326
|
-
"w"===o?e=
|
|
326
|
+
"w"===o?e=ct(ct({},e),{trailingZeroDisplay:"stripIfInteger"}):o&&(e=ct(ct({},e),we(o)))}
|
|
327
327
|
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#significant-digits-precision
|
|
328
|
-
else if(
|
|
328
|
+
else if(Ee.test(i.stem))e=ct(ct({},e),we(i.stem));else{var s=Ae(i.stem);s&&(e=ct(ct({},e),s));var a=Be(i.stem);a&&(e=ct(ct({},e),a))}}return e}
|
|
329
329
|
// @generated from time-data-gen.ts
|
|
330
330
|
// prettier-ignore
|
|
331
|
-
var
|
|
331
|
+
var Pe,Le={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"]};
|
|
332
332
|
/**
|
|
333
333
|
* Returns the best matching date time pattern if a date time skeleton
|
|
334
334
|
* pattern is provided with a locale. Follows the Unicode specification:
|
|
@@ -341,7 +341,7 @@ var Oe,xe={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H
|
|
|
341
341
|
* of the given `locale` to the corresponding time pattern.
|
|
342
342
|
* @param locale
|
|
343
343
|
*/
|
|
344
|
-
function
|
|
344
|
+
function Ce(t){var e=t.hourCycle;if(void 0===e&&
|
|
345
345
|
// @ts-ignore hourCycle(s) is not identified yet
|
|
346
346
|
t.hourCycles&&
|
|
347
347
|
// @ts-ignore
|
|
@@ -349,37 +349,37 @@ t.hourCycles.length&&(
|
|
|
349
349
|
// @ts-ignore
|
|
350
350
|
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")}
|
|
351
351
|
// TODO: Once hourCycle is fully supported remove the following with data generation
|
|
352
|
-
var r,n=t.language;return"root"!==n&&(r=t.maximize().region),(
|
|
352
|
+
var r,n=t.language;return"root"!==n&&(r=t.maximize().region),(Le[r||""]||Le[n||""]||Le["".concat(n,"-001")]||Le["001"])[0]}var Oe=new RegExp("^".concat(me.source,"*")),xe=new RegExp("".concat(me.source,"*$"));function Ie(t,e){return{start:t,end:e}}
|
|
353
353
|
// #region Ponyfills
|
|
354
354
|
// Consolidate these variables up top for easier toggling during debugging
|
|
355
|
-
var
|
|
355
|
+
var Ne=!!String.prototype.startsWith,Re=!!String.fromCodePoint,Me=!!Object.fromEntries,Ue=!!String.prototype.codePointAt,$e=!!String.prototype.trimStart,De=!!String.prototype.trimEnd,ke=!!Number.isSafeInteger?Number.isSafeInteger:function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},Ge=!0;try{
|
|
356
356
|
/**
|
|
357
357
|
* legacy Edge or Xbox One browser
|
|
358
358
|
* Unicode flag support: supported
|
|
359
359
|
* Pattern_Syntax support: not supported
|
|
360
360
|
* See https://github.com/formatjs/formatjs/issues/2822
|
|
361
361
|
*/
|
|
362
|
-
|
|
362
|
+
Ge="a"===(null===(Pe=Ye("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===Pe?void 0:Pe[0])}catch(t){Ge=!1}var je,Fe=Ne?// Native
|
|
363
363
|
function(t,e,r){return t.startsWith(e,r)}:// For IE11
|
|
364
|
-
function(t,e,r){return t.slice(r,r+e.length)===e},
|
|
365
|
-
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},
|
|
364
|
+
function(t,e,r){return t.slice(r,r+e.length)===e},Ve=Re?String.fromCodePoint:// IE11
|
|
365
|
+
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},We=
|
|
366
366
|
// native
|
|
367
|
-
|
|
368
|
-
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},
|
|
367
|
+
Me?Object.fromEntries:// Ponyfill
|
|
368
|
+
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},Xe=Ue?// Native
|
|
369
369
|
function(t,e){return t.codePointAt(e)}:// IE 11
|
|
370
|
-
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}},
|
|
370
|
+
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}},ze=$e?// Native
|
|
371
371
|
function(t){return t.trimStart()}:// Ponyfill
|
|
372
|
-
function(t){return t.replace(
|
|
372
|
+
function(t){return t.replace(Oe,"")},Ke=De?// Native
|
|
373
373
|
function(t){return t.trimEnd()}:// Ponyfill
|
|
374
|
-
function(t){return t.replace(
|
|
374
|
+
function(t){return t.replace(xe,"")};
|
|
375
375
|
// Prevent minifier to translate new RegExp to literal form that might cause syntax error on IE11.
|
|
376
|
-
function
|
|
376
|
+
function Ye(t,e){return new RegExp(t,e)}
|
|
377
377
|
// #endregion
|
|
378
|
-
if(
|
|
378
|
+
if(Ge){
|
|
379
379
|
// Native
|
|
380
|
-
var
|
|
380
|
+
var Ze=Ye("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");je=function(t,e){var r;return Ze.lastIndex=e,null!==(r=Ze.exec(t)[1])&&void 0!==r?r:""}}else
|
|
381
381
|
// IE11
|
|
382
|
-
|
|
382
|
+
je=function(t,e){for(var r=[];;){var n=Xe(t,e);if(void 0===n||Qe(n)||tr(n))break;r.push(n),e+=n>=65536?2:1}return Ve.apply(void 0,r)};var qe=/** @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(te.UNMATCHED_CLOSING_TAG,Ie(this.clonePosition(),this.clonePosition()))}if(60/* `<` */===i&&!this.ignoreTag&&Je(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:ee.pound,location:Ie(s,this.clonePosition())})}}}return{val:n,err:null}},
|
|
383
383
|
/**
|
|
384
384
|
* A tag name must start with an ASCII lower/upper case letter. The grammar is based on the
|
|
385
385
|
* [custom element name][] except that a dash is NOT always mandatory and uppercase letters
|
|
@@ -401,14 +401,14 @@ We=function(t,e){for(var r=[];;){var n=Ye(t,e);if(void 0===n||rr(n)||nr(n))break
|
|
|
401
401
|
t.prototype.parseTag=function(t,e){var r=this.clonePosition();this.bump();// `<`
|
|
402
402
|
var n=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))
|
|
403
403
|
// Self closing tag
|
|
404
|
-
return{val:{type:
|
|
404
|
+
return{val:{type:ee.literal,value:"<".concat(n,"/>"),location:Ie(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();
|
|
405
405
|
// Expecting a close tag
|
|
406
|
-
if(this.bumpIf("</")){if(this.isEOF()||!
|
|
406
|
+
if(this.bumpIf("</")){if(this.isEOF()||!Je(this.char()))return this.error(te.INVALID_TAG,Ie(s,this.clonePosition()));var a=this.clonePosition();return n!==this.parseTagName()?this.error(te.UNMATCHED_CLOSING_TAG,Ie(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:ee.tag,value:n,children:o,location:Ie(r,this.clonePosition())},err:null}:this.error(te.INVALID_TAG,Ie(s,this.clonePosition())))}return this.error(te.UNCLOSED_TAG,Ie(r,this.clonePosition()))}return this.error(te.INVALID_TAG,Ie(r,this.clonePosition()))},
|
|
407
407
|
/**
|
|
408
408
|
* This method assumes that the caller has peeked ahead for the first tag character.
|
|
409
409
|
*/
|
|
410
410
|
t.prototype.parseTagName=function(){var t,e=this.offset();// the first tag name character
|
|
411
|
-
for(this.bump();!this.isEOF()&&(45/* '-' */===(t=this.char())||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);)this.bump();return this.message.slice(e,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=
|
|
411
|
+
for(this.bump();!this.isEOF()&&(45/* '-' */===(t=this.char())||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);)this.bump();return this.message.slice(e,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=Ie(r,this.clonePosition());return{val:{type:ee.literal,value:n,location:a},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60/* `<` */!==this.char()||!this.ignoreTag&&(Je(t=this.peek()||0)||47===t)?null:(this.bump(),"<");var t;
|
|
412
412
|
/** See `parseTag` function docs. */},
|
|
413
413
|
/**
|
|
414
414
|
* Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes
|
|
@@ -430,67 +430,67 @@ for(this.bump();!this.isEOF();){var r=this.char();if(39/* `'` */===r){if(39/* `'
|
|
|
430
430
|
// Optional closing apostrophe.
|
|
431
431
|
this.bump();break}e.push(39),
|
|
432
432
|
// Bump one more time because we need to skip 2 characters.
|
|
433
|
-
this.bump()}else e.push(r);this.bump()}return
|
|
434
|
-
this.bumpSpace(),this.isEOF())return this.error(
|
|
433
|
+
this.bump()}else e.push(r);this.bump()}return Ve.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(),Ve(r))},t.prototype.parseArgument=function(t,e){var r=this.clonePosition();if(this.bump(),// `{`
|
|
434
|
+
this.bumpSpace(),this.isEOF())return this.error(te.EXPECT_ARGUMENT_CLOSING_BRACE,Ie(r,this.clonePosition()));if(125/* `}` */===this.char())return this.bump(),this.error(te.EMPTY_ARGUMENT,Ie(r,this.clonePosition()));
|
|
435
435
|
// argument name
|
|
436
|
-
var n=this.parseIdentifierIfPossible().value;if(!n)return this.error(
|
|
436
|
+
var n=this.parseIdentifierIfPossible().value;if(!n)return this.error(te.MALFORMED_ARGUMENT,Ie(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(te.EXPECT_ARGUMENT_CLOSING_BRACE,Ie(r,this.clonePosition()));switch(this.char()){
|
|
437
437
|
// Simple argument: `{name}`
|
|
438
438
|
case 125/* `}` */:// `}`
|
|
439
|
-
return this.bump(),{val:{type:
|
|
439
|
+
return this.bump(),{val:{type:ee.argument,
|
|
440
440
|
// value does not include the opening and closing braces.
|
|
441
|
-
value:n,location:
|
|
441
|
+
value:n,location:Ie(r,this.clonePosition())},err:null};
|
|
442
442
|
// Argument with options: `{name, format, ...}`
|
|
443
443
|
case 44/* `,` */:return this.bump(),// `,`
|
|
444
|
-
this.bumpSpace(),this.isEOF()?this.error(
|
|
444
|
+
this.bumpSpace(),this.isEOF()?this.error(te.EXPECT_ARGUMENT_CLOSING_BRACE,Ie(r,this.clonePosition())):this.parseArgumentOptions(t,e,n,r);default:return this.error(te.MALFORMED_ARGUMENT,Ie(r,this.clonePosition()))}},
|
|
445
445
|
/**
|
|
446
446
|
* Advance the parser until the end of the identifier, if it is currently on
|
|
447
447
|
* an identifier character. Return an empty string otherwise.
|
|
448
448
|
*/
|
|
449
|
-
t.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),e=this.offset(),r=
|
|
449
|
+
t.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),e=this.offset(),r=je(this.message,e),n=e+r.length;return this.bumpTo(n),{value:r,location:Ie(t,this.clonePosition())}},t.prototype.parseArgumentOptions=function(t,e,r,n){var i,o=this.clonePosition(),s=this.parseIdentifierIfPossible().value,a=this.clonePosition();
|
|
450
450
|
// Parse this range:
|
|
451
451
|
// {name, type, style}
|
|
452
452
|
// ^---^
|
|
453
453
|
switch(s){case"":
|
|
454
454
|
// Expecting a style string number, date, time, plural, selectordinal, or select.
|
|
455
|
-
return this.error(
|
|
455
|
+
return this.error(te.EXPECT_ARGUMENT_TYPE,Ie(o,a));case"number":case"date":case"time":
|
|
456
456
|
// Parse this range:
|
|
457
457
|
// {name, number, style}
|
|
458
458
|
// ^-------^
|
|
459
|
-
this.bumpSpace();var c=null;if(this.bumpIf(",")){this.bumpSpace();var l=this.clonePosition();if((b=this.parseSimpleArgStyleIfPossible()).err)return b;if(0===(f=
|
|
459
|
+
this.bumpSpace();var c=null;if(this.bumpIf(",")){this.bumpSpace();var l=this.clonePosition();if((b=this.parseSimpleArgStyleIfPossible()).err)return b;if(0===(f=Ke(b.val)).length)return this.error(te.EXPECT_ARGUMENT_STYLE,Ie(this.clonePosition(),this.clonePosition()));c={style:f,styleLocation:Ie(l,this.clonePosition())}}if((g=this.tryParseArgumentClose(n)).err)return g;var u=Ie(n,this.clonePosition());
|
|
460
460
|
// Extract style or skeleton
|
|
461
|
-
if(c&&
|
|
461
|
+
if(c&&Fe(null==c?void 0:c.style,"::",0)){
|
|
462
462
|
// Skeleton starts with `::`.
|
|
463
|
-
var h=
|
|
463
|
+
var h=ze(c.style.slice(2));if("number"===s)return(b=this.parseNumberSkeletonFromString(h,c.styleLocation)).err?b:{val:{type:ee.number,value:r,location:u,style:b.val},err:null};if(0===h.length)return this.error(te.EXPECT_DATE_TIME_SKELETON,u);var p=h;
|
|
464
464
|
// Get "best match" pattern only if locale is passed, if not, let it
|
|
465
465
|
// pass as-is where `parseDateTimeSkeleton()` will throw an error
|
|
466
466
|
// for unsupported patterns.
|
|
467
|
-
this.locale&&(p=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),c=
|
|
467
|
+
this.locale&&(p=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),c=Ce(e);for("H"!=c&&"k"!=c||(a=0);a-- >0;)r+="a";for(;s-- >0;)r=c+r}else r+="J"===i?"H":i}return r}(h,this.locale));var f={type:re.dateTime,pattern:p,location:c.styleLocation,parsedOptions:this.shouldParseSkeletons?be(p):{}};return{val:{type:"date"===s?ee.date:ee.time,value:r,location:u,style:f},err:null}}
|
|
468
468
|
// Regular style or no style.
|
|
469
|
-
return{val:{type:"number"===s?
|
|
469
|
+
return{val:{type:"number"===s?ee.number:"date"===s?ee.date:ee.time,value:r,location:u,style:null!==(i=null==c?void 0:c.style)&&void 0!==i?i:null},err:null};case"plural":case"selectordinal":case"select":
|
|
470
470
|
// Parse this range:
|
|
471
471
|
// {name, plural, options}
|
|
472
472
|
// ^---------^
|
|
473
|
-
var d=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(
|
|
473
|
+
var d=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(te.EXPECT_SELECT_ARGUMENT_OPTIONS,Ie(d,ct({},d)));this.bumpSpace();
|
|
474
474
|
// Parse offset:
|
|
475
475
|
// {name, plural, offset:1, options}
|
|
476
476
|
// ^-----^
|
|
477
477
|
// or the first option:
|
|
478
478
|
// {name, plural, one {...} other {...}}
|
|
479
479
|
// ^--^
|
|
480
|
-
var m=this.parseIdentifierIfPossible(),y=0;if("select"!==s&&"offset"===m.value){if(!this.bumpIf(":"))return this.error(
|
|
480
|
+
var m=this.parseIdentifierIfPossible(),y=0;if("select"!==s&&"offset"===m.value){if(!this.bumpIf(":"))return this.error(te.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ie(this.clonePosition(),this.clonePosition()));var b;if(this.bumpSpace(),(b=this.tryParseDecimalInteger(te.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,te.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return b;
|
|
481
481
|
// Parse another identifier for option parsing
|
|
482
|
-
this.bumpSpace(),m=this.parseIdentifierIfPossible(),y=b.val}var g,v=this.tryParsePluralOrSelectOptions(t,s,e,m);if(v.err)return v;if((g=this.tryParseArgumentClose(n)).err)return g;var E=
|
|
482
|
+
this.bumpSpace(),m=this.parseIdentifierIfPossible(),y=b.val}var g,v=this.tryParsePluralOrSelectOptions(t,s,e,m);if(v.err)return v;if((g=this.tryParseArgumentClose(n)).err)return g;var E=Ie(n,this.clonePosition());return"select"===s?{val:{type:ee.select,value:r,options:We(v.val),location:E},err:null}:{val:{type:ee.plural,value:r,options:We(v.val),offset:y,pluralType:"plural"===s?"cardinal":"ordinal",location:E},err:null};default:return this.error(te.INVALID_ARGUMENT_TYPE,Ie(o,a))}},t.prototype.tryParseArgumentClose=function(t){
|
|
483
483
|
// Parse: {value, number, ::currency/GBP }
|
|
484
|
-
return this.isEOF()||125/* `}` */!==this.char()?this.error(
|
|
484
|
+
return this.isEOF()||125/* `}` */!==this.char()?this.error(te.EXPECT_ARGUMENT_CLOSING_BRACE,Ie(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},
|
|
485
485
|
/**
|
|
486
486
|
* See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659
|
|
487
487
|
*/
|
|
488
488
|
t.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,e=this.clonePosition();!this.isEOF();){switch(this.char()){case 39/* `'` */:
|
|
489
489
|
// Treat apostrophe as quoting but include it in the style part.
|
|
490
490
|
// Find the end of the quoted literal text.
|
|
491
|
-
this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(
|
|
491
|
+
this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(te.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Ie(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");
|
|
492
492
|
// Parse the skeleton
|
|
493
|
-
for(var e=[],r=0,n=t.split(
|
|
493
|
+
for(var e=[],r=0,n=t.split(ge).filter((function(t){return t.length>0}));r<n.length;r++){var i=n[r].split("/");if(0===i.length)throw new Error("Invalid number skeleton");for(var o=i[0],s=i.slice(1),a=0,c=s;a<c.length;a++)if(0===c[a].length)throw new Error("Invalid number skeleton");e.push({stem:o,options:s})}return e}(t)}catch(t){return this.error(te.INVALID_NUMBER_SKELETON,e)}return{val:{type:re.number,tokens:r,location:e,parsedOptions:this.shouldParseSkeletons?Se(r):{}},err:null}},
|
|
494
494
|
/**
|
|
495
495
|
* @param nesting_level The current nesting level of messages.
|
|
496
496
|
* This can be positive when parsing message fragment in select or plural argument options.
|
|
@@ -507,24 +507,24 @@ t.prototype.tryParsePluralOrSelectOptions=function(t,e,r,n){
|
|
|
507
507
|
// ^--^
|
|
508
508
|
for(var i,o=!1,s=[],a=new Set,c=n.value,l=n.location;;){if(0===c.length){var u=this.clonePosition();if("select"===e||!this.bumpIf("="))break;
|
|
509
509
|
// Try parse `={number}` selector
|
|
510
|
-
var h=this.tryParseDecimalInteger(
|
|
510
|
+
var h=this.tryParseDecimalInteger(te.EXPECT_PLURAL_ARGUMENT_SELECTOR,te.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;l=Ie(u,this.clonePosition()),c=this.message.slice(u.offset,this.offset())}
|
|
511
511
|
// Duplicate selector clauses
|
|
512
|
-
if(a.has(c))return this.error("select"===e?
|
|
512
|
+
if(a.has(c))return this.error("select"===e?te.DUPLICATE_SELECT_ARGUMENT_SELECTOR:te.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,l);"other"===c&&(o=!0),
|
|
513
513
|
// Parse:
|
|
514
514
|
// one {one apple}
|
|
515
515
|
// ^----------^
|
|
516
|
-
this.bumpSpace();var p=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===e?
|
|
516
|
+
this.bumpSpace();var p=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===e?te.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:te.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Ie(this.clonePosition(),this.clonePosition()));var f=this.parseMessage(t+1,e,r);if(f.err)return f;var d=this.tryParseArgumentClose(p);if(d.err)return d;s.push([c,{value:f.val,location:Ie(p,this.clonePosition())}]),
|
|
517
517
|
// Keep track of the existing selectors
|
|
518
518
|
a.add(c),
|
|
519
519
|
// Prep next selector clause.
|
|
520
|
-
this.bumpSpace(),c=(i=this.parseIdentifierIfPossible()).value,l=i.location}return 0===s.length?this.error("select"===e?
|
|
520
|
+
this.bumpSpace(),c=(i=this.parseIdentifierIfPossible()).value,l=i.location}return 0===s.length?this.error("select"===e?te.EXPECT_SELECT_ARGUMENT_SELECTOR:te.EXPECT_PLURAL_ARGUMENT_SELECTOR,Ie(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(te.MISSING_OTHER_CLAUSE,Ie(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=Ie(n,this.clonePosition());return i?ke(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(){
|
|
521
521
|
// This is much faster than `Object.assign` or spread.
|
|
522
522
|
return{offset:this.position.offset,line:this.position.line,column:this.position.column}},
|
|
523
523
|
/**
|
|
524
524
|
* Return the code point at the current position of the parser.
|
|
525
525
|
* Throws if the index is out of bound.
|
|
526
526
|
*/
|
|
527
|
-
t.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var e=
|
|
527
|
+
t.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var e=Xe(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}}},
|
|
528
528
|
/** Bump the parser to the next UTF-16 code unit. */
|
|
529
529
|
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,
|
|
530
530
|
// 0 ~ 0x10000 -> unicode BMP, otherwise skip the surrogate pair.
|
|
@@ -535,7 +535,7 @@ this.position.offset+=t<65536?1:2)}},
|
|
|
535
535
|
* following the prefix and return true. Otherwise, don't bump the parser
|
|
536
536
|
* and return false.
|
|
537
537
|
*/
|
|
538
|
-
t.prototype.bumpIf=function(t){if(
|
|
538
|
+
t.prototype.bumpIf=function(t){if(Fe(this.message,t,this.offset())){for(var e=0;e<t.length;e++)this.bump();return!0}return!1},
|
|
539
539
|
/**
|
|
540
540
|
* Bump the parser until the pattern character is found and return `true`.
|
|
541
541
|
* Otherwise bump to the end of the file and return `false`.
|
|
@@ -547,7 +547,7 @@ t.prototype.bumpUntil=function(t){var e=this.offset(),r=this.message.indexOf(t,e
|
|
|
547
547
|
*/
|
|
548
548
|
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}},
|
|
549
549
|
/** advance the parser through all whitespace to the next non-whitespace code unit. */
|
|
550
|
-
t.prototype.bumpSpace=function(){for(;!this.isEOF()&&
|
|
550
|
+
t.prototype.bumpSpace=function(){for(;!this.isEOF()&&Qe(this.char());)this.bump()},
|
|
551
551
|
/**
|
|
552
552
|
* Peek at the *next* Unicode codepoint in the input without advancing the parser.
|
|
553
553
|
* If the input has been exhausted, then this returns null.
|
|
@@ -557,104 +557,104 @@ t.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),e=this
|
|
|
557
557
|
* This check if codepoint is alphabet (lower & uppercase)
|
|
558
558
|
* @param codepoint
|
|
559
559
|
* @returns
|
|
560
|
-
*/function
|
|
560
|
+
*/function Je(t){return t>=97&&t<=122||t>=65&&t<=90}
|
|
561
561
|
/**
|
|
562
562
|
* Code point equivalent of regex `\p{White_Space}`.
|
|
563
563
|
* From: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
|
|
564
564
|
*/
|
|
565
|
-
function
|
|
565
|
+
function Qe(t){return t>=9&&t<=13||32===t||133===t||t>=8206&&t<=8207||8232===t||8233===t}
|
|
566
566
|
/**
|
|
567
567
|
* Code point equivalent of regex `\p{Pattern_Syntax}`.
|
|
568
568
|
* See https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
|
|
569
|
-
*/function
|
|
569
|
+
*/function tr(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 er(t){t.forEach((function(t){if(delete t.location,le(t)||ue(t))for(var e in t.options)delete t.options[e].location,er(t.options[e].value);else se(t)&&fe(t.style)||(ae(t)||ce(t))&&de(t.style)?delete t.style.location:pe(t)&&er(t.children)}))}function rr(t,e){void 0===e&&(e={}),e=ct({shouldParseSkeletons:!0,requiresOtherClause:!0},e);var r=new qe(t,e).parse();if(r.err){var n=SyntaxError(te[r.err.kind]);
|
|
570
570
|
// @ts-expect-error Assign to error object
|
|
571
571
|
throw n.location=r.err.location,
|
|
572
572
|
// @ts-expect-error Assign to error object
|
|
573
|
-
n.originalMessage=r.err.message,n}return(null==e?void 0:e.captureLocation)||
|
|
573
|
+
n.originalMessage=r.err.message,n}return(null==e?void 0:e.captureLocation)||er(r.val),r.val}
|
|
574
574
|
|
|
575
575
|
// Main
|
|
576
576
|
|
|
577
|
-
function
|
|
577
|
+
function nr(t,e){var r=e&&e.cache?e.cache:hr,n=e&&e.serializer?e.serializer:cr;return(e&&e.strategy?e.strategy:ar)(t,{cache:r,serializer:n})}
|
|
578
578
|
|
|
579
579
|
// Strategy
|
|
580
580
|
|
|
581
|
-
function
|
|
581
|
+
function ir(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 or(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 sr(t,e,r,n,i){return r.bind(e,t,n,i)}function ar(t,e){return sr(t,this,1===t.length?ir:or,e.cache.create(),e.serializer)}
|
|
582
582
|
// Serializer
|
|
583
|
-
var
|
|
583
|
+
var cr=function(){return JSON.stringify(arguments)};
|
|
584
584
|
|
|
585
585
|
// Cache
|
|
586
586
|
|
|
587
|
-
function
|
|
587
|
+
function lr(){this.cache=Object.create(null)}lr.prototype.get=function(t){return this.cache[t]},lr.prototype.set=function(t,e){this.cache[t]=e};var ur,hr={create:function(){
|
|
588
588
|
// @ts-ignore
|
|
589
|
-
return new
|
|
589
|
+
return new lr}},pr={variadic:function(t,e){return sr(t,this,or,e.cache.create(),e.serializer)},monadic:function(t,e){return sr(t,this,ir,e.cache.create(),e.serializer)}};!function(t){
|
|
590
590
|
// When we have a placeholder but no value to format
|
|
591
591
|
t.MISSING_VALUE="MISSING_VALUE",
|
|
592
592
|
// When value supplied is invalid
|
|
593
593
|
t.INVALID_VALUE="INVALID_VALUE",
|
|
594
594
|
// When we need specific Intl API but it's not available
|
|
595
|
-
t.MISSING_INTL_API="MISSING_INTL_API"}(
|
|
595
|
+
t.MISSING_INTL_API="MISSING_INTL_API"}(ur||(ur={}));var fr,dr=/** @class */function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.code=r,i.originalMessage=n,i}return at(e,t),e.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},e}(Error),mr=/** @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('", "'),'"'),ur.INVALID_VALUE,i)||this}return at(e,t),e}(dr),yr=/** @class */function(t){function e(e,r,n){return t.call(this,'Value for "'.concat(e,'" must be of type ').concat(r),ur.INVALID_VALUE,n)||this}return at(e,t),e}(dr),br=/** @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,'"'),ur.MISSING_VALUE,r)||this}return at(e,t),e}(dr);function gr(t){return"function"==typeof t}
|
|
596
596
|
// TODO(skeleton): add skeleton support
|
|
597
|
-
function
|
|
597
|
+
function vr(t,e,r,n,i,o,
|
|
598
598
|
// For debugging
|
|
599
599
|
s){
|
|
600
600
|
// Hot path for straight simple msg translations
|
|
601
|
-
if(1===t.length&&
|
|
601
|
+
if(1===t.length&&ie(t[0]))return[{type:fr.literal,value:t[0].value}];for(var a=[],c=0,l=t;c<l.length;c++){var u=l[c];
|
|
602
602
|
// Exit early for string parts.
|
|
603
|
-
if(
|
|
603
|
+
if(ie(u))a.push({type:fr.literal,value:u.value});else
|
|
604
604
|
// TODO: should this part be literal type?
|
|
605
605
|
// Replace `#` in plural rules with the actual numeric value.
|
|
606
|
-
if(
|
|
606
|
+
if(he(u))"number"==typeof o&&a.push({type:fr.literal,value:r.getNumberFormat(e).format(o)});else{var h=u.value;
|
|
607
607
|
// Enforce that all required values are provided by the caller.
|
|
608
|
-
if(!i||!(h in i))throw new
|
|
608
|
+
if(!i||!(h in i))throw new br(h,s);var p=i[h];if(oe(u))p&&"string"!=typeof p&&"number"!=typeof p||(p="string"==typeof p||"number"==typeof p?String(p):""),a.push({type:"string"==typeof p?fr.literal:fr.object,value:p});else
|
|
609
609
|
// Recursively format plural and select parts' option — which can be a
|
|
610
610
|
// nested pattern structure. The choosing of the option to use is
|
|
611
611
|
// abstracted-by and delegated-to the part helper object.
|
|
612
|
-
if(
|
|
612
|
+
if(ae(u)){var f="string"==typeof u.style?n.date[u.style]:de(u.style)?u.style.parsedOptions:void 0;a.push({type:fr.literal,value:r.getDateTimeFormat(e,f).format(p)})}else if(ce(u)){f="string"==typeof u.style?n.time[u.style]:de(u.style)?u.style.parsedOptions:n.time.medium;a.push({type:fr.literal,value:r.getDateTimeFormat(e,f).format(p)})}else if(se(u)){(f="string"==typeof u.style?n.number[u.style]:fe(u.style)?u.style.parsedOptions:void 0)&&f.scale&&(p*=f.scale||1),a.push({type:fr.literal,value:r.getNumberFormat(e,f).format(p)})}else{if(pe(u)){var d=u.children,m=u.value,y=i[m];if(!gr(y))throw new yr(m,"function",s);var b=y(vr(d,e,r,n,i,o).map((function(t){return t.value})));Array.isArray(b)||(b=[b]),a.push.apply(a,b.map((function(t){return{type:"string"==typeof t?fr.literal:fr.object,value:t}})))}if(le(u)){if(!(g=u.options[p]||u.options.other))throw new mr(u.value,p,Object.keys(u.options),s);a.push.apply(a,vr(g.value,e,r,n,i))}else if(ue(u)){var g;if(!(g=u.options["=".concat(p)])){if(!Intl.PluralRules)throw new dr('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',ur.MISSING_INTL_API,s);var v=r.getPluralRules(e,{type:u.pluralType}).select(p-(u.offset||0));g=u.options[v]||u.options.other}if(!g)throw new mr(u.value,p,Object.keys(u.options),s);a.push.apply(a,vr(g.value,e,r,n,i,p-(u.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===fr.literal&&e.type===fr.literal?r.value+=e.value:t.push(e),t}),[])}(a)}
|
|
613
613
|
/*
|
|
614
614
|
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
|
|
615
615
|
Copyrights licensed under the New BSD License.
|
|
616
616
|
See the accompanying LICENSE file for terms.
|
|
617
617
|
*/
|
|
618
618
|
// -- MessageFormat --------------------------------------------------------
|
|
619
|
-
function
|
|
619
|
+
function Er(t,e){return e?Object.keys(t).reduce((function(r,n){var i,o;return r[n]=(i=t[n],(o=e[n])?ct(ct(ct({},i||{}),o||{}),Object.keys(i).reduce((function(t,e){return t[e]=ct(ct({},i[e]),o[e]||{}),t}),{})):i),r}),ct({},t)):t}function _r(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"}(fr||(fr={}));var Tr=/** @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);
|
|
620
620
|
// Hot path for straight simple msg translations
|
|
621
|
-
if(1===e.length)return e[0].value;var r=e.reduce((function(t,e){return t.length&&e.type===
|
|
621
|
+
if(1===e.length)return e[0].value;var r=e.reduce((function(t,e){return t.length&&e.type===fr.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 vr(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},
|
|
622
622
|
// Defined first because it's used to build the format pattern.
|
|
623
623
|
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`");
|
|
624
624
|
// Parse string messages into an AST.
|
|
625
625
|
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.");
|
|
626
626
|
// Creates a new object with the specified `formats` merged with the default
|
|
627
627
|
// formats.
|
|
628
|
-
this.formats=
|
|
628
|
+
this.formats=Er(t.formats,n),this.formatters=i&&i.formatters||(void 0===(o=this.formatterCache)&&(o={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:nr((function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,ht([void 0],e,!1)))}),{cache:_r(o.number),strategy:pr.variadic}),getDateTimeFormat:nr((function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,ht([void 0],e,!1)))}),{cache:_r(o.dateTime),strategy:pr.variadic}),getPluralRules:nr((function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,ht([void 0],e,!1)))}),{cache:_r(o.pluralRules),strategy:pr.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=rr,
|
|
629
629
|
// Default format options used as the prototype of the `formats` provided to the
|
|
630
630
|
// constructor. These are used when constructing the internal Intl.NumberFormat
|
|
631
631
|
// and Intl.DateTimeFormat instances.
|
|
632
|
-
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}();const
|
|
632
|
+
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}();const wr={},Ar=(t,e,r)=>r?(e in wr||(wr[e]={}),t in wr[e]||(wr[e][t]=r),r):r,Br=(t,e)=>{if(null==e)return;if(e in wr&&t in wr[e])return wr[e][t];const r=Zr(e);for(let n=0;n<r.length;n++){const i=Lr(r[n],t);if(i)return Ar(t,e,i)}};let Hr;const Sr=Vt({});function Pr(t){return t in Hr}function Lr(t,e){if(!Pr(t))return null;const r=function(t){return Hr[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 Cr(t,...e){delete wr[t],Sr.update((r=>(r[t]=ne.all([r[t]||{},...e]),r)))}Wt([Sr],(([t])=>Object.keys(t))),Sr.subscribe((t=>Hr=t));const Or={};function xr(t){return Or[t]}function Ir(t){return null!=t&&Zr(t).some((t=>{var e;return null==(e=xr(t))?void 0:e.size}))}function Nr(t,e){const r=Promise.all(e.map((e=>(function(t,e){Or[t].delete(e),0===Or[t].size&&delete Or[t]}(t,e),e().then((t=>t.default||t))))));return r.then((e=>Cr(t,...e)))}const Rr={};function Mr(t){if(!Ir(t))return t in Rr?Rr[t]:Promise.resolve();const e=function(t){return Zr(t).map((t=>{const e=xr(t);return[t,e?[...e]:[]]})).filter((([,t])=>t.length>0))}(t);return Rr[t]=Promise.all(e.map((([t,e])=>Nr(t,e)))).then((()=>{if(Ir(t))return Mr(t);delete Rr[t]})),Rr[t]}const Ur={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 $r(){return Ur}const Dr=Vt(!1);var kr=Object.defineProperty,Gr=Object.defineProperties,jr=Object.getOwnPropertyDescriptors,Fr=Object.getOwnPropertySymbols,Vr=Object.prototype.hasOwnProperty,Wr=Object.prototype.propertyIsEnumerable,Xr=(t,e,r)=>e in t?kr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;let zr;const Kr=Vt(null);function Yr(t){return t.split("-").map(((t,e,r)=>r.slice(0,e+1).join("-"))).reverse()}function Zr(t,e=$r().fallbackLocale){const r=Yr(t);return e?[...new Set([...r,...Yr(e)])]:r}function qr(){return null!=zr?zr:void 0}Kr.subscribe((t=>{zr=null!=t?t:void 0,"undefined"!=typeof window&&null!=t&&document.documentElement.setAttribute("lang",t)}));const Jr=(Qr=((t,e)=>{for(var r in e||(e={}))Vr.call(e,r)&&Xr(t,r,e[r]);if(Fr)for(var r of Fr(e))Wr.call(e,r)&&Xr(t,r,e[r]);return t})({},Kr),Gr(Qr,jr({set:t=>{if(t&&function(t){if(null==t)return;const e=Zr(t);for(let t=0;t<e.length;t++){const r=e[t];if(Pr(r))return r}}(t)&&Ir(t)){const{loadingDelay:e}=$r();let r;return"undefined"!=typeof window&&null!=qr()&&e?r=window.setTimeout((()=>Dr.set(!0)),e):Dr.set(!0),Mr(t).then((()=>{Kr.set(t)})).finally((()=>{clearTimeout(r),Dr.set(!1)}))}return Kr.set(t)}})));var Qr;const tn=t=>{const e=Object.create(null);return r=>{const n=JSON.stringify(r);return n in e?e[n]:e[n]=t(r)}};var en=Object.defineProperty,rn=Object.getOwnPropertySymbols,nn=Object.prototype.hasOwnProperty,on=Object.prototype.propertyIsEnumerable,sn=(t,e,r)=>e in t?en(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,an=(t,e)=>{for(var r in e||(e={}))nn.call(e,r)&&sn(t,r,e[r]);if(rn)for(var r of rn(e))on.call(e,r)&&sn(t,r,e[r]);return t},cn=(t,e)=>{var r={};for(var n in t)nn.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&rn)for(var n of rn(t))e.indexOf(n)<0&&on.call(t,n)&&(r[n]=t[n]);return r};const ln=(t,e)=>{const{formats:r}=$r();if(t in r&&e in r[t])return r[t][e];throw new Error(`[svelte-i18n] Unknown "${e}" ${t} format.`)},un=tn((t=>{var e=t,{locale:r,format:n}=e,i=cn(e,["locale","format"]);if(null==r)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return n&&(i=ln("number",n)),new Intl.NumberFormat(r,i)})),hn=tn((t=>{var e=t,{locale:r,format:n}=e,i=cn(e,["locale","format"]);if(null==r)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return n?i=ln("date",n):0===Object.keys(i).length&&(i=ln("date","short")),new Intl.DateTimeFormat(r,i)})),pn=tn((t=>{var e=t,{locale:r,format:n}=e,i=cn(e,["locale","format"]);if(null==r)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return n?i=ln("time",n):0===Object.keys(i).length&&(i=ln("time","short")),new Intl.DateTimeFormat(r,i)})),fn=tn((
|
|
633
633
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
634
|
-
(t,e=
|
|
635
|
-
/* src/CasinoJackpotBanner.svelte generated by Svelte v3.59.2 */function
|
|
634
|
+
(t,e=qr())=>new Tr(t,e,$r().formats,{ignoreTag:$r().ignoreTag}))),dn=(t,e={})=>{var r,n,i,o;let s=e;"object"==typeof t&&(s=t,t=s.id);const{values:a,locale:c=qr(),default:l}=s;if(null==c)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let u=Br(t,c);if(u){if("string"!=typeof u)return console.warn(`[svelte-i18n] Message with id "${t}" must be of type "string", found: "${typeof u}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),u}else u=null!=(o=null!=(i=null==(n=(r=$r()).handleMissingMessage)?void 0:n.call(r,{locale:c,id:t,defaultValue:l}))?i:l)?o:t;if(!a)return u;let h=u;try{h=fn(u,c).format(a)}catch(e){e instanceof Error&&console.warn(`[svelte-i18n] Message "${t}" has syntax error:`,e.message)}return h},mn=(t,e)=>((t={})=>{var e=t,{locale:r=qr()}=e,n=cn(e,["locale"]);return pn(an({locale:r},n))})(e).format(t),yn=(t,e)=>((t={})=>{var e=t,{locale:r=qr()}=e,n=cn(e,["locale"]);return hn(an({locale:r},n))})(e).format(t),bn=(t,e)=>((t={})=>{var e=t,{locale:r=qr()}=e,n=cn(e,["locale"]);return un(an({locale:r},n))})(e).format(t),gn=(t,e=qr())=>Br(t,e);Wt([Jr,Sr],(()=>dn)),Wt([Jr],(()=>mn)),Wt([Jr],(()=>yn)),Wt([Jr],(()=>bn)),Wt([Jr,Sr],(()=>gn)),window.emWidgets={topic:(t,e=0)=>{if(-1==Gt.indexOf(t)){let r=new kt(e);jt[t]=r,Gt.push(t)}return jt[t]}};function vn(t,e){Cr(t,e)}const En={en:{loadingText:"Loading, please wait..."},"zh-hk":{loadingText:"加载请稍候 ..."},fr:{loadingText:"Chargement, veuillez patienter..."},ro:{loadingText:"Se incarca, va rugam asteptati..."},es:{loadingText:"Cargando"},pt:{loadingText:"Carregando, por favor espere..."},de:{loadingText:"Laden, bitte warten..."},hr:{loadingText:"Učitavanje"},"pt-br":{CarregandoText:"Carregando"},"es-mx":{CargandoText:"Cargando, por favor espere…"}};
|
|
635
|
+
/* src/CasinoJackpotBanner.svelte generated by Svelte v3.59.2 */function _n(t,e,r){const n=t.slice();return n[48]=e[r],n[50]=r,n}
|
|
636
636
|
// (168:2) {:else}
|
|
637
|
-
function
|
|
638
|
-
return t[5]?
|
|
637
|
+
function Tn(t){let e,r,n,i,o,s,a,f,y,g,v,E,_,T,w,A,B;function H(t,e){/*tabletView*/
|
|
638
|
+
return t[5]?Bn:Hn}let S=H(t),P=S(t);return{c(){e=p("div"),r=p("div"),n=p("div"),i=p("div"),o=p("img"),a=d(),f=p("div"),P.c(),y=d(),g=p("div"),v=p("img"),c(o.src,s=/*vendorIcon*/t[6])||m(o,"src",s),m(o,"alt",""),m(i,"class","vendorLogo"),m(f,"class","displayContainer"),c(v.src,E=/*titleLogoImg*/t[11])||m(v,"src",E),m(v,"alt",""),m(g,"class","title"),m(n,"class",_="mainWrapper "+/*visualstructure*/t[0]+" "+(/*mobileView*/t[4]&&!/*tabletView*/t[5]?"mobile":/*tabletView*/t[5]?"tablet":"")),b(n,"background","url("+/*backgroundImg*/t[10]+")"),m(r,"class","jackpotBanner"),m(e,"class",T=/*displayNone*/t[12]?"DisplayNone":""),m(e,"part",w=/*displayNone*/t[12]?"DisplayNone":"")},m(s,c){u(s,e,c),l(e,r),l(r,n),l(n,i),l(i,o),l(n,a),l(n,f),P.m(f,null),l(n,y),l(n,g),l(g,v),A||(B=function(t,e,r,n){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r,n)}(r,"click",/*click_handler*/t[31]),A=!0)},p(t,r){/*vendorIcon*/64&r[0]&&!c(o.src,s=/*vendorIcon*/t[6])&&m(o,"src",s),S===(S=H(t))&&P?P.p(t,r):(P.d(1),P=S(t),P&&(P.c(),P.m(f,null))),/*titleLogoImg*/2048&r[0]&&!c(v.src,E=/*titleLogoImg*/t[11])&&m(v,"src",E),/*visualstructure, mobileView, tabletView*/49&r[0]&&_!==(_="mainWrapper "+/*visualstructure*/t[0]+" "+(/*mobileView*/t[4]&&!/*tabletView*/t[5]?"mobile":/*tabletView*/t[5]?"tablet":""))&&m(n,"class",_),/*backgroundImg*/1024&r[0]&&b(n,"background","url("+/*backgroundImg*/t[10]+")"),/*displayNone*/4096&r[0]&&T!==(T=/*displayNone*/t[12]?"DisplayNone":"")&&m(e,"class",T),/*displayNone*/4096&r[0]&&w!==(w=/*displayNone*/t[12]?"DisplayNone":"")&&m(e,"part",w)},d(t){t&&h(e),P.d(),A=!1,B()}}}
|
|
639
639
|
// (166:22)
|
|
640
|
-
function
|
|
640
|
+
function wn(e){let r;return{c(){r=p("div"),m(r,"class","LoadingSpinner"),m(r,"part","LoadingSpinner")},m(t,e){u(t,r,e)},p:t,d(t){t&&h(r)}}}
|
|
641
641
|
// (164:2) {#if hasErrors}
|
|
642
|
-
function
|
|
642
|
+
function An(e){let r;return{c(){r=p("p"),r.textContent="500 Server error"},m(t,e){u(t,r,e)},p:t,d(t){t&&h(r)}}}
|
|
643
643
|
// (178:12) {:else}
|
|
644
|
-
function
|
|
644
|
+
function Bn(t){let e,r,n,i,o,s,a,b,g,v,E,_,T,w,A,B,H,S,P,L,C,O,x,I,N,R,M,U,$,D,k,G,j,F,V,W,X,z,K,Y,Z,q,J,Q,tt,et,rt,nt,it,ot,st,at,ct,lt=/*formattedLabels*/t[8][0]+"",ut=/*formattedJackpotValues*/t[7][0]+"",ht=/*formattedLabels*/t[8][1]+"",pt=/*formattedJackpotValues*/t[7][1]+"",ft=/*formattedLabels*/t[8][2]+"",dt=/*formattedJackpotValues*/t[7][2]+"",mt=/*formattedLabels*/t[8][3]+"",yt=/*formattedJackpotValues*/t[7][3]+"";return{c(){e=p("div"),r=p("div"),n=p("div"),i=p("img"),s=p("span"),a=f(lt),b=p("span"),g=p("span"),v=f(ut),E=d(),_=p("span"),T=f(/*currency*/t[1]),w=d(),A=p("div"),B=p("div"),H=p("img"),P=p("span"),L=f(ht),C=p("span"),O=p("span"),x=f(pt),I=d(),N=p("span"),R=f(/*currency*/t[1]),M=d(),U=p("div"),$=p("div"),D=p("div"),k=p("img"),j=p("span"),F=f(ft),V=p("span"),W=p("span"),X=f(dt),z=d(),K=p("span"),Y=f(/*currency*/t[1]),Z=d(),q=p("div"),J=p("div"),Q=p("img"),et=p("span"),rt=f(mt),nt=p("span"),it=p("span"),ot=f(yt),st=d(),at=p("span"),ct=f(/*currency*/t[1]),m(i,"class","displayCardIcon"),c(i.src,o=/*caticons*/t[9][0])||m(i,"src",o),m(i,"alt",""),m(s,"class","cardLabel"),m(n,"class","iconWrapper"),m(g,"class","jackpotValue"),m(_,"class","jackpot-currency"),m(b,"class","cardTextWrapper"),m(r,"class","displayCard"),m(H,"class","displayCardIcon"),c(H.src,S=/*caticons*/t[9][1])||m(H,"src",S),m(H,"alt",""),m(P,"class","cardLabel"),m(B,"class","iconWrapper"),m(O,"class","jackpotValue"),m(N,"class","jackpot-currency"),m(C,"class","cardTextWrapper"),m(A,"class","displayCard"),m(e,"class","pairWrapper"),m(k,"class","displayCardIcon"),c(k.src,G=/*caticons*/t[9][2])||m(k,"src",G),m(k,"alt",""),m(j,"class","cardLabel"),m(D,"class","iconWrapper"),m(W,"class","jackpotValue"),m(K,"class","jackpot-currency"),m(V,"class","cardTextWrapper"),m($,"class","displayCard"),m(Q,"class","displayCardIcon"),c(Q.src,tt=/*caticons*/t[9][3])||m(Q,"src",tt),m(Q,"alt",""),m(et,"class","cardLabel"),m(J,"class","iconWrapper"),m(it,"class","jackpotValue"),m(at,"class","jackpot-currency"),m(nt,"class","cardTextWrapper"),m(q,"class","displayCard"),m(U,"class","pairWrapper")},m(t,o){u(t,e,o),l(e,r),l(r,n),l(n,i),l(n,s),l(s,a),l(r,b),l(b,g),l(g,v),l(b,E),l(b,_),l(_,T),l(e,w),l(e,A),l(A,B),l(B,H),l(B,P),l(P,L),l(A,C),l(C,O),l(O,x),l(C,I),l(C,N),l(N,R),u(t,M,o),u(t,U,o),l(U,$),l($,D),l(D,k),l(D,j),l(j,F),l($,V),l(V,W),l(W,X),l(V,z),l(V,K),l(K,Y),l(U,Z),l(U,q),l(q,J),l(J,Q),l(J,et),l(et,rt),l(q,nt),l(nt,it),l(it,ot),l(nt,st),l(nt,at),l(at,ct)},p(t,e){/*caticons*/512&e[0]&&!c(i.src,o=/*caticons*/t[9][0])&&m(i,"src",o),/*formattedLabels*/256&e[0]&<!==(lt=/*formattedLabels*/t[8][0]+"")&&y(a,lt),/*formattedJackpotValues*/128&e[0]&&ut!==(ut=/*formattedJackpotValues*/t[7][0]+"")&&y(v,ut),/*currency*/2&e[0]&&y(T,/*currency*/t[1]),/*caticons*/512&e[0]&&!c(H.src,S=/*caticons*/t[9][1])&&m(H,"src",S),/*formattedLabels*/256&e[0]&&ht!==(ht=/*formattedLabels*/t[8][1]+"")&&y(L,ht),/*formattedJackpotValues*/128&e[0]&&pt!==(pt=/*formattedJackpotValues*/t[7][1]+"")&&y(x,pt),/*currency*/2&e[0]&&y(R,/*currency*/t[1]),/*caticons*/512&e[0]&&!c(k.src,G=/*caticons*/t[9][2])&&m(k,"src",G),/*formattedLabels*/256&e[0]&&ft!==(ft=/*formattedLabels*/t[8][2]+"")&&y(F,ft),/*formattedJackpotValues*/128&e[0]&&dt!==(dt=/*formattedJackpotValues*/t[7][2]+"")&&y(X,dt),/*currency*/2&e[0]&&y(Y,/*currency*/t[1]),/*caticons*/512&e[0]&&!c(Q.src,tt=/*caticons*/t[9][3])&&m(Q,"src",tt),/*formattedLabels*/256&e[0]&&mt!==(mt=/*formattedLabels*/t[8][3]+"")&&y(rt,mt),/*formattedJackpotValues*/128&e[0]&&yt!==(yt=/*formattedJackpotValues*/t[7][3]+"")&&y(ot,yt),/*currency*/2&e[0]&&y(ct,/*currency*/t[1])},d(t){t&&h(e),t&&h(M),t&&h(U)}}}
|
|
645
645
|
// (174:12) {#if !tabletView}
|
|
646
|
-
function
|
|
646
|
+
function Hn(t){let e,r=Array(4),n=[];for(let e=0;e<r.length;e+=1)n[e]=Sn(_n(t,r,e));return{c(){for(let t=0;t<n.length;t+=1)n[t].c();e=f("")},m(t,r){for(let e=0;e<n.length;e+=1)n[e]&&n[e].m(t,r);u(t,e,r)},p(t,i){if(/*currency, formattedJackpotValues, formattedLabels, caticons*/898&i[0]){let o;for(r=Array(4),o=0;o<r.length;o+=1){const s=_n(t,r,o);n[o]?n[o].p(s,i):(n[o]=Sn(s),n[o].c(),n[o].m(e.parentNode,e))}for(;o<n.length;o+=1)n[o].d(1);n.length=r.length}},d(t){!function(t,e){for(let r=0;r<t.length;r+=1)t[r]&&t[r].d(e)}(n,t),t&&h(e)}}}
|
|
647
647
|
// (175:14) {#each Array(4) as _, i}
|
|
648
|
-
function
|
|
649
|
-
return t[13]?
|
|
648
|
+
function Sn(t){let e,r,n,i,o,s,a,b,g,v,E,_,T=/*formattedLabels*/t[8][/*i*/t[50]]+"",w=/*formattedJackpotValues*/(t[7][/*i*/t[50]]??"")+"";return{c(){e=p("div"),r=p("div"),n=p("img"),o=p("span"),s=f(T),a=p("span"),b=p("span"),g=f(w),v=d(),E=p("span"),_=f(/*currency*/t[1]),m(n,"class","displayCardIcon"),c(n.src,i=/*caticons*/t[9][/*i*/t[50]])||m(n,"src",i),m(n,"alt",""),m(o,"class","cardLabel"),m(r,"class","iconWrapper"),m(b,"class","jackpotValue"),m(E,"class","jackpot-currency"),m(a,"class","cardTextWrapper"),m(e,"class","displayCard")},m(t,i){u(t,e,i),l(e,r),l(r,n),l(r,o),l(o,s),l(e,a),l(a,b),l(b,g),l(a,v),l(a,E),l(E,_)},p(t,e){/*caticons*/512&e[0]&&!c(n.src,i=/*caticons*/t[9][/*i*/t[50]])&&m(n,"src",i),/*formattedLabels*/256&e[0]&&T!==(T=/*formattedLabels*/t[8][/*i*/t[50]]+"")&&y(s,T),/*formattedJackpotValues*/128&e[0]&&w!==(w=/*formattedJackpotValues*/(t[7][/*i*/t[50]]??"")+"")&&y(g,w),/*currency*/2&e[0]&&y(_,/*currency*/t[1])},d(t){t&&h(e)}}}function Pn(e){let r;function n(t,e){/*hasErrors*/
|
|
649
|
+
return t[13]?An:/*isLoading*/t[3]?wn:Tn}let i=n(e),o=i(e);return{c(){r=p("div"),o.c(),this.c=t},m(t,n){u(t,r,n),o.m(r,null),
|
|
650
650
|
/*div_binding*/e[32](r)},p(t,e){i===(i=n(t))&&o?o.p(t,e):(o.d(1),o=i(t),o&&(o.c(),o.m(r,null)))},i:t,o:t,d(t){t&&h(r),o.d(),
|
|
651
|
-
/*div_binding*/e[32](null)}}}function
|
|
651
|
+
/*div_binding*/e[32](null)}}}function Ln(t,e,r){let n,i,{visualstructure:o=""}=e,{title:s=""}=e,{caticon0:a=""}=e,{caticon1:c=""}=e,{caticon2:l=""}=e,{caticon3:u=""}=e,{iconlabels:h=""}=e,{backgroundsrc:p=""}=e,{currency:f=""}=e,{backgroundsrcmobile:d=""}=e,{titlelogopath:m=""}=e,{lang:y="en"}=e,{clientstyling:b=""}=e,{clientstylingurl:g=""}=e,{translationurl:v=""}=e,{endpoint:E=""}=e,{gameid:T=""}=e,w=window.navigator.userAgent,A=!1,B=!1,H="",S=[],P=[],L=[],C=[],O=[],x="",I="",N=!1,R=!0,M=!1;Object.keys(En).forEach((t=>{vn(t,En[t])}));const U=["typeSpread","typeLeft"],$=()=>{if(E&&y&&f){let t=new URL(`${E}/v1/casino/jackpots`);t.searchParams.append("filter",`id=${T}`),t.searchParams.append("language",y),t.searchParams.append("additionalDataCurrency",f),fetch(t.href).then((t=>t.json().then((t=>{r(3,R=!1),i=t,P.includes(T)&&((t=>{var e;const r=null===(e=null==t?void 0:t.items[0])||void 0===e?void 0:e.additionalData;r&&Object.values(r).forEach((t=>S.push(+t)))})(i),(t=>{var e;r(6,H=(null===(e=null==t?void 0:t.items[0])||void 0===e?void 0:e.vendorLogo)||"")})(i))})).catch((t=>{r(13,M=!0),r(3,R=!1),console.error(t)}))))}},D=t=>t.map((t=>Intl.NumberFormat("en-US",{maximumFractionDigits:2}).format(t))),k=()=>{const t=window.innerHeight/window.innerWidth;return.75<t&&t<1.6},G=()=>{window.postMessage({type:"JackpotBannerClicked",gameid:T},window.location.href),
|
|
652
652
|
//Analytics event
|
|
653
|
-
"function"==typeof gtag&>ag("event","JackpotBannerClicked",{context:"JackpotBanner",gameId:`${T}`})},j=()=>{var t;t=y,
|
|
653
|
+
"function"==typeof gtag&>ag("event","JackpotBannerClicked",{context:"JackpotBanner",gameId:`${T}`})},j=()=>{var t;t=y,Jr.set(t)};return t.$$set=t=>{"visualstructure"in t&&r(0,o=t.visualstructure),"title"in t&&r(15,s=t.title),"caticon0"in t&&r(16,a=t.caticon0),"caticon1"in t&&r(17,c=t.caticon1),"caticon2"in t&&r(18,l=t.caticon2),"caticon3"in t&&r(19,u=t.caticon3),"iconlabels"in t&&r(20,h=t.iconlabels),"backgroundsrc"in t&&r(21,p=t.backgroundsrc),"currency"in t&&r(1,f=t.currency),"backgroundsrcmobile"in t&&r(22,d=t.backgroundsrcmobile),"titlelogopath"in t&&r(23,m=t.titlelogopath),"lang"in t&&r(24,y=t.lang),"clientstyling"in t&&r(25,b=t.clientstyling),"clientstylingurl"in t&&r(26,g=t.clientstylingurl),"translationurl"in t&&r(27,v=t.translationurl),"endpoint"in t&&r(28,E=t.endpoint),"gameid"in t&&r(29,T=t.gameid)},t.$$.update=()=>{/*endpoint*/268435456&t.$$.dirty[0]&&E&&(()=>{let t=new URL(`${E}/v1/casino/jackpots/config`);fetch(t.href).then((t=>t.json())).then((t=>{r(30,P=t.egtJackpotIds.map((t=>t)))}))})(),/*customStylingContainer, clientstyling*/33554436&t.$$.dirty[0]&&n&&b&&(()=>{let t=document.createElement("style");t.innerHTML=b,n.appendChild(t)})(),/*customStylingContainer, clientstylingurl*/67108868&t.$$.dirty[0]&&n&&g&&(()=>{r(12,N=!0);let t=new URL(g),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{n.appendChild(e)}),1),setTimeout((()=>{r(12,N=!1)}),500)}))})(),/*endpoint, lang, currency, validGameIds*/1358954498&t.$$.dirty[0]&&E&&y&&f&&P.length>0&&$(),/*currency, lang, isLoading*/16777226&t.$$.dirty[0]&&f&&y&&!R&&(
|
|
654
654
|
// Also checking that ratio is above 1 to work with edge cases where the ratio is landscape but the userAgent comes back as mobile
|
|
655
655
|
r(4,A=(t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)))(w)&&window.innerHeight/window.innerWidth>1),r(5,B=k()),
|
|
656
656
|
// Format jackpot values & labels
|
|
657
657
|
0!==S.length&&r(7,L=D(S)),r(8,C=h?h.split(",").map((t=>t.trim().toUpperCase())):new Array(4).fill("")),
|
|
658
658
|
// check if visualtype passed is correct (longer string prone to errors. maybe shorten the strings to be less descriptive, but also less error prone?)
|
|
659
|
-
U.includes(o.trim())?r(0,o=o.trim()):(console.warn(`Invalid Attribute Value: "${o}" is not a valid value for the "visualstructure" attribute. Defaulting to "${U[0]}"`),r(0,o=U[0])),r(10,x=d&&A&&!B?d:p),r(11,I=m),r(9,O=[a,c,l,u])),/*lang*/16777216&t.$$.dirty[0]&&y&&j(),/*translationurl*/134217728&t.$$.dirty[0]&&v&&fetch(v).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{
|
|
659
|
+
U.includes(o.trim())?r(0,o=o.trim()):(console.warn(`Invalid Attribute Value: "${o}" is not a valid value for the "visualstructure" attribute. Defaulting to "${U[0]}"`),r(0,o=U[0])),r(10,x=d&&A&&!B?d:p),r(11,I=m),r(9,O=[a,c,l,u])),/*lang*/16777216&t.$$.dirty[0]&&y&&j(),/*translationurl*/134217728&t.$$.dirty[0]&&v&&fetch(v).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{vn(e,t[e])}))})).catch((t=>{console.log(t)}))},[o,f,n,R,A,B,H,L,C,O,x,I,N,M,G,s,a,c,l,u,h,p,d,m,y,b,g,v,E,T,P,()=>G(),function(t){_[t?"unshift":"push"]((()=>{n=t,r(2,n)}))}]}class Cn extends R{constructor(t){super();const e=document.createElement("style");e.textContent=':host{font-family:"Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";color:#fff}*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.mainWrapper{padding:33px 3vw;background-repeat:no-repeat !important;background-size:cover !important;border-radius:7px;display:grid;grid-gap:0.5rem;z-index:0}.vendorLogo{grid-area:vendorLogo;height:24px;width:auto;display:flex;align-items:center}.vendorLogo img{height:100%;width:auto}.displayCard{position:relative;background:#1c2136;height:max(0.5vw, 1rem);padding:10px 20px 10px 24px;margin:0 8px;box-sizing:content-box;border-radius:7px;display:flex;justify-content:center;align-items:center;border:1px solid #ffc052}.displayCard .iconWrapper{width:44px;height:44px;position:absolute;left:-24px;display:flex;flex-direction:column;justify-content:flex-start;align-items:center}.displayCard .displayCardIcon{height:100%;width:auto}.displayCard .cardLabel{font-size:0.8rem;font-style:italic}.displayCard .cardTextWrapper{display:flex;justify-content:center;flex-wrap:nowrap;align-items:flex-end}.title{grid-area:title;display:flex;align-items:center}.title img{height:50px}.displayContainer{grid-area:displayArea;padding:0 0 0 20px;display:flex;gap:40px;justify-content:space-between;align-items:center}.displayContainer .jackpotValue{font-size:1.2rem;font-weight:400;display:flex;align-items:flex-end}.displayContainer .jackpot-currency{font-weight:400;font-style:italic;font-size:8px;padding-left:2px;display:flex;align-items:flex-end}.pairWrapper{width:100%;padding-left:4%;display:flex;justify-content:flex-start;gap:30px}.typeSpread{grid-template-columns:1fr 2.5fr 1fr;grid-template-areas:"title displayArea vendorLogo";align-items:center}.typeSpread.mobile{grid-template-areas:"title" "vendorLogo" "displayArea";margin-top:25px}.typeSpread .pairWrapper{justify-content:center}.typeSpread .vendorLogo{justify-content:flex-end}.typeSpread .title{justify-content:flex-start}.typeSpread .displayContainer{justify-content:space-evenly}.typeLeft{grid-template-columns:1fr 4fr;grid-template-areas:"title displayArea" "vendorLogo displayArea";padding:44px 33px}.typeLeft.mobile{grid-template-areas:"title" "vendorLogo" "displayArea";padding:33px}.typeLeft.mobile .displayContainer{margin-top:50px;gap:2.6rem}.typeLeft .displayContainer{padding-left:2rem;width:auto;gap:2rem}.typeLeft .pairWrapper{justify-content:space-evenly}.typeLeft .title{align-items:flex-end}.typeLeft .vendorLogo{height:24px;width:auto}.mobile{grid-template-columns:1fr;grid-gap:1rem}.mobile .title{justify-content:center;align-items:center}.mobile .title img{height:80px}.mobile .displayContainer{padding-left:26px;flex-direction:column;flex-wrap:nowrap;justify-content:center;align-items:center}.mobile .vendorLogo{justify-content:center;align-items:center}.mobile .displayCard{width:40vw}.tablet .displayContainer{flex-wrap:wrap}.DisplayNone{display:none}.loadingPrompt{color:#333}.LoadingSpinner{display:block;width:80px;height:80px;margin:0 auto}.LoadingSpinner:after{content:" ";display:block;width:64px;height:64px;margin:8px;border-radius:50%;border:6px solid var(--emfe-w-color-primary, #D0046C);border-color:var(--emfe-w-color-primary, #D0046C) transparent var(--emfe-w-color-primary, #D0046C) transparent;animation:LoadingSpinner 1.2s linear infinite}@keyframes LoadingSpinner{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}',this.shadowRoot.appendChild(e),N(this,{target:this.shadowRoot,props:g(this.attributes),customElement:!0},Ln,Pn,o,{visualstructure:0,title:15,caticon0:16,caticon1:17,caticon2:18,caticon3:19,iconlabels:20,backgroundsrc:21,currency:1,backgroundsrcmobile:22,titlelogopath:23,lang:24,clientstyling:25,clientstylingurl:26,translationurl:27,endpoint:28,gameid:29},null,[-1,-1]),t&&(t.target&&u(t.target,this,t.anchor),t.props&&(this.$set(t.props),L()))}static get observedAttributes(){return["visualstructure","title","caticon0","caticon1","caticon2","caticon3","iconlabels","backgroundsrc","currency","backgroundsrcmobile","titlelogopath","lang","clientstyling","clientstylingurl","translationurl","endpoint","gameid"]}get visualstructure(){return this.$$.ctx[0]}set visualstructure(t){this.$$set({visualstructure:t}),L()}get title(){return this.$$.ctx[15]}set title(t){this.$$set({title:t}),L()}get caticon0(){return this.$$.ctx[16]}set caticon0(t){this.$$set({caticon0:t}),L()}get caticon1(){return this.$$.ctx[17]}set caticon1(t){this.$$set({caticon1:t}),L()}get caticon2(){return this.$$.ctx[18]}set caticon2(t){this.$$set({caticon2:t}),L()}get caticon3(){return this.$$.ctx[19]}set caticon3(t){this.$$set({caticon3:t}),L()}get iconlabels(){return this.$$.ctx[20]}set iconlabels(t){this.$$set({iconlabels:t}),L()}get backgroundsrc(){return this.$$.ctx[21]}set backgroundsrc(t){this.$$set({backgroundsrc:t}),L()}get currency(){return this.$$.ctx[1]}set currency(t){this.$$set({currency:t}),L()}get backgroundsrcmobile(){return this.$$.ctx[22]}set backgroundsrcmobile(t){this.$$set({backgroundsrcmobile:t}),L()}get titlelogopath(){return this.$$.ctx[23]}set titlelogopath(t){this.$$set({titlelogopath:t}),L()}get lang(){return this.$$.ctx[24]}set lang(t){this.$$set({lang:t}),L()}get clientstyling(){return this.$$.ctx[25]}set clientstyling(t){this.$$set({clientstyling:t}),L()}get clientstylingurl(){return this.$$.ctx[26]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),L()}get translationurl(){return this.$$.ctx[27]}set translationurl(t){this.$$set({translationurl:t}),L()}get endpoint(){return this.$$.ctx[28]}set endpoint(t){this.$$set({endpoint:t}),L()}get gameid(){return this.$$.ctx[29]}set gameid(t){this.$$set({gameid:t}),L()}}return!customElements.get("casino-jackpot-banner")&&customElements.define("casino-jackpot-banner",Cn),Cn}));
|
|
660
660
|
//# sourceMappingURL=casino-jackpot-banner.js.map
|