timered-counter 0.1.0 → 0.1.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.
@@ -1,4 +1,4 @@
1
- !function(t){function e(t,e,i,r){var n,s=arguments.length,o=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(o=(s<3?n(o):s>3?n(e,i,o):n(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o}function i(t,e,i,r){if("a"===i&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?r:"a"===i?r.call(t):r?r.value:e.get(t)}"function"==typeof SuppressedError&&SuppressedError;
1
+ var t,e;t=this,e=function(t){function e(t,e,i,r){var n,s=arguments.length,o=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(o=(s<3?n(o):s>3?n(e,i,o):n(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o}function i(t,e,i,r){if("a"===i&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?r:"a"===i?r.call(t):r?r.value:e.get(t)}"function"==typeof SuppressedError&&SuppressedError;
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2019 Google LLC
@@ -15,7 +15,7 @@ const r=globalThis,n=r.ShadowRoot&&(void 0===r.ShadyCSS||r.ShadyCSS.nativeShadow
15
15
  * Copyright 2017 Google LLC
16
16
  * SPDX-License-Identifier: BSD-3-Clause
17
17
  */
18
- const x=globalThis,N=x.trustedTypes,O=N?N.createPolicy("lit-html",{createHTML:t=>t}):void 0,E="$lit$",T=`lit$${Math.random().toFixed(9).slice(2)}$`,D="?"+T,C=`<${D}>`,P=document,M=()=>P.createComment(""),k=t=>null===t||"object"!=typeof t&&"function"!=typeof t,I=Array.isArray,R="[ \t\n\f\r]",U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,L=/-->/g,j=/>/g,V=RegExp(`>|${R}(?:([^\\s"'>=/]+)(${R}*=${R}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),B=/'/g,H=/"/g,F=/^(?:script|style|textarea|title)$/i,q=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),z=Symbol.for("lit-noChange"),Y=Symbol.for("lit-nothing"),Z=new WeakMap,W=P.createTreeWalker(P,129);function Q(t,e){if(!I(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==O?O.createHTML(e):e}class G{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let n=0,s=0;const o=t.length-1,a=this.parts,[l,u]=((t,e)=>{const i=t.length-1,r=[];let n,s=2===e?"<svg>":3===e?"<math>":"",o=U;for(let e=0;e<i;e++){const i=t[e];let a,l,u=-1,c=0;for(;c<i.length&&(o.lastIndex=c,l=o.exec(i),null!==l);)c=o.lastIndex,o===U?"!--"===l[1]?o=L:void 0!==l[1]?o=j:void 0!==l[2]?(F.test(l[2])&&(n=RegExp("</"+l[2],"g")),o=V):void 0!==l[3]&&(o=V):o===V?">"===l[0]?(o=n??U,u=-1):void 0===l[1]?u=-2:(u=o.lastIndex-l[2].length,a=l[1],o=void 0===l[3]?V:'"'===l[3]?H:B):o===H||o===B?o=V:o===L||o===j?o=U:(o=V,n=void 0);const h=o===V&&t[e+1].startsWith("/>")?" ":"";s+=o===U?i+C:u>=0?(r.push(a),i.slice(0,u)+E+i.slice(u)+T+h):i+T+(-2===u?e:h)}return[Q(t,s+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),r]})(t,e);if(this.el=G.createElement(l,i),W.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=W.nextNode())&&a.length<o;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(E)){const e=u[s++],i=r.getAttribute(t).split(T),o=/([.?@])?(.*)/.exec(e);a.push({type:1,index:n,name:o[2],strings:i,ctor:"."===o[1]?et:"?"===o[1]?it:"@"===o[1]?rt:tt}),r.removeAttribute(t)}else t.startsWith(T)&&(a.push({type:6,index:n}),r.removeAttribute(t));if(F.test(r.tagName)){const t=r.textContent.split(T),e=t.length-1;if(e>0){r.textContent=N?N.emptyScript:"";for(let i=0;i<e;i++)r.append(t[i],M()),W.nextNode(),a.push({type:2,index:++n});r.append(t[e],M())}}}else if(8===r.nodeType)if(r.data===D)a.push({type:2,index:n});else{let t=-1;for(;-1!==(t=r.data.indexOf(T,t+1));)a.push({type:7,index:n}),t+=T.length-1}n++}}static createElement(t,e){const i=P.createElement("template");return i.innerHTML=t,i}}function K(t,e,i=t,r){if(e===z)return e;let n=void 0!==r?i._$Co?.[r]:i._$Cl;const s=k(e)?void 0:e._$litDirective$;return n?.constructor!==s&&(n?._$AO?.(!1),void 0===s?n=void 0:(n=new s(t),n._$AT(t,i,r)),void 0!==r?(i._$Co??=[])[r]=n:i._$Cl=n),void 0!==n&&(e=K(t,n._$AS(t,e.values),n,r)),e}let J=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,r=(t?.creationScope??P).importNode(e,!0);W.currentNode=r;let n=W.nextNode(),s=0,o=0,a=i[0];for(;void 0!==a;){if(s===a.index){let e;2===a.type?e=new X(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new nt(n,this,t)),this._$AV.push(e),a=i[++o]}s!==a?.index&&(n=W.nextNode(),s++)}return W.currentNode=P,r}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}};class X{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,r){this.type=2,this._$AH=Y,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=K(this,t,e),k(t)?t===Y||null==t||""===t?(this._$AH!==Y&&this._$AR(),this._$AH=Y):t!==this._$AH&&t!==z&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>I(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==Y&&k(this._$AH)?this._$AA.nextSibling.data=t:this.T(P.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,r="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=G.createElement(Q(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(e);else{const t=new J(r,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=Z.get(t.strings);return void 0===e&&Z.set(t.strings,e=new G(t)),e}k(t){I(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const n of t)r===e.length?e.push(i=new X(this.O(M()),this.O(M()),this,this.options)):i=e[r],i._$AI(n),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}let tt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,r,n){this.type=1,this._$AH=Y,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Y}_$AI(t,e=this,i,r){const n=this.strings;let s=!1;if(void 0===n)t=K(this,t,e,0),s=!k(t)||t!==this._$AH&&t!==z,s&&(this._$AH=t);else{const r=t;let o,a;for(t=n[0],o=0;o<n.length-1;o++)a=K(this,r[i+o],e,o),a===z&&(a=this._$AH[o]),s||=!k(a)||a!==this._$AH[o],a===Y?t=Y:t!==Y&&(t+=(a??"")+n[o+1]),this._$AH[o]=a}s&&!r&&this.j(t)}j(t){t===Y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}};class et extends tt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Y?void 0:t}}class it extends tt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==Y)}}class rt extends tt{constructor(t,e,i,r,n){super(t,e,i,r,n),this.type=5}_$AI(t,e=this){if((t=K(this,t,e,0)??Y)===z)return;const i=this._$AH,r=t===Y&&i!==Y||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==Y&&(i===Y||r);r&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class nt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){K(this,t)}}const st={I:X},ot=x.litHtmlPolyfillSupport;ot?.(G,X),(x.litHtmlVersions??=[]).push("3.2.1");
18
+ const x=globalThis,N=x.trustedTypes,O=N?N.createPolicy("lit-html",{createHTML:t=>t}):void 0,T="$lit$",E=`lit$${Math.random().toFixed(9).slice(2)}$`,D="?"+E,C=`<${D}>`,P=document,M=()=>P.createComment(""),k=t=>null===t||"object"!=typeof t&&"function"!=typeof t,I=Array.isArray,R="[ \t\n\f\r]",U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,L=/-->/g,j=/>/g,V=RegExp(`>|${R}(?:([^\\s"'>=/]+)(${R}*=${R}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),B=/'/g,H=/"/g,F=/^(?:script|style|textarea|title)$/i,q=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),z=Symbol.for("lit-noChange"),Y=Symbol.for("lit-nothing"),Z=new WeakMap,W=P.createTreeWalker(P,129);function Q(t,e){if(!I(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==O?O.createHTML(e):e}class G{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let n=0,s=0;const o=t.length-1,a=this.parts,[l,u]=((t,e)=>{const i=t.length-1,r=[];let n,s=2===e?"<svg>":3===e?"<math>":"",o=U;for(let e=0;e<i;e++){const i=t[e];let a,l,u=-1,c=0;for(;c<i.length&&(o.lastIndex=c,l=o.exec(i),null!==l);)c=o.lastIndex,o===U?"!--"===l[1]?o=L:void 0!==l[1]?o=j:void 0!==l[2]?(F.test(l[2])&&(n=RegExp("</"+l[2],"g")),o=V):void 0!==l[3]&&(o=V):o===V?">"===l[0]?(o=n??U,u=-1):void 0===l[1]?u=-2:(u=o.lastIndex-l[2].length,a=l[1],o=void 0===l[3]?V:'"'===l[3]?H:B):o===H||o===B?o=V:o===L||o===j?o=U:(o=V,n=void 0);const h=o===V&&t[e+1].startsWith("/>")?" ":"";s+=o===U?i+C:u>=0?(r.push(a),i.slice(0,u)+T+i.slice(u)+E+h):i+E+(-2===u?e:h)}return[Q(t,s+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),r]})(t,e);if(this.el=G.createElement(l,i),W.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=W.nextNode())&&a.length<o;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(T)){const e=u[s++],i=r.getAttribute(t).split(E),o=/([.?@])?(.*)/.exec(e);a.push({type:1,index:n,name:o[2],strings:i,ctor:"."===o[1]?et:"?"===o[1]?it:"@"===o[1]?rt:tt}),r.removeAttribute(t)}else t.startsWith(E)&&(a.push({type:6,index:n}),r.removeAttribute(t));if(F.test(r.tagName)){const t=r.textContent.split(E),e=t.length-1;if(e>0){r.textContent=N?N.emptyScript:"";for(let i=0;i<e;i++)r.append(t[i],M()),W.nextNode(),a.push({type:2,index:++n});r.append(t[e],M())}}}else if(8===r.nodeType)if(r.data===D)a.push({type:2,index:n});else{let t=-1;for(;-1!==(t=r.data.indexOf(E,t+1));)a.push({type:7,index:n}),t+=E.length-1}n++}}static createElement(t,e){const i=P.createElement("template");return i.innerHTML=t,i}}function K(t,e,i=t,r){if(e===z)return e;let n=void 0!==r?i._$Co?.[r]:i._$Cl;const s=k(e)?void 0:e._$litDirective$;return n?.constructor!==s&&(n?._$AO?.(!1),void 0===s?n=void 0:(n=new s(t),n._$AT(t,i,r)),void 0!==r?(i._$Co??=[])[r]=n:i._$Cl=n),void 0!==n&&(e=K(t,n._$AS(t,e.values),n,r)),e}let J=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,r=(t?.creationScope??P).importNode(e,!0);W.currentNode=r;let n=W.nextNode(),s=0,o=0,a=i[0];for(;void 0!==a;){if(s===a.index){let e;2===a.type?e=new X(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new nt(n,this,t)),this._$AV.push(e),a=i[++o]}s!==a?.index&&(n=W.nextNode(),s++)}return W.currentNode=P,r}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}};class X{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,r){this.type=2,this._$AH=Y,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=K(this,t,e),k(t)?t===Y||null==t||""===t?(this._$AH!==Y&&this._$AR(),this._$AH=Y):t!==this._$AH&&t!==z&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>I(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==Y&&k(this._$AH)?this._$AA.nextSibling.data=t:this.T(P.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,r="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=G.createElement(Q(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(e);else{const t=new J(r,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=Z.get(t.strings);return void 0===e&&Z.set(t.strings,e=new G(t)),e}k(t){I(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const n of t)r===e.length?e.push(i=new X(this.O(M()),this.O(M()),this,this.options)):i=e[r],i._$AI(n),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}let tt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,r,n){this.type=1,this._$AH=Y,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Y}_$AI(t,e=this,i,r){const n=this.strings;let s=!1;if(void 0===n)t=K(this,t,e,0),s=!k(t)||t!==this._$AH&&t!==z,s&&(this._$AH=t);else{const r=t;let o,a;for(t=n[0],o=0;o<n.length-1;o++)a=K(this,r[i+o],e,o),a===z&&(a=this._$AH[o]),s||=!k(a)||a!==this._$AH[o],a===Y?t=Y:t!==Y&&(t+=(a??"")+n[o+1]),this._$AH[o]=a}s&&!r&&this.j(t)}j(t){t===Y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}};class et extends tt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Y?void 0:t}}class it extends tt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==Y)}}class rt extends tt{constructor(t,e,i,r,n){super(t,e,i,r,n),this.type=5}_$AI(t,e=this){if((t=K(this,t,e,0)??Y)===z)return;const i=this._$AH,r=t===Y&&i!==Y||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==Y&&(i===Y||r);r&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class nt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){K(this,t)}}const st={I:X},ot=x.litHtmlPolyfillSupport;ot?.(G,X),(x.litHtmlVersions??=[]).push("3.2.1");
19
19
  /**
20
20
  * @license
21
21
  * Copyright 2017 Google LLC
@@ -63,14 +63,14 @@ function ft(t,e){return(e,i,r)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Ref
63
63
  * @license
64
64
  * Copyright 2017 Google LLC
65
65
  * SPDX-License-Identifier: BSD-3-Clause
66
- */var Ot={done:!0,hasNext:!1},Et={done:!1,hasNext:!1},Tt=()=>Ot;function Dt(t,...e){let i=t,r=e.map((t=>"lazy"in t?function(t){let{lazy:e,lazyArgs:i}=t,r=e(...i);return Object.assign(r,{isSingle:e.single??!1,index:0,items:[]})}(t):void 0)),n=0;for(;n<e.length;){if(void 0===r[n]||!Pt(i)){i=(0,e[n])(i),n+=1;continue}let t=[];for(let i=n;i<e.length;i++){let e=r[i];if(void 0===e||(t.push(e),e.isSingle))break}let s=[];for(let e of i)if(Ct(e,s,t))break;let{isSingle:o}=t.at(-1);i=o?s[0]:s,n+=t.length}return i}function Ct(t,e,i){if(0===i.length)return e.push(t),!1;let r=t,n=Et,s=!1;for(let[t,o]of i.entries()){let{index:a,items:l}=o;if(l.push(r),n=o(r,a,l),o.index+=1,n.hasNext){if(n.hasMany){for(let r of n.next)if(Ct(r,e,i.slice(t+1)))return!0;return s}r=n.next}if(!n.hasNext)break;n.done&&(s=!0)}return n.hasNext&&e.push(r),s}function Pt(t){return"string"==typeof t||"object"==typeof t&&null!==t&&Symbol.iterator in t}function Mt(t,e,i){let r=t.length-e.length;if(0===r)return t(...e);if(1===r)return function(t,e,i){let r=i=>t(i,...e);return void 0===i?r:Object.assign(r,{lazy:i,lazyArgs:e})}(t,e,i);throw new Error("Wrong number of arguments")}function kt(...t){return Mt(It,t)}var It=(t,e)=>t.length>=e;function Rt(t,e){let i=[];for(let r=t;r<e;r++)i.push(r);return i}function Ut(t,e){if(!kt(e,1))return{...t};if(!kt(e,2)){let{[e[0]]:i,...r}=t;return r}let i={...t};for(let t of e)delete i[t];return i}function Lt(...t){return Mt(jt,t)}var jt=(t,e)=>({...t,...e});function Vt(...t){return Mt(Bt,t,Ht)}var Bt=(t,e)=>t.map(e),Ht=t=>(e,i,r)=>({done:!1,hasNext:!0,next:t(e,i,r)});function Ft(t){return"number"==typeof t&&!Number.isNaN(t)}function qt(t){return"string"==typeof t}function zt(t){return void 0===t||("string"==typeof t||Array.isArray(t)?0===t.length:0===Object.keys(t).length)}function Yt(t){return null==t}function Zt(t){return Array.isArray(t)}function Wt(t){return"boolean"==typeof t}function Qt(t){return t instanceof Date}function Gt(...t){return Mt(Kt,t)}function Kt(t,e){if(t===e||Object.is(t,e))return!0;if("object"!=typeof t||"object"!=typeof e||null===t||null===e||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;if(Array.isArray(t))return function(t,e){if(t.length!==e.length)return!1;for(let[i,r]of t.entries())if(!Kt(r,e[i]))return!1;return!0}(t,e);if(t instanceof Map)return function(t,e){if(t.size!==e.size)return!1;for(let[i,r]of t.entries())if(!e.has(i)||!Kt(r,e.get(i)))return!1;return!0}(t,e);if(t instanceof Set)return function(t,e){if(t.size!==e.size)return!1;let i=[...e];for(let e of t){let t=!1;for(let[r,n]of i.entries())if(Kt(e,n)){t=!0,i.splice(r,1);break}if(!t)return!1}return!0}(t,e);if(t instanceof Date)return t.getTime()===e.getTime();if(t instanceof RegExp)return t.toString()===e.toString();if(Object.keys(t).length!==Object.keys(e).length)return!1;for(let[i,r]of Object.entries(t))if(!(i in e)||!Kt(r,e[i]))return!1;return!0}function Jt(...t){return function(t,e){let i=e.length-t.length;if(1===i){let[i,...r]=e;return Dt(i,{lazy:t,lazyArgs:r})}if(0===i){let i={lazy:t,lazyArgs:e};return Object.assign((t=>Dt(t,i)),i)}throw new Error("Wrong number of arguments")}(Xt,t)}function Xt(t){if(0===t.length)return Tt;let e=new Map;for(let i of t)e.set(i,(e.get(i)??0)+1);return t=>{let i=e.get(t);return void 0===i||0===i?Et:(1===i?e.delete(t):e.set(t,i-1),{hasNext:!0,next:t,done:0===e.size})}}function te(t,e){const i=function(t,e){return function(t){return"function"==typeof t}(t)?t(e):t}(t,e),{data:r}=e,n=[];for(let t=0;t<r.length;t+=1){const e=Zt(i)?i[t]:i;n.push(e)}return n}function ee(t,e){const i=te(t,e),{data:r}=e,n=[];for(let t=0;t<r.length;t+=1){const{digits:e}=r[t],s=i[t];n.push([]);for(let i=0;i<e.length;i+=1){const e=Zt(s)?s[i]:s;n[t].push(e)}}return n}function ie(t,e){const i=ee(t,e),{data:r}=e,n=[];for(let t=0;t<r.length;t+=1){const{digits:e}=r[t],s=i[t];n.push([]);for(let i=0;i<e.length;i+=1){const{data:r}=e[i],o=s[i];n[t].push([]);for(let e=0;e<r.length;e+=1){const r=Zt(o)?o[e]:o;n[t][i].push(r)}}}return n}function re(t,e){return Lt(t??{},e??{})}function ne(t=[],e=[]){const i=Array.from(new Set(Object.keys(t).concat(Object.keys(e))));for(const r of i){const i=Number.parseInt(r,10);t[i]=re(t[i],e[i])}return t}function se(t=[],e=[]){const i=Array.from(new Set(Object.keys(t).concat(Object.keys(e))));for(const r of i){const i=Number.parseInt(r,10);t[i]=ne(t[i],e[i])}return t}const oe=t=>{class i extends t{constructor(){super(...arguments),this.cellStyles={},this.cachedCellStyles=[],this.digitStyles={},this.cachedDigitStyles=[],this.partStyles={},this.cachedPartStyles=[],this.color="inherit"}extractCellStyles(){const t={preprocessData:this.partPreprocessDataList,data:this.parts,direction:this.direction,value:[this.value,this.oldValue]},e=function(t=[],e=[]){const i=Array.from(new Set(Object.keys(t).concat(Object.keys(e))));for(const r of i){const i=Number.parseInt(r,10);t[i]=se(t[i],e[i])}return t}(ie(this.cellStyles??{},t),ie(this.cellStylesDynamic??{},t));return Gt(this.cachedCellStyles,e)||(this.cachedCellStyles=e),this.cachedCellStyles}extractDigitStyles(){const t={preprocessData:this.partPreprocessDataList,data:this.parts,direction:this.direction,value:[this.value,this.oldValue]},e=se(ee(this.digitStyles??{},t),ee(this.digitStylesDynamic??{},t));return Gt(this.cachedDigitStyles,e)||(this.cachedDigitStyles=e),this.cachedDigitStyles}extractPartStyles(){const t={preprocessData:this.partPreprocessDataList,data:this.parts,direction:this.direction,value:[this.value,this.oldValue]},e=ne(te(this.partStyles??{},t),te(this.partStylesDynamic??{},t));return Gt(this.cachedPartStyles,e)||(this.cachedPartStyles=e),this.cachedPartStyles}}return e([dt({type:Object,attribute:"cell-styles",reflect:!0})],i.prototype,"cellStyles",void 0),e([dt({type:Object,attribute:"digit-styles",reflect:!0})],i.prototype,"digitStyles",void 0),e([dt({type:Object,attribute:"part-styles",reflect:!0})],i.prototype,"partStyles",void 0),e([dt({type:String,reflect:!0})],i.prototype,"color",void 0),i};function ae(t){return t.length}function le(){return function(t){if(!(n=t.length))return[];for(var e=-1,i=function(t,e){let i;if(void 0===e)for(const e of t)null!=e&&(i>e||void 0===i&&e>=e)&&(i=e);else{let r=-1;for(let n of t)null!=(n=e(n,++r,t))&&(i>n||void 0===i&&n>=n)&&(i=n)}return i}(t,ae),r=new Array(i);++e<i;)for(var n,s=-1,o=r[e]=new Array(n);++s<n;)o[s]=t[s][e];return r}(arguments)}function ue(t,e){const[i,r]=t,[n,s]=e,o={animate:!0,cancelPrevAnimation:!1};let a="";return 1===n.data.length&&(o.animate=!1,o.cancelPrevAnimation=!0,a="only one digit"),i!==r||(n.data[0]===n.data[n.data.length-1]&&(o.animate=!1,o.cancelPrevAnimation=!0,a="same head and tail"),Gt(n,s)&&(o.animate=!1,a="same digits"),a&&(o.earlyReturn=a)),o}function ce(t){try{return JSON.parse(t)}catch(e){return t}}function he(t){const e={};return Zt(t.digitToChar)?t.digitToChar.forEach(((t,i)=>{var r;e[(r=i,String.fromCodePoint(r+48))]=t})):function(t){return"object"==typeof t&&null!==t}(t.digitToChar)&&Object.entries(t.digitToChar).forEach((([t,i])=>{e[t]=i})),{...t,digitToChar:e}}const de=t=>{var r,n;class s extends t{constructor(){super(...arguments),n.set(this,{...r.DEFAULT_PARTS_OPTIONS}),this.parts=[],this.oldParts=[],this.partPreprocessDataList=[]}get partsOptions(){return i(this,n,"f")}set partsOptions(t){const e=i(this,n,"f");!function(t,e,i,r,n){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===r?n.call(t,i):n?n.value=i:e.set(t,i)}(this,n,he({...r.DEFAULT_PARTS_OPTIONS,...t}),"f"),this.requestUpdate("partsOptions",e)}sampling(t,e){return function(t,e,i,r){let n=r;const s=t.isInteger(e)&&t.isInteger(i)?function(t,e,i){return function(r){return t.round(t.add(t.mul(e,t.sub(t.create(1),r)),t.mul(i,r)))}}(t,e,i):function(t,e,i){return function(r){return t.add(t.mul(e,t.sub(t.create(1),r)),t.mul(i,r))}}(t,e,i);t.eq(e,i)&&(n=1);const o=[];for(let e=0;e<n;e++){const i=t.div(t.create(e),t.create(Math.max(n-1,1)));o.push(s(i))}return o}(this.numberAdapter,this.numberAdapter.max(t,e),this.numberAdapter.min(t,e),this.partsOptions.sampleCount)}sampleSplit(t){return[t.slice()]}sampleToString(t){return this.numberAdapter.toString(t)}willUpdate(t){super.willUpdate(t),t.has("value")&&(this.oldParts=this.parts),(t.has("value")||t.has("partsOptions"))&&(this.parts=this.processPartData()),t.has("value")&&(this.partPreprocessDataList=function(t,e,i,r){const n=[];let s=0;for(let o=0;o<e.length;o++){const a=e[o],l=r?.[o],u=[];for(let e=0;e<a.digits.length;e++){const r=a.digits[e],n=l?.digits.find((t=>t.place===r.place));u.push({...ue([t,i],[r,n]),index:s++,partIndex:o,digitIndex:e})}n.push(u)}return n}(this.direction,this.parts,this.oldDirection,this.oldParts))}processPartData(){const{decimalSeparator:t,digitToChar:e,minPlaces:i,fillChar:r,type:n}=this.partsOptions,s=this.value,o=this.oldValue;let a=e=>this.sampleToString(e).split(t);"string"===n&&(a=t=>[this.sampleToString(t),""]);const l=[],u=this.sampleSplit(this.sampling(s,o));{const n=this.numberAdapter.gt(s,o)?"down":"up";for(let s=0;s<u.length;s++){const o=u[s],c=o["down"===n?0:o.length-1],[h=1,d=0]=i,p=a(c),f=Math.max(this.stringAdapter.stringToChars(p[0]).length,h),m=Math.max(this.stringAdapter.stringToChars(p[1]??"").length,d),g=le(...o.map((e=>{const[i="",n=""]=a(e),s=this.stringAdapter.stringToChars(i),o=this.stringAdapter.stringToChars(n),l=Math.max(f-s.length,0),u=Math.max(m-o.length,0);let c=[].concat(new Array(l).fill(r),s);return m>0&&(c=c.concat([t],o,new Array(u).fill(r))),c}))).map(((t,i,r)=>({data:t.filter(((t,e,i)=>0===e||t!==i[e-1])).map((t=>e[t]??t)),place:r.length-i})));l.push({digits:g})}}return l}}return r=s,n=new WeakMap,s.DEFAULT_PARTS_OPTIONS={sampleCount:16,decimalSeparator:".",fillChar:"0",minPlaces:[1,0],digitToChar:{},type:"number"},e([dt({type:Object,attribute:"parts-options",converter:t=>ce(t??"")??{},noAccessor:!0})],s.prototype,"partsOptions",null),s},pe=()=>({create(t){const e=Number(t);return Number.isFinite(e)?e:0},add:(t,e)=>t+e,sub:(t,e)=>t-e,mul:(t,e)=>t*e,div:(t,e)=>t/e,compare:(t,e)=>t>e?1:t<e?-1:0,eq:(t,e)=>t===e,gt:(t,e)=>t>e,gte:(t,e)=>t>=e,lt:(t,e)=>t<e,lte:(t,e)=>t<=e,isInteger:t=>Number.isInteger(t),isNegative:t=>t<0,isPositive:t=>t>0,isZero:t=>0===t,isNaN:t=>Number.isNaN(t),isFinite:t=>Number.isFinite(t),abs:t=>Math.abs(t),ceil:t=>Math.ceil(t),floor:t=>Math.floor(t),round:t=>Math.round(t),max:(t,e)=>Math.max(t,e),min:(t,e)=>Math.min(t,e),toNumber:t=>Number(t),toString:t=>String(t)})
66
+ */var Ot={done:!0,hasNext:!1},Tt={done:!1,hasNext:!1},Et=()=>Ot;function Dt(t,...e){let i=t,r=e.map((t=>"lazy"in t?function(t){let{lazy:e,lazyArgs:i}=t,r=e(...i);return Object.assign(r,{isSingle:e.single??!1,index:0,items:[]})}(t):void 0)),n=0;for(;n<e.length;){if(void 0===r[n]||!Pt(i)){i=(0,e[n])(i),n+=1;continue}let t=[];for(let i=n;i<e.length;i++){let e=r[i];if(void 0===e||(t.push(e),e.isSingle))break}let s=[];for(let e of i)if(Ct(e,s,t))break;let{isSingle:o}=t.at(-1);i=o?s[0]:s,n+=t.length}return i}function Ct(t,e,i){if(0===i.length)return e.push(t),!1;let r=t,n=Tt,s=!1;for(let[t,o]of i.entries()){let{index:a,items:l}=o;if(l.push(r),n=o(r,a,l),o.index+=1,n.hasNext){if(n.hasMany){for(let r of n.next)if(Ct(r,e,i.slice(t+1)))return!0;return s}r=n.next}if(!n.hasNext)break;n.done&&(s=!0)}return n.hasNext&&e.push(r),s}function Pt(t){return"string"==typeof t||"object"==typeof t&&null!==t&&Symbol.iterator in t}function Mt(t,e,i){let r=t.length-e.length;if(0===r)return t(...e);if(1===r)return function(t,e,i){let r=i=>t(i,...e);return void 0===i?r:Object.assign(r,{lazy:i,lazyArgs:e})}(t,e,i);throw new Error("Wrong number of arguments")}function kt(...t){return Mt(It,t)}var It=(t,e)=>t.length>=e;function Rt(t,e){let i=[];for(let r=t;r<e;r++)i.push(r);return i}function Ut(t,e){if(!kt(e,1))return{...t};if(!kt(e,2)){let{[e[0]]:i,...r}=t;return r}let i={...t};for(let t of e)delete i[t];return i}function Lt(...t){return Mt(jt,t)}var jt=(t,e)=>({...t,...e});function Vt(...t){return Mt(Bt,t,Ht)}var Bt=(t,e)=>t.map(e),Ht=t=>(e,i,r)=>({done:!1,hasNext:!0,next:t(e,i,r)});function Ft(t){return"number"==typeof t&&!Number.isNaN(t)}function qt(t){return"string"==typeof t}function zt(t){return void 0===t||("string"==typeof t||Array.isArray(t)?0===t.length:0===Object.keys(t).length)}function Yt(t){return null==t}function Zt(t){return Array.isArray(t)}function Wt(t){return"boolean"==typeof t}function Qt(t){return t instanceof Date}function Gt(...t){return Mt(Kt,t)}function Kt(t,e){if(t===e||Object.is(t,e))return!0;if("object"!=typeof t||"object"!=typeof e||null===t||null===e||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;if(Array.isArray(t))return function(t,e){if(t.length!==e.length)return!1;for(let[i,r]of t.entries())if(!Kt(r,e[i]))return!1;return!0}(t,e);if(t instanceof Map)return function(t,e){if(t.size!==e.size)return!1;for(let[i,r]of t.entries())if(!e.has(i)||!Kt(r,e.get(i)))return!1;return!0}(t,e);if(t instanceof Set)return function(t,e){if(t.size!==e.size)return!1;let i=[...e];for(let e of t){let t=!1;for(let[r,n]of i.entries())if(Kt(e,n)){t=!0,i.splice(r,1);break}if(!t)return!1}return!0}(t,e);if(t instanceof Date)return t.getTime()===e.getTime();if(t instanceof RegExp)return t.toString()===e.toString();if(Object.keys(t).length!==Object.keys(e).length)return!1;for(let[i,r]of Object.entries(t))if(!(i in e)||!Kt(r,e[i]))return!1;return!0}function Jt(...t){return function(t,e){let i=e.length-t.length;if(1===i){let[i,...r]=e;return Dt(i,{lazy:t,lazyArgs:r})}if(0===i){let i={lazy:t,lazyArgs:e};return Object.assign((t=>Dt(t,i)),i)}throw new Error("Wrong number of arguments")}(Xt,t)}function Xt(t){if(0===t.length)return Et;let e=new Map;for(let i of t)e.set(i,(e.get(i)??0)+1);return t=>{let i=e.get(t);return void 0===i||0===i?Tt:(1===i?e.delete(t):e.set(t,i-1),{hasNext:!0,next:t,done:0===e.size})}}function te(t,e){const i=function(t,e){return function(t){return"function"==typeof t}(t)?t(e):t}(t,e),{data:r}=e,n=[];for(let t=0;t<r.length;t+=1){const e=Zt(i)?i[t]:i;n.push(e)}return n}function ee(t,e){const i=te(t,e),{data:r}=e,n=[];for(let t=0;t<r.length;t+=1){const{digits:e}=r[t],s=i[t];n.push([]);for(let i=0;i<e.length;i+=1){const e=Zt(s)?s[i]:s;n[t].push(e)}}return n}function ie(t,e){const i=ee(t,e),{data:r}=e,n=[];for(let t=0;t<r.length;t+=1){const{digits:e}=r[t],s=i[t];n.push([]);for(let i=0;i<e.length;i+=1){const{data:r}=e[i],o=s[i];n[t].push([]);for(let e=0;e<r.length;e+=1){const r=Zt(o)?o[e]:o;n[t][i].push(r)}}}return n}function re(t,e){return Lt(t??{},e??{})}function ne(t=[],e=[]){const i=Array.from(new Set(Object.keys(t).concat(Object.keys(e))));for(const r of i){const i=Number.parseInt(r,10);t[i]=re(t[i],e[i])}return t}function se(t=[],e=[]){const i=Array.from(new Set(Object.keys(t).concat(Object.keys(e))));for(const r of i){const i=Number.parseInt(r,10);t[i]=ne(t[i],e[i])}return t}const oe=t=>{class i extends t{constructor(){super(...arguments),this.cellStyles={},this.cachedCellStyles=[],this.digitStyles={},this.cachedDigitStyles=[],this.partStyles={},this.cachedPartStyles=[],this.color="inherit"}extractCellStyles(){const t={preprocessData:this.partPreprocessDataList,data:this.parts,direction:this.direction,value:[this.value,this.oldValue]},e=function(t=[],e=[]){const i=Array.from(new Set(Object.keys(t).concat(Object.keys(e))));for(const r of i){const i=Number.parseInt(r,10);t[i]=se(t[i],e[i])}return t}(ie(this.cellStyles??{},t),ie(this.cellStylesDynamic??{},t));return Gt(this.cachedCellStyles,e)||(this.cachedCellStyles=e),this.cachedCellStyles}extractDigitStyles(){const t={preprocessData:this.partPreprocessDataList,data:this.parts,direction:this.direction,value:[this.value,this.oldValue]},e=se(ee(this.digitStyles??{},t),ee(this.digitStylesDynamic??{},t));return Gt(this.cachedDigitStyles,e)||(this.cachedDigitStyles=e),this.cachedDigitStyles}extractPartStyles(){const t={preprocessData:this.partPreprocessDataList,data:this.parts,direction:this.direction,value:[this.value,this.oldValue]},e=ne(te(this.partStyles??{},t),te(this.partStylesDynamic??{},t));return Gt(this.cachedPartStyles,e)||(this.cachedPartStyles=e),this.cachedPartStyles}}return e([dt({type:Object,attribute:"cell-styles",reflect:!0})],i.prototype,"cellStyles",void 0),e([dt({type:Object,attribute:"digit-styles",reflect:!0})],i.prototype,"digitStyles",void 0),e([dt({type:Object,attribute:"part-styles",reflect:!0})],i.prototype,"partStyles",void 0),e([dt({type:String,reflect:!0})],i.prototype,"color",void 0),i};function ae(t){return t.length}function le(){return function(t){if(!(n=t.length))return[];for(var e=-1,i=function(t,e){let i;if(void 0===e)for(const e of t)null!=e&&(i>e||void 0===i&&e>=e)&&(i=e);else{let r=-1;for(let n of t)null!=(n=e(n,++r,t))&&(i>n||void 0===i&&n>=n)&&(i=n)}return i}(t,ae),r=new Array(i);++e<i;)for(var n,s=-1,o=r[e]=new Array(n);++s<n;)o[s]=t[s][e];return r}(arguments)}function ue(t,e){const[i,r]=t,[n,s]=e,o={animate:!0,cancelPrevAnimation:!1};let a="";return 1===n.data.length&&(o.animate=!1,o.cancelPrevAnimation=!0,a="only one digit"),i!==r||(n.data[0]===n.data[n.data.length-1]&&(o.animate=!1,o.cancelPrevAnimation=!0,a="same head and tail"),Gt(n,s)&&(o.animate=!1,a="same digits"),a&&(o.earlyReturn=a)),o}function ce(t){try{return JSON.parse(t)}catch(e){return t}}function he(t){const e={};return Zt(t.digitToChar)?t.digitToChar.forEach(((t,i)=>{var r;e[(r=i,String.fromCodePoint(r+48))]=t})):function(t){return"object"==typeof t&&null!==t}(t.digitToChar)&&Object.entries(t.digitToChar).forEach((([t,i])=>{e[t]=i})),{...t,digitToChar:e}}const de=t=>{var r,n;class s extends t{constructor(){super(...arguments),n.set(this,{...r.DEFAULT_PARTS_OPTIONS}),this.parts=[],this.oldParts=[],this.partPreprocessDataList=[]}get partsOptions(){return i(this,n,"f")}set partsOptions(t){const e=i(this,n,"f");!function(t,e,i,r,n){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===r?n.call(t,i):n?n.value=i:e.set(t,i)}(this,n,he({...r.DEFAULT_PARTS_OPTIONS,...t}),"f"),this.requestUpdate("partsOptions",e)}sampling(t,e){return function(t,e,i,r){let n=r;const s=t.isInteger(e)&&t.isInteger(i)?function(t,e,i){return function(r){return t.round(t.add(t.mul(e,t.sub(t.create(1),r)),t.mul(i,r)))}}(t,e,i):function(t,e,i){return function(r){return t.add(t.mul(e,t.sub(t.create(1),r)),t.mul(i,r))}}(t,e,i);t.eq(e,i)&&(n=1);const o=[];for(let e=0;e<n;e++){const i=t.div(t.create(e),t.create(Math.max(n-1,1)));o.push(s(i))}return o}(this.numberAdapter,this.numberAdapter.max(t,e),this.numberAdapter.min(t,e),this.partsOptions.sampleCount)}sampleSplit(t){return[t.slice()]}sampleToString(t){return this.numberAdapter.toString(t)}willUpdate(t){super.willUpdate(t),t.has("value")&&(this.oldParts=this.parts),(t.has("value")||t.has("partsOptions"))&&(this.parts=this.processPartData()),t.has("value")&&(this.partPreprocessDataList=function(t,e,i,r){const n=[];let s=0;for(let o=0;o<e.length;o++){const a=e[o],l=r?.[o],u=[];for(let e=0;e<a.digits.length;e++){const r=a.digits[e],n=l?.digits.find((t=>t.place===r.place));u.push({...ue([t,i],[r,n]),index:s++,partIndex:o,digitIndex:e})}n.push(u)}return n}(this.direction,this.parts,this.oldDirection,this.oldParts))}processPartData(){const{decimalSeparator:t,digitToChar:e,minPlaces:i,fillChar:r,type:n}=this.partsOptions,s=this.value,o=this.oldValue;let a=e=>this.sampleToString(e).split(t);"string"===n&&(a=t=>[this.sampleToString(t),""]);const l=[],u=this.sampleSplit(this.sampling(s,o));{const n=this.numberAdapter.gt(s,o)?"down":"up";for(let s=0;s<u.length;s++){const o=u[s],c=o["down"===n?0:o.length-1],[h=1,d=0]=i,p=a(c),f=Math.max(this.stringAdapter.stringToChars(p[0]).length,h),m=Math.max(this.stringAdapter.stringToChars(p[1]??"").length,d),g=le(...o.map((e=>{const[i="",n=""]=a(e),s=this.stringAdapter.stringToChars(i),o=this.stringAdapter.stringToChars(n),l=Math.max(f-s.length,0),u=Math.max(m-o.length,0);let c=[].concat(new Array(l).fill(r),s);return m>0&&(c=c.concat([t],o,new Array(u).fill(r))),c}))).map(((t,i,r)=>({data:t.filter(((t,e,i)=>0===e||t!==i[e-1])).map((t=>e[t]??t)),place:r.length-i})));l.push({digits:g})}}return l}}return r=s,n=new WeakMap,s.DEFAULT_PARTS_OPTIONS={sampleCount:16,decimalSeparator:".",fillChar:"0",minPlaces:[1,0],digitToChar:{},type:"number"},e([dt({type:Object,attribute:"parts-options",converter:t=>ce(t??"")??{},noAccessor:!0})],s.prototype,"partsOptions",null),s},pe=()=>({create(t){const e=Number(t);return Number.isFinite(e)?e:0},add:(t,e)=>t+e,sub:(t,e)=>t-e,mul:(t,e)=>t*e,div:(t,e)=>t/e,compare:(t,e)=>t>e?1:t<e?-1:0,eq:(t,e)=>t===e,gt:(t,e)=>t>e,gte:(t,e)=>t>=e,lt:(t,e)=>t<e,lte:(t,e)=>t<=e,isInteger:t=>Number.isInteger(t),isNegative:t=>t<0,isPositive:t=>t>0,isZero:t=>0===t,isNaN:t=>Number.isNaN(t),isFinite:t=>Number.isFinite(t),abs:t=>Math.abs(t),ceil:t=>Math.ceil(t),floor:t=>Math.floor(t),round:t=>Math.round(t),max:(t,e)=>Math.max(t,e),min:(t,e)=>Math.min(t,e),toNumber:t=>Number(t),toString:t=>String(t)})
67
67
  /*!
68
68
  * decimal.js v10.4.3
69
69
  * An arbitrary-precision Decimal type for JavaScript.
70
70
  * https://github.com/MikeMcl/decimal.js
71
71
  * Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
72
72
  * MIT Licence
73
- */;var fe,me,ge=9e15,ye=1e9,_e="0123456789abcdef",ve="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",be="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",we={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-9e15,maxE:ge,crypto:!1},Ae=!0,$e="[DecimalError] ",Se=$e+"Invalid argument: ",xe=$e+"Precision limit exceeded",Ne=$e+"crypto unavailable",Oe="[object Decimal]",Ee=Math.floor,Te=Math.pow,De=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Ce=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Pe=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Me=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ke=1e7,Ie=ve.length-1,Re=be.length-1,Ue={toStringTag:Oe};function Le(t){var e,i,r,n=t.length-1,s="",o=t[0];if(n>0){for(s+=o,e=1;e<n;e++)(i=7-(r=t[e]+"").length)&&(s+=Qe(i)),s+=r;(i=7-(r=(o=t[e])+"").length)&&(s+=Qe(i))}else if(0===o)return"0";for(;o%10==0;)o/=10;return s+o}function je(t,e,i){if(t!==~~t||t<e||t>i)throw Error(Se+t)}function Ve(t,e,i,r){var n,s,o,a;for(s=t[0];s>=10;s/=10)--e;return--e<0?(e+=7,n=0):(n=Math.ceil((e+1)/7),e%=7),s=Te(10,7-e),a=t[n]%s|0,null==r?e<3?(0==e?a=a/100|0:1==e&&(a=a/10|0),o=i<4&&99999==a||i>3&&49999==a||5e4==a||0==a):o=(i<4&&a+1==s||i>3&&a+1==s/2)&&(t[n+1]/s/100|0)==Te(10,e-2)-1||(a==s/2||0==a)&&!(t[n+1]/s/100|0):e<4?(0==e?a=a/1e3|0:1==e?a=a/100|0:2==e&&(a=a/10|0),o=(r||i<4)&&9999==a||!r&&i>3&&4999==a):o=((r||i<4)&&a+1==s||!r&&i>3&&a+1==s/2)&&(t[n+1]/s/1e3|0)==Te(10,e-3)-1,o}function Be(t,e,i){for(var r,n,s=[0],o=0,a=t.length;o<a;){for(n=s.length;n--;)s[n]*=e;for(s[0]+=_e.indexOf(t.charAt(o++)),r=0;r<s.length;r++)s[r]>i-1&&(void 0===s[r+1]&&(s[r+1]=0),s[r+1]+=s[r]/i|0,s[r]%=i)}return s.reverse()}Ue.absoluteValue=Ue.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),Fe(t)},Ue.ceil=function(){return Fe(new this.constructor(this),this.e+1,2)},Ue.clampedTo=Ue.clamp=function(t,e){var i=this,r=i.constructor;if(t=new r(t),e=new r(e),!t.s||!e.s)return new r(NaN);if(t.gt(e))throw Error(Se+e);return i.cmp(t)<0?t:i.cmp(e)>0?e:new r(i)},Ue.comparedTo=Ue.cmp=function(t){var e,i,r,n,s=this,o=s.d,a=(t=new s.constructor(t)).d,l=s.s,u=t.s;if(!o||!a)return l&&u?l!==u?l:o===a?0:!o^l<0?1:-1:NaN;if(!o[0]||!a[0])return o[0]?l:a[0]?-u:0;if(l!==u)return l;if(s.e!==t.e)return s.e>t.e^l<0?1:-1;for(e=0,i=(r=o.length)<(n=a.length)?r:n;e<i;++e)if(o[e]!==a[e])return o[e]>a[e]^l<0?1:-1;return r===n?0:r>n^l<0?1:-1},Ue.cosine=Ue.cos=function(){var t,e,i=this,r=i.constructor;return i.d?i.d[0]?(t=r.precision,e=r.rounding,r.precision=t+Math.max(i.e,i.sd())+7,r.rounding=1,i=function(t,e){var i,r,n;if(e.isZero())return e;r=e.d.length,r<32?n=(1/si(4,i=Math.ceil(r/3))).toString():(i=16,n="2.3283064365386962890625e-10");t.precision+=i,e=ni(t,1,e.times(n),new t(1));for(var s=i;s--;){var o=e.times(e);e=o.times(o).minus(o).times(8).plus(1)}return t.precision-=i,e}(r,oi(r,i)),r.precision=t,r.rounding=e,Fe(2==me||3==me?i.neg():i,t,e,!0)):new r(1):new r(NaN)},Ue.cubeRoot=Ue.cbrt=function(){var t,e,i,r,n,s,o,a,l,u,c=this,h=c.constructor;if(!c.isFinite()||c.isZero())return new h(c);for(Ae=!1,(s=c.s*Te(c.s*c,1/3))&&Math.abs(s)!=1/0?r=new h(s.toString()):(i=Le(c.d),(s=((t=c.e)-i.length+1)%3)&&(i+=1==s||-2==s?"0":"00"),s=Te(i,1/3),t=Ee((t+1)/3)-(t%3==(t<0?-1:2)),(r=new h(i=s==1/0?"5e"+t:(i=s.toExponential()).slice(0,i.indexOf("e")+1)+t)).s=c.s),o=(t=h.precision)+3;;)if(u=(l=(a=r).times(a).times(a)).plus(c),r=He(u.plus(c).times(a),u.plus(l),o+2,1),Le(a.d).slice(0,o)===(i=Le(r.d)).slice(0,o)){if("9999"!=(i=i.slice(o-3,o+1))&&(n||"4999"!=i)){+i&&(+i.slice(1)||"5"!=i.charAt(0))||(Fe(r,t+1,1),e=!r.times(r).times(r).eq(c));break}if(!n&&(Fe(a,t+1,0),a.times(a).times(a).eq(c))){r=a;break}o+=4,n=1}return Ae=!0,Fe(r,t,h.rounding,e)},Ue.decimalPlaces=Ue.dp=function(){var t,e=this.d,i=NaN;if(e){if(i=7*((t=e.length-1)-Ee(this.e/7)),t=e[t])for(;t%10==0;t/=10)i--;i<0&&(i=0)}return i},Ue.dividedBy=Ue.div=function(t){return He(this,new this.constructor(t))},Ue.dividedToIntegerBy=Ue.divToInt=function(t){var e=this.constructor;return Fe(He(this,new e(t),0,1,1),e.precision,e.rounding)},Ue.equals=Ue.eq=function(t){return 0===this.cmp(t)},Ue.floor=function(){return Fe(new this.constructor(this),this.e+1,3)},Ue.greaterThan=Ue.gt=function(t){return this.cmp(t)>0},Ue.greaterThanOrEqualTo=Ue.gte=function(t){var e=this.cmp(t);return 1==e||0===e},Ue.hyperbolicCosine=Ue.cosh=function(){var t,e,i,r,n,s=this,o=s.constructor,a=new o(1);if(!s.isFinite())return new o(s.s?1/0:NaN);if(s.isZero())return a;i=o.precision,r=o.rounding,o.precision=i+Math.max(s.e,s.sd())+4,o.rounding=1,(n=s.d.length)<32?e=(1/si(4,t=Math.ceil(n/3))).toString():(t=16,e="2.3283064365386962890625e-10"),s=ni(o,1,s.times(e),new o(1),!0);for(var l,u=t,c=new o(8);u--;)l=s.times(s),s=a.minus(l.times(c.minus(l.times(c))));return Fe(s,o.precision=i,o.rounding=r,!0)},Ue.hyperbolicSine=Ue.sinh=function(){var t,e,i,r,n=this,s=n.constructor;if(!n.isFinite()||n.isZero())return new s(n);if(e=s.precision,i=s.rounding,s.precision=e+Math.max(n.e,n.sd())+4,s.rounding=1,(r=n.d.length)<3)n=ni(s,2,n,n,!0);else{t=(t=1.4*Math.sqrt(r))>16?16:0|t,n=ni(s,2,n=n.times(1/si(5,t)),n,!0);for(var o,a=new s(5),l=new s(16),u=new s(20);t--;)o=n.times(n),n=n.times(a.plus(o.times(l.times(o).plus(u))))}return s.precision=e,s.rounding=i,Fe(n,e,i,!0)},Ue.hyperbolicTangent=Ue.tanh=function(){var t,e,i=this,r=i.constructor;return i.isFinite()?i.isZero()?new r(i):(t=r.precision,e=r.rounding,r.precision=t+7,r.rounding=1,He(i.sinh(),i.cosh(),r.precision=t,r.rounding=e)):new r(i.s)},Ue.inverseCosine=Ue.acos=function(){var t,e=this,i=e.constructor,r=e.abs().cmp(1),n=i.precision,s=i.rounding;return-1!==r?0===r?e.isNeg()?Ze(i,n,s):new i(0):new i(NaN):e.isZero()?Ze(i,n+4,s).times(.5):(i.precision=n+6,i.rounding=1,e=e.asin(),t=Ze(i,n+4,s).times(.5),i.precision=n,i.rounding=s,t.minus(e))},Ue.inverseHyperbolicCosine=Ue.acosh=function(){var t,e,i=this,r=i.constructor;return i.lte(1)?new r(i.eq(1)?0:NaN):i.isFinite()?(t=r.precision,e=r.rounding,r.precision=t+Math.max(Math.abs(i.e),i.sd())+4,r.rounding=1,Ae=!1,i=i.times(i).minus(1).sqrt().plus(i),Ae=!0,r.precision=t,r.rounding=e,i.ln()):new r(i)},Ue.inverseHyperbolicSine=Ue.asinh=function(){var t,e,i=this,r=i.constructor;return!i.isFinite()||i.isZero()?new r(i):(t=r.precision,e=r.rounding,r.precision=t+2*Math.max(Math.abs(i.e),i.sd())+6,r.rounding=1,Ae=!1,i=i.times(i).plus(1).sqrt().plus(i),Ae=!0,r.precision=t,r.rounding=e,i.ln())},Ue.inverseHyperbolicTangent=Ue.atanh=function(){var t,e,i,r,n=this,s=n.constructor;return n.isFinite()?n.e>=0?new s(n.abs().eq(1)?n.s/0:n.isZero()?n:NaN):(t=s.precision,e=s.rounding,r=n.sd(),Math.max(r,t)<2*-n.e-1?Fe(new s(n),t,e,!0):(s.precision=i=r-n.e,n=He(n.plus(1),new s(1).minus(n),i+t,1),s.precision=t+4,s.rounding=1,n=n.ln(),s.precision=t,s.rounding=e,n.times(.5))):new s(NaN)},Ue.inverseSine=Ue.asin=function(){var t,e,i,r,n=this,s=n.constructor;return n.isZero()?new s(n):(e=n.abs().cmp(1),i=s.precision,r=s.rounding,-1!==e?0===e?((t=Ze(s,i+4,r).times(.5)).s=n.s,t):new s(NaN):(s.precision=i+6,s.rounding=1,n=n.div(new s(1).minus(n.times(n)).sqrt().plus(1)).atan(),s.precision=i,s.rounding=r,n.times(2)))},Ue.inverseTangent=Ue.atan=function(){var t,e,i,r,n,s,o,a,l,u=this,c=u.constructor,h=c.precision,d=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&h+4<=Re)return(o=Ze(c,h+4,d).times(.25)).s=u.s,o}else{if(!u.s)return new c(NaN);if(h+4<=Re)return(o=Ze(c,h+4,d).times(.5)).s=u.s,o}for(c.precision=a=h+10,c.rounding=1,t=i=Math.min(28,a/7+2|0);t;--t)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(Ae=!1,e=Math.ceil(a/7),r=1,l=u.times(u),o=new c(u),n=u;-1!==t;)if(n=n.times(l),s=o.minus(n.div(r+=2)),n=n.times(l),void 0!==(o=s.plus(n.div(r+=2))).d[e])for(t=e;o.d[t]===s.d[t]&&t--;);return i&&(o=o.times(2<<i-1)),Ae=!0,Fe(o,c.precision=h,c.rounding=d,!0)},Ue.isFinite=function(){return!!this.d},Ue.isInteger=Ue.isInt=function(){return!!this.d&&Ee(this.e/7)>this.d.length-2},Ue.isNaN=function(){return!this.s},Ue.isNegative=Ue.isNeg=function(){return this.s<0},Ue.isPositive=Ue.isPos=function(){return this.s>0},Ue.isZero=function(){return!!this.d&&0===this.d[0]},Ue.lessThan=Ue.lt=function(t){return this.cmp(t)<0},Ue.lessThanOrEqualTo=Ue.lte=function(t){return this.cmp(t)<1},Ue.logarithm=Ue.log=function(t){var e,i,r,n,s,o,a,l,u=this,c=u.constructor,h=c.precision,d=c.rounding;if(null==t)t=new c(10),e=!0;else{if(i=(t=new c(t)).d,t.s<0||!i||!i[0]||t.eq(1))return new c(NaN);e=t.eq(10)}if(i=u.d,u.s<0||!i||!i[0]||u.eq(1))return new c(i&&!i[0]?-1/0:1!=u.s?NaN:i?0:1/0);if(e)if(i.length>1)s=!0;else{for(n=i[0];n%10==0;)n/=10;s=1!==n}if(Ae=!1,o=ti(u,a=h+5),r=e?Ye(c,a+10):ti(t,a),Ve((l=He(o,r,a,1)).d,n=h,d))do{if(o=ti(u,a+=10),r=e?Ye(c,a+10):ti(t,a),l=He(o,r,a,1),!s){+Le(l.d).slice(n+1,n+15)+1==1e14&&(l=Fe(l,h+1,0));break}}while(Ve(l.d,n+=10,d));return Ae=!0,Fe(l,h,d)},Ue.minus=Ue.sub=function(t){var e,i,r,n,s,o,a,l,u,c,h,d,p=this,f=p.constructor;if(t=new f(t),!p.d||!t.d)return p.s&&t.s?p.d?t.s=-t.s:t=new f(t.d||p.s!==t.s?p:NaN):t=new f(NaN),t;if(p.s!=t.s)return t.s=-t.s,p.plus(t);if(u=p.d,d=t.d,a=f.precision,l=f.rounding,!u[0]||!d[0]){if(d[0])t.s=-t.s;else{if(!u[0])return new f(3===l?-0:0);t=new f(p)}return Ae?Fe(t,a,l):t}if(i=Ee(t.e/7),c=Ee(p.e/7),u=u.slice(),s=c-i){for((h=s<0)?(e=u,s=-s,o=d.length):(e=d,i=c,o=u.length),s>(r=Math.max(Math.ceil(a/7),o)+2)&&(s=r,e.length=1),e.reverse(),r=s;r--;)e.push(0);e.reverse()}else{for((h=(r=u.length)<(o=d.length))&&(o=r),r=0;r<o;r++)if(u[r]!=d[r]){h=u[r]<d[r];break}s=0}for(h&&(e=u,u=d,d=e,t.s=-t.s),o=u.length,r=d.length-o;r>0;--r)u[o++]=0;for(r=d.length;r>s;){if(u[--r]<d[r]){for(n=r;n&&0===u[--n];)u[n]=ke-1;--u[n],u[r]+=ke}u[r]-=d[r]}for(;0===u[--o];)u.pop();for(;0===u[0];u.shift())--i;return u[0]?(t.d=u,t.e=ze(u,i),Ae?Fe(t,a,l):t):new f(3===l?-0:0)},Ue.modulo=Ue.mod=function(t){var e,i=this,r=i.constructor;return t=new r(t),!i.d||!t.s||t.d&&!t.d[0]?new r(NaN):!t.d||i.d&&!i.d[0]?Fe(new r(i),r.precision,r.rounding):(Ae=!1,9==r.modulo?(e=He(i,t.abs(),0,3,1)).s*=t.s:e=He(i,t,0,r.modulo,1),e=e.times(t),Ae=!0,i.minus(e))},Ue.naturalExponential=Ue.exp=function(){return Xe(this)},Ue.naturalLogarithm=Ue.ln=function(){return ti(this)},Ue.negated=Ue.neg=function(){var t=new this.constructor(this);return t.s=-t.s,Fe(t)},Ue.plus=Ue.add=function(t){var e,i,r,n,s,o,a,l,u,c,h=this,d=h.constructor;if(t=new d(t),!h.d||!t.d)return h.s&&t.s?h.d||(t=new d(t.d||h.s===t.s?h:NaN)):t=new d(NaN),t;if(h.s!=t.s)return t.s=-t.s,h.minus(t);if(u=h.d,c=t.d,a=d.precision,l=d.rounding,!u[0]||!c[0])return c[0]||(t=new d(h)),Ae?Fe(t,a,l):t;if(s=Ee(h.e/7),r=Ee(t.e/7),u=u.slice(),n=s-r){for(n<0?(i=u,n=-n,o=c.length):(i=c,r=s,o=u.length),n>(o=(s=Math.ceil(a/7))>o?s+1:o+1)&&(n=o,i.length=1),i.reverse();n--;)i.push(0);i.reverse()}for((o=u.length)-(n=c.length)<0&&(n=o,i=c,c=u,u=i),e=0;n;)e=(u[--n]=u[n]+c[n]+e)/ke|0,u[n]%=ke;for(e&&(u.unshift(e),++r),o=u.length;0==u[--o];)u.pop();return t.d=u,t.e=ze(u,r),Ae?Fe(t,a,l):t},Ue.precision=Ue.sd=function(t){var e,i=this;if(void 0!==t&&t!==!!t&&1!==t&&0!==t)throw Error(Se+t);return i.d?(e=We(i.d),t&&i.e+1>e&&(e=i.e+1)):e=NaN,e},Ue.round=function(){var t=this,e=t.constructor;return Fe(new e(t),t.e+1,e.rounding)},Ue.sine=Ue.sin=function(){var t,e,i=this,r=i.constructor;return i.isFinite()?i.isZero()?new r(i):(t=r.precision,e=r.rounding,r.precision=t+Math.max(i.e,i.sd())+7,r.rounding=1,i=function(t,e){var i,r=e.d.length;if(r<3)return e.isZero()?e:ni(t,2,e,e);i=1.4*Math.sqrt(r),i=i>16?16:0|i,e=e.times(1/si(5,i)),e=ni(t,2,e,e);for(var n,s=new t(5),o=new t(16),a=new t(20);i--;)n=e.times(e),e=e.times(s.plus(n.times(o.times(n).minus(a))));return e}(r,oi(r,i)),r.precision=t,r.rounding=e,Fe(me>2?i.neg():i,t,e,!0)):new r(NaN)},Ue.squareRoot=Ue.sqrt=function(){var t,e,i,r,n,s,o=this,a=o.d,l=o.e,u=o.s,c=o.constructor;if(1!==u||!a||!a[0])return new c(!u||u<0&&(!a||a[0])?NaN:a?o:1/0);for(Ae=!1,0==(u=Math.sqrt(+o))||u==1/0?(((e=Le(a)).length+l)%2==0&&(e+="0"),u=Math.sqrt(e),l=Ee((l+1)/2)-(l<0||l%2),r=new c(e=u==1/0?"5e"+l:(e=u.toExponential()).slice(0,e.indexOf("e")+1)+l)):r=new c(u.toString()),i=(l=c.precision)+3;;)if(r=(s=r).plus(He(o,s,i+2,1)).times(.5),Le(s.d).slice(0,i)===(e=Le(r.d)).slice(0,i)){if("9999"!=(e=e.slice(i-3,i+1))&&(n||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(Fe(r,l+1,1),t=!r.times(r).eq(o));break}if(!n&&(Fe(s,l+1,0),s.times(s).eq(o))){r=s;break}i+=4,n=1}return Ae=!0,Fe(r,l,c.rounding,t)},Ue.tangent=Ue.tan=function(){var t,e,i=this,r=i.constructor;return i.isFinite()?i.isZero()?new r(i):(t=r.precision,e=r.rounding,r.precision=t+10,r.rounding=1,(i=i.sin()).s=1,i=He(i,new r(1).minus(i.times(i)).sqrt(),t+10,0),r.precision=t,r.rounding=e,Fe(2==me||4==me?i.neg():i,t,e,!0)):new r(NaN)},Ue.times=Ue.mul=function(t){var e,i,r,n,s,o,a,l,u,c=this,h=c.constructor,d=c.d,p=(t=new h(t)).d;if(t.s*=c.s,!(d&&d[0]&&p&&p[0]))return new h(!t.s||d&&!d[0]&&!p||p&&!p[0]&&!d?NaN:d&&p?0*t.s:t.s/0);for(i=Ee(c.e/7)+Ee(t.e/7),(l=d.length)<(u=p.length)&&(s=d,d=p,p=s,o=l,l=u,u=o),s=[],r=o=l+u;r--;)s.push(0);for(r=u;--r>=0;){for(e=0,n=l+r;n>r;)a=s[n]+p[r]*d[n-r-1]+e,s[n--]=a%ke|0,e=a/ke|0;s[n]=(s[n]+e)%ke|0}for(;!s[--o];)s.pop();return e?++i:s.shift(),t.d=s,t.e=ze(s,i),Ae?Fe(t,h.precision,h.rounding):t},Ue.toBinary=function(t,e){return ai(this,2,t,e)},Ue.toDecimalPlaces=Ue.toDP=function(t,e){var i=this,r=i.constructor;return i=new r(i),void 0===t?i:(je(t,0,ye),void 0===e?e=r.rounding:je(e,0,8),Fe(i,t+i.e+1,e))},Ue.toExponential=function(t,e){var i,r=this,n=r.constructor;return void 0===t?i=qe(r,!0):(je(t,0,ye),void 0===e?e=n.rounding:je(e,0,8),i=qe(r=Fe(new n(r),t+1,e),!0,t+1)),r.isNeg()&&!r.isZero()?"-"+i:i},Ue.toFixed=function(t,e){var i,r,n=this,s=n.constructor;return void 0===t?i=qe(n):(je(t,0,ye),void 0===e?e=s.rounding:je(e,0,8),i=qe(r=Fe(new s(n),t+n.e+1,e),!1,t+r.e+1)),n.isNeg()&&!n.isZero()?"-"+i:i},Ue.toFraction=function(t){var e,i,r,n,s,o,a,l,u,c,h,d,p=this,f=p.d,m=p.constructor;if(!f)return new m(p);if(u=i=new m(1),r=l=new m(0),o=(s=(e=new m(r)).e=We(f)-p.e-1)%7,e.d[0]=Te(10,o<0?7+o:o),null==t)t=s>0?e:u;else{if(!(a=new m(t)).isInt()||a.lt(u))throw Error(Se+a);t=a.gt(e)?s>0?e:u:a}for(Ae=!1,a=new m(Le(f)),c=m.precision,m.precision=s=7*f.length*2;h=He(a,e,0,1,1),1!=(n=i.plus(h.times(r))).cmp(t);)i=r,r=n,n=u,u=l.plus(h.times(n)),l=n,n=e,e=a.minus(h.times(n)),a=n;return n=He(t.minus(i),r,0,1,1),l=l.plus(n.times(u)),i=i.plus(n.times(r)),l.s=u.s=p.s,d=He(u,r,s,1).minus(p).abs().cmp(He(l,i,s,1).minus(p).abs())<1?[u,r]:[l,i],m.precision=c,Ae=!0,d},Ue.toHexadecimal=Ue.toHex=function(t,e){return ai(this,16,t,e)},Ue.toNearest=function(t,e){var i=this,r=i.constructor;if(i=new r(i),null==t){if(!i.d)return i;t=new r(1),e=r.rounding}else{if(t=new r(t),void 0===e?e=r.rounding:je(e,0,8),!i.d)return t.s?i:t;if(!t.d)return t.s&&(t.s=i.s),t}return t.d[0]?(Ae=!1,i=He(i,t,0,e,1).times(t),Ae=!0,Fe(i)):(t.s=i.s,i=t),i},Ue.toNumber=function(){return+this},Ue.toOctal=function(t,e){return ai(this,8,t,e)},Ue.toPower=Ue.pow=function(t){var e,i,r,n,s,o,a=this,l=a.constructor,u=+(t=new l(t));if(!(a.d&&t.d&&a.d[0]&&t.d[0]))return new l(Te(+a,u));if((a=new l(a)).eq(1))return a;if(r=l.precision,s=l.rounding,t.eq(1))return Fe(a,r,s);if((e=Ee(t.e/7))>=t.d.length-1&&(i=u<0?-u:u)<=9007199254740991)return n=Ge(l,a,i,r),t.s<0?new l(1).div(n):Fe(n,r,s);if((o=a.s)<0){if(e<t.d.length-1)return new l(NaN);if(1&t.d[e]||(o=1),0==a.e&&1==a.d[0]&&1==a.d.length)return a.s=o,a}return(e=0!=(i=Te(+a,u))&&isFinite(i)?new l(i+"").e:Ee(u*(Math.log("0."+Le(a.d))/Math.LN10+a.e+1)))>l.maxE+1||e<l.minE-1?new l(e>0?o/0:0):(Ae=!1,l.rounding=a.s=1,i=Math.min(12,(e+"").length),(n=Xe(t.times(ti(a,r+i)),r)).d&&Ve((n=Fe(n,r+5,1)).d,r,s)&&(e=r+10,+Le((n=Fe(Xe(t.times(ti(a,e+i)),e),e+5,1)).d).slice(r+1,r+15)+1==1e14&&(n=Fe(n,r+1,0))),n.s=o,Ae=!0,l.rounding=s,Fe(n,r,s))},Ue.toPrecision=function(t,e){var i,r=this,n=r.constructor;return void 0===t?i=qe(r,r.e<=n.toExpNeg||r.e>=n.toExpPos):(je(t,1,ye),void 0===e?e=n.rounding:je(e,0,8),i=qe(r=Fe(new n(r),t,e),t<=r.e||r.e<=n.toExpNeg,t)),r.isNeg()&&!r.isZero()?"-"+i:i},Ue.toSignificantDigits=Ue.toSD=function(t,e){var i=this.constructor;return void 0===t?(t=i.precision,e=i.rounding):(je(t,1,ye),void 0===e?e=i.rounding:je(e,0,8)),Fe(new i(this),t,e)},Ue.toString=function(){var t=this,e=t.constructor,i=qe(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+i:i},Ue.truncated=Ue.trunc=function(){return Fe(new this.constructor(this),this.e+1,1)},Ue.valueOf=Ue.toJSON=function(){var t=this,e=t.constructor,i=qe(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+i:i};var He=function(){function t(t,e,i){var r,n=0,s=t.length;for(t=t.slice();s--;)r=t[s]*e+n,t[s]=r%i|0,n=r/i|0;return n&&t.unshift(n),t}function e(t,e,i,r){var n,s;if(i!=r)s=i>r?1:-1;else for(n=s=0;n<i;n++)if(t[n]!=e[n]){s=t[n]>e[n]?1:-1;break}return s}function i(t,e,i,r){for(var n=0;i--;)t[i]-=n,n=t[i]<e[i]?1:0,t[i]=n*r+t[i]-e[i];for(;!t[0]&&t.length>1;)t.shift()}return function(r,n,s,o,a,l){var u,c,h,d,p,f,m,g,y,_,v,b,w,A,$,S,x,N,O,E,T=r.constructor,D=r.s==n.s?1:-1,C=r.d,P=n.d;if(!(C&&C[0]&&P&&P[0]))return new T(r.s&&n.s&&(C?!P||C[0]!=P[0]:P)?C&&0==C[0]||!P?0*D:D/0:NaN);for(l?(p=1,c=r.e-n.e):(l=ke,p=7,c=Ee(r.e/p)-Ee(n.e/p)),O=P.length,x=C.length,_=(y=new T(D)).d=[],h=0;P[h]==(C[h]||0);h++);if(P[h]>(C[h]||0)&&c--,null==s?(A=s=T.precision,o=T.rounding):A=a?s+(r.e-n.e)+1:s,A<0)_.push(1),f=!0;else{if(A=A/p+2|0,h=0,1==O){for(d=0,P=P[0],A++;(h<x||d)&&A--;h++)$=d*l+(C[h]||0),_[h]=$/P|0,d=$%P|0;f=d||h<x}else{for((d=l/(P[0]+1)|0)>1&&(P=t(P,d,l),C=t(C,d,l),O=P.length,x=C.length),S=O,b=(v=C.slice(0,O)).length;b<O;)v[b++]=0;(E=P.slice()).unshift(0),N=P[0],P[1]>=l/2&&++N;do{d=0,(u=e(P,v,O,b))<0?(w=v[0],O!=b&&(w=w*l+(v[1]||0)),(d=w/N|0)>1?(d>=l&&(d=l-1),1==(u=e(m=t(P,d,l),v,g=m.length,b=v.length))&&(d--,i(m,O<g?E:P,g,l))):(0==d&&(u=d=1),m=P.slice()),(g=m.length)<b&&m.unshift(0),i(v,m,b,l),-1==u&&(u=e(P,v,O,b=v.length))<1&&(d++,i(v,O<b?E:P,b,l)),b=v.length):0===u&&(d++,v=[0]),_[h++]=d,u&&v[0]?v[b++]=C[S]||0:(v=[C[S]],b=1)}while((S++<x||void 0!==v[0])&&A--);f=void 0!==v[0]}_[0]||_.shift()}if(1==p)y.e=c,fe=f;else{for(h=1,d=_[0];d>=10;d/=10)h++;y.e=h+c*p-1,Fe(y,a?s+y.e+1:s,o,f)}return y}}();function Fe(t,e,i,r){var n,s,o,a,l,u,c,h,d,p=t.constructor;t:if(null!=e){if(!(h=t.d))return t;for(n=1,a=h[0];a>=10;a/=10)n++;if((s=e-n)<0)s+=7,o=e,l=(c=h[d=0])/Te(10,n-o-1)%10|0;else if((d=Math.ceil((s+1)/7))>=(a=h.length)){if(!r)break t;for(;a++<=d;)h.push(0);c=l=0,n=1,o=(s%=7)-7+1}else{for(c=a=h[d],n=1;a>=10;a/=10)n++;l=(o=(s%=7)-7+n)<0?0:c/Te(10,n-o-1)%10|0}if(r=r||e<0||void 0!==h[d+1]||(o<0?c:c%Te(10,n-o-1)),u=i<4?(l||r)&&(0==i||i==(t.s<0?3:2)):l>5||5==l&&(4==i||r||6==i&&(s>0?o>0?c/Te(10,n-o):0:h[d-1])%10&1||i==(t.s<0?8:7)),e<1||!h[0])return h.length=0,u?(e-=t.e+1,h[0]=Te(10,(7-e%7)%7),t.e=-e||0):h[0]=t.e=0,t;if(0==s?(h.length=d,a=1,d--):(h.length=d+1,a=Te(10,7-s),h[d]=o>0?(c/Te(10,n-o)%Te(10,o)|0)*a:0),u)for(;;){if(0==d){for(s=1,o=h[0];o>=10;o/=10)s++;for(o=h[0]+=a,a=1;o>=10;o/=10)a++;s!=a&&(t.e++,h[0]==ke&&(h[0]=1));break}if(h[d]+=a,h[d]!=ke)break;h[d--]=0,a=1}for(s=h.length;0===h[--s];)h.pop()}return Ae&&(t.e>p.maxE?(t.d=null,t.e=NaN):t.e<p.minE&&(t.e=0,t.d=[0])),t}function qe(t,e,i){if(!t.isFinite())return ei(t);var r,n=t.e,s=Le(t.d),o=s.length;return e?(i&&(r=i-o)>0?s=s.charAt(0)+"."+s.slice(1)+Qe(r):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(t.e<0?"e":"e+")+t.e):n<0?(s="0."+Qe(-n-1)+s,i&&(r=i-o)>0&&(s+=Qe(r))):n>=o?(s+=Qe(n+1-o),i&&(r=i-n-1)>0&&(s=s+"."+Qe(r))):((r=n+1)<o&&(s=s.slice(0,r)+"."+s.slice(r)),i&&(r=i-o)>0&&(n+1===o&&(s+="."),s+=Qe(r))),s}function ze(t,e){var i=t[0];for(e*=7;i>=10;i/=10)e++;return e}function Ye(t,e,i){if(e>Ie)throw Ae=!0,i&&(t.precision=i),Error(xe);return Fe(new t(ve),e,1,!0)}function Ze(t,e,i){if(e>Re)throw Error(xe);return Fe(new t(be),e,i,!0)}function We(t){var e=t.length-1,i=7*e+1;if(e=t[e]){for(;e%10==0;e/=10)i--;for(e=t[0];e>=10;e/=10)i++}return i}function Qe(t){for(var e="";t--;)e+="0";return e}function Ge(t,e,i,r){var n,s=new t(1),o=Math.ceil(r/7+4);for(Ae=!1;;){if(i%2&&li((s=s.times(e)).d,o)&&(n=!0),0===(i=Ee(i/2))){i=s.d.length-1,n&&0===s.d[i]&&++s.d[i];break}li((e=e.times(e)).d,o)}return Ae=!0,s}function Ke(t){return 1&t.d[t.d.length-1]}function Je(t,e,i){for(var r,n=new t(e[0]),s=0;++s<e.length;){if(!(r=new t(e[s])).s){n=r;break}n[i](r)&&(n=r)}return n}function Xe(t,e){var i,r,n,s,o,a,l,u=0,c=0,h=0,d=t.constructor,p=d.rounding,f=d.precision;if(!t.d||!t.d[0]||t.e>17)return new d(t.d?t.d[0]?t.s<0?0:1/0:1:t.s?t.s<0?0:t:NaN);for(null==e?(Ae=!1,l=f):l=e,a=new d(.03125);t.e>-2;)t=t.times(a),h+=5;for(l+=r=Math.log(Te(2,h))/Math.LN10*2+5|0,i=s=o=new d(1),d.precision=l;;){if(s=Fe(s.times(t),l,1),i=i.times(++c),Le((a=o.plus(He(s,i,l,1))).d).slice(0,l)===Le(o.d).slice(0,l)){for(n=h;n--;)o=Fe(o.times(o),l,1);if(null!=e)return d.precision=f,o;if(!(u<3&&Ve(o.d,l-r,p,u)))return Fe(o,d.precision=f,p,Ae=!0);d.precision=l+=10,i=s=a=new d(1),c=0,u++}o=a}}function ti(t,e){var i,r,n,s,o,a,l,u,c,h,d,p=1,f=t,m=f.d,g=f.constructor,y=g.rounding,_=g.precision;if(f.s<0||!m||!m[0]||!f.e&&1==m[0]&&1==m.length)return new g(m&&!m[0]?-1/0:1!=f.s?NaN:m?0:f);if(null==e?(Ae=!1,c=_):c=e,g.precision=c+=10,r=(i=Le(m)).charAt(0),!(Math.abs(s=f.e)<15e14))return u=Ye(g,c+2,_).times(s+""),f=ti(new g(r+"."+i.slice(1)),c-10).plus(u),g.precision=_,null==e?Fe(f,_,y,Ae=!0):f;for(;r<7&&1!=r||1==r&&i.charAt(1)>3;)r=(i=Le((f=f.times(t)).d)).charAt(0),p++;for(s=f.e,r>1?(f=new g("0."+i),s++):f=new g(r+"."+i.slice(1)),h=f,l=o=f=He(f.minus(1),f.plus(1),c,1),d=Fe(f.times(f),c,1),n=3;;){if(o=Fe(o.times(d),c,1),Le((u=l.plus(He(o,new g(n),c,1))).d).slice(0,c)===Le(l.d).slice(0,c)){if(l=l.times(2),0!==s&&(l=l.plus(Ye(g,c+2,_).times(s+""))),l=He(l,new g(p),c,1),null!=e)return g.precision=_,l;if(!Ve(l.d,c-10,y,a))return Fe(l,g.precision=_,y,Ae=!0);g.precision=c+=10,u=o=f=He(h.minus(1),h.plus(1),c,1),d=Fe(f.times(f),c,1),n=a=1}l=u,n+=2}}function ei(t){return String(t.s*t.s/0)}function ii(t,e){var i,r,n;for((i=e.indexOf("."))>-1&&(e=e.replace(".","")),(r=e.search(/e/i))>0?(i<0&&(i=r),i+=+e.slice(r+1),e=e.substring(0,r)):i<0&&(i=e.length),r=0;48===e.charCodeAt(r);r++);for(n=e.length;48===e.charCodeAt(n-1);--n);if(e=e.slice(r,n)){if(n-=r,t.e=i=i-r-1,t.d=[],r=(i+1)%7,i<0&&(r+=7),r<n){for(r&&t.d.push(+e.slice(0,r)),n-=7;r<n;)t.d.push(+e.slice(r,r+=7));r=7-(e=e.slice(r)).length}else r-=n;for(;r--;)e+="0";t.d.push(+e),Ae&&(t.e>t.constructor.maxE?(t.d=null,t.e=NaN):t.e<t.constructor.minE&&(t.e=0,t.d=[0]))}else t.e=0,t.d=[0];return t}function ri(t,e){var i,r,n,s,o,a,l,u,c;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),Me.test(e))return ii(t,e)}else if("Infinity"===e||"NaN"===e)return+e||(t.s=NaN),t.e=NaN,t.d=null,t;if(Ce.test(e))i=16,e=e.toLowerCase();else if(De.test(e))i=2;else{if(!Pe.test(e))throw Error(Se+e);i=8}for((s=e.search(/p/i))>0?(l=+e.slice(s+1),e=e.substring(2,s)):e=e.slice(2),o=(s=e.indexOf("."))>=0,r=t.constructor,o&&(s=(a=(e=e.replace(".","")).length)-s,n=Ge(r,new r(i),s,2*s)),s=c=(u=Be(e,i,ke)).length-1;0===u[s];--s)u.pop();return s<0?new r(0*t.s):(t.e=ze(u,c),t.d=u,Ae=!1,o&&(t=He(t,n,4*a)),l&&(t=t.times(Math.abs(l)<54?Te(2,l):Qi.pow(2,l))),Ae=!0,t)}function ni(t,e,i,r,n){var s,o,a,l,u=t.precision,c=Math.ceil(u/7);for(Ae=!1,l=i.times(i),a=new t(r);;){if(o=He(a.times(l),new t(e++*e++),u,1),a=n?r.plus(o):r.minus(o),r=He(o.times(l),new t(e++*e++),u,1),void 0!==(o=a.plus(r)).d[c]){for(s=c;o.d[s]===a.d[s]&&s--;);if(-1==s)break}s=a,a=r,r=o,o=s}return Ae=!0,o.d.length=c+1,o}function si(t,e){for(var i=t;--e;)i*=t;return i}function oi(t,e){var i,r=e.s<0,n=Ze(t,t.precision,1),s=n.times(.5);if((e=e.abs()).lte(s))return me=r?4:1,e;if((i=e.divToInt(n)).isZero())me=r?3:2;else{if((e=e.minus(i.times(n))).lte(s))return me=Ke(i)?r?2:3:r?4:1,e;me=Ke(i)?r?1:4:r?3:2}return e.minus(n).abs()}function ai(t,e,i,r){var n,s,o,a,l,u,c,h,d,p=t.constructor,f=void 0!==i;if(f?(je(i,1,ye),void 0===r?r=p.rounding:je(r,0,8)):(i=p.precision,r=p.rounding),t.isFinite()){for(f?(n=2,16==e?i=4*i-3:8==e&&(i=3*i-2)):n=e,(o=(c=qe(t)).indexOf("."))>=0&&(c=c.replace(".",""),(d=new p(1)).e=c.length-o,d.d=Be(qe(d),10,n),d.e=d.d.length),s=l=(h=Be(c,10,n)).length;0==h[--l];)h.pop();if(h[0]){if(o<0?s--:((t=new p(t)).d=h,t.e=s,h=(t=He(t,d,i,r,0,n)).d,s=t.e,u=fe),o=h[i],a=n/2,u=u||void 0!==h[i+1],u=r<4?(void 0!==o||u)&&(0===r||r===(t.s<0?3:2)):o>a||o===a&&(4===r||u||6===r&&1&h[i-1]||r===(t.s<0?8:7)),h.length=i,u)for(;++h[--i]>n-1;)h[i]=0,i||(++s,h.unshift(1));for(l=h.length;!h[l-1];--l);for(o=0,c="";o<l;o++)c+=_e.charAt(h[o]);if(f){if(l>1)if(16==e||8==e){for(o=16==e?4:3,--l;l%o;l++)c+="0";for(l=(h=Be(c,n,e)).length;!h[l-1];--l);for(o=1,c="1.";o<l;o++)c+=_e.charAt(h[o])}else c=c.charAt(0)+"."+c.slice(1);c=c+(s<0?"p":"p+")+s}else if(s<0){for(;++s;)c="0"+c;c="0."+c}else if(++s>l)for(s-=l;s--;)c+="0";else s<l&&(c=c.slice(0,s)+"."+c.slice(s))}else c=f?"0p+0":"0";c=(16==e?"0x":2==e?"0b":8==e?"0o":"")+c}else c=ei(t);return t.s<0?"-"+c:c}function li(t,e){if(t.length>e)return t.length=e,!0}function ui(t){return new this(t).abs()}function ci(t){return new this(t).acos()}function hi(t){return new this(t).acosh()}function di(t,e){return new this(t).plus(e)}function pi(t){return new this(t).asin()}function fi(t){return new this(t).asinh()}function mi(t){return new this(t).atan()}function gi(t){return new this(t).atanh()}function yi(t,e){t=new this(t),e=new this(e);var i,r=this.precision,n=this.rounding,s=r+4;return t.s&&e.s?t.d||e.d?!e.d||t.isZero()?(i=e.s<0?Ze(this,r,n):new this(0)).s=t.s:!t.d||e.isZero()?(i=Ze(this,s,1).times(.5)).s=t.s:e.s<0?(this.precision=s,this.rounding=1,i=this.atan(He(t,e,s,1)),e=Ze(this,s,1),this.precision=r,this.rounding=n,i=t.s<0?i.minus(e):i.plus(e)):i=this.atan(He(t,e,s,1)):(i=Ze(this,s,1).times(e.s>0?.25:.75)).s=t.s:i=new this(NaN),i}function _i(t){return new this(t).cbrt()}function vi(t){return Fe(t=new this(t),t.e+1,2)}function bi(t,e,i){return new this(t).clamp(e,i)}function wi(t){if(!t||"object"!=typeof t)throw Error($e+"Object expected");var e,i,r,n=!0===t.defaults,s=["precision",1,ye,"rounding",0,8,"toExpNeg",-9e15,0,"toExpPos",0,ge,"maxE",0,ge,"minE",-9e15,0,"modulo",0,9];for(e=0;e<s.length;e+=3)if(i=s[e],n&&(this[i]=we[i]),void 0!==(r=t[i])){if(!(Ee(r)===r&&r>=s[e+1]&&r<=s[e+2]))throw Error(Se+i+": "+r);this[i]=r}if(i="crypto",n&&(this[i]=we[i]),void 0!==(r=t[i])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(Se+i+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(Ne);this[i]=!0}else this[i]=!1}return this}function Ai(t){return new this(t).cos()}function $i(t){return new this(t).cosh()}function Si(t,e){return new this(t).div(e)}function xi(t){return new this(t).exp()}function Ni(t){return Fe(t=new this(t),t.e+1,3)}function Oi(){var t,e,i=new this(0);for(Ae=!1,t=0;t<arguments.length;)if((e=new this(arguments[t++])).d)i.d&&(i=i.plus(e.times(e)));else{if(e.s)return Ae=!0,new this(1/0);i=e}return Ae=!0,i.sqrt()}function Ei(t){return t instanceof Qi||t&&t.toStringTag===Oe||!1}function Ti(t){return new this(t).ln()}function Di(t,e){return new this(t).log(e)}function Ci(t){return new this(t).log(2)}function Pi(t){return new this(t).log(10)}function Mi(){return Je(this,arguments,"lt")}function ki(){return Je(this,arguments,"gt")}function Ii(t,e){return new this(t).mod(e)}function Ri(t,e){return new this(t).mul(e)}function Ui(t,e){return new this(t).pow(e)}function Li(t){var e,i,r,n,s=0,o=new this(1),a=[];if(void 0===t?t=this.precision:je(t,1,ye),r=Math.ceil(t/7),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(r));s<r;)(n=e[s])>=429e7?e[s]=crypto.getRandomValues(new Uint32Array(1))[0]:a[s++]=n%1e7;else{if(!crypto.randomBytes)throw Error(Ne);for(e=crypto.randomBytes(r*=4);s<r;)(n=e[s]+(e[s+1]<<8)+(e[s+2]<<16)+((127&e[s+3])<<24))>=214e7?crypto.randomBytes(4).copy(e,s):(a.push(n%1e7),s+=4);s=r/4}else for(;s<r;)a[s++]=1e7*Math.random()|0;for(t%=7,(r=a[--s])&&t&&(n=Te(10,7-t),a[s]=(r/n|0)*n);0===a[s];s--)a.pop();if(s<0)i=0,a=[0];else{for(i=-1;0===a[0];i-=7)a.shift();for(r=1,n=a[0];n>=10;n/=10)r++;r<7&&(i-=7-r)}return o.e=i,o.d=a,o}function ji(t){return Fe(t=new this(t),t.e+1,this.rounding)}function Vi(t){return(t=new this(t)).d?t.d[0]?t.s:0*t.s:t.s||NaN}function Bi(t){return new this(t).sin()}function Hi(t){return new this(t).sinh()}function Fi(t){return new this(t).sqrt()}function qi(t,e){return new this(t).sub(e)}function zi(){var t=0,e=arguments,i=new this(e[t]);for(Ae=!1;i.s&&++t<e.length;)i=i.plus(e[t]);return Ae=!0,Fe(i,this.precision,this.rounding)}function Yi(t){return new this(t).tan()}function Zi(t){return new this(t).tanh()}function Wi(t){return Fe(t=new this(t),t.e+1,1)}Ue[Symbol.for("nodejs.util.inspect.custom")]=Ue.toString,Ue[Symbol.toStringTag]="Decimal";var Qi=Ue.constructor=function t(e){var i,r,n;function s(t){var e,i,r,n=this;if(!(n instanceof s))return new s(t);if(n.constructor=s,Ei(t))return n.s=t.s,void(Ae?!t.d||t.e>s.maxE?(n.e=NaN,n.d=null):t.e<s.minE?(n.e=0,n.d=[0]):(n.e=t.e,n.d=t.d.slice()):(n.e=t.e,n.d=t.d?t.d.slice():t.d));if("number"===(r=typeof t)){if(0===t)return n.s=1/t<0?-1:1,n.e=0,void(n.d=[0]);if(t<0?(t=-t,n.s=-1):n.s=1,t===~~t&&t<1e7){for(e=0,i=t;i>=10;i/=10)e++;return void(Ae?e>s.maxE?(n.e=NaN,n.d=null):e<s.minE?(n.e=0,n.d=[0]):(n.e=e,n.d=[t]):(n.e=e,n.d=[t]))}return 0*t!=0?(t||(n.s=NaN),n.e=NaN,void(n.d=null)):ii(n,t.toString())}if("string"!==r)throw Error(Se+t);return 45===(i=t.charCodeAt(0))?(t=t.slice(1),n.s=-1):(43===i&&(t=t.slice(1)),n.s=1),Me.test(t)?ii(n,t):ri(n,t)}if(s.prototype=Ue,s.ROUND_UP=0,s.ROUND_DOWN=1,s.ROUND_CEIL=2,s.ROUND_FLOOR=3,s.ROUND_HALF_UP=4,s.ROUND_HALF_DOWN=5,s.ROUND_HALF_EVEN=6,s.ROUND_HALF_CEIL=7,s.ROUND_HALF_FLOOR=8,s.EUCLID=9,s.config=s.set=wi,s.clone=t,s.isDecimal=Ei,s.abs=ui,s.acos=ci,s.acosh=hi,s.add=di,s.asin=pi,s.asinh=fi,s.atan=mi,s.atanh=gi,s.atan2=yi,s.cbrt=_i,s.ceil=vi,s.clamp=bi,s.cos=Ai,s.cosh=$i,s.div=Si,s.exp=xi,s.floor=Ni,s.hypot=Oi,s.ln=Ti,s.log=Di,s.log10=Pi,s.log2=Ci,s.max=Mi,s.min=ki,s.mod=Ii,s.mul=Ri,s.pow=Ui,s.random=Li,s.round=ji,s.sign=Vi,s.sin=Bi,s.sinh=Hi,s.sqrt=Fi,s.sub=qi,s.sum=zi,s.tan=Yi,s.tanh=Zi,s.trunc=Wi,void 0===e&&(e={}),e&&!0!==e.defaults)for(n=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],i=0;i<n.length;)e.hasOwnProperty(r=n[i++])||(e[r]=this[r]);return s.config(e),s}(we);ve=new Qi(ve),be=new Qi(be);const Gi=/^-?\d+(\.\d+)?$/,Ki=()=>({stringToChars:t=>Array.from(t)});function Ji(){var t=3,e=4,i=12,r=13,n=16,s=17;function o(t,e){void 0===e&&(e=0);var i=t.charCodeAt(e);if(55296<=i&&i<=56319&&e<t.length-1){var r=i;return 56320<=(n=t.charCodeAt(e+1))&&n<=57343?1024*(r-55296)+(n-56320)+65536:r}if(56320<=i&&i<=57343&&e>=1){var n=i;return 55296<=(r=t.charCodeAt(e-1))&&r<=56319?1024*(r-55296)+(n-56320)+65536:n}return i}function a(o,a,l){var u=[o].concat(a).concat([l]),c=u[u.length-2],h=l,d=u.lastIndexOf(14);if(d>1&&u.slice(1,d).every((function(e){return e==t}))&&-1==[t,r,s].indexOf(o))return 2;var p=u.lastIndexOf(e);if(p>0&&u.slice(1,p).every((function(t){return t==e}))&&-1==[i,e].indexOf(c))return u.filter((function(t){return t==e})).length%2==1?3:4;if(0==c&&1==h)return 0;if(2==c||0==c||1==c)return 14==h&&a.every((function(e){return e==t}))?2:1;if(2==h||0==h||1==h)return 1;if(6==c&&(6==h||7==h||9==h||10==h))return 0;if(!(9!=c&&7!=c||7!=h&&8!=h))return 0;if((10==c||8==c)&&8==h)return 0;if(h==t||15==h)return 0;if(5==h)return 0;if(c==i)return 0;var f=-1!=u.indexOf(t)?u.lastIndexOf(t)-1:u.length-2;return-1!=[r,s].indexOf(u[f])&&u.slice(f+1,-1).every((function(e){return e==t}))&&14==h||15==c&&-1!=[n,s].indexOf(h)?0:-1!=a.indexOf(e)?2:c==e&&h==e?0:1}function l(o){return 1536<=o&&o<=1541||1757==o||1807==o||2274==o||3406==o||69821==o||70082<=o&&o<=70083||72250==o||72326<=o&&o<=72329||73030==o?i:13==o?0:10==o?1:0<=o&&o<=9||11<=o&&o<=12||14<=o&&o<=31||127<=o&&o<=159||173==o||1564==o||6158==o||8203==o||8206<=o&&o<=8207||8232==o||8233==o||8234<=o&&o<=8238||8288<=o&&o<=8292||8293==o||8294<=o&&o<=8303||55296<=o&&o<=57343||65279==o||65520<=o&&o<=65528||65529<=o&&o<=65531||113824<=o&&o<=113827||119155<=o&&o<=119162||917504==o||917505==o||917506<=o&&o<=917535||917632<=o&&o<=917759||918e3<=o&&o<=921599?2:768<=o&&o<=879||1155<=o&&o<=1159||1160<=o&&o<=1161||1425<=o&&o<=1469||1471==o||1473<=o&&o<=1474||1476<=o&&o<=1477||1479==o||1552<=o&&o<=1562||1611<=o&&o<=1631||1648==o||1750<=o&&o<=1756||1759<=o&&o<=1764||1767<=o&&o<=1768||1770<=o&&o<=1773||1809==o||1840<=o&&o<=1866||1958<=o&&o<=1968||2027<=o&&o<=2035||2070<=o&&o<=2073||2075<=o&&o<=2083||2085<=o&&o<=2087||2089<=o&&o<=2093||2137<=o&&o<=2139||2260<=o&&o<=2273||2275<=o&&o<=2306||2362==o||2364==o||2369<=o&&o<=2376||2381==o||2385<=o&&o<=2391||2402<=o&&o<=2403||2433==o||2492==o||2494==o||2497<=o&&o<=2500||2509==o||2519==o||2530<=o&&o<=2531||2561<=o&&o<=2562||2620==o||2625<=o&&o<=2626||2631<=o&&o<=2632||2635<=o&&o<=2637||2641==o||2672<=o&&o<=2673||2677==o||2689<=o&&o<=2690||2748==o||2753<=o&&o<=2757||2759<=o&&o<=2760||2765==o||2786<=o&&o<=2787||2810<=o&&o<=2815||2817==o||2876==o||2878==o||2879==o||2881<=o&&o<=2884||2893==o||2902==o||2903==o||2914<=o&&o<=2915||2946==o||3006==o||3008==o||3021==o||3031==o||3072==o||3134<=o&&o<=3136||3142<=o&&o<=3144||3146<=o&&o<=3149||3157<=o&&o<=3158||3170<=o&&o<=3171||3201==o||3260==o||3263==o||3266==o||3270==o||3276<=o&&o<=3277||3285<=o&&o<=3286||3298<=o&&o<=3299||3328<=o&&o<=3329||3387<=o&&o<=3388||3390==o||3393<=o&&o<=3396||3405==o||3415==o||3426<=o&&o<=3427||3530==o||3535==o||3538<=o&&o<=3540||3542==o||3551==o||3633==o||3636<=o&&o<=3642||3655<=o&&o<=3662||3761==o||3764<=o&&o<=3769||3771<=o&&o<=3772||3784<=o&&o<=3789||3864<=o&&o<=3865||3893==o||3895==o||3897==o||3953<=o&&o<=3966||3968<=o&&o<=3972||3974<=o&&o<=3975||3981<=o&&o<=3991||3993<=o&&o<=4028||4038==o||4141<=o&&o<=4144||4146<=o&&o<=4151||4153<=o&&o<=4154||4157<=o&&o<=4158||4184<=o&&o<=4185||4190<=o&&o<=4192||4209<=o&&o<=4212||4226==o||4229<=o&&o<=4230||4237==o||4253==o||4957<=o&&o<=4959||5906<=o&&o<=5908||5938<=o&&o<=5940||5970<=o&&o<=5971||6002<=o&&o<=6003||6068<=o&&o<=6069||6071<=o&&o<=6077||6086==o||6089<=o&&o<=6099||6109==o||6155<=o&&o<=6157||6277<=o&&o<=6278||6313==o||6432<=o&&o<=6434||6439<=o&&o<=6440||6450==o||6457<=o&&o<=6459||6679<=o&&o<=6680||6683==o||6742==o||6744<=o&&o<=6750||6752==o||6754==o||6757<=o&&o<=6764||6771<=o&&o<=6780||6783==o||6832<=o&&o<=6845||6846==o||6912<=o&&o<=6915||6964==o||6966<=o&&o<=6970||6972==o||6978==o||7019<=o&&o<=7027||7040<=o&&o<=7041||7074<=o&&o<=7077||7080<=o&&o<=7081||7083<=o&&o<=7085||7142==o||7144<=o&&o<=7145||7149==o||7151<=o&&o<=7153||7212<=o&&o<=7219||7222<=o&&o<=7223||7376<=o&&o<=7378||7380<=o&&o<=7392||7394<=o&&o<=7400||7405==o||7412==o||7416<=o&&o<=7417||7616<=o&&o<=7673||7675<=o&&o<=7679||8204==o||8400<=o&&o<=8412||8413<=o&&o<=8416||8417==o||8418<=o&&o<=8420||8421<=o&&o<=8432||11503<=o&&o<=11505||11647==o||11744<=o&&o<=11775||12330<=o&&o<=12333||12334<=o&&o<=12335||12441<=o&&o<=12442||42607==o||42608<=o&&o<=42610||42612<=o&&o<=42621||42654<=o&&o<=42655||42736<=o&&o<=42737||43010==o||43014==o||43019==o||43045<=o&&o<=43046||43204<=o&&o<=43205||43232<=o&&o<=43249||43302<=o&&o<=43309||43335<=o&&o<=43345||43392<=o&&o<=43394||43443==o||43446<=o&&o<=43449||43452==o||43493==o||43561<=o&&o<=43566||43569<=o&&o<=43570||43573<=o&&o<=43574||43587==o||43596==o||43644==o||43696==o||43698<=o&&o<=43700||43703<=o&&o<=43704||43710<=o&&o<=43711||43713==o||43756<=o&&o<=43757||43766==o||44005==o||44008==o||44013==o||64286==o||65024<=o&&o<=65039||65056<=o&&o<=65071||65438<=o&&o<=65439||66045==o||66272==o||66422<=o&&o<=66426||68097<=o&&o<=68099||68101<=o&&o<=68102||68108<=o&&o<=68111||68152<=o&&o<=68154||68159==o||68325<=o&&o<=68326||69633==o||69688<=o&&o<=69702||69759<=o&&o<=69761||69811<=o&&o<=69814||69817<=o&&o<=69818||69888<=o&&o<=69890||69927<=o&&o<=69931||69933<=o&&o<=69940||70003==o||70016<=o&&o<=70017||70070<=o&&o<=70078||70090<=o&&o<=70092||70191<=o&&o<=70193||70196==o||70198<=o&&o<=70199||70206==o||70367==o||70371<=o&&o<=70378||70400<=o&&o<=70401||70460==o||70462==o||70464==o||70487==o||70502<=o&&o<=70508||70512<=o&&o<=70516||70712<=o&&o<=70719||70722<=o&&o<=70724||70726==o||70832==o||70835<=o&&o<=70840||70842==o||70845==o||70847<=o&&o<=70848||70850<=o&&o<=70851||71087==o||71090<=o&&o<=71093||71100<=o&&o<=71101||71103<=o&&o<=71104||71132<=o&&o<=71133||71219<=o&&o<=71226||71229==o||71231<=o&&o<=71232||71339==o||71341==o||71344<=o&&o<=71349||71351==o||71453<=o&&o<=71455||71458<=o&&o<=71461||71463<=o&&o<=71467||72193<=o&&o<=72198||72201<=o&&o<=72202||72243<=o&&o<=72248||72251<=o&&o<=72254||72263==o||72273<=o&&o<=72278||72281<=o&&o<=72283||72330<=o&&o<=72342||72344<=o&&o<=72345||72752<=o&&o<=72758||72760<=o&&o<=72765||72767==o||72850<=o&&o<=72871||72874<=o&&o<=72880||72882<=o&&o<=72883||72885<=o&&o<=72886||73009<=o&&o<=73014||73018==o||73020<=o&&o<=73021||73023<=o&&o<=73029||73031==o||92912<=o&&o<=92916||92976<=o&&o<=92982||94095<=o&&o<=94098||113821<=o&&o<=113822||119141==o||119143<=o&&o<=119145||119150<=o&&o<=119154||119163<=o&&o<=119170||119173<=o&&o<=119179||119210<=o&&o<=119213||119362<=o&&o<=119364||121344<=o&&o<=121398||121403<=o&&o<=121452||121461==o||121476==o||121499<=o&&o<=121503||121505<=o&&o<=121519||122880<=o&&o<=122886||122888<=o&&o<=122904||122907<=o&&o<=122913||122915<=o&&o<=122916||122918<=o&&o<=122922||125136<=o&&o<=125142||125252<=o&&o<=125258||917536<=o&&o<=917631||917760<=o&&o<=917999?t:127462<=o&&o<=127487?e:2307==o||2363==o||2366<=o&&o<=2368||2377<=o&&o<=2380||2382<=o&&o<=2383||2434<=o&&o<=2435||2495<=o&&o<=2496||2503<=o&&o<=2504||2507<=o&&o<=2508||2563==o||2622<=o&&o<=2624||2691==o||2750<=o&&o<=2752||2761==o||2763<=o&&o<=2764||2818<=o&&o<=2819||2880==o||2887<=o&&o<=2888||2891<=o&&o<=2892||3007==o||3009<=o&&o<=3010||3014<=o&&o<=3016||3018<=o&&o<=3020||3073<=o&&o<=3075||3137<=o&&o<=3140||3202<=o&&o<=3203||3262==o||3264<=o&&o<=3265||3267<=o&&o<=3268||3271<=o&&o<=3272||3274<=o&&o<=3275||3330<=o&&o<=3331||3391<=o&&o<=3392||3398<=o&&o<=3400||3402<=o&&o<=3404||3458<=o&&o<=3459||3536<=o&&o<=3537||3544<=o&&o<=3550||3570<=o&&o<=3571||3635==o||3763==o||3902<=o&&o<=3903||3967==o||4145==o||4155<=o&&o<=4156||4182<=o&&o<=4183||4228==o||6070==o||6078<=o&&o<=6085||6087<=o&&o<=6088||6435<=o&&o<=6438||6441<=o&&o<=6443||6448<=o&&o<=6449||6451<=o&&o<=6456||6681<=o&&o<=6682||6741==o||6743==o||6765<=o&&o<=6770||6916==o||6965==o||6971==o||6973<=o&&o<=6977||6979<=o&&o<=6980||7042==o||7073==o||7078<=o&&o<=7079||7082==o||7143==o||7146<=o&&o<=7148||7150==o||7154<=o&&o<=7155||7204<=o&&o<=7211||7220<=o&&o<=7221||7393==o||7410<=o&&o<=7411||7415==o||43043<=o&&o<=43044||43047==o||43136<=o&&o<=43137||43188<=o&&o<=43203||43346<=o&&o<=43347||43395==o||43444<=o&&o<=43445||43450<=o&&o<=43451||43453<=o&&o<=43456||43567<=o&&o<=43568||43571<=o&&o<=43572||43597==o||43755==o||43758<=o&&o<=43759||43765==o||44003<=o&&o<=44004||44006<=o&&o<=44007||44009<=o&&o<=44010||44012==o||69632==o||69634==o||69762==o||69808<=o&&o<=69810||69815<=o&&o<=69816||69932==o||70018==o||70067<=o&&o<=70069||70079<=o&&o<=70080||70188<=o&&o<=70190||70194<=o&&o<=70195||70197==o||70368<=o&&o<=70370||70402<=o&&o<=70403||70463==o||70465<=o&&o<=70468||70471<=o&&o<=70472||70475<=o&&o<=70477||70498<=o&&o<=70499||70709<=o&&o<=70711||70720<=o&&o<=70721||70725==o||70833<=o&&o<=70834||70841==o||70843<=o&&o<=70844||70846==o||70849==o||71088<=o&&o<=71089||71096<=o&&o<=71099||71102==o||71216<=o&&o<=71218||71227<=o&&o<=71228||71230==o||71340==o||71342<=o&&o<=71343||71350==o||71456<=o&&o<=71457||71462==o||72199<=o&&o<=72200||72249==o||72279<=o&&o<=72280||72343==o||72751==o||72766==o||72873==o||72881==o||72884==o||94033<=o&&o<=94078||119142==o||119149==o?5:4352<=o&&o<=4447||43360<=o&&o<=43388?6:4448<=o&&o<=4519||55216<=o&&o<=55238?7:4520<=o&&o<=4607||55243<=o&&o<=55291?8:44032==o||44060==o||44088==o||44116==o||44144==o||44172==o||44200==o||44228==o||44256==o||44284==o||44312==o||44340==o||44368==o||44396==o||44424==o||44452==o||44480==o||44508==o||44536==o||44564==o||44592==o||44620==o||44648==o||44676==o||44704==o||44732==o||44760==o||44788==o||44816==o||44844==o||44872==o||44900==o||44928==o||44956==o||44984==o||45012==o||45040==o||45068==o||45096==o||45124==o||45152==o||45180==o||45208==o||45236==o||45264==o||45292==o||45320==o||45348==o||45376==o||45404==o||45432==o||45460==o||45488==o||45516==o||45544==o||45572==o||45600==o||45628==o||45656==o||45684==o||45712==o||45740==o||45768==o||45796==o||45824==o||45852==o||45880==o||45908==o||45936==o||45964==o||45992==o||46020==o||46048==o||46076==o||46104==o||46132==o||46160==o||46188==o||46216==o||46244==o||46272==o||46300==o||46328==o||46356==o||46384==o||46412==o||46440==o||46468==o||46496==o||46524==o||46552==o||46580==o||46608==o||46636==o||46664==o||46692==o||46720==o||46748==o||46776==o||46804==o||46832==o||46860==o||46888==o||46916==o||46944==o||46972==o||47e3==o||47028==o||47056==o||47084==o||47112==o||47140==o||47168==o||47196==o||47224==o||47252==o||47280==o||47308==o||47336==o||47364==o||47392==o||47420==o||47448==o||47476==o||47504==o||47532==o||47560==o||47588==o||47616==o||47644==o||47672==o||47700==o||47728==o||47756==o||47784==o||47812==o||47840==o||47868==o||47896==o||47924==o||47952==o||47980==o||48008==o||48036==o||48064==o||48092==o||48120==o||48148==o||48176==o||48204==o||48232==o||48260==o||48288==o||48316==o||48344==o||48372==o||48400==o||48428==o||48456==o||48484==o||48512==o||48540==o||48568==o||48596==o||48624==o||48652==o||48680==o||48708==o||48736==o||48764==o||48792==o||48820==o||48848==o||48876==o||48904==o||48932==o||48960==o||48988==o||49016==o||49044==o||49072==o||49100==o||49128==o||49156==o||49184==o||49212==o||49240==o||49268==o||49296==o||49324==o||49352==o||49380==o||49408==o||49436==o||49464==o||49492==o||49520==o||49548==o||49576==o||49604==o||49632==o||49660==o||49688==o||49716==o||49744==o||49772==o||49800==o||49828==o||49856==o||49884==o||49912==o||49940==o||49968==o||49996==o||50024==o||50052==o||50080==o||50108==o||50136==o||50164==o||50192==o||50220==o||50248==o||50276==o||50304==o||50332==o||50360==o||50388==o||50416==o||50444==o||50472==o||50500==o||50528==o||50556==o||50584==o||50612==o||50640==o||50668==o||50696==o||50724==o||50752==o||50780==o||50808==o||50836==o||50864==o||50892==o||50920==o||50948==o||50976==o||51004==o||51032==o||51060==o||51088==o||51116==o||51144==o||51172==o||51200==o||51228==o||51256==o||51284==o||51312==o||51340==o||51368==o||51396==o||51424==o||51452==o||51480==o||51508==o||51536==o||51564==o||51592==o||51620==o||51648==o||51676==o||51704==o||51732==o||51760==o||51788==o||51816==o||51844==o||51872==o||51900==o||51928==o||51956==o||51984==o||52012==o||52040==o||52068==o||52096==o||52124==o||52152==o||52180==o||52208==o||52236==o||52264==o||52292==o||52320==o||52348==o||52376==o||52404==o||52432==o||52460==o||52488==o||52516==o||52544==o||52572==o||52600==o||52628==o||52656==o||52684==o||52712==o||52740==o||52768==o||52796==o||52824==o||52852==o||52880==o||52908==o||52936==o||52964==o||52992==o||53020==o||53048==o||53076==o||53104==o||53132==o||53160==o||53188==o||53216==o||53244==o||53272==o||53300==o||53328==o||53356==o||53384==o||53412==o||53440==o||53468==o||53496==o||53524==o||53552==o||53580==o||53608==o||53636==o||53664==o||53692==o||53720==o||53748==o||53776==o||53804==o||53832==o||53860==o||53888==o||53916==o||53944==o||53972==o||54e3==o||54028==o||54056==o||54084==o||54112==o||54140==o||54168==o||54196==o||54224==o||54252==o||54280==o||54308==o||54336==o||54364==o||54392==o||54420==o||54448==o||54476==o||54504==o||54532==o||54560==o||54588==o||54616==o||54644==o||54672==o||54700==o||54728==o||54756==o||54784==o||54812==o||54840==o||54868==o||54896==o||54924==o||54952==o||54980==o||55008==o||55036==o||55064==o||55092==o||55120==o||55148==o||55176==o?9:44033<=o&&o<=44059||44061<=o&&o<=44087||44089<=o&&o<=44115||44117<=o&&o<=44143||44145<=o&&o<=44171||44173<=o&&o<=44199||44201<=o&&o<=44227||44229<=o&&o<=44255||44257<=o&&o<=44283||44285<=o&&o<=44311||44313<=o&&o<=44339||44341<=o&&o<=44367||44369<=o&&o<=44395||44397<=o&&o<=44423||44425<=o&&o<=44451||44453<=o&&o<=44479||44481<=o&&o<=44507||44509<=o&&o<=44535||44537<=o&&o<=44563||44565<=o&&o<=44591||44593<=o&&o<=44619||44621<=o&&o<=44647||44649<=o&&o<=44675||44677<=o&&o<=44703||44705<=o&&o<=44731||44733<=o&&o<=44759||44761<=o&&o<=44787||44789<=o&&o<=44815||44817<=o&&o<=44843||44845<=o&&o<=44871||44873<=o&&o<=44899||44901<=o&&o<=44927||44929<=o&&o<=44955||44957<=o&&o<=44983||44985<=o&&o<=45011||45013<=o&&o<=45039||45041<=o&&o<=45067||45069<=o&&o<=45095||45097<=o&&o<=45123||45125<=o&&o<=45151||45153<=o&&o<=45179||45181<=o&&o<=45207||45209<=o&&o<=45235||45237<=o&&o<=45263||45265<=o&&o<=45291||45293<=o&&o<=45319||45321<=o&&o<=45347||45349<=o&&o<=45375||45377<=o&&o<=45403||45405<=o&&o<=45431||45433<=o&&o<=45459||45461<=o&&o<=45487||45489<=o&&o<=45515||45517<=o&&o<=45543||45545<=o&&o<=45571||45573<=o&&o<=45599||45601<=o&&o<=45627||45629<=o&&o<=45655||45657<=o&&o<=45683||45685<=o&&o<=45711||45713<=o&&o<=45739||45741<=o&&o<=45767||45769<=o&&o<=45795||45797<=o&&o<=45823||45825<=o&&o<=45851||45853<=o&&o<=45879||45881<=o&&o<=45907||45909<=o&&o<=45935||45937<=o&&o<=45963||45965<=o&&o<=45991||45993<=o&&o<=46019||46021<=o&&o<=46047||46049<=o&&o<=46075||46077<=o&&o<=46103||46105<=o&&o<=46131||46133<=o&&o<=46159||46161<=o&&o<=46187||46189<=o&&o<=46215||46217<=o&&o<=46243||46245<=o&&o<=46271||46273<=o&&o<=46299||46301<=o&&o<=46327||46329<=o&&o<=46355||46357<=o&&o<=46383||46385<=o&&o<=46411||46413<=o&&o<=46439||46441<=o&&o<=46467||46469<=o&&o<=46495||46497<=o&&o<=46523||46525<=o&&o<=46551||46553<=o&&o<=46579||46581<=o&&o<=46607||46609<=o&&o<=46635||46637<=o&&o<=46663||46665<=o&&o<=46691||46693<=o&&o<=46719||46721<=o&&o<=46747||46749<=o&&o<=46775||46777<=o&&o<=46803||46805<=o&&o<=46831||46833<=o&&o<=46859||46861<=o&&o<=46887||46889<=o&&o<=46915||46917<=o&&o<=46943||46945<=o&&o<=46971||46973<=o&&o<=46999||47001<=o&&o<=47027||47029<=o&&o<=47055||47057<=o&&o<=47083||47085<=o&&o<=47111||47113<=o&&o<=47139||47141<=o&&o<=47167||47169<=o&&o<=47195||47197<=o&&o<=47223||47225<=o&&o<=47251||47253<=o&&o<=47279||47281<=o&&o<=47307||47309<=o&&o<=47335||47337<=o&&o<=47363||47365<=o&&o<=47391||47393<=o&&o<=47419||47421<=o&&o<=47447||47449<=o&&o<=47475||47477<=o&&o<=47503||47505<=o&&o<=47531||47533<=o&&o<=47559||47561<=o&&o<=47587||47589<=o&&o<=47615||47617<=o&&o<=47643||47645<=o&&o<=47671||47673<=o&&o<=47699||47701<=o&&o<=47727||47729<=o&&o<=47755||47757<=o&&o<=47783||47785<=o&&o<=47811||47813<=o&&o<=47839||47841<=o&&o<=47867||47869<=o&&o<=47895||47897<=o&&o<=47923||47925<=o&&o<=47951||47953<=o&&o<=47979||47981<=o&&o<=48007||48009<=o&&o<=48035||48037<=o&&o<=48063||48065<=o&&o<=48091||48093<=o&&o<=48119||48121<=o&&o<=48147||48149<=o&&o<=48175||48177<=o&&o<=48203||48205<=o&&o<=48231||48233<=o&&o<=48259||48261<=o&&o<=48287||48289<=o&&o<=48315||48317<=o&&o<=48343||48345<=o&&o<=48371||48373<=o&&o<=48399||48401<=o&&o<=48427||48429<=o&&o<=48455||48457<=o&&o<=48483||48485<=o&&o<=48511||48513<=o&&o<=48539||48541<=o&&o<=48567||48569<=o&&o<=48595||48597<=o&&o<=48623||48625<=o&&o<=48651||48653<=o&&o<=48679||48681<=o&&o<=48707||48709<=o&&o<=48735||48737<=o&&o<=48763||48765<=o&&o<=48791||48793<=o&&o<=48819||48821<=o&&o<=48847||48849<=o&&o<=48875||48877<=o&&o<=48903||48905<=o&&o<=48931||48933<=o&&o<=48959||48961<=o&&o<=48987||48989<=o&&o<=49015||49017<=o&&o<=49043||49045<=o&&o<=49071||49073<=o&&o<=49099||49101<=o&&o<=49127||49129<=o&&o<=49155||49157<=o&&o<=49183||49185<=o&&o<=49211||49213<=o&&o<=49239||49241<=o&&o<=49267||49269<=o&&o<=49295||49297<=o&&o<=49323||49325<=o&&o<=49351||49353<=o&&o<=49379||49381<=o&&o<=49407||49409<=o&&o<=49435||49437<=o&&o<=49463||49465<=o&&o<=49491||49493<=o&&o<=49519||49521<=o&&o<=49547||49549<=o&&o<=49575||49577<=o&&o<=49603||49605<=o&&o<=49631||49633<=o&&o<=49659||49661<=o&&o<=49687||49689<=o&&o<=49715||49717<=o&&o<=49743||49745<=o&&o<=49771||49773<=o&&o<=49799||49801<=o&&o<=49827||49829<=o&&o<=49855||49857<=o&&o<=49883||49885<=o&&o<=49911||49913<=o&&o<=49939||49941<=o&&o<=49967||49969<=o&&o<=49995||49997<=o&&o<=50023||50025<=o&&o<=50051||50053<=o&&o<=50079||50081<=o&&o<=50107||50109<=o&&o<=50135||50137<=o&&o<=50163||50165<=o&&o<=50191||50193<=o&&o<=50219||50221<=o&&o<=50247||50249<=o&&o<=50275||50277<=o&&o<=50303||50305<=o&&o<=50331||50333<=o&&o<=50359||50361<=o&&o<=50387||50389<=o&&o<=50415||50417<=o&&o<=50443||50445<=o&&o<=50471||50473<=o&&o<=50499||50501<=o&&o<=50527||50529<=o&&o<=50555||50557<=o&&o<=50583||50585<=o&&o<=50611||50613<=o&&o<=50639||50641<=o&&o<=50667||50669<=o&&o<=50695||50697<=o&&o<=50723||50725<=o&&o<=50751||50753<=o&&o<=50779||50781<=o&&o<=50807||50809<=o&&o<=50835||50837<=o&&o<=50863||50865<=o&&o<=50891||50893<=o&&o<=50919||50921<=o&&o<=50947||50949<=o&&o<=50975||50977<=o&&o<=51003||51005<=o&&o<=51031||51033<=o&&o<=51059||51061<=o&&o<=51087||51089<=o&&o<=51115||51117<=o&&o<=51143||51145<=o&&o<=51171||51173<=o&&o<=51199||51201<=o&&o<=51227||51229<=o&&o<=51255||51257<=o&&o<=51283||51285<=o&&o<=51311||51313<=o&&o<=51339||51341<=o&&o<=51367||51369<=o&&o<=51395||51397<=o&&o<=51423||51425<=o&&o<=51451||51453<=o&&o<=51479||51481<=o&&o<=51507||51509<=o&&o<=51535||51537<=o&&o<=51563||51565<=o&&o<=51591||51593<=o&&o<=51619||51621<=o&&o<=51647||51649<=o&&o<=51675||51677<=o&&o<=51703||51705<=o&&o<=51731||51733<=o&&o<=51759||51761<=o&&o<=51787||51789<=o&&o<=51815||51817<=o&&o<=51843||51845<=o&&o<=51871||51873<=o&&o<=51899||51901<=o&&o<=51927||51929<=o&&o<=51955||51957<=o&&o<=51983||51985<=o&&o<=52011||52013<=o&&o<=52039||52041<=o&&o<=52067||52069<=o&&o<=52095||52097<=o&&o<=52123||52125<=o&&o<=52151||52153<=o&&o<=52179||52181<=o&&o<=52207||52209<=o&&o<=52235||52237<=o&&o<=52263||52265<=o&&o<=52291||52293<=o&&o<=52319||52321<=o&&o<=52347||52349<=o&&o<=52375||52377<=o&&o<=52403||52405<=o&&o<=52431||52433<=o&&o<=52459||52461<=o&&o<=52487||52489<=o&&o<=52515||52517<=o&&o<=52543||52545<=o&&o<=52571||52573<=o&&o<=52599||52601<=o&&o<=52627||52629<=o&&o<=52655||52657<=o&&o<=52683||52685<=o&&o<=52711||52713<=o&&o<=52739||52741<=o&&o<=52767||52769<=o&&o<=52795||52797<=o&&o<=52823||52825<=o&&o<=52851||52853<=o&&o<=52879||52881<=o&&o<=52907||52909<=o&&o<=52935||52937<=o&&o<=52963||52965<=o&&o<=52991||52993<=o&&o<=53019||53021<=o&&o<=53047||53049<=o&&o<=53075||53077<=o&&o<=53103||53105<=o&&o<=53131||53133<=o&&o<=53159||53161<=o&&o<=53187||53189<=o&&o<=53215||53217<=o&&o<=53243||53245<=o&&o<=53271||53273<=o&&o<=53299||53301<=o&&o<=53327||53329<=o&&o<=53355||53357<=o&&o<=53383||53385<=o&&o<=53411||53413<=o&&o<=53439||53441<=o&&o<=53467||53469<=o&&o<=53495||53497<=o&&o<=53523||53525<=o&&o<=53551||53553<=o&&o<=53579||53581<=o&&o<=53607||53609<=o&&o<=53635||53637<=o&&o<=53663||53665<=o&&o<=53691||53693<=o&&o<=53719||53721<=o&&o<=53747||53749<=o&&o<=53775||53777<=o&&o<=53803||53805<=o&&o<=53831||53833<=o&&o<=53859||53861<=o&&o<=53887||53889<=o&&o<=53915||53917<=o&&o<=53943||53945<=o&&o<=53971||53973<=o&&o<=53999||54001<=o&&o<=54027||54029<=o&&o<=54055||54057<=o&&o<=54083||54085<=o&&o<=54111||54113<=o&&o<=54139||54141<=o&&o<=54167||54169<=o&&o<=54195||54197<=o&&o<=54223||54225<=o&&o<=54251||54253<=o&&o<=54279||54281<=o&&o<=54307||54309<=o&&o<=54335||54337<=o&&o<=54363||54365<=o&&o<=54391||54393<=o&&o<=54419||54421<=o&&o<=54447||54449<=o&&o<=54475||54477<=o&&o<=54503||54505<=o&&o<=54531||54533<=o&&o<=54559||54561<=o&&o<=54587||54589<=o&&o<=54615||54617<=o&&o<=54643||54645<=o&&o<=54671||54673<=o&&o<=54699||54701<=o&&o<=54727||54729<=o&&o<=54755||54757<=o&&o<=54783||54785<=o&&o<=54811||54813<=o&&o<=54839||54841<=o&&o<=54867||54869<=o&&o<=54895||54897<=o&&o<=54923||54925<=o&&o<=54951||54953<=o&&o<=54979||54981<=o&&o<=55007||55009<=o&&o<=55035||55037<=o&&o<=55063||55065<=o&&o<=55091||55093<=o&&o<=55119||55121<=o&&o<=55147||55149<=o&&o<=55175||55177<=o&&o<=55203?10:9757==o||9977==o||9994<=o&&o<=9997||127877==o||127938<=o&&o<=127940||127943==o||127946<=o&&o<=127948||128066<=o&&o<=128067||128070<=o&&o<=128080||128110==o||128112<=o&&o<=128120||128124==o||128129<=o&&o<=128131||128133<=o&&o<=128135||128170==o||128372<=o&&o<=128373||128378==o||128400==o||128405<=o&&o<=128406||128581<=o&&o<=128583||128587<=o&&o<=128591||128675==o||128692<=o&&o<=128694||128704==o||128716==o||129304<=o&&o<=129308||129310<=o&&o<=129311||129318==o||129328<=o&&o<=129337||129341<=o&&o<=129342||129489<=o&&o<=129501?r:127995<=o&&o<=127999?14:8205==o?15:9792==o||9794==o||9877<=o&&o<=9878||9992==o||10084==o||127752==o||127806==o||127859==o||127891==o||127908==o||127912==o||127979==o||127981==o||128139==o||128187<=o&&o<=128188||128295==o||128300==o||128488==o||128640==o||128658==o?n:128102<=o&&o<=128105?s:11}return this.nextBreak=function(t,e){if(void 0===e&&(e=0),e<0)return 0;if(e>=t.length-1)return t.length;for(var i,r,n=l(o(t,e)),s=[],u=e+1;u<t.length;u++)if(r=u-1,!(55296<=(i=t).charCodeAt(r)&&i.charCodeAt(r)<=56319&&56320<=i.charCodeAt(r+1)&&i.charCodeAt(r+1)<=57343)){var c=l(o(t,u));if(a(n,s,c))return u;s.push(c)}return t.length},this.splitGraphemes=function(t){for(var e,i=[],r=0;(e=this.nextBreak(t,r))<t.length;)i.push(t.slice(r,e)),r=e;return r<t.length&&i.push(t.slice(r)),i},this.iterateGraphemes=function(t){var e=0,i={next:function(){var i,r;return(r=this.nextBreak(t,e))<t.length?(i=t.slice(e,r),e=r,{value:i,done:!1}):e<t.length?(i=t.slice(e),e=t.length,{value:i,done:!1}):{value:void 0,done:!0}}.bind(this)};return"undefined"!=typeof Symbol&&Symbol.iterator&&(i[Symbol.iterator]=function(){return i}),i},this.countGraphemes=function(t){for(var e,i=0,r=0;(e=this.nextBreak(t,r))<t.length;)r=e,i++;return r<t.length&&i++,i},this}class Xi{static setNumberAdapter(t,e){let i=pe();qt(t)?"number"===t?i=pe():["decimal.js","decimaljs"].includes(t)&&(i=((t={precision:1e3})=>{const e=Qi.clone(t);return{create:t=>(qt(t)&&!Gi.test(t)&&(t=0),new e(t)),add:(t,e)=>t.plus(e),sub:(t,e)=>t.minus(e),mul:(t,e)=>t.times(e),div:(t,e)=>t.div(e),compare:(t,e)=>t.cmp(e),eq:(t,e)=>t.eq(e),gt:(t,e)=>t.gt(e),gte:(t,e)=>t.gte(e),lt:(t,e)=>t.lt(e),lte:(t,e)=>t.lte(e),isInteger:t=>t.isInteger(),isNegative:t=>t.isNegative(),isPositive:t=>t.isPositive(),isZero:t=>t.isZero(),isNaN:t=>t.isNaN(),isFinite:t=>t.isFinite(),abs:t=>t.abs(),ceil:t=>t.ceil(),floor:t=>t.floor(),round:t=>t.round(),max:(t,i)=>e.max(t,i),min:(t,i)=>e.min(t,i),toNumber:t=>t.toNumber(),toString:t=>t.toFixed()}})(e)):i=t,Xi.NUMBER_ADAPTER=i}static setStringAdapter(t){let e=Ki();qt(t)?"string"===t?e=Ki():"intl-segmenter"===t?e=(t=>{const e=new Intl.Segmenter(t,{granularity:"grapheme"});return{stringToChars:t=>Array.from(e.segment(t)).map((t=>t.segment))}})():"grapheme-splitter"===t&&(e=(()=>{const t=new Ji;return{stringToChars:e=>t.splitGraphemes(e)}})()):e=t,Xi.STRING_ADAPTER=e}}Xi.NUMBER_ADAPTER=pe(),Xi.STRING_ADAPTER=Ki(),Xi.VALUE_CONVERTER={fromAttribute:t=>t,toAttribute:t=>Yt(t)?t:Xi.NUMBER_ADAPTER.toString(t)};const tr=t=>{class i extends t{get value(){return this.numberAdapter.create(this.__value)}set value(t){t=Xi.NUMBER_ADAPTER.create(Yt(t)||qt(t)&&""===t.trim()?0:t);const e=this.__value;this.__value=t,this.numberAdapter.eq(this.__value,e)||this.requestUpdate("value",e)}get oldValue(){return this.numberAdapter.create(this.__oldValue)}set oldValue(t){const e=this.__oldValue;this.__oldValue=t,this.requestUpdate("oldValue",e)}get initialValue(){return Yt(this.__initialValue)?this.__initialValue:this.numberAdapter.create(this.__initialValue)}set initialValue(t){const e=this.__initialValue;this.__initialValue=t,this.requestUpdate("initialValue",e)}get locale(){return this.__locale}set locale(t){const e=this.__locale;this.__locale=t,this.requestUpdate("locale",e),this.localeInstance=qt(this.__locale)?new Intl.Locale(this.__locale):new Intl.Locale(...this.__locale)}constructor(...t){super(...t),this.__value=Xi.NUMBER_ADAPTER.create(0),this.__oldValue=Xi.NUMBER_ADAPTER.create(0),this.__initialValue=null,this.__locale="en-US",this.localeInstance=qt(this.locale)?new Intl.Locale(this.locale):new Intl.Locale(...this.locale),this.direction="up",this.oldDirection=this.direction,this.numberAdapter=Xi.NUMBER_ADAPTER,this.stringAdapter=Xi.STRING_ADAPTER}willUpdate(t){super.willUpdate(t),t.has("value")&&!t.has("oldValue")&&(this.oldValue=t.get("value")??this.value),this.oldDirection=this.direction,this.numberAdapter.eq(this.value,this.oldValue)||(this.direction=this.numberAdapter.gt(this.value,this.oldValue)?"down":"up")}connectedCallback(){super.connectedCallback(),this.oldValue=function(t){return null!=t}(this.initialValue)?this.initialValue:this.value}}return e([dt({attribute:"value",reflect:!0,converter:{toAttribute:Xi.VALUE_CONVERTER.toAttribute},noAccessor:!0})],i.prototype,"value",null),e([dt({attribute:"old-value",reflect:!0,converter:Xi.VALUE_CONVERTER,noAccessor:!0})],i.prototype,"oldValue",null),e([dt({attribute:"initial-value",reflect:!0,converter:Xi.VALUE_CONVERTER,noAccessor:!0})],i.prototype,"initialValue",null),e([dt({converter:t=>{if(Yt(t))return t;try{return JSON.parse(t)}catch(e){return t}},reflect:!0,noAccessor:!0})],i.prototype,"locale",null),e([pt()],i.prototype,"direction",void 0),e([pt()],i.prototype,"oldDirection",void 0),i},er=l`
73
+ */;var fe,me,ge=9e15,ye=1e9,_e="0123456789abcdef",ve="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",be="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",we={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-9e15,maxE:ge,crypto:!1},Ae=!0,$e="[DecimalError] ",Se=$e+"Invalid argument: ",xe=$e+"Precision limit exceeded",Ne=$e+"crypto unavailable",Oe="[object Decimal]",Te=Math.floor,Ee=Math.pow,De=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Ce=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Pe=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Me=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ke=1e7,Ie=ve.length-1,Re=be.length-1,Ue={toStringTag:Oe};function Le(t){var e,i,r,n=t.length-1,s="",o=t[0];if(n>0){for(s+=o,e=1;e<n;e++)(i=7-(r=t[e]+"").length)&&(s+=Qe(i)),s+=r;(i=7-(r=(o=t[e])+"").length)&&(s+=Qe(i))}else if(0===o)return"0";for(;o%10==0;)o/=10;return s+o}function je(t,e,i){if(t!==~~t||t<e||t>i)throw Error(Se+t)}function Ve(t,e,i,r){var n,s,o,a;for(s=t[0];s>=10;s/=10)--e;return--e<0?(e+=7,n=0):(n=Math.ceil((e+1)/7),e%=7),s=Ee(10,7-e),a=t[n]%s|0,null==r?e<3?(0==e?a=a/100|0:1==e&&(a=a/10|0),o=i<4&&99999==a||i>3&&49999==a||5e4==a||0==a):o=(i<4&&a+1==s||i>3&&a+1==s/2)&&(t[n+1]/s/100|0)==Ee(10,e-2)-1||(a==s/2||0==a)&&!(t[n+1]/s/100|0):e<4?(0==e?a=a/1e3|0:1==e?a=a/100|0:2==e&&(a=a/10|0),o=(r||i<4)&&9999==a||!r&&i>3&&4999==a):o=((r||i<4)&&a+1==s||!r&&i>3&&a+1==s/2)&&(t[n+1]/s/1e3|0)==Ee(10,e-3)-1,o}function Be(t,e,i){for(var r,n,s=[0],o=0,a=t.length;o<a;){for(n=s.length;n--;)s[n]*=e;for(s[0]+=_e.indexOf(t.charAt(o++)),r=0;r<s.length;r++)s[r]>i-1&&(void 0===s[r+1]&&(s[r+1]=0),s[r+1]+=s[r]/i|0,s[r]%=i)}return s.reverse()}Ue.absoluteValue=Ue.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),Fe(t)},Ue.ceil=function(){return Fe(new this.constructor(this),this.e+1,2)},Ue.clampedTo=Ue.clamp=function(t,e){var i=this,r=i.constructor;if(t=new r(t),e=new r(e),!t.s||!e.s)return new r(NaN);if(t.gt(e))throw Error(Se+e);return i.cmp(t)<0?t:i.cmp(e)>0?e:new r(i)},Ue.comparedTo=Ue.cmp=function(t){var e,i,r,n,s=this,o=s.d,a=(t=new s.constructor(t)).d,l=s.s,u=t.s;if(!o||!a)return l&&u?l!==u?l:o===a?0:!o^l<0?1:-1:NaN;if(!o[0]||!a[0])return o[0]?l:a[0]?-u:0;if(l!==u)return l;if(s.e!==t.e)return s.e>t.e^l<0?1:-1;for(e=0,i=(r=o.length)<(n=a.length)?r:n;e<i;++e)if(o[e]!==a[e])return o[e]>a[e]^l<0?1:-1;return r===n?0:r>n^l<0?1:-1},Ue.cosine=Ue.cos=function(){var t,e,i=this,r=i.constructor;return i.d?i.d[0]?(t=r.precision,e=r.rounding,r.precision=t+Math.max(i.e,i.sd())+7,r.rounding=1,i=function(t,e){var i,r,n;if(e.isZero())return e;(r=e.d.length)<32?n=(1/si(4,i=Math.ceil(r/3))).toString():(i=16,n="2.3283064365386962890625e-10"),t.precision+=i,e=ni(t,1,e.times(n),new t(1));for(var s=i;s--;){var o=e.times(e);e=o.times(o).minus(o).times(8).plus(1)}return t.precision-=i,e}(r,oi(r,i)),r.precision=t,r.rounding=e,Fe(2==me||3==me?i.neg():i,t,e,!0)):new r(1):new r(NaN)},Ue.cubeRoot=Ue.cbrt=function(){var t,e,i,r,n,s,o,a,l,u,c=this,h=c.constructor;if(!c.isFinite()||c.isZero())return new h(c);for(Ae=!1,(s=c.s*Ee(c.s*c,1/3))&&Math.abs(s)!=1/0?r=new h(s.toString()):(i=Le(c.d),(s=((t=c.e)-i.length+1)%3)&&(i+=1==s||-2==s?"0":"00"),s=Ee(i,1/3),t=Te((t+1)/3)-(t%3==(t<0?-1:2)),(r=new h(i=s==1/0?"5e"+t:(i=s.toExponential()).slice(0,i.indexOf("e")+1)+t)).s=c.s),o=(t=h.precision)+3;;)if(u=(l=(a=r).times(a).times(a)).plus(c),r=He(u.plus(c).times(a),u.plus(l),o+2,1),Le(a.d).slice(0,o)===(i=Le(r.d)).slice(0,o)){if("9999"!=(i=i.slice(o-3,o+1))&&(n||"4999"!=i)){+i&&(+i.slice(1)||"5"!=i.charAt(0))||(Fe(r,t+1,1),e=!r.times(r).times(r).eq(c));break}if(!n&&(Fe(a,t+1,0),a.times(a).times(a).eq(c))){r=a;break}o+=4,n=1}return Ae=!0,Fe(r,t,h.rounding,e)},Ue.decimalPlaces=Ue.dp=function(){var t,e=this.d,i=NaN;if(e){if(i=7*((t=e.length-1)-Te(this.e/7)),t=e[t])for(;t%10==0;t/=10)i--;i<0&&(i=0)}return i},Ue.dividedBy=Ue.div=function(t){return He(this,new this.constructor(t))},Ue.dividedToIntegerBy=Ue.divToInt=function(t){var e=this.constructor;return Fe(He(this,new e(t),0,1,1),e.precision,e.rounding)},Ue.equals=Ue.eq=function(t){return 0===this.cmp(t)},Ue.floor=function(){return Fe(new this.constructor(this),this.e+1,3)},Ue.greaterThan=Ue.gt=function(t){return this.cmp(t)>0},Ue.greaterThanOrEqualTo=Ue.gte=function(t){var e=this.cmp(t);return 1==e||0===e},Ue.hyperbolicCosine=Ue.cosh=function(){var t,e,i,r,n,s=this,o=s.constructor,a=new o(1);if(!s.isFinite())return new o(s.s?1/0:NaN);if(s.isZero())return a;i=o.precision,r=o.rounding,o.precision=i+Math.max(s.e,s.sd())+4,o.rounding=1,(n=s.d.length)<32?e=(1/si(4,t=Math.ceil(n/3))).toString():(t=16,e="2.3283064365386962890625e-10"),s=ni(o,1,s.times(e),new o(1),!0);for(var l,u=t,c=new o(8);u--;)l=s.times(s),s=a.minus(l.times(c.minus(l.times(c))));return Fe(s,o.precision=i,o.rounding=r,!0)},Ue.hyperbolicSine=Ue.sinh=function(){var t,e,i,r,n=this,s=n.constructor;if(!n.isFinite()||n.isZero())return new s(n);if(e=s.precision,i=s.rounding,s.precision=e+Math.max(n.e,n.sd())+4,s.rounding=1,(r=n.d.length)<3)n=ni(s,2,n,n,!0);else{t=(t=1.4*Math.sqrt(r))>16?16:0|t,n=ni(s,2,n=n.times(1/si(5,t)),n,!0);for(var o,a=new s(5),l=new s(16),u=new s(20);t--;)o=n.times(n),n=n.times(a.plus(o.times(l.times(o).plus(u))))}return s.precision=e,s.rounding=i,Fe(n,e,i,!0)},Ue.hyperbolicTangent=Ue.tanh=function(){var t,e,i=this,r=i.constructor;return i.isFinite()?i.isZero()?new r(i):(t=r.precision,e=r.rounding,r.precision=t+7,r.rounding=1,He(i.sinh(),i.cosh(),r.precision=t,r.rounding=e)):new r(i.s)},Ue.inverseCosine=Ue.acos=function(){var t,e=this,i=e.constructor,r=e.abs().cmp(1),n=i.precision,s=i.rounding;return-1!==r?0===r?e.isNeg()?Ze(i,n,s):new i(0):new i(NaN):e.isZero()?Ze(i,n+4,s).times(.5):(i.precision=n+6,i.rounding=1,e=e.asin(),t=Ze(i,n+4,s).times(.5),i.precision=n,i.rounding=s,t.minus(e))},Ue.inverseHyperbolicCosine=Ue.acosh=function(){var t,e,i=this,r=i.constructor;return i.lte(1)?new r(i.eq(1)?0:NaN):i.isFinite()?(t=r.precision,e=r.rounding,r.precision=t+Math.max(Math.abs(i.e),i.sd())+4,r.rounding=1,Ae=!1,i=i.times(i).minus(1).sqrt().plus(i),Ae=!0,r.precision=t,r.rounding=e,i.ln()):new r(i)},Ue.inverseHyperbolicSine=Ue.asinh=function(){var t,e,i=this,r=i.constructor;return!i.isFinite()||i.isZero()?new r(i):(t=r.precision,e=r.rounding,r.precision=t+2*Math.max(Math.abs(i.e),i.sd())+6,r.rounding=1,Ae=!1,i=i.times(i).plus(1).sqrt().plus(i),Ae=!0,r.precision=t,r.rounding=e,i.ln())},Ue.inverseHyperbolicTangent=Ue.atanh=function(){var t,e,i,r,n=this,s=n.constructor;return n.isFinite()?n.e>=0?new s(n.abs().eq(1)?n.s/0:n.isZero()?n:NaN):(t=s.precision,e=s.rounding,r=n.sd(),Math.max(r,t)<2*-n.e-1?Fe(new s(n),t,e,!0):(s.precision=i=r-n.e,n=He(n.plus(1),new s(1).minus(n),i+t,1),s.precision=t+4,s.rounding=1,n=n.ln(),s.precision=t,s.rounding=e,n.times(.5))):new s(NaN)},Ue.inverseSine=Ue.asin=function(){var t,e,i,r,n=this,s=n.constructor;return n.isZero()?new s(n):(e=n.abs().cmp(1),i=s.precision,r=s.rounding,-1!==e?0===e?((t=Ze(s,i+4,r).times(.5)).s=n.s,t):new s(NaN):(s.precision=i+6,s.rounding=1,n=n.div(new s(1).minus(n.times(n)).sqrt().plus(1)).atan(),s.precision=i,s.rounding=r,n.times(2)))},Ue.inverseTangent=Ue.atan=function(){var t,e,i,r,n,s,o,a,l,u=this,c=u.constructor,h=c.precision,d=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&h+4<=Re)return(o=Ze(c,h+4,d).times(.25)).s=u.s,o}else{if(!u.s)return new c(NaN);if(h+4<=Re)return(o=Ze(c,h+4,d).times(.5)).s=u.s,o}for(c.precision=a=h+10,c.rounding=1,t=i=Math.min(28,a/7+2|0);t;--t)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(Ae=!1,e=Math.ceil(a/7),r=1,l=u.times(u),o=new c(u),n=u;-1!==t;)if(n=n.times(l),s=o.minus(n.div(r+=2)),n=n.times(l),void 0!==(o=s.plus(n.div(r+=2))).d[e])for(t=e;o.d[t]===s.d[t]&&t--;);return i&&(o=o.times(2<<i-1)),Ae=!0,Fe(o,c.precision=h,c.rounding=d,!0)},Ue.isFinite=function(){return!!this.d},Ue.isInteger=Ue.isInt=function(){return!!this.d&&Te(this.e/7)>this.d.length-2},Ue.isNaN=function(){return!this.s},Ue.isNegative=Ue.isNeg=function(){return this.s<0},Ue.isPositive=Ue.isPos=function(){return this.s>0},Ue.isZero=function(){return!!this.d&&0===this.d[0]},Ue.lessThan=Ue.lt=function(t){return this.cmp(t)<0},Ue.lessThanOrEqualTo=Ue.lte=function(t){return this.cmp(t)<1},Ue.logarithm=Ue.log=function(t){var e,i,r,n,s,o,a,l,u=this,c=u.constructor,h=c.precision,d=c.rounding;if(null==t)t=new c(10),e=!0;else{if(i=(t=new c(t)).d,t.s<0||!i||!i[0]||t.eq(1))return new c(NaN);e=t.eq(10)}if(i=u.d,u.s<0||!i||!i[0]||u.eq(1))return new c(i&&!i[0]?-1/0:1!=u.s?NaN:i?0:1/0);if(e)if(i.length>1)s=!0;else{for(n=i[0];n%10==0;)n/=10;s=1!==n}if(Ae=!1,o=ti(u,a=h+5),r=e?Ye(c,a+10):ti(t,a),Ve((l=He(o,r,a,1)).d,n=h,d))do{if(o=ti(u,a+=10),r=e?Ye(c,a+10):ti(t,a),l=He(o,r,a,1),!s){+Le(l.d).slice(n+1,n+15)+1==1e14&&(l=Fe(l,h+1,0));break}}while(Ve(l.d,n+=10,d));return Ae=!0,Fe(l,h,d)},Ue.minus=Ue.sub=function(t){var e,i,r,n,s,o,a,l,u,c,h,d,p=this,f=p.constructor;if(t=new f(t),!p.d||!t.d)return p.s&&t.s?p.d?t.s=-t.s:t=new f(t.d||p.s!==t.s?p:NaN):t=new f(NaN),t;if(p.s!=t.s)return t.s=-t.s,p.plus(t);if(u=p.d,d=t.d,a=f.precision,l=f.rounding,!u[0]||!d[0]){if(d[0])t.s=-t.s;else{if(!u[0])return new f(3===l?-0:0);t=new f(p)}return Ae?Fe(t,a,l):t}if(i=Te(t.e/7),c=Te(p.e/7),u=u.slice(),s=c-i){for((h=s<0)?(e=u,s=-s,o=d.length):(e=d,i=c,o=u.length),s>(r=Math.max(Math.ceil(a/7),o)+2)&&(s=r,e.length=1),e.reverse(),r=s;r--;)e.push(0);e.reverse()}else{for((h=(r=u.length)<(o=d.length))&&(o=r),r=0;r<o;r++)if(u[r]!=d[r]){h=u[r]<d[r];break}s=0}for(h&&(e=u,u=d,d=e,t.s=-t.s),o=u.length,r=d.length-o;r>0;--r)u[o++]=0;for(r=d.length;r>s;){if(u[--r]<d[r]){for(n=r;n&&0===u[--n];)u[n]=ke-1;--u[n],u[r]+=ke}u[r]-=d[r]}for(;0===u[--o];)u.pop();for(;0===u[0];u.shift())--i;return u[0]?(t.d=u,t.e=ze(u,i),Ae?Fe(t,a,l):t):new f(3===l?-0:0)},Ue.modulo=Ue.mod=function(t){var e,i=this,r=i.constructor;return t=new r(t),!i.d||!t.s||t.d&&!t.d[0]?new r(NaN):!t.d||i.d&&!i.d[0]?Fe(new r(i),r.precision,r.rounding):(Ae=!1,9==r.modulo?(e=He(i,t.abs(),0,3,1)).s*=t.s:e=He(i,t,0,r.modulo,1),e=e.times(t),Ae=!0,i.minus(e))},Ue.naturalExponential=Ue.exp=function(){return Xe(this)},Ue.naturalLogarithm=Ue.ln=function(){return ti(this)},Ue.negated=Ue.neg=function(){var t=new this.constructor(this);return t.s=-t.s,Fe(t)},Ue.plus=Ue.add=function(t){var e,i,r,n,s,o,a,l,u,c,h=this,d=h.constructor;if(t=new d(t),!h.d||!t.d)return h.s&&t.s?h.d||(t=new d(t.d||h.s===t.s?h:NaN)):t=new d(NaN),t;if(h.s!=t.s)return t.s=-t.s,h.minus(t);if(u=h.d,c=t.d,a=d.precision,l=d.rounding,!u[0]||!c[0])return c[0]||(t=new d(h)),Ae?Fe(t,a,l):t;if(s=Te(h.e/7),r=Te(t.e/7),u=u.slice(),n=s-r){for(n<0?(i=u,n=-n,o=c.length):(i=c,r=s,o=u.length),n>(o=(s=Math.ceil(a/7))>o?s+1:o+1)&&(n=o,i.length=1),i.reverse();n--;)i.push(0);i.reverse()}for((o=u.length)-(n=c.length)<0&&(n=o,i=c,c=u,u=i),e=0;n;)e=(u[--n]=u[n]+c[n]+e)/ke|0,u[n]%=ke;for(e&&(u.unshift(e),++r),o=u.length;0==u[--o];)u.pop();return t.d=u,t.e=ze(u,r),Ae?Fe(t,a,l):t},Ue.precision=Ue.sd=function(t){var e,i=this;if(void 0!==t&&t!==!!t&&1!==t&&0!==t)throw Error(Se+t);return i.d?(e=We(i.d),t&&i.e+1>e&&(e=i.e+1)):e=NaN,e},Ue.round=function(){var t=this,e=t.constructor;return Fe(new e(t),t.e+1,e.rounding)},Ue.sine=Ue.sin=function(){var t,e,i=this,r=i.constructor;return i.isFinite()?i.isZero()?new r(i):(t=r.precision,e=r.rounding,r.precision=t+Math.max(i.e,i.sd())+7,r.rounding=1,i=function(t,e){var i,r=e.d.length;if(r<3)return e.isZero()?e:ni(t,2,e,e);i=(i=1.4*Math.sqrt(r))>16?16:0|i,e=e.times(1/si(5,i)),e=ni(t,2,e,e);for(var n,s=new t(5),o=new t(16),a=new t(20);i--;)n=e.times(e),e=e.times(s.plus(n.times(o.times(n).minus(a))));return e}(r,oi(r,i)),r.precision=t,r.rounding=e,Fe(me>2?i.neg():i,t,e,!0)):new r(NaN)},Ue.squareRoot=Ue.sqrt=function(){var t,e,i,r,n,s,o=this,a=o.d,l=o.e,u=o.s,c=o.constructor;if(1!==u||!a||!a[0])return new c(!u||u<0&&(!a||a[0])?NaN:a?o:1/0);for(Ae=!1,0==(u=Math.sqrt(+o))||u==1/0?(((e=Le(a)).length+l)%2==0&&(e+="0"),u=Math.sqrt(e),l=Te((l+1)/2)-(l<0||l%2),r=new c(e=u==1/0?"5e"+l:(e=u.toExponential()).slice(0,e.indexOf("e")+1)+l)):r=new c(u.toString()),i=(l=c.precision)+3;;)if(r=(s=r).plus(He(o,s,i+2,1)).times(.5),Le(s.d).slice(0,i)===(e=Le(r.d)).slice(0,i)){if("9999"!=(e=e.slice(i-3,i+1))&&(n||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(Fe(r,l+1,1),t=!r.times(r).eq(o));break}if(!n&&(Fe(s,l+1,0),s.times(s).eq(o))){r=s;break}i+=4,n=1}return Ae=!0,Fe(r,l,c.rounding,t)},Ue.tangent=Ue.tan=function(){var t,e,i=this,r=i.constructor;return i.isFinite()?i.isZero()?new r(i):(t=r.precision,e=r.rounding,r.precision=t+10,r.rounding=1,(i=i.sin()).s=1,i=He(i,new r(1).minus(i.times(i)).sqrt(),t+10,0),r.precision=t,r.rounding=e,Fe(2==me||4==me?i.neg():i,t,e,!0)):new r(NaN)},Ue.times=Ue.mul=function(t){var e,i,r,n,s,o,a,l,u,c=this,h=c.constructor,d=c.d,p=(t=new h(t)).d;if(t.s*=c.s,!(d&&d[0]&&p&&p[0]))return new h(!t.s||d&&!d[0]&&!p||p&&!p[0]&&!d?NaN:d&&p?0*t.s:t.s/0);for(i=Te(c.e/7)+Te(t.e/7),(l=d.length)<(u=p.length)&&(s=d,d=p,p=s,o=l,l=u,u=o),s=[],r=o=l+u;r--;)s.push(0);for(r=u;--r>=0;){for(e=0,n=l+r;n>r;)a=s[n]+p[r]*d[n-r-1]+e,s[n--]=a%ke|0,e=a/ke|0;s[n]=(s[n]+e)%ke|0}for(;!s[--o];)s.pop();return e?++i:s.shift(),t.d=s,t.e=ze(s,i),Ae?Fe(t,h.precision,h.rounding):t},Ue.toBinary=function(t,e){return ai(this,2,t,e)},Ue.toDecimalPlaces=Ue.toDP=function(t,e){var i=this,r=i.constructor;return i=new r(i),void 0===t?i:(je(t,0,ye),void 0===e?e=r.rounding:je(e,0,8),Fe(i,t+i.e+1,e))},Ue.toExponential=function(t,e){var i,r=this,n=r.constructor;return void 0===t?i=qe(r,!0):(je(t,0,ye),void 0===e?e=n.rounding:je(e,0,8),i=qe(r=Fe(new n(r),t+1,e),!0,t+1)),r.isNeg()&&!r.isZero()?"-"+i:i},Ue.toFixed=function(t,e){var i,r,n=this,s=n.constructor;return void 0===t?i=qe(n):(je(t,0,ye),void 0===e?e=s.rounding:je(e,0,8),i=qe(r=Fe(new s(n),t+n.e+1,e),!1,t+r.e+1)),n.isNeg()&&!n.isZero()?"-"+i:i},Ue.toFraction=function(t){var e,i,r,n,s,o,a,l,u,c,h,d,p=this,f=p.d,m=p.constructor;if(!f)return new m(p);if(u=i=new m(1),r=l=new m(0),o=(s=(e=new m(r)).e=We(f)-p.e-1)%7,e.d[0]=Ee(10,o<0?7+o:o),null==t)t=s>0?e:u;else{if(!(a=new m(t)).isInt()||a.lt(u))throw Error(Se+a);t=a.gt(e)?s>0?e:u:a}for(Ae=!1,a=new m(Le(f)),c=m.precision,m.precision=s=7*f.length*2;h=He(a,e,0,1,1),1!=(n=i.plus(h.times(r))).cmp(t);)i=r,r=n,n=u,u=l.plus(h.times(n)),l=n,n=e,e=a.minus(h.times(n)),a=n;return n=He(t.minus(i),r,0,1,1),l=l.plus(n.times(u)),i=i.plus(n.times(r)),l.s=u.s=p.s,d=He(u,r,s,1).minus(p).abs().cmp(He(l,i,s,1).minus(p).abs())<1?[u,r]:[l,i],m.precision=c,Ae=!0,d},Ue.toHexadecimal=Ue.toHex=function(t,e){return ai(this,16,t,e)},Ue.toNearest=function(t,e){var i=this,r=i.constructor;if(i=new r(i),null==t){if(!i.d)return i;t=new r(1),e=r.rounding}else{if(t=new r(t),void 0===e?e=r.rounding:je(e,0,8),!i.d)return t.s?i:t;if(!t.d)return t.s&&(t.s=i.s),t}return t.d[0]?(Ae=!1,i=He(i,t,0,e,1).times(t),Ae=!0,Fe(i)):(t.s=i.s,i=t),i},Ue.toNumber=function(){return+this},Ue.toOctal=function(t,e){return ai(this,8,t,e)},Ue.toPower=Ue.pow=function(t){var e,i,r,n,s,o,a=this,l=a.constructor,u=+(t=new l(t));if(!(a.d&&t.d&&a.d[0]&&t.d[0]))return new l(Ee(+a,u));if((a=new l(a)).eq(1))return a;if(r=l.precision,s=l.rounding,t.eq(1))return Fe(a,r,s);if((e=Te(t.e/7))>=t.d.length-1&&(i=u<0?-u:u)<=9007199254740991)return n=Ge(l,a,i,r),t.s<0?new l(1).div(n):Fe(n,r,s);if((o=a.s)<0){if(e<t.d.length-1)return new l(NaN);if(1&t.d[e]||(o=1),0==a.e&&1==a.d[0]&&1==a.d.length)return a.s=o,a}return(e=0!=(i=Ee(+a,u))&&isFinite(i)?new l(i+"").e:Te(u*(Math.log("0."+Le(a.d))/Math.LN10+a.e+1)))>l.maxE+1||e<l.minE-1?new l(e>0?o/0:0):(Ae=!1,l.rounding=a.s=1,i=Math.min(12,(e+"").length),(n=Xe(t.times(ti(a,r+i)),r)).d&&Ve((n=Fe(n,r+5,1)).d,r,s)&&(e=r+10,+Le((n=Fe(Xe(t.times(ti(a,e+i)),e),e+5,1)).d).slice(r+1,r+15)+1==1e14&&(n=Fe(n,r+1,0))),n.s=o,Ae=!0,l.rounding=s,Fe(n,r,s))},Ue.toPrecision=function(t,e){var i,r=this,n=r.constructor;return void 0===t?i=qe(r,r.e<=n.toExpNeg||r.e>=n.toExpPos):(je(t,1,ye),void 0===e?e=n.rounding:je(e,0,8),i=qe(r=Fe(new n(r),t,e),t<=r.e||r.e<=n.toExpNeg,t)),r.isNeg()&&!r.isZero()?"-"+i:i},Ue.toSignificantDigits=Ue.toSD=function(t,e){var i=this.constructor;return void 0===t?(t=i.precision,e=i.rounding):(je(t,1,ye),void 0===e?e=i.rounding:je(e,0,8)),Fe(new i(this),t,e)},Ue.toString=function(){var t=this,e=t.constructor,i=qe(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+i:i},Ue.truncated=Ue.trunc=function(){return Fe(new this.constructor(this),this.e+1,1)},Ue.valueOf=Ue.toJSON=function(){var t=this,e=t.constructor,i=qe(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+i:i};var He=function(){function t(t,e,i){var r,n=0,s=t.length;for(t=t.slice();s--;)r=t[s]*e+n,t[s]=r%i|0,n=r/i|0;return n&&t.unshift(n),t}function e(t,e,i,r){var n,s;if(i!=r)s=i>r?1:-1;else for(n=s=0;n<i;n++)if(t[n]!=e[n]){s=t[n]>e[n]?1:-1;break}return s}function i(t,e,i,r){for(var n=0;i--;)t[i]-=n,n=t[i]<e[i]?1:0,t[i]=n*r+t[i]-e[i];for(;!t[0]&&t.length>1;)t.shift()}return function(r,n,s,o,a,l){var u,c,h,d,p,f,m,g,y,_,v,b,w,A,$,S,x,N,O,T,E=r.constructor,D=r.s==n.s?1:-1,C=r.d,P=n.d;if(!(C&&C[0]&&P&&P[0]))return new E(r.s&&n.s&&(C?!P||C[0]!=P[0]:P)?C&&0==C[0]||!P?0*D:D/0:NaN);for(l?(p=1,c=r.e-n.e):(l=ke,p=7,c=Te(r.e/p)-Te(n.e/p)),O=P.length,x=C.length,_=(y=new E(D)).d=[],h=0;P[h]==(C[h]||0);h++);if(P[h]>(C[h]||0)&&c--,null==s?(A=s=E.precision,o=E.rounding):A=a?s+(r.e-n.e)+1:s,A<0)_.push(1),f=!0;else{if(A=A/p+2|0,h=0,1==O){for(d=0,P=P[0],A++;(h<x||d)&&A--;h++)$=d*l+(C[h]||0),_[h]=$/P|0,d=$%P|0;f=d||h<x}else{for((d=l/(P[0]+1)|0)>1&&(P=t(P,d,l),C=t(C,d,l),O=P.length,x=C.length),S=O,b=(v=C.slice(0,O)).length;b<O;)v[b++]=0;(T=P.slice()).unshift(0),N=P[0],P[1]>=l/2&&++N;do{d=0,(u=e(P,v,O,b))<0?(w=v[0],O!=b&&(w=w*l+(v[1]||0)),(d=w/N|0)>1?(d>=l&&(d=l-1),1==(u=e(m=t(P,d,l),v,g=m.length,b=v.length))&&(d--,i(m,O<g?T:P,g,l))):(0==d&&(u=d=1),m=P.slice()),(g=m.length)<b&&m.unshift(0),i(v,m,b,l),-1==u&&(u=e(P,v,O,b=v.length))<1&&(d++,i(v,O<b?T:P,b,l)),b=v.length):0===u&&(d++,v=[0]),_[h++]=d,u&&v[0]?v[b++]=C[S]||0:(v=[C[S]],b=1)}while((S++<x||void 0!==v[0])&&A--);f=void 0!==v[0]}_[0]||_.shift()}if(1==p)y.e=c,fe=f;else{for(h=1,d=_[0];d>=10;d/=10)h++;y.e=h+c*p-1,Fe(y,a?s+y.e+1:s,o,f)}return y}}();function Fe(t,e,i,r){var n,s,o,a,l,u,c,h,d,p=t.constructor;t:if(null!=e){if(!(h=t.d))return t;for(n=1,a=h[0];a>=10;a/=10)n++;if((s=e-n)<0)s+=7,o=e,l=(c=h[d=0])/Ee(10,n-o-1)%10|0;else if((d=Math.ceil((s+1)/7))>=(a=h.length)){if(!r)break t;for(;a++<=d;)h.push(0);c=l=0,n=1,o=(s%=7)-7+1}else{for(c=a=h[d],n=1;a>=10;a/=10)n++;l=(o=(s%=7)-7+n)<0?0:c/Ee(10,n-o-1)%10|0}if(r=r||e<0||void 0!==h[d+1]||(o<0?c:c%Ee(10,n-o-1)),u=i<4?(l||r)&&(0==i||i==(t.s<0?3:2)):l>5||5==l&&(4==i||r||6==i&&(s>0?o>0?c/Ee(10,n-o):0:h[d-1])%10&1||i==(t.s<0?8:7)),e<1||!h[0])return h.length=0,u?(e-=t.e+1,h[0]=Ee(10,(7-e%7)%7),t.e=-e||0):h[0]=t.e=0,t;if(0==s?(h.length=d,a=1,d--):(h.length=d+1,a=Ee(10,7-s),h[d]=o>0?(c/Ee(10,n-o)%Ee(10,o)|0)*a:0),u)for(;;){if(0==d){for(s=1,o=h[0];o>=10;o/=10)s++;for(o=h[0]+=a,a=1;o>=10;o/=10)a++;s!=a&&(t.e++,h[0]==ke&&(h[0]=1));break}if(h[d]+=a,h[d]!=ke)break;h[d--]=0,a=1}for(s=h.length;0===h[--s];)h.pop()}return Ae&&(t.e>p.maxE?(t.d=null,t.e=NaN):t.e<p.minE&&(t.e=0,t.d=[0])),t}function qe(t,e,i){if(!t.isFinite())return ei(t);var r,n=t.e,s=Le(t.d),o=s.length;return e?(i&&(r=i-o)>0?s=s.charAt(0)+"."+s.slice(1)+Qe(r):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(t.e<0?"e":"e+")+t.e):n<0?(s="0."+Qe(-n-1)+s,i&&(r=i-o)>0&&(s+=Qe(r))):n>=o?(s+=Qe(n+1-o),i&&(r=i-n-1)>0&&(s=s+"."+Qe(r))):((r=n+1)<o&&(s=s.slice(0,r)+"."+s.slice(r)),i&&(r=i-o)>0&&(n+1===o&&(s+="."),s+=Qe(r))),s}function ze(t,e){var i=t[0];for(e*=7;i>=10;i/=10)e++;return e}function Ye(t,e,i){if(e>Ie)throw Ae=!0,i&&(t.precision=i),Error(xe);return Fe(new t(ve),e,1,!0)}function Ze(t,e,i){if(e>Re)throw Error(xe);return Fe(new t(be),e,i,!0)}function We(t){var e=t.length-1,i=7*e+1;if(e=t[e]){for(;e%10==0;e/=10)i--;for(e=t[0];e>=10;e/=10)i++}return i}function Qe(t){for(var e="";t--;)e+="0";return e}function Ge(t,e,i,r){var n,s=new t(1),o=Math.ceil(r/7+4);for(Ae=!1;;){if(i%2&&li((s=s.times(e)).d,o)&&(n=!0),0===(i=Te(i/2))){i=s.d.length-1,n&&0===s.d[i]&&++s.d[i];break}li((e=e.times(e)).d,o)}return Ae=!0,s}function Ke(t){return 1&t.d[t.d.length-1]}function Je(t,e,i){for(var r,n=new t(e[0]),s=0;++s<e.length;){if(!(r=new t(e[s])).s){n=r;break}n[i](r)&&(n=r)}return n}function Xe(t,e){var i,r,n,s,o,a,l,u=0,c=0,h=0,d=t.constructor,p=d.rounding,f=d.precision;if(!t.d||!t.d[0]||t.e>17)return new d(t.d?t.d[0]?t.s<0?0:1/0:1:t.s?t.s<0?0:t:NaN);for(null==e?(Ae=!1,l=f):l=e,a=new d(.03125);t.e>-2;)t=t.times(a),h+=5;for(l+=r=Math.log(Ee(2,h))/Math.LN10*2+5|0,i=s=o=new d(1),d.precision=l;;){if(s=Fe(s.times(t),l,1),i=i.times(++c),Le((a=o.plus(He(s,i,l,1))).d).slice(0,l)===Le(o.d).slice(0,l)){for(n=h;n--;)o=Fe(o.times(o),l,1);if(null!=e)return d.precision=f,o;if(!(u<3&&Ve(o.d,l-r,p,u)))return Fe(o,d.precision=f,p,Ae=!0);d.precision=l+=10,i=s=a=new d(1),c=0,u++}o=a}}function ti(t,e){var i,r,n,s,o,a,l,u,c,h,d,p=1,f=t,m=f.d,g=f.constructor,y=g.rounding,_=g.precision;if(f.s<0||!m||!m[0]||!f.e&&1==m[0]&&1==m.length)return new g(m&&!m[0]?-1/0:1!=f.s?NaN:m?0:f);if(null==e?(Ae=!1,c=_):c=e,g.precision=c+=10,r=(i=Le(m)).charAt(0),!(Math.abs(s=f.e)<15e14))return u=Ye(g,c+2,_).times(s+""),f=ti(new g(r+"."+i.slice(1)),c-10).plus(u),g.precision=_,null==e?Fe(f,_,y,Ae=!0):f;for(;r<7&&1!=r||1==r&&i.charAt(1)>3;)r=(i=Le((f=f.times(t)).d)).charAt(0),p++;for(s=f.e,r>1?(f=new g("0."+i),s++):f=new g(r+"."+i.slice(1)),h=f,l=o=f=He(f.minus(1),f.plus(1),c,1),d=Fe(f.times(f),c,1),n=3;;){if(o=Fe(o.times(d),c,1),Le((u=l.plus(He(o,new g(n),c,1))).d).slice(0,c)===Le(l.d).slice(0,c)){if(l=l.times(2),0!==s&&(l=l.plus(Ye(g,c+2,_).times(s+""))),l=He(l,new g(p),c,1),null!=e)return g.precision=_,l;if(!Ve(l.d,c-10,y,a))return Fe(l,g.precision=_,y,Ae=!0);g.precision=c+=10,u=o=f=He(h.minus(1),h.plus(1),c,1),d=Fe(f.times(f),c,1),n=a=1}l=u,n+=2}}function ei(t){return String(t.s*t.s/0)}function ii(t,e){var i,r,n;for((i=e.indexOf("."))>-1&&(e=e.replace(".","")),(r=e.search(/e/i))>0?(i<0&&(i=r),i+=+e.slice(r+1),e=e.substring(0,r)):i<0&&(i=e.length),r=0;48===e.charCodeAt(r);r++);for(n=e.length;48===e.charCodeAt(n-1);--n);if(e=e.slice(r,n)){if(n-=r,t.e=i=i-r-1,t.d=[],r=(i+1)%7,i<0&&(r+=7),r<n){for(r&&t.d.push(+e.slice(0,r)),n-=7;r<n;)t.d.push(+e.slice(r,r+=7));r=7-(e=e.slice(r)).length}else r-=n;for(;r--;)e+="0";t.d.push(+e),Ae&&(t.e>t.constructor.maxE?(t.d=null,t.e=NaN):t.e<t.constructor.minE&&(t.e=0,t.d=[0]))}else t.e=0,t.d=[0];return t}function ri(t,e){var i,r,n,s,o,a,l,u,c;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),Me.test(e))return ii(t,e)}else if("Infinity"===e||"NaN"===e)return+e||(t.s=NaN),t.e=NaN,t.d=null,t;if(Ce.test(e))i=16,e=e.toLowerCase();else if(De.test(e))i=2;else{if(!Pe.test(e))throw Error(Se+e);i=8}for((s=e.search(/p/i))>0?(l=+e.slice(s+1),e=e.substring(2,s)):e=e.slice(2),o=(s=e.indexOf("."))>=0,r=t.constructor,o&&(s=(a=(e=e.replace(".","")).length)-s,n=Ge(r,new r(i),s,2*s)),s=c=(u=Be(e,i,ke)).length-1;0===u[s];--s)u.pop();return s<0?new r(0*t.s):(t.e=ze(u,c),t.d=u,Ae=!1,o&&(t=He(t,n,4*a)),l&&(t=t.times(Math.abs(l)<54?Ee(2,l):Qi.pow(2,l))),Ae=!0,t)}function ni(t,e,i,r,n){var s,o,a,l,u=t.precision,c=Math.ceil(u/7);for(Ae=!1,l=i.times(i),a=new t(r);;){if(o=He(a.times(l),new t(e++*e++),u,1),a=n?r.plus(o):r.minus(o),r=He(o.times(l),new t(e++*e++),u,1),void 0!==(o=a.plus(r)).d[c]){for(s=c;o.d[s]===a.d[s]&&s--;);if(-1==s)break}s=a,a=r,r=o,o=s}return Ae=!0,o.d.length=c+1,o}function si(t,e){for(var i=t;--e;)i*=t;return i}function oi(t,e){var i,r=e.s<0,n=Ze(t,t.precision,1),s=n.times(.5);if((e=e.abs()).lte(s))return me=r?4:1,e;if((i=e.divToInt(n)).isZero())me=r?3:2;else{if((e=e.minus(i.times(n))).lte(s))return me=Ke(i)?r?2:3:r?4:1,e;me=Ke(i)?r?1:4:r?3:2}return e.minus(n).abs()}function ai(t,e,i,r){var n,s,o,a,l,u,c,h,d,p=t.constructor,f=void 0!==i;if(f?(je(i,1,ye),void 0===r?r=p.rounding:je(r,0,8)):(i=p.precision,r=p.rounding),t.isFinite()){for(f?(n=2,16==e?i=4*i-3:8==e&&(i=3*i-2)):n=e,(o=(c=qe(t)).indexOf("."))>=0&&(c=c.replace(".",""),(d=new p(1)).e=c.length-o,d.d=Be(qe(d),10,n),d.e=d.d.length),s=l=(h=Be(c,10,n)).length;0==h[--l];)h.pop();if(h[0]){if(o<0?s--:((t=new p(t)).d=h,t.e=s,h=(t=He(t,d,i,r,0,n)).d,s=t.e,u=fe),o=h[i],a=n/2,u=u||void 0!==h[i+1],u=r<4?(void 0!==o||u)&&(0===r||r===(t.s<0?3:2)):o>a||o===a&&(4===r||u||6===r&&1&h[i-1]||r===(t.s<0?8:7)),h.length=i,u)for(;++h[--i]>n-1;)h[i]=0,i||(++s,h.unshift(1));for(l=h.length;!h[l-1];--l);for(o=0,c="";o<l;o++)c+=_e.charAt(h[o]);if(f){if(l>1)if(16==e||8==e){for(o=16==e?4:3,--l;l%o;l++)c+="0";for(l=(h=Be(c,n,e)).length;!h[l-1];--l);for(o=1,c="1.";o<l;o++)c+=_e.charAt(h[o])}else c=c.charAt(0)+"."+c.slice(1);c=c+(s<0?"p":"p+")+s}else if(s<0){for(;++s;)c="0"+c;c="0."+c}else if(++s>l)for(s-=l;s--;)c+="0";else s<l&&(c=c.slice(0,s)+"."+c.slice(s))}else c=f?"0p+0":"0";c=(16==e?"0x":2==e?"0b":8==e?"0o":"")+c}else c=ei(t);return t.s<0?"-"+c:c}function li(t,e){if(t.length>e)return t.length=e,!0}function ui(t){return new this(t).abs()}function ci(t){return new this(t).acos()}function hi(t){return new this(t).acosh()}function di(t,e){return new this(t).plus(e)}function pi(t){return new this(t).asin()}function fi(t){return new this(t).asinh()}function mi(t){return new this(t).atan()}function gi(t){return new this(t).atanh()}function yi(t,e){t=new this(t),e=new this(e);var i,r=this.precision,n=this.rounding,s=r+4;return t.s&&e.s?t.d||e.d?!e.d||t.isZero()?(i=e.s<0?Ze(this,r,n):new this(0)).s=t.s:!t.d||e.isZero()?(i=Ze(this,s,1).times(.5)).s=t.s:e.s<0?(this.precision=s,this.rounding=1,i=this.atan(He(t,e,s,1)),e=Ze(this,s,1),this.precision=r,this.rounding=n,i=t.s<0?i.minus(e):i.plus(e)):i=this.atan(He(t,e,s,1)):(i=Ze(this,s,1).times(e.s>0?.25:.75)).s=t.s:i=new this(NaN),i}function _i(t){return new this(t).cbrt()}function vi(t){return Fe(t=new this(t),t.e+1,2)}function bi(t,e,i){return new this(t).clamp(e,i)}function wi(t){if(!t||"object"!=typeof t)throw Error($e+"Object expected");var e,i,r,n=!0===t.defaults,s=["precision",1,ye,"rounding",0,8,"toExpNeg",-9e15,0,"toExpPos",0,ge,"maxE",0,ge,"minE",-9e15,0,"modulo",0,9];for(e=0;e<s.length;e+=3)if(i=s[e],n&&(this[i]=we[i]),void 0!==(r=t[i])){if(!(Te(r)===r&&r>=s[e+1]&&r<=s[e+2]))throw Error(Se+i+": "+r);this[i]=r}if(i="crypto",n&&(this[i]=we[i]),void 0!==(r=t[i])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(Se+i+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(Ne);this[i]=!0}else this[i]=!1}return this}function Ai(t){return new this(t).cos()}function $i(t){return new this(t).cosh()}function Si(t,e){return new this(t).div(e)}function xi(t){return new this(t).exp()}function Ni(t){return Fe(t=new this(t),t.e+1,3)}function Oi(){var t,e,i=new this(0);for(Ae=!1,t=0;t<arguments.length;)if((e=new this(arguments[t++])).d)i.d&&(i=i.plus(e.times(e)));else{if(e.s)return Ae=!0,new this(1/0);i=e}return Ae=!0,i.sqrt()}function Ti(t){return t instanceof Qi||t&&t.toStringTag===Oe||!1}function Ei(t){return new this(t).ln()}function Di(t,e){return new this(t).log(e)}function Ci(t){return new this(t).log(2)}function Pi(t){return new this(t).log(10)}function Mi(){return Je(this,arguments,"lt")}function ki(){return Je(this,arguments,"gt")}function Ii(t,e){return new this(t).mod(e)}function Ri(t,e){return new this(t).mul(e)}function Ui(t,e){return new this(t).pow(e)}function Li(t){var e,i,r,n,s=0,o=new this(1),a=[];if(void 0===t?t=this.precision:je(t,1,ye),r=Math.ceil(t/7),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(r));s<r;)(n=e[s])>=429e7?e[s]=crypto.getRandomValues(new Uint32Array(1))[0]:a[s++]=n%1e7;else{if(!crypto.randomBytes)throw Error(Ne);for(e=crypto.randomBytes(r*=4);s<r;)(n=e[s]+(e[s+1]<<8)+(e[s+2]<<16)+((127&e[s+3])<<24))>=214e7?crypto.randomBytes(4).copy(e,s):(a.push(n%1e7),s+=4);s=r/4}else for(;s<r;)a[s++]=1e7*Math.random()|0;for(t%=7,(r=a[--s])&&t&&(n=Ee(10,7-t),a[s]=(r/n|0)*n);0===a[s];s--)a.pop();if(s<0)i=0,a=[0];else{for(i=-1;0===a[0];i-=7)a.shift();for(r=1,n=a[0];n>=10;n/=10)r++;r<7&&(i-=7-r)}return o.e=i,o.d=a,o}function ji(t){return Fe(t=new this(t),t.e+1,this.rounding)}function Vi(t){return(t=new this(t)).d?t.d[0]?t.s:0*t.s:t.s||NaN}function Bi(t){return new this(t).sin()}function Hi(t){return new this(t).sinh()}function Fi(t){return new this(t).sqrt()}function qi(t,e){return new this(t).sub(e)}function zi(){var t=0,e=arguments,i=new this(e[t]);for(Ae=!1;i.s&&++t<e.length;)i=i.plus(e[t]);return Ae=!0,Fe(i,this.precision,this.rounding)}function Yi(t){return new this(t).tan()}function Zi(t){return new this(t).tanh()}function Wi(t){return Fe(t=new this(t),t.e+1,1)}Ue[Symbol.for("nodejs.util.inspect.custom")]=Ue.toString,Ue[Symbol.toStringTag]="Decimal";var Qi=Ue.constructor=function t(e){var i,r,n;function s(t){var e,i,r,n=this;if(!(n instanceof s))return new s(t);if(n.constructor=s,Ti(t))return n.s=t.s,void(Ae?!t.d||t.e>s.maxE?(n.e=NaN,n.d=null):t.e<s.minE?(n.e=0,n.d=[0]):(n.e=t.e,n.d=t.d.slice()):(n.e=t.e,n.d=t.d?t.d.slice():t.d));if("number"==(r=typeof t)){if(0===t)return n.s=1/t<0?-1:1,n.e=0,void(n.d=[0]);if(t<0?(t=-t,n.s=-1):n.s=1,t===~~t&&t<1e7){for(e=0,i=t;i>=10;i/=10)e++;return void(Ae?e>s.maxE?(n.e=NaN,n.d=null):e<s.minE?(n.e=0,n.d=[0]):(n.e=e,n.d=[t]):(n.e=e,n.d=[t]))}return 0*t!=0?(t||(n.s=NaN),n.e=NaN,void(n.d=null)):ii(n,t.toString())}if("string"!==r)throw Error(Se+t);return 45===(i=t.charCodeAt(0))?(t=t.slice(1),n.s=-1):(43===i&&(t=t.slice(1)),n.s=1),Me.test(t)?ii(n,t):ri(n,t)}if(s.prototype=Ue,s.ROUND_UP=0,s.ROUND_DOWN=1,s.ROUND_CEIL=2,s.ROUND_FLOOR=3,s.ROUND_HALF_UP=4,s.ROUND_HALF_DOWN=5,s.ROUND_HALF_EVEN=6,s.ROUND_HALF_CEIL=7,s.ROUND_HALF_FLOOR=8,s.EUCLID=9,s.config=s.set=wi,s.clone=t,s.isDecimal=Ti,s.abs=ui,s.acos=ci,s.acosh=hi,s.add=di,s.asin=pi,s.asinh=fi,s.atan=mi,s.atanh=gi,s.atan2=yi,s.cbrt=_i,s.ceil=vi,s.clamp=bi,s.cos=Ai,s.cosh=$i,s.div=Si,s.exp=xi,s.floor=Ni,s.hypot=Oi,s.ln=Ei,s.log=Di,s.log10=Pi,s.log2=Ci,s.max=Mi,s.min=ki,s.mod=Ii,s.mul=Ri,s.pow=Ui,s.random=Li,s.round=ji,s.sign=Vi,s.sin=Bi,s.sinh=Hi,s.sqrt=Fi,s.sub=qi,s.sum=zi,s.tan=Yi,s.tanh=Zi,s.trunc=Wi,void 0===e&&(e={}),e&&!0!==e.defaults)for(n=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],i=0;i<n.length;)e.hasOwnProperty(r=n[i++])||(e[r]=this[r]);return s.config(e),s}(we);ve=new Qi(ve),be=new Qi(be);const Gi=/^-?\d+(\.\d+)?$/,Ki=()=>({stringToChars:t=>Array.from(t)});function Ji(){var t=3,e=4,i=12,r=13,n=16,s=17;function o(t,e){void 0===e&&(e=0);var i=t.charCodeAt(e);if(55296<=i&&i<=56319&&e<t.length-1){var r=i;return 56320<=(n=t.charCodeAt(e+1))&&n<=57343?1024*(r-55296)+(n-56320)+65536:r}if(56320<=i&&i<=57343&&e>=1){var n=i;return 55296<=(r=t.charCodeAt(e-1))&&r<=56319?1024*(r-55296)+(n-56320)+65536:n}return i}function a(o,a,l){var u=[o].concat(a).concat([l]),c=u[u.length-2],h=l,d=u.lastIndexOf(14);if(d>1&&u.slice(1,d).every((function(e){return e==t}))&&-1==[t,r,s].indexOf(o))return 2;var p=u.lastIndexOf(e);if(p>0&&u.slice(1,p).every((function(t){return t==e}))&&-1==[i,e].indexOf(c))return u.filter((function(t){return t==e})).length%2==1?3:4;if(0==c&&1==h)return 0;if(2==c||0==c||1==c)return 14==h&&a.every((function(e){return e==t}))?2:1;if(2==h||0==h||1==h)return 1;if(6==c&&(6==h||7==h||9==h||10==h))return 0;if(!(9!=c&&7!=c||7!=h&&8!=h))return 0;if((10==c||8==c)&&8==h)return 0;if(h==t||15==h)return 0;if(5==h)return 0;if(c==i)return 0;var f=-1!=u.indexOf(t)?u.lastIndexOf(t)-1:u.length-2;return-1!=[r,s].indexOf(u[f])&&u.slice(f+1,-1).every((function(e){return e==t}))&&14==h||15==c&&-1!=[n,s].indexOf(h)?0:-1!=a.indexOf(e)?2:c==e&&h==e?0:1}function l(o){return 1536<=o&&o<=1541||1757==o||1807==o||2274==o||3406==o||69821==o||70082<=o&&o<=70083||72250==o||72326<=o&&o<=72329||73030==o?i:13==o?0:10==o?1:0<=o&&o<=9||11<=o&&o<=12||14<=o&&o<=31||127<=o&&o<=159||173==o||1564==o||6158==o||8203==o||8206<=o&&o<=8207||8232==o||8233==o||8234<=o&&o<=8238||8288<=o&&o<=8292||8293==o||8294<=o&&o<=8303||55296<=o&&o<=57343||65279==o||65520<=o&&o<=65528||65529<=o&&o<=65531||113824<=o&&o<=113827||119155<=o&&o<=119162||917504==o||917505==o||917506<=o&&o<=917535||917632<=o&&o<=917759||918e3<=o&&o<=921599?2:768<=o&&o<=879||1155<=o&&o<=1159||1160<=o&&o<=1161||1425<=o&&o<=1469||1471==o||1473<=o&&o<=1474||1476<=o&&o<=1477||1479==o||1552<=o&&o<=1562||1611<=o&&o<=1631||1648==o||1750<=o&&o<=1756||1759<=o&&o<=1764||1767<=o&&o<=1768||1770<=o&&o<=1773||1809==o||1840<=o&&o<=1866||1958<=o&&o<=1968||2027<=o&&o<=2035||2070<=o&&o<=2073||2075<=o&&o<=2083||2085<=o&&o<=2087||2089<=o&&o<=2093||2137<=o&&o<=2139||2260<=o&&o<=2273||2275<=o&&o<=2306||2362==o||2364==o||2369<=o&&o<=2376||2381==o||2385<=o&&o<=2391||2402<=o&&o<=2403||2433==o||2492==o||2494==o||2497<=o&&o<=2500||2509==o||2519==o||2530<=o&&o<=2531||2561<=o&&o<=2562||2620==o||2625<=o&&o<=2626||2631<=o&&o<=2632||2635<=o&&o<=2637||2641==o||2672<=o&&o<=2673||2677==o||2689<=o&&o<=2690||2748==o||2753<=o&&o<=2757||2759<=o&&o<=2760||2765==o||2786<=o&&o<=2787||2810<=o&&o<=2815||2817==o||2876==o||2878==o||2879==o||2881<=o&&o<=2884||2893==o||2902==o||2903==o||2914<=o&&o<=2915||2946==o||3006==o||3008==o||3021==o||3031==o||3072==o||3134<=o&&o<=3136||3142<=o&&o<=3144||3146<=o&&o<=3149||3157<=o&&o<=3158||3170<=o&&o<=3171||3201==o||3260==o||3263==o||3266==o||3270==o||3276<=o&&o<=3277||3285<=o&&o<=3286||3298<=o&&o<=3299||3328<=o&&o<=3329||3387<=o&&o<=3388||3390==o||3393<=o&&o<=3396||3405==o||3415==o||3426<=o&&o<=3427||3530==o||3535==o||3538<=o&&o<=3540||3542==o||3551==o||3633==o||3636<=o&&o<=3642||3655<=o&&o<=3662||3761==o||3764<=o&&o<=3769||3771<=o&&o<=3772||3784<=o&&o<=3789||3864<=o&&o<=3865||3893==o||3895==o||3897==o||3953<=o&&o<=3966||3968<=o&&o<=3972||3974<=o&&o<=3975||3981<=o&&o<=3991||3993<=o&&o<=4028||4038==o||4141<=o&&o<=4144||4146<=o&&o<=4151||4153<=o&&o<=4154||4157<=o&&o<=4158||4184<=o&&o<=4185||4190<=o&&o<=4192||4209<=o&&o<=4212||4226==o||4229<=o&&o<=4230||4237==o||4253==o||4957<=o&&o<=4959||5906<=o&&o<=5908||5938<=o&&o<=5940||5970<=o&&o<=5971||6002<=o&&o<=6003||6068<=o&&o<=6069||6071<=o&&o<=6077||6086==o||6089<=o&&o<=6099||6109==o||6155<=o&&o<=6157||6277<=o&&o<=6278||6313==o||6432<=o&&o<=6434||6439<=o&&o<=6440||6450==o||6457<=o&&o<=6459||6679<=o&&o<=6680||6683==o||6742==o||6744<=o&&o<=6750||6752==o||6754==o||6757<=o&&o<=6764||6771<=o&&o<=6780||6783==o||6832<=o&&o<=6845||6846==o||6912<=o&&o<=6915||6964==o||6966<=o&&o<=6970||6972==o||6978==o||7019<=o&&o<=7027||7040<=o&&o<=7041||7074<=o&&o<=7077||7080<=o&&o<=7081||7083<=o&&o<=7085||7142==o||7144<=o&&o<=7145||7149==o||7151<=o&&o<=7153||7212<=o&&o<=7219||7222<=o&&o<=7223||7376<=o&&o<=7378||7380<=o&&o<=7392||7394<=o&&o<=7400||7405==o||7412==o||7416<=o&&o<=7417||7616<=o&&o<=7673||7675<=o&&o<=7679||8204==o||8400<=o&&o<=8412||8413<=o&&o<=8416||8417==o||8418<=o&&o<=8420||8421<=o&&o<=8432||11503<=o&&o<=11505||11647==o||11744<=o&&o<=11775||12330<=o&&o<=12333||12334<=o&&o<=12335||12441<=o&&o<=12442||42607==o||42608<=o&&o<=42610||42612<=o&&o<=42621||42654<=o&&o<=42655||42736<=o&&o<=42737||43010==o||43014==o||43019==o||43045<=o&&o<=43046||43204<=o&&o<=43205||43232<=o&&o<=43249||43302<=o&&o<=43309||43335<=o&&o<=43345||43392<=o&&o<=43394||43443==o||43446<=o&&o<=43449||43452==o||43493==o||43561<=o&&o<=43566||43569<=o&&o<=43570||43573<=o&&o<=43574||43587==o||43596==o||43644==o||43696==o||43698<=o&&o<=43700||43703<=o&&o<=43704||43710<=o&&o<=43711||43713==o||43756<=o&&o<=43757||43766==o||44005==o||44008==o||44013==o||64286==o||65024<=o&&o<=65039||65056<=o&&o<=65071||65438<=o&&o<=65439||66045==o||66272==o||66422<=o&&o<=66426||68097<=o&&o<=68099||68101<=o&&o<=68102||68108<=o&&o<=68111||68152<=o&&o<=68154||68159==o||68325<=o&&o<=68326||69633==o||69688<=o&&o<=69702||69759<=o&&o<=69761||69811<=o&&o<=69814||69817<=o&&o<=69818||69888<=o&&o<=69890||69927<=o&&o<=69931||69933<=o&&o<=69940||70003==o||70016<=o&&o<=70017||70070<=o&&o<=70078||70090<=o&&o<=70092||70191<=o&&o<=70193||70196==o||70198<=o&&o<=70199||70206==o||70367==o||70371<=o&&o<=70378||70400<=o&&o<=70401||70460==o||70462==o||70464==o||70487==o||70502<=o&&o<=70508||70512<=o&&o<=70516||70712<=o&&o<=70719||70722<=o&&o<=70724||70726==o||70832==o||70835<=o&&o<=70840||70842==o||70845==o||70847<=o&&o<=70848||70850<=o&&o<=70851||71087==o||71090<=o&&o<=71093||71100<=o&&o<=71101||71103<=o&&o<=71104||71132<=o&&o<=71133||71219<=o&&o<=71226||71229==o||71231<=o&&o<=71232||71339==o||71341==o||71344<=o&&o<=71349||71351==o||71453<=o&&o<=71455||71458<=o&&o<=71461||71463<=o&&o<=71467||72193<=o&&o<=72198||72201<=o&&o<=72202||72243<=o&&o<=72248||72251<=o&&o<=72254||72263==o||72273<=o&&o<=72278||72281<=o&&o<=72283||72330<=o&&o<=72342||72344<=o&&o<=72345||72752<=o&&o<=72758||72760<=o&&o<=72765||72767==o||72850<=o&&o<=72871||72874<=o&&o<=72880||72882<=o&&o<=72883||72885<=o&&o<=72886||73009<=o&&o<=73014||73018==o||73020<=o&&o<=73021||73023<=o&&o<=73029||73031==o||92912<=o&&o<=92916||92976<=o&&o<=92982||94095<=o&&o<=94098||113821<=o&&o<=113822||119141==o||119143<=o&&o<=119145||119150<=o&&o<=119154||119163<=o&&o<=119170||119173<=o&&o<=119179||119210<=o&&o<=119213||119362<=o&&o<=119364||121344<=o&&o<=121398||121403<=o&&o<=121452||121461==o||121476==o||121499<=o&&o<=121503||121505<=o&&o<=121519||122880<=o&&o<=122886||122888<=o&&o<=122904||122907<=o&&o<=122913||122915<=o&&o<=122916||122918<=o&&o<=122922||125136<=o&&o<=125142||125252<=o&&o<=125258||917536<=o&&o<=917631||917760<=o&&o<=917999?t:127462<=o&&o<=127487?e:2307==o||2363==o||2366<=o&&o<=2368||2377<=o&&o<=2380||2382<=o&&o<=2383||2434<=o&&o<=2435||2495<=o&&o<=2496||2503<=o&&o<=2504||2507<=o&&o<=2508||2563==o||2622<=o&&o<=2624||2691==o||2750<=o&&o<=2752||2761==o||2763<=o&&o<=2764||2818<=o&&o<=2819||2880==o||2887<=o&&o<=2888||2891<=o&&o<=2892||3007==o||3009<=o&&o<=3010||3014<=o&&o<=3016||3018<=o&&o<=3020||3073<=o&&o<=3075||3137<=o&&o<=3140||3202<=o&&o<=3203||3262==o||3264<=o&&o<=3265||3267<=o&&o<=3268||3271<=o&&o<=3272||3274<=o&&o<=3275||3330<=o&&o<=3331||3391<=o&&o<=3392||3398<=o&&o<=3400||3402<=o&&o<=3404||3458<=o&&o<=3459||3536<=o&&o<=3537||3544<=o&&o<=3550||3570<=o&&o<=3571||3635==o||3763==o||3902<=o&&o<=3903||3967==o||4145==o||4155<=o&&o<=4156||4182<=o&&o<=4183||4228==o||6070==o||6078<=o&&o<=6085||6087<=o&&o<=6088||6435<=o&&o<=6438||6441<=o&&o<=6443||6448<=o&&o<=6449||6451<=o&&o<=6456||6681<=o&&o<=6682||6741==o||6743==o||6765<=o&&o<=6770||6916==o||6965==o||6971==o||6973<=o&&o<=6977||6979<=o&&o<=6980||7042==o||7073==o||7078<=o&&o<=7079||7082==o||7143==o||7146<=o&&o<=7148||7150==o||7154<=o&&o<=7155||7204<=o&&o<=7211||7220<=o&&o<=7221||7393==o||7410<=o&&o<=7411||7415==o||43043<=o&&o<=43044||43047==o||43136<=o&&o<=43137||43188<=o&&o<=43203||43346<=o&&o<=43347||43395==o||43444<=o&&o<=43445||43450<=o&&o<=43451||43453<=o&&o<=43456||43567<=o&&o<=43568||43571<=o&&o<=43572||43597==o||43755==o||43758<=o&&o<=43759||43765==o||44003<=o&&o<=44004||44006<=o&&o<=44007||44009<=o&&o<=44010||44012==o||69632==o||69634==o||69762==o||69808<=o&&o<=69810||69815<=o&&o<=69816||69932==o||70018==o||70067<=o&&o<=70069||70079<=o&&o<=70080||70188<=o&&o<=70190||70194<=o&&o<=70195||70197==o||70368<=o&&o<=70370||70402<=o&&o<=70403||70463==o||70465<=o&&o<=70468||70471<=o&&o<=70472||70475<=o&&o<=70477||70498<=o&&o<=70499||70709<=o&&o<=70711||70720<=o&&o<=70721||70725==o||70833<=o&&o<=70834||70841==o||70843<=o&&o<=70844||70846==o||70849==o||71088<=o&&o<=71089||71096<=o&&o<=71099||71102==o||71216<=o&&o<=71218||71227<=o&&o<=71228||71230==o||71340==o||71342<=o&&o<=71343||71350==o||71456<=o&&o<=71457||71462==o||72199<=o&&o<=72200||72249==o||72279<=o&&o<=72280||72343==o||72751==o||72766==o||72873==o||72881==o||72884==o||94033<=o&&o<=94078||119142==o||119149==o?5:4352<=o&&o<=4447||43360<=o&&o<=43388?6:4448<=o&&o<=4519||55216<=o&&o<=55238?7:4520<=o&&o<=4607||55243<=o&&o<=55291?8:44032==o||44060==o||44088==o||44116==o||44144==o||44172==o||44200==o||44228==o||44256==o||44284==o||44312==o||44340==o||44368==o||44396==o||44424==o||44452==o||44480==o||44508==o||44536==o||44564==o||44592==o||44620==o||44648==o||44676==o||44704==o||44732==o||44760==o||44788==o||44816==o||44844==o||44872==o||44900==o||44928==o||44956==o||44984==o||45012==o||45040==o||45068==o||45096==o||45124==o||45152==o||45180==o||45208==o||45236==o||45264==o||45292==o||45320==o||45348==o||45376==o||45404==o||45432==o||45460==o||45488==o||45516==o||45544==o||45572==o||45600==o||45628==o||45656==o||45684==o||45712==o||45740==o||45768==o||45796==o||45824==o||45852==o||45880==o||45908==o||45936==o||45964==o||45992==o||46020==o||46048==o||46076==o||46104==o||46132==o||46160==o||46188==o||46216==o||46244==o||46272==o||46300==o||46328==o||46356==o||46384==o||46412==o||46440==o||46468==o||46496==o||46524==o||46552==o||46580==o||46608==o||46636==o||46664==o||46692==o||46720==o||46748==o||46776==o||46804==o||46832==o||46860==o||46888==o||46916==o||46944==o||46972==o||47e3==o||47028==o||47056==o||47084==o||47112==o||47140==o||47168==o||47196==o||47224==o||47252==o||47280==o||47308==o||47336==o||47364==o||47392==o||47420==o||47448==o||47476==o||47504==o||47532==o||47560==o||47588==o||47616==o||47644==o||47672==o||47700==o||47728==o||47756==o||47784==o||47812==o||47840==o||47868==o||47896==o||47924==o||47952==o||47980==o||48008==o||48036==o||48064==o||48092==o||48120==o||48148==o||48176==o||48204==o||48232==o||48260==o||48288==o||48316==o||48344==o||48372==o||48400==o||48428==o||48456==o||48484==o||48512==o||48540==o||48568==o||48596==o||48624==o||48652==o||48680==o||48708==o||48736==o||48764==o||48792==o||48820==o||48848==o||48876==o||48904==o||48932==o||48960==o||48988==o||49016==o||49044==o||49072==o||49100==o||49128==o||49156==o||49184==o||49212==o||49240==o||49268==o||49296==o||49324==o||49352==o||49380==o||49408==o||49436==o||49464==o||49492==o||49520==o||49548==o||49576==o||49604==o||49632==o||49660==o||49688==o||49716==o||49744==o||49772==o||49800==o||49828==o||49856==o||49884==o||49912==o||49940==o||49968==o||49996==o||50024==o||50052==o||50080==o||50108==o||50136==o||50164==o||50192==o||50220==o||50248==o||50276==o||50304==o||50332==o||50360==o||50388==o||50416==o||50444==o||50472==o||50500==o||50528==o||50556==o||50584==o||50612==o||50640==o||50668==o||50696==o||50724==o||50752==o||50780==o||50808==o||50836==o||50864==o||50892==o||50920==o||50948==o||50976==o||51004==o||51032==o||51060==o||51088==o||51116==o||51144==o||51172==o||51200==o||51228==o||51256==o||51284==o||51312==o||51340==o||51368==o||51396==o||51424==o||51452==o||51480==o||51508==o||51536==o||51564==o||51592==o||51620==o||51648==o||51676==o||51704==o||51732==o||51760==o||51788==o||51816==o||51844==o||51872==o||51900==o||51928==o||51956==o||51984==o||52012==o||52040==o||52068==o||52096==o||52124==o||52152==o||52180==o||52208==o||52236==o||52264==o||52292==o||52320==o||52348==o||52376==o||52404==o||52432==o||52460==o||52488==o||52516==o||52544==o||52572==o||52600==o||52628==o||52656==o||52684==o||52712==o||52740==o||52768==o||52796==o||52824==o||52852==o||52880==o||52908==o||52936==o||52964==o||52992==o||53020==o||53048==o||53076==o||53104==o||53132==o||53160==o||53188==o||53216==o||53244==o||53272==o||53300==o||53328==o||53356==o||53384==o||53412==o||53440==o||53468==o||53496==o||53524==o||53552==o||53580==o||53608==o||53636==o||53664==o||53692==o||53720==o||53748==o||53776==o||53804==o||53832==o||53860==o||53888==o||53916==o||53944==o||53972==o||54e3==o||54028==o||54056==o||54084==o||54112==o||54140==o||54168==o||54196==o||54224==o||54252==o||54280==o||54308==o||54336==o||54364==o||54392==o||54420==o||54448==o||54476==o||54504==o||54532==o||54560==o||54588==o||54616==o||54644==o||54672==o||54700==o||54728==o||54756==o||54784==o||54812==o||54840==o||54868==o||54896==o||54924==o||54952==o||54980==o||55008==o||55036==o||55064==o||55092==o||55120==o||55148==o||55176==o?9:44033<=o&&o<=44059||44061<=o&&o<=44087||44089<=o&&o<=44115||44117<=o&&o<=44143||44145<=o&&o<=44171||44173<=o&&o<=44199||44201<=o&&o<=44227||44229<=o&&o<=44255||44257<=o&&o<=44283||44285<=o&&o<=44311||44313<=o&&o<=44339||44341<=o&&o<=44367||44369<=o&&o<=44395||44397<=o&&o<=44423||44425<=o&&o<=44451||44453<=o&&o<=44479||44481<=o&&o<=44507||44509<=o&&o<=44535||44537<=o&&o<=44563||44565<=o&&o<=44591||44593<=o&&o<=44619||44621<=o&&o<=44647||44649<=o&&o<=44675||44677<=o&&o<=44703||44705<=o&&o<=44731||44733<=o&&o<=44759||44761<=o&&o<=44787||44789<=o&&o<=44815||44817<=o&&o<=44843||44845<=o&&o<=44871||44873<=o&&o<=44899||44901<=o&&o<=44927||44929<=o&&o<=44955||44957<=o&&o<=44983||44985<=o&&o<=45011||45013<=o&&o<=45039||45041<=o&&o<=45067||45069<=o&&o<=45095||45097<=o&&o<=45123||45125<=o&&o<=45151||45153<=o&&o<=45179||45181<=o&&o<=45207||45209<=o&&o<=45235||45237<=o&&o<=45263||45265<=o&&o<=45291||45293<=o&&o<=45319||45321<=o&&o<=45347||45349<=o&&o<=45375||45377<=o&&o<=45403||45405<=o&&o<=45431||45433<=o&&o<=45459||45461<=o&&o<=45487||45489<=o&&o<=45515||45517<=o&&o<=45543||45545<=o&&o<=45571||45573<=o&&o<=45599||45601<=o&&o<=45627||45629<=o&&o<=45655||45657<=o&&o<=45683||45685<=o&&o<=45711||45713<=o&&o<=45739||45741<=o&&o<=45767||45769<=o&&o<=45795||45797<=o&&o<=45823||45825<=o&&o<=45851||45853<=o&&o<=45879||45881<=o&&o<=45907||45909<=o&&o<=45935||45937<=o&&o<=45963||45965<=o&&o<=45991||45993<=o&&o<=46019||46021<=o&&o<=46047||46049<=o&&o<=46075||46077<=o&&o<=46103||46105<=o&&o<=46131||46133<=o&&o<=46159||46161<=o&&o<=46187||46189<=o&&o<=46215||46217<=o&&o<=46243||46245<=o&&o<=46271||46273<=o&&o<=46299||46301<=o&&o<=46327||46329<=o&&o<=46355||46357<=o&&o<=46383||46385<=o&&o<=46411||46413<=o&&o<=46439||46441<=o&&o<=46467||46469<=o&&o<=46495||46497<=o&&o<=46523||46525<=o&&o<=46551||46553<=o&&o<=46579||46581<=o&&o<=46607||46609<=o&&o<=46635||46637<=o&&o<=46663||46665<=o&&o<=46691||46693<=o&&o<=46719||46721<=o&&o<=46747||46749<=o&&o<=46775||46777<=o&&o<=46803||46805<=o&&o<=46831||46833<=o&&o<=46859||46861<=o&&o<=46887||46889<=o&&o<=46915||46917<=o&&o<=46943||46945<=o&&o<=46971||46973<=o&&o<=46999||47001<=o&&o<=47027||47029<=o&&o<=47055||47057<=o&&o<=47083||47085<=o&&o<=47111||47113<=o&&o<=47139||47141<=o&&o<=47167||47169<=o&&o<=47195||47197<=o&&o<=47223||47225<=o&&o<=47251||47253<=o&&o<=47279||47281<=o&&o<=47307||47309<=o&&o<=47335||47337<=o&&o<=47363||47365<=o&&o<=47391||47393<=o&&o<=47419||47421<=o&&o<=47447||47449<=o&&o<=47475||47477<=o&&o<=47503||47505<=o&&o<=47531||47533<=o&&o<=47559||47561<=o&&o<=47587||47589<=o&&o<=47615||47617<=o&&o<=47643||47645<=o&&o<=47671||47673<=o&&o<=47699||47701<=o&&o<=47727||47729<=o&&o<=47755||47757<=o&&o<=47783||47785<=o&&o<=47811||47813<=o&&o<=47839||47841<=o&&o<=47867||47869<=o&&o<=47895||47897<=o&&o<=47923||47925<=o&&o<=47951||47953<=o&&o<=47979||47981<=o&&o<=48007||48009<=o&&o<=48035||48037<=o&&o<=48063||48065<=o&&o<=48091||48093<=o&&o<=48119||48121<=o&&o<=48147||48149<=o&&o<=48175||48177<=o&&o<=48203||48205<=o&&o<=48231||48233<=o&&o<=48259||48261<=o&&o<=48287||48289<=o&&o<=48315||48317<=o&&o<=48343||48345<=o&&o<=48371||48373<=o&&o<=48399||48401<=o&&o<=48427||48429<=o&&o<=48455||48457<=o&&o<=48483||48485<=o&&o<=48511||48513<=o&&o<=48539||48541<=o&&o<=48567||48569<=o&&o<=48595||48597<=o&&o<=48623||48625<=o&&o<=48651||48653<=o&&o<=48679||48681<=o&&o<=48707||48709<=o&&o<=48735||48737<=o&&o<=48763||48765<=o&&o<=48791||48793<=o&&o<=48819||48821<=o&&o<=48847||48849<=o&&o<=48875||48877<=o&&o<=48903||48905<=o&&o<=48931||48933<=o&&o<=48959||48961<=o&&o<=48987||48989<=o&&o<=49015||49017<=o&&o<=49043||49045<=o&&o<=49071||49073<=o&&o<=49099||49101<=o&&o<=49127||49129<=o&&o<=49155||49157<=o&&o<=49183||49185<=o&&o<=49211||49213<=o&&o<=49239||49241<=o&&o<=49267||49269<=o&&o<=49295||49297<=o&&o<=49323||49325<=o&&o<=49351||49353<=o&&o<=49379||49381<=o&&o<=49407||49409<=o&&o<=49435||49437<=o&&o<=49463||49465<=o&&o<=49491||49493<=o&&o<=49519||49521<=o&&o<=49547||49549<=o&&o<=49575||49577<=o&&o<=49603||49605<=o&&o<=49631||49633<=o&&o<=49659||49661<=o&&o<=49687||49689<=o&&o<=49715||49717<=o&&o<=49743||49745<=o&&o<=49771||49773<=o&&o<=49799||49801<=o&&o<=49827||49829<=o&&o<=49855||49857<=o&&o<=49883||49885<=o&&o<=49911||49913<=o&&o<=49939||49941<=o&&o<=49967||49969<=o&&o<=49995||49997<=o&&o<=50023||50025<=o&&o<=50051||50053<=o&&o<=50079||50081<=o&&o<=50107||50109<=o&&o<=50135||50137<=o&&o<=50163||50165<=o&&o<=50191||50193<=o&&o<=50219||50221<=o&&o<=50247||50249<=o&&o<=50275||50277<=o&&o<=50303||50305<=o&&o<=50331||50333<=o&&o<=50359||50361<=o&&o<=50387||50389<=o&&o<=50415||50417<=o&&o<=50443||50445<=o&&o<=50471||50473<=o&&o<=50499||50501<=o&&o<=50527||50529<=o&&o<=50555||50557<=o&&o<=50583||50585<=o&&o<=50611||50613<=o&&o<=50639||50641<=o&&o<=50667||50669<=o&&o<=50695||50697<=o&&o<=50723||50725<=o&&o<=50751||50753<=o&&o<=50779||50781<=o&&o<=50807||50809<=o&&o<=50835||50837<=o&&o<=50863||50865<=o&&o<=50891||50893<=o&&o<=50919||50921<=o&&o<=50947||50949<=o&&o<=50975||50977<=o&&o<=51003||51005<=o&&o<=51031||51033<=o&&o<=51059||51061<=o&&o<=51087||51089<=o&&o<=51115||51117<=o&&o<=51143||51145<=o&&o<=51171||51173<=o&&o<=51199||51201<=o&&o<=51227||51229<=o&&o<=51255||51257<=o&&o<=51283||51285<=o&&o<=51311||51313<=o&&o<=51339||51341<=o&&o<=51367||51369<=o&&o<=51395||51397<=o&&o<=51423||51425<=o&&o<=51451||51453<=o&&o<=51479||51481<=o&&o<=51507||51509<=o&&o<=51535||51537<=o&&o<=51563||51565<=o&&o<=51591||51593<=o&&o<=51619||51621<=o&&o<=51647||51649<=o&&o<=51675||51677<=o&&o<=51703||51705<=o&&o<=51731||51733<=o&&o<=51759||51761<=o&&o<=51787||51789<=o&&o<=51815||51817<=o&&o<=51843||51845<=o&&o<=51871||51873<=o&&o<=51899||51901<=o&&o<=51927||51929<=o&&o<=51955||51957<=o&&o<=51983||51985<=o&&o<=52011||52013<=o&&o<=52039||52041<=o&&o<=52067||52069<=o&&o<=52095||52097<=o&&o<=52123||52125<=o&&o<=52151||52153<=o&&o<=52179||52181<=o&&o<=52207||52209<=o&&o<=52235||52237<=o&&o<=52263||52265<=o&&o<=52291||52293<=o&&o<=52319||52321<=o&&o<=52347||52349<=o&&o<=52375||52377<=o&&o<=52403||52405<=o&&o<=52431||52433<=o&&o<=52459||52461<=o&&o<=52487||52489<=o&&o<=52515||52517<=o&&o<=52543||52545<=o&&o<=52571||52573<=o&&o<=52599||52601<=o&&o<=52627||52629<=o&&o<=52655||52657<=o&&o<=52683||52685<=o&&o<=52711||52713<=o&&o<=52739||52741<=o&&o<=52767||52769<=o&&o<=52795||52797<=o&&o<=52823||52825<=o&&o<=52851||52853<=o&&o<=52879||52881<=o&&o<=52907||52909<=o&&o<=52935||52937<=o&&o<=52963||52965<=o&&o<=52991||52993<=o&&o<=53019||53021<=o&&o<=53047||53049<=o&&o<=53075||53077<=o&&o<=53103||53105<=o&&o<=53131||53133<=o&&o<=53159||53161<=o&&o<=53187||53189<=o&&o<=53215||53217<=o&&o<=53243||53245<=o&&o<=53271||53273<=o&&o<=53299||53301<=o&&o<=53327||53329<=o&&o<=53355||53357<=o&&o<=53383||53385<=o&&o<=53411||53413<=o&&o<=53439||53441<=o&&o<=53467||53469<=o&&o<=53495||53497<=o&&o<=53523||53525<=o&&o<=53551||53553<=o&&o<=53579||53581<=o&&o<=53607||53609<=o&&o<=53635||53637<=o&&o<=53663||53665<=o&&o<=53691||53693<=o&&o<=53719||53721<=o&&o<=53747||53749<=o&&o<=53775||53777<=o&&o<=53803||53805<=o&&o<=53831||53833<=o&&o<=53859||53861<=o&&o<=53887||53889<=o&&o<=53915||53917<=o&&o<=53943||53945<=o&&o<=53971||53973<=o&&o<=53999||54001<=o&&o<=54027||54029<=o&&o<=54055||54057<=o&&o<=54083||54085<=o&&o<=54111||54113<=o&&o<=54139||54141<=o&&o<=54167||54169<=o&&o<=54195||54197<=o&&o<=54223||54225<=o&&o<=54251||54253<=o&&o<=54279||54281<=o&&o<=54307||54309<=o&&o<=54335||54337<=o&&o<=54363||54365<=o&&o<=54391||54393<=o&&o<=54419||54421<=o&&o<=54447||54449<=o&&o<=54475||54477<=o&&o<=54503||54505<=o&&o<=54531||54533<=o&&o<=54559||54561<=o&&o<=54587||54589<=o&&o<=54615||54617<=o&&o<=54643||54645<=o&&o<=54671||54673<=o&&o<=54699||54701<=o&&o<=54727||54729<=o&&o<=54755||54757<=o&&o<=54783||54785<=o&&o<=54811||54813<=o&&o<=54839||54841<=o&&o<=54867||54869<=o&&o<=54895||54897<=o&&o<=54923||54925<=o&&o<=54951||54953<=o&&o<=54979||54981<=o&&o<=55007||55009<=o&&o<=55035||55037<=o&&o<=55063||55065<=o&&o<=55091||55093<=o&&o<=55119||55121<=o&&o<=55147||55149<=o&&o<=55175||55177<=o&&o<=55203?10:9757==o||9977==o||9994<=o&&o<=9997||127877==o||127938<=o&&o<=127940||127943==o||127946<=o&&o<=127948||128066<=o&&o<=128067||128070<=o&&o<=128080||128110==o||128112<=o&&o<=128120||128124==o||128129<=o&&o<=128131||128133<=o&&o<=128135||128170==o||128372<=o&&o<=128373||128378==o||128400==o||128405<=o&&o<=128406||128581<=o&&o<=128583||128587<=o&&o<=128591||128675==o||128692<=o&&o<=128694||128704==o||128716==o||129304<=o&&o<=129308||129310<=o&&o<=129311||129318==o||129328<=o&&o<=129337||129341<=o&&o<=129342||129489<=o&&o<=129501?r:127995<=o&&o<=127999?14:8205==o?15:9792==o||9794==o||9877<=o&&o<=9878||9992==o||10084==o||127752==o||127806==o||127859==o||127891==o||127908==o||127912==o||127979==o||127981==o||128139==o||128187<=o&&o<=128188||128295==o||128300==o||128488==o||128640==o||128658==o?n:128102<=o&&o<=128105?s:11}return this.nextBreak=function(t,e){if(void 0===e&&(e=0),e<0)return 0;if(e>=t.length-1)return t.length;for(var i,r,n=l(o(t,e)),s=[],u=e+1;u<t.length;u++)if(r=u-1,!(55296<=(i=t).charCodeAt(r)&&i.charCodeAt(r)<=56319&&56320<=i.charCodeAt(r+1)&&i.charCodeAt(r+1)<=57343)){var c=l(o(t,u));if(a(n,s,c))return u;s.push(c)}return t.length},this.splitGraphemes=function(t){for(var e,i=[],r=0;(e=this.nextBreak(t,r))<t.length;)i.push(t.slice(r,e)),r=e;return r<t.length&&i.push(t.slice(r)),i},this.iterateGraphemes=function(t){var e=0,i={next:function(){var i,r;return(r=this.nextBreak(t,e))<t.length?(i=t.slice(e,r),e=r,{value:i,done:!1}):e<t.length?(i=t.slice(e),e=t.length,{value:i,done:!1}):{value:void 0,done:!0}}.bind(this)};return"undefined"!=typeof Symbol&&Symbol.iterator&&(i[Symbol.iterator]=function(){return i}),i},this.countGraphemes=function(t){for(var e,i=0,r=0;(e=this.nextBreak(t,r))<t.length;)r=e,i++;return r<t.length&&i++,i},this}class Xi{static setNumberAdapter(t,e){let i=pe();qt(t)?"number"===t?i=pe():["decimal.js","decimaljs"].includes(t)&&(i=((t={precision:1e3})=>{const e=Qi.clone(t);return{create:t=>(qt(t)&&!Gi.test(t)&&(t=0),new e(t)),add:(t,e)=>t.plus(e),sub:(t,e)=>t.minus(e),mul:(t,e)=>t.times(e),div:(t,e)=>t.div(e),compare:(t,e)=>t.cmp(e),eq:(t,e)=>t.eq(e),gt:(t,e)=>t.gt(e),gte:(t,e)=>t.gte(e),lt:(t,e)=>t.lt(e),lte:(t,e)=>t.lte(e),isInteger:t=>t.isInteger(),isNegative:t=>t.isNegative(),isPositive:t=>t.isPositive(),isZero:t=>t.isZero(),isNaN:t=>t.isNaN(),isFinite:t=>t.isFinite(),abs:t=>t.abs(),ceil:t=>t.ceil(),floor:t=>t.floor(),round:t=>t.round(),max:(t,i)=>e.max(t,i),min:(t,i)=>e.min(t,i),toNumber:t=>t.toNumber(),toString:t=>t.toFixed()}})(e)):i=t,Xi.NUMBER_ADAPTER=i}static setStringAdapter(t){let e=Ki();qt(t)?"string"===t?e=Ki():"intl-segmenter"===t?e=(t=>{const e=new Intl.Segmenter(t,{granularity:"grapheme"});return{stringToChars:t=>Array.from(e.segment(t)).map((t=>t.segment))}})():"grapheme-splitter"===t&&(e=(()=>{const t=new Ji;return{stringToChars:e=>t.splitGraphemes(e)}})()):e=t,Xi.STRING_ADAPTER=e}}Xi.NUMBER_ADAPTER=pe(),Xi.STRING_ADAPTER=Ki(),Xi.VALUE_CONVERTER={fromAttribute:t=>t,toAttribute:t=>Yt(t)?t:Xi.NUMBER_ADAPTER.toString(t)};const tr=t=>{class i extends t{get value(){return this.numberAdapter.create(this.__value)}set value(t){t=Xi.NUMBER_ADAPTER.create(Yt(t)||qt(t)&&""===t.trim()?0:t);const e=this.__value;this.__value=t,this.numberAdapter.eq(this.__value,e)||this.requestUpdate("value",e)}get oldValue(){return this.numberAdapter.create(this.__oldValue)}set oldValue(t){const e=this.__oldValue;this.__oldValue=t,this.requestUpdate("oldValue",e)}get initialValue(){return Yt(this.__initialValue)?this.__initialValue:this.numberAdapter.create(this.__initialValue)}set initialValue(t){const e=this.__initialValue;this.__initialValue=t,this.requestUpdate("initialValue",e)}get locale(){return this.__locale}set locale(t){const e=this.__locale;this.__locale=t,this.requestUpdate("locale",e),this.localeInstance=qt(this.__locale)?new Intl.Locale(this.__locale):new Intl.Locale(...this.__locale)}constructor(...t){super(...t),this.__value=Xi.NUMBER_ADAPTER.create(0),this.__oldValue=Xi.NUMBER_ADAPTER.create(0),this.__initialValue=null,this.__locale="en-US",this.localeInstance=qt(this.locale)?new Intl.Locale(this.locale):new Intl.Locale(...this.locale),this.direction="up",this.oldDirection=this.direction,this.numberAdapter=Xi.NUMBER_ADAPTER,this.stringAdapter=Xi.STRING_ADAPTER}willUpdate(t){super.willUpdate(t),t.has("value")&&!t.has("oldValue")&&(this.oldValue=t.get("value")??this.value),this.oldDirection=this.direction,this.numberAdapter.eq(this.value,this.oldValue)||(this.direction=this.numberAdapter.gt(this.value,this.oldValue)?"down":"up")}connectedCallback(){super.connectedCallback(),this.oldValue=function(t){return null!=t}(this.initialValue)?this.initialValue:this.value}}return e([dt({attribute:"value",reflect:!0,converter:{toAttribute:Xi.VALUE_CONVERTER.toAttribute},noAccessor:!0})],i.prototype,"value",null),e([dt({attribute:"old-value",reflect:!0,converter:Xi.VALUE_CONVERTER,noAccessor:!0})],i.prototype,"oldValue",null),e([dt({attribute:"initial-value",reflect:!0,converter:Xi.VALUE_CONVERTER,noAccessor:!0})],i.prototype,"initialValue",null),e([dt({converter:t=>{if(Yt(t))return t;try{return JSON.parse(t)}catch(e){return t}},reflect:!0,noAccessor:!0})],i.prototype,"locale",null),e([pt()],i.prototype,"direction",void 0),e([pt()],i.prototype,"oldDirection",void 0),i},er=l`
74
74
  :host {
75
75
  position: relative;
76
76
  white-space: nowrap;
@@ -187,7 +187,7 @@ function ft(t,e){return(e,i,r)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Ref
187
187
  position: absolute;
188
188
  bottom: 100%;
189
189
  }
190
- `,ur=t=>t,cr=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t;function hr(t,e,i,r){if(t===e&&i===r)return ur;const n=e=>function(t,e,i,r,n){let s,o,a=0;do{o=e+(i-e)/2,s=cr(o,r,n)-t,s>0?i=o:e=o}while(Math.abs(s)>1e-7&&++a<12);return o}(e,0,1,t,i);return t=>0===t||1===t?t:cr(n(t),e,r)}const dr=hr(.12,0,.39,0),pr=hr(.61,1,.88,1),fr=hr(.37,0,.63,1),mr=hr(.11,0,.5,0),gr=hr(.5,1,.89,1),yr=hr(.45,0,.55,1),_r=hr(.32,0,.67,0),vr=hr(.33,1,.68,1),br=hr(.65,0,.35,1),wr=hr(.5,0,.75,0),Ar=hr(.25,1,.5,1),$r=hr(.76,0,.24,1),Sr=hr(.64,0,.78,0),xr=hr(.22,1,.36,1),Nr=hr(.83,0,.17,1),Or=hr(.7,0,.84,0),Er=hr(.16,1,.3,1),Tr=hr(.87,0,.13,1),Dr=hr(.55,0,1,.45),Cr=hr(0,.55,.45,1),Pr=hr(.85,0,.15,1),Mr=hr(.36,0,.66,-.56),kr=hr(.34,1.56,.64,1),Ir=hr(.68,-.6,.32,1.6);function Rr(t){const e=2*Math.PI/3;return 0===t?0:1===t?1:-(2**(10*t-10))*Math.sin((10*t-10.75)*e)}function Ur(t){const e=2*Math.PI/3;return 0===t?0:1===t?1:2**(-10*t)*Math.sin((10*t-.75)*e)+1}function Lr(t){const e=2*Math.PI/4.5;return 0===t?0:1===t?1:t<.5?-(2**(20*t-10))*Math.sin((20*t-11.125)*e)/2:2**(-20*t+10)*Math.sin((20*t-11.125)*e)/2+1}function jr(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375}function Vr(t){return 1-jr(1-t)}function Br(t){return t<.5?(1-jr(1-2*t))/2:(1+jr(2*t-1))/2}var Hr=Object.freeze({__proto__:null,easeInBack:Mr,easeInBounce:Vr,easeInCirc:Dr,easeInCubic:_r,easeInElastic:Rr,easeInExpo:Or,easeInOutBack:Ir,easeInOutBounce:Br,easeInOutCirc:Pr,easeInOutCubic:br,easeInOutElastic:Lr,easeInOutExpo:Tr,easeInOutQuad:yr,easeInOutQuart:$r,easeInOutQuint:Nr,easeInOutSine:fr,easeInQuad:mr,easeInQuart:wr,easeInQuint:Sr,easeInSine:dr,easeOutBack:kr,easeOutBounce:jr,easeOutCirc:Cr,easeOutCubic:vr,easeOutElastic:Ur,easeOutExpo:Er,easeOutQuad:gr,easeOutQuart:Ar,easeOutQuint:xr,easeOutSine:pr});class Fr extends Event{}let qr=class extends at{constructor(){super(),this.digit={data:[],place:0},this.preprocessData={animate:!0,cancelPrevAnimation:!1,earlyReturn:"",index:0,partIndex:0,digitIndex:0},this.direction="up",this.textStyle={},this.cellStyle=[],this.animationOptions={},this.keyframes={},this.digitWidth=0,this.resizeObserver=new ResizeObserver((()=>{this.digitWidth=(this.clonedRollDigitList?this.clonedRollDigitList.getBoundingClientRect():new DOMRect).width}))}firstUpdated(t){super.firstUpdated(t),this.clonedRollDigitList&&this.resizeObserver.observe(this.clonedRollDigitList)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.disconnect()}updated(t){super.updated(t),Jt(Array.from(t.keys()),["digit","preprocessData","direction","animationOptions","keyframes"]).length>0&&this.shouldAnimate()&&this.startAnimation().then()}render(){const t=this.cellStyle.map((t=>function(...t){return Mt(Ut,t)}(t,["position"])));return q`<span class="roller-part-digit">
190
+ `,ur=t=>t,cr=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t;function hr(t,e,i,r){if(t===e&&i===r)return ur;const n=e=>function(t,e,i,r,n){let s,o,a=0;do{o=e+(i-e)/2,s=cr(o,r,n)-t,s>0?i=o:e=o}while(Math.abs(s)>1e-7&&++a<12);return o}(e,0,1,t,i);return t=>0===t||1===t?t:cr(n(t),e,r)}const dr=hr(.12,0,.39,0),pr=hr(.61,1,.88,1),fr=hr(.37,0,.63,1),mr=hr(.11,0,.5,0),gr=hr(.5,1,.89,1),yr=hr(.45,0,.55,1),_r=hr(.32,0,.67,0),vr=hr(.33,1,.68,1),br=hr(.65,0,.35,1),wr=hr(.5,0,.75,0),Ar=hr(.25,1,.5,1),$r=hr(.76,0,.24,1),Sr=hr(.64,0,.78,0),xr=hr(.22,1,.36,1),Nr=hr(.83,0,.17,1),Or=hr(.7,0,.84,0),Tr=hr(.16,1,.3,1),Er=hr(.87,0,.13,1),Dr=hr(.55,0,1,.45),Cr=hr(0,.55,.45,1),Pr=hr(.85,0,.15,1),Mr=hr(.36,0,.66,-.56),kr=hr(.34,1.56,.64,1),Ir=hr(.68,-.6,.32,1.6);function Rr(t){const e=2*Math.PI/3;return 0===t?0:1===t?1:-(2**(10*t-10))*Math.sin((10*t-10.75)*e)}function Ur(t){const e=2*Math.PI/3;return 0===t?0:1===t?1:2**(-10*t)*Math.sin((10*t-.75)*e)+1}function Lr(t){const e=2*Math.PI/4.5;return 0===t?0:1===t?1:t<.5?-(2**(20*t-10))*Math.sin((20*t-11.125)*e)/2:2**(-20*t+10)*Math.sin((20*t-11.125)*e)/2+1}function jr(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375}function Vr(t){return 1-jr(1-t)}function Br(t){return t<.5?(1-jr(1-2*t))/2:(1+jr(2*t-1))/2}var Hr=Object.freeze({__proto__:null,easeInBack:Mr,easeInBounce:Vr,easeInCirc:Dr,easeInCubic:_r,easeInElastic:Rr,easeInExpo:Or,easeInOutBack:Ir,easeInOutBounce:Br,easeInOutCirc:Pr,easeInOutCubic:br,easeInOutElastic:Lr,easeInOutExpo:Er,easeInOutQuad:yr,easeInOutQuart:$r,easeInOutQuint:Nr,easeInOutSine:fr,easeInQuad:mr,easeInQuart:wr,easeInQuint:Sr,easeInSine:dr,easeOutBack:kr,easeOutBounce:jr,easeOutCirc:Cr,easeOutCubic:vr,easeOutElastic:Ur,easeOutExpo:Tr,easeOutQuad:gr,easeOutQuart:Ar,easeOutQuint:xr,easeOutSine:pr});class Fr extends Event{}let qr=class extends at{constructor(){super(),this.digit={data:[],place:0},this.preprocessData={animate:!0,cancelPrevAnimation:!1,earlyReturn:"",index:0,partIndex:0,digitIndex:0},this.direction="up",this.textStyle={},this.cellStyle=[],this.animationOptions={},this.keyframes={},this.digitWidth=0,this.resizeObserver=new ResizeObserver((()=>{this.digitWidth=(this.clonedRollDigitList?this.clonedRollDigitList.getBoundingClientRect():new DOMRect).width}))}firstUpdated(t){super.firstUpdated(t),this.clonedRollDigitList&&this.resizeObserver.observe(this.clonedRollDigitList)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.disconnect()}updated(t){super.updated(t),Jt(Array.from(t.keys()),["digit","preprocessData","direction","animationOptions","keyframes"]).length>0&&this.shouldAnimate()&&this.startAnimation().then()}render(){const t=this.cellStyle.map((t=>function(...t){return Mt(Ut,t)}(t,["position"])));return q`<span class="roller-part-digit">
191
191
  <!-- 占位 -->
192
192
  <span
193
193
  class="placeholder"
@@ -335,7 +335,7 @@ function ft(t,e){return(e,i,r)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Ref
335
335
  `}willUpdate(t){if(t.has("localeNumber")||t.has("locale")){this.localeNumberInstance=new Intl.NumberFormat(this.localeInstance,Wt(this.localeNumber)?{}:this.localeNumber);{const e=this.localeNumberInstance.formatToParts(123456.789),i=e.find((t=>"decimal"===t.type))?.value||".",r=e.find((t=>"group"===t.type))?.value||"";if(this.localDecimalSeparator!==i||this.localeGroupingSeparator!==r){this.localDecimalSeparator=i;const e=this.partsOptions;this.partsOptions={...e,decimalSeparator:this.localDecimalSeparator},t.set("partsOptions",e)}}}super.willUpdate(t)}},t.TimeredCounterNumber.styles=[...t.TimeredCounter.styles,Qr],e([dt({converter:t=>{if(Yt(t))return!1;try{return JSON.parse(t)}catch(t){return!0}},reflect:!0,attribute:"locale-number"})],t.TimeredCounterNumber.prototype,"localeNumber",void 0),e([pt()],t.TimeredCounterNumber.prototype,"localDecimalSeparator",void 0),e([pt()],t.TimeredCounterNumber.prototype,"localeGroupingSeparator",void 0),t.TimeredCounterNumber=e([ut("timered-counter-number")],t.TimeredCounterNumber);const Gr=l``
336
336
  /**
337
337
  * @license https://github.com/HarasimowiczKamil/any-base
338
- */;function Kr(t,e,i){return r=>function(t,e,i){let r,n,s,{length:o}=i;const a={},l=t.length,u=e.length,c=[];if(!function(t,e){for(const i of t)if(-1===e.indexOf(i))return!1;return!0}(i,t))throw new Error(`Number "${i}" contains of non-alphabetic digits (${t})`);if(Gt(t,e))return i.join("");for(r=0;r<o;r++)a[r]=t.indexOf(i[r]);do{for(n=0,s=0,r=0;r<o;r++)n=n*l+a[r],n>=u?(a[s++]=Math.floor(n/u),n%=u):s>0&&(a[s++]=0);o=s,c.push(e[n])}while(0!==s);return c.reverse().join("")}(t.stringToChars(e),t.stringToChars(i),t.stringToChars(r))}const Jr=" ";t.TimeredCounterString=class extends t.TimeredCounter{constructor(){super(...arguments),this.__alphabet="",this.__initialValueString="",this.__valueString="",this.__oldValueString="",this.__partsOptions=null,this.__decimalToAnyBase=Kr(this.stringAdapter,"0123456789",this.__alphabet),this.__anyBaseToDecimal=Kr(this.stringAdapter,this.__alphabet,"0123456789")}get initialValue(){return super.initialValue}set initialValue(t){if(!qt(t))try{t=t.toString()}catch(e){throw new Error(`value ${t} is not a string.`)}this.__initialValueString=t??"",zt(this.__initialValueString)?super.initialValue=this.numberAdapter.create(0):(this.__updateAlphabet(this.__valueString,this.__initialValueString),super.initialValue=this.numberAdapter.create(this.__anyBaseToDecimal(this.__initialValueString)),super.value=this.numberAdapter.create(this.__anyBaseToDecimal(this.__valueString)))}get value(){return super.value}set value(t){if(qt(t)){if(this.__valueString===t)return}else try{t=t.toString()}catch(e){throw new Error(`value ${t} is not a string.`)}this.__oldValueString=this.__valueString,this.__valueString=t??"",zt(this.__valueString)?super.value=this.numberAdapter.create(0):(this.__updateAlphabet(this.__valueString,this.__oldValueString),super.oldValue=this.numberAdapter.create(this.__anyBaseToDecimal(this.__oldValueString)),super.value=this.numberAdapter.create(this.__anyBaseToDecimal(this.__valueString)))}get partsOptions(){return super.partsOptions}set partsOptions(t){this.__partsOptions=t,super.partsOptions={type:"string",fillChar:Jr,...this.__partsOptions,digitToChar:{" ":Jr,...this.__partsOptions.digitToChar}}}__updateAlphabet(t,e){const i=zt(t)&&zt(e)?"":`\0${e??""}${t??""}`,r=new Set(this.stringAdapter.stringToChars(i));this.__alphabet=Array.from(r).sort().join("");const n=this.stringAdapter,s=this.__alphabet;this.__decimalToAnyBase=Kr(n,"0123456789",s),this.__anyBaseToDecimal=Kr(n,s,"0123456789")}sampleToString(t){return this.__decimalToAnyBase(this.numberAdapter.toString(t))}connectedCallback(){this.__updateAlphabet(this.__valueString,this.__initialValueString),this.initialValue=this.__initialValueString,this.value=this.__valueString,this.partsOptions=this.__partsOptions??{},super.connectedCallback()}},t.TimeredCounterString.styles=[...t.TimeredCounter.styles,Gr],t.TimeredCounterString=e([ut("timered-counter-string")],t.TimeredCounterString);const Xr=36e5,tn=Symbol.for("constructDateFrom");function en(t,e){return"function"==typeof t?t(e):t&&"object"==typeof t&&tn in t?t[tn](e):t instanceof Date?new t.constructor(e):new Date(e)}function rn(t,e){return en(t,t)}function nn(t,e,i){const r=rn(t);return isNaN(e)?en(t,NaN):e?(r.setDate(r.getDate()+e),r):r}function sn(t,e,i){const r=rn(t);if(isNaN(e))return en(t,NaN);if(!e)return r;const n=r.getDate(),s=en(t,r.getTime());s.setMonth(r.getMonth()+e+1,0);return n>=s.getDate()?s:(r.setFullYear(s.getFullYear(),s.getMonth(),n),r)}function on(t,e,i){return en(t,+rn(t)+e)}function an(t){const e=rn(t),i=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return i.setUTCFullYear(e.getFullYear()),+t-+i}function ln(t,...e){const i=en.bind(null,e.find((t=>"object"==typeof t)));return e.map(i)}function un(t,e){const i=rn(t);return i.setHours(0,0,0,0),i}function cn(t,e){const i=+rn(t)-+rn(e);return i<0?-1:i>0?1:i}function hn(t){return!(!((e=t)instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))&&"number"!=typeof t||isNaN(+rn(t)));var e}function dn(t,e,i){const[r,n]=ln(0,t,e),s=pn(r,n),o=Math.abs(function(t,e){const[i,r]=ln(0,t,e),n=un(i),s=un(r),o=+n-an(n),a=+s-an(s);return Math.round((o-a)/864e5)}(r,n));r.setDate(r.getDate()-s*o);const a=s*(o-Number(pn(r,n)===-s));return 0===a?0:a}function pn(t,e){const i=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return i<0?-1:i>0?1:i}function fn(t){return e=>{const i=(t?Math[t]:Math.trunc)(e);return 0===i?0:i}}function mn(t,e,i){const[r,n]=ln(0,t,e),s=(+r-+n)/Xr;return fn(i?.roundingMethod)(s)}function gn(t,e){return+rn(t)-+rn(e)}function yn(t,e,i){const r=gn(t,e)/6e4;return fn(i?.roundingMethod)(r)}function _n(t,e){const i=rn(t);return+function(t){const e=rn(t);return e.setHours(23,59,59,999),e}(i)==+function(t){const e=rn(t),i=e.getMonth();return e.setFullYear(e.getFullYear(),i+1,0),e.setHours(23,59,59,999),e}(i)}function vn(t,e,i){const[r,n,s]=ln(0,t,t,e),o=cn(n,s),a=Math.abs(function(t,e){const[i,r]=ln(0,t,e);return 12*(i.getFullYear()-r.getFullYear())+(i.getMonth()-r.getMonth())}(n,s));if(a<1)return 0;1===n.getMonth()&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-o*a);let l=cn(n,s)===-o;_n(r)&&1===a&&1===cn(r,s)&&(l=!1);const u=o*(a-+l);return 0===u?0:u}function bn(t,e,i){const r=vn(t,e)/3;return fn(i?.roundingMethod)(r)}function wn(t,e,i){const r=gn(t,e)/1e3;return fn(i?.roundingMethod)(r)}function An(t,e,i){const r=dn(t,e)/7;return fn(i?.roundingMethod)(r)}function $n(t,e,i){const[r,n]=ln(0,t,e),s=cn(r,n),o=Math.abs(function(t,e){const[i,r]=ln(0,t,e);return i.getFullYear()-r.getFullYear()}(r,n));r.setFullYear(1584),n.setFullYear(1584);const a=s*(o-+(cn(r,n)===-s));return 0===a?0:a}function Sn(t,e){return+rn(t)<+rn(e)}function xn(t,e,i){return nn(t,-e)}function Nn(t,e,i){return function(t,e){return on(t,e*Xr)}(t,-e)}function On(t,e,i){return on(t,-e)}function En(t,e,i){return function(t,e){const i=rn(t);return i.setTime(i.getTime()+6e4*e),i}(t,-e)}function Tn(t,e,i){return function(t,e){return sn(t,3*e)}(t,-e)}function Dn(t,e,i){return function(t,e){return on(t,1e3*e)}(t,-e)}function Cn(t,e,i){return function(t,e){return nn(t,7*e)}(t,-e)}function Pn(t,e,i){return function(t,e){return sn(t,12*e)}(t,-e)}var Mn;t.DurationPartType=void 0,(Mn=t.DurationPartType||(t.DurationPartType={})).Millisecond="millisecond",Mn.Second="second",Mn.Minute="minute",Mn.Hour="hour",Mn.Day="day",Mn.Week="weekOfYear",Mn.Month="month",Mn.Quarter="quarter",Mn.Year="year";const kn={[t.DurationPartType.Millisecond]:1,[t.DurationPartType.Second]:1e3,[t.DurationPartType.Minute]:6e4,[t.DurationPartType.Hour]:36e5,[t.DurationPartType.Day]:864e5,[t.DurationPartType.Week]:6048e5,[t.DurationPartType.Month]:26298e5,[t.DurationPartType.Quarter]:78894e5,[t.DurationPartType.Year]:315576e5},In={1:t.DurationPartType.Millisecond,1e3:t.DurationPartType.Second,6e4:t.DurationPartType.Minute,36e5:t.DurationPartType.Hour,864e5:t.DurationPartType.Day,6048e5:t.DurationPartType.Week,26298e5:t.DurationPartType.Month,78894e5:t.DurationPartType.Quarter,315576e5:t.DurationPartType.Year},Rn=["era","year","quarter","month","weekOfYear","weekday","day","dayPeriod","hour","minute","second","timeZoneName"];function Un(e,i,r){let n=i;const s={};for(const i of r){let r=0;switch(i){case t.DurationPartType.Year:r=$n(n,e),n=Pn(n,r);break;case t.DurationPartType.Quarter:r=bn(n,e),n=Tn(n,r);break;case t.DurationPartType.Month:r=vn(n,e),n=sn(n,-r);break;case t.DurationPartType.Week:r=An(n,e),n=Cn(n,r);break;case t.DurationPartType.Day:r=dn(n,e),n=xn(n,r);break;case t.DurationPartType.Hour:r=mn(n,e),n=Nn(n,r);break;case t.DurationPartType.Minute:r=yn(n,e),n=En(n,r);break;case t.DurationPartType.Second:r=wn(n,e),n=Dn(n,r);break;case t.DurationPartType.Millisecond:r=gn(n,e),n=On(n,r);break;default:throw new Error(`Unknown duration part: ${i}`)}s[i]=r}return s}function Ln(t,e,i){const r=Un(t,e,i);return i.map((t=>r[t]))}const jn={[t.DurationPartType.Year]:"Y",[t.DurationPartType.Month]:"M",[t.DurationPartType.Week]:"W",[t.DurationPartType.Day]:"D",[t.DurationPartType.Hour]:"H",[t.DurationPartType.Minute]:"M",[t.DurationPartType.Second]:"S"},Vn=[t.DurationPartType.Year,t.DurationPartType.Month,t.DurationPartType.Week,t.DurationPartType.Day],Bn=[t.DurationPartType.Hour,t.DurationPartType.Minute,t.DurationPartType.Second];const Hn=l`
338
+ */;function Kr(t,e,i){return r=>function(t,e,i){let r,n,s,{length:o}=i;const a={},l=t.length,u=e.length,c=[];if(!function(t,e){for(const i of t)if(-1===e.indexOf(i))return!1;return!0}(i,t))throw new Error(`Number "${i}" contains of non-alphabetic digits (${t})`);if(Gt(t,e))return i.join("");for(r=0;r<o;r++)a[r]=t.indexOf(i[r]);do{for(n=0,s=0,r=0;r<o;r++)n=n*l+a[r],n>=u?(a[s++]=Math.floor(n/u),n%=u):s>0&&(a[s++]=0);o=s,c.push(e[n])}while(0!==s);return c.reverse().join("")}(t.stringToChars(e),t.stringToChars(i),t.stringToChars(r))}const Jr=" ";t.TimeredCounterString=class extends t.TimeredCounter{constructor(){super(...arguments),this.__alphabet="",this.__initialValueString="",this.__valueString="",this.__oldValueString="",this.__partsOptions=null,this.__decimalToAnyBase=Kr(this.stringAdapter,"0123456789",this.__alphabet),this.__anyBaseToDecimal=Kr(this.stringAdapter,this.__alphabet,"0123456789")}get initialValue(){return super.initialValue}set initialValue(t){if(!qt(t))try{t=t.toString()}catch(e){throw new Error(`value ${t} is not a string.`)}this.__initialValueString=t??"",zt(this.__initialValueString)?super.initialValue=this.numberAdapter.create(0):(this.__updateAlphabet(this.__valueString,this.__initialValueString),super.initialValue=this.numberAdapter.create(this.__anyBaseToDecimal(this.__initialValueString)),super.value=this.numberAdapter.create(this.__anyBaseToDecimal(this.__valueString)))}get value(){return super.value}set value(t){if(qt(t)){if(this.__valueString===t)return}else try{t=t.toString()}catch(e){throw new Error(`value ${t} is not a string.`)}this.__oldValueString=this.__valueString,this.__valueString=t??"",zt(this.__valueString)?super.value=this.numberAdapter.create(0):(this.__updateAlphabet(this.__valueString,this.__oldValueString),super.oldValue=this.numberAdapter.create(this.__anyBaseToDecimal(this.__oldValueString)),super.value=this.numberAdapter.create(this.__anyBaseToDecimal(this.__valueString)))}get partsOptions(){return super.partsOptions}set partsOptions(t){this.__partsOptions=t,super.partsOptions={type:"string",fillChar:Jr,...this.__partsOptions,digitToChar:{" ":Jr,...this.__partsOptions.digitToChar}}}__updateAlphabet(t,e){const i=zt(t)&&zt(e)?"":`\0${e??""}${t??""}`,r=new Set(this.stringAdapter.stringToChars(i));this.__alphabet=Array.from(r).sort().join("");const n=this.stringAdapter,s=this.__alphabet;this.__decimalToAnyBase=Kr(n,"0123456789",s),this.__anyBaseToDecimal=Kr(n,s,"0123456789")}sampleToString(t){return this.__decimalToAnyBase(this.numberAdapter.toString(t))}connectedCallback(){this.__updateAlphabet(this.__valueString,this.__initialValueString),this.initialValue=this.__initialValueString,this.value=this.__valueString,this.partsOptions=this.__partsOptions??{},super.connectedCallback()}},t.TimeredCounterString.styles=[...t.TimeredCounter.styles,Gr],t.TimeredCounterString=e([ut("timered-counter-string")],t.TimeredCounterString);const Xr=36e5,tn=Symbol.for("constructDateFrom");function en(t,e){return"function"==typeof t?t(e):t&&"object"==typeof t&&tn in t?t[tn](e):t instanceof Date?new t.constructor(e):new Date(e)}function rn(t,e){return en(t,t)}function nn(t,e,i){const r=rn(t);return isNaN(e)?en(t,NaN):e?(r.setDate(r.getDate()+e),r):r}function sn(t,e,i){const r=rn(t);if(isNaN(e))return en(t,NaN);if(!e)return r;const n=r.getDate(),s=en(t,r.getTime());return s.setMonth(r.getMonth()+e+1,0),n>=s.getDate()?s:(r.setFullYear(s.getFullYear(),s.getMonth(),n),r)}function on(t,e,i){return en(t,+rn(t)+e)}function an(t){const e=rn(t),i=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return i.setUTCFullYear(e.getFullYear()),+t-+i}function ln(t,...e){const i=en.bind(null,e.find((t=>"object"==typeof t)));return e.map(i)}function un(t,e){const i=rn(t);return i.setHours(0,0,0,0),i}function cn(t,e){const i=+rn(t)-+rn(e);return i<0?-1:i>0?1:i}function hn(t){return!(!((e=t)instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))&&"number"!=typeof t||isNaN(+rn(t)));var e}function dn(t,e,i){const[r,n]=ln(0,t,e),s=pn(r,n),o=Math.abs(function(t,e){const[i,r]=ln(0,t,e),n=un(i),s=un(r),o=+n-an(n),a=+s-an(s);return Math.round((o-a)/864e5)}(r,n));r.setDate(r.getDate()-s*o);const a=s*(o-Number(pn(r,n)===-s));return 0===a?0:a}function pn(t,e){const i=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return i<0?-1:i>0?1:i}function fn(t){return e=>{const i=(t?Math[t]:Math.trunc)(e);return 0===i?0:i}}function mn(t,e,i){const[r,n]=ln(0,t,e),s=(+r-+n)/Xr;return fn(i?.roundingMethod)(s)}function gn(t,e){return+rn(t)-+rn(e)}function yn(t,e,i){const r=gn(t,e)/6e4;return fn(i?.roundingMethod)(r)}function _n(t,e){const i=rn(t);return+function(t){const e=rn(t);return e.setHours(23,59,59,999),e}(i)==+function(t){const e=rn(t),i=e.getMonth();return e.setFullYear(e.getFullYear(),i+1,0),e.setHours(23,59,59,999),e}(i)}function vn(t,e,i){const[r,n,s]=ln(0,t,t,e),o=cn(n,s),a=Math.abs(function(t,e){const[i,r]=ln(0,t,e);return 12*(i.getFullYear()-r.getFullYear())+(i.getMonth()-r.getMonth())}(n,s));if(a<1)return 0;1===n.getMonth()&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-o*a);let l=cn(n,s)===-o;_n(r)&&1===a&&1===cn(r,s)&&(l=!1);const u=o*(a-+l);return 0===u?0:u}function bn(t,e,i){const r=vn(t,e)/3;return fn(i?.roundingMethod)(r)}function wn(t,e,i){const r=gn(t,e)/1e3;return fn(i?.roundingMethod)(r)}function An(t,e,i){const r=dn(t,e)/7;return fn(i?.roundingMethod)(r)}function $n(t,e,i){const[r,n]=ln(0,t,e),s=cn(r,n),o=Math.abs(function(t,e){const[i,r]=ln(0,t,e);return i.getFullYear()-r.getFullYear()}(r,n));r.setFullYear(1584),n.setFullYear(1584);const a=s*(o-+(cn(r,n)===-s));return 0===a?0:a}function Sn(t,e){return+rn(t)<+rn(e)}function xn(t,e,i){return nn(t,-e)}function Nn(t,e,i){return function(t,e){return on(t,e*Xr)}(t,-e)}function On(t,e,i){return on(t,-e)}function Tn(t,e,i){return function(t,e){const i=rn(t);return i.setTime(i.getTime()+6e4*e),i}(t,-e)}function En(t,e,i){return function(t,e){return sn(t,3*e)}(t,-e)}function Dn(t,e,i){return function(t,e){return on(t,1e3*e)}(t,-e)}function Cn(t,e,i){return function(t,e){return nn(t,7*e)}(t,-e)}function Pn(t,e,i){return function(t,e){return sn(t,12*e)}(t,-e)}var Mn;t.DurationPartType=void 0,(Mn=t.DurationPartType||(t.DurationPartType={})).Millisecond="millisecond",Mn.Second="second",Mn.Minute="minute",Mn.Hour="hour",Mn.Day="day",Mn.Week="weekOfYear",Mn.Month="month",Mn.Quarter="quarter",Mn.Year="year";const kn={[t.DurationPartType.Millisecond]:1,[t.DurationPartType.Second]:1e3,[t.DurationPartType.Minute]:6e4,[t.DurationPartType.Hour]:36e5,[t.DurationPartType.Day]:864e5,[t.DurationPartType.Week]:6048e5,[t.DurationPartType.Month]:26298e5,[t.DurationPartType.Quarter]:78894e5,[t.DurationPartType.Year]:315576e5},In={1:t.DurationPartType.Millisecond,1e3:t.DurationPartType.Second,6e4:t.DurationPartType.Minute,36e5:t.DurationPartType.Hour,864e5:t.DurationPartType.Day,6048e5:t.DurationPartType.Week,26298e5:t.DurationPartType.Month,78894e5:t.DurationPartType.Quarter,315576e5:t.DurationPartType.Year},Rn=["era","year","quarter","month","weekOfYear","weekday","day","dayPeriod","hour","minute","second","timeZoneName"];function Un(e,i,r){let n=i;const s={};for(const i of r){let r=0;switch(i){case t.DurationPartType.Year:r=$n(n,e),n=Pn(n,r);break;case t.DurationPartType.Quarter:r=bn(n,e),n=En(n,r);break;case t.DurationPartType.Month:r=vn(n,e),n=sn(n,-r);break;case t.DurationPartType.Week:r=An(n,e),n=Cn(n,r);break;case t.DurationPartType.Day:r=dn(n,e),n=xn(n,r);break;case t.DurationPartType.Hour:r=mn(n,e),n=Nn(n,r);break;case t.DurationPartType.Minute:r=yn(n,e),n=Tn(n,r);break;case t.DurationPartType.Second:r=wn(n,e),n=Dn(n,r);break;case t.DurationPartType.Millisecond:r=gn(n,e),n=On(n,r);break;default:throw new Error(`Unknown duration part: ${i}`)}s[i]=r}return s}function Ln(t,e,i){const r=Un(t,e,i);return i.map((t=>r[t]))}const jn={[t.DurationPartType.Year]:"Y",[t.DurationPartType.Month]:"M",[t.DurationPartType.Week]:"W",[t.DurationPartType.Day]:"D",[t.DurationPartType.Hour]:"H",[t.DurationPartType.Minute]:"M",[t.DurationPartType.Second]:"S"},Vn=[t.DurationPartType.Year,t.DurationPartType.Month,t.DurationPartType.Week,t.DurationPartType.Day],Bn=[t.DurationPartType.Hour,t.DurationPartType.Minute,t.DurationPartType.Second],Hn=l`
339
339
  ::part(part-suffix) {
340
340
  font-size: 0.4em;
341
341
  line-height: 1;
@@ -363,5 +363,5 @@ function ft(t,e){return(e,i,r)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Ref
363
363
  >${this.__dateTimeFieldLabels[s[e]]}</span
364
364
  >`))}
365
365
  </timered-counter-roller>
366
- `}},t.TimeredCounterDatetimeDuration.styles=[...t.TimeredCounter.styles,Hn],e([dt({reflect:!0,converter:t=>Yt(t)?t:ce(t)})],t.TimeredCounterDatetimeDuration.prototype,"precision",null),t.TimeredCounterDatetimeDuration=e([ut("timered-counter-datetime-duration")],t.TimeredCounterDatetimeDuration);t.DurationPartMillisecond=kn,t.DurationPartMillisecondToType=In,t.cubicBezier=hr,t.easeInBack=Mr,t.easeInBounce=Vr,t.easeInCirc=Dr,t.easeInCubic=_r,t.easeInElastic=Rr,t.easeInExpo=Or,t.easeInOutBack=Ir,t.easeInOutBounce=Br,t.easeInOutCirc=Pr,t.easeInOutCubic=br,t.easeInOutElastic=Lr,t.easeInOutExpo=Tr,t.easeInOutQuad=yr,t.easeInOutQuart=$r,t.easeInOutQuint=Nr,t.easeInOutSine=fr,t.easeInQuad=mr,t.easeInQuart=wr,t.easeInQuint=Sr,t.easeInSine=dr,t.easeOutBack=kr,t.easeOutBounce=jr,t.easeOutCirc=Cr,t.easeOutCubic=vr,t.easeOutElastic=Ur,t.easeOutExpo=Er,t.easeOutQuad=gr,t.easeOutQuart=Ar,t.easeOutQuint=xr,t.easeOutSine=pr,t.linear=t=>t,t.noop=ur,t.setNumberAdapter=function(t,e){Xi.setNumberAdapter(t,e)},t.setStringAdapter=function(t){Xi.setStringAdapter(t)}}({});
366
+ `}},t.TimeredCounterDatetimeDuration.styles=[...t.TimeredCounter.styles,Hn],e([dt({reflect:!0,converter:t=>Yt(t)?t:ce(t)})],t.TimeredCounterDatetimeDuration.prototype,"precision",null),t.TimeredCounterDatetimeDuration=e([ut("timered-counter-datetime-duration")],t.TimeredCounterDatetimeDuration),t.DurationPartMillisecond=kn,t.DurationPartMillisecondToType=In,t.cubicBezier=hr,t.easeInBack=Mr,t.easeInBounce=Vr,t.easeInCirc=Dr,t.easeInCubic=_r,t.easeInElastic=Rr,t.easeInExpo=Or,t.easeInOutBack=Ir,t.easeInOutBounce=Br,t.easeInOutCirc=Pr,t.easeInOutCubic=br,t.easeInOutElastic=Lr,t.easeInOutExpo=Er,t.easeInOutQuad=yr,t.easeInOutQuart=$r,t.easeInOutQuint=Nr,t.easeInOutSine=fr,t.easeInQuad=mr,t.easeInQuart=wr,t.easeInQuint=Sr,t.easeInSine=dr,t.easeOutBack=kr,t.easeOutBounce=jr,t.easeOutCirc=Cr,t.easeOutCubic=vr,t.easeOutElastic=Ur,t.easeOutExpo=Tr,t.easeOutQuad=gr,t.easeOutQuart=Ar,t.easeOutQuint=xr,t.easeOutSine=pr,t.linear=t=>t,t.noop=ur,t.setNumberAdapter=function(t,e){Xi.setNumberAdapter(t,e)},t.setStringAdapter=function(t){Xi.setStringAdapter(t)}},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).TimeredCounter={});
367
367
  //# sourceMappingURL=timered-counter.global.js.map